I’m using SDL_GFX to rotate sprites, and coming up against an odd bug in its
interaction with SDL1.2.5.
Displaying the rotated sprites works fine, but in order to get a bitmap
collision mask for the rotated sprite, I create a temporary surface with
rotozoom’s rotate function (with smoothing off, to speed it up). I then lock
the surface with SDL_LockSurface( ), read the pixel data to generate the
collision mask, then unlock the surface with SDL_UnlockSurface( ). I’ve used
SDL_MUSTLOCK( ) to check that the surface requires locking, and yes - the
surface needs to be locked.
Unfortunately, when I call SDL_UnlockSurface( ), the program crashes.
If I copy SDL’s 1.2.3 DLL into the directory, not only does the program work
fine, but the surface from rotozoom reports that it does not need to be
locked.
I’ve recompiled SDL_GFX against SDL1.2.5 to make sure that it’s not some
issue with conflicting versions, but the newly compiled version still
doesn’t work with SDL 1.2.5, and still does work with 1.2.3.
Does anyone know of something that has changed in 1.2.5 that might cause
this behaviour?
Keith Lawrence