sprite flipping
SDL only supplies very rudimentary graphics functions. For anything else you'll either have to use one of the many 2d libraries available, write yourself or even switch to OpenGL.
Check out the libsdl.org for a fairly complete list of external libraries you may use.
Check out the libsdl.org for a fairly complete list of external libraries you may use.
I read around, and supposedly the best way to do this is to have the sprite flipped in whatever direction you want beforehand, that way it doesn't have to rotate at runtime. So just open up MSPaint and select the sprite, then go to Image->Flip/Rotate. Otherwise, I'm pretty sure your stuck with writing your own rotation code, probably something to do with reading out your pixel data from the surface, rotating it, then putting it back in.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement