mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Avoid deprecated allegro functions.
This commit is contained in:
parent
196d1d65d3
commit
69fa03dcd7
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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;
|
||||
|
@ -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 */
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user