[SDL] Blitting on 8 bit surfaces
grimfang4 at hotmail.com
Wed Dec 26 06:41:03 PST 2007
Just a note to make sure you don't waste your time: There exist many rewritten blitting routines already. I can only point you to the one I worked on since I don't know much about the others. Look for SPG_Blit in the SPG_Surface.cpp file in my Sprig library at http://pubpages.unh.edu/%7Ejmb97
> To: sdl at libsdl.org
> From: tvgenial at web.de
> Date: Wed, 26 Dec 2007 14:53:57 +0100
> Subject: Re: [SDL] Blitting on 8 bit surfaces
> Sylvain Beucler schrieb:
> > Hi,
> > On Sun, Dec 23, 2007 at 11:27:56AM +0100, Christian Meyer wrote:
> >> Thanks for your answer :)
> >> In my spezial case, I have surfaces where some indices have a spezial
> >> meaning (e. g. marks areas where an animations will be displayed).
> >> So if I understood this correctly, I have to do the following:
> >> When all pixels with index n should be unchaged, I have to make sure,
> >> that n points to the same RGB-value in both palettes.
> > I think this may not always work. For example, maybe the destination
> > palette has the same RGB-value than index 'n' _twice_: at index 'n'
> > and at another index. In that case, maybe the other index will be used.
> > I'm not sure if there's an easy way to do that using BlitSurface. If
> > you only work with 8bit surfaces, maybe you could easily implement
> > your own Blit function (see
> > http://www.libsdl.org/cgi/docwiki.cgi/Pixel_20Access).
> >> When the color of a pixel should be unchanged, I just have to make sure,
> >> that the RGB-Value exists in the dest palette.
> > This should work :)
> Yes, I think implementing my own blit function will be the easiest way.
> Thanks yor your help, and merry Christmas :)
> SDL mailing list
> SDL at lists.libsdl.org
Get the power of Windows + Web with the new Windows Live.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SDL