Page 1 of 1

Prog8 VERA FX Affine rotation of a Sprite

Posted: Tue Sep 24, 2024 9:31 pm
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 32 times