Rotating Sprites Demo

Publicado 2023-06-12


Hi,

I made a small demo of a function I have been working on. It is called rspr and can draw sprites with any rotation.
It has the following signature:

It takes the angle in the same format as sin and cos and draws the sprite rotated around dx,dy.
You can scale the drawn sprite with dw,dh and it can draw sprites of any size.
However, large values for dw and dh cause some serious performance losses, so you should avoid scaling up sprites to unreasonable sizes.

Due to this slowdown, I would really like to have this function implemented natively in pico-8. What do you think, @zep?

Thank you, @freds72, for the suggestion of inlining the function calls. It does speed up the function remarkably.