Re: [AD] proposal: draw_sprite_*_ex

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


On 2007-04-22, Jon Rafkind <workmin@xxxxxxxxxx> wrote:
> Proposal: The addition of new functions, draw_sprite_ex, 
> draw_sprite_h_flip_ex, draw_sprite_v_flip_ex, draw_sprite_vh_flip_ex, 
> which act as their non-ex counterparts but with the addition of a 
> parameter to specify the modification of the pixels as they are drawn. 
> This last parameter can be one of the following
>    SPRITE_NORMAL - draw sprite as normal
>    SPRITE_TRANS - draw trans sprite
>    SPRITE_LIT - draw lit sprite
> 
> Other modes can easily be added as long as the mode depends on existing 
> parameters + global state only. The prototypes for these functions are
> 
> draw_sprite_*_ex( BITMAP *bmp, BITMAP *sprite, int x, int y, int mode );

Can we use a parameter to indicate the flipping? (to be combined with
bitwise OR)

    DRAW_SPRITE_NO_FLIP
    DRAW_SPRITE_H_FLIP
    DRAW_SPRITE_V_FLIP

The mode should probably be an enum, although Allegro 4.2 doesn't tend
to use them.

Peter





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