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

NAME

6       draw_gouraud_sprite - Draws a sprite with gouraud shading. Allegro game
7       programming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       void draw_gouraud_sprite(BITMAP *bmp, BITMAP *sprite, int x, int y, int
14       c1, int c2, int c3, int c4);
15

DESCRIPTION

17       More  sophisticated version of draw_lit_sprite(): the 'color' parameter
18       is not constant  across  the  sprite  image  anymore  but  interpolated
19       between  the  four specified corner colors. The corner values passed to
20       this function indicate the strength of the color applied on them, rang‐
21       ing from 0 (no strength) to 255 (full strength). Example:
22
23          /* Some one time initialisation code. */
24          COLOR_MAP global_light_table;
25          create_light_table(&global_trans_table, my_palette,
26                             0, 0, 0, NULL);
27          ...
28          if (get_color_depth() == 8)
29             color_map = &global_light_table;
30          else
31             set_trans_blender(0, 0, 0, 128);
32
33          /* Enemies are in shadow unless lit by torch. */
34          draw_gouraud_sprite(buffer, menacing_spy, x, y,
35                              light_strength_on_corner_1,
36                              light_strength_on_corner_2,
37                              light_strength_on_corner_3,
38                              light_strength_on_corner_4);
39
40

SEE ALSO

42       draw_sprite(3), draw_lit_sprite(3), color_map(3), set_trans_blender(3),
43       bitmap_mask_color(3), exshade(3)
44
45
46
47Allegro                          version 4.2.2          draw_gouraud_sprite(3)
Impressum