excolmap(3)
π excolmap(3) β the Allegro manual, but make it make sense π
okay so bestie, this is a page from the Allegro manual β the game programming library β and it's all about making graphical effects with color mapping tables. yes. that's the whole vibe. let's get into it π¦
β¨ NAME β¨
excolmap β creating graphical effects with color mapping tables. it's part of the Allegro game programming library, periodt. π
πΈ SYNOPSIS πΈ
#include <allegro.h>
Example excolmap
π DESCRIPTION π
so this program is a whole demo of how to cook up custom graphic effects using the create_color_table function. and here's the tea: Allegro drawing routines are affected by any color table you might have set up. like, every single one. no cap. β¨
part one, the greyscale era π©Ά
first up, the example sets a greyscale color table. and the result? iconic honestly. a simple rectfill call β instead of just drawing a rectangle with color zero β uses the already drawn pixels to determine the pixel to be drawn. it's giving remix. it's giving collaboration. (if you want the precise description of the algorithm, go read the comment of return_grey_color() β they really said "iykyk" and left it there π)
part two, the inverse era π
then the test switches the color table to an inverse table, which means any pixel you draw will show up as if its color values had been inverted. flip it, reverse it, slay. π
ngl bestie, this one's a "run it and stare at the screen" kind of example. the effects are the whole point. π
π SEE ALSO π
BITMAP(3)COLOR_MAP(3)END_OF_MAIN(3)PALETTE(3)RGB(3)RGB_MAP(3)SCREEN_H(3)SCREEN_W(3)allegro_error(3)allegro_init(3)allegro_message(3)blit(3)circlefill(3)clear_keybuf(3)color_map(3)create_bitmap(3)create_color_table(3)create_rgb_table(3)destroy_bitmap(3)drawing_mode(3)font(3)generate_332_palette(3)install_keyboard(3)keypressed(3)makecol(3)rectfill(3)rest(3)rgb_map(3)screen(3)set_gfx_mode(3)set_palette(3)textout_centre_ex(3)vsync(3)
aaaand that's the page!! π«Ά this lil' slice of docs comes straight from Allegro, version 4.4.3 β that's the source and the version, right there, so you know exactly which era of the library we're stanning. ππ go make something sparkly with it, bestie. π§β¨
π¦ 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