Avoid deprecated allegro functions.

This commit is contained in:
David Capello 2011-01-28 04:55:55 -08:00
parent 196d1d65d3
commit 69fa03dcd7
4 changed files with 4 additions and 8 deletions

View File

@ -193,11 +193,10 @@ static Image* render_text(Sprite* sprite, FONT *f, const char *text, int color)
if (!bmp)
return NULL;
text_mode(-1);
ji_font_set_aa_mode(f, -1);
clear_to_color(bmp, makecol32 (255, 0, 255));
textout(bmp, f, text, 0, 0, makecol32 (255, 255, 255));
textout_ex(bmp, f, text, 0, 0, makecol32 (255, 255, 255), -1);
image = image_new(sprite->getImgType(), w, h);
if (!image) {

View File

@ -179,8 +179,7 @@ void jdraw_text(BITMAP* bmp, FONT* font, const char *s, int x, int y,
SETUP_ANTIALISING(font, bg_color, fill_bg);
text_mode(fill_bg ? bg_color: -1);
textout(bmp, font, tmp, x, y, fg_color);
textout_ex(bmp, font, tmp, x, y, fg_color, (fill_bg ? bg_color: -1));
if (hline_pos >= 0) {
c = ugetat(tmp, hline_pos);

View File

@ -526,8 +526,7 @@ bool jmanager_generate_messages(JWidget manager)
jwidget_flush_redraw(manager);
/* make some OSes happy */
yield_timeslice();
rest(1);
rest(0);
if (!jlist_empty(msg_queue))
return true;

View File

@ -314,7 +314,6 @@ static void draw_text(BITMAP *bmp, FONT *f, const char *text, int x, int y,
{
/* TODO optional anti-aliased textout */
ji_font_set_aa_mode(f, bg_color);
text_mode(fill_bg ? bg_color: -1);
textout(bmp, f, text, x, y, fg_color);
textout_ex(bmp, f, text, x, y, fg_color, (fill_bg ? bg_color: -1));
/* TODO */
}