excolmap(3alleg4)
β¨ excolmap β¨
okay bestie, welcome to the Allegro manual π this lil page is all about excolmap, one of the example programs that ships with the Allegro game programming library. it's giving "graphics go brrr" energy and honestly? we're obsessed. π
πΈ NAME πΈ
excolmap β creating graphical effects with color mapping tables. it's an Allegro game programming library thing, iykyk. π¦
π SYNOPSIS π
#include <allegro.h>
Example excolmap
like yes, that's the whole vibe. short. iconic. periodt. β¨
π«Ά DESCRIPTION π«Ά
okay so listen. this program is literally a whole demo of how to cook up your own custom graphic effects using the create_color_table function. π₯
here's the tea: Allegro's drawing routines are affected by any color table you might have set up. like, they're not just out here doing their own thing β the table you install changes what actually lands on the screen. no cap.
part one, the greyscale era π©Ά
in the first part of this example, a greyscale color table gets set. the result? a simple rectfill call β which you'd think would just draw a rectangle with color zero β instead uses the already drawn pixels to determine the pixel to be drawn. so it's reading what's already there and deciding what to put down. wild, right?? π if you want the precise algorithm, go read the comment on return_grey_color(), because that's where the details live, bestie. πβ¨
part two, the villain arc π
in the second part of the test, the color table gets swapped out for an inverse table. meaning: any pixel you draw will show up as if its color values had been inverted. full opposites attract moment. π
π SEE ALSO π
the whole squad, fr fr β every single one of these is part of the family:
BITMAP(3alleg4)COLOR_MAP(3alleg4)END_OF_MAIN(3alleg4)PALETTE(3alleg4)RGB(3alleg4)RGB_MAP(3alleg4)SCREEN_H(3alleg4)SCREEN_W(3alleg4)allegro_error(3alleg4)allegro_init(3alleg4)allegro_message(3alleg4)blit(3alleg4)circlefill(3alleg4)clear_keybuf(3alleg4)color_map(3alleg4)create_bitmap(3alleg4)create_color_table(3alleg4)create_rgb_table(3alleg4)destroy_bitmap(3alleg4)drawing_mode(3alleg4)font(3alleg4)generate_332_palette(3alleg4)install_keyboard(3alleg4)keypressed(3alleg4)makecol(3alleg4)rectfill(3alleg4)rest(3alleg4)rgb_map(3alleg4)screen(3alleg4)set_gfx_mode(3alleg4)set_palette(3alleg4)textout_centre_ex(3alleg4)vsync(3alleg4)
π reminder: this whole thing is the excolmap example page from the Allegro manual, so if you're out here trying to actually run it, that's on you to compile. we're just here for the lore.
and that's the page, bestie!! πβ¨ this was excolmap(3alleg4) from Allegro, version 4.4.3 β mwah, sending you the biggest kiss, go make some color tables, slay, and don't forget to read the comment on return_grey_color(). bye babe ππ¦πΈ
π¦ 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