extrans (3) - Linux Manuals

extrans: Lighting and translucency effects. Allegro game programming library.

NAME

extrans - Lighting and translucency effects. Allegro game programming library.

SYNOPSIS

#include <allegro.h>

Example extrans

DESCRIPTION

This program demonstrates how to use the lighting and translucency functions. The first part of the example will show a dark screen illuminated by a spotlight you can move with your mouse. After a key press the example shows the full bitmap and the spotlight changes to be a reduced version of the background with 50% of translucency.

The translucency effect is easy to do in all color depths. However, 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.