[Fwd: [Q] N00b Question]

Okay, I’m trying to compose some images for blitting to my SDL
display. The reason I’m doing this is to reduce the number of blits
that must be done. I can do it on-the-fly and this works…I’m just
looking for optimizations now.

Here’s what I need to do:
I have a .TGA file that I load using IMG_Load()
I blit portions of that TGA file to another surface to compose the
final image
I then blit the final image repeatedly to the display as needed.

However, what happens is that because the target surfaces alpha
channel is used and the src alpha channel is ignored, my images come
out with the transparency all screwed up.

What it’s like I need to do is to allocate my secondary surface and
blit my alpha “mask” on to the surface, and then blit my actual image.

Let me see if I can explain this better:
I have Surface A and Surface B.
Surface is a TGA file that contains an alpha channel.
Surface B is a surface I create. (SDL_AllocSurface)

I then blit portions of A on to B. The surface B now contains all of
the pieces of A that I would expect, but with the alpha channel of
surface B.

I somehow need to have the target be “empty” and “take on” the
channels of the pieces of A that I blit.

I’m sorry this is so long, but I’m having trouble trying to explain
what’s happening.

------------------------ Yahoo! Groups Sponsor ---------------------~–>
Tiny Wireless Camera under $80!
Order Now! FREE VCR Commander!
Click Here - Only 1 Day Left!

To unsubscribe from this group, send an email to:
JEDI-SDL-unsubscribe at yahoogroups.com

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/

http://www.DelphiGamer.com := for all your Object Pascal game
development needs;
http://www.delphi-jedi.org/Jedi:TEAM_SDL_HOME := Home of JEDI-SDL;
Cross-platform game development with Pascal, has never been easier.

----- Original Message -----