[SDL] RotoZoom is great, but...

SlntHero at aol.com SlntHero at aol.com
Sat Sep 2 07:17:40 PDT 2006


void Visuals::DisplayBMPonScreenBufferRotoZoom(Sint8 spriteNumber, Sint16  
xScreenPos, Sint16 yScreenPos, double angle, double zoom)
{
SDL_Rect  destinationRectangle;
 
 destinationRectangle.x = xScreenPos;
destinationRectangle.y  = yScreenPos;
 
 SDL_Surface *temp = SpriteBMP[spriteNumber];
SDL_Surface  *temp2 = rotozoomSurface(temp, angle, zoom, 1);
 
 destinationRectangle.x -= (temp2->w /  2);
destinationRectangle.y -= (temp2->h / 2);
 
 SDL_BlitSurface(temp2, NULL, Screen,  &destinationRectangle);
}




Hi the above Class function centers properly the new scaled and/or rotated  
BMP 100%.
 
Problem now is that is crashes after a set period of time
(Access Violation error)
 
Any ideas about this crash, perhaps I am doing something wrong in above  code 
???
 
Thanks in advance!
 
 
Jesse
_SLNTHERO at AOL.com_ (mailto:SLNTHERO at AOL.com) 
_www.SilentHeroProductions.com_ (http://www.SilentHeroProductions.com) 
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060902/afa23d20/attachment-0008.htm>


More information about the SDL mailing list