diff --git a/include/r_local.h b/include/r_local.h index 1efaac6..9865dd2 100644 --- a/include/r_local.h +++ b/include/r_local.h @@ -85,7 +85,6 @@ extern cvar_t *r_numsurfs; extern cvar_t *r_reportedgeout; extern cvar_t *r_maxedges; extern cvar_t *r_numedges; -extern cvar_t *crosshair; #define XCENTERING (1.0 / 2.0) #define YCENTERING (1.0 / 2.0) diff --git a/source/gl_screen.c b/source/gl_screen.c index a69634d..a92e01d 100644 --- a/source/gl_screen.c +++ b/source/gl_screen.c @@ -33,6 +33,7 @@ #include #include +#include "cl_parse.h" #include "cmd.h" #include "console.h" #include "draw.h" @@ -42,9 +43,8 @@ #include "pcx.h" #include "qendian.h" #include "sbar.h" -#include "sys.h" -#include "cl_parse.h" #include "skin.h" +#include "sys.h" #include "view.h" /* @@ -115,7 +115,10 @@ cvar_t *scr_showturtle; cvar_t *scr_showpause; cvar_t *scr_printspeed; cvar_t *gl_triplebuffer; -extern cvar_t *crosshair; +cvar_t *crosshair; +cvar_t *crosshaircolor; +cvar_t *cl_crossx; +cvar_t *cl_crossy; qboolean scr_initialized; // ready to draw @@ -384,6 +387,11 @@ void SCR_Init_Cvars (void) scr_centertime = Cvar_Get("scr_centertime", "2", CVAR_NONE, "None"); scr_printspeed = Cvar_Get("scr_printspeed", "8", CVAR_NONE, "None"); gl_triplebuffer = Cvar_Get("gl_triplebuffer", "1", CVAR_ARCHIVE, "None"); + + crosshaircolor = Cvar_Get("crosshaircolor", "79", CVAR_ARCHIVE, "None"); + crosshair = Cvar_Get("crosshair", "0", CVAR_ARCHIVE, "None"); + cl_crossx = Cvar_Get("cl_crossx", "0", CVAR_ARCHIVE, "None"); + cl_crossy = Cvar_Get("cl_crossy", "0", CVAR_ARCHIVE, "None"); } void diff --git a/source/r_view.c b/source/r_view.c index 3c7def8..7c1fe93 100644 --- a/source/r_view.c +++ b/source/r_view.c @@ -71,12 +71,6 @@ cvar_t *v_ipitch_level; cvar_t *v_idlescale; -cvar_t *crosshair; -cvar_t *crosshaircolor; - -cvar_t *cl_crossx; -cvar_t *cl_crossy; - cvar_t *v_contentblend; float v_dmg_time, v_dmg_roll, v_dmg_pitch; @@ -808,11 +802,6 @@ void V_Init_Cvars (void) v_idlescale = Cvar_Get("v_idlescale", "0", CVAR_NONE, "None"); - crosshaircolor = Cvar_Get("crosshaircolor", "79", CVAR_ARCHIVE, "None"); - crosshair = Cvar_Get("crosshair", "0", CVAR_ARCHIVE, "None"); - cl_crossx = Cvar_Get("cl_crossx", "0", CVAR_ARCHIVE, "None"); - cl_crossy = Cvar_Get("cl_crossy", "0", CVAR_ARCHIVE, "None"); - cl_rollspeed = Cvar_Get("cl_rollspeed", "200", CVAR_NONE, "None"); cl_rollangle = Cvar_Get("cl_rollangle", "2.0", CVAR_NONE, "None"); diff --git a/source/screen.c b/source/screen.c index f5b99bf..858d268 100644 --- a/source/screen.c +++ b/source/screen.c @@ -33,24 +33,21 @@ #include #include -#include "client.h" +#include "cl_parse.h" #include "cmd.h" #include "console.h" -#include "cvar.h" +#include "d_iface.h" #include "draw.h" #include "keys.h" #include "menu.h" -#include "msg.h" #include "pcx.h" #include "qendian.h" #include "quakedef.h" -#include "r_local.h" #include "sbar.h" +#include "skin.h" #include "sys.h" #include "vid.h" -#include "skin.h" #include "view.h" -#include "cl_parse.h" /* @@ -117,7 +114,11 @@ cvar_t *scr_showram; cvar_t *scr_showturtle; cvar_t *scr_showpause; cvar_t *scr_printspeed; -cvar_t *scr_allowsnap; +cvar_t *crosshair; +cvar_t *crosshaircolor; +cvar_t *cl_crossx; +cvar_t *cl_crossy; + qboolean scr_initialized; // ready to draw @@ -177,8 +178,7 @@ void SCR_CenterPrint (char *str) // count the number of lines for centering scr_center_lines = 1; - while (*str) - { + while (*str) { if (*str == '\n') scr_center_lines++; str++; @@ -226,15 +226,13 @@ void SCR_DrawCenterString (void) else y = 48; - do - { + do { // scan the width of the line for (l=0 ; l<40 ; l++) if (start[l] == '\n' || !start[l]) break; x = (vid.width - l*8)/2; - for (j=0 ; jvalue < 10) + if (scr_fov->int_val < 10) Cvar_Set (scr_fov,"10"); - if (scr_fov->value > 170) + if (scr_fov->int_val > 170) Cvar_Set (scr_fov,"170"); - r_refdef.fov_x = scr_fov->value; + r_refdef.fov_x = scr_fov->int_val; r_refdef.fov_y = CalcFov (r_refdef.fov_x, r_refdef.vrect.width, r_refdef.vrect.height); // these calculations mirror those in R_Init() for r_refdef, but take no @@ -406,7 +404,11 @@ void SCR_Init_Cvars (void) scr_showpause = Cvar_Get("showpause", "1", CVAR_NONE, "None"); scr_centertime = Cvar_Get("scr_centertime", "2", CVAR_NONE, "None"); scr_printspeed = Cvar_Get("scr_printspeed", "8", CVAR_NONE, "None"); - scr_allowsnap = Cvar_Get("scr_allowsnap", "1", CVAR_NONE, "None"); + + crosshaircolor = Cvar_Get("crosshaircolor", "79", CVAR_ARCHIVE, "None"); + crosshair = Cvar_Get("crosshair", "0", CVAR_ARCHIVE, "None"); + cl_crossx = Cvar_Get("cl_crossx", "0", CVAR_ARCHIVE, "None"); + cl_crossy = Cvar_Get("cl_crossy", "0", CVAR_ARCHIVE, "None"); } void @@ -420,9 +422,9 @@ SCR_Init (void) Cmd_AddCommand ("sizeup",SCR_SizeUp_f); Cmd_AddCommand ("sizedown",SCR_SizeDown_f); - scr_ram = W_GetLumpName ("ram"); - scr_net = W_GetLumpName ("net"); - scr_turtle = W_GetLumpName ("turtle"); + scr_ram = Draw_PicFromWad ("ram"); + scr_net = Draw_PicFromWad ("net"); + scr_turtle = Draw_PicFromWad ("turtle"); scr_initialized = true; } @@ -858,13 +860,6 @@ void SCR_RSShot_f (void) if (cls.state < ca_onserver) return; // gotta be connected - if (!scr_allowsnap->int_val) { - MSG_WriteByte (&cls.netchan.message, clc_stringcmd); - SZ_Print (&cls.netchan.message, "snap\n"); - Con_Printf("Refusing remote screen shot request.\n"); - return; - } - Con_Printf("Remote screen shot requested.\n"); #if 0 @@ -1043,9 +1038,9 @@ void SCR_UpdateScreen (void) // // check for vid changes // - if (oldfov != scr_fov->value) + if (oldfov != scr_fov->int_val) { - oldfov = scr_fov->value; + oldfov = scr_fov->int_val; vid.recalc_refdef = true; }