diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-11-12 18:45:04 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-11-12 18:45:04 +0000 |
commit | edf872e4b6d3d689338305d749ba3972d77f7eb8 (patch) | |
tree | ffcbc634334f426736e0fdf77ecd580cdd5389a8 | |
parent | 526f9a301caa29d1922561104de9aea8bc213b65 (diff) | |
download | mana-client-edf872e4b6d3d689338305d749ba3972d77f7eb8.tar.gz mana-client-edf872e4b6d3d689338305d749ba3972d77f7eb8.tar.bz2 mana-client-edf872e4b6d3d689338305d749ba3972d77f7eb8.tar.xz mana-client-edf872e4b6d3d689338305d749ba3972d77f7eb8.zip |
Hair styles
-rw-r--r-- | The Mana World.dev | 2 | ||||
-rw-r--r-- | src/game.cpp | 14 | ||||
-rw-r--r-- | src/graphic/graphic.cpp | 6 | ||||
-rw-r--r-- | src/gui/char_select.cpp | 31 | ||||
-rw-r--r-- | src/gui/char_select.h | 1 |
5 files changed, 35 insertions, 19 deletions
diff --git a/The Mana World.dev b/The Mana World.dev index 607a05a9..3db57a1e 100644 --- a/The Mana World.dev +++ b/The Mana World.dev @@ -33,7 +33,7 @@ CompilerSettings=0000001001001000001101 Major=0 Minor=0 Release=8 -Build=39 +Build=64 LanguageID=1033 CharsetID=1252 CompanyName=The Mana World Development Team diff --git a/src/game.cpp b/src/game.cpp index df741710..ab0501c2 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -382,10 +382,10 @@ void do_parse() { // Success to walk request case 0x0087: if(walk_status==1) { - if(get_src_x(RFIFOP(6))==src_x) + /*if(get_src_x(RFIFOP(6))==src_x) if(get_src_y(RFIFOP(6))==src_y) if(get_dest_x(RFIFOP(6))==get_x(player_node->coordinates)) - if(get_dest_y(RFIFOP(6))==get_y(player_node->coordinates)) + if(get_dest_y(RFIFOP(6))==get_y(player_node->coordinates))*/ walk_status = 2; } break; @@ -400,9 +400,7 @@ void do_parse() { empty_path(node); memcpy(node->coordinates, RFIFOP(46), 3); node->hair_color = RFIFOW(28); - /*char set[30]; - sprintf(set, "%i %i %i %i",get_x(RFIFOP(46)),get_y(RFIFOP(46)),get_x(player_node->coordinates),get_y(player_node->coordinates)); - alert("78",set,"","","",0,0);*/ + node->hair_style = RFIFOW(16); add_node(node); } else { /*char set[30]; @@ -437,13 +435,14 @@ void do_parse() { if(node==NULL) { node = create_node(); node->id = RFIFOL(2); - node->job = RFIFOW(16); + node->job = RFIFOW(14); memcpy(node->coordinates, RFIFOP(46), 3); add_node(node); node->tick_time = tick_time; node->frame = 0; node->speed = RFIFOW(6); node->hair_color = RFIFOW(28); + node->hair_style = RFIFOW(16); } break; // Monster moving @@ -829,6 +828,9 @@ void do_parse() { /*char prova[100]; sprintf(prova, "%i %i %i", RFIFOL(2), RFIFOB(6), RFIFOB(7)); alert(prova,"","","","",0,0);*/ + } else if(RFIFOB(6)==1) { + node = find_node(RFIFOL(2)); + node->hair_style = RFIFOB(7); } break; // Manage non implemented packets diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index cc4ec179..1cf86f25 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -230,7 +230,7 @@ void do_graphic(void) { node->text_y = (get_y(node->coordinates)-camera_y)*16-36+get_y_offset(node)-offset_y; if(node->action==SIT)node->frame = 0; 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); - masked_blit(hairset, buffer, 20*(node->hair_color-1), 20*(get_direction(node->coordinates)/2), node->text_x+31+hairtable[node->action+node->frame][get_direction(node->coordinates)/2][0], node->text_y+15+hairtable[node->action+node->frame][get_direction(node->coordinates)/2][1], 20, 20); + masked_blit(hairset, buffer, 20*(node->hair_color-1), 20*(get_direction(node->coordinates)/2+4*(node->hair_style-1)), node->text_x+31+hairtable[node->action+node->frame][get_direction(node->coordinates)/2][0], node->text_y+15+hairtable[node->action+node->frame][get_direction(node->coordinates)/2][1], 20, 20); //alfont_textprintf(buffer, gui_font, 0, 20, MAKECOL_WHITE, "%i %i", node->text_x,node->text_y); if(node->emotion!=0) { @@ -244,11 +244,11 @@ void do_graphic(void) { node->frame = (get_elapsed_time(node->tick_time)*4)/(node->speed); if(node->frame>=4) { node->frame = 0; - if(node->action==WALK) + /*if(node->action==WALK) if(walk_status==1) { set_coordinates(player_node->coordinates, src_x, src_y, direction); walk_status = 0; - } + } */ node->action = STAND; // node->tick_time; if(node->id==player_node->id) diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index b1b88393..edb2f2dc 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -53,16 +53,18 @@ DIALOG char_create_dialog[] = { { tmw_button_proc, 398, 426, 44, 18, 0, -1, 'o', D_EXIT, -1, 0, (char*)"&Ok", NULL, NULL }, { tmw_button_proc, 446, 426, 44, 18, 0, -1, 'c', D_EXIT, -1, 0, (char*)"&Cancel", NULL, NULL }, { tmw_player_proc, 304, 282, 142, 100, 0, 0, 0, 0, 80, 60, NULL, NULL, NULL }, - { tmw_incbutt_proc, 450, 282, 20, 20, 0, 0, 0, 0, 2, 0, (char*)"<", &char_info->hair_color, NULL }, - { tmw_incbutt_proc, 472, 282, 20, 20, 0, 0, 0, 0, 1, 0, (char*)">", &char_info->hair_color, NULL }, - { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, + { tmw_incbutt_proc, 450, 282, 20, 20, 0, 0, 0, 0, 2, 0, (char*)"<", &char_info->hair_color, NULL }, + { tmw_incbutt_proc, 472, 282, 20, 20, 0, 0, 0, 0, 1, 0, (char*)">", &char_info->hair_color, NULL }, + { tmw_incbutt_proc2, 450, 304, 20, 20, 0, 0, 0, 0, 2, 0, (char*)"<", &char_info->hair_style, NULL }, + { tmw_incbutt_proc2, 472, 304, 20, 20, 0, 0, 0, 0, 1, 0, (char*)">", &char_info->hair_style, NULL }, + { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL }, }; -#define MAX_HAIR_COLOR 10 +#define MAX_HAIR_COLOR 9 +#define MAX_HAIR_STYLE 3 int tmw_incbutt_proc(int msg, DIALOG *d, int c) { if(msg==MSG_CLICK) { - //alert("","","","","",0,0); if(d->d1==1)char_info->hair_color++; else if(d->d1==2)char_info->hair_color--; if(char_info->hair_color<1)char_info->hair_color = MAX_HAIR_COLOR+1; @@ -71,17 +73,28 @@ int tmw_incbutt_proc(int msg, DIALOG *d, int c) { return D_O_K; } return tmw_button_proc(msg, d, c); +} + +int tmw_incbutt_proc2(int msg, DIALOG *d, int c) { + if(msg==MSG_CLICK) { + if(d->d1==1)char_info->hair_style++; + else if(d->d1==2)char_info->hair_style--; + if(char_info->hair_style<1)char_info->hair_style = MAX_HAIR_STYLE+1; + if(char_info->hair_style>MAX_HAIR_STYLE+1)char_info->hair_style = 1; + d->flags = 0; + return D_O_K; + } + return tmw_button_proc(msg, d, c); } int tmw_player_proc(int msg, DIALOG *d, int c) { if(msg==MSG_DRAW) { tmw_bitmap_proc(MSG_DRAW, d, 0); - //BITMAP *temp = create_bitmap(60, 50); - //clear_to_color(temp, makecol(255, 255, 255)); if(n_character>0) { masked_blit(playerset, gui_bitmap, 0, 0, d->x-10+40, d->y-10+30, 80, 60); - masked_blit(hairset, gui_bitmap, 20*(char_info->hair_color-1), 0, d->x+21+40, d->y+5+30, 20, 20); - } + masked_blit(hairset, gui_bitmap, 20*(char_info->hair_color-1), 20*4*(char_info->hair_style-1), d->x+21+40, d->y+5+30, 20, 20); + } + //textprintf(gui_bitmap, font, 0, 0, makecol(255,255,255), "%i", char_info->hair_style); //Super2xSaI(temp, gui_bitmap, 0, 0, d->x, d->y, temp->w*2, temp->h*2); //blit(temp, gui_bitmap, 0, 0, d->x, d->y, 60,50); } diff --git a/src/gui/char_select.h b/src/gui/char_select.h index 80e5716a..81b36495 100644 --- a/src/gui/char_select.h +++ b/src/gui/char_select.h @@ -35,6 +35,7 @@ #include "gui.h" int tmw_incbutt_proc(int msg, DIALOG *d, int c); +int tmw_incbutt_proc2(int msg, DIALOG *d, int c); int tmw_player_proc(int msg, DIALOG *d, int c); void char_select(); void server_char_select(); |