geta32(3)
β¨ geta32(3) β¨
okay bestie, so this one lives in the Allegro manual, and it's part of the Allegro game programming library. it's giving "tiny function, big responsibilities" energy and honestly? we love her for it π
πΈ NAME πΈ
geta32 β pull the alpha component out of a 32-bit pixel format color. yes queen, that's the whole job. (the original says "form" but like, we all know she means "from" π«Ά)
π SYNOPSIS π
#include <allegro.h>
int geta32(int c);
look at that. one include, one function, zero drama. iconic.
π¦ DESCRIPTION π¦
so basically: you hand her a color that's chillin' in a 32-bit pixel format, and she hands you back just the alpha component. that's it. that's the function.
and the alpha value you get back? it ranges 0-255. so like, fully transparent to fully opaque, the whole range, no cap π«Ά
int geta32(int c);
ngl this is the kind of function you forget exists and then spend 45 minutes reinventing badly. she's right there. use her π
π SEE ALSO π
getr8(3)β the red-component bestie, if you're collecting the whole squad π
Allegro, version 4.4.3 β that's the source, that's the version, and that's the whole vibe check. mwah, go extract some alpha, you got this π β¨π
π¦ 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