rotate_sprite_trans(3)
β¨ 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:
draw_trans_sprite(3)rotate_scaled_sprite_trans(3)rotate_sprite_v_flip_trans(3)rotate_scaled_sprite_v_flip_trans(3)pivot_sprite_trans(3)pivot_sprite_v_flip_trans(3)pivot_scaled_sprite_trans(3)pivot_scaled_sprite_v_flip_trans(3)itofix(3)exsprite(3)
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
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms