Jump to content
  • Advertisement
Sign in to follow this  

SDL problem with rotation, image disappearing

This topic is 3673 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Sign in to follow this  

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!