diff --git a/common/draw.c b/common/draw.c index dfa6e9c..f81b556 100644 --- a/common/draw.c +++ b/common/draw.c @@ -268,7 +268,6 @@ void Draw_Pixel(int x, int y, byte color) } } -#ifdef QUAKEWORLD void Draw_Crosshair(void) { int x, y; @@ -293,7 +292,6 @@ void Draw_Crosshair(void) scr_vrect.y + scr_vrect.height/2-4 + cl_crossy.value, '+'); } -#endif /* ================ diff --git a/common/gl_draw.c b/common/gl_draw.c index 05e6a99..48f70ce 100644 --- a/common/gl_draw.c +++ b/common/gl_draw.c @@ -536,7 +536,6 @@ void Draw_Alt_String (int x, int y, char *str) } } -#ifdef QUAKEWORLD void Draw_Crosshair(void) { int x, y; @@ -569,7 +568,6 @@ void Draw_Crosshair(void) scr_vrect.y + scr_vrect.height/2-4 + cl_crossy.value, '+'); } -#endif /* diff --git a/qw_client/view.c b/qw_client/view.c index f34d665..9ec7b92 100644 --- a/qw_client/view.c +++ b/qw_client/view.c @@ -56,8 +56,8 @@ cvar_t v_idlescale = {"v_idlescale", "0", false}; cvar_t crosshair = {"crosshair", "0", true}; cvar_t crosshaircolor = {"crosshaircolor", "79", true}; -cvar_t cl_crossx = {"cl_crossx", "0", true}; -cvar_t cl_crossy = {"cl_crossy", "0", true}; +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}; diff --git a/uquake/gl_screen.c b/uquake/gl_screen.c index 382cac2..aa47873 100644 --- a/uquake/gl_screen.c +++ b/uquake/gl_screen.c @@ -900,7 +900,8 @@ void SCR_UpdateScreen (void) else { 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_DrawNet (); diff --git a/uquake/view.c b/uquake/view.c index 38b42e9..0bcde46 100644 --- a/uquake/view.c +++ b/uquake/view.c @@ -31,12 +31,12 @@ when crossing a water boudnary. */ -cvar_t lcd_x = {"lcd_x","0"}; -cvar_t lcd_yaw = {"lcd_yaw","0"}; +cvar_t lcd_x = {"lcd_x", "0"}; // FIXME: make this work sometime... +cvar_t lcd_yaw = {"lcd_yaw", "0"}; -cvar_t scr_ofsx = {"scr_ofsx","0", false}; -cvar_t scr_ofsy = {"scr_ofsy","0", false}; -cvar_t scr_ofsz = {"scr_ofsz","0", false}; +cvar_t scr_ofsx = {"scr_ofsx", "0", false}; +cvar_t scr_ofsy = {"scr_ofsy", "0", false}; +cvar_t scr_ofsz = {"scr_ofsz", "0", false}; cvar_t cl_rollspeed = {"cl_rollspeed", "200"}; 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 crosshair = {"crosshair", "0", true}; -cvar_t cl_crossx = {"cl_crossx", "0", false}; -cvar_t cl_crossy = {"cl_crossy", "0", false}; +cvar_t crosshaircolor = {"crosshaircolor", "79", true}; +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}; +#endif float v_dmg_time, v_dmg_roll, v_dmg_pitch; @@ -73,13 +77,11 @@ extern int in_forward, in_forward2, in_back; =============== V_CalcRoll -Used by view and sv_user =============== */ -vec3_t forward, right, up; - float V_CalcRoll (vec3_t angles, vec3_t velocity) { + vec3_t forward, right, up; float sign; float side; float value; @@ -90,8 +92,6 @@ float V_CalcRoll (vec3_t angles, vec3_t velocity) side = fabs(side); value = cl_rollangle.value; -// if (cl.inwater) -// value *= 6; if (side < 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) 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); if (bob > 4) bob = 4; @@ -260,6 +259,7 @@ cvar_t v_gamma = {"gamma", "1", true}; byte gammatable[256]; // palette is sent through this + #ifdef GLQUAKE byte ramps[3][256]; float v_blend[4]; // rgba 0.0 - 1.0 @@ -1017,6 +1017,7 @@ void V_RenderView (void) R_PushDlights (); +#if 0 if (lcd_x.value) { // @@ -1052,11 +1053,17 @@ void V_RenderView (void) { R_RenderView (); } +#endif + R_RenderView (); #ifndef GLQUAKE if (crosshair.value) +#ifdef OLD_CROSSHAIR Draw_Character (scr_vrect.x + scr_vrect.width/2 + cl_crossx.value, scr_vrect.y + scr_vrect.height/2 + cl_crossy.value, '+'); +#else + Draw_Crosshair(); +#endif #endif } @@ -1088,10 +1095,13 @@ void V_Init (void) Cvar_RegisterVariable (&v_ipitch_level); Cvar_RegisterVariable (&v_idlescale); + Cvar_RegisterVariable (&crosshaircolor); Cvar_RegisterVariable (&crosshair); Cvar_RegisterVariable (&cl_crossx); Cvar_RegisterVariable (&cl_crossy); +#ifdef GLQUAKE Cvar_RegisterVariable (&gl_cshiftpercent); +#endif Cvar_RegisterVariable (&scr_ofsx); Cvar_RegisterVariable (&scr_ofsy); @@ -1105,7 +1115,7 @@ void V_Init (void) Cvar_RegisterVariable (&v_kicktime); Cvar_RegisterVariable (&v_kickroll); Cvar_RegisterVariable (&v_kickpitch); - + BuildGammaTable (1.0); // no gamma yet Cvar_RegisterVariable (&v_gamma); }