Re: [AD] GUI screen

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


Evert Glebbeek wrote:
The attached patch adds a way to change the default BITMAP surface for GUI drawing operations.

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);

As well, you should probably make BITMAP *gui_screen static. Don't need to expose it if no other source file needs it. Unless you'd rather make get/set_gui_bitmap static inline? Though I don't think that's very inducive to the future prospect of making the Allegro shared lib truely dynamicly loadable (which I hope can be done when the new API is completed), which means you can't have exposed variables.. only functions (or so I've heard?).




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