[AD] remove global variables from Allegro

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Occasionally I bind Allegro to various languages and the biggest pain is
always dealing with global variables that permeate through Allegro.
Could the same thing that was done with the text*_ex functions be done
with virtually everything else? In particular Id like to get rid of
color_map and rgb_map. Grepping through the Allegro source shows quite a
number of hits of these two variables so it would be fairly non-trivial
to remove all their uses, I would only attempt it if there is a general
consensus that such a thing is good.

What I mean by the text*_ex functions is before there used to be some
global variable to keep track of the background color and you could set
it via text_mode( -1 ) or something. Instead of that the background
color is passed into the text_ function such as

void textprintf_ex(BITMAP *bmp, const FONT *f, int x, int y, int color,
int bg, const char *fmt, ...);




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/