select_palette(3alleg4)
π NAME π
okay bestie, welcome to select_palette(3alleg4) from the Allegro manual β aka the Allegro game programming library β¨. This function is select_palette, and its whole deal is: sets the internal palette for color conversion. That's it. That's the name. Periodt π
.
β¨ SYNOPSIS β¨
#include <allegro.h>
void select_palette(const PALETTE p);
π DESCRIPTION π
Okay so lowkey this one is described as an ugly hack for use in various dodgy situations where you need to convert between paletted and truecolor image formats π. No cap.
What it does: it sets the internal palette table in the same way as the set_palette() function, so the conversion will use the specified palette β but without affecting the display hardware in any way π¦. It's giving "palette for me, not for thee" iykyk.
The previous palette settings are stored in an internal buffer, and can be restored by calling unselect_palette(). Cute, right? π«Ά
π¨ Careful bestie: if you call select_palette() again, however, the internal buffer will be overwritten. So don't expect that old palette to come back after a second call β she's gone, fr fr π.
π SEE ALSO π
Source/version check: this page is from the Allegro manual, version 4.4.3, and the footer didn't print a date, so that's the whole footer vibe β no date, just version 4.4.3 and select_palette(3alleg4) energy ππ. Byeee, go convert something slayfully β¨.
π¦ 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