Hello!
First some background. A few years ago I wrote a platform game for the PC.
It was written using C/C++ and assembler for the graphics stuff. Recently
I thought it would be fun to port it to linux and other platforms. I
started to look around for graphic and sound libraries. I ended up with
allegro. The port was straightforward and worked quite well. But…
Allegro seems to have some problems… So I thought about using SDL which
was recommended by a friend.
But such as the subject implies, I have a problem…
I have set up the screen to 320x200 in 16bit color mode. I use a "buffer"
page that I draw to (using SDL_BlitSurface) and once each frame this
buffer is blitted to the video-surface (using SDL_Flip). My problem is
this. I have sprites which I have set the transparant pixel on using
SDL_SetColorKey (to a Pink color). These are then blitted to the buffer
page. But the problem is that the blit isn’t transparant. At least it
doesnA’t look like that on the screen. I get a box around each sprite that
are black (my transparant color is pink (255, 0, 255)).
What’s wrong? Should I set transparancy info for the destination surface
also? Use this “Alpha channel stuff”?
If you need code tell be, I just thought this info should be enough for
experienced SDL users.
Please help.
/ Niklas----------------------------------------------------------------------
Chat with friends online, try MSN Messenger: Click Here