Re: [AD] proposal: draw_sprite_*_ex

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


On 2007-04-23, Doug Eleveld <djeleveld@xxxxxxxxxx> wrote:
> > 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.

It's a good point.  I suggested NO_FLIP because I'd rather read code
with meaningful constants than "0".

Peter





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