Jump to content
  • Advertisement
Sign in to follow this  
coden4fun

rotozoomSurface(tank, angle, zoom, smooth) NOT WORKING WHY?

This topic is 3888 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

Hi, I'm using SDL_gfx to try and rotate my freaken images on the screen, but they're not working here is how I have it setup. Please let me know what I'm doing wrong, and why I suck at programming.
SDL_Surface *Player::rotate(double angle, double zoom, int smooth)
{
	rotozoomSurface(tank, angle, zoom, smooth);
	return tank;
}


Programming is a never ending learning experience which totally don't mind since a month ago I didn't even know how to start OOP, or organize different class files, or work with objects, and now I love working with it, but now I'm stuck on something else yet again :( So the source up there is in my players class so all players will be able to rotate by pressing the L button then I have
if(keysHeld[SDLK_LEFT]) player->rotate(20.0, 0.0, 1);     

why is this not working? Please let me know. Oh, and I'm not getting any linking errors, compiling errors, syntax errors, it's running just not working.

Share this post


Link to post
Share on other sites
Advertisement
Isn't keysHeld[SDLK_LEFT] the left cursor key rather than the L key?

BTW, the rotozoom feature of SDL_gfx is intended for prerendering image rotation. For realtime image rotation, map the image to a texture in OpenGL and rotate it with that. If you don't know how, use hxRender or look at it's source code.

-edit-
For the C# version of hxRender look at the links on the hxRender link above and find the Project SHROOM link.

-edit2-
Evidently Joel hasn't uploaded Shroom to his web page yet. Email the author at his GMail address given in the "about me" page on his web page.

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!