pivot_scaled_sprite(3alleg4)

✨ pivot_scaled_sprite ✨

okay bestie, gather round, because we're doing Allegro manual page pivot_scaled_sprite from section 3alleg4 and it's literally the moment your sprite stops being a flat little rectangle and starts having main character energy πŸ’…


🌸 NAME 🌸

pivot_scaled_sprite β€” rotates and stretches a sprite around a specified point. it's from the Allegro game programming library, no cap πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

void pivot_scaled_sprite(BITMAP *bmp, BITMAP *sprite, int x, int y, int
       cx, int cy, fixed angle, fixed scale);

look at her. eight whole arguments. she's high maintenance and she knows it πŸ‘‘


πŸ’– DESCRIPTION πŸ’–

so, imagine rotate_scaled_sprite() β€” yeah, her cousin β€” but with a glow-up.

What this one does: it takes the point inside the sprite that you picked out with (cx, cy), and it lines that point up with (x, y) in the bitmap. Then it rotates and scales around that point. Around the pivot. Around the chosen one. 🫢

that's it. that's the whole vibe. rotate + scale + pinned to a point you actually care about instead of the boring default corner. periodt πŸ’…


πŸ‘€ SEE ALSO πŸ‘€


k bye, this page came to you straight from the Allegro manual, version 4.4.3, filed under pivot_scaled_sprite(3alleg4) β€” go make something spin, bestie πŸŒˆβœ¨πŸŽ€