diff options
author | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-11-19 15:58:06 +0000 |
---|---|---|
committer | Eugenio Favalli <elvenprogrammer@gmail.com> | 2004-11-19 15:58:06 +0000 |
commit | ff858300d4b303d4c48b2d915ac6cea30182aa8d (patch) | |
tree | 786c2808202abdae93d6a48c2272b66f28da6a94 /src/graphic/graphic.cpp | |
parent | a2cc2aa19f7dacdd719c9459cdfedb952e0c8d09 (diff) | |
download | mana-ff858300d4b303d4c48b2d915ac6cea30182aa8d.tar.gz mana-ff858300d4b303d4c48b2d915ac6cea30182aa8d.tar.bz2 mana-ff858300d4b303d4c48b2d915ac6cea30182aa8d.tar.xz mana-ff858300d4b303d4c48b2d915ac6cea30182aa8d.zip |
Hair styles
Diffstat (limited to 'src/graphic/graphic.cpp')
-rw-r--r-- | src/graphic/graphic.cpp | 24 |
1 files changed, 17 insertions, 7 deletions
diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 42b6856e..d3abd21f 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -117,7 +117,7 @@ DIALOG npc_list_dialog[] = { { NULL, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, NULL, NULL, NULL } }; -char hairtable[10][4][2] = { +char hairtable[14][4][2] = { // S(x,y) W(x,y) N(x,y) E(x,y) { { 0, 0}, {-1, 2}, {-1, 2}, {0, 2} }, // STAND { { 0, 2}, {-2, 3}, {-1, 2}, {1, 3} }, // WALK 1st frame @@ -128,7 +128,11 @@ char hairtable[10][4][2] = { { { 0, 1}, {-1, 2}, {-1, 3}, {0, 2} }, // ATTACK 2nd frame { { 0, 2}, {-4, 3}, {0, 4}, {3, 3} }, // ATTACK 3rd frame { { 0, 2}, {-4, 3}, {0, 4}, {3, 3} }, // ATTACK 4th frame - { { 0, 4}, {-1, 6}, {-1, 6}, {0, 6} }, // SIT + { { 0, 0}, {-1, 2}, {-1, 2}, {-1, 2} }, // BOW_ATTACK 1st frame + { { 0, 0}, {-1, 2}, {-1, 2}, {-1, 2} }, // BOW_ATTACK 2nd frame + { { 0, 0}, {-1, 2}, {-1, 2}, {-1, 2} }, // BOW_ATTACK 3rd frame + { { 0, 0}, {-1, 2}, {-1, 2}, {-1, 2} }, // BOW_ATTACK 4th frame + { { 0, 4}, {-1, 6}, {-1, 6}, {0, 6} } // SIT }; void set_npc_dialog(int show) { @@ -229,8 +233,15 @@ void do_graphic(void) { 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; 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+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); + if(node->action==ATTACK) { + masked_blit((BITMAP *)graphic[PLAYERSET_BMP].dat, buffer, 80*(get_direction(node->coordinates)/2), 60*(node->frame+node->action+4*node->weapon), node->text_x, node->text_y, 80, 60); + draw_rle_sprite(buffer, (RLE_SPRITE *)weaponset[16*node->weapon+4*node->frame+get_direction(node->coordinates)/2].dat, node->text_x, node->text_y); + 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+4*node->weapon][get_direction(node->coordinates)/2][0], node->text_y+15+hairtable[node->action+node->frame+4*node->weapon][get_direction(node->coordinates)/2][1], 20, 20); + } else { + 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+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) { @@ -420,8 +431,7 @@ void do_graphic(void) { show_npc_dialog = 0; buy_player = init_dialog(buy_dialog, -1); close_shop(); - } - break; + }break; case 4: //alert("","","","","",0,0); //char ds[20]; @@ -495,7 +505,7 @@ void do_graphic(void) { update_stats_dialog(); gui_update(stats_player); - alfont_textprintf(double_buffer, gui_font, 0, 0, MAKECOL_WHITE, "FPS:%i %i %i %i %i %i", fps, get_x(player_node->coordinates), get_y(player_node->coordinates),src_x,src_y,server_tick); + alfont_textprintf(double_buffer, gui_font, 0, 0, MAKECOL_WHITE, "FPS:%i %i %i %i %i %i %i", fps, get_x(player_node->coordinates), get_y(player_node->coordinates),src_x,src_y,server_tick,player_node->weapon); //alfont_textprintf(double_buffer, gui_font, 0, 20, MAKECOL_WHITE, "%i", show_npc_dialog); |