Re: [AD] proposal: draw_sprite_*_ex

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


> I define the constants above as
> #define DRAW_SPRITE_NO_FLIP 1
> #define DRAW_SPRITE_H_FLIP 2
> #define DRAW_SPRITE_V_FLIP 4
> 
> instead of starting from 0 just to make it more
> obvious that they should 
> be or'ed together but they could just as easily be
> 0, 1, 2. 

Does it make sense to define DRAW_SPRITE_NO_FLIP?  You
just know someone is going to use something like
DRAW_SPRITE_NO_FLIP | DRAW_SPRITE_H_FLIP and end up
confused as to what should happen.  What should happen
anyway?  I think a good API makes it hard to express
confusing things.  My suggestion would be:

#define DRAW_SPRITE_H_FLIP 1
#define DRAW_SPRITE_V_FLIP 2

My apologies if I may be missing the point.

Doug Eleveld


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 




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