32 static int translate_or_add_color(
const char *str)
    41     strcpy(lowerstr, str);
    45     for (i = 0; i < num_names; i++) {
    56         for (i = 0; i < ncolors; i++)
    69     for (i = 1; i < ncolors; i++)
    70         if (colors[i].
r == red && colors[i].
g == grn && colors[i].
b == blu)
    73     if (ncolors >= nalloc) {
    80     colors[index].
r = red;
    81     colors[index].
g = grn;
    82     colors[index].
b = blu;
   105     color = translate_or_add_color(str);
   108     if (color == 0 && !none_acceptable)
   153     if (color < ncolors) {
   154         const struct color_rgb *c = &colors[color];
   200     if (color >= ncolors)
 
void D_RGB_color(int red, int grn, int blu)
 
void void void void G_fatal_error(const char *,...) __attribute__((format(printf
 
int D_use_color(int color)
draw with a color from D_parse_color 
 
int G_str_to_color(const char *, int *, int *, int *)
Parse color string and set red,green,blue. 
 
int int G_strcasecmp(const char *, const char *)
String compare ignoring case (upper or lower) 
 
const struct color_name * G_standard_color_name(int)
Get color name. 
 
int D_color_number_to_RGB(int color, int *r, int *g, int *b)
get RGB values from color number 
 
struct color_rgb G_standard_color_rgb(int)
Get RGB triplet of given color. 
 
int G_num_standard_color_names(void)
Get number of named colors (color names) 
 
char * G_chop(char *)
Chop leading and trailing white spaces. 
 
int D_translate_color(const char *str)
color name to number 
 
void COM_Color_RGB(unsigned char r, unsigned char g, unsigned char b)
 
char * G_tolcase(char *)
convert string to lower case 
 
int G_num_standard_colors(void)
Get number of named colors (RGB triplets) 
 
void COM_Standard_color(int number)
 
int D_parse_color(const char *str, int none_acceptable)
color option text to usable color number