Re: [AD] Renamed API second draft

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


Laurence Withers wrote:
> >Most operations (except draw_sprite()) can't be implemented
> >efficiently on cmp/rle.
> 
> OK, so if we don't implement this in the vtable, what should happen
> when somebody tries to execute `putpixel(my_rle_sprite, x, y, col)'?
> We could either silently ignore it, or abort the program. Perhaps we
> should ignore it in release builds but abort in debug builds?

My opinion is that my_rle_sprite should be of type RLE_SPRITE, my_bitmap
should be of type BITMAP and my_compiled_sprite should be of type
COMPILED_SPRITE. This totally avoids this problem, helps making a
distinction between objects which are of fundamentally different types,
and requires no work. If we should do something at all, it seems much
more logical to do (2a) or (2b), i.e., write a SPRITE structure which
has the single operation "draw masked", and can be represented
internally as anything.

-- 
Sven Sandberg   svsa1977@xxxxxxxxxx   home.student.uu.se/svsa1977



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