diff options
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++; |