[SDL] Easy answers

16 bits rox dude. What you want to do is create virtual palettes. Assign your
sprites to different palettes. For example, when in an RPG where they fight, the
landscape dims, but the characters stay the normal color, that's cuz they palette
for the tiles is different. I can help you some more on this if you want...16 bit
fading is cool too, I've implemented it.
Paul Lowe
spazz at ulink.net
Vaclav Slavik wrote:
> rival games wrote:
>> > I really enjoy all this talk about scrolling methods, because I am
> > currently working on a super metroid like engine, you can click onto my
> > url at the bottom to read more about this [open source project], but I
> > have a question...
> >
> > How can I blit something with a certain tint? I'm in 640x480 by 16 bit
> > color, so how can I (quickly) draw a sprite with a say.. blue tint. And
> > how could I draw it so all the non-transparent pixels are white? Is
> > there an easy way, or will I have to modify some of the SDL code?
> > Thanks.
>> I'd recommend storing sprites as 8bit palettized images (probably in some
> native, non-SDL structure), together with several palettes (normal, blue tint,
> red tint, etc.). Each sprite would have associated palette in one byte and if
> you change this value from, say, PAL_NORMAL to PAL_TINTED and redraw the sprite,
> different palette would be used...
>> AFAIK this is not supported by SDL itself, so you have to write your own
> routines.
>> Vasek