Hello,

there is a problem with rotation, it seems that angle need a minus sign (-) to be correct. perhaps, it's due to sdl_gfx which not use the same referential than clanlib to do the rotation.

Yes, and this is better to change the sprite class referencial instead of changing everywhere rotation is used.

I totally agree with you !

I think that SDL_gfx is a temporary solution as it allocate/free a new surface for each blit: 1 surface allocation (temporary surface of which we can't know the size du to scaling)
1 special blit (filling the temporary surface computing scale, rotation)
1 a normal blit alpha/colorkey  (temporary to destination surface)
1 surface free (the temporary surface that is not usefull any more)

Doing it ourself, we can avoid allocation/free of the temporary surface and combine the 2 blits in only 1.

Well, ok, but are we able to do ? and to do it portable ?

But for now, that seems to do the job and I don't think the bottleneck is coming from the rotozoomXY function.

Sure, because we already have it without calling any rotozoomXY function...

A+
Matt

Répondre à