Thanks for the advice. That’s what I was going for but I seem to recall
having tried such in the past and it not working.
Can you provide example code?
My primary problem in the past was that I would blit something to
the “screen” surface and it would come out in shades of grey.
Hmmm, strange. I just checked some code that works, but I don’t convert
anything and it still works. I’m not using different input formats though,
but I’m also not setting the colour depth of the screen (bpp=0).
Someone suggested the SDL_ConvertSurface, which cured the problem. Now
I’ve started building a static background for a game and in the test
phases it doesn’t come out at all. So I figured on trying the same
Really, how about some example code?
I am encapsulating much of this into classes and the problem may be tied
up in that approach.
C++ is a mean bitch, it provides many, many ways to shoot yourself in the
foot. Used correctly, it does actually help writing correct programs though,
compared to C.
BTW, does anyone know if there are any books published on SDL?
Yes, there was “Programming Linux Games”, published in 2001 by No Starch
Press in cooperation with Loki Software, Inc. It heavily used SDL, no surprise
since it is a child of Loki (or maybe of Sam Latinga, but I think he worked
for Loki at that time). I have the sources for the book here, they were
rescued when the world turned on and left Loki behind, maybe you can find
them with a websearch.
UliOn Tuesday 15 May 2007 16:34:01 Lilith Calbridge wrote: