X-Git-Url: http://git.xonotic.org/?p=xonotic%2Fdarkplaces.git;a=blobdiff_plain;f=palette.h;h=8658f128442514be1083dc22715235bfcb88c998;hp=9fd075c1b14061cd17dabe75c84fdaf5272011d8;hb=e179299248819faf4c25ac6e6360eb6d8246e3e7;hpb=e411cc7d14dad08cbbe27f5b3af86700f7eb5184 diff --git a/palette.h b/palette.h index 9fd075c1..8658f128 100644 --- a/palette.h +++ b/palette.h @@ -1,19 +1,43 @@ -extern cvar_t vid_gamma; -extern cvar_t vid_brightness; -extern cvar_t vid_contrast; +#ifndef PALLETE_H +#define PALLETE_H -extern unsigned int d_8to24table[256]; -//extern byte d_15to8table[32768]; -extern byte texgamma[256]; +#define PALETTEFEATURE_STANDARD 1 +#define PALETTEFEATURE_REVERSED 2 +#define PALETTEFEATURE_PANTS 4 +#define PALETTEFEATURE_SHIRT 8 +#define PALETTEFEATURE_GLOW 16 +#define PALETTEFEATURE_ZERO 32 +#define PALETTEFEATURE_TRANSPARENT 128 -extern qboolean hardwaregammasupported; +extern unsigned char palette_rgb[256][3]; +extern unsigned char palette_rgb_pantscolormap[16][3]; +extern unsigned char palette_rgb_shirtcolormap[16][3]; +extern unsigned char palette_rgb_pantsscoreboard[16][3]; +extern unsigned char palette_rgb_shirtscoreboard[16][3]; -void VID_UpdateGamma(qboolean force); +extern unsigned int palette_bgra_complete[256]; +extern unsigned int palette_bgra_font[256]; +extern unsigned int palette_bgra_alpha[256]; +extern unsigned int palette_bgra_nocolormap[256]; +extern unsigned int palette_bgra_nocolormapnofullbrights[256]; +extern unsigned int palette_bgra_nofullbrights[256]; +extern unsigned int palette_bgra_nofullbrights_transparent[256]; +extern unsigned int palette_bgra_onlyfullbrights[256]; +extern unsigned int palette_bgra_onlyfullbrights_transparent[256]; +extern unsigned int palette_bgra_pantsaswhite[256]; +extern unsigned int palette_bgra_shirtaswhite[256]; +extern unsigned int palette_bgra_transparent[256]; +extern unsigned int palette_bgra_embeddedpic[256]; +extern unsigned char palette_featureflags[256]; + +extern unsigned int q2palette_bgra_complete[256]; // used by hardware gamma functions in vid_* files -void BuildGammaTable8(float prescale, float gamma, float scale, float base, byte *out); -void BuildGammaTable16(float prescale, float gamma, float scale, float base, unsigned short *out); +void BuildGammaTable8(float prescale, float gamma, float scale, float base, float contrastboost, unsigned char *out, int rampsize); +void BuildGammaTable16(float prescale, float gamma, float scale, float base, float contrastboost, unsigned short *out, int rampsize); -void Gamma_Init(void); void Palette_Init(void); + +#endif +