Some fixes for Cvars. Windows, GGI, and Sun should now all compile.

This commit is contained in:
Dan Olson 2000-02-28 01:52:08 +00:00
parent c687c6917a
commit 6305810ddb
25 changed files with 134 additions and 465 deletions

View file

@ -532,12 +532,12 @@ void CDAudio_Play(byte track, qboolean looping)
volume = (int)(bgmvolume->value * 255.0);
if (volume < 0)
{
Cvar_SetValue ("bgmvolume", 0.0);
bgmvolume->value = 0.0;
volume = 0;
}
else if (volume > 255)
{
Cvar_SetValue ("bgmvolume", 1.0);
bgmvolume->value = 1.0;
volume = 255;
}
CDAudio_SetVolume (volume);
@ -777,12 +777,12 @@ void CDAudio_Update(void)
{
if (newVolume < 0)
{
Cvar_SetValue ("bgmvolume", 0.0);
bgmvolume->value = 0.0;
newVolume = 0;
}
else if (newVolume > 255)
{
Cvar_SetValue ("bgmvolume", 1.0);
bgmvolume->value = 1.0;
newVolume = 255;
}
CDAudio_SetVolume (newVolume);

View file

@ -434,13 +434,13 @@ void CDAudio_Update(void)
{
if (cdvolume)
{
Cvar_SetValue ("bgmvolume", 0.0);
bgmvolume->value = 0.0;
cdvolume = bgmvolume->value;
CDAudio_Pause ();
}
else
{
Cvar_SetValue ("bgmvolume", 1.0);
bgmvolume->value = 1.0;
cdvolume = bgmvolume->value;
CDAudio_Resume ();
}

View file

@ -47,12 +47,8 @@ static qboolean locked = false;
static int oldbuttons;
// track high fragger
//cvar_t cl_hightrack = {"cl_hightrack", "0" };
cvar_t *cl_hightrack;
//cvar_t cl_camera_maxpitch = {"cl_camera_maxpitch", "10" };
//cvar_t cl_camera_maxyaw = {"cl_camera_maxyaw", "30" };
qboolean cam_forceview;
vec3_t cam_viewangles;
double cam_lastviewtime;
@ -86,12 +82,6 @@ void Chase_Init (void) {
"None");
cl_chasecam_right = Cvar_Get ("cl_chasecam_right","0", CVAR_ARCHIVE,
"None");
/*
Cvar_RegisterVariable (&cl_chasecam);
Cvar_RegisterVariable (&cl_chasecam_up);
Cvar_RegisterVariable (&cl_chasecam_back);
Cvar_RegisterVariable (&cl_chasecam_right);
*/
}
void Chase_Reset (void) {
@ -652,12 +642,8 @@ void Cam_Reset(void)
void CL_InitCam(void)
{
cl_hightrack = Cvar_Get ("cl_hightrack","0",0,"None");
/*
Cvar_RegisterVariable (&cl_hightrack);
Cvar_RegisterVariable (&cl_chasecam);
// Cvar_RegisterVariable (&cl_camera_maxpitch);
// Cvar_RegisterVariable (&cl_camera_maxyaw);
*/
}

View file

@ -35,7 +35,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <protocol.h>
#include <input.h>
// cvar_t cl_nodelta = {"cl_nodelta","0"};
cvar_t *cl_nodelta;
/*
@ -230,19 +229,6 @@ float CL_KeyState (kbutton_t *key)
//==========================================================================
/*
cvar_t cl_upspeed = {"cl_upspeed","200"};
cvar_t cl_forwardspeed = {"cl_forwardspeed","200", CVAR_ARCHIVE};
cvar_t cl_backspeed = {"cl_backspeed","200", CVAR_ARCHIVE};
cvar_t cl_sidespeed = {"cl_sidespeed","350"};
cvar_t cl_movespeedkey = {"cl_movespeedkey","2.0"};
cvar_t cl_yawspeed = {"cl_yawspeed","140"};
cvar_t cl_pitchspeed = {"cl_pitchspeed","150"};
cvar_t cl_anglespeedkey = {"cl_anglespeedkey","1.5"};
*/
cvar_t *cl_upspeed;
cvar_t *cl_forwardspeed;
cvar_t *cl_backspeed;
@ -638,7 +624,6 @@ void CL_InitInput (void)
Cmd_AddCommand ("-mlook", IN_MLookUp);
cl_nodelta = Cvar_Get ("cl_nodelta","0",0,"None");
// Cvar_RegisterVariable (&cl_nodelta);
}
/*

View file

@ -91,53 +91,30 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
qboolean noclip_anglehack; // remnant from old quake
//cvar_t rcon_password = {"rcon_password", "", CVAR_NONE};
cvar_t *rcon_password;
//cvar_t rcon_address = {"rcon_address", ""};
cvar_t *rcon_address;
//cvar_t cl_timeout = {"cl_timeout", "60"};
cvar_t *cl_timeout;
// these two are not intended to be set directly
//cvar_t cl_name = {"_cl_name", "player", CVAR_ARCHIVE};
//cvar_t cl_color = {"_cl_color", "0", CVAR_ARCHIVE};
cvar_t *cl_name;
cvar_t *cl_color;
//cvar_t cl_shownet = {"cl_shownet","0"}; // can be 0, 1, or 2
//cvar_t cl_nolerp = {"cl_nolerp","0"};
cvar_t *cl_shownet;
cvar_t *cl_nolerp;
//cvar_t cl_sbar = {"cl_sbar", "1", CVAR_ARCHIVE};
//cvar_t cl_hudswap = {"cl_hudswap", "1", CVAR_ARCHIVE};
//cvar_t cl_maxfps = {"cl_maxfps", "0", CVAR_ARCHIVE};
cvar_t *cl_sbar;
cvar_t *cl_hudswap;
cvar_t *cl_maxfps;
//cvar_t lookspring = {"lookspring","0", CVAR_ARCHIVE};
//cvar_t lookstrafe = {"lookstrafe","0", CVAR_ARCHIVE};
//cvar_t sensitivity = {"sensitivity","3", CVAR_ARCHIVE};
cvar_t *lookspring;
cvar_t *lookstrafe;
cvar_t *sensitivity;
//cvar_t m_pitch = {"m_pitch","0.022", CVAR_ARCHIVE};
//cvar_t m_yaw = {"m_yaw","0.022", CVAR_ARCHIVE};
//cvar_t m_forward = {"m_forward","1", CVAR_ARCHIVE};
//cvar_t m_side = {"m_side","0.8", CVAR_ARCHIVE};
cvar_t *m_pitch;
cvar_t *m_yaw;
cvar_t *m_forward;
cvar_t *m_side;
//cvar_t entlatency = {"entlatency", "20"};
//cvar_t cl_predict_players = {"cl_predict_players", "1"};
//cvar_t cl_predict_players2 = {"cl_predict_players2", "1"};
//cvar_t cl_solid_players = {"cl_solid_players", "1"};
cvar_t *entlatency;
cvar_t *cl_predict_players;
cvar_t *cl_predict_players2;
@ -145,7 +122,6 @@ cvar_t *cl_solid_players;
extern cvar_t *sys_nostdout;
//cvar_t localid = {"localid", ""};
cvar_t *localid;
#ifdef QUAKEWORLD
@ -155,28 +131,17 @@ static qboolean allowremotecmd = true;
//
// info mirrors
//
//cvar_t password = {"password", "", CVAR_USERINFO|CVAR_SERVERINFO };
cvar_t *password;
//cvar_t spectator = {"spectator", "",CVAR_USERINFO|CVAR_SERVERINFO};
cvar_t *spectator;
//cvar_t name = {"name","unnamed", CVAR_ARCHIVE|CVAR_USERINFO|CVAR_SERVERINFO};
cvar_t *name;
//cvar_t team = {"team","", CVAR_ARCHIVE|CVAR_USERINFO|CVAR_SERVERINFO};
cvar_t *team;
//cvar_t skin = {"skin","", CVAR_ARCHIVE|CVAR_USERINFO|CVAR_SERVERINFO};
cvar_t *skin;
//cvar_t topcolor = {"topcolor","0", CVAR_ARCHIVE|CVAR_USERINFO|CVAR_SERVERINFO};
cvar_t *topcolor;
//cvar_t bottomcolor = {"bottomcolor","0", CVAR_ARCHIVE|CVAR_USERINFO|CVAR_SERVERINFO};
cvar_t *bottomcolor;
//cvar_t rate = {"rate","2500", CVAR_ARCHIVE|CVAR_USERINFO|CVAR_SERVERINFO};
cvar_t *rate;
//cvar_t noaim = {"noaim","0", CVAR_ARCHIVE|CVAR_USERINFO|CVAR_SERVERINFO};
cvar_t *noaim;
//cvar_t msg = {"msg","1", CVAR_ARCHIVE|CVAR_USERINFO|CVAR_SERVERINFO};
cvar_t *msg;
//extern cvar_t cl_hightrack;
extern cvar_t *cl_hightrack;
client_static_t cls;
@ -212,11 +177,8 @@ byte *host_colormap;
netadr_t master_adr; // address of the master server
//cvar_t host_speeds = {"host_speeds","0"}; // set for running times
cvar_t *host_speeds;
//cvar_t show_fps = {"show_fps","0"}; // set for running times
cvar_t *show_fps;
//cvar_t developer = {"developer","0"};
cvar_t *developer;
void Master_Connect_f (void);

View file

@ -48,7 +48,6 @@ cmdalias_t *cmd_alias;
qboolean cmd_wait;
//cvar_t cl_warncmd = {"cl_warncmd", "0"};
cvar_t *cl_warncmd;
//=============================================================================

View file

@ -46,7 +46,6 @@ int con_totallines; // total lines in console scrollback
float con_cursorspeed = 4;
//cvar_t con_notifytime = {"con_notifytime","3"}; //seconds
cvar_t *con_notifytime;
#define NUM_CON_TIMES 4

View file

@ -26,38 +26,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <qtypes.h>
#include <quakeio.h>
/*
cvar_t variables are used to hold scalar or string variables that can be changed or displayed at the console or prog code as well as accessed directly
in C code.
it is sufficient to initialize a cvar_t with just the first two fields, or
you can add a ,true flag for variables that you want saved to the configuration
file when the game is quit:
cvar_t r_draworder = {"r_draworder","1"};
cvar_t scr_screensize = {"screensize","1",true};
Cvars must be registered before use, or they will have a 0 value instead of the float interpretation of the string. Generally, all cvar_t declarations should be registered in the apropriate init function before any console commands are executed:
Cvar_RegisterVariable (&host_framerate);
C code usually just references a cvar in place:
if ( r_draworder.value )
It could optionally ask for the value to be looked up for a string name:
if (Cvar_VariableValue ("r_draworder"))
Interpreted prog code can access cvars with the cvar(name) or
cvar_set (name, value) internal functions:
teamplay = cvar("teamplay");
The user can access cvars from the console in two ways:
r_draworder prints the current value
r_draworder 0 sets the current value to 0
Cvars are restricted from having the same names as commands to keep this
interface from being ambiguous.
*/
typedef struct cvar_s
{

View file

@ -27,11 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define NUM_MIPS 4
//cvar_t d_subdiv16 = {"d_subdiv16", "1"};
cvar_t *d_subdiv16;
//cvar_t d_mipcap = {"d_mipcap", "0"};
cvar_t *d_mipcap;
//cvar_t d_mipscale = {"d_mipscale", "1"};
cvar_t *d_mipscale;
surfcache_t *d_initial_rover;

View file

@ -35,11 +35,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
extern unsigned char d_15to8table[65536];
extern cvar_t *crosshair, *cl_crossx, *cl_crossy, *crosshaircolor;
//cvar_t gl_nobind = {"gl_nobind", "0"};
cvar_t *gl_nobind;
//cvar_t gl_max_size = {"gl_max_size", "1024"};
cvar_t *gl_max_size;
//cvar_t gl_picmip = {"gl_picmip", "0"};
cvar_t *gl_picmip;
byte *draw_chars; // 8*8 graphic characters

View file

@ -85,78 +85,45 @@ texture_t *r_notexture_mip;
int d_lightstylevalue[256]; // 8.8 fraction of base light value
//cvar_t r_clearcolor = {"r_clearcolor", "2"};
cvar_t *r_clearcolor;
void R_MarkLeaves (void);
//cvar_t r_norefresh = {"r_norefresh","0"};
cvar_t *r_norefresh;
//cvar_t r_drawentities = {"r_drawentities","1"};
cvar_t *r_drawentities;
//cvar_t r_drawviewmodel = {"r_drawviewmodel","1"};
cvar_t *r_drawviewmodel;
//cvar_t r_speeds = {"r_speeds","0"};
cvar_t *r_speeds;
//cvar_t r_fullbright = {"r_fullbright","0"};
cvar_t *r_fullbright;
//cvar_t r_lightmap = {"r_lightmap","0"};
cvar_t *r_lightmap;
//cvar_t r_shadows = {"r_shadows","0"};
cvar_t *r_shadows;
//cvar_t r_wateralpha = {"r_wateralpha","1"};
cvar_t *r_wateralpha;
//cvar_t r_dynamic = {"r_dynamic","1"};
cvar_t *r_dynamic;
//cvar_t r_novis = {"r_novis","0"};
cvar_t *r_novis;
#ifdef QUAKEWORLD
//cvar_t r_netgraph = {"r_netgraph","0"};
cvar_t *r_netgraph;
#endif
// All the fog code was disabled for QuakeWold
// _reduced_ visability shouldn't be considered cheating :)
//cvar_t r_fog = {"r_fog", "0"};
cvar_t *r_fog;
//cvar_t r_volfog = {"r_volfog", "0"};
cvar_t *r_volfog;
// Waterwarp should be completely disabled for release
// since we are too lazy to actually fix it ;)
//cvar_t r_waterwarp = {"r_waterwarp", "0"};
cvar_t *r_waterwarp;
//cvar_t r_waterripple = {"r_waterripple", "0"};
cvar_t *r_waterripple;
//cvar_t gl_finish = {"gl_finish","0"};
cvar_t *gl_finish;
//cvar_t gl_clear = {"gl_clear","0"};
cvar_t *gl_clear;
//cvar_t gl_cull = {"gl_cull","1"};
cvar_t *gl_cull;
//cvar_t gl_texsort = {"gl_texsort","1"};
cvar_t *gl_texsort;
//cvar_t gl_smoothmodels = {"gl_smoothmodels","1"};
cvar_t *gl_smoothmodels;
//cvar_t gl_affinemodels = {"gl_affinemodels","0"};
cvar_t *gl_affinemodels;
//cvar_t gl_polyblend = {"gl_polyblend","1"};
cvar_t *gl_polyblend;
//cvar_t gl_playermip = {"gl_playermip","0"};
cvar_t *gl_playermip;
//cvar_t gl_nocolors = {"gl_nocolors","0"};
cvar_t *gl_nocolors;
/*
#ifdef QUAKEWORLD
cvar_t gl_keeptjunctions = {"gl_keeptjunctions","1"};
#else
cvar_t gl_keeptjunctions = {"gl_keeptjunctions","0"};
#endif
*/
cvar_t *gl_keeptjunctions;
//cvar_t gl_doubleeyes = {"gl_doubleeyes", "1", CVAR_ARCHIVE};
cvar_t *gl_doubleeyes;
extern cvar_t *gl_ztrick;

View file

@ -100,25 +100,15 @@ float scr_con_current;
float scr_conlines; // lines of console to display
float oldscreensize, oldfov;
//cvar_t scr_viewsize = {"viewsize","100", CVAR_ARCHIVE};
cvar_t *scr_viewsize;
//cvar_t scr_fov = {"fov","90"}; // 10 - 170
cvar_t *scr_fov;
//cvar_t scr_conspeed = {"scr_conspeed","300"};
cvar_t *scr_conspeed;
//cvar_t scr_centertime = {"scr_centertime","2"};
cvar_t *scr_centertime;
//cvar_t scr_showram = {"showram","1"};
cvar_t *scr_showram;
//cvar_t scr_showturtle = {"showturtle","0"};
cvar_t *scr_showturtle;
//cvar_t scr_showpause = {"showpause","1"};
cvar_t *scr_showpause;
//cvar_t scr_printspeed = {"scr_printspeed","8"};
cvar_t *scr_printspeed;
//cvar_t scr_allowsnap = {"scr_allowsnap", "1"};
cvar_t *scr_allowsnap;
//cvar_t gl_triplebuffer = {"gl_triplebuffer", "1", CVAR_ARCHIVE };
cvar_t *gl_triplebuffer;
extern cvar_t *crosshair;
@ -403,25 +393,15 @@ SCR_Init
*/
void SCR_Init (void)
{
// Cvar_RegisterVariable (&scr_fov);
scr_fov = Cvar_Get ("fov","90",0,"None");
// Cvar_RegisterVariable (&scr_viewsize);
scr_viewsize = Cvar_Get ("viewsize","100",CVAR_ARCHIVE,"None");
// Cvar_RegisterVariable (&scr_conspeed);
scr_conspeed = Cvar_Get ("scr_conspeed","300",CVAR_ARCHIVE,"None");
// Cvar_RegisterVariable (&scr_showram);
scr_showram = Cvar_Get ("scr_showram","1",0,"None");
// Cvar_RegisterVariable (&scr_showturtle);
scr_showturtle = Cvar_Get ("scr_showturtle","0",0,"None");
// Cvar_RegisterVariable (&scr_showpause);
scr_showpause = Cvar_Get ("scr_showpause","1",0,"None");
// Cvar_RegisterVariable (&scr_centertime);
scr_centertime = Cvar_Get ("scr_centertime","2",0,"None");
// Cvar_RegisterVariable (&scr_printspeed);
scr_printspeed = Cvar_Get ("scr_printspeed","8",0,"None");
// Cvar_RegisterVariable (&scr_allowsnap);
scr_allowsnap = Cvar_Get ("scr_allowsnap","1",0,"None");
// Cvar_RegisterVariable (&gl_triplebuffer);
gl_triplebuffer = Cvar_Get ("gl_triplebuffer","1",CVAR_ARCHIVE,"None");
//

View file

@ -149,41 +149,20 @@ qboolean gl_mtexable = false;
//====================================
//cvar_t gl_ztrick = {"gl_ztrick", "1", CVAR_ARCHIVE};
cvar_t *gl_ztrick;
//cvar_t vid_mode = {"vid_mode", "0", CVAR_NONE};
cvar_t *vid_mode;
// Note that 0 is MODE_WINDOWED
//cvar_t _vid_default_mode = {"_vid_default_mode", "0", CVAR_ARCHIVE};
cvar_t *_vid_default_mode;
// Note that 3 is MODE_FULLSCREEN_DEFAULT
<<<<<<< gl_vidnt.c
//cvar_t _vid_default_mode_win = {"_vid_default_mode_win", "3", CVAR_ARCHIVE};
cvar_t *_vid_default_mode_win;
//cvar_t vid_wait = {"vid_wait", "0"};
cvar_t *vid_wait;
//cvar_t vid_nopageflip = {"vid_nopageflip", "0", CVAR_ARCHIVE};
cvar_t *vid_nopageflip;
//cvar_t _vid_wait_override = {"_vid_wait_override", "0", CVAR_ARCHIVE};
cvar_t *_vid_wait_override;
//cvar_t vid_config_x = {"vid_config_x", "800", CVAR_ARCHIVE};
cvar_t *vid_config_x;
//cvar_t vid_config_y = {"vid_config_y", "600", CVAR_ARCHIVE};
cvar_t *vid_config_y;
//cvar_t vid_stretch_by_2 = {"vid_stretch_by_2", "1", CVAR_ARCHIVE};
cvar_t *vid_stretch_by_2;
//cvar_t _windowed_mouse = {"_windowed_mouse", "1", CVAR_ARCHIVE};
cvar_t *_windowed_mouse;
=======
cvar_t _vid_default_mode_win = {"_vid_default_mode_win", "3", CVAR_ARCHIVE};
cvar_t vid_wait = {"vid_wait", "0"};
cvar_t vid_nopageflip = {"vid_nopageflip", "0", CVAR_ARCHIVE};
cvar_t _vid_wait_override = {"_vid_wait_override", "0", CVAR_ARCHIVE};
cvar_t vid_config_x = {"vid_config_x", "800", CVAR_ARCHIVE};
cvar_t vid_config_y = {"vid_config_y", "600", CVAR_ARCHIVE};
cvar_t vid_stretch_by_2 = {"vid_stretch_by_2", "1", CVAR_ARCHIVE};
>>>>>>> 1.20
int window_center_x, window_center_y, window_x, window_y, window_width, window_height;
RECT window_rect;
@ -467,7 +446,7 @@ int VID_SetMode (int modenum, unsigned char *palette)
SetForegroundWindow (mainwindow);
VID_SetPalette (palette);
vid_modenum = modenum;
Cvar_SetValue ("vid_mode", (float)vid_modenum);
vid_mode->value = (float)vid_modenum;
while (PeekMessage (&msg, NULL, 0, 0, PM_REMOVE))
{
@ -1611,43 +1590,22 @@ void VID_Init (unsigned char *palette)
memset(&devmode, 0, sizeof(devmode));
<<<<<<< gl_vidnt.c
// Cvar_RegisterVariable (&vid_mode);
vid_mode = Cvar_Get ("vid_mode","0");
// Cvar_RegisterVariable (&vid_wait);
vid_wait = Cvar_Get ("vid_wait","0");
// Cvar_RegisterVariable (&vid_nopageflip);
_vid_nopageflip = Cvar_Get ("_vid_nopageflip","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&_vid_wait_override)
_vid_wait_override = Cvar_Get ("_vid_wait_override","0",CVAR_ARCHIVE);
vid_mode = Cvar_Get ("vid_mode","0",0,"None");
vid_wait = Cvar_Get ("vid_wait","0",0,"None");
_vid_nopageflip = Cvar_Get ("_vid_nopageflip","0",CVAR_ARCHIVE,"None");
_vid_wait_override = Cvar_Get ("_vid_wait_override","0",CVAR_ARCHIVE,
"None");
// Cvar_RegisterVariable (&_vid_default_mode);
_vid_default_mode = Cvar_Get ("_vid_default_mode","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&_vid_default_mode_win);
_vid_default_mode = Cvar_Get ("_vid_default_mode","0",CVAR_ARCHIVE,
"None");
_vid_default_mode_win = Cvar_Get ("_vid_default_mode_win","0",
CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_config_x);
vid_config_x = Cvar_Get ("vid_config_x","800",CVAR_ARCHIVE,"800");
// Cvar_RegisterVariable (&vid_config_y);
vid_config_y = Cvar_Get ("vid_config_y","600",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_stretch_by_2);
vid_stretch_by_2 = Cvar_Get ("vid_stretch_by_2","1",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&_windowed_mouse);
_windowed_mouse = Cvar_Get ("_windowed_mouse","1",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&gl_ztrick);
gl_ztrick = Cvar_Get ("gl_ztrick","1",CVAR_ARCHIVE);
=======
Cvar_RegisterVariable (&vid_mode);
Cvar_RegisterVariable (&vid_wait);
Cvar_RegisterVariable (&vid_nopageflip);
Cvar_RegisterVariable (&_vid_wait_override);
Cvar_RegisterVariable (&_vid_default_mode);
Cvar_RegisterVariable (&_vid_default_mode_win);
Cvar_RegisterVariable (&vid_config_x);
Cvar_RegisterVariable (&vid_config_y);
Cvar_RegisterVariable (&vid_stretch_by_2);
Cvar_RegisterVariable (&gl_ztrick);
>>>>>>> 1.20
CVAR_ARCHIVE,"None");
vid_config_x = Cvar_Get ("vid_config_x","800",CVAR_ARCHIVE,"None");
vid_config_y = Cvar_Get ("vid_config_y","600",CVAR_ARCHIVE,"None");
vid_stretch_by_2 = Cvar_Get ("vid_stretch_by_2","1",CVAR_ARCHIVE,
"None");
_windowed_mouse = Cvar_Get ("_windowed_mouse","1",CVAR_ARCHIVE,"None");
gl_ztrick = Cvar_Get ("gl_ztrick","1",CVAR_ARCHIVE,"None");
Cmd_AddCommand ("vid_nummodes", VID_NumModes_f);
Cmd_AddCommand ("vid_describecurrentmode", VID_DescribeCurrentMode_f);
@ -2015,7 +1973,7 @@ void VID_ExtraOptionCmd(int option_cursor)
{
switch(option_cursor) {
case 1: // _windowed_mouse
Cvar_SetValue ("_windowed_mouse", !_windowed_mouse->value);
_windowed_mouse-> = !_windowed_mouse->value;
break;
}

View file

@ -77,7 +77,6 @@ typedef struct
} externControl_t;
*/
//cvar_t m_filter = {"m_filter","1"};
cvar_t *m_filter;
qboolean mouse_avail;
@ -88,9 +87,7 @@ float mouse_x, mouse_y;
float old_mouse_x, old_mouse_y;
//cvar_t in_joystick = {"joystick","1"};
cvar_t *in_joystick;
//cvar_t joy_numbuttons = {"joybuttons","4", CVAR_ARCHIVE};
cvar_t *joy_numbuttons;
qboolean joy_avail;
@ -106,7 +103,6 @@ qboolean extern_avail;
int extern_buttons;
int extern_oldbuttonstate;
int extern_buttonstate;
//cvar_t aux_look = {"auxlook","1", CVAR_ARCHIVE};
cvar_t *aux_look;
externControl_t *extern_control;
void IN_StartupExternal (void);
@ -166,13 +162,9 @@ void IN_Init (void)
{
int i;
// Cvar_RegisterVariable (&m_filter);
m_filter = Cvar_Get ("m_filter","1");
// Cvar_RegisterVariable (&in_joystick);
in_joystick = Cvar_Get ("in_joystick","1");
// Cvar_RegisterVariable (&joy_numbuttons);
joy_numbuttons = Cvar_Get ("joy_numbuttons","4",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&aux_look);
aux_look = Cvar_Get ("auxlook","1",CVAR_ARCHIVE);
Cmd_AddCommand ("toggle_auxlook", Toggle_AuxLook_f);
Cmd_AddCommand ("force_centerview", Force_CenterView_f);

View file

@ -43,7 +43,6 @@ HRESULT (WINAPI *pDirectInputCreate)(HINSTANCE hinst, DWORD dwVersion,
LPDIRECTINPUT * lplpDirectInput, LPUNKNOWN punkOuter);
// mouse variables
//cvar_t m_filter = {"m_filter","0"};
cvar_t *m_filter;
int mouse_buttons;
@ -93,43 +92,24 @@ PDWORD pdwRawValue[JOY_MAX_AXES];
// each time. this avoids any problems with getting back to a default usage
// or when changing from one controller to another. this way at least something
// works.
//cvar_t in_joystick = {"joystick","0", CVAR_ARCHIVE};
cvar_t *in_joystick;
//cvar_t joy_name = {"joyname", "joystick"};
cvar_t *joy_name;
//cvar_t joy_advanced = {"joyadvanced", "0"};
cvar_t *joy_advanced;
//cvar_t joy_advaxisx = {"joyadvaxisx", "0"};
cvar_t *joy_advaxisx;
//cvar_t joy_advaxisy = {"joyadvaxisy", "0"};
cvar_t *joy_advaxisy;
//cvar_t joy_advaxisz = {"joyadvaxisz", "0"};
cvar_t *joy_advaxisz;
//cvar_t joy_advaxisr = {"joyadvaxisr", "0"};
cvar_t *joy_advaxisr;
//cvar_t joy_advaxisu = {"joyadvaxisu", "0"};
cvar_t *joy_advaxisu;
//cvar_t joy_advaxisv = {"joyadvaxisv", "0"};
cvar_t *joy_advaxisv;
//cvar_t joy_forwardthreshold = {"joyforwardthreshold", "0.15"};
cvar_t *joy_forwardthreshold;
//cvar_t joy_sidethreshold = {"joysidethreshold", "0.15"};
cvar_t *joy_sidethreshold;
//cvar_t joy_pitchthreshold = {"joypitchthreshold", "0.15"};
cvar_t *joy_pitchthreshold;
//cvar_t joy_yawthreshold = {"joyyawthreshold", "0.15"};
cvar_t *joy_yawthreshold;
//cvar_t joy_forwardsensitivity = {"joyforwardsensitivity", "-1.0"};
cvar_t *joy_forwardsensitivity;
//cvar_t joy_sidesensitivity = {"joysidesensitivity", "-1.0"};
cvar_t *joy_sidesensitivity;
//cvar_t joy_pitchsensitivity = {"joypitchsensitivity", "1.0"};
cvar_t *joy_pitchsensitivity;
//cvar_t joy_yawsensitivity = {"joyyawsensitivity", "-1.0"};
cvar_t *joy_yawsensitivity;
//cvar_t joy_wwhack1 = {"joywwhack1", "0.0"};
cvar_t *joy_wwhack1;
//cvar_t joy_wwhack2 = {"joywwhack2", "0.0"};
cvar_t *joy_wwhack2;
qboolean joy_avail, joy_advancedinit, joy_haspov;
@ -512,48 +492,31 @@ IN_Init
void IN_Init (void)
{
// mouse variables
// Cvar_RegisterVariable (&m_filter);
m_filter = Cvar_Get ("m_filter","0");
m_filter = Cvar_Get ("m_filter","0",0,"None");
// joystick variables
// Cvar_RegisterVariable (&in_joystick);
in_joystick = Cvar_Get ("in_joystick","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&joy_name);
joy_name = Cvar_Get ("joy_name","joystick");
// Cvar_RegisterVariable (&joy_advanced);
joy_advanced = Cvar_Get ("joy_advanced","0");
// Cvar_RegisterVariable (&joy_advaxisx);
joy_advaxisx = Cvar_Get ("joy_advaxisx","0");
// Cvar_RegisterVariable (&joy_advaxisy);
joy_advaxisy = Cvar_Get ("joy_advaxisy","0");
// Cvar_RegisterVariable (&joy_advaxisz);
joy_advaxisz = Cvar_Get ("joy_advaxisz","0");
// Cvar_RegisterVariable (&joy_advaxisr);
joy_advaxisr = Cvar_Get ("joy_advaxisr","0");
// Cvar_RegisterVariable (&joy_advaxisu);
joy_advaxisu = Cvar_Get ("joy_advaxisu","0");
// Cvar_RegisterVariable (&joy_advaxisv);
joy_advaxisv = Cvar_Get ("joy_adaxisv","0");
// Cvar_RegisterVariable (&joy_forwardthreshold);
joy_forwardthreshold = Cvar_Get ("joy_forwardthreshold","0.15");
// Cvar_RegisterVariable (&joy_sidethreshold);
joy_sidethreshold = Cvar_Get ("joy_sidethreshold","0.15");
// Cvar_RegisterVariable (&joy_pitchthreshold);
joy_pitchthreshold = Cvar_Get ("joy_pitchthreshold","0.15");
// Cvar_RegisterVariable (&joy_yawthreshold);
joy_yawthreshold = Cvar_Get ("joy_yawthreshold","0.15");
// Cvar_RegisterVariable (&joy_forwardsensitivity);
joy_forwardsensitivity = Cvar_Get ("joy_forwardsensitivity","-1.0");
// Cvar_RegisterVariable (&joy_sidesensitivity);
joy_sidesensitivity = Cvar_Get ("joy_sidesensitivity","-1.0");
// Cvar_RegisterVariable (&joy_pitchsensitivity);
joy_pitchsensitivity = Cvar_Get ("joy_pitchsensitivity","-1.0");
// Cvar_RegisterVariable (&joy_yawsensitivity);
joy_yawsensitvity = Cvar_Get ("joy_yawsensitivity","-1.0");
// Cvar_RegisterVariable (&joy_wwhack1);
joy_wwhack1 = Cvar_Get ("joy_wwhack1","0.0");
// Cvar_RegisterVariable (&joy_wwhack2);
joy_wwhack2 = Cvar_Get ("joy_wwhack2","0.0");
in_joystick = Cvar_Get ("in_joystick","0",CVAR_ARCHIVE,"None");
joy_name = Cvar_Get ("joy_name","joystick",0,"None");
joy_advanced = Cvar_Get ("joy_advanced","0",0,"None");
joy_advaxisx = Cvar_Get ("joy_advaxisx","0",0,"None");
joy_advaxisy = Cvar_Get ("joy_advaxisy","0",0,"None");
joy_advaxisz = Cvar_Get ("joy_advaxisz","0",0,"None");
joy_advaxisr = Cvar_Get ("joy_advaxisr","0",0,"None");
joy_advaxisu = Cvar_Get ("joy_advaxisu","0",0,"None");
joy_advaxisv = Cvar_Get ("joy_adaxisv","0",0,"None");
joy_forwardthreshold = Cvar_Get ("joy_forwardthreshold","0.15",0,
"None");
joy_sidethreshold = Cvar_Get ("joy_sidethreshold","0.15",0,"None");
joy_pitchthreshold = Cvar_Get ("joy_pitchthreshold","0.15",0,"None");
joy_yawthreshold = Cvar_Get ("joy_yawthreshold","0.15",0,"None");
joy_forwardsensitivity = Cvar_Get ("joy_forwardsensitivity","-1.0",0,
"None");
joy_sidesensitivity = Cvar_Get ("joy_sidesensitivity","-1.0",0,"None");
joy_pitchsensitivity = Cvar_Get ("joy_pitchsensitivity","-1.0",0,
"None");
joy_yawsensitvity = Cvar_Get ("joy_yawsensitivity","-1.0",0,"None");
joy_wwhack1 = Cvar_Get ("joy_wwhack1","0.0",0,"None");
joy_wwhack2 = Cvar_Get ("joy_wwhack2","0.0",0,"None");
Cmd_AddCommand ("force_centerview", Force_CenterView_f);
Cmd_AddCommand ("joyadvancedupdate", Joy_AdvancedUpdate_f);

View file

@ -341,7 +341,7 @@ static void IN_ExtraOptionCmd(int option_cursor)
{
switch (option_cursor) {
case 1: // _windowed_mouse
Cvar_SetValue ("_windowed_mouse", !_windowed_mouse->value);
_windowed_mouse->value = !_windowed_mouse->value;
break;
}
}

View file

@ -47,11 +47,8 @@ static byte vid_current_palette[768];
static int UseDisplay = 1;
//static cvar_t vid_mode = {"vid_mode","5",CVAR_NONE};
static cvar_t *vid_mode;
//static cvar_t vid_redrawfull = {"vid_redrawfull","0",CVAR_NONE};
static cvar_t *vid_redrawfull;
//static cvar_t vid_waitforrefresh = {"vid_waitforrefresh","0",CVAR_ARCHIVE};
static cvar_t *vid_waitforrefresh;
static char *framebuffer_ptr;
@ -390,13 +387,10 @@ VID_Init(unsigned char *palette)
if (UseDisplay) {
// Cvar_RegisterVariable (&vid_mode);
vid_mode = Cvar_Get ("vid_mode","5");
// Cvar_RegisterVariable (&vid_redrawfull);
vid_redrawfull = Cvar_Get ("vid_redrawfull","0");
// Cvar_RegisterVariable (&vid_waitforrefresh);
vid_mode = Cvar_Get ("vid_mode","5",0,"None");
vid_redrawfull = Cvar_Get ("vid_redrawfull","0",0,"None");
vid_waitforrefresh = Cvar_Get ("vid_waitforrefresh","0",
CVAR_ARCHIVE);
CVAR_ARCHIVE,"None");
Cmd_AddCommand("vid_nummodes", VID_NumModes_f);
Cmd_AddCommand("vid_describemode", VID_DescribeMode_f);

View file

@ -44,53 +44,21 @@ vmode_t *pcurrentmode = NULL;
int vid_testingmode, vid_realmode;
double vid_testendtime;
<<<<<<< vid_dos.c
//cvar_t vid_mode = {"vid_mode","0", CVAR_NONE};
cvar_t *vid_mode;
//cvar_t vid_wait = {"vid_wait","0"};
cvar_t *vid_wait;
//cvar_t vid_nopageflip = {"vid_nopageflip","0", CVAR_ARCHIVE};
cvar_t *vid_nopageflip;
//cvar_t _vid_wait_override = {"_vid_wait_override", "0",CVAR_ARCHIVE};
cvar_t *_vid_wait_override;
//cvar_t _vid_default_mode = {"_vid_default_mode","0", CVAR_ARCHIVE};
cvar_t *_vid_default_mode;
//cvar_t _vid_default_mode_win = {"_vid_default_mode_win","1", CVAR_ARCHIVE};
cvar_t *_vid_default_mode_win;
//cvar_t vid_config_x = {"vid_config_x","800", CVAR_ARCHIVE};
cvar_t *vid_config_x;
//cvar_t vid_config_y = {"vid_config_y","600", CVAR_ARCHIVE};
cvar_t *vid_config_y;
//cvar_t vid_stretch_by_2 = {"vid_stretch_by_2","1", CVAR_ARCHIVE};
cvar_t *vid_stretch_by_2;
//cvar_t _windowed_mouse = {"_windowed_mouse","0", CVAR_ARCHIVE};
cvar_t *_windowed_mouse;
//cvar_t vid_fullscreen_mode = {"vid_fullscreen_mode","3", CVAR_ARCHIVE};
cvar_t *vid_fullscreen_mode;
//cvar_t vid_windowed_mode = {"vid_windowed_mode","0", CVAR_ARCHIVE};
cvar_t *vid_windowed_mode;
//cvar_t block_switch = {"block_switch","0", CVAR_ARCHIVE};
cvar_t *block_switch;
//cvar_t vid_window_x = {"vid_window_x", "0", CVAR_ARCHIVE};
cvar_t *vid_window_x;
//cvar_t vid_window_y = {"vid_window_y", "0", CVAR_ARCHIVE};
cvar_t *vid_window_y;
=======
cvar_t vid_mode = {"vid_mode","0", CVAR_NONE};
cvar_t vid_wait = {"vid_wait","0"};
cvar_t vid_nopageflip = {"vid_nopageflip","0", CVAR_ARCHIVE};
cvar_t _vid_wait_override = {"_vid_wait_override", "0",CVAR_ARCHIVE};
cvar_t _vid_default_mode = {"_vid_default_mode","0", CVAR_ARCHIVE};
cvar_t _vid_default_mode_win = {"_vid_default_mode_win","1", CVAR_ARCHIVE};
cvar_t vid_config_x = {"vid_config_x","800", CVAR_ARCHIVE};
cvar_t vid_config_y = {"vid_config_y","600", CVAR_ARCHIVE};
cvar_t vid_stretch_by_2 = {"vid_stretch_by_2","1", CVAR_ARCHIVE};
cvar_t vid_fullscreen_mode = {"vid_fullscreen_mode","3", CVAR_ARCHIVE};
cvar_t vid_windowed_mode = {"vid_windowed_mode","0", CVAR_ARCHIVE};
cvar_t block_switch = {"block_switch","0", CVAR_ARCHIVE};
cvar_t vid_window_x = {"vid_window_x", "0", CVAR_ARCHIVE};
cvar_t vid_window_y = {"vid_window_y", "0", CVAR_ARCHIVE};
>>>>>>> 1.15
int VID_options_items = 0;
@ -128,49 +96,26 @@ VID_Init
*/
void VID_Init (unsigned char *palette)
{
<<<<<<< vid_dos.c
// Cvar_RegisterVariable (&vid_mode);
vid_mode = Cvar_Get ("vid_mode","0");
// Cvar_RegisterVariable (&vid_wait);
vid_wait = Cvar_Get ("vid_mode","0");
// Cvar_RegisterVariable (&vid_nopageflip);
vid_nopageflip = Cvar_Get ("vid_nopageflip","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&_vid_wait_override);
_vid_wait_override = Cvar_Get ("_vid_wait_override","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&_vid_default_mode);
_vid_default_mode = Cvar_Get ("_vid_default_mode","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&_vid_default_mode_win);
vid_mode = Cvar_Get ("vid_mode","0",0,"None");
vid_wait = Cvar_Get ("vid_mode","0",0,"None");
vid_nopageflip = Cvar_Get ("vid_nopageflip","0",CVAR_ARCHIVE,"None");
_vid_wait_override = Cvar_Get ("_vid_wait_override","0",CVAR_ARCHIVE,
"None");
_vid_default_mode = Cvar_Get ("_vid_default_mode","0",CVAR_ARCHIVE,
"None");
_vid_default_mode_win = Cvar_Get ("_vid_default_mode_win","1",
CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_config_x);
vid_config_x = Cvar_Get ("vid_config_x","800",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_config_y);
vid_config_y = Cvar_Get ("vid_config_y","600",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_stretch_by_2);
vid_stretch_by_2 = Cvar_Get ("vid_stretch_by_2","1",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&_windowed_mouse);
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_fullscreen_mode);
vid_fullscreen_mode = Cvar_Get ("vid_fullscreen_mode","3",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_windowed_mode);
vid_windowed_mode = Cvar_Get ("vid_windowed_mode","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&block_switch);
block_switch = Cvar_Get ("block_switch","0",CVAR_ARCHIVE);
=======
Cvar_RegisterVariable (&vid_mode);
Cvar_RegisterVariable (&vid_wait);
Cvar_RegisterVariable (&vid_nopageflip);
Cvar_RegisterVariable (&_vid_wait_override);
Cvar_RegisterVariable (&_vid_default_mode);
Cvar_RegisterVariable (&_vid_default_mode_win);
Cvar_RegisterVariable (&vid_config_x);
Cvar_RegisterVariable (&vid_config_y);
Cvar_RegisterVariable (&vid_stretch_by_2);
Cvar_RegisterVariable (&vid_fullscreen_mode);
Cvar_RegisterVariable (&vid_windowed_mode);
Cvar_RegisterVariable (&block_switch);
>>>>>>> 1.15
CVAR_ARCHIVE,"None");
vid_config_x = Cvar_Get ("vid_config_x","800",CVAR_ARCHIVE,"None");
vid_config_y = Cvar_Get ("vid_config_y","600",CVAR_ARCHIVE,"None");
vid_stretch_by_2 = Cvar_Get ("vid_stretch_by_2","1",CVAR_ARCHIVE,
"None");
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE,"None");
vid_fullscreen_mode = Cvar_Get ("vid_fullscreen_mode","3",CVAR_ARCHIVE,
"None");
vid_windowed_mode = Cvar_Get ("vid_windowed_mode","0",CVAR_ARCHIVE,
"None");
block_switch = Cvar_Get ("block_switch","0",CVAR_ARCHIVE,"None");
Cmd_AddCommand ("vid_testmode", VID_TestMode_f);
Cmd_AddCommand ("vid_nummodes", VID_NumModes_f);
Cmd_AddCommand ("vid_describecurrentmode", VID_DescribeCurrentMode_f);
@ -270,7 +215,7 @@ int VID_SetMode (int modenum, unsigned char *palette)
if ((modenum >= numvidmodes) || (modenum < 0))
{
Cvar_SetValue ("vid_mode", (float)vid_modenum);
vid_mode->value = (float)vid_modenum;
nomodecheck = true;
Con_Printf ("No such video mode: %d\n", modenum);
@ -333,7 +278,7 @@ int VID_SetMode (int modenum, unsigned char *palette)
(*pcurrentmode->setpalette) (&vid, pcurrentmode, palette);
vid_modenum = modenum;
Cvar_SetValue ("vid_mode", (float)vid_modenum);
vid_mode-> = (float)vid_modenum;
nomodecheck = true;
Con_Printf ("%s\n", VID_ModeInfo (vid_modenum, NULL));
@ -396,10 +341,10 @@ void VID_Update (vrect_t *rects)
if (firstupdate && _vid_default_mode->value)
{
if(_vid_default_mode->value >= numvidmodes)
Cvar_SetValue ("_vid_default_mode", 0);
_vid_default_mode->value = 0;
firstupdate = 0;
Cvar_SetValue ("vid_mode", _vid_default_mode->value);
vid_mode->value = _vid_default_mode->value;
}
(*pcurrentmode->swapbuffers)(&vid, pcurrentmode, rects);
@ -419,7 +364,7 @@ void VID_Update (vrect_t *rects)
if (vid_mode->value != vid_realmode)
{
VID_SetMode ((int)vid_mode->value, vid_current_palette);
Cvar_SetValue ("vid_mode", (float)vid_modenum);
vid_mode->value = (float)vid_modenum;
// so if mode set fails, we don't keep on
// trying to set that mode
vid_realmode = vid_modenum;
@ -836,7 +781,7 @@ void VID_MenuKey (int key)
case 'd':
S_LocalSound ("misc/menu1.wav");
firstupdate = 0;
Cvar_SetValue ("_vid_default_mode", vid_modenum);
_vid_default_mode->value = vid_modenum;
break;
default:

View file

@ -636,7 +636,7 @@ int VID_ExtraInitMode (viddef_t *lvid, vmode_t *pcurrentmode)
de_exists &&
(_vid_wait_override->value == 0.0))
{
Cvar_SetValue ("vid_wait", (float)VID_WAIT_DISPLAY_ENABLE);
vid_wait->value = (float)VID_WAIT_DISPLAY_ENABLE;
VID_displayedpage = 0;
VID_currentpage = 1;
@ -645,12 +645,12 @@ int VID_ExtraInitMode (viddef_t *lvid, vmode_t *pcurrentmode)
{
if ((lvid->numpages == 1) && (_vid_wait_override->value == 0.0))
{
Cvar_SetValue ("vid_wait", (float)VID_WAIT_NONE);
vid_wait->value = (float)VID_WAIT_NONE;
VID_displayedpage = VID_currentpage = 0;
}
else
{
Cvar_SetValue ("vid_wait", (float)VID_WAIT_VSYNC);
vid_wait->value = (float)VID_WAIT_VSYNC;
VID_displayedpage = 0;

View file

@ -889,7 +889,6 @@ void IN_Frame(void)
void
IN_Init(void)
{
// Cvar_RegisterVariable(&m_filter);
m_filter = Cvar_Get ("m_filter","0",CVAR_ARCHIVE, "None");
if (COM_CheckParm ("-nomouse")) return;
@ -958,7 +957,7 @@ VID_ExtraOptionCmd(int option_cursor)
{
switch(option_cursor) {
case 1: // _windowed_mouse
Cvar_SetValue ("_windowed_mouse", !_windowed_mouse->value);
_windowed_mouse->value = !_windowed_mouse->value;
break;
}

View file

@ -1151,13 +1151,17 @@ Sys_SendKeyEvents(void)
}
}
<<<<<<< vid_sunx.c
void
IN_SendKeyEvents (void)
{
Sys_SendKeyEvents ();
}
void
IN_Init(void)
{
// Cvar_RegisterVariable(&m_filter);
m_filter = Cvar_Get ("m_filter","0",CVAR_ARCHIVE);
m_filter = Cvar_Get ("m_filter","0",CVAR_ARCHIVE,"None");
if (COM_CheckParm("-nomouse")) return;
mouse_x = mouse_y = 0.0;
mouse_avail = 1;
@ -1217,8 +1221,6 @@ IN_Move(usercmd_t *cmd)
mouse_x = mouse_y = 0.0;
}
=======
>>>>>>> 1.27
void VID_ExtraOptionDraw(unsigned int options_draw_cursor)
{
// Windowed Mouse
@ -1230,7 +1232,7 @@ void VID_ExtraOptionCmd(int option_cursor)
{
switch (option_cursor) {
case 1: // _windowed_mouse
Cvar_SetValue ("_windowed_mouse", !_windowed_mouse->value);
_windowed_mouse->value = !_windowed_mouse->value;
break;
}
}

View file

@ -242,7 +242,7 @@ qboolean CheckPixelMultiply (void)
old_pixel = current_pixel_multiply;
current_pixel_multiply = m;
Cvar_SetValue("pixel_multiply", m);
pixel_multiply->value = m;
if(XGetWindowAttributes(x_disp, x_win, & wattr) == 0)
return true; // ???
@ -383,8 +383,7 @@ void VID_Init (unsigned char *palette)
Cmd_AddCommand ("gamma", VID_Gamma_f);
// Cvar_RegisterVariable (&pixel_multiply);
pixel_multiply = Cvar_Get ("pixel_multiply","2",CVAR_ARCHIVE);
pixel_multiply = Cvar_Get ("pixel_multiply","2",CVAR_ARCHIVE,"None");
if (pipe(render_pipeline) < 0)
Sys_Error("VID_Init: pipe");
@ -500,7 +499,7 @@ void VID_Init (unsigned char *palette)
// See if we're going to do pixel multiply
//
if (pixel_multiply->value < 1 || pixel_multiply->value > 4)
Cvar_SetValue("pixel_multiply", 2);
pixel_multiply->value = 2;
current_pixel_multiply = pixel_multiply->value;
w = 320*current_pixel_multiply; // minimum width
@ -1184,12 +1183,15 @@ void Sys_SendKeyEvents(void)
}
}
void IN_SendKeyEvents (void)
{
Sys_SendKeyEvents ();
}
void IN_Init (void)
{
// Cvar_RegisterVariable (&_windowed_mouse);
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&m_filter);
m_filter = Cvar_Get ("m_filter","0",CVAR_ARCHIVE);
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE,"None");
m_filter = Cvar_Get ("m_filter","0",CVAR_ARCHIVE,"None");
if ( COM_CheckParm ("-nomouse") )
return;
mouse_x = mouse_y = 0.0;
@ -1270,7 +1272,7 @@ void VID_ExtraOptionCmd(int option_cursor)
{
switch(option_cursor) {
case 1: // _windowed_mouse
Cvar_SetValue ("_windowed_mouse", !_windowed_mouse->value);
_windowed_mouse->value = !_windowed_mouse->value;
break;
}

View file

@ -392,11 +392,11 @@ int VGA_InitMode (viddef_t *lvid, vmode_t *pcurrentmode)
if (_vid_wait_override->value)
{
Cvar_SetValue ("vid_wait", (float)VID_WAIT_VSYNC);
"vid_wait"->value = (float)VID_WAIT_VSYNC;
}
else
{
Cvar_SetValue ("vid_wait", (float)VID_WAIT_NONE);
vid_wait->value = (float)VID_WAIT_NONE;
}
D_InitCaches (vid_surfcache, vid_surfcachesize);

View file

@ -206,8 +206,8 @@ void VID_RememberWindowPos (void)
(rect.right > 0) &&
(rect.bottom > 0))
{
Cvar_SetValue ("vid_window_x", (float)rect.left);
Cvar_SetValue ("vid_window_y", (float)rect.top);
vid_window_x->value = (float)rect.left;
vid_window_y->value = (float)rect.top;
}
}
}
@ -226,8 +226,7 @@ void VID_CheckWindowXY (void)
((int)vid_window_x->value < 0) ||
((int)vid_window_y->value < 0))
{
Cvar_SetValue ("vid_window_x", 0.0);
Cvar_SetValue ("vid_window_y", 0.0 );
vid_window_x->value = vid_window_y->value = 0.0;
}
}
@ -1306,8 +1305,7 @@ qboolean VID_SetWindowedMode (int modenum)
{
if (COM_CheckParm ("-resetwinpos"))
{
Cvar_SetValue ("vid_window_x", 0.0);
Cvar_SetValue ("vid_window_y", 0.0);
vid_window_x->value = vid_window_y->value = 0.0;
}
windowed_mode_set = 1;
@ -1662,11 +1660,11 @@ int VID_SetMode (int modenum, unsigned char *palette)
modenum = vid_default;
}
Cvar_SetValue ("vid_mode", (float)modenum);
vid_mode->value = (float)modenum;
}
else
{
Cvar_SetValue ("vid_mode", (float)vid_modenum);
vid_mode->value = (float)vid_modenum;
return 0;
}
}
@ -1753,7 +1751,7 @@ int VID_SetMode (int modenum, unsigned char *palette)
ReleaseDC(NULL,hdc);
vid_modenum = modenum;
Cvar_SetValue ("vid_mode", (float)vid_modenum);
vid_mode->value = (float)vid_modenum;
if (!VID_AllocBuffers (vid.width, vid.height))
{
@ -2140,50 +2138,29 @@ void VID_Init (unsigned char *palette)
int i, bestmatchmetric, t, dr, dg, db, bestmatch = 0;
int basenummodes;
byte *ptmp;
<<<<<<< vid_win.c
// Cvar_RegisterVariable (&vid_mode);
vid_mode = Cvar_Get ("vid_mode","0");
// Cvar_RegisterVariable (&vid_wait);
vid_wait = Cvar_Get ("vid_wait","0");
// Cvar_RegisterVariable (&vid_nopageflip);
vid_nopageflip = Cvar_Get ("vid_nopageflip","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&_vid_wait_override);
_vid_wait_override = Cvar_Get ("_vid_wait_override","0",CVAR_ARCHIVE);
=======
vid_mode = Cvar_Get ("vid_mode","0",0,"None");
vid_wait = Cvar_Get ("vid_wait","0",0,"None");
vid_nopageflip = Cvar_Get ("vid_nopageflip","0",CVAR_ARCHIVE,"None");
_vid_wait_override = Cvar_Get ("_vid_wait_override","0",CVAR_ARCHIVE,
"None");
plugin_load("input");
IN->Init();
Cvar_RegisterVariable (&vid_mode);
Cvar_RegisterVariable (&vid_wait);
Cvar_RegisterVariable (&vid_nopageflip);
Cvar_RegisterVariable (&_vid_wait_override);
>>>>>>> 1.17
Cvar_RegisterVariable (&_vid_default_mode);
_vid_default_mode = Cvar_Get ("_vid_default_mode","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&_vid_default_mode_win);
_vid_default_mode = Cvar_Get ("_vid_default_mode","0",CVAR_ARCHIVE,
"None");
_vid_default_mode_win = Cvar_Get ("_vid_default_mode_win","3",
CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_config_x);
vid_config_x = Cvar_Get ("vid_config_x","800",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_config_y);
vid_config_y = Cvar_Get ("vid_config_y","600",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_stretch_by_2);
vid_stretch_by_2 = Cvar_Get ("vid_stretch_by_2","1",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&_windowed_mouse);
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_fullscreen_mode);
vid_fullscreen_mode = Cvar_Get ("vid_fullscreen_mode","3",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_windowed_mode);
vid_windowed_mode = Cvar_Get ("vid_windowed_mode","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&block_switch);
block_switch = Cvar_Get ("block_switch","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_window_x);
vid_window_x = Cvar_Get ("vid_window_x","0",CVAR_ARCHIVE);
// Cvar_RegisterVariable (&vid_window_y);
vid_window_y = Cvar_Get ("vid_window_y","0",CVAR_ARCHIVE);
CVAR_ARCHIVE,"None");
vid_config_x = Cvar_Get ("vid_config_x","800",CVAR_ARCHIVE,"None");
vid_config_y = Cvar_Get ("vid_config_y","600",CVAR_ARCHIVE,"None");
vid_stretch_by_2 = Cvar_Get ("vid_stretch_by_2","1",CVAR_ARCHIVE,
"None");
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE,"None");
vid_fullscreen_mode = Cvar_Get ("vid_fullscreen_mode","3",CVAR_ARCHIVE,
"None");
vid_windowed_mode = Cvar_Get ("vid_windowed_mode","0",CVAR_ARCHIVE,
"None");
block_switch = Cvar_Get ("block_switch","0",CVAR_ARCHIVE,"None");
vid_window_x = Cvar_Get ("vid_window_x","0",CVAR_ARCHIVE,"None");
vid_window_y = Cvar_Get ("vid_window_y","0",CVAR_ARCHIVE,"None");
Cmd_AddCommand ("vid_testmode", VID_TestMode_f);
Cmd_AddCommand ("vid_nummodes", VID_NumModes_f);
@ -2432,8 +2409,7 @@ void VID_Update (vrect_t *rects)
{
if (COM_CheckParm ("-resetwinpos"))
{
Cvar_SetValue ("vid_window_x", 0.0);
Cvar_SetValue ("vid_window_y", 0.0);
vid_window_x->value = vid_window_y->value = 0.0;
}
VID_CheckWindowXY ();
@ -2450,17 +2426,16 @@ void VID_Update (vrect_t *rects)
if (COM_CheckParm ("-resetwinpos"))
{
Cvar_SetValue ("vid_window_x", 0.0);
Cvar_SetValue ("vid_window_y", 0.0);
vid_window_x->value = vid_window_y->value = 0.0;
}
if ((_vid_default_mode_win->value < 0) ||
(_vid_default_mode_win->value >= nummodes))
{
Cvar_SetValue ("_vid_default_mode_win", windowed_default);
_vid_default_mode_win->value = windowed_default;
}
Cvar_SetValue ("vid_mode", _vid_default_mode_win->value);
vid_mode->value = _vid_default_mode_win->value;
}
}
@ -2480,7 +2455,7 @@ void VID_Update (vrect_t *rects)
if ((int)vid_mode->value != vid_realmode)
{
VID_SetMode ((int)vid_mode->value, vid_curpal);
Cvar_SetValue ("vid_mode", (float)vid_modenum);
vid_mode->value = (float)vid_modenum;
// so if mode set fails, we don't keep on
// trying to set that mode
vid_realmode = vid_modenum;
@ -3445,7 +3420,7 @@ void VID_MenuKey (int key)
case 'd':
S_LocalSound ("misc/menu1.wav");
firstupdate = 0;
Cvar_SetValue ("_vid_default_mode_win", vid_modenum);
_vid_default_mode_win->value = vid_modenum;
break;
default:
@ -3466,7 +3441,7 @@ void VID_ExtraOptionCmd(int option_cursor)
{
switch(option_cursor) {
case 1: // _windowed_mouse
Cvar_SetValue ("_windowed_mouse", !_windowed_mouse->value);
_windowed_mouse->value = !_windowed_mouse->value;
break;
}

View file

@ -122,9 +122,8 @@ is marked
*/
void Sys_Init (void)
{
// Cvar_RegisterVariable (&sys_nostdout);
/* Fix this sometime. */
sys_nostdout = Cvar_Get ("sys_nostdout","0");
sys_nostdout = Cvar_Get ("sys_nostdout","0",0,"None");
}
/*