extrans(3alleg4)

✨ extrans ✨

okay so bestie, welcome to the extrans page from the Allegro manual β€” it's a 3alleg4 situation and it's literally all about lighting and translucency effects in the Allegro game programming library. get comfy, we're doing glow-ups (fr fr, actual glow-ups) πŸ¦‹


🌸 SYNOPSIS 🌸

#include <allegro.h>

Example extrans


πŸ’… DESCRIPTION πŸ’…

This program is a whole demonstration of how to use the lighting and translucency functions, and honestly? it eats. πŸŽ€

The first part of the example shows you a dark screen that gets illuminated by a spotlight β€” and you can move that spotlight around with your mouse. main character energy, truly. then, after a key press, the example shows the full bitmap, and the spotlight switches up to be a reduced version of the background with 50% of translucency. the range, the versatility, iconic.

The translucency effect is easy to do in all color depths, no cap, no stress. πŸ’–

but bestie, listen β€” the lighting effect has to be performed in a different way depending on whether the screen is in 8bit mode or another color depth. this is because additive drawing mode uses a different set of routines for truecolor modes. so don't come for me if you assumed it was one-size-fits-all, it's giving "it depends" 😭

πŸ‘‘ SEE ALSO πŸ‘‘


and that's the whole page, bestie 🫢 Allegro version 4.4.3, extrans(3alleg4) β€” go forth and make things glow βœ¨πŸ’œ