diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-10-22 16:57:13 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-10-22 16:57:13 +0000 |
commit | 86076c5ff89a71f2839ba54b53fce748552ef3b6 (patch) | |
tree | c44975bb46fa9fe1e448a9e3a54d061875b6f4ac | |
parent | 5f463818c1cc95027092608347a4845753979704 (diff) | |
download | mana-client-86076c5ff89a71f2839ba54b53fce748552ef3b6.tar.gz mana-client-86076c5ff89a71f2839ba54b53fce748552ef3b6.tar.bz2 mana-client-86076c5ff89a71f2839ba54b53fce748552ef3b6.tar.xz mana-client-86076c5ff89a71f2839ba54b53fce748552ef3b6.zip |
*** empty log message ***
-rw-r--r-- | docs/ReadMe.txt | 4 | ||||
-rw-r--r-- | docs/TODO.txt | 1 | ||||
-rw-r--r-- | src/being.cpp | 5 | ||||
-rw-r--r-- | src/game.cpp | 25 | ||||
-rw-r--r-- | src/graphic/graphic.cpp | 8 | ||||
-rw-r--r-- | src/graphic/graphic.h | 1 | ||||
-rw-r--r-- | src/gui/skill.cpp | 2 | ||||
-rw-r--r-- | tmw.ini | 10 |
8 files changed, 42 insertions, 14 deletions
diff --git a/docs/ReadMe.txt b/docs/ReadMe.txt index 75613f7d..1a6dc043 100644 --- a/docs/ReadMe.txt +++ b/docs/ReadMe.txt @@ -60,6 +60,10 @@ Remember: the server is only for development or demo purposes (Thanks again to U - F1 to take a screenshot - F11 raise volume - F12 lower volume +- Alt + K Show skills +- Alt + S Show stats +- Alt + I Show inventory +- F5 to sit 4. Version history ------------------ diff --git a/docs/TODO.txt b/docs/TODO.txt index c881cde3..a73a7e77 100644 --- a/docs/TODO.txt +++ b/docs/TODO.txt @@ -3,6 +3,7 @@ - Add iconify button (ElvenProgrammer) - Skill point assignement (ElvenProgrammer) - Trading system (SimEdw) + - Add config dialog 2) Sound engine - ogg/mp3 playback (kth5) 3) Npc diff --git a/src/being.cpp b/src/being.cpp index 0c15918e..e52fc76e 100644 --- a/src/being.cpp +++ b/src/being.cpp @@ -149,7 +149,10 @@ unsigned int find_npc(unsigned short x, unsigned short y) { if((get_x(node->coordinates)==x)&&(get_y(node->coordinates)==y)) return node->id; else node = node->next; - } else node = node->next; + } else { + node = node->next; + //alert("id","","","","",0,0); + } } return 0; } diff --git a/src/game.cpp b/src/game.cpp index 2e8a1dde..a07ad8e4 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -119,7 +119,7 @@ void do_init() { if(!load_map(map_path))error("Could not find map file"); - //sound.StartMOD("./data/sound/Mods/somemp.xm", -1); + sound.StartMOD("./data/sound/Mods/somemp.xm", -1); // Initialize timers tick_time = 0; @@ -145,7 +145,8 @@ void do_init() { set_coordinates(player_node->coordinates, x, y, 0); player_node->speed = 150; add_node(player_node); - keyb_state = IDLE; + //keyb_state = IDLE; + show_npc_dialog = 0; remove("packet.list"); } @@ -278,17 +279,21 @@ void do_input() { } if(mouse_b&2) { - if(!show_npc_dialog) { + //if(show_npc_dialog==0) { int npc_x = mouse_x/32+camera_x; int npc_y = mouse_y/32+camera_y; int id = find_npc(npc_x, npc_y); + /*char tyr[20]; + sprintf(tyr,"%i %i %i", npc_x, npc_y, id); + alert(tyr,"","","","",0,0); + alfont_textprintf(screen, gui_font, mouse_x+20, mouse_y+20, MAKECOL_WHITE, "%i %i", npc_x, npc_y);*/ if(id!=0) { WFIFOW(0) = net_w_value(0x0090); WFIFOL(2) = net_l_value(id); WFIFOB(6) = 0; WFIFOSET(7); } - } + //} } if(key[KEY_ESC])state = EXIT; @@ -297,7 +302,7 @@ void do_input() { /** Calculate packet length */ int get_packet_length(short id) { - int len = get_length(id); + int len = get_length(id); if(len==-1)len = RFIFOW(2); return len; } @@ -638,8 +643,12 @@ void do_parse() { case 3: // Stand up node = find_node(RFIFOL(2)); if(node!=NULL) { - if(RFIFOB(26)==2) + node->frame = 0; + if(RFIFOB(26)==2) { node->action = SIT; + alert("","","","","",0,0); + walk_status = 0; + } else if(RFIFOB(26)==3) node->action = STAND; } @@ -702,10 +711,10 @@ void do_parse() { break; // Buy/Sell dialog case 0x00c4: - if(show_npc_dialog==0) { + //if(show_npc_dialog==0) { show_npc_dialog = 2; current_npc = RFIFOL(2); - } + //} break; // Buy dialog case 0x00c6: diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 3e07e9d0..197866d7 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -107,6 +107,10 @@ DIALOG chat_dialog[] = { { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL } }; +void set_npc_dialog(int show) { + show_npc_dialog = show; +} + int get_x_offset(NODE *node) { int offset = 0; char direction = get_direction(node->coordinates); @@ -195,10 +199,12 @@ void do_graphic(void) { while(node) { if((node->job>=100)&&(node->job<=110)) { // Draw a NPC masked_blit((BITMAP *)graphic[NPCSET_BMP].dat, buffer, (get_direction(node->coordinates)/2+4*(node->job-100))*25, 0, (get_x(node->coordinates)-camera_x)*16-4-offset_x, (get_y(node->coordinates)-camera_y)*16-24-offset_y, 25, 40); + //alfont_textprintf(buffer, gui_font, (get_x(node->coordinates)-camera_x)*16-4-offset_x, (get_y(node->coordinates)-camera_y)*16-24-offset_y, MAKECOL_WHITE, "%i %i", get_x(node->coordinates), get_y(node->coordinates)); } else if(node->job<10) { // Draw a player node->text_x = (get_x(node->coordinates)-camera_x)*16-34+get_x_offset(node)-offset_x; node->text_y = (get_y(node->coordinates)-camera_y)*16-36+get_y_offset(node)-offset_y; masked_blit((BITMAP *)graphic[PLAYERSET_BMP].dat, buffer, 80*(get_direction(node->coordinates)/2), 60*(node->frame+node->action), node->text_x, node->text_y, 80, 60); + alfont_textprintf(buffer, gui_font, 0, 20, MAKECOL_WHITE, "%i %i", node->text_x,node->text_y); if(node->emotion!=0) { draw_sprite(buffer, (BITMAP *)emotions[node->emotion-1].dat, (get_x(node->coordinates)-camera_x)*16-5+get_x_offset(node)-offset_x, (get_y(node->coordinates)-camera_y)*16-45+get_y_offset(node)-offset_y); @@ -434,6 +440,8 @@ void do_graphic(void) { alfont_textprintf(double_buffer, gui_font, 0, 0, MAKECOL_WHITE, "FPS:%i", fps); + alfont_textprintf(double_buffer, gui_font, 0, 20, MAKECOL_WHITE, "%i", show_npc_dialog); + blit(double_buffer, screen, 0, 0, 0, 0, 800, 600); frame++; diff --git a/src/graphic/graphic.h b/src/graphic/graphic.h index bfbb106f..e35d7b85 100644 --- a/src/graphic/graphic.h +++ b/src/graphic/graphic.h @@ -51,6 +51,7 @@ extern int show_npc_dialog; extern TmwInventory inventory; extern int map_x, map_y, camera_x, camera_y; +void set_npc_dialog(int show); void do_graphic(void); void init_graphic(void); void exit_graphic(void); diff --git a/src/gui/skill.cpp b/src/gui/skill.cpp index 45095902..46215b63 100644 --- a/src/gui/skill.cpp +++ b/src/gui/skill.cpp @@ -176,5 +176,5 @@ void increaseStatus(void *dp3, int d1) { WFIFOW(4) = net_b_value(1); WFIFOSET(5); while((out_size>0))flush(); - skill_dialog[2].d2 = skill_dialog[4].d2 = skill_dialog[6].d2 =skill_dialog[8].d2 =skill_dialog[10].d2 = 0; + skill_dialog[2].d2 = skill_dialog[4].d2 = skill_dialog[6].d2 = skill_dialog[8].d2 = skill_dialog[10].d2 = 0; } @@ -1,11 +1,13 @@ [system] system = -keyboard = it +keyboard = en language = [server] -host = animesites.de +;host = animesites.de ;host = themanaworld.homeip.net +host = localhost +;host = telekommunisten.dyndns.org port = 6901 [settings] @@ -23,8 +25,8 @@ chatlog = chatlog.txt ; = 0 Normal ; = 1 2xSaI ; = 2 SuperEagle -stretch = 0 +stretch = 1 [login] remember = 1 -username = player +username = elven |