fade_from_range(3alleg4)
β¨ NAME β¨
fade_from_range β lowkey fades a part of the palette between two other palettes, bestie. This is from the Allegro game programming library, and it's giving glow-up energy π«
πΈ SYNOPSIS πΈ
#include <allegro.h>
void fade_from_range(const PALETTE source, const PALETTE dest, int speed, int from, int to);
π DESCRIPTION π
Okay so picture this: you've got your source palette, you've got your dest palette, and you want the vibes to gradually shift from one to the other. That's literally what this does. It fades a part of the palette from the source palette over to the dest palette, smooth like butter π§β¨
The speed goes from 1 (the slowest, most dramatic, main character slow-mo walk) all the way up to 64 (instantaneous β blink and it's done, no thoughts, head empty π).
And here's the tea: this routine only affects the colors between from and to, and yes that's inclusive. Want to fade the entire palette? Pass 0 and 255. Easy. Periodt. π
Heads up bestie, two things you need to know: - This function will block your game while the fade is in effect. Like, it fully commits. Nothing else is happening until it's done π - It also won't work right visually if you are not in an 8 bit color depth resolution. Just so you know, no cap. π
π¦ SEE ALSO π¦
fade_from(3alleg4)β the cousin, the sibling, the other one π«Ά
Allegro manual, version 4.4.3 β mwah, thanks for reading, you ate this whole page up fr fr π₯π stay iconic, and go make something pretty fade in and out of existence like the queen you are πβ¨π
π¦ where this page comes from
- debian bookworm: allegro4-doc 2:4.4.3.1-3 Β· Allegro-gift-ware
- debian trixie: allegro4-doc 2:4.4.3.1-5 Β· Allegro-gift-ware
- ubuntu jammy: allegro4-doc 2:4.4.3.1-2 Β· Allegro-gift-ware
- ubuntu noble: allegro4-doc 2:4.4.3.1-4.1build3 Β· Allegro-gift-ware
- ubuntu questing: allegro4-doc 2:4.4.3.1-6
- ubuntu resolute: allegro4-doc 2:4.4.3.1-7 Β· Allegro-gift-ware
- ubuntu stonking: allegro4-doc 2:4.4.3.1-9 Β· Allegro-gift-ware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms