RE: [AD] Allegro iprovements |
[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]
> > 1) Owner color. In many games (especially RTS ones) there
> is need of
> > indicating owner of unit by changing one particular color. There is
> > possibility of making new sprites, but why don't make it like
> > transparency?
Why can't you do with the stock transparency routines ?
Or are you concerned about speed (one compare per pixel
(or a call if you weren't already using trans routines)) ?
Granted, it's a bit slow with non indexed modes if you
want to test several colors, as making it table driven
would require quite huge tables. I do that in my game
(a grayscale image is tinted to the "right" color) and
it works a treat. But then it's not done many times per
frame.
On a side note, maybe fblend would help there, since it
has a function call per scanline instead of per pixel.
Look it up on ... sourceforge IIRC ..
--
Vincent Penquerc'h
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |