1draw_trans_rle_sprite(3) Allegro manual draw_trans_rle_sprite(3)
2
3
4
6 draw_trans_rle_sprite - Draws a translucent RLE sprite. Allegro game
7 programming library.
8
10 #include <allegro.h>
11
12
13 void draw_trans_rle_sprite(BITMAP *bmp, const RLE_SPRITE *sprite, int
14 x, int y);
15
17 Translucent version of draw_rle_sprite(). See the description of
18 draw_trans_sprite(). This must only be used after you have set up the
19 color mapping table (for 256-color modes) or blender functions (for
20 truecolor modes). The bitmap and sprite must normally be in the same
21 color depth, but as a special case you can draw 32-bit RGBA format
22 sprites onto any hicolor or truecolor bitmap, as long as you call
23 set_alpha_blender() first. Example:
24
25 /* Some one time initialisation code. */
26 COLOR_MAP global_trans_table;
27 create_trans_table(&global_trans_table, my_palette,
28 128, 128, 128, NULL);
29 ...
30 if (get_color_depth() == 8)
31 color_map = &global_trans_table;
32 else
33 set_trans_blender(128, 128, 128, 128);
34
35 draw_trans_rle_sprite(buffer, rle_ghost_sprite, x, y);
36
37
39 draw_rle_sprite(3), draw_lit_rle_sprite(3), draw_trans_sprite(3),
40 color_map(3), set_trans_blender(3), set_alpha_blender(3), bit‐
41 map_mask_color(3)
42
43
44
45Allegro version 4.2.3 draw_trans_rle_sprite(3)