pivot_scaled_sprite_v_flip(3)

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

πŸ’– pivot_scaled_sprite_v_flip β€” the Allegro glow-up page πŸ’–

okay bestie, so this one is from the Allegro manual (yes, the game programming library, section 3, we love a classic) πŸŽ€


✨ NAME ✨

pivot_scaled_sprite_v_flip β€” rotates, stretches and flips a sprite around a specified point. Allegro game programming library. πŸ¦‹

Like… it does the whole trio. Rotation? Check. Stretch? Check. Flip? Check. Around a point you pick? Absolutely, main character energy only. πŸ’…


🌸 SYNOPSIS 🌸

#include <allegro.h>

void pivot_scaled_sprite_v_flip(BITMAP *bmp, BITMAP *sprite, int x, int
y, int cx, int cy, fixed angle, fixed scale);
not me dropping the exact signature up there so you can copy-paste it fr fr πŸ‘‘

🫢 DESCRIPTION 🫢

Okay so it's like rotate_scaled_sprite_v_flip(), bestie β€” same vibe, same energy β€” BUT here's the twist: it first aligns the point inside the sprite given by (cx, cy) to (x, y) over in the bitmap. 🎯

Then, once that little anchor is all cozy in place, it rotates and scales around that point. That's it, that's the whole thing. The pivot is doing all the heavy lifting and honestly? iconic. ✨


πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're the friend group πŸ’œ


aaaand that's the page!! this one's from Allegro version 4.4.3, filed under pivot_scaled_sprite_v_flip(3) β€” mwah, slay, go rotate something pretty πŸŒˆβ­πŸŽ€

πŸ“¦ where this page comes from