where //_ImageToDraw->GetSDLSurface() is a SDL_Surface * //_ImageToDraw->GetRotation() is a double //_ImageToDraw->GetScalingFactorX() is a double //ImageToDraw->GetScalingFactorY() is a double //_ImageToDraw->GetAntiAliased() //#define SMOOTHING_OFF 0 // #define SMOOTHING_ON 1
returns a new rotated / scaled SDL_Surface then blit NewRotatedSDLSurface to your screen
@ blackcloak: Thanks for the information, however, I'm still having trouble deciphering how it works.
At the moment, I've tried the following:
I'm only using: #include "SDL/SDL_rotozoom.h" , as I only need rotozoom. I have two global surfaces ready for use: SDL_Surface *player = NULL; SDL_Surface *rotated = NULL;
When the player surface is clicked on (I have all the code ready and working for the mouse event):
rotated = rotozoomSurface(player, 10, 0, 0);
Pretty much, this is a test to see if it worked. I wanted the rotated surface to copy the same picture of the player surface. It should be rotated by a value of 10. I don't need any zooming or things like that, so I left the other values at 0.
I know there's something wrong with this (as the program refuses to run with this line of code), and I don't know the problem, since I really don't know how it works.
Any help would be appreciated. (Should I make a new thread for this? It's no longer related to the original problem.)