fade_out_range(3alleg4)

✨ fade_out_range ✨

okay bestie, welcome to the Allegro manual πŸ’– β€” yes, the actual game programming library, and yes we're about to make a chunk of your palette fade to black like it's leaving the group chat 🫢

🌸 NAME 🌸

fade_out_range β€” gradually fades a part of the palette to black. Allegro game programming library. πŸ‘‘

πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro.h>

void fade_out_range(int speed, int from, int to);

πŸ’… DESCRIPTION πŸ’…

So basically? This one takes part of your palette and fades it from whatever the current palette is, all the way down to a black screen. bye bye colors πŸŒˆβž‘οΈπŸ–€

The speed goes from 1 (the slowest, most dramatic, main-character slow-mo moment 🐒) all the way up to 64 (instantaneous, blink and it's gone πŸ’€).

And here's the tea: this routine only touches the colors between from and to β€” inclusive, bestie, both ends count. So if you want to fade the entire palette, you pass 0 and 255. Slay. ✨

heads up though 🚨 this function will block your game while the fade is in effect β€” like, it's holding the whole thing hostage until it's done 😭. Also it won't work right visually if you're not in an 8 bit color depth resolution. no cap, don't skip that part.

πŸ¦‹ SEE ALSO πŸ¦‹


and that's the whole vibe, bestie πŸŽ€βœ¨ this was Allegro, version 4.4.3, and yeah β€” that's the manual page, mwah πŸ’‹