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 /src/graphic/graphic.cpp | |
parent | 5f463818c1cc95027092608347a4845753979704 (diff) | |
download | mana-86076c5ff89a71f2839ba54b53fce748552ef3b6.tar.gz mana-86076c5ff89a71f2839ba54b53fce748552ef3b6.tar.bz2 mana-86076c5ff89a71f2839ba54b53fce748552ef3b6.tar.xz mana-86076c5ff89a71f2839ba54b53fce748552ef3b6.zip |
*** empty log message ***
Diffstat (limited to 'src/graphic/graphic.cpp')
-rw-r--r-- | src/graphic/graphic.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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++; |