fade_from(3)

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

✨ fade_from β€” the glow-up transition bestie ✨

okay so this is fade_from(3), and it's literally from the Allegro game programming library πŸ’œ like it's giving "your palette is getting a whole new era" energy and I am obsessed.


🌸 SYNOPSIS 🌸

#include <allegro.h>

void fade_from(const PALETTE source, const PALETTE dest, int speed);

that's it. that's the whole vibe. three little args and suddenly your screen is doing a slow-mo transformation πŸ¦‹


πŸ’– DESCRIPTION πŸ’–

So basically: this function fades gradually from the source palette to the dest palette. Like not a jump cut, not a hard cut, we're doing a cinematic crossfade, a glow-up in motion, the palette equivalent of taking off your glasses in a teen movie 😭✨

And speed? The speed is from 1 (the slowest, the most dramatic, the "let me savor this" option) up to 64 (instantaneous β€” boom, done, no transition at all, blink and you missed it πŸ’€).

⚠️ heads up bestie, two things: - this function will block your game while the fade is in effect. like, it's holding the whole thing hostage until the fade finishes. no multitasking. no "meanwhile". periodt. - and it won't work right visually if you are not in an 8 bit color depth resolution. so check that first fr fr, otherwise the vibes will be off and not in a cute way.

πŸ‘‘ SEE ALSO πŸ‘‘

go read those too, they're the whole friend group 🫢


mwah πŸ’… that was fade_from(3) from Allegro version 4.4.3, and yes it's dated β€” but she ate and she's still iconic, no cap. go make something pretty πŸŒˆβ­πŸŽ€

πŸ“¦ where this page comes from