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

NAME

6       set_palette  - Sets the entire palette of 256 colors. Allegro game pro‐
7       gramming library.
8

SYNOPSIS

10       #include <allegro.h>
11
12
13       void set_palette(const PALETTE p);
14

DESCRIPTION

16       Sets the entire palette of 256 colors. You should provide an  array  of
17       256  RGB  structures.  Unlike  set_color(),  there  is  no need to call
18       vsync() before this function. Example:
19
20          BITMAP *bmp;
21          PALETTE palette;
22          ...
23          bmp = load_bitmap(filename, palette);
24          if (!bmp)
25             abort_on_error("Couldn't load bitmap!");
26          set_palette(palette);
27
28

SEE ALSO

30       set_gfx_mode(3),  set_palette_range(3),  set_color(3),  get_palette(3),
31       select_palette(3), palette_color(3)
32
33
34
35Allegro                          version 4.4.3                  set_palette(3)
Impressum