VgaGames 3 - Miscellaneous man-pages

[.. upper level ..]

VG3_colordef_colorize_from()

[added in version 1.2]

Return colorname, colordepth and brightness-overdriving from a window-attributes setting value for colorizing the window.
SYNTAX
const char * VG3_colordef_colorize_from(int colordef, int *depth, int *overbright)

FUNCTION PARAMETERS
colordef A colorizing value from VGAG3_COLORDEFS
depth For returning the colordepth
overbright For returning the brightness-overdriving value

RETURN VALUE
Returns the colorname, a selection of RED, GREEN, BLUE, YELLOW, VIOLET, TURQUOISE, WHITE

DESCRIPTION
Opposite of VG3_colordef_colorize_to(): Return from a colorizing value from VGAG3_COLORDEFS the colorname, colordepth and brightness-overdriving value. E.g.
  const char *colorname = "RED";
  int depth = 10;
  int overbright = 0;
  int colordef;

  // get colorizing value for colorname, depth and brightness-overdriving
  colordef = VG3_colordef_colorize_to(colorname, depth, overbright);

  // set color definition for window
  VG3_window_attributes(wstruct, NULL, NULL, colordef, NULL);

  // get colorname, depth and brightness-overdriving from colorizing value
  colorname = VG3_colordef_colorize_from(colordef, &depth, &overbright);

SEE ALSO
VG3_colordef_colorize_to() VG3_window_attributes() VG3_draw_colorize()