makeacol(3)

πŸ“¦ version 4.4.3.1, in fedora 43, fedora 44

πŸ’– makeacol β€” the Allegro manual, but make it a group chat πŸ’–

okay bestie, we're doing makeacol and makeacol_depth today. they live in the Allegro game programming library and their whole thing is turning RGBA colors into display dependent pixel formats. yes that's a lot of words, we'll get there 🫢


✨ NAME ✨

makeacol, makeacol_depth β€” converts RGBA colors into display dependent pixel formats. from the Allegro game programming library, no cap 🌈


πŸŽ€ SYNOPSIS πŸŽ€

#include <allegro.h>

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

int makeacol_depth(int color_depth, int r, int g, int b, int a);

like look at her. two little functions. one of them takes a color_depth because she's ✨extra✨ and knows where she's going.


🌸 DESCRIPTION 🌸

okay so. these two convert RGBA colors into display dependent pixel formats. that's the whole vibe.

here's the tea tho πŸ‘€ β€” in anything less than a 32-bit mode, these are literally the same as calling makecol() or makecol_depth(). same girl, different font.

BUT. and this is the part that eats πŸ’… β€” by using these routines instead, it's possible to create 32-bit color values that contain a true 8 bit alpha channel along with the red, green, and blue components. so r, g, b, and a. all four. the full set. periodt.

πŸ’€ okay important important important: you should ONLY use RGBA format colors as the input to draw_trans_sprite() or draw_trans_rle_sprite() after calling set_alpha_blender(). do NOT draw them directly to the screen. that's not a vibe, that's a bug. iykyk 😭

πŸ’… RETURN VALUE πŸ’…

returns the requested RGBA quadruplet ✨ like she said what she said.


πŸ¦‹ SEE ALSO πŸ¦‹

go read those too bestie, they're all connected, it's giving lore πŸŽ€


Allegro, version 4.4.3 β€” that's the source and the version, mwah, and this whole page is makeacol(3). stay iconic, go make some colors, ily πŸ«ΆπŸ’–βœ¨

πŸ“¦ where this page comes from