Prog8 VERA FX Affine rotation of a Sprite

For posting library code and examples.
Post Reply
tallLeRoy
Posts: 4
Joined: Fri Mar 08, 2024 3:45 pm

File Download Prog8 VERA FX Affine rotation of a Sprite

Post by tallLeRoy »

R48 ROM and Emulator - Prog8 version 10.4.2 commit d34481 or later. ( floats.cos() had a code generation error. )

This example takes a 4bit 64x64 sprite, transforms it to tile and map notation for VERA FX Affine transformation, and rotates the sprite using VERA FX Affine operations.

The difficult part is calculation of the starting point for each line in the transform. The example shows how the trigonometric functions for the starting points are done for all 64 lines of the rotation.
affine.p8.txt
(13.81 KiB) Downloaded 31 times
Post Reply