Login
Back to forumReply to this topicGo to last reply

Posted By

777
on 2025-08-14
03:36:46
 are there any rotate udg routines out there that rotate say 8 degrees at a time?

i want one that does it in 8 degrees or so, clockwise and anticlockwise

i don't mind if the edges get cut off when it rotates, btw

any ideas?

i know that i would probably have to use shearing to do this, which would be faster

i also know that i would use 256 segments instead of 360 as computers deal with this number alot better, so it would be 32 segments at 8 degrees each
Posted By

gerliczer
on 2025-08-14
06:38:24
 Re: are there any rotate udg routines out there that rotate say 8 degrees at a time?

Could the following help? http://ffd2.com/fridge/lib3d/rotmat.s
Posted By

777
on 2025-08-15
03:40:08
 Re: are there any rotate udg routines out there that rotate say 8 degrees at a time?

no this rotates using lines, not udgs
Posted By

gerliczer
on 2025-08-15
09:47:08
 Re: are there any rotate udg routines out there that rotate say 8 degrees at a time?

BTW, what is a(n) udg?
Posted By

777
on 2025-08-15
10:11:00
 Re: are there any rotate udg routines out there that rotate say 8 degrees at a time?

its a character that has been redesigned. e.g to look like a ship, etc.
Posted By

gerliczer
on 2025-08-15
11:10:32
 Re: are there any rotate udg routines out there that rotate say 8 degrees at a time?

So, you actually want to rotate a character sized bitmap. Well, for that rotating lines is quite a good starting point. You rotate two lines representing opposing sides of the output in the input bitmap. While you traverse these lines parallelly, you traverse the input bitmap between the continuously moving two points of the lines representing the opposing sides outputting the points you crossed, and you're done.

The question is, does that worth the effort or is it absolutely necessary, instead of storing those thirty-two phases and copying them just as they are needed?
Csabo1
Posted By

777
on 2025-08-16
03:13:17
 Re: are there any rotate udg routines out there that rotate say 8 degrees at a time?

no i don't want to rotate lines. i want to rotate the binary bitmap. this is done with shearing. its easier as i don't have to draw the rotation as a load of sprites


Back to topReply to this topic


Copyright © Plus/4 World Team, 2001-2025. Support Plus/4 World on Patreon