Thanks donny662, but I think there is a misunderstanding. All animations you can see in my post are rendered in a 3D program (Lightwave) not by using the rotzoom function. Anyway, I solved the problem this morning by centering the rotated sprite:
Here is the original code and behavior:
CODE
SDL_Surface* dest = rotozoomSurface (_rm.loadImage("data/sprite.png"), angle, 1, 1);
SDLE::Sprite rotated(dest);
rotated.draw(__screen.get(), 50 , 50 );
SDL_FreeSurface(dest);
The solution is to translate the sprite in every frame with -Point(spriteWidth/2, spriteHeight/2) to center it:
CODE
SDL_Surface* dest = rotozoomSurface (_rm.loadImage("data/sprite.png"), angle, 1, 1);
SDLE::Sprite rotated(dest);
rotated.draw(__screen.get(), -rotated.getCenterOffset()[0]+150 , -rotated.getCenterOffset()[1]+150 );
SDL_FreeSurface(dest);
Now I only have to animate the leaning of the glider and can rotate it with the rotzoom function
I use now a sequence of only 31 frames to lean the glider.
The rotation is realized with the rotzoom function of the SDL_image lib.
Here is a link to a movie of the rotzoom version of the demo:
race_race_rotzoom2.mov (3.6 MB)
Here is a
link to the docs of my framework I'm using to program my stuff....