ROTATE_SPRITE_V_FLIP_TRANS(3alleg4)
β¨ NAME β¨
okay bestie, so rotate_sprite_v_flip_trans β it rotates AND flips a sprite, and it's part of the Allegro game programming library π (this is the 3alleg4 page, in case the manual name wasn't obvious, which, slay, now it is).
π SYNOPSIS π
#include <allegro.h>
void rotate_sprite_v_flip_trans(BITMAP *bmp, BITMAP *sprite, int x, int
y, fixed angle);
like, that's the whole vibe. five args, one destiny π
π¦ DESCRIPTION π¦
So you already know rotate_sprite_trans, right? This is literally that, except it flips the image vertically first, and then rotates it. Flip then rotate. Order matters, bestie, don't come for me πΈ
Want to flip horizontally instead? Cute. Use this exact routine, but add itofix(128) to the angle. That's it. That's the trick. The way that one little addition does all of thatβ¦ iconic, honestly π
Want to flip in both directions? Then you reach for rotate_sprite() instead, and you add itofix(128) to its angle. Two flips, one function call, main character energy fr fr π
ngl the itofix(128) thing is the entire secret sauce here β half a full turn in fixed point. just remember it and you're set π«Ά
π SEE ALSO π
rotate_sprite_trans(3alleg4)β the no-flip version, the OGrotate_scaled_sprite_v_flip_trans(3alleg4)β flips and scales, overachiever behavior β¨pivot_sprite_v_flip_trans(3alleg4)β pivots around a point instead, fancypivot_scaled_sprite_v_flip_trans(3alleg4)β pivots, scales, flips, does everything πexsprite(3alleg4)β the example, go look at it, it's giving demonstration
okay that's the whole page!! this was Allegro, version 4.4.3, and yes the header up top was doing the little rotate_spr...flip_trans(3alleg4) abbreviation thing because manpage titles are dramatic like that. bye bestie, go flip something vertically π¦πβ¨
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms