2d/palette.c File Reference

#include <stdlib.h>
#include <stdio.h>
#include "types.h"
#include "u_mem.h"
#include "gr.h"
#include "grdef.h"
#include "cfile.h"
#include "error.h"
#include "mono.h"
#include "fix.h"

Classes

struct  color_record

Defines

#define SQUARE(x)   ((x)*(x))
#define MAX_COMPUTED_COLORS   32

Functions

void gr_palette_load (ubyte *pal)
void gr_palette_set_gamma (int gamma)
int gr_palette_get_gamma ()
void gr_use_palette_table (char *filename)
void add_computed_color (int r, int g, int b, int color_num)
void init_computed_colors (void)
int gr_find_closest_color (int r, int g, int b)
int gr_find_closest_color_15bpp (int rgb)
int gr_find_closest_color_current (int r, int g, int b)
void gr_make_cthru_table (ubyte *table, ubyte r, ubyte g, ubyte b)

Variables

int gr_installed
ubyte gr_palette [256 *3]
ubyte gr_current_pal [256 *3]
ubyte gr_fade_table [256 *34]
ubyte gr_palette_gamma = 0
int gr_palette_gamma_param = 0
ubyte gr_palette_faded_out = 1
int Num_computed_colors = 0
color_record Computed_colors [MAX_COMPUTED_COLORS]

Define Documentation

#define MAX_COMPUTED_COLORS   32
 

#define SQUARE  )     ((x)*(x))
 


Function Documentation

void add_computed_color int  r,
int  g,
int  b,
int  color_num
 

int gr_find_closest_color int  r,
int  g,
int  b
 

int gr_find_closest_color_15bpp int  rgb  ) 
 

int gr_find_closest_color_current int  r,
int  g,
int  b
 

void gr_make_cthru_table ubyte table,
ubyte  r,
ubyte  g,
ubyte  b
 

int gr_palette_get_gamma  ) 
 

void gr_palette_load ubyte pal  ) 
 

void gr_palette_set_gamma int  gamma  ) 
 

void gr_use_palette_table char *  filename  ) 
 

void init_computed_colors void   ) 
 


Variable Documentation

color_record Computed_colors[MAX_COMPUTED_COLORS]
 

ubyte gr_current_pal[256 *3]
 

ubyte gr_fade_table[256 *34]
 

int gr_installed
 

ubyte gr_palette[256 *3]
 

ubyte gr_palette_faded_out = 1
 

ubyte gr_palette_gamma = 0
 

int gr_palette_gamma_param = 0
 

int Num_computed_colors = 0
 


Generated on Mon Aug 28 20:55:29 2006 for D1X-Rebirth by  doxygen 1.4.6