makeacol(3alleg4)
π makeacol β the Allegro manual, but make it cute π
okay so bestie, we're in the Allegro manual, 3alleg4 section, and today's main character is makeacol (and its lil sibling makeacol_depth). they convert RGBA colors into display dependent pixel formats. that's the whole vibe. π
β¨ NAME β¨
makeacol, makeacol_depth β converts RGBA colors into display dependent pixel formats. Allegro game programming library.
πΈ 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);
π¦ DESCRIPTION π¦
so these two convert RGBA colors into display dependent pixel formats. π
here's the tea: in anything less than a 32-bit mode, these are literally the same as calling makecol() or makecol_depth(). same thing, no notes. but β and this is the iconic part β by using these routines it is possible to create 32-bit color values that contain a true 8 bit alpha channel along with the red, green, and blue components. so like, a real alpha channel, not a vibe. β¨
β οΈ okay important, bestie: you should only use RGBA format colors as the input todraw_trans_sprite()ordraw_trans_rle_sprite()after callingset_alpha_blender(), rather than drawing them directly to the screen. do not just yeet them at the screen. that's not the move. π
π RETURN VALUE π
returns the requested RGBA quadruplet. that's it, that's the whole thing. she delivers. π«Ά
π SEE ALSO π
makecol(3alleg4)makecol_depth(3alleg4)set_alpha_blender(3alleg4)set_write_alpha_blender(3alleg4)exrotscl(3alleg4)
Allegro version 4.4.3 π and yeah, that's the page β makeacol(3alleg4) said what she said. go make some 32-bit alpha magic, bestie, ily. π§β¨
π¦ 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