More cleanups.

This commit is contained in:
Ragnvald Maartmann-Moe IV 2001-05-14 01:22:58 +00:00
parent 924cdf917d
commit 56f76e8192
5 changed files with 293 additions and 343 deletions

View file

@ -42,8 +42,7 @@
#define BMODEL_FULLY_CLIPPED 0x10 // value returned by R_BmodelCheckBBox () #define BMODEL_FULLY_CLIPPED 0x10 // value returned by R_BmodelCheckBBox ()
// if bbox is trivially rejected // if bbox is trivially rejected
//=========================================================================== // dynamic lights ===========================================================
// dynamic lights
#define MAX_DLIGHTS 32 #define MAX_DLIGHTS 32
typedef struct typedef struct
@ -58,8 +57,7 @@ typedef struct
} dlight_t; } dlight_t;
//=========================================================================== // color shifts =============================================================
// color shifts
typedef struct typedef struct
{ {
@ -74,8 +72,7 @@ typedef struct
#define NUM_CSHIFTS 4 #define NUM_CSHIFTS 4
//=========================================================================== // viewmodel lighting =======================================================
// viewmodel lighting
typedef struct { typedef struct {
int ambientlight; int ambientlight;
@ -83,8 +80,7 @@ typedef struct {
float *plightvec; float *plightvec;
} alight_t; } alight_t;
//=========================================================================== // clipped bmodel edges =====================================================
// clipped bmodel edges
typedef struct bedge_s typedef struct bedge_s
{ {
@ -167,9 +163,8 @@ extern int vstartscan;
void R_ClearPolyList (void); void R_ClearPolyList (void);
void R_DrawPolyList (void); void R_DrawPolyList (void);
//
// current entity info // current entity info
//
extern qboolean insubmodel; extern qboolean insubmodel;
extern vec3_t r_worldmodelorg; extern vec3_t r_worldmodelorg;
@ -262,9 +257,7 @@ extern btofpoly_t *pbtofpolys;
void R_InitTurb (void); void R_InitTurb (void);
void R_ZDrawSubmodelPolys (model_t *clmodel); void R_ZDrawSubmodelPolys (model_t *clmodel);
//========================================================= // Alias models ===========================================
// Alias models
//=========================================================
#define MAXALIASVERTS 1024 #define MAXALIASVERTS 1024
#define ALIAS_Z_CLIP_PLANE 5 #define ALIAS_Z_CLIP_PLANE 5
@ -282,15 +275,13 @@ extern auxvert_t *pauxverts;
qboolean R_AliasCheckBBox (void); qboolean R_AliasCheckBBox (void);
//========================================================= // turbulence stuff =======================================
// turbulence stuff
#define AMP 8*0x10000 #define AMP 8*0x10000
#define AMP2 3 #define AMP2 3
#define SPEED 20 #define SPEED 20
//========================================================= // particle stuff =========================================
// particle stuff
void R_DrawParticles (void); void R_DrawParticles (void);
void R_InitParticles (void); void R_InitParticles (void);
@ -332,7 +323,6 @@ extern float se_time1, se_time2, de_time1, de_time2, dv_time1, dv_time2;
extern int r_frustum_indexes[4*6]; extern int r_frustum_indexes[4*6];
extern int r_maxsurfsseen, r_maxedgesseen, r_cnumsurfs; extern int r_maxsurfsseen, r_maxedgesseen, r_cnumsurfs;
extern qboolean r_surfsonstack; extern qboolean r_surfsonstack;
extern cshift_t cshift_water;
extern qboolean r_dowarpold, r_viewchanged; extern qboolean r_dowarpold, r_viewchanged;
extern mleaf_t *r_viewleaf, *r_oldviewleaf; extern mleaf_t *r_viewleaf, *r_oldviewleaf;

View file

@ -114,23 +114,21 @@ R_Init_Cvars (void)
"Sets the position of the crosshair on the Y-axis."); "Sets the position of the crosshair on the Y-axis.");
cl_verstring = Cvar_Get ("cl_verstring", PROGRAM " " VERSION, CVAR_NONE, cl_verstring = Cvar_Get ("cl_verstring", PROGRAM " " VERSION, CVAR_NONE,
NULL, "Client version string"); NULL, "Client version string");
crosshair = crosshair = Cvar_Get ("crosshair", "0", CVAR_ARCHIVE, NULL, "Crosshair "
Cvar_Get ("crosshair", "0", CVAR_ARCHIVE, NULL, "type. 0 off, 1 old white, 2 new with colors");
"Crosshair type. 0 off, 1 old without color, 2 new with colors");
crosshaircolor = Cvar_Get ("crosshaircolor", "79", CVAR_ARCHIVE, NULL, crosshaircolor = Cvar_Get ("crosshaircolor", "79", CVAR_ARCHIVE, NULL,
"Color of the new crosshair"); "Color of the new crosshair");
d_mipcap = Cvar_Get ("d_mipcap", "0", CVAR_NONE, NULL, d_mipcap = Cvar_Get ("d_mipcap", "0", CVAR_NONE, NULL,
"Detail level. 0 is highest, 3 is lowest."); "Detail level. 0 is highest, 3 is lowest.");
d_mipscale = d_mipscale = Cvar_Get ("d_mipscale", "1", CVAR_NONE, NULL, "Detail level "
Cvar_Get ("d_mipscale", "1", CVAR_NONE, NULL, "of objects. 0 is highest, 3 is lowest");
"Detail level of objects. 0 is highest, 3 is lowest");
d_subdiv16 = Cvar_Get ("d_subdiv16", "1", CVAR_NONE, NULL, d_subdiv16 = Cvar_Get ("d_subdiv16", "1", CVAR_NONE, NULL,
"Set to enable extreme perspective correction"); "Set to enable extreme perspective correction");
gl_affinemodels = gl_affinemodels = Cvar_Get ("gl_affinemodels", "0", CVAR_NONE, NULL,
Cvar_Get ("gl_affinemodels", "0", CVAR_NONE, NULL, "Makes texture rendering quality better if "
"Makes texture rendering quality better if set to 1"); "set to 1");
gl_clear = Cvar_Get ("gl_clear", "0", CVAR_NONE, NULL, gl_clear = Cvar_Get ("gl_clear", "0", CVAR_NONE, NULL, "Set to 1 to make "
"Set to 1 to make background black. Useful for removing HOM effect"); "background black. Useful for removing HOM effect");
gl_conalpha = Cvar_Get ("gl_conalpha", "0.6", CVAR_ARCHIVE, NULL, gl_conalpha = Cvar_Get ("gl_conalpha", "0.6", CVAR_ARCHIVE, NULL,
"alpha value for the console background"); "alpha value for the console background");
gl_conspin = Cvar_Get ("gl_conspin", "0", CVAR_ARCHIVE, NULL, gl_conspin = Cvar_Get ("gl_conspin", "0", CVAR_ARCHIVE, NULL,
@ -138,15 +136,14 @@ R_Init_Cvars (void)
gl_constretch = Cvar_Get ("gl_constretch", "0", CVAR_ARCHIVE, NULL, gl_constretch = Cvar_Get ("gl_constretch", "0", CVAR_ARCHIVE, NULL,
"whether slide the console or stretch it"); "whether slide the console or stretch it");
gl_cull = Cvar_Get ("gl_cull", "1", CVAR_NONE, NULL, "None"); gl_cull = Cvar_Get ("gl_cull", "1", CVAR_NONE, NULL, "None");
gl_dlight_lightmap = gl_dlight_lightmap = Cvar_Get ("gl_dlight_lightmap", "1", CVAR_ARCHIVE,
Cvar_Get ("gl_dlight_lightmap", "1", CVAR_ARCHIVE, NULL, NULL, "Set to 1 for high quality dynamic "
"Set to 1 for high quality dynamic lighting."); "lighting.");
gl_dlight_polyblend = gl_dlight_polyblend = Cvar_Get ("gl_dlight_polyblend", "0", CVAR_ARCHIVE,
Cvar_Get ("gl_dlight_polyblend", "0", CVAR_ARCHIVE, NULL, NULL, "Set to 1 to use a dynamic light "
"Set to 1 to use a dynamic light effect faster on GL"); "effect faster on GL");
gl_dlight_smooth = gl_dlight_smooth = Cvar_Get ("gl_dlight_smooth", "1", CVAR_ARCHIVE, NULL,
Cvar_Get ("gl_dlight_smooth", "1", CVAR_ARCHIVE, NULL, "Smooth dynamic vertex lighting");
"Smooth dynamic vertex lighting");
gl_fb_bmodels = Cvar_Get ("gl_fb_bmodels", "1", CVAR_ARCHIVE, NULL, gl_fb_bmodels = Cvar_Get ("gl_fb_bmodels", "1", CVAR_ARCHIVE, NULL,
"Toggles fullbright color support for bmodels"); "Toggles fullbright color support for bmodels");
gl_fb_models = Cvar_Get ("gl_fb_models", "1", CVAR_ARCHIVE, NULL, gl_fb_models = Cvar_Get ("gl_fb_models", "1", CVAR_ARCHIVE, NULL,
@ -154,37 +151,43 @@ R_Init_Cvars (void)
"This is very handy, but costs me 2 FPS.. (=:]"); "This is very handy, but costs me 2 FPS.. (=:]");
gl_fires = Cvar_Get ("gl_fires", "0", CVAR_ARCHIVE, NULL, gl_fires = Cvar_Get ("gl_fires", "0", CVAR_ARCHIVE, NULL,
"Toggles lavaball and rocket fireballs"); "Toggles lavaball and rocket fireballs");
gl_keeptjunctions = Cvar_Get ("gl_keeptjunctions", "1", CVAR_NONE, NULL, "None"); gl_keeptjunctions = Cvar_Get ("gl_keeptjunctions", "1", CVAR_NONE, NULL,
gl_lightmap_components = "Set to 0 to turn off colinear vertexes "
Cvar_Get ("gl_lightmap_components", "4", CVAR_ROM, NULL, "upon level load");
"Lightmap texture components. 1 is greyscale, 3 is RGB, 4 is RGBA."); gl_lightmap_components = Cvar_Get ("gl_lightmap_components", "4", CVAR_ROM,
gl_lightmode = NULL, "Lightmap texture components. 1 "
Cvar_Get ("gl_lightmode", "1", CVAR_ARCHIVE, gl_lightmode_callback, "is greyscale, 3 is RGB, 4 is RGBA.");
"Lighting mode (0 = GLQuake style, 1 = new style)"); gl_lightmode = Cvar_Get ("gl_lightmode", "0", CVAR_ARCHIVE,
gl_lightmode_callback, "Lighting mode (0 = "
"GLQuake style, 1 = new style)");
gl_max_size = Cvar_Get ("gl_max_size", "1024", CVAR_NONE, NULL, gl_max_size = Cvar_Get ("gl_max_size", "1024", CVAR_NONE, NULL,
"Texture dimension"); "Texture dimension");
gl_nocolors = Cvar_Get ("gl_nocolors", "0", CVAR_NONE, NULL, gl_nocolors = Cvar_Get ("gl_nocolors", "0", CVAR_NONE, NULL,
"Set to 1, turns off all player colors"); "Set to 1, turns off all player colors");
gl_picmip = Cvar_Get ("gl_picmip", "0", CVAR_NONE, NULL, gl_picmip = Cvar_Get ("gl_picmip", "0", CVAR_NONE, NULL, "Dimensions of "
"Dimensions of displayed textures. 0 is normal, 1 is half, 2 is 1/4"); "textures. 0 is normal, 1 is half, 2 is 1/4");
gl_playermip = Cvar_Get ("gl_playermip", "0", CVAR_NONE, NULL, gl_playermip = Cvar_Get ("gl_playermip", "0", CVAR_NONE, NULL,
"Detail of player skins. 0 best, 4 worst."); "Detail of player skins. 0 best, 4 worst.");
gl_reporttjunctions = Cvar_Get ("gl_reporttjunctions", "0", CVAR_NONE, NULL, "None"); gl_reporttjunctions = Cvar_Get ("gl_reporttjunctions", "0", CVAR_NONE,
gl_sky_clip = NULL, "None");
Cvar_Get ("gl_sky_clip", "0", CVAR_ARCHIVE, NULL, gl_sky_clip = Cvar_Get ("gl_sky_clip", "0", CVAR_ARCHIVE, NULL,
"controls whether sky is drawn first (0) or later (1)"); "controls amount of sky overdraw");
gl_sky_divide = gl_sky_divide = Cvar_Get ("gl_sky_divide", "1", CVAR_ARCHIVE, NULL,
Cvar_Get ("gl_sky_divide", "1", CVAR_ARCHIVE, NULL, "subdivide sky polys");
"subdivide sky polys");
gl_skymultipass = Cvar_Get ("gl_skymultipass", "1", CVAR_NONE, NULL, gl_skymultipass = Cvar_Get ("gl_skymultipass", "1", CVAR_NONE, NULL,
"controls wether the skydome is single or double pass"); "controls wether the skydome is single or "
gl_smoothmodels = Cvar_Get ("gl_smoothmodels", "1", CVAR_NONE, NULL, "None"); "double pass");
gl_smoothmodels = Cvar_Get ("gl_smoothmodels", "1", CVAR_NONE, NULL,
"None");
gl_texsort = Cvar_Get ("gl_texsort", "1", CVAR_NONE, NULL, "None"); gl_texsort = Cvar_Get ("gl_texsort", "1", CVAR_NONE, NULL, "None");
gl_triplebuffer = Cvar_Get ("gl_triplebuffer", "1", CVAR_ARCHIVE, NULL, "Set to 1 by default. Fixes status bar flicker on some hardware"); gl_triplebuffer = Cvar_Get ("gl_triplebuffer", "1", CVAR_ARCHIVE, NULL,
"Set to 1 by default. Fixes status bar "
"flicker on some hardware");
r_aliasstats = Cvar_Get ("r_polymodelstats", "0", CVAR_NONE, NULL, "None"); r_aliasstats = Cvar_Get ("r_polymodelstats", "0", CVAR_NONE, NULL, "None");
r_aliastransadj = Cvar_Get ("r_aliastransadj", "100", CVAR_NONE, NULL, "None"); r_aliastransadj = Cvar_Get ("r_aliastransadj", "100", CVAR_NONE, NULL,
r_aliastransbase = Cvar_Get ("r_aliastransbase", "200", CVAR_NONE, NULL, "None"); "None");
r_aliastransbase = Cvar_Get ("r_aliastransbase", "200", CVAR_NONE, NULL,
"None");
r_ambient = Cvar_Get ("r_ambient", "0", CVAR_NONE, NULL, "None"); r_ambient = Cvar_Get ("r_ambient", "0", CVAR_NONE, NULL, "None");
r_clearcolor = Cvar_Get ("r_clearcolor", "2", CVAR_NONE, NULL, "None"); r_clearcolor = Cvar_Get ("r_clearcolor", "2", CVAR_NONE, NULL, "None");
r_drawentities = Cvar_Get ("r_drawentities", "1", CVAR_NONE, NULL, "None"); r_drawentities = Cvar_Get ("r_drawentities", "1", CVAR_NONE, NULL, "None");
@ -204,24 +207,39 @@ R_Init_Cvars (void)
r_novis = Cvar_Get ("r_novis", "0", CVAR_NONE, NULL, "None"); r_novis = Cvar_Get ("r_novis", "0", CVAR_NONE, NULL, "None");
r_numedges = Cvar_Get ("r_numedges", "0", CVAR_NONE, NULL, "None"); r_numedges = Cvar_Get ("r_numedges", "0", CVAR_NONE, NULL, "None");
r_numsurfs = Cvar_Get ("r_numsurfs", "0", CVAR_NONE, NULL, "None"); r_numsurfs = Cvar_Get ("r_numsurfs", "0", CVAR_NONE, NULL, "None");
r_particles = Cvar_Get ("r_particles", "1", CVAR_ARCHIVE, NULL, "whether or not to draw particles"); r_particles = Cvar_Get ("r_particles", "1", CVAR_ARCHIVE, NULL,
r_reportedgeout = Cvar_Get ("r_reportedgeout", "0", CVAR_NONE, NULL, "None"); "whether or not to draw particles");
r_reportsurfout = Cvar_Get ("r_reportsurfout", "0", CVAR_NONE, NULL, "None"); r_reportedgeout = Cvar_Get ("r_reportedgeout", "0", CVAR_NONE, NULL,
"None");
r_reportsurfout = Cvar_Get ("r_reportsurfout", "0", CVAR_NONE, NULL,
"None");
r_shadows = Cvar_Get ("r_shadows", "0", CVAR_NONE, NULL, "None"); r_shadows = Cvar_Get ("r_shadows", "0", CVAR_NONE, NULL, "None");
r_skyname = Cvar_Get ("r_skyname", "none", CVAR_NONE, NULL, "name of the current skybox"); r_skyname = Cvar_Get ("r_skyname", "none", CVAR_NONE, NULL,
"name of the current skybox");
r_speeds = Cvar_Get ("r_speeds", "0", CVAR_NONE, NULL, "None"); r_speeds = Cvar_Get ("r_speeds", "0", CVAR_NONE, NULL, "None");
r_timegraph = Cvar_Get ("r_timegraph", "0", CVAR_NONE, NULL, "None"); r_timegraph = Cvar_Get ("r_timegraph", "0", CVAR_NONE, NULL, "None");
r_wateralpha = Cvar_Get ("r_wateralpha", "1", CVAR_NONE, NULL, "None"); r_wateralpha = Cvar_Get ("r_wateralpha", "1", CVAR_NONE, NULL, "None");
r_waterripple = Cvar_Get ("r_waterripple", "0", CVAR_NONE, NULL, "None"); r_waterripple = Cvar_Get ("r_waterripple", "0", CVAR_NONE, NULL, "None");
r_waterwarp = Cvar_Get ("r_waterwarp", "1", CVAR_NONE, NULL, "None"); r_waterwarp = Cvar_Get ("r_waterwarp", "1", CVAR_NONE, NULL, "None");
scr_centertime = Cvar_Get ("scr_centertime", "2", CVAR_NONE, NULL,
scr_centertime = Cvar_Get ("scr_centertime", "2", CVAR_NONE, NULL, "How long in seconds the screen hints are displayed on the screen"); "How long in seconds the screen hints are "
scr_consize = Cvar_Get ("scr_consize", "0.5", CVAR_ARCHIVE, NULL, "fraction of the screen the console covers when down"); "displayed on the screen");
scr_conspeed = Cvar_Get ("scr_conspeed", "300", CVAR_NONE, NULL, "How quickly in the console screen scrolls up and down"); scr_consize = Cvar_Get ("scr_consize", "0.5", CVAR_ARCHIVE, NULL,
scr_fov = Cvar_Get ("fov", "90", CVAR_NONE, NULL, "field of view. 90 is normal, smaller numbers zoom"); "fraction of the screen the console covers when "
scr_printspeed = Cvar_Get ("scr_printspeed", "8", CVAR_NONE, NULL, "How fast the text is displayed at the end of the single player episodes"); "down");
scr_showpause = Cvar_Get ("showpause", "1", CVAR_NONE, NULL, "Toggles display of pause graphic"); scr_conspeed = Cvar_Get ("scr_conspeed", "300", CVAR_NONE, NULL, "How "
scr_showram = Cvar_Get ("showram", "1", CVAR_NONE, NULL, "Show ram icon when low on ram in game"); "quickly the console screen scrolls up and down");
scr_showturtle = Cvar_Get ("showturtle", "0", CVAR_NONE, NULL, "Show turtle icon when fps is lower than 10"); scr_fov = Cvar_Get ("fov", "90", CVAR_NONE, NULL, "field of view. 90 is "
scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE, NULL, "Set the screen size 30 minimum, 120 maximum"); "normal, smaller numbers zoom");
scr_printspeed = Cvar_Get ("scr_printspeed", "8", CVAR_NONE, NULL,
"How fast the text is displayed at the end of "
"the single player episodes");
scr_showpause = Cvar_Get ("showpause", "1", CVAR_NONE, NULL,
"Toggles display of pause graphic");
scr_showram = Cvar_Get ("showram", "1", CVAR_NONE, NULL,
"Show ram icon when low on ram in game");
scr_showturtle = Cvar_Get ("showturtle", "0", CVAR_NONE, NULL,
"Show turtle icon when fps is lower than 10");
scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE, NULL,
"Set the screen size 30 minimum, 120 maximum");
} }

View file

@ -31,6 +31,7 @@
#endif #endif
#include "QF/cmd.h" #include "QF/cmd.h"
#include "QF/compat.h"
#include "QF/console.h" #include "QF/console.h"
#include "QF/draw.h" #include "QF/draw.h"
#include "QF/msg.h" #include "QF/msg.h"
@ -51,6 +52,10 @@ when crossing a water boudnary.
*/ */
extern cvar_t *cl_cshift_bonus;
extern cvar_t *cl_cshift_contents;
extern cvar_t *cl_cshift_damage;
cvar_t *scr_ofsx; cvar_t *scr_ofsx;
cvar_t *scr_ofsy; cvar_t *scr_ofsy;
cvar_t *scr_ofsz; cvar_t *scr_ofsz;
@ -65,8 +70,6 @@ cvar_t *cl_bobup;
cvar_t *v_centermove; cvar_t *v_centermove;
cvar_t *v_centerspeed; cvar_t *v_centerspeed;
cvar_t *v_gamma;
cvar_t *v_iyaw_cycle; cvar_t *v_iyaw_cycle;
cvar_t *v_iroll_cycle; cvar_t *v_iroll_cycle;
cvar_t *v_ipitch_cycle; cvar_t *v_ipitch_cycle;
@ -90,14 +93,18 @@ cvar_t *gl_cshiftpercent;
cvar_t *brightness; cvar_t *brightness;
cvar_t *contrast; cvar_t *contrast;
byte gammatable[256]; // palette is sent through this
float v_dmg_time, v_dmg_roll, v_dmg_pitch; float v_dmg_time, v_dmg_roll, v_dmg_pitch;
extern cvar_t *vid_gamma; extern cvar_t *vid_gamma;
extern int in_forward, in_forward2, in_back; extern int in_forward, in_forward2, in_back;
cshift_t cshift_empty = { {130, 80, 50}, 0};
cshift_t cshift_water = { {130, 80, 50}, 128};
cshift_t cshift_slime = { {0, 25, 5}, 150};
cshift_t cshift_lava = { {255, 80, 0}, 150};
cshift_t cshift_bonus = { {215, 186, 60}, 50};
float float
V_CalcBob (void) V_CalcBob (void)
@ -225,23 +232,6 @@ V_DriftPitch (void)
*/ */
cshift_t cshift_empty = { {130, 80, 50}
, 0
};
cshift_t cshift_water = { {130, 80, 50}
, 128
};
cshift_t cshift_slime = { {0, 25, 5}
, 150
};
cshift_t cshift_lava = { {255, 80, 0}
, 150
};
qboolean qboolean
V_CheckGamma (void) V_CheckGamma (void)
{ {
@ -283,30 +273,31 @@ V_ParseDamage (void)
cl.faceanimtime = cl.time + 0.2; // but sbar face into pain frame cl.faceanimtime = cl.time + 0.2; // but sbar face into pain frame
cl.cshifts[CSHIFT_DAMAGE].percent += 3 * count; if (cl_cshift_damage->int_val) {
if (cl.cshifts[CSHIFT_DAMAGE].percent < 0) // || (atoi (Info_ValueForKey (cl.serverinfo, "cshifts")) &
cl.cshifts[CSHIFT_DAMAGE].percent = 0; // INFO_CSHIFT_DAMAGE)) {
if (cl.cshifts[CSHIFT_DAMAGE].percent > 150) cl.cshifts[CSHIFT_DAMAGE].percent += 3 * count;
cl.cshifts[CSHIFT_DAMAGE].percent = 150; cl.cshifts[CSHIFT_DAMAGE].percent =
bound (0, cl.cshifts[CSHIFT_DAMAGE].percent, 150);
if (armor > blood) { if (armor > blood) {
cl.cshifts[CSHIFT_DAMAGE].destcolor[0] = 200; cl.cshifts[CSHIFT_DAMAGE].destcolor[0] = 200;
cl.cshifts[CSHIFT_DAMAGE].destcolor[1] = 100; cl.cshifts[CSHIFT_DAMAGE].destcolor[1] = 100;
cl.cshifts[CSHIFT_DAMAGE].destcolor[2] = 100; cl.cshifts[CSHIFT_DAMAGE].destcolor[2] = 100;
} else if (armor) { } else if (armor) {
cl.cshifts[CSHIFT_DAMAGE].destcolor[0] = 220; cl.cshifts[CSHIFT_DAMAGE].destcolor[0] = 220;
cl.cshifts[CSHIFT_DAMAGE].destcolor[1] = 50; cl.cshifts[CSHIFT_DAMAGE].destcolor[1] = 50;
cl.cshifts[CSHIFT_DAMAGE].destcolor[2] = 50; cl.cshifts[CSHIFT_DAMAGE].destcolor[2] = 50;
} else { } else {
cl.cshifts[CSHIFT_DAMAGE].destcolor[0] = 255; cl.cshifts[CSHIFT_DAMAGE].destcolor[0] = 255;
cl.cshifts[CSHIFT_DAMAGE].destcolor[1] = 0; cl.cshifts[CSHIFT_DAMAGE].destcolor[1] = 0;
cl.cshifts[CSHIFT_DAMAGE].destcolor[2] = 0; cl.cshifts[CSHIFT_DAMAGE].destcolor[2] = 0;
}
} }
// calculate view angle kicks // calculate view angle kicks
ent = &cl_entities[cl.viewentity]; ent = &cl_entities[cl.viewentity];
VectorSubtract (from, ent->origin, from); VectorSubtract (from, ent->origin, from);
VectorNormalize (from); VectorNormalize (from);
@ -340,10 +331,10 @@ V_cshift_f (void)
void void
V_BonusFlash_f (void) V_BonusFlash_f (void)
{ {
cl.cshifts[CSHIFT_BONUS].destcolor[0] = 215; if (!cl_cshift_bonus->int_val)
cl.cshifts[CSHIFT_BONUS].destcolor[1] = 186; // && !(atoi (Info_ValueForKey (cl.serverinfo, "cshifts")) & INFO_CSHIFT_BONUS))
cl.cshifts[CSHIFT_BONUS].destcolor[2] = 69; return;
cl.cshifts[CSHIFT_BONUS].percent = 50; cl.cshifts[CSHIFT_BONUS] = cshift_bonus;
} }
@ -355,18 +346,24 @@ V_BonusFlash_f (void)
void void
V_SetContentsColor (int contents) V_SetContentsColor (int contents)
{ {
if (!cl_cshift_contents->int_val) {
// && !(atoi (Info_ValueForKey (cl.serverinfo, "cshifts")) & INFO_CSHIFT_CONTENTS)) {
cl.cshifts[CSHIFT_CONTENTS] = cshift_empty;
return;
}
switch (contents) { switch (contents) {
case CONTENTS_EMPTY: case CONTENTS_EMPTY:
case CONTENTS_SOLID: case CONTENTS_SOLID:
cl.cshifts[CSHIFT_CONTENTS] = cshift_empty; cl.cshifts[CSHIFT_CONTENTS] = cshift_empty;
break; break;
case CONTENTS_LAVA: case CONTENTS_LAVA:
cl.cshifts[CSHIFT_CONTENTS] = cshift_lava; cl.cshifts[CSHIFT_CONTENTS] = cshift_lava;
break; break;
case CONTENTS_SLIME: case CONTENTS_SLIME:
cl.cshifts[CSHIFT_CONTENTS] = cshift_slime; cl.cshifts[CSHIFT_CONTENTS] = cshift_slime;
break; break;
default: default:
cl.cshifts[CSHIFT_CONTENTS] = cshift_water; cl.cshifts[CSHIFT_CONTENTS] = cshift_water;
} }
} }

View file

@ -99,224 +99,172 @@ gl_lightmode_callback (cvar_t *cvar)
void void
R_Init_Cvars (void) R_Init_Cvars (void)
{ {
cl_crossx = cl_crossx = Cvar_Get ("cl_crossx", "0", CVAR_ARCHIVE, NULL,
Cvar_Get ("cl_crossx", "0", CVAR_ARCHIVE, NULL, "Sets the position of the crosshair on the X-axis.");
"Sets the position of the crosshair on the X-axis."); cl_crossy = Cvar_Get ("cl_crossy", "0", CVAR_ARCHIVE, NULL,
cl_crossy = "Sets the position of the crosshair on the Y-axis.");
Cvar_Get ("cl_crossy", "0", CVAR_ARCHIVE, NULL, cl_verstring = Cvar_Get ("cl_verstring", PROGRAM " " VERSION, CVAR_NONE,
"Sets the position of the crosshair on the Y-axis."); NULL, "Client version string");
cl_verstring = crosshair = Cvar_Get ("crosshair", "0", CVAR_ARCHIVE, NULL, "Crosshair "
Cvar_Get ("cl_verstring", PROGRAM " " VERSION, CVAR_NONE, NULL, "type. 0 off, 1 old white, 2 new with colors");
"Client version string");
crosshair =
Cvar_Get ("crosshair", "0", CVAR_ARCHIVE, NULL,
"Crosshair type. 0 off, 1 old without color, 2 new with colors");
crosshaircolor = Cvar_Get ("crosshaircolor", "79", CVAR_ARCHIVE, NULL, crosshaircolor = Cvar_Get ("crosshaircolor", "79", CVAR_ARCHIVE, NULL,
"Color of the new crosshair"); "Color of the new crosshair");
d_mipcap = Cvar_Get ("d_mipcap", "0", CVAR_NONE, NULL, d_mipcap = Cvar_Get ("d_mipcap", "0", CVAR_NONE, NULL,
"Detail level. 0 is highest, 3 is lowest."); "Detail level. 0 is highest, 3 is lowest.");
d_mipscale = d_mipscale = Cvar_Get ("d_mipscale", "1", CVAR_NONE, NULL, "Detail level "
Cvar_Get ("d_mipscale", "1", CVAR_NONE, NULL, "of objects. 0 is highest, 3 is lowest.");
"Detail level of objects. 0 is highest, 3 is lowest."); d_subdiv16 = Cvar_Get ("d_subdiv16", "1", CVAR_NONE, NULL,
d_subdiv16 = "Set to enable extreme perspective correction");
Cvar_Get ("d_subdiv16", "1", CVAR_NONE, NULL, gl_affinemodels = Cvar_Get ("gl_affinemodels", "0", CVAR_ARCHIVE, NULL,
"Set to enable extreme perspective correction"); "Makes texture rendering quality better if "
gl_affinemodels = "set to 1");
Cvar_Get ("gl_affinemodels", "0", CVAR_ARCHIVE, NULL, gl_clear = Cvar_Get ("gl_clear", "0", CVAR_NONE, NULL, "Set to 1 to make "
"Makes texture rendering quality better if set to 1"); "background black. Useful for removing HOM effect");
gl_clear = Cvar_Get ("gl_clear", "0", CVAR_NONE, NULL,
"Set to 1 to make background black. Useful for removing HOM effect");
gl_conalpha = Cvar_Get ("gl_conalpha", "0.6", CVAR_ARCHIVE, NULL, gl_conalpha = Cvar_Get ("gl_conalpha", "0.6", CVAR_ARCHIVE, NULL,
"alpha value for the console background"); "alpha value for the console background");
gl_conspin = Cvar_Get ("gl_conspin", "0", CVAR_ARCHIVE, NULL, gl_conspin = Cvar_Get ("gl_conspin", "0", CVAR_ARCHIVE, NULL,
"speed at which the console spins"); "speed at which the console spins");
gl_constretch = Cvar_Get ("gl_constretch", "0", CVAR_ARCHIVE, NULL, gl_constretch = Cvar_Get ("gl_constretch", "0", CVAR_ARCHIVE, NULL,
"whether slide the console or stretch it"); "whether slide the console or stretch it");
gl_dlight_lightmap = gl_dlight_lightmap = Cvar_Get ("gl_dlight_lightmap", "1", CVAR_ARCHIVE,
Cvar_Get ("gl_dlight_lightmap", "1", CVAR_ARCHIVE, NULL, NULL, "Set to 1 for high quality dynamic "
"Set to 1 for high quality dynamic lighting."); "lighting.");
gl_dlight_polyblend = gl_dlight_polyblend = Cvar_Get ("gl_dlight_polyblend", "0", CVAR_ARCHIVE,
Cvar_Get ("gl_dlight_polyblend", "0", CVAR_ARCHIVE, NULL, NULL, "Set to 1 to use a dynamic light "
"Set to 1 to use a dynamic light effect faster on GL"); "effect faster on GL");
gl_dlight_smooth = gl_dlight_smooth = Cvar_Get ("gl_dlight_smooth", "1", CVAR_ARCHIVE, NULL,
Cvar_Get ("gl_dlight_smooth", "1", CVAR_ARCHIVE, NULL, "Smooth dynamic vertex lighting");
"Smooth dynamic vertex lighting"); gl_fb_bmodels = Cvar_Get ("gl_fb_bmodels", "1", CVAR_ARCHIVE, NULL,
gl_fb_bmodels = "Toggles fullbright color support for bmodels");
Cvar_Get ("gl_fb_bmodels", "1", CVAR_ARCHIVE, NULL, gl_fb_models = Cvar_Get ("gl_fb_models", "1", CVAR_ARCHIVE, NULL,
"Toggles fullbright color support for bmodels"); "Toggles fullbright color support for models");
gl_fb_models = gl_fires = Cvar_Get ("gl_fires", "0", CVAR_ARCHIVE, NULL,
Cvar_Get ("gl_fb_models", "1", CVAR_ARCHIVE, NULL, "Toggles lavaball and rocket fireballs");
"Toggles fullbright color support for models"); gl_keeptjunctions = Cvar_Get ("gl_keeptjunctions", "1", CVAR_ARCHIVE, NULL,
gl_fires = "Set to 0 to turn off colinear vertexes "
Cvar_Get ("gl_fires", "0", CVAR_ARCHIVE, NULL, "upon level load");
"Toggles lavaball and rocket fireballs"); gl_lerp_anim = Cvar_Get ("gl_lerp_anim", "1", CVAR_ARCHIVE, NULL,
gl_keeptjunctions = "Toggles model animation interpolation");
Cvar_Get ("gl_keeptjunctions", "1", CVAR_ARCHIVE, NULL, gl_lightmap_components = Cvar_Get ("gl_lightmap_components", "4", CVAR_ROM,
"Set to 0 to turn off colinear vertexes upon level load"); NULL, "Lightmap texture components. 1 "
gl_lerp_anim = "is greyscale, 3 is RGB, 4 is RGBA.");
Cvar_Get ("gl_lerp_anim", "1", CVAR_ARCHIVE, NULL, gl_lightmode = Cvar_Get ("gl_lightmode", "0", CVAR_ARCHIVE,
"Toggles model animation interpolation"); gl_lightmode_callback, "Lighting mode (0 = "
gl_lightmap_components = "GLQuake style, 1 = new style)");
Cvar_Get ("gl_lightmap_components", "4", CVAR_ROM, NULL,
"Lightmap texture components. 1 is greyscale, 3 is RGB, 4 is RGBA.");
gl_lightmode =
Cvar_Get ("gl_lightmode", "1", CVAR_ARCHIVE, gl_lightmode_callback,
"Lighting mode (0 = GLQuake style, 1 = new style)");
gl_max_size = Cvar_Get ("gl_max_size", "1024", CVAR_NONE, NULL, gl_max_size = Cvar_Get ("gl_max_size", "1024", CVAR_NONE, NULL,
"Texture dimension"); "Texture dimension");
gl_nocolors = Cvar_Get ("gl_nocolors", "0", CVAR_NONE, NULL, gl_nocolors = Cvar_Get ("gl_nocolors", "0", CVAR_NONE, NULL,
"Set to 1, turns off all player colors"); "Set to 1, turns off all player colors");
gl_picmip = gl_picmip = Cvar_Get ("gl_picmip", "0", CVAR_NONE, NULL, "Dimensions of "
Cvar_Get ("gl_picmip", "0", CVAR_NONE, NULL, "textures. 0 is normal, 1 is half, 2 is 1/4");
"Dimensions of displayed textures. 0 is normal, 1 is half, 2 is 1/4"); gl_playermip = Cvar_Get ("gl_playermip", "0", CVAR_NONE, NULL,
gl_playermip = "Detail of player skins. 0 best, 4 worst.");
Cvar_Get ("gl_playermip", "0", CVAR_NONE, NULL, gl_sky_clip = Cvar_Get ("gl_sky_clip", "0", CVAR_ARCHIVE, NULL,
"Detail of player skins. 0 best, 4 worst."); "controls amount of sky overdraw");
gl_sky_clip = gl_sky_divide = Cvar_Get ("gl_sky_divide", "1", CVAR_ARCHIVE, NULL,
Cvar_Get ("gl_sky_clip", "0", CVAR_ARCHIVE, NULL, "subdivide sky polys");
"controls whether sky is drawn first (0) or later (1)"); gl_skymultipass = Cvar_Get ("gl_skymultipass", "1", CVAR_ARCHIVE, NULL,
gl_sky_divide = "controls whether the skydome is single or "
Cvar_Get ("gl_sky_divide", "1", CVAR_ARCHIVE, NULL, "double pass");
"subdivide sky polys"); gl_triplebuffer = Cvar_Get ("gl_triplebuffer", "1", CVAR_ARCHIVE, NULL,
gl_skymultipass = "Set to 1 by default. Fixes status bar "
Cvar_Get ("gl_skymultipass", "1", CVAR_ARCHIVE, NULL, "flicker on some hardware");
"controls whether the skydome is single or double pass"); r_aliasstats = Cvar_Get ("r_polymodelstats", "0", CVAR_NONE, NULL,
gl_triplebuffer = "Toggles the displays of number of polygon "
Cvar_Get ("gl_triplebuffer", "1", CVAR_ARCHIVE, NULL, "models current being viewed");
"Set to 1 by default. Fixes status bar flicker on some hardware"); r_aliastransadj = Cvar_Get ("r_aliastransadj", "100", CVAR_NONE, NULL,
"Determines how much of an alias model is "
r_aliasstats = "clipped away and how much is viewable.");
Cvar_Get ("r_polymodelstats", "0", CVAR_NONE, NULL, r_aliastransbase = Cvar_Get ("r_aliastransbase", "200", CVAR_NONE, NULL,
"Toggles the displays of number of polygon models current being viewed"); "Determines how much of an alias model is "
r_aliastransadj = "clipped away and how much is viewable");
Cvar_Get ("r_aliastransadj", "100", CVAR_NONE, NULL, r_ambient = Cvar_Get ("r_ambient", "0", CVAR_NONE, NULL,
"Determines how much of an alias model is clipped away and how much is viewable."); "Determines the ambient lighting for a level");
r_aliastransbase = r_clearcolor = Cvar_Get ("r_clearcolor", "2", CVAR_NONE, NULL,
Cvar_Get ("r_aliastransbase", "200", CVAR_NONE, NULL, "This sets the color for areas outside of the "
"Determines how much of an alias model is clipped away and how much is viewable"); "current map");
r_ambient = r_drawentities = Cvar_Get ("r_drawentities", "1", CVAR_NONE, NULL,
Cvar_Get ("r_ambient", "0", CVAR_NONE, NULL, "Toggles drawing of entities (almost "
"Determines the ambient lighting for a level"); "everything but the world)");
r_clearcolor = r_drawflat = Cvar_Get ("r_drawflat", "0", CVAR_NONE, NULL,
Cvar_Get ("r_clearcolor", "2", CVAR_NONE, NULL, "Toggles the drawing of textures");
"This sets the color for areas outside of the current map"); r_draworder = Cvar_Get ("r_draworder", "0", CVAR_NONE, NULL,
r_drawentities = "Toggles drawing order");
Cvar_Get ("r_drawentities", "1", CVAR_NONE, NULL, r_drawviewmodel = Cvar_Get ("r_drawviewmodel", "1", CVAR_ARCHIVE, NULL,
"Toggles drawing of entities (almost everything but the world)"); "Toggles view model drawing (your weapons)");
r_drawentities = r_dspeeds = Cvar_Get ("r_dspeeds", "0", CVAR_NONE, NULL,
Cvar_Get ("r_drawentities", "1", CVAR_NONE, NULL, "Toggles the display of drawing speed information");
"Toggles the drawing of entities."); r_dynamic = Cvar_Get ("r_dynamic", "1", CVAR_NONE, NULL,
r_drawflat = "Set to 0 to disable lightmap changes");
Cvar_Get ("r_drawflat", "0", CVAR_NONE, NULL, r_graphheight = Cvar_Get ("r_graphheight", "32", CVAR_NONE, NULL,
"Toggles the drawing of textures"); "Set the number of lines displayed in the "
r_draworder = "various graphs");
Cvar_Get ("r_draworder", "0", CVAR_NONE, NULL, "Toggles drawing order"); r_maxedges = Cvar_Get ("r_maxedges", "0", CVAR_NONE, NULL,
r_drawviewmodel = "Sets the maximum number of surfaces");
Cvar_Get ("r_drawviewmodel", "1", CVAR_ARCHIVE, NULL, r_maxsurfs = Cvar_Get ("r_maxsurfs", "0", CVAR_NONE, NULL,
"Toggles drawing of view models (your weapons)"); "Sets the maximum number of surfaces");
r_drawviewmodel = r_netgraph = Cvar_Get ("r_netgraph", "0", CVAR_NONE, NULL,
Cvar_Get ("r_drawviewmodel", "1", CVAR_ARCHIVE, NULL, "Toggle the display of a graph showing network "
"Toggles the drawing of your weapon"); "performance");
r_dspeeds = r_netgraph_alpha = Cvar_Get ("r_netgraph_alpha", "0.5", CVAR_ARCHIVE, NULL,
Cvar_Get ("r_dspeeds", "0", CVAR_NONE, NULL, "Net graph translucency");
"Toggles the display of drawing speed information"); r_netgraph_box = Cvar_Get ("r_netgraph_box", "1", CVAR_ARCHIVE, NULL,
r_dynamic = "Draw box around net graph");
Cvar_Get ("r_dynamic", "1", CVAR_NONE, NULL, r_norefresh = Cvar_Get ("r_norefresh", "0", CVAR_NONE, NULL,
"Set to 0 to disable lightmap changes"); "Set to 1 to disable display refresh");
r_graphheight = r_novis = Cvar_Get ("r_novis", "0", CVAR_NONE, NULL,
Cvar_Get ("r_graphheight", "32", CVAR_NONE, NULL, "Set to 1 to enable runtime visibility checking (SLOW)");
"Set the number of lines displayed in the various graphs"); r_numedges = Cvar_Get ("r_numedges", "0", CVAR_NONE, NULL,
r_maxedges = "Toggles the displaying of number of edges "
Cvar_Get ("r_maxedges", "0", CVAR_NONE, NULL, "currently being viewed");
"Sets the maximum number of surfaces"); r_numsurfs = Cvar_Get ("r_numsurfs", "0", CVAR_NONE, NULL,
r_maxsurfs = "Toggles the displaying of number of surfaces "
Cvar_Get ("r_maxsurfs", "0", CVAR_NONE, NULL, "currently being viewed");
"Sets the maximum number of surfaces"); r_particles = Cvar_Get ("r_particles", "1", CVAR_ARCHIVE, NULL,
r_netgraph = "Toggles drawing of particles.");
Cvar_Get ("r_netgraph", "0", CVAR_ARCHIVE, NULL, "Graph network stats"); r_reportedgeout = Cvar_Get ("r_reportedgeout", "0", CVAR_NONE, NULL,
r_netgraph = "Toggle the display of how many edges where "
Cvar_Get ("r_netgraph", "0", CVAR_NONE, NULL, "not displayed");
"Toggle the display of a graph showing network performance"); r_reportsurfout = Cvar_Get ("r_reportsurfout", "0", CVAR_NONE, NULL,
r_netgraph_alpha = "Toggle the display of how many surfaces "
Cvar_Get ("r_netgraph_alpha", "0.5", CVAR_ARCHIVE, NULL, "were not displayed");
"Net graph translucency"); r_shadows = Cvar_Get ("r_shadows", "0", CVAR_ARCHIVE, NULL,
r_netgraph_box = "Set to 1 to enable shadows for entities");
Cvar_Get ("r_netgraph_box", "1", CVAR_ARCHIVE, NULL, r_skyname = Cvar_Get ("r_skyname", "none", CVAR_NONE, NULL,
"Draw box around net graph"); "name of the current skybox");
r_norefresh = r_speeds = Cvar_Get ("r_speeds", "0", CVAR_NONE, NULL,
Cvar_Get ("r_norefresh", "0", CVAR_NONE, NULL, "Display drawing time and statistics of what is "
"Set to 1 to disable display refresh"); "being viewed");
r_novis = r_timegraph = Cvar_Get ("r_timegraph", "0", CVAR_NONE, NULL,
Cvar_Get ("r_novis", "0", CVAR_NONE, NULL, "Toggle the display of a performance graph");
"Set to 1 to enable runtime visibility checking (SLOW)"); r_wateralpha = Cvar_Get ("r_wateralpha", "1", CVAR_NONE, NULL,
r_numedges = "Determine opacity of liquids. 1 = solid, "
Cvar_Get ("r_numedges", "0", CVAR_NONE, NULL, "0 = transparent, otherwise translucent.");
"Toggles the displaying of number of edges currently being viewed"); r_waterripple = Cvar_Get ("r_waterripple", "0", CVAR_NONE, NULL,
r_numsurfs = "Set to make liquids ripple, try setting to 5");
Cvar_Get ("r_numsurfs", "0", CVAR_NONE, NULL, r_waterwarp = Cvar_Get ("r_waterwarp", "1", CVAR_NONE, NULL,
"Toggles the displaying of number of surfaces currently being viewed"); "Toggles whether surfaces are warped in liquid.");
r_particles = r_zgraph = Cvar_Get ("r_zgraph", "0", CVAR_NONE, NULL,
Cvar_Get ("r_particles", "1", CVAR_ARCHIVE, NULL, "Toggle the graph that reports the changes of "
"Toggles drawing of particles."); "z-axis position");
r_particles = scr_centertime = Cvar_Get ("scr_centertime", "2", CVAR_NONE, NULL,
Cvar_Get ("r_particles", "1", CVAR_ARCHIVE, NULL, "How long in seconds screen hints are displayed");
"whether or not to draw particles"); scr_consize = Cvar_Get ("scr_consize", "0.5", CVAR_ARCHIVE, NULL,
r_reportedgeout = "Fraction of the screen the console covers when down");
Cvar_Get ("r_reportedgeout", "0", CVAR_NONE, NULL, scr_conspeed = Cvar_Get ("scr_conspeed", "300", CVAR_NONE, NULL,
"Toggle the display of how many edges where not displayed"); "How quickly console scrolls up or down");
r_reportsurfout = scr_fov = Cvar_Get ("fov", "90", CVAR_NONE, NULL,
Cvar_Get ("r_reportsurfout", "0", CVAR_NONE, NULL, "Your point of view in degrees. Smaller than 90 "
"Toggle the display of how many surfaces where not displayed"); "zooms in.");
r_shadows = scr_printspeed = Cvar_Get ("scr_printspeed", "8", CVAR_NONE, NULL,
Cvar_Get ("r_shadows", "0", CVAR_ARCHIVE, NULL, "How fast the text is displayed at the end of "
"Set to 1 to enable shadows for entities"); "the single player episodes");
r_skyname = scr_showpause = Cvar_Get ("showpause", "1", CVAR_NONE, NULL,
Cvar_Get ("r_skyname", "none", CVAR_NONE, NULL, "Toggles display of pause graphic");
"name of the current skybox"); scr_showram = Cvar_Get ("showram", "1", CVAR_NONE, NULL,
r_speeds = "Show RAM icon if game is running low on memory");
Cvar_Get ("r_speeds", "0", CVAR_NONE, NULL, scr_showturtle = Cvar_Get ("showturtle", "0", CVAR_NONE, NULL,
"Display drawing time and statistics of what is being viewed"); "Show a turtle icon if your fps is below 10");
r_timegraph = scr_viewsize = Cvar_Get ("viewsize", "100", CVAR_ARCHIVE, NULL,
Cvar_Get ("r_timegraph", "0", CVAR_NONE, NULL, "Set the screen size 30 minimum, 120 maximum");
"Toggle the display of a performance graph");
r_wateralpha =
Cvar_Get ("r_wateralpha", "1", CVAR_NONE, NULL,
"Determine opacity of liquids. 1 = solid, 0 = transparent, otherwise translucent.");
r_waterripple =
Cvar_Get ("r_waterripple", "0", CVAR_NONE, NULL,
"Set to make liquids ripple, a good setting is 5");
r_waterwarp =
Cvar_Get ("r_waterwarp", "1", CVAR_NONE, NULL,
"Toggles whether surfaces are warped in a liquid.");
r_zgraph =
Cvar_Get ("r_zgraph", "0", CVAR_NONE, NULL,
"Toggle the graph that reports the changes of z-axis position");
scr_centertime =
Cvar_Get ("scr_centertime", "2", CVAR_NONE, NULL,
"How long in seconds screen hints are displayed");
scr_consize =
Cvar_Get ("scr_consize", "0.5", CVAR_ARCHIVE, NULL,
"fraction of the screen the console covers when down");
scr_conspeed =
Cvar_Get ("scr_conspeed", "300", CVAR_NONE, NULL,
"How quickly console scrolls up or down");
scr_fov =
Cvar_Get ("fov", "90", CVAR_NONE, NULL,
"Your point of view in degrees. Smaller than 90 zooms in.");
scr_printspeed =
Cvar_Get ("scr_printspeed", "8", CVAR_NONE, NULL,
"How fast the text is displayed at the end of the single player episodes");
scr_showpause =
Cvar_Get ("showpause", "1", CVAR_NONE, NULL,
"Toggles display of pause graphic");
scr_showram =
Cvar_Get ("showram", "1", CVAR_NONE, NULL,
"Show RAM icon if game is running low on memory");
scr_showturtle =
Cvar_Get ("showturtle", "0", CVAR_NONE, NULL,
"Show a turtle icon if your fps is slower than 10");
scr_viewsize =
Cvar_Get ("viewsize", "100", CVAR_ARCHIVE, NULL,
"Set the screen size 30 minimum, 120 maximum");
} }

View file

@ -55,6 +55,11 @@ when crossing a water boudnary.
*/ */
extern cvar_t *cl_cshift_bonus;
extern cvar_t *cl_cshift_contents;
extern cvar_t *cl_cshift_damage;
extern cvar_t *vid_gamma;
cvar_t *cl_rollspeed; cvar_t *cl_rollspeed;
cvar_t *cl_rollangle; cvar_t *cl_rollangle;
@ -75,14 +80,18 @@ cvar_t *v_ipitch_level;
cvar_t *v_idlescale; cvar_t *v_idlescale;
float v_dmg_time, v_dmg_roll, v_dmg_pitch; float v_dmg_time, v_dmg_roll, v_dmg_pitch;
extern int in_forward, in_forward2, in_back; extern int in_forward, in_forward2, in_back;
frame_t *view_frame; frame_t *view_frame;
player_state_t *view_message; player_state_t *view_message;
// void BuildGammaTable (float, float); cshift_t cshift_empty = { {130, 80, 50}, 0};
cshift_t cshift_water = { {130, 80, 50}, 128};
cshift_t cshift_slime = { {0, 25, 5}, 150};
cshift_t cshift_lava = { {255, 80, 0}, 150};
cshift_t cshift_bonus = { {215, 186, 60}, 50};
float float
@ -248,18 +257,6 @@ V_DriftPitch (void)
PALETTE FLASHES PALETTE FLASHES
*/ */
extern cvar_t *cl_cshift_bonus;
extern cvar_t *cl_cshift_contents;
extern cvar_t *cl_cshift_damage;
cshift_t cshift_empty = { {130, 80, 50}, 0 };
cshift_t cshift_water = { {130, 80, 50}, 128 };
cshift_t cshift_slime = { {0, 25, 5}, 150 };
cshift_t cshift_lava = { {255, 80, 0}, 150 };
extern byte gammatable[256]; // palette is sent through this
extern cvar_t *vid_gamma;
qboolean qboolean
V_CheckGamma (void) V_CheckGamma (void)