1extrans(3)                      Allegro manual                      extrans(3)
2
3
4

NAME

6       extrans  -  Lighting and translucency effects. Allegro game programming
7       library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       Example extrans
14

DESCRIPTION

16       This program demonstrates how to  use  the  lighting  and  translucency
17       functions.  The first part of the example will show a dark screen illu‐
18       minated by a spotlight you can move with your mouse. After a key  press
19       the  example  shows  the  full bitmap and the spotlight changes to be a
20       reduced version of the background with 50% of translucency.
21
22       The translucency effect is easy to do in all  color  depths.   However,
23       the lighting effect has to be performed in a different way depending on
24       whether the screen is in 8bit mode or  another  color  depth.  This  is
25       because  additive  drawing  mode  uses  a different set of routines for
26       truecolor modes.
27
28

SEE ALSO

30       BITMAP(3),   COLOR_MAP(3),    END_OF_MAIN(3),    PALETTE(3),    RGB(3),
31       RGB_MAP(3),    SCREEN_H(3),    SCREEN_W(3),   allegro_error(3),   alle‐
32       gro_init(3), allegro_message(3), bitmap_color_depth(3),  blit(3),  cir‐
33       clefill(3), clear_bitmap(3), clear_keybuf(3), color_map(3), create_bit‐
34       map(3),  create_bitmap_ex(3),   create_light_table(3),   create_rgb_ta‐
35       ble(3), create_trans_table(3), destroy_bitmap(3), draw_trans_sprite(3),
36       drawing_mode(3),         install_keyboard(3),         install_mouse(3),
37       install_timer(3),     keypressed(3),     load_bitmap(3),    mouse_x(3),
38       mouse_y(3), poll_mouse(3), rectfill(3),  replace_filename(3),  rest(3),
39       rgb_map(3),  screen(3), set_alpha_blender(3), set_gfx_mode(3), set_pal‐
40       ette(3),       set_trans_blender(3),        set_write_alpha_blender(3),
41       stretch_blit(3)
42
43
44
45Allegro                          version 4.2.3                      extrans(3)
Impressum