AL_ID(3alleg4)
π AL_ID π
okay bestie, so this is AL_ID from the Allegro manual, section 3alleg4, and it's literally the cutest little macro for making IDs. no cap.
β¨ NAME β¨
AL_ID β converts four 8 bit values to a packed 32 bit integer ID. it's giving Allegro game programming library energy. π
πΈ SYNOPSIS πΈ
#include <allegro.h>
Macro AL_ID(a,b,c,d)
π¦ DESCRIPTION π¦
okay so this macro? it can be used to create a packed 32 bit integer from 8 bit characters, and it works on both 32 and 64 bit machines. periodt. π
these can be used for various things, like custom datafile objects or system IDs. main character utility macro fr fr. π
example time, bestie:
#define OSTYPE_LINUX AL_ID('T','U','X',' ')
the way that just packs 'T', 'U', 'X', and ' ' into one iconic 32 bit integer? obsessed. β¨
π SEE ALSO π
DAT_ID(3alleg4)β another ID macro bestie, go check it out π«Ά
that's the whole vibe, no notes. π
this was Allegro version 4.4.3, mwah, bye bestie! πβ¨π
π¦ 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