fade_interpolate(3)
π NAME π
fade_interpolate β the function that whips up a brand-new palette by interpolating between two other palettes π¨β¨ Part of the Allegro game programming library, bestie π
β¨ SYNOPSIS β¨
#include <allegro.h>
void fade_interpolate(const PALETTE source, const PALETTE dest, PALETTE
output, int pos, int from, int to);
Obsessed with how clean that signature is, ngl. π«Ά
π¦ DESCRIPTION π¦
okay so here's the tea, bestie β β fade_interpolate literally calculates a temporary palette that sits part way between source and dest, and it hands that fresh new palette back to you in the output parameter. it's giving glow-up, but make it math π
where exactly it lands between those two extremes? that's what pos is for, and it's so simple:
0gives you an exact copy ofsourceβ like, a full clone, no changes, no cap π64gives youdestβ we made it all the way, slay π32gives you a palette that's half way between the two β the middle child, the main character moment πΈ- and etc., you get the vibe, it's just a position along the way β¨
β οΈ but wait β this routine only touches the colors betweenfromandto, and yes that's inclusive, both ends, no crumbs left behind π so if you wanna interpolate the entire palette you gotta pass0and255. that's the whole palette, every single color, periodt πβ¨
π SEE ALSO π
fade_in(3)πfade_out(3)πfade_from(3)π
and that's the whole page, bestie!! this icon of a manpage came from Allegro, version 4.4.3 β written in the fade_interpolate(3) era, the one and only π¦β¨ go interpolate something pretty, ily, mwah π
π
π¦ where this page comes from
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 43: allegro-devel 4.4.3.1-18.fc43 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- fedora 44: allegro-devel 4.4.3.1-20.fc44 Β· Giftware
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms