#pragma once

#define MAX_CAUSTICS 32
#define CROSSHAIRS 20
#define BLOODSCREENS 16

extern  cvar_t	gl_screen_width;
extern  cvar_t	gl_screen_height;
extern  cvar_t	gl_screen_bpp;
extern  cvar_t	gl_ignore16bpp;
extern  cvar_t	gl_ignorelowres;

extern  cvar_t	gl_vsync;
extern  cvar_t	gl_fpslimit;
extern	cvar_t	gl_ztrick;
extern	cvar_t	gl_fbo_pbo;

extern	cvar_t	gl_bumpmap;
extern	cvar_t	gl_specular;

extern  cvar_t	m_filter;
extern  cvar_t	m_accel;
extern  cvar_t	m_accelscale;

extern cvar_t r_menusize;
extern cvar_t r_transwater;
extern cvar_t r_translava;
extern cvar_t s_samplerate;
extern cvar_t gl_aniso_level;
extern cvar_t gl_menu_linear;
extern cvar_t gl_hud_linear;
extern cvar_t gl_nonpow2textures;
extern cvar_t gl_contrast_level;
extern cvar_t gl_overbright_level;
extern cvar_t gl_fogautocolor;
extern cvar_t gl_waterfogred; 
extern cvar_t gl_waterfoggreen; 
extern cvar_t gl_waterfogblue; 
extern cvar_t gl_waterfogalpha;
extern cvar_t gl_waterfogdistance;

extern cvar_t gl_lavafogred; 
extern cvar_t gl_lavafoggreen; 
extern cvar_t gl_lavafogblue; 
extern cvar_t gl_lavafogalpha;
extern cvar_t gl_lavafogdistance;

extern cvar_t gl_slimefogred; 
extern cvar_t gl_slimefoggreen; 
extern cvar_t gl_slimefogblue; 
extern cvar_t gl_slimefogalpha;
extern cvar_t gl_slimefogdistance;

extern	cvar_t	gl_lerpimages;
extern	cvar_t	r_spritefix;
extern	cvar_t	gl_spritealpha;
extern	cvar_t	gl_hudalpha;

extern	cvar_t	m_fullangles;

extern	cvar_t	gl_max_size;
extern	cvar_t	gl_round_down;
extern	cvar_t r_texture_external;

extern	cvar_t	gl_detailtexture;
extern	cvar_t	gl_detailalpha;
extern	cvar_t	gl_detailscale;
extern	cvar_t	gl_caustictexture;
extern	cvar_t	gl_causticalpha;

//=======		shiny
extern	cvar_t	gl_shinytexture;
extern	cvar_t	gl_shinynormalize;
extern	cvar_t	gl_shinydistancefactor;
extern	cvar_t	gl_shinyalpha;
extern  cvar_t  gl_shinycrackedalpha;
extern	cvar_t	gl_shinymetalalpha;
extern  cvar_t  gl_shinymetalrustedalpha;
extern	cvar_t	gl_shinyglassalpha;
extern	cvar_t	gl_shinywateralpha;
//=======		shiny scale
extern  cvar_t  gl_shinyscale;
extern  cvar_t  gl_shinycrackedscale;
extern  cvar_t  gl_shinymetalscale;
extern  cvar_t  gl_shinymetalrustedscale;
extern  cvar_t  gl_shinyglassscale;
//=======		rysty
extern	cvar_t	gl_rustytexture;
extern	cvar_t	gl_rustyscale;
extern	cvar_t	gl_rustyglassscale;
extern	cvar_t	gl_rustymetalscale;
//=======		chrome
extern	cvar_t  gl_alias_chrome;
extern	cvar_t  gl_power_chrome;
extern	cvar_t  gl_weapon_chrome;
extern	cvar_t  gl_bonus_chrome;
extern	cvar_t  gl_monster_chrome;
extern	cvar_t  gl_player_chrome;
extern	cvar_t  gl_interior_chrome;

extern	cvar_t  gl_powerup_chromescale;
extern	cvar_t  gl_weapon_chromescale;
extern	cvar_t  gl_bonus_chromescale;
extern	cvar_t  gl_monster_chromescale;
extern	cvar_t  gl_monstertoxic_chromescale;
extern	cvar_t  gl_monstershined_chromescale;
extern	cvar_t  gl_monsterwater_chromescale;
extern	cvar_t  gl_statue_chromescale;
extern	cvar_t  gl_arcyellow_chromescale;
extern	cvar_t  gl_interior_chromescale;
extern	cvar_t  gl_playerwpn_chromescale;
extern	cvar_t  gl_pazzles_chromescale;
extern	cvar_t  gl_health_chromescale;
extern	cvar_t  gl_blumana_chromescale;
extern	cvar_t  gl_redmana_chromescale;
extern	cvar_t  gl_grnmana_chromescale;

extern	cvar_t	r_interpolate_alias;
extern	cvar_t	r_interpolate_time;

//crosshairs
extern	double	sizeX;
extern	cvar_t	crosshair;
extern	cvar_t	crosshairtype;
extern	cvar_t	crosshairsize;
extern	cvar_t	crosshairalpha;

extern	cvar_t	bloodscr;
extern	cvar_t	bloodscrtime;
extern	cvar_t	bloodscralpha;
extern double bloodtimetodie;

extern	cvar_t	waterscreendeform;
extern  cvar_t  language;
extern	cvar_t	scr_fov;

extern  int detailtexture;
extern  int chrometexture;
extern  int chrometexture2;
extern  int chrometexture3;
extern  int	rustmetaltexture;
extern  int	rustmetaltexture2;
extern  int	crackstonetexture;
extern  int	crackstonetexture2;
extern  int	crackstonetexture3;
extern  int	scratchglasstexture;
extern  int	scratchglasstexture2;
extern	int	modelchrometexture;
extern	int modelchrometexture2;

extern	int	waterreflecttexture;
extern  int glowtexture;
//arrays of textures
extern  int caustictexture[MAX_CAUSTICS];
extern  int num_caustics;
extern int crosshairtexture[CROSSHAIRS];
extern int num_crosshairs;
extern int bloodscreen[BLOODSCREENS];
extern int num_bloodscreens;

void RegisterVars(void);