[SDL] RotoZoom is great, but...
wizard at syntheticsw.com
Sat Sep 2 09:37:37 PDT 2006
> In a message dated 9/2/2006 12:22:30 P.M. Eastern Standard Time,
> wizard at syntheticsw.com writes:
>> SDL_Surface *temp = SpriteBMP[spriteNumber];
> does not copy the original surface from SpriteBMP [spriteNumber] into
> temp, it just sets temp with the reference to SpriteBMP ...
> Then the first time you free the original surface and
> the 2nd time try to rotate a NULL surface.
> Hi, how i fix above problem ? thanks I am alttle stupid and really need
> help with this!
Just delete the line with SDL_FreeSurface (temp) in your function.
I do not know how big your coding background is,
if SDL is just a new API to learn for you or if this
is your first programm in C/C++ or your first programm ever.
So maybe if you have problems to understand this pointer stuff
try to get a good book about C programming.
More information about the SDL