[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: alleg-developers@xxxxxxxxxx
- Subject: Re: [AD] GUI screen
- From: Chris <chris.kcat@xxxxxxxxxx>
- Date: Mon, 20 Dec 2004 19:02:43 -0800
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:x-accept-language:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding; b=AqWNKY1n2AzMH7t39F1n/roaCJRACOzta0adQK65TTvOeTrdEKp3fITGR0ESpbDDhZ/DKl7w9YCmHwGVb/25jihr1jn8e14NrHRDaLo7W//R4fy7Cxxp09WwEowYbiKENJ8PLt/wqLI1z1yt6cNQwjZlGK3rhSN6D8bmsFuJQFs=
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?).