rotate_sprite_trans(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

✨ NAME ✨

rotate_sprite_trans β€” rotates a sprite, bestie πŸ’« and it's part of the Allegro game programming library, so you already know it's iconic.


🌸 SYNOPSIS 🌸

#include <allegro.h>

void rotate_sprite_trans(BITMAP *bmp, BITMAP *sprite,

int x, int y, fixed angle);

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so literally what this does: it draws the sprite image onto the bmp bitmap. It gets placed with its top left corner at the position you specify, and then it's rotated by the angle you specify around its centre. that's it, that's the whole vibe πŸŽ€

The angle is a fixed point 16.16 number, in the exact same format the fixed point trig routines use β€” so 256 equals a full circle, 64 is a right angle, etc. iykyk 🧠✨

And the way that all rotation functions can draw between any two bitmaps?? even screen bitmaps, even bitmaps of different color depth. no cap, she's versatile πŸ’…

🫢 Positive increments of the angle will make the sprite rotate clockwise on the screen β€” and yes, the Allegro example shows this off, so go look at it.

πŸ’– SEE ALSO πŸ’–

like, go read these too, they're all part of the same friend group:


k bye bestie, go rotate something gorgeous πŸ’…πŸŒˆβ­

this little love letter came to you from Allegro, version 4.4.3 πŸŽ€ β€” periodt, that's the whole page πŸ«ΆπŸ’–

πŸ“¦ where this page comes from