Sign in to follow this  

SDL problem with rotation, image disappearing

Recommended Posts

Hello, I'm fairly new to SDL and I've been trying to create a small Wheel of Fortune game to get the hang of it. But I ran across a number of problems regarding the GFX library. I managed to compile it though after alot of hassling, and started to implement it in the code. Now I'm with one last problem, there's very limited documentation regarding this library, so I tried to implement it like this:
		Uint8 *keystates = SDL_GetKeyState ( NULL);
			image = rotozoomSurface(image, 5, 0, 1);
			//credits = addcredits();
			apply_surface( 0, 0, background, screen);
			apply_surface( 215, 75, image, screen );
(This part is from a while loop, of course) However, each time I press the Down key, the image simply disappears when rotating. I also read that you would do best Caching rotations first, and I wondered on how to do this as well. Thanks in advance. If there's any documentation or tutorials I could follow, it would be great as well.

Share this post

Link to post
Share on other sites
Clicky had a different problem with the rotozoomSurface, but provides source code to how the rotation was handled. May want to have a quick look-see at it in case it helps.

Other than that, I'm not sure I know anything that can be of assistance to you. Good luck!

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this