Maps palette indexes into the current pixel format colors.


extern int palette_color[256];
Table mapping palette index colors (0-255) into whatever pixel format is being used by the current display mode. In a 256-color mode this just maps onto the array index. In truecolor modes it looks up the specified entry in the current palette, and converts that RGB value into the appropriate packed pixel format. Example:
      /* Put a pixel with the color 2 (green) of the palette */
      putpixel(screen, 100, 100, palette_color[2]);
Examples using this:

Related Discussions

The following threads each have code containing this keyword: Note: You can click on the numbers to jump directly to the posts that reference this page.

Related Projects

The following projects include source code containing this keyword: