Re: R: R: R: [AD] Allegro 5 new config routines, alpha 1

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


Peter Wang wrote:
On 2002-02-11, Sven Sandberg <svsa1977@xxxxxxxxxx> wrote:

What makes me want to restrict the use of config variables is that
things like current color depth and gfx_capabilities are likely to be
used often, in time-critical situations, and from assembler, in which
case I think it would be better to keep them in variables or simple
inline functions.

Then they will be available to Allegro internally, but not to applications externally. This way, we can change them as we go and not have to worry about backward compatibility with cryptic add-ons (see cpu_model and friends).



Even if people don't agree with my point of view, I think at least we
should agree on where to draw the line.

Which is why I've been trying to get people to comment/complain on the new APIs as they are proposed.


For function arguments, I think a simple starting point would be to
keep stuff that are "suggestions" in the config system, and use
arguments for the rest.  Thus, colour depth and update method would be
passed to `set_gfx_mode', but refresh rate would go in the config
system.

Color depth needs to be a separate function if you need to switch bitmap depths on the fly. So instead of having a dedicated function, we can use the config API, which leaves us open for things like color spaces, etc.



--
- Robert J Ohannessian
"Microsoft code is probably O(n^20)" (my CS prof)
http://pages.infinit.net/voidstar/



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