diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-19 16:56:49 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2004-12-19 16:56:49 +0000 |
commit | b5eb7cc46994a62932c608f8cc7cda02ccf46718 (patch) | |
tree | fdf9eed5103816011454c82421bc1bde7400ed24 /src/graphic/graphic.cpp | |
parent | 2ba36f9e096fc7b75a3c83076236cb66134ec782 (diff) | |
download | mana-b5eb7cc46994a62932c608f8cc7cda02ccf46718.tar.gz mana-b5eb7cc46994a62932c608f8cc7cda02ccf46718.tar.bz2 mana-b5eb7cc46994a62932c608f8cc7cda02ccf46718.tar.xz mana-b5eb7cc46994a62932c608f8cc7cda02ccf46718.zip |
Don't use alfont for text above player character.
Diffstat (limited to 'src/graphic/graphic.cpp')
-rw-r--r-- | src/graphic/graphic.cpp | 42 |
1 files changed, 26 insertions, 16 deletions
diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 91745901..406c953c 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -440,23 +440,33 @@ new_tileset->spriteset[0]->draw(vbuffer, 0, 0); guiGraphics->setTarget(vpage[page_num]); gui_update(NULL); - // Draw player speech - node = get_head(); - while(node) { - if(node->speech!=NULL) { - if(node->speech_color==makecol(255,255,255)) - alfont_textprintf_aa(vpage[page_num], gui_font, node->text_x*2+90-alfont_text_length(gui_font, node->speech)/2, node->text_y*2, node->speech_color, "%s", node->speech); - else - alfont_textprintf_aa(vpage[page_num], gui_font, node->text_x*2+60-alfont_text_length(gui_font, node->speech)/2, node->text_y*2, node->speech_color, "%s", node->speech); - - node->speech_time--; - if(node->speech_time==0) { - free(node->speech); - node->speech = NULL; - } + // Draw player speech + node = get_head(); + while (node) { + if (node->speech!=NULL) { + if (node->speech_color == makecol(255, 255, 255)) { + textprintf_centre_ex(vpage[page_num], font, + node->text_x * 2 + 90, + node->text_y * 2, + node->speech_color, -1, + "%s", node->speech); + } + else { + textprintf_centre_ex(vpage[page_num], font, + node->text_x * 2 + 60, + node->text_y * 2, + node->speech_color, -1, + "%s", node->speech); + } + + node->speech_time--; + if (node->speech_time == 0) { + free(node->speech); + node->speech = NULL; + } + } + node = node->next; } - node = node->next; - } inventory.draw(vpage[page_num]); |