PIVOT_SCALED_SPRITE_LIT(3alleg4)

πŸ’– pivot_scaled_sprite_lit β€” Allegro manual ✨

okay bestie, welcome to the Allegro manual, this one's from the 3alleg4 era and it's giving "rotate AND stretch, but make it anchored" πŸŽ€


🌸 NAME 🌸

pivot_scaled_sprite_lit β€” rotates and stretches a sprite around a specified point. Part of the Allegro game programming library, and yes it ate πŸ’…


✨ SYNOPSIS ✨

#include <allegro.h>

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

πŸ¦‹ DESCRIPTION πŸ¦‹

So it's literally just like rotate_scaled_sprite_lit() β€” same energy, same vibe β€” BUT πŸ”₯ the plot twist is that it takes the point in the sprite given by (cx, cy) and aligns that exact point onto (x, y) in the bitmap. THEN it rotates and scales around that point. Periodt.

Think of it as: the sprite isn't spinning around its own corner, bestie, it's spinning around the spot you picked 🧚 and that spot stays glued to (x, y) the whole time. Iconic behaviour, no cap.


πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie 🫢 this was Allegro version 4.4.3, pivot_scaled_sprite_lit(3alleg4), mwah πŸ’‹ go spin something pretty ⭐