Re: [AD] Request: adding textout_ex(), which takes bg color as parameter |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
> Wow, that turned out to be a lot of work. Patch attached. Here is a
> quick runthrough of the changes:
> - _textmode and text_mode() moved to alcompat.h
> - all textout()-style functions moved to alcompat.h
> - added new textout_ex()-style functions
> - rewrote old textout() functions to use textout_ex() functions
> - added documentation for new textout_ex() functions
> - marked text_mode() and old textout() functions as deprecated in docs
> - changed GFX_VTABLE structure because draw_character() and
> draw_glyph() needed a 'bg' parameter added
> - updated all the vtables I could find which implemented either
> draw_character() or draw_glyph().
Nice work. Commited.
There was a problem on the asm side: 'bg' is not a GLOBaL symbol, so the
resulting library didn't link as a DLL under Windows. And you forgot to modify
the C equivalent routines (only one template actually in src/c/cspr.h).
I also inlined as many deprecated routines as possible (i.e all except the
textprintf_*).
> - removed the inline 'draw_character' function, as it's not used
> anywhere and was broken.
Huh... it belongs to the API! I added a 'draw_character_ex()' function as well
as a 'gui_textout_ex' function and marked the old ones as deprecated.
> Still to do, but this can come later (everything works fine as it is
> now):
> - convert the gui code to use this patch,
> - convert the tools/examples to use textout_ex().
Now on the todo list.
--
Eric Botcazou