DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
palette.c File Reference
#include "quakedef.h"
#include "image.h"
+ Include dependency graph for palette.c:

Go to the source code of this file.

Functions

void BuildGammaTable16 (float prescale, float gamma, float scale, float base, float contrastboost, unsigned short *out, int rampsize)
 
void BuildGammaTable8 (float prescale, float gamma, float scale, float base, float contrastboost, unsigned char *out, int rampsize)
 
void Palette_Init (void)
 
static void Palette_Load (void)
 
static void Palette_LoadQ2Colormap (void)
 
static void Palette_NewMap (void)
 
static void Palette_SetupSpecialPalettes (void)
 
static void Palette_Shutdown (void)
 

Variables

unsigned char host_quakepal [768]
 
unsigned int palette_bgra_alpha [256]
 
unsigned int palette_bgra_complete [256]
 
unsigned int palette_bgra_embeddedpic [256]
 
unsigned int palette_bgra_font [256]
 
unsigned int palette_bgra_nocolormap [256]
 
unsigned int palette_bgra_nocolormapnofullbrights [256]
 
unsigned int palette_bgra_nofullbrights [256]
 
unsigned int palette_bgra_nofullbrights_transparent [256]
 
unsigned int palette_bgra_onlyfullbrights [256]
 
unsigned int palette_bgra_onlyfullbrights_transparent [256]
 
unsigned int palette_bgra_pantsaswhite [256]
 
unsigned int palette_bgra_shirtaswhite [256]
 
unsigned int palette_bgra_transparent [256]
 
unsigned char palette_featureflags [256]
 
unsigned char palette_rgb [256][3]
 
unsigned char palette_rgb_pantscolormap [16][3]
 
unsigned char palette_rgb_pantsscoreboard [16][3]
 
unsigned char palette_rgb_shirtcolormap [16][3]
 
unsigned char palette_rgb_shirtscoreboard [16][3]
 
unsigned int q2palette_bgra_complete [256]
 
cvar_t r_colormap_palette = {CF_CLIENT, "r_colormap_palette", "gfx/colormap_palette.lmp", "name of a palette lmp file to override the shirt/pants colors of player models. It consists of 16 shirt colors, 16 scoreboard shirt colors, 16 pants colors and 16 scoreboard pants colors"}
 

Function Documentation

◆ BuildGammaTable16()

void BuildGammaTable16 ( float prescale,
float gamma,
float scale,
float base,
float contrastboost,
unsigned short * out,
int rampsize )

Definition at line 240 of file palette.c.

241{
242 int i, adjusted;
243 double invgamma;
244 double t;
245
246 invgamma = 1.0 / gamma;
247 prescale /= (double) (rampsize - 1);
248 for (i = 0;i < rampsize;i++)
249 {
250 t = i * prescale;
251 t = contrastboost * t / ((contrastboost - 1) * t + 1);
252 adjusted = (int) (65535.0 * (pow(t, invgamma) * scale + base) + 0.5);
253 out[i] = bound(0, adjusted, 65535);
254 }
255}
float scale
static int(ZEXPORT *qz_inflate)(z_stream *strm
#define bound(min, num, max)
Definition mathlib.h:34
float pow(float a, float b)
int i

References bound, i, int(), pow(), and scale.

Referenced by SCR_ScreenShot(), and VID_BuildGammaTables().

◆ BuildGammaTable8()

void BuildGammaTable8 ( float prescale,
float gamma,
float scale,
float base,
float contrastboost,
unsigned char * out,
int rampsize )

Definition at line 219 of file palette.c.

220{
221 int i, adjusted;
222 double invgamma;
223 double t, d;
224
225 invgamma = 1.0 / gamma;
226 prescale /= (double) (rampsize - 1);
227 for (i = 0;i < rampsize;i++)
228 {
229 t = i * prescale;
230 d = ((contrastboost - 1) * t + 1);
231 if(d == 0)
232 t = 0; // we could just as well assume 1 here, depending on which side of the division by zero we want to be
233 else
234 t = contrastboost * t / d;
235 adjusted = (int) (255.0 * (pow(t, invgamma) * scale + base) + 0.5);
236 out[i] = bound(0, adjusted, 255);
237 }
238}

References bound, i, int(), pow(), and scale.

Referenced by Palette_Load().

◆ Palette_Init()

void Palette_Init ( void )

Definition at line 366 of file palette.c.

367{
370 Palette_Load();
371}
void Cvar_RegisterVariable(cvar_t *variable)
registers a cvar that already has the name, string, and optionally the archive elements set.
Definition cvar.c:599
cvar_t r_colormap_palette
Definition palette.c:5
static void Palette_Shutdown(void)
Definition palette.c:257
static void Palette_Load(void)
Definition palette.c:265
static void Palette_NewMap(void)
Definition palette.c:261
#define NULL
Definition qtypes.h:12
void R_RegisterModule(const char *name, void(*start)(void), void(*shutdown)(void), void(*newmap)(void), void(*devicelost)(void), void(*devicerestored)(void))
Definition r_modules.c:25

References Cvar_RegisterVariable(), NULL, Palette_Load(), Palette_NewMap(), Palette_Shutdown(), r_colormap_palette, and R_RegisterModule().

Referenced by CL_Init().

◆ Palette_Load()

static void Palette_Load ( void )
static

Definition at line 265 of file palette.c.

266{
267 int i;
268 unsigned char *out;
269 float gamma, scale, base;
270 fs_offset_t filesize;
271 unsigned char *palfile;
272 unsigned char texturegammaramp[256];
273 union
274 {
275 unsigned char b[4];
276 unsigned int i;
277 }
278 bgra;
279
280 gamma = 1;
281 scale = 1;
282 base = 0;
283// COMMANDLINEOPTION: Client: -texgamma <number> sets the quake palette gamma, allowing you to make quake textures brighter/darker, not recommended
284 i = Sys_CheckParm("-texgamma");
285 if (i)
286 gamma = atof(sys.argv[i + 1]);
287// COMMANDLINEOPTION: Client: -texcontrast <number> sets the quake palette contrast, allowing you to make quake textures brighter/darker, not recommended
288 i = Sys_CheckParm("-texcontrast");
289 if (i)
290 scale = atof(sys.argv[i + 1]);
291// COMMANDLINEOPTION: Client: -texbrightness <number> sets the quake palette brightness (brightness of black), allowing you to make quake textures brighter/darker, not recommended
292 i = Sys_CheckParm("-texbrightness");
293 if (i)
294 base = atof(sys.argv[i + 1]);
295 gamma = bound(0.01, gamma, 10.0);
296 scale = bound(0.01, scale, 10.0);
297 base = bound(0, base, 0.95);
298
299 BuildGammaTable8(1.0f, gamma, scale, base, 1, texturegammaramp, 256);
300
301 palfile = (unsigned char *)FS_LoadFile ("gfx/palette.lmp", tempmempool, false, &filesize);
302 if (palfile && filesize >= 768)
303 memcpy(palette_rgb, palfile, 768);
304 else
305 {
306 Con_DPrint(CON_WARN "Couldn't load gfx/palette.lmp, falling back on internal palette\n");
307 memcpy(palette_rgb, host_quakepal, 768);
308 }
309 if (palfile)
310 Mem_Free(palfile);
311
312 out = (unsigned char *) palette_bgra_complete; // palette is accessed as 32bit for speed reasons, but is created as 8bit bytes
313 for (i = 0;i < 256;i++)
314 {
315 out[i*4+2] = texturegammaramp[palette_rgb[i][0]];
316 out[i*4+1] = texturegammaramp[palette_rgb[i][1]];
317 out[i*4+0] = texturegammaramp[palette_rgb[i][2]];
318 out[i*4+3] = 255;
319 }
320
322 palfile = (unsigned char *)FS_LoadFile (r_colormap_palette.string, tempmempool, false, &filesize);
323 else
324 palfile = NULL;
325
326 if (palfile && filesize >= 48*2)
327 {
328 memcpy(palette_rgb_shirtcolormap[0], palfile, 48);
329 memcpy(palette_rgb_shirtscoreboard[0], palfile + 48, 48);
330 }
331 else
332 {
333 for(i = 0;i < 16;i++)
334 {
335 VectorCopy(palette_rgb[(i << 4) | ((i >= 8 && i <= 13) ? 0x04 : 0x0C)], palette_rgb_shirtcolormap[i]);
337 }
338 }
339
340 if (palfile && filesize >= 48*4)
341 {
342 memcpy(palette_rgb_pantscolormap[0], palfile + 48*2, 48);
343 memcpy(palette_rgb_pantsscoreboard[0], palfile + 48*3, 48);
344 }
345 else
346 {
349 }
350
351 if(palfile)
352 Mem_Free(palfile);
353
355 for (i = '1';i <= '7';i++)
356 {
357 Vector4Set(bgra.b, 255, 255, 255, (i - '0') * 255 / 7);
358 palette_bgra_embeddedpic[i] = bgra.i;
359 }
360
362
364}
void Con_DPrint(const char *msg)
A Con_Print that only shows up if the "developer" cvar is set.
Definition console.c:1531
#define CON_WARN
Definition console.h:101
unsigned char * FS_LoadFile(const char *path, mempool_t *pool, qbool quiet, fs_offset_t *filesizepointer)
Definition fs.c:3540
int64_t fs_offset_t
Definition fs.h:37
#define Vector4Set(vec, r, g, b, a)
Definition mathlib.h:86
#define VectorCopy(in, out)
Definition mathlib.h:101
static void Palette_LoadQ2Colormap(void)
Definition palette.c:197
unsigned char palette_rgb_pantscolormap[16][3]
Definition palette.c:8
unsigned char palette_rgb_pantsscoreboard[16][3]
Definition palette.c:10
unsigned char palette_rgb[256][3]
Definition palette.c:7
static void Palette_SetupSpecialPalettes(void)
Definition palette.c:84
unsigned int palette_bgra_embeddedpic[256]
Definition palette.c:25
void BuildGammaTable8(float prescale, float gamma, float scale, float base, float contrastboost, unsigned char *out, int rampsize)
Definition palette.c:219
unsigned int palette_bgra_complete[256]
Definition palette.c:13
unsigned char palette_rgb_shirtcolormap[16][3]
Definition palette.c:9
unsigned char host_quakepal[768]
Definition palette.c:31
unsigned char palette_rgb_shirtscoreboard[16][3]
Definition palette.c:11
dp_FragColor b
const char * string
Definition cvar.h:71
const char ** argv
Definition sys.h:147
sys_t sys
Definition sys_shared.c:42
int Sys_CheckParm(const char *parm)
Definition sys_shared.c:327
mempool_t * tempmempool
Definition zone.c:794
#define Mem_Free(mem)
Definition zone.h:96

References sys_t::argv, b, bound, BuildGammaTable8(), Con_DPrint(), CON_WARN, FS_LoadFile(), host_quakepal, i, Mem_Free, NULL, palette_bgra_complete, palette_bgra_embeddedpic, Palette_LoadQ2Colormap(), palette_rgb, palette_rgb_pantscolormap, palette_rgb_pantsscoreboard, palette_rgb_shirtcolormap, palette_rgb_shirtscoreboard, Palette_SetupSpecialPalettes(), r_colormap_palette, scale, cvar_t::string, sys, Sys_CheckParm(), tempmempool, Vector4Set, and VectorCopy.

Referenced by Palette_Init().

◆ Palette_LoadQ2Colormap()

static void Palette_LoadQ2Colormap ( void )
static

Definition at line 197 of file palette.c.

198{
199 fs_offset_t filesize;
200 unsigned char * q2colormapfile = FS_LoadFile("pics/colormap.pcx", tempmempool, true, &filesize);
201 if (q2colormapfile && filesize >= 768)
202 {
203 unsigned char q2palette_rgb[256][3];
204 unsigned char *out = (unsigned char *) q2palette_bgra_complete; // palette is accessed as 32bit for speed reasons, but is created as 8bit bytes
205 int i;
206 LoadPCX_PaletteOnly(q2colormapfile, filesize, q2palette_rgb[0]);
207 // this stops at color 255 because it is a pink transparent color that we don't actually want to preserve color on.
208 for (i = 0;i < 255;i++)
209 {
210 out[i*4+2] = q2palette_rgb[i][0];
211 out[i*4+1] = q2palette_rgb[i][1];
212 out[i*4+0] = q2palette_rgb[i][2];
213 out[i*4+3] = 255;
214 }
215 Mem_Free(q2colormapfile);
216 }
217}
qbool LoadPCX_PaletteOnly(const unsigned char *f, int filesize, unsigned char *palette768b)
Definition image.c:365
unsigned int q2palette_bgra_complete[256]
Definition palette.c:28

References FS_LoadFile(), i, LoadPCX_PaletteOnly(), Mem_Free, q2palette_bgra_complete, and tempmempool.

Referenced by Palette_Load().

◆ Palette_NewMap()

static void Palette_NewMap ( void )
static

Definition at line 261 of file palette.c.

262{
263}

Referenced by Palette_Init().

◆ Palette_SetupSpecialPalettes()

static void Palette_SetupSpecialPalettes ( void )
static

Definition at line 84 of file palette.c.

85{
86 int i;
87 int fullbright_start, fullbright_end;
88 int pants_start, pants_end;
89 int shirt_start, shirt_end;
90 int reversed_start, reversed_end;
91 int transparentcolor;
92 unsigned char *colormap;
93 fs_offset_t filesize;
94 union
95 {
96 int i;
97 unsigned char b[4];
98 }
99 u;
100
101 colormap = FS_LoadFile("gfx/colormap.lmp", tempmempool, true, &filesize);
102 if (colormap && filesize >= 16385)
103 fullbright_start = 256 - colormap[16384];
104 else
105 fullbright_start = 256;
106 if (colormap)
108 fullbright_end = 256;
109 pants_start = 96;
110 pants_end = 112;
111 shirt_start = 16;
112 shirt_end = 32;
113 reversed_start = 128;
114 reversed_end = 224;
115 transparentcolor = 255;
116
117 for (i = 0;i < 256;i++)
119 for (i = reversed_start;i < reversed_end;i++)
121 for (i = pants_start;i < pants_end;i++)
123 for (i = shirt_start;i < shirt_end;i++)
125 for (i = fullbright_start;i < fullbright_end;i++)
129
130 for (i = 0;i < 256;i++)
132 palette_bgra_transparent[transparentcolor] = 0;
133
134 for (i = 0;i < fullbright_start;i++)
136 for (i = fullbright_start;i < fullbright_end;i++)
138 for (i = 0;i < 256;i++)
140 palette_bgra_nofullbrights_transparent[transparentcolor] = 0;
141
142 for (i = 0;i < 256;i++)
144 for (i = fullbright_start;i < fullbright_end;i++)
146 for (i = 0;i < 256;i++)
148 palette_bgra_onlyfullbrights_transparent[transparentcolor] = 0;
149
150 for (i = 0;i < 256;i++)
152 for (i = pants_start;i < pants_end;i++)
154 for (i = shirt_start;i < shirt_end;i++)
156 for (i = fullbright_start;i < fullbright_end;i++)
158
159 for (i = 0;i < 256;i++)
161 for (i = pants_start;i < pants_end;i++)
163 for (i = shirt_start;i < shirt_end;i++)
165
166 for (i = 0;i < 256;i++)
168 for (i = pants_start;i < pants_end;i++)
169 {
170 if (i >= reversed_start && i < reversed_end)
171 palette_bgra_pantsaswhite[i] = palette_bgra_complete[15 - (i - pants_start)];
172 else
174 }
175
176 for (i = 0;i < 256;i++)
178 for (i = shirt_start;i < shirt_end;i++)
179 {
180 if (i >= reversed_start && i < reversed_end)
181 palette_bgra_shirtaswhite[i] = palette_bgra_complete[15 - (i - shirt_start)];
182 else
184 }
185
186 for (i = 0;i < 256;i++)
187 palette_bgra_alpha[i] = 0xFFFFFFFF;
188 u.i = 0xFFFFFFFF;
189 u.b[3] = 0;
190 palette_bgra_alpha[transparentcolor] = u.i;
191
192 for (i = 0;i < 256;i++)
194 palette_bgra_font[0] = 0;
195}
float colormap
unsigned int palette_bgra_alpha[256]
Definition palette.c:15
unsigned int palette_bgra_nocolormap[256]
Definition palette.c:16
unsigned int palette_bgra_transparent[256]
Definition palette.c:24
unsigned int palette_bgra_onlyfullbrights_transparent[256]
Definition palette.c:21
unsigned int palette_bgra_font[256]
Definition palette.c:14
unsigned int palette_bgra_nocolormapnofullbrights[256]
Definition palette.c:17
unsigned int palette_bgra_shirtaswhite[256]
Definition palette.c:23
unsigned int palette_bgra_nofullbrights_transparent[256]
Definition palette.c:19
unsigned char palette_featureflags[256]
Definition palette.c:26
unsigned int palette_bgra_nofullbrights[256]
Definition palette.c:18
unsigned int palette_bgra_onlyfullbrights[256]
Definition palette.c:20
unsigned int palette_bgra_pantsaswhite[256]
Definition palette.c:22
#define PALETTEFEATURE_REVERSED
Definition palette.h:6
#define PALETTEFEATURE_ZERO
Definition palette.h:10
#define PALETTEFEATURE_SHIRT
Definition palette.h:8
#define PALETTEFEATURE_STANDARD
Definition palette.h:5
#define PALETTEFEATURE_GLOW
Definition palette.h:9
#define PALETTEFEATURE_PANTS
Definition palette.h:7
#define PALETTEFEATURE_TRANSPARENT
Definition palette.h:11

References b, colormap, FS_LoadFile(), i, Mem_Free, palette_bgra_alpha, palette_bgra_complete, palette_bgra_font, palette_bgra_nocolormap, palette_bgra_nocolormapnofullbrights, palette_bgra_nofullbrights, palette_bgra_nofullbrights_transparent, palette_bgra_onlyfullbrights, palette_bgra_onlyfullbrights_transparent, palette_bgra_pantsaswhite, palette_bgra_shirtaswhite, palette_bgra_transparent, palette_featureflags, PALETTEFEATURE_GLOW, PALETTEFEATURE_PANTS, PALETTEFEATURE_REVERSED, PALETTEFEATURE_SHIRT, PALETTEFEATURE_STANDARD, PALETTEFEATURE_TRANSPARENT, PALETTEFEATURE_ZERO, and tempmempool.

Referenced by Palette_Load().

◆ Palette_Shutdown()

static void Palette_Shutdown ( void )
static

Definition at line 257 of file palette.c.

258{
259}

Referenced by Palette_Init().

Variable Documentation

◆ host_quakepal

unsigned char host_quakepal[768]

Definition at line 31 of file palette.c.

32{
33// marked: colormap colors: cb = (colormap & 0xF0);cb += (cb >= 128 && cb < 224) ? 4 : 12;
34// 0x0*
35 0,0,0, 15,15,15, 31,31,31, 47,47,47, 63,63,63, 75,75,75, 91,91,91, 107,107,107,
36 123,123,123, 139,139,139, 155,155,155, 171,171,171, 187,187,187, 203,203,203, 219,219,219, 235,235,235,
37// 0x1* 0 ^
38 15,11,7, 23,15,11, 31,23,11, 39,27,15, 47,35,19, 55,43,23, 63,47,23, 75,55,27,
39 83,59,27, 91,67,31, 99,75,31, 107,83,31, 115,87,31, 123,95,35, 131,103,35, 143,111,35,
40// 0x2* 1 ^
41 11,11,15, 19,19,27, 27,27,39, 39,39,51, 47,47,63, 55,55,75, 63,63,87, 71,71,103,
42 79,79,115, 91,91,127, 99,99,139, 107,107,151, 115,115,163, 123,123,175, 131,131,187, 139,139,203,
43// 0x3* 2 ^
44 0,0,0, 7,7,0, 11,11,0, 19,19,0, 27,27,0, 35,35,0, 43,43,7, 47,47,7,
45 55,55,7, 63,63,7, 71,71,7, 75,75,11, 83,83,11, 91,91,11, 99,99,11, 107,107,15,
46// 0x4* 3 ^
47 7,0,0, 15,0,0, 23,0,0, 31,0,0, 39,0,0, 47,0,0, 55,0,0, 63,0,0,
48 71,0,0, 79,0,0, 87,0,0, 95,0,0, 103,0,0, 111,0,0, 119,0,0, 127,0,0,
49// 0x5* 4 ^
50 19,19,0, 27,27,0, 35,35,0, 47,43,0, 55,47,0, 67,55,0, 75,59,7, 87,67,7,
51 95,71,7, 107,75,11, 119,83,15, 131,87,19, 139,91,19, 151,95,27, 163,99,31, 175,103,35,
52// 0x6* 5 ^
53 35,19,7, 47,23,11, 59,31,15, 75,35,19, 87,43,23, 99,47,31, 115,55,35, 127,59,43,
54 143,67,51, 159,79,51, 175,99,47, 191,119,47, 207,143,43, 223,171,39, 239,203,31, 255,243,27,
55// 0x7* 6 ^
56 11,7,0, 27,19,0, 43,35,15, 55,43,19, 71,51,27, 83,55,35, 99,63,43, 111,71,51,
57 127,83,63, 139,95,71, 155,107,83, 167,123,95, 183,135,107, 195,147,123, 211,163,139, 227,179,151,
58// 0x8* 7 ^ v 8
59 171,139,163, 159,127,151, 147,115,135, 139,103,123, 127,91,111, 119,83,99, 107,75,87, 95,63,75,
60 87,55,67, 75,47,55, 67,39,47, 55,31,35, 43,23,27, 35,19,19, 23,11,11, 15,7,7,
61// 0x9* 9 v
62 187,115,159, 175,107,143, 163,95,131, 151,87,119, 139,79,107, 127,75,95, 115,67,83, 107,59,75,
63 95,51,63, 83,43,55, 71,35,43, 59,31,35, 47,23,27, 35,19,19, 23,11,11, 15,7,7,
64// 0xA* 10 v
65 219,195,187, 203,179,167, 191,163,155, 175,151,139, 163,135,123, 151,123,111, 135,111,95, 123,99,83,
66 107,87,71, 95,75,59, 83,63,51, 67,51,39, 55,43,31, 39,31,23, 27,19,15, 15,11,7,
67// 0xB* 11 v
68 111,131,123, 103,123,111, 95,115,103, 87,107,95, 79,99,87, 71,91,79, 63,83,71, 55,75,63,
69 47,67,55, 43,59,47, 35,51,39, 31,43,31, 23,35,23, 15,27,19, 11,19,11, 7,11,7,
70// 0xC* 12 v
71 255,243,27, 239,223,23, 219,203,19, 203,183,15, 187,167,15, 171,151,11, 155,131,7, 139,115,7,
72 123,99,7, 107,83,0, 91,71,0, 75,55,0, 59,43,0, 43,31,0, 27,15,0, 11,7,0,
73// 0xD* 13 v
74 0,0,255, 11,11,239, 19,19,223, 27,27,207, 35,35,191, 43,43,175, 47,47,159, 47,47,143,
75 47,47,127, 47,47,111, 47,47,95, 43,43,79, 35,35,63, 27,27,47, 19,19,31, 11,11,15,
76// 0xE*
77 43,0,0, 59,0,0, 75,7,0, 95,7,0, 111,15,0, 127,23,7, 147,31,7, 163,39,11,
78 183,51,15, 195,75,27, 207,99,43, 219,127,59, 227,151,79, 231,171,95, 239,191,119, 247,211,139,
79// 0xF* 14 ^
80 167,123,59, 183,155,55, 199,195,55, 231,227,87, 127,191,255, 171,231,255, 215,255,255, 103,0,0,
81 139,0,0, 179,0,0, 215,0,0, 255,0,0, 255,243,147, 255,247,199, 255,255,255, 159,91,83
82}; // 15 ^

Referenced by Palette_Load().

◆ palette_bgra_alpha

unsigned int palette_bgra_alpha[256]

Definition at line 15 of file palette.c.

Referenced by Palette_SetupSpecialPalettes().

◆ palette_bgra_complete

◆ palette_bgra_embeddedpic

unsigned int palette_bgra_embeddedpic[256]

Definition at line 25 of file palette.c.

Referenced by Image_GetEmbeddedPicBGRA(), Palette_Load(), and R_Shadow_MakeTextures().

◆ palette_bgra_font

unsigned int palette_bgra_font[256]

Definition at line 14 of file palette.c.

Referenced by LoadConChars_BGRA(), and Palette_SetupSpecialPalettes().

◆ palette_bgra_nocolormap

unsigned int palette_bgra_nocolormap[256]

◆ palette_bgra_nocolormapnofullbrights

unsigned int palette_bgra_nocolormapnofullbrights[256]

◆ palette_bgra_nofullbrights

unsigned int palette_bgra_nofullbrights[256]

◆ palette_bgra_nofullbrights_transparent

unsigned int palette_bgra_nofullbrights_transparent[256]

◆ palette_bgra_onlyfullbrights

unsigned int palette_bgra_onlyfullbrights[256]

◆ palette_bgra_onlyfullbrights_transparent

unsigned int palette_bgra_onlyfullbrights_transparent[256]

◆ palette_bgra_pantsaswhite

unsigned int palette_bgra_pantsaswhite[256]

◆ palette_bgra_shirtaswhite

unsigned int palette_bgra_shirtaswhite[256]

◆ palette_bgra_transparent

unsigned int palette_bgra_transparent[256]

◆ palette_featureflags

unsigned char palette_featureflags[256]

Definition at line 26 of file palette.c.

Referenced by Palette_SetupSpecialPalettes(), and R_SkinFrame_LoadInternalQuake().

◆ palette_rgb

unsigned char palette_rgb[256][3]

◆ palette_rgb_pantscolormap

unsigned char palette_rgb_pantscolormap[16][3]

Definition at line 8 of file palette.c.

Referenced by CL_SetEntityColormapColors(), CL_UpdateScreen(), and Palette_Load().

◆ palette_rgb_pantsscoreboard

unsigned char palette_rgb_pantsscoreboard[16][3]

◆ palette_rgb_shirtcolormap

unsigned char palette_rgb_shirtcolormap[16][3]

Definition at line 9 of file palette.c.

Referenced by CL_SetEntityColormapColors(), CL_UpdateScreen(), and Palette_Load().

◆ palette_rgb_shirtscoreboard

unsigned char palette_rgb_shirtscoreboard[16][3]

◆ q2palette_bgra_complete

unsigned int q2palette_bgra_complete[256]

Definition at line 28 of file palette.c.

Referenced by LoadWAL_BGRA(), and Palette_LoadQ2Colormap().

◆ r_colormap_palette

cvar_t r_colormap_palette = {CF_CLIENT, "r_colormap_palette", "gfx/colormap_palette.lmp", "name of a palette lmp file to override the shirt/pants colors of player models. It consists of 16 shirt colors, 16 scoreboard shirt colors, 16 pants colors and 16 scoreboard pants colors"}

Definition at line 5 of file palette.c.

5{CF_CLIENT, "r_colormap_palette", "gfx/colormap_palette.lmp", "name of a palette lmp file to override the shirt/pants colors of player models. It consists of 16 shirt colors, 16 scoreboard shirt colors, 16 pants colors and 16 scoreboard pants colors"};
#define CF_CLIENT
cvar/command that only the client can change/execute
Definition cmd.h:48

Referenced by Palette_Init(), and Palette_Load().