crosshair 2 now works in UQ, as does crosshaircolor

This commit is contained in:
Joseph Carter 2000-01-03 00:08:03 +00:00
parent 7882224e29
commit 590b4c1c58
5 changed files with 28 additions and 21 deletions

View File

@ -268,7 +268,6 @@ void Draw_Pixel(int x, int y, byte color)
} }
} }
#ifdef QUAKEWORLD
void Draw_Crosshair(void) void Draw_Crosshair(void)
{ {
int x, y; int x, y;
@ -293,7 +292,6 @@ void Draw_Crosshair(void)
scr_vrect.y + scr_vrect.height/2-4 + cl_crossy.value, scr_vrect.y + scr_vrect.height/2-4 + cl_crossy.value,
'+'); '+');
} }
#endif
/* /*
================ ================

View File

@ -536,7 +536,6 @@ void Draw_Alt_String (int x, int y, char *str)
} }
} }
#ifdef QUAKEWORLD
void Draw_Crosshair(void) void Draw_Crosshair(void)
{ {
int x, y; int x, y;
@ -569,7 +568,6 @@ void Draw_Crosshair(void)
scr_vrect.y + scr_vrect.height/2-4 + cl_crossy.value, scr_vrect.y + scr_vrect.height/2-4 + cl_crossy.value,
'+'); '+');
} }
#endif
/* /*

View File

@ -56,8 +56,8 @@ cvar_t v_idlescale = {"v_idlescale", "0", false};
cvar_t crosshair = {"crosshair", "0", true}; cvar_t crosshair = {"crosshair", "0", true};
cvar_t crosshaircolor = {"crosshaircolor", "79", true}; cvar_t crosshaircolor = {"crosshaircolor", "79", true};
cvar_t cl_crossx = {"cl_crossx", "0", true}; cvar_t cl_crossx = {"cl_crossx", "0", true};
cvar_t cl_crossy = {"cl_crossy", "0", true}; cvar_t cl_crossy = {"cl_crossy", "0", true};
#ifdef GLQUAKE #ifdef GLQUAKE
cvar_t gl_cshiftpercent = {"gl_cshiftpercent", "100", false}; cvar_t gl_cshiftpercent = {"gl_cshiftpercent", "100", false};

View File

@ -900,7 +900,8 @@ void SCR_UpdateScreen (void)
else else
{ {
if (crosshair.value) if (crosshair.value)
Draw_Character (scr_vrect.x + scr_vrect.width/2, scr_vrect.y + scr_vrect.height/2, '+'); Draw_Crosshair();
// Draw_Character (scr_vrect.x + scr_vrect.width/2, scr_vrect.y + scr_vrect.height/2, '+');
SCR_DrawRam (); SCR_DrawRam ();
SCR_DrawNet (); SCR_DrawNet ();

View File

@ -31,12 +31,12 @@ when crossing a water boudnary.
*/ */
cvar_t lcd_x = {"lcd_x","0"}; cvar_t lcd_x = {"lcd_x", "0"}; // FIXME: make this work sometime...
cvar_t lcd_yaw = {"lcd_yaw","0"}; cvar_t lcd_yaw = {"lcd_yaw", "0"};
cvar_t scr_ofsx = {"scr_ofsx","0", false}; cvar_t scr_ofsx = {"scr_ofsx", "0", false};
cvar_t scr_ofsy = {"scr_ofsy","0", false}; cvar_t scr_ofsy = {"scr_ofsy", "0", false};
cvar_t scr_ofsz = {"scr_ofsz","0", false}; cvar_t scr_ofsz = {"scr_ofsz", "0", false};
cvar_t cl_rollspeed = {"cl_rollspeed", "200"}; cvar_t cl_rollspeed = {"cl_rollspeed", "200"};
cvar_t cl_rollangle = {"cl_rollangle", "2.0"}; cvar_t cl_rollangle = {"cl_rollangle", "2.0"};
@ -59,10 +59,14 @@ cvar_t v_ipitch_level = {"v_ipitch_level", "0.3", false};
cvar_t v_idlescale = {"v_idlescale", "0", false}; cvar_t v_idlescale = {"v_idlescale", "0", false};
cvar_t crosshair = {"crosshair", "0", true}; cvar_t crosshair = {"crosshair", "0", true};
cvar_t cl_crossx = {"cl_crossx", "0", false}; cvar_t crosshaircolor = {"crosshaircolor", "79", true};
cvar_t cl_crossy = {"cl_crossy", "0", false};
cvar_t cl_crossx = {"cl_crossx", "0", true};
cvar_t cl_crossy = {"cl_crossy", "0", true};
#ifdef GLQUAKE
cvar_t gl_cshiftpercent = {"gl_cshiftpercent", "100", false}; cvar_t gl_cshiftpercent = {"gl_cshiftpercent", "100", false};
#endif
float v_dmg_time, v_dmg_roll, v_dmg_pitch; float v_dmg_time, v_dmg_roll, v_dmg_pitch;
@ -73,13 +77,11 @@ extern int in_forward, in_forward2, in_back;
=============== ===============
V_CalcRoll V_CalcRoll
Used by view and sv_user
=============== ===============
*/ */
vec3_t forward, right, up;
float V_CalcRoll (vec3_t angles, vec3_t velocity) float V_CalcRoll (vec3_t angles, vec3_t velocity)
{ {
vec3_t forward, right, up;
float sign; float sign;
float side; float side;
float value; float value;
@ -90,8 +92,6 @@ float V_CalcRoll (vec3_t angles, vec3_t velocity)
side = fabs(side); side = fabs(side);
value = cl_rollangle.value; value = cl_rollangle.value;
// if (cl.inwater)
// value *= 6;
if (side < cl_rollspeed.value) if (side < cl_rollspeed.value)
side = side * value / cl_rollspeed.value; side = side * value / cl_rollspeed.value;
@ -125,7 +125,6 @@ float V_CalcBob (void)
// (don't count Z, or jumping messes it up) // (don't count Z, or jumping messes it up)
bob = sqrt(cl.velocity[0]*cl.velocity[0] + cl.velocity[1]*cl.velocity[1]) * cl_bob.value; bob = sqrt(cl.velocity[0]*cl.velocity[0] + cl.velocity[1]*cl.velocity[1]) * cl_bob.value;
//Con_Printf ("speed: %5.1f\n", Length(cl.velocity));
bob = bob*0.3 + bob*0.7*sin(cycle); bob = bob*0.3 + bob*0.7*sin(cycle);
if (bob > 4) if (bob > 4)
bob = 4; bob = 4;
@ -260,6 +259,7 @@ cvar_t v_gamma = {"gamma", "1", true};
byte gammatable[256]; // palette is sent through this byte gammatable[256]; // palette is sent through this
#ifdef GLQUAKE #ifdef GLQUAKE
byte ramps[3][256]; byte ramps[3][256];
float v_blend[4]; // rgba 0.0 - 1.0 float v_blend[4]; // rgba 0.0 - 1.0
@ -1017,6 +1017,7 @@ void V_RenderView (void)
R_PushDlights (); R_PushDlights ();
#if 0
if (lcd_x.value) if (lcd_x.value)
{ {
// //
@ -1052,11 +1053,17 @@ void V_RenderView (void)
{ {
R_RenderView (); R_RenderView ();
} }
#endif
R_RenderView ();
#ifndef GLQUAKE #ifndef GLQUAKE
if (crosshair.value) if (crosshair.value)
#ifdef OLD_CROSSHAIR
Draw_Character (scr_vrect.x + scr_vrect.width/2 + cl_crossx.value, Draw_Character (scr_vrect.x + scr_vrect.width/2 + cl_crossx.value,
scr_vrect.y + scr_vrect.height/2 + cl_crossy.value, '+'); scr_vrect.y + scr_vrect.height/2 + cl_crossy.value, '+');
#else
Draw_Crosshair();
#endif
#endif #endif
} }
@ -1088,10 +1095,13 @@ void V_Init (void)
Cvar_RegisterVariable (&v_ipitch_level); Cvar_RegisterVariable (&v_ipitch_level);
Cvar_RegisterVariable (&v_idlescale); Cvar_RegisterVariable (&v_idlescale);
Cvar_RegisterVariable (&crosshaircolor);
Cvar_RegisterVariable (&crosshair); Cvar_RegisterVariable (&crosshair);
Cvar_RegisterVariable (&cl_crossx); Cvar_RegisterVariable (&cl_crossx);
Cvar_RegisterVariable (&cl_crossy); Cvar_RegisterVariable (&cl_crossy);
#ifdef GLQUAKE
Cvar_RegisterVariable (&gl_cshiftpercent); Cvar_RegisterVariable (&gl_cshiftpercent);
#endif
Cvar_RegisterVariable (&scr_ofsx); Cvar_RegisterVariable (&scr_ofsx);
Cvar_RegisterVariable (&scr_ofsy); Cvar_RegisterVariable (&scr_ofsy);