Re: [AD] proposal: draw_sprite_*_ex

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




Milan Mimica wrote:
Jon Rafkind 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


There are also gouraud shaded sprites, so I suggest adding SPRITE_GOURAUD.

But I don't understand how LIT and GOURAUD are handled here. Lit shaded sprites require one additional parameter (look at draw_lit_sprite()), while draw_gouraud_sprite() requires 4 more parameters. Is seems that we really need separate functions for different drawing modes.

draw_lit only requires an extra parameter because of 8-bit depth. for true-colors it uses set_trans_blender. I think gourad needs those extra parameters in all color depths so the same trick wont suffice.




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