excolmap(3)

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

πŸ’– 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 πŸ’œ


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