[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Monday 27 December 2004 13:58, Elias Pschernig wrote:
> You should always use diff -up, then it includes the functions.
Ah, thanks! That's very useful information.
> But I
> wonder, in this case, shouldn't gcc be clever enough to inline the
> function calls anyway?
Even if it does that, you still get gui_screen?gui_screen:screen at each
place where it's used. Best to cache that result anyway.
I don't think it matters too much in this case either way, I would think
that the [default Allegro] gui drawing code is hardly the time-critical
part of a program anyway, but it's nice to do things right.
On Monday 27 December 2004 14:04, Elias Pschernig wrote:
> I think he means, gui_get_screen(), or gui_screen(). It would match
> functions like gui_textout_ex or gui_strlen. Personally, I would just
> make it as global variable, so it would match "screen" :)
Ah, I see. Makes sense, I guess. My original idea was to make it a global
variable, but the fewer globals the better.
> Then when we are going to remove all global variables, both screen and
> gui_screen would go (..to the compatibility layer).
Yes, but the fewer globals we add now, the fewer we will need to support in
the compatibility layer. ;)
Evert