gbadev.org forum archive

This is a read-only mirror of the content originally found on forum.gbadev.org (now offline), salvaged from Wayback machine copies. A new forum can be found here.

Graphics > Rotation + Scaling != Correct Display of sprite

#16371 - DiscoStew - Sat Feb 14, 2004 12:18 am

For my program, I'm trying to do rotation and scaling at the same time with sprites, but it is not working as I would like it to. When doing each separately, it works just fine, but when I do them together, the scaling of the x/y axis after the rotation is not correct, it stays on the axis if rotation were 0. The code that I'm using is the same as in The Pern Project tutorials. Is there more that I need to do to make it work?
_________________
DS - It's all about DiscoStew

#16386 - DiscoStew - Sat Feb 14, 2004 8:46 am

Never mind, I figured it out.
It seems that Dovoto of The Pern Project made an error with his example code, though his example didn't show it due to equal x/y scaling. For pb, x-scale should have been used, and y-scale should have been used with pc. Now it will act as if scaling was done first, then rotation (from a visual POV)
_________________
DS - It's all about DiscoStew