Re: [AD] Proposal: set_rgb_mode

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


> Right.  Then I propose:
>
>    #define AL_LAYOUT_RGB  0
>    #define AL_LAYOUT_BGR  1
>
>    int al_set_color_layout(int layout);
>       blah blah blah.  Returns the previous layout.
>
> i.e. gives you a way to switch to a specific layout then switch back.

What about
int al_get_color_layout(void);
void al_set_color_layout(int layout);

I don't really like the get/set megamix like in textmode =) (because in case
you just want to
know what color layout/textmode is active, you have to "set" one first,
isn't that odd ;)

On a side note, why don't we use enums instead of defines in allegro 5?
example
enum AL_LAYOUT {
    AL_LAYOUT_RGB,
    AL_LAYOUT_BGR
};

AL_LAYOUT al_get_color_layout(void);
void al_set_color_layout(AL_LAYOUT layout);

After all, that's what enums were created for.



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