makeacol32(3alleg4)

✨ makeacol32 ✨

okay bestie, welcome to the Allegro manual page for makeacol32, from section 3alleg4 πŸ’– β€” she's a tiny little Allegro game programming library girlie and she has ONE job and she does it flawlessly, no cap πŸŽ€


🌸 NAME 🌸

makeacol32 β€” converts an RGBA color into a 32-bit display pixel format. It's literally living inside the Allegro game programming library πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <allegro.h>

int makeacol32(int r, int g, int b, int a);

✨ DESCRIPTION ✨

so the vibe is this: makeacol32 takes an RGBA color and squishes it into a 32-bit display pixel format, alpha (aka the transparency value) included 🫢 like she's packing the whole squad into one pixel and honestly? iconic.

now, there are no versions of this routine for other color depths, and that's not a laziness thing, bestie, it's a math thing 😭 only the 32-bit format has enough room to store a proper alpha channel. the other depths simply do not have the storage, and we do not ask them to do things they cannot do πŸ’€

⚠️ real talk though: you should only use RGBA format colors as the input to draw_trans_sprite() or draw_trans_rle_sprite() β€” and only after calling set_alpha_blender(). do not just draw them directly to the screen. that's not the move. that's giving chaos πŸ™ˆ

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, periodt πŸ’… this was Allegro version 4.4.3, makeacol32(3alleg4) β€” go forth and blend your sprites responsibly, my love πŸŒˆπŸ’œ