select_palette(3)
π select_palette β the Allegro manual, but make it slay π
okay bestie, gather round, because we're talking about select_palette(3) from the Allegro manual / Allegro game programming library, and honestly? she's a little chaotic but we love her. π
β¨ NAME β¨
select_palette β sets the internal palette for color conversion. π
(yes, that's the whole vibe. Allegro game programming library, as always.)
πΈ SYNOPSIS πΈ
#include <allegro.h>
void select_palette(const PALETTE p);
π¦ DESCRIPTION π¦
so here's the tea, bestie: this one is, and I quote the source energy here, an ugly hack β for use in various dodgy situations where you need to convert between paletted and truecolor image formats. π no cap, she's built for the messy moments.
What she does: she sets the internal palette table in the same way as the set_palette() function, so your conversion will use the specified palette... but β and this is the iconic part β without affecting the display hardware in any way. π
The previous palette settings get stored in an internal buffer, and you can restore them by calling unselect_palette(). π«Ά
β οΈ but listen. if you call select_palette() again, the internal buffer will be overwritten. so don't be out here stacking calls and then wondering where your old palette went. π
π SEE ALSO π
and that's the whole page, bestie!! π go forth and convert those palettes responsibly, mwah π
this has been Allegro, version 4.4.3 β stan her, she's been holding it down forever. bye babes! πβ¨π¦π
π¦ 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