_set_color(3)
β¨ _set_color β¨
okay bestie, so this is a page from the Allegro manual β the Allegro game programming library, if you're new here π β and we're talking about _set_color, the inline little sister of set_color(). she's fast, she's specific, and she has β¨opinionsβ¨ about where she's allowed to be used. let's get into it π
πΈ SYNOPSIS πΈ
#include <allegro.h>
void _set_color(int index, const RGB *p);
π DESCRIPTION π
So. _set_color() is literally just the inline version of set_color() π«Ά. She exists for one reason and one reason only: to be called from inside the vertical retrace simulator callback function β that's retrace_proc, which is, and I cannot stress this enough, deprecated π. like, girl, she's retired, we don't do that anymore.
ok but if you really, truly, absolutely must call_set_colorfromretrace_proc, here's the tea: it should only be used under DOS, and only in VGA mode 13h and mode-X. no exceptions, no vibes-based workarounds.
And why, you ask? π¦ because some SVGA chipsets aren't VGA compatible. On those cards, set_color() and set_palette() will go ahead and use VESA calls to do their thing β but _set_color()? she literally doesn't know about that π. no VESA fallback, no plan B. so yeah, that's the whole situation. iconic behavior, honestly.
π₯ SEE ALSO π₯
and that's the page, bestie π go forth and set your colors responsibly (or don't, but like, know the risks). this has been brought to you by Allegro, version 4.4.3 β β mwah, stay slaying ππ β¨
π¦ 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