Re: [AD] GUI screen

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


On Tuesday 21 December 2004 04:02, Chris wrote:
> I think it'd be better for functions that use the gui bitmap more than 
> once to copy the pointer into a stack variable and use that. So instead 
of:
> 
>     if (!is_same_bitmap(_mouse_screen, get_gui_bitmap()))
>        show_mouse(get_gui_bitmap());
> 
> it'd be:
> 
>     BITMAP gui_bmp = get_gui_bitmap();
>     if (!is_same_bitmap(_mouse_screen, gui_bmp))
>        show_mouse(gui_bmp);

Yes, you're right. One of the things you don't catch with a semi-automatic 
search-and-replace ;)
I'll change that.

> As well, you should probably make BITMAP *gui_screen static.

Yes. For some reason, I thought both gui.c and guiproc.c needed to have 
acces to it. I'll change that as well (although that could prevent the 
dunctions from being inlined... but I don't think it's that much of a deal 
in this case).

Evert





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