The init sequence cleanup!

Also broke up client.h into a lot of smaller headers.
Oh, software rendering works again.

And yes, this does hit a hell of a lot of files.
This commit is contained in:
Zephaniah E. Hull 2000-10-29 15:35:24 +00:00
parent b0d4014885
commit 13bd5ce012
92 changed files with 912 additions and 422 deletions

60
include/cl_cam.h Normal file
View file

@ -0,0 +1,60 @@
/*
client.h
Client definitions
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef _CL_CAM_H
#define _CL_CAM_H
// since all headers are circular-protected with #ifdef _xxx_H
// try to get them self-sufficient by including whatever other
// headers they might need
#include <stdio.h>
#include "qtypes.h"
#include "protocol.h"
//
// cl_cam.c
//
#define CAM_NONE 0
#define CAM_TRACK 1
extern int autocam;
extern int spec_track; // player# of who we are tracking
qboolean Cam_DrawViewModel(void);
qboolean Cam_DrawPlayer(int playernum);
void Cam_Track(usercmd_t *cmd);
void Cam_FinishMove(usercmd_t *cmd);
void Cam_Reset(void);
void CL_Cam_Init(void);
void CL_Cam_Init_Cvars(void);
void CL_ParseEntityLump(char *entdata);
#endif // _CL_CAM_H

45
include/cl_demo.h Normal file
View file

@ -0,0 +1,45 @@
/*
client.h
Client definitions
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef _CL_DEMO_H
#define _CL_DEMO_H
#include "qtypes.h"
#include "protocol.h"
void CL_StopPlayback (void);
qboolean CL_GetMessage (void);
void CL_WriteDemoCmd (usercmd_t *pcmd);
void CL_Stop_f (void);
void CL_Record_f (void);
void CL_ReRecord_f (void);
void CL_PlayDemo_f (void);
void CL_TimeDemo_f (void);
#endif

43
include/cl_ents.h Normal file
View file

@ -0,0 +1,43 @@
/*
client.h
Client definitions
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef _CL_ENTS_H
#define _CL_ENTS_H
#include "qtypes.h"
void CL_SetSolidPlayers (int playernum);
void CL_SetUpPlayerPrediction(qboolean dopred);
void CL_EmitEntities (void);
void CL_ClearProjectiles (void);
void CL_ParseProjectiles (void);
void CL_ParsePacketEntities (qboolean delta);
void CL_SetSolidEntities (void);
void CL_ParsePlayerinfo (void);
#endif

66
include/cl_input.h Normal file
View file

@ -0,0 +1,66 @@
/*
client.h
Client definitions
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef _CL_INPUT_H
#define _CL_INPUT_H
#include "protocol.h"
typedef struct
{
int down[2]; // key nums holding it down
int state; // low bit is down state
} kbutton_t;
extern kbutton_t in_mlook, in_klook;
extern kbutton_t in_strafe;
extern kbutton_t in_speed;
void CL_Input_Init (void);
void CL_Input_Init_Cvars (void);
void CL_ClearStates (void);
void CL_SendCmd (void);
void CL_SendMove (usercmd_t *cmd);
void CL_ParseTEnt (void);
void CL_UpdateTEnts (void);
void CL_ClearState (void);
void CL_ReadPackets (void);
int CL_ReadFromServer (void);
void CL_WriteToServer (usercmd_t *cmd);
void CL_BaseMove (usercmd_t *cmd);
float CL_KeyState (kbutton_t *key);
char *Key_KeynumToString (int keynum);
#endif

58
include/cl_main.h Normal file
View file

@ -0,0 +1,58 @@
/*
client.h
Client definitions
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef _CL_MAIN_H
#define _CL_MAIN_H
#include "client.h"
#include "qtypes.h"
#include "render.h"
dlight_t *CL_AllocDlight (int key);
void CL_DecayLights (void);
void CL_Init (void);
void Host_WriteConfiguration (void);
void CL_EstablishConnection (char *host);
void CL_Disconnect (void);
void CL_Disconnect_f (void);
void CL_NextDemo (void);
qboolean CL_DemoBehind(void);
void CL_BeginServerConnect(void);
#define MAX_VISEDICTS 256
extern int cl_numvisedicts, cl_oldnumvisedicts;
extern entity_t *cl_visedicts, *cl_oldvisedicts;
extern entity_t cl_visedicts_list[2][MAX_VISEDICTS];
extern char emodel_name[], pmodel_name[], prespawn_name[], modellist_name[], soundlist_name[];
#endif // _CL_MAIN_H

46
include/cl_parse.h Normal file
View file

@ -0,0 +1,46 @@
/*
client.h
Client definitions
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef _CL_PARSE_H
#define _CL_PARSE_H
#include "qtypes.h"
#define NET_TIMINGS 256
#define NET_TIMINGSMASK 255
extern int packet_latency[NET_TIMINGS];
int CL_CalcNet (void);
void CL_ParseServerMessage (void);
void CL_NewTranslation (int slot);
qboolean CL_CheckOrDownloadFile (char *filename);
qboolean CL_IsUploading(void);
void CL_NextUpload(void);
void CL_StartUpload (byte *data, int size);
void CL_StopUpload(void);
#endif

40
include/cl_pred.h Normal file
View file

@ -0,0 +1,40 @@
/*
client.h
Client definitions
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef _CL_PRED_H
#define _CL_PRED_H
#include "qtypes.h"
#include "client.h"
void CL_Prediction_Init_Cvars (void);
void CL_PredictMove (void);
void CL_PredictUsercmd (player_state_t *from, player_state_t *to, usercmd_t *u, qboolean spectator);
#endif

35
include/cl_tent.h Normal file
View file

@ -0,0 +1,35 @@
/*
client.h
Client definitions
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef _CL_TENT_H
#define _CL_TENT_H
void CL_TEnts_Init (void);
void CL_ClearTEnts (void);
#endif

View file

@ -371,160 +371,6 @@ extern qboolean allowskybox;
//=============================================================================
//
// cl_main
//
dlight_t *CL_AllocDlight (int key);
void CL_DecayLights (void);
void CL_Init (void);
void Host_WriteConfiguration (void);
void CL_EstablishConnection (char *host);
void CL_Disconnect (void);
void CL_Disconnect_f (void);
void CL_NextDemo (void);
qboolean CL_DemoBehind(void);
void CL_BeginServerConnect(void);
#define MAX_VISEDICTS 256
extern int cl_numvisedicts, cl_oldnumvisedicts;
extern entity_t *cl_visedicts, *cl_oldvisedicts;
extern entity_t cl_visedicts_list[2][MAX_VISEDICTS];
extern char emodel_name[], pmodel_name[], prespawn_name[], modellist_name[], soundlist_name[];
//
// cl_input
//
typedef struct
{
int down[2]; // key nums holding it down
int state; // low bit is down state
} kbutton_t;
extern kbutton_t in_mlook, in_klook;
extern kbutton_t in_strafe;
extern kbutton_t in_speed;
void CL_InitInput (void);
void CL_ClearStates (void);
void CL_SendCmd (void);
void CL_SendMove (usercmd_t *cmd);
void CL_ParseTEnt (void);
void CL_UpdateTEnts (void);
void CL_ClearState (void);
void CL_ReadPackets (void);
int CL_ReadFromServer (void);
void CL_WriteToServer (usercmd_t *cmd);
void CL_BaseMove (usercmd_t *cmd);
float CL_KeyState (kbutton_t *key);
char *Key_KeynumToString (int keynum);
//
// cl_demo.c
//
void CL_StopPlayback (void);
qboolean CL_GetMessage (void);
void CL_WriteDemoCmd (usercmd_t *pcmd);
void CL_Stop_f (void);
void CL_Record_f (void);
void CL_ReRecord_f (void);
void CL_PlayDemo_f (void);
void CL_TimeDemo_f (void);
//
// cl_parse.c
//
#define NET_TIMINGS 256
#define NET_TIMINGSMASK 255
extern int packet_latency[NET_TIMINGS];
int CL_CalcNet (void);
void CL_ParseServerMessage (void);
void CL_NewTranslation (int slot);
qboolean CL_CheckOrDownloadFile (char *filename);
qboolean CL_IsUploading(void);
void CL_NextUpload(void);
void CL_StartUpload (byte *data, int size);
void CL_StopUpload(void);
//
// view.c
//
void V_StartPitchDrift (void);
void V_StopPitchDrift (void);
void V_RenderView (void);
void V_UpdatePalette (void);
void V_Register (void);
void V_ParseDamage (void);
void V_SetContentsColor (int contents);
void V_CalcBlend (void);
//
// cl_tent
//
void CL_InitTEnts (void);
void CL_ClearTEnts (void);
//
// cl_ents.c
//
void CL_SetSolidPlayers (int playernum);
void CL_SetUpPlayerPrediction(qboolean dopred);
void CL_EmitEntities (void);
void CL_ClearProjectiles (void);
void CL_ParseProjectiles (void);
void CL_ParsePacketEntities (qboolean delta);
void CL_SetSolidEntities (void);
void CL_ParsePlayerinfo (void);
//
// cl_pred.c
//
void CL_InitPrediction (void);
void CL_PredictMove (void);
void CL_PredictUsercmd (player_state_t *from, player_state_t *to, usercmd_t *u, qboolean spectator);
//
// cl_cam.c
//
#define CAM_NONE 0
#define CAM_TRACK 1
extern int autocam;
extern int spec_track; // player# of who we are tracking
qboolean Cam_DrawViewModel(void);
qboolean Cam_DrawPlayer(int playernum);
void Cam_Track(usercmd_t *cmd);
void Cam_FinishMove(usercmd_t *cmd);
void Cam_Reset(void);
void CL_InitCam(void);
void CL_ParseEntityLump(char *entdata);
//
// skin.c
//
void Skin_Find (player_info_t *sc);
byte *Skin_Cache (skin_t *skin);
void Skin_Skins_f (void);
void Skin_AllSkins_f (void);
void Skin_NextDownload (void);
#define RSSHOT_WIDTH 320
#define RSSHOT_HEIGHT 200
#endif // _CLIENT_H

View file

@ -60,6 +60,7 @@ void Con_DrawCharacter (int cx, int line, int num);
void Con_CheckResize (void);
void Con_Init (void);
void Con_Init_Cvars (void);
void Con_DrawConsole (int lines);
void Con_Print (char *txt);
void Con_Printf (char *fmt, ...) __attribute__((format(printf,1,2)));

View file

@ -46,6 +46,7 @@ extern Window x_win;
extern qboolean doShm;
extern int x_shmeventtype;
extern qboolean oktodraw;
extern cvar_t *vid_fullscreen;
qboolean x11_add_event (int event, void (*event_handler)(XEvent *));
qboolean x11_del_event (int event, void (*event_handler)(XEvent *));
@ -60,5 +61,6 @@ void x11_create_window (int, int);
void x11_grab_keyboard (void);
void x11_set_caption (char *);
void x11_force_view_port (void);
void x11_Init_Cvars (void);
#endif // __CONTEXT_X11_H__

View file

@ -170,6 +170,7 @@ void D_DrawZPoint (void);
void D_EnableBackBufferAccess (void);
void D_EndParticles (void);
void D_Init (void);
void D_Init_Cvars (void);
void D_ViewChanged (void);
void D_SetupFrame (void);
void D_StartParticles (void);

View file

@ -34,6 +34,7 @@
extern qpic_t *draw_disc; // also used on sbar
void Draw_Init (void);
void Draw_Init_Cvars (void);
void Draw_Character8 (int x, int y, int num);
void Draw_SubPic(int x, int y, qpic_t *pic, int srcx, int srcy, int width, int height);
void Draw_Pic (int x, int y, qpic_t *pic);

View file

@ -35,6 +35,7 @@
#define freelook (in_mlook.state&1 || cl_freelook->int_val)
void IN_Init (void);
void IN_Init_Cvars (void);
void IN_Shutdown (void);

View file

@ -71,6 +71,7 @@ void JOY_Move (usercmd_t *);
you have successfully enabled it.
*/
void JOY_Init (void);
void JOY_Init_Cvars (void);
/*
JOY_Shutdown ()

View file

@ -174,6 +174,7 @@ extern qboolean chat_team;
void Key_Event (int key, qboolean down);
void Key_Init (void);
void Key_Init_Cvars (void);
void Key_WriteBindings (QFile *f);
void Key_SetBinding (int keynum, char *binding);
void Key_ClearStates (void);

View file

@ -447,6 +447,7 @@ typedef struct model_s
//============================================================================
void Mod_Init (void);
void Mod_Init_Cvars (void);
void Mod_ClearAll (void);
model_t *Mod_ForName (char *name, qboolean crash);
void *Mod_Extradata (model_t *mod); // handles caching

View file

@ -50,6 +50,7 @@ extern cvar_t *hostname;
extern int net_socket;
void NET_Init (int port);
void NET_Init (int port);
void NET_Shutdown (void);
qboolean NET_GetPacket (void);
@ -115,6 +116,7 @@ typedef struct
extern int net_drop; // packets dropped before this one
void Netchan_Init (void);
void Netchan_Init_Cvars (void);
void Netchan_Transmit (netchan_t *chan, int length, byte *data);
void Netchan_OutOfBand (netadr_t adr, int length, byte *data);
void Netchan_OutOfBandPrint (netadr_t adr, char *format, ...) __attribute__((format(printf,2,3)));

View file

@ -109,6 +109,7 @@ extern int watertype;
void PlayerMove (void);
void Pmove_Init (void);
void Pmove_Init_Cvars (void);
int PM_HullPointContents (hull_t *hull, int num, vec3_t p);

View file

@ -41,6 +41,7 @@ int COM_CheckParm (char *parm);
void COM_AddParm (char *parm);
void COM_Init (void);
void COM_Init_Cvars (void);
void COM_InitArgv (int argc, char **argv);
#endif // _QARGS_H

View file

@ -64,7 +64,8 @@ byte *COM_LoadHunkFile (char *path);
void COM_LoadCacheFile (char *path, struct cache_user_s *cu);
void COM_CreatePath (char *path);
void COM_Gamedir (char *dir);
void COM_InitFilesystem (void);
void COM_Filesystem_Init (void);
void COM_Filesystem_Init_Cvars (void);
void COM_Path_f (void);
void COM_Maplist_f (void);

View file

@ -33,7 +33,7 @@
void R_RocketTrail (vec3_t start, vec3_t end, int type, entity_t *ent);
void R_RunParticleEffect (vec3_t org, int color, int count);
void R_RunPuffEffect (vec3_t org, int type, int count);
void R_RunPuffEffect (vec3_t org, byte type, byte count);
void R_RunSpikeEffect (vec3_t org, byte type);
void R_BlobExplosion (vec3_t org);

View file

@ -125,7 +125,8 @@ extern struct texture_s *r_notexture_mip;
extern entity_t r_worldentity;
void R_Init (void);
void R_InitTextures (void);
void R_Init_Cvars (void);
void R_Textures_Init (void);
void R_InitEfrags (void);
void R_RenderView (void); // must set r_refdef first
void R_ViewChanged (vrect_t *pvrect, int lineadj, float aspect);

View file

@ -32,7 +32,7 @@
#include "cvar.h"
void SCR_InitCvars (void);
void SCR_Init_Cvars (void);
void SCR_Init (void);
void SCR_UpdateScreen (void);

43
include/skin.h Normal file
View file

@ -0,0 +1,43 @@
/*
client.h
Client definitions
Copyright (C) 1996-1997 Id Software, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to:
Free Software Foundation, Inc.
59 Temple Place - Suite 330
Boston, MA 02111-1307, USA
$Id$
*/
#ifndef _SKIN_H
#define _SKIN_H
#include "client.h"
void Skin_Find (player_info_t *sc);
byte *Skin_Cache (skin_t *skin);
void Skin_Skins_f (void);
void Skin_AllSkins_f (void);
void Skin_NextDownload (void);
#define RSSHOT_WIDTH 320
#define RSSHOT_HEIGHT 200
#endif

View file

@ -99,6 +99,7 @@ typedef struct
} wavinfo_t;
void S_Init (void);
void S_Init_Cvars (void);
void S_Startup (void);
void S_Shutdown (void);
void S_StartSound (int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation);

View file

@ -33,8 +33,7 @@ extern cvar_t *cl_gibfilter;
extern cvar_t *cl_parsesay;
extern cvar_t *cl_nofake;
// FIXME: prefix these with TP_ or Team_ ?
void Team_InitTeamplay (void);
void Team_Init_Cvars (void);
void Team_BestWeaponImpulse (void);
void Team_Dead (void);
void Team_NewMap (void);

View file

@ -71,7 +71,7 @@ void VID_SetPalette (unsigned char *palette);
// called for bonus and pain flashes, and for underwater color changes
void VID_ShiftPalette (unsigned char *palette);
void VID_InitCvars (void);
void VID_Init_Cvars (void);
// Called at startup to set up translation tables, takes 256 8 bit RGB values
// the palette data will go away after the call, so it must be copied off if

View file

@ -37,8 +37,18 @@ extern cvar_t *brightness;
extern cvar_t *contrast;
void V_Init (void);
void V_Init_Cvars (void);
void V_RenderView (void);
float V_CalcRoll (vec3_t angles, vec3_t velocity);
void V_UpdatePalette (void);
void V_StartPitchDrift (void);
void V_StopPitchDrift (void);
void V_RenderView (void);
void V_UpdatePalette (void);
void V_Register (void);
void V_ParseDamage (void);
void V_SetContentsColor (int contents);
void V_CalcBlend (void);
#endif // _VIEW_H

View file

@ -50,6 +50,7 @@
#include "sbar.h"
#include "console.h"
#include "commdef.h"
#include "cl_cam.h"
#define PM_SPECTATORMAXSPEED 500
#define PM_STOPSPEED 100
@ -586,7 +587,7 @@ void Cam_Reset(void)
spec_track = 0;
}
void CL_InitCam(void)
void CL_Cam_Init_Cvars(void)
{
cl_hightrack = Cvar_Get("cl_hightrack", "0", CVAR_NONE, "None");
cl_chasecam = Cvar_Get("cl_chasecam", "0", CVAR_NONE, "None");

View file

@ -42,6 +42,7 @@
#include "quakefs.h"
#include "quakedef.h"
#include "pmove.h"
#include "cl_main.h"
void CL_FinishTimeDemo (void);

View file

@ -45,6 +45,11 @@
#include "view.h"
#include "teamplay.h"
#include "r_dynamic.h"
#include "cl_cam.h"
#include "cl_pred.h"
#include "cl_main.h"
#include "cl_ents.h"
#include "cl_input.h"
extern cvar_t *cl_predict_players;
extern cvar_t *cl_predict_players2;

View file

@ -47,6 +47,10 @@
#include "checksum.h"
#include "keys.h"
#include "teamplay.h"
#include "cl_cam.h"
#include "cl_demo.h"
#include "cl_parse.h"
#include "cl_input.h"
cvar_t *cl_nodelta;
@ -525,7 +529,7 @@ void CL_SendCmd (void)
CL_InitInput
============
*/
void CL_InitInput (void)
void CL_Input_Init (void)
{
Cmd_AddCommand ("+moveup",IN_UpDown);
Cmd_AddCommand ("-moveup",IN_UpUp);
@ -562,7 +566,10 @@ void CL_InitInput (void)
Cmd_AddCommand ("-klook", IN_KLookUp);
Cmd_AddCommand ("+mlook", IN_MLookDown);
Cmd_AddCommand ("-mlook", IN_MLookUp);
}
void CL_Input_Init_Cvars (void)
{
cl_nodelta = Cvar_Get("cl_nodelta", "0", CVAR_NONE, "None");
}

View file

@ -60,6 +60,15 @@
#include "qargs.h"
#include "cdaudio.h"
#include "teamplay.h"
#include "cl_cam.h"
#include "cl_main.h"
#include "cl_demo.h"
#include "cl_input.h"
#include "cl_ents.h"
#include "skin.h"
#include "cl_parse.h"
#include "cl_tent.h"
#include "cl_pred.h"
#ifdef __sun
/* Sun's model_t in sys/model.h conflicts w/ Quake's model_t */
@ -1173,10 +1182,7 @@ void CL_Init (void)
Info_SetValueForStarKey (cls.userinfo, "*ver", st, MAX_INFO_STRING);
Info_SetValueForStarKey (cls.userinfo, "stdver", QSG_VERSION, MAX_INFO_STRING);
CL_InitInput ();
CL_InitTEnts ();
CL_InitPrediction ();
CL_InitCam ();
CL_Input_Init ();
Pmove_Init ();
Qexpand_squiggle(fs_userpath->string, e_path);
@ -1243,7 +1249,7 @@ void CL_Init (void)
}
void CL_InitCvars (void)
void CL_Init_Cvars (void)
{
extern cvar_t *baseskin;
extern cvar_t *noskins;
@ -1575,8 +1581,6 @@ Host_Init
*/
void Host_Init (quakeparms_t *parms)
{
COM_InitArgv (parms->argc, parms->argv);
if (COM_CheckParm ("-minmemory"))
parms->memsize = MINIMUM_MEMORY;
@ -1589,11 +1593,9 @@ void Host_Init (quakeparms_t *parms)
Memory_Init (parms->membase, parms->memsize);
Cvar_Init ();
Sys_Init();
CL_InitCvars ();
Cbuf_Init ();
Cmd_Init ();
cl_Cmd_Init ();
// execute +set as early as possible
Cmd_StuffCmds_f ();
@ -1608,19 +1610,34 @@ void Host_Init (quakeparms_t *parms)
Cmd_Exec_File (fs_globalcfg->string);
Cbuf_Execute_Sets ();
//Cmd_StuffCmds_f ();
//Cbuf_Execute_Sets ();
CL_Cam_Init_Cvars ();
CL_Input_Init_Cvars ();
CL_Init_Cvars ();
CL_Prediction_Init_Cvars ();
COM_Init_Cvars ();
Con_Init_Cvars ();
Draw_Init_Cvars ();
COM_Filesystem_Init_Cvars ();
IN_Init_Cvars ();
Key_Init_Cvars ();
Mod_Init_Cvars ();
Netchan_Init_Cvars ();
Pmove_Init_Cvars ();
R_Init_Cvars ();
S_Init_Cvars ();
SCR_Init_Cvars ();
Team_Init_Cvars ();
V_Init_Cvars ();
VID_Init_Cvars ();
// Reparse the command line for + commands.
// (Note, no non-base commands exist yet)
Cmd_StuffCmds_f ();
Cbuf_Execute ();
cl_Cmd_Init ();
V_Init ();
SCR_InitCvars ();
VID_InitCvars ();
COM_Init ();
Team_InitTeamplay ();
// reparse the command line for + commands other than set
// (sets still done, but it doesn't matter)
//Cmd_StuffCmds_f ();
//Cbuf_Execute ();
NET_Init (PORT_CLIENT);
Netchan_Init ();
@ -1634,7 +1651,7 @@ void Host_Init (quakeparms_t *parms)
// Con_Printf ("Exe: "__TIME__" "__DATE__"\n");
Con_Printf ("%4.1f megs RAM used.\n",parms->memsize/ (1024*1024.0));
R_InitTextures ();
R_Textures_Init ();
host_basepal = (byte *)COM_LoadHunkFile ("gfx/palette.lmp");
if (!host_basepal)

View file

@ -42,6 +42,13 @@
#include "pmove.h"
#include "sbar.h"
#include "teamplay.h"
#include "cl_parse.h"
#include "cl_main.h"
#include "skin.h"
#include "cl_ents.h"
#include "cl_input.h"
#include "view.h"
#ifdef HAVE_STRINGS_H
#include <strings.h>
#endif

View file

@ -35,6 +35,7 @@
#include "bothdefs.h"
#include "console.h"
#include "commdef.h"
#include "cl_ents.h"
#ifdef _WIN32
#include "winquake.h"
@ -233,10 +234,10 @@ void CL_PredictMove (void)
/*
==============
CL_InitPrediction
CL_Prediction_Init_Cvars
==============
*/
void CL_InitPrediction (void)
void CL_Prediction_Init_Cvars (void)
{
cl_pushlatency = Cvar_Get("pushlatency", "-999", CVAR_NONE, "None");
cl_nopred = Cvar_Get("cl_nopred", "0", CVAR_NONE, "None");

View file

@ -38,6 +38,7 @@
#include "msg.h"
#include "console.h"
#include "r_dynamic.h"
#include "cl_main.h"
#include <math.h>
#include <stdlib.h>
@ -80,7 +81,7 @@ sfx_t *cl_sfx_r_exp3;
CL_ParseTEnts
=================
*/
void CL_InitTEnts (void)
void CL_TEnts_Init (void)
{
cl_sfx_wizhit = S_PrecacheSound ("wizard/hit.wav");
cl_sfx_knighthit = S_PrecacheSound ("hknight/hit.wav");

View file

@ -402,7 +402,8 @@ void Cmd_Exec_f (void)
Con_Printf ("couldn't exec %s\n",Cmd_Argv(1));
return;
}
if (!Cvar_Command () && (cl_warncmd->int_val || developer->int_val))
if (!Cvar_Command () && ((cl_warncmd && cl_warncmd->int_val)
|| (developer && developer->int_val)))
Con_Printf ("execing %s\n",Cmd_Argv(1));
Cbuf_InsertText (f);

View file

@ -46,7 +46,6 @@ int static_registered = 1; // only for startup check, then set
qboolean msg_suppress_1 = 0;
void COM_InitFilesystem (void);
void COM_Path_f (void);
@ -106,9 +105,13 @@ void COM_Init (void)
LittleFloat = FloatSwap;
#endif
registered = Cvar_Get("registered", "0", CVAR_NONE, "None");
Cmd_AddCommand ("path", COM_Path_f);
COM_InitFilesystem ();
COM_Filesystem_Init ();
COM_CheckRegistered ();
}
void COM_Init_Cvars (void)
{
registered = Cvar_Get("registered", "0", CVAR_NONE, "None");
}

View file

@ -269,8 +269,6 @@ void Con_Init (void)
//
// register our commands
//
con_notifytime = Cvar_Get("con_notifytime", "3", CVAR_NONE, "None");
Cmd_AddCommand ("toggleconsole", Con_ToggleConsole_f);
Cmd_AddCommand ("togglechat", Con_ToggleChat_f);
Cmd_AddCommand ("messagemode", Con_MessageMode_f);
@ -279,6 +277,11 @@ void Con_Init (void)
con_initialized = true;
}
void Con_Init_Cvars (void)
{
con_notifytime = Cvar_Get("con_notifytime", "3", CVAR_NONE, "None");
}
/*
===============

View file

@ -245,8 +245,6 @@ x11_set_vidmode(int width, int height)
int i;
int best_mode = 0, best_x = INT_MAX, best_y = INT_MAX;
vid_fullscreen = Cvar_Get ("vid_fullscreen","0",0,"Toggles fullscreen game mode");
XGetScreenSaver (x_disp, &xss_timeout, &xss_interval, &xss_blanking,
&xss_exposures);
XSetScreenSaver (x_disp, 0, xss_interval, xss_blanking,
@ -269,12 +267,6 @@ x11_set_vidmode(int width, int height)
return;
}
if (vid_fullscreen->int_val)
_windowed_mouse = Cvar_Get ("_windowed_mouse","1",CVAR_ARCHIVE|CVAR_ROM,"None");
else
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE,"None");
XF86VidModeGetAllModeLines(x_disp, x_screen, &nummodes, &vidmodes);
if (vid_fullscreen->int_val) {
@ -296,6 +288,13 @@ x11_set_vidmode(int width, int height)
#endif
}
void
x11_Init_Cvars ()
{
vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ARCHIVE,
"Toggles fullscreen game mode");
}
void
x11_create_window (int width, int height)
{

View file

@ -57,13 +57,8 @@ D_Init
*/
void D_Init (void)
{
r_skydirect = 1;
d_subdiv16 = Cvar_Get("d_subdiv16", "1", CVAR_NONE, "None");
d_mipcap = Cvar_Get("d_mipcap", "0", CVAR_NONE, "None");
d_mipscale = Cvar_Get("d_mipscale", "1", CVAR_NONE, "None");
r_drawpolys = false;
r_worldpolysbacktofront = false;
r_recursiveaffinetriangles = true;
@ -71,6 +66,12 @@ void D_Init (void)
r_aliasuvscale = 1.0;
}
void D_Init_Cvars (void)
{
d_subdiv16 = Cvar_Get("d_subdiv16", "1", CVAR_NONE, "None");
d_mipcap = Cvar_Get("d_mipcap", "0", CVAR_NONE, "None");
d_mipscale = Cvar_Get("d_mipscale", "1", CVAR_NONE, "None");
}
/*
===============

View file

@ -150,6 +150,9 @@ void Draw_Init (void)
cl_verstring = Cvar_Get("cl_verstring", PROGRAM " " VERSION, CVAR_NONE, "None");
}
void Draw_Init_Cvars (void)
{
}
/*

View file

@ -61,7 +61,7 @@ static int GL_LoadPicTexture (qpic_t *pic);
extern byte *host_basepal;
extern unsigned char d_15to8table[65536];
extern cvar_t *crosshair, *cl_crossx, *cl_crossy, *crosshaircolor;
extern cvar_t *crosshair, *cl_crossx, *cl_crossy, *crosshaircolor, *gl_colorlights;
cvar_t *gl_max_size;
cvar_t *gl_picmip;
@ -399,25 +399,6 @@ void Draw_Init (void)
{
int i;
// LordHavoc: lighting mode
gl_lightmode = Cvar_Get("gl_lightmode", "1", CVAR_ARCHIVE,
"Lighting mode (0 = GLQuake style, 1 = new style)");
gl_max_size = Cvar_Get("gl_max_size", "1024", CVAR_NONE,
"None"); // CVAR_FIXME - set a description
gl_picmip = Cvar_Get("gl_picmip", "0", CVAR_NONE,
"None"); // CVAR_FIXME - set a description
// Console effects --KB
gl_constretch = Cvar_Get ("gl_constretch", "0", CVAR_ARCHIVE,
"whether slide the console or stretch it");
gl_conalpha = Cvar_Get ("gl_conalpha", "0.6", CVAR_ARCHIVE,
"alpha value for the console background");
gl_conspin = Cvar_Get ("gl_conspin", "0", CVAR_ARCHIVE,
"speed at which the console spins");
cl_verstring = Cvar_Get("cl_verstring", PROGRAM " " VERSION, CVAR_NONE,
"client version string");
// 3dfx can only handle 256 wide textures
if (!strncasecmp ((char *)gl_renderer, "3dfx",4) ||
!strncasecmp ((char *)gl_renderer, "Mesa",4))
@ -472,6 +453,30 @@ void Draw_Init (void)
glrsurf_init();
}
void Draw_Init_Cvars (void)
{
// LordHavoc: lighting mode
gl_lightmode = Cvar_Get("gl_lightmode", "1", CVAR_ARCHIVE,
"Lighting mode (0 = GLQuake style, 1 = new style)");
gl_max_size = Cvar_Get("gl_max_size", "1024", CVAR_NONE,
"None"); // CVAR_FIXME - set a description
gl_picmip = Cvar_Get("gl_picmip", "0", CVAR_NONE,
"None"); // CVAR_FIXME - set a description
gl_colorlights = Cvar_Get ("gl_colorlights", "1", CVAR_ROM,
"Whether to use RGB lightmaps or not");
// Console effects --KB
gl_constretch = Cvar_Get ("gl_constretch", "0", CVAR_ARCHIVE,
"whether slide the console or stretch it");
gl_conalpha = Cvar_Get ("gl_conalpha", "0.6", CVAR_ARCHIVE,
"alpha value for the console background");
gl_conspin = Cvar_Get ("gl_conspin", "0", CVAR_ARCHIVE,
"speed at which the console spins");
cl_verstring = Cvar_Get("cl_verstring", PROGRAM " " VERSION, CVAR_NONE,
"client version string");
}
/*

View file

@ -32,6 +32,7 @@
#include "cmd.h"
#include "console.h"
#include "glquake.h"
#include "cl_main.h"
#include <stdlib.h>

View file

@ -283,7 +283,7 @@ R_RunPuffEffect
===============
*/
void R_RunPuffEffect (vec3_t org, int type, int count)
void R_RunPuffEffect (vec3_t org, byte type, byte count)
{
if (!gl_particles->int_val)
return;

View file

@ -52,6 +52,7 @@
#include "model.h" // needed by: glquake.h
#include "console.h"
#include "glquake.h"
#include "cl_parse.h"
extern byte *draw_chars; // 8*8 graphic characters

View file

@ -54,6 +54,7 @@
#include "glquake.h"
#include "quakefs.h"
#include "quakedef.h"
#include "cl_main.h"
mnode_t *r_pefragtopnode;

View file

@ -44,7 +44,11 @@
#include "render.h"
#include "sys.h"
#include "r_dynamic.h"
#include "va.h"
#include "skin.h"
#include "cl_main.h"
#include "cl_cam.h"
#include "view.h"
entity_t r_worldentity;
@ -114,13 +118,10 @@ cvar_t *gl_particles;
cvar_t *r_skyname;
cvar_t *gl_skymultipass;
cvar_t *gl_sky_clip;
cvar_t *gl_fb_models;
cvar_t *gl_fb_bmodels;
cvar_t *brighten;
extern cvar_t *scr_fov;
extern byte gammatable[256];
@ -143,15 +144,12 @@ GL_CheckBrightness (unsigned char *pal)
int i, inf;
float brightness;
brighten = Cvar_Get ("brighten", "1", CVAR_ROM,
"Palette hack equivalent to brightness");
if ((i = COM_CheckParm ("-brighten"))) {
brightness = atof (com_argv[i + 1]);
} else {
brightness = brighten->value;
}
brightness = bound (1, brightness, 5);
Cvar_SetROM (brighten, va("%f", brightness));
} else {
brightness = 1.0;
}
// Build gamma table
if (brightness == 1.0) { // screw the math
@ -954,7 +952,7 @@ void R_RenderView (void)
R_Clear ();
// render normal view
R_SetupFrame ();
R_SetupFrame (); // Setup stuff for frame.
R_SetFrustum ();

View file

@ -55,6 +55,7 @@
#include "console.h"
#include "glquake.h"
#include "r_dynamic.h"
#include "skin.h"
qboolean VID_Is8bit(void);
void R_InitBubble();
@ -65,10 +66,10 @@ qboolean allowskybox; // allow skyboxes? --KB
/*
==================
R_InitTextures
R_Textures_Init
==================
*/
void R_InitTextures (void)
void R_Textures_Init (void)
{
int x,y, m;
byte *dest;
@ -194,6 +195,19 @@ void R_Init (void)
Cmd_AddCommand ("r_firecolor", R_FireColor_f);
R_InitBubble();
R_InitParticles ();
netgraphtexture = texture_extension_number;
texture_extension_number++;
playertextures = texture_extension_number;
texture_extension_number += MAX_CLIENTS;
}
void R_Init_Cvars (void)
{
r_norefresh = Cvar_Get("r_norefresh", "0", CVAR_NONE, "None");
r_drawentities = Cvar_Get("r_drawentities", "1", CVAR_NONE, "None");
r_drawviewmodel = Cvar_Get("r_drawviewmodel", "1", CVAR_NONE, "None");
@ -208,9 +222,6 @@ void R_Init (void)
gl_clear = Cvar_Get("gl_clear", "0", CVAR_NONE, "None");
gl_texsort = Cvar_Get("gl_texsort", "1", CVAR_NONE, "None");
// if (gl_mtexable)
// Cvar_SetValue(gl_texsort, 0);
gl_cull = Cvar_Get("gl_cull", "1", CVAR_NONE, "None");
gl_smooth = Cvar_Get("gl_smooth", "1", CVAR_NONE, "None");
gl_smoothdlights = Cvar_Get("gl_smoothdlights", "1", CVAR_NONE, "None");
@ -238,15 +249,6 @@ void R_Init (void)
gl_skymultipass = Cvar_Get("gl_skymultipass", "1", CVAR_NONE,
"controls wether the skydome is single or double pass");
R_InitBubble();
R_InitParticles ();
netgraphtexture = texture_extension_number;
texture_extension_number++;
playertextures = texture_extension_number;
texture_extension_number += MAX_CLIENTS;
}
/*

View file

@ -1255,9 +1255,6 @@ void GL_BuildLightmaps (void)
texture_extension_number += MAX_LIGHTMAPS;
}
gl_colorlights = Cvar_Get ("gl_colorlights", "1", CVAR_ROM,
"Whether to use RGB lightmaps or not");
if (gl_colorlights->int_val)
{
gl_lightmap_format = GL_RGB;

View file

@ -43,6 +43,9 @@
#include "qendian.h"
#include "sbar.h"
#include "sys.h"
#include "cl_parse.h"
#include "skin.h"
#include "view.h"
/*
@ -384,7 +387,7 @@ void SCR_SizeDown_f (void)
SCR_Init
==================
*/
void SCR_InitCvars (void)
void SCR_Init_Cvars (void)
{
scr_fov = Cvar_Get("fov", "90", CVAR_NONE, "None");
scr_viewsize = Cvar_Get("viewsize", "100", CVAR_ARCHIVE, "None");

View file

@ -35,6 +35,10 @@ void IN_Init (void)
{
}
void IN_Init_Cvars (void)
{
}
void IN_Shutdown (void)
{
}

View file

@ -248,9 +248,6 @@ IN_Init (void)
{
JOY_Init ();
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE,"None");
// m_filter = Cvar_Get ("m_filter", "0", CVAR_ARCHIVE, "None");
if ( COM_CheckParm("-nomouse") && !_windowed_mouse->value)
return;
@ -261,6 +258,15 @@ IN_Init (void)
// FIXME: disable DGA if in_dgamouse says to.
}
void
IN_Init_Cvars (void)
{
JOY_Init_Cvars ();
_windowed_mouse = Cvar_Get ("_windowed_mouse","0",CVAR_ARCHIVE,"None");
// m_filter = Cvar_Get ("m_filter", "0", CVAR_ARCHIVE, "None");
}
void
IN_Shutdown (void)
{

View file

@ -120,6 +120,13 @@ IN_Init (void)
return;
}
void
IN_Init_Cvars (void)
{
JOY_Init_Cvars();
m_filter = Cvar_Get ("m_filter","0",0,"None");
}
static void
IN_init_kb (void)
{
@ -248,7 +255,6 @@ IN_init_mouse()
char *mousedev;
int mouserate = MOUSE_DEFAULTSAMPLERATE;
m_filter = Cvar_Get ("m_filter","0",0,"None");
Cmd_AddCommand("force_centerview", Force_CenterView_f);
mouse_buttons = 3;

View file

@ -504,6 +504,17 @@ IN_Init
===========
*/
void IN_Init (void)
{
Cmd_AddCommand ("force_centerview", Force_CenterView_f);
Cmd_AddCommand ("joyadvancedupdate", Joy_AdvancedUpdate_f);
uiWheelMessage = RegisterWindowMessage ( "MSWHEEL_ROLLMSG" );
IN_StartupMouse ();
IN_StartupJoystick ();
}
void IN_Init_Cvars (void)
{
// mouse variables
m_filter = Cvar_Get("m_filter", "0", CVAR_NONE, "None");
@ -528,14 +539,6 @@ void IN_Init (void)
joy_yawsensitivity = Cvar_Get("joyyawsensitivity", "-1.0", CVAR_NONE, "None");
joy_wwhack1 = Cvar_Get("joywwhack1", "0.0", CVAR_NONE, "None");
joy_wwhack2 = Cvar_Get("joywwhack2", "0.0", CVAR_NONE, "None");
Cmd_AddCommand ("force_centerview", Force_CenterView_f);
Cmd_AddCommand ("joyadvancedupdate", Joy_AdvancedUpdate_f);
uiWheelMessage = RegisterWindowMessage ( "MSWHEEL_ROLLMSG" );
IN_StartupMouse ();
IN_StartupJoystick ();
}
/*

View file

@ -70,6 +70,9 @@
#include "input.h"
#include "joystick.h"
#include "qargs.h"
#include "cl_input.h"
#include "view.h"
cvar_t *_windowed_mouse;
cvar_t *m_filter;
@ -276,9 +279,7 @@ event_motion (XEvent *event)
Con_Printf("event->xmotion.x: %d\n", event->xmotion.x);
Con_Printf("event->xmotion.y: %d\n", event->xmotion.y);
}
//printf("_windowed_mouse: %f\n", _windowed_mouse->int_val);
//printf("CurrentTime: %ld\n", CurrentTime);
if (_windowed_mouse->int_val) {
if (vid_fullscreen->int_val || _windowed_mouse->int_val) {
if (!event->xmotion.send_event) {
mouse_x += (event->xmotion.x - p_mouse_x);
mouse_y += (event->xmotion.y - p_mouse_y);
@ -300,21 +301,18 @@ event_motion (XEvent *event)
void
IN_Commands (void)
{
static int old_windowed_mouse;
static int old_in_dga;
static int old_windowed, windowed;
JOY_Command ();
if ((old_windowed_mouse != _windowed_mouse->int_val)
|| (old_in_dga != in_dga->int_val)) {
old_windowed_mouse = _windowed_mouse->int_val;
windowed = _windowed_mouse->int_val || vid_fullscreen->int_val || in_dga->int_val;
if (_windowed_mouse->int_val) { // grab the pointer
if (old_windowed != windowed) {
old_windowed = windowed;
if (windowed) { // grab the pointer
XGrabPointer (x_disp, x_win, True, MOUSE_MASK, GrabModeAsync,
GrabModeAsync, x_win, None, CurrentTime);
/* forcing viewport every frame is a hideous slowdown.
x11_force_view_port();
*/
#ifdef HAVE_DGA
if (dga_avail && in_dga->int_val && !dga_active) {
XF86DGADirectVideo (x_disp, DefaultScreen (x_disp),
@ -427,12 +425,6 @@ IN_Init (void)
JOY_Init ();
_windowed_mouse = Cvar_Get ("_windowed_mouse", "0", CVAR_ARCHIVE, "None");
m_filter = Cvar_Get ("m_filter", "0", CVAR_ARCHIVE, "None");
in_dga = Cvar_Get ("in_dga", "1", CVAR_ARCHIVE, "DGA Input support");
in_dga_mouseaccel = Cvar_Get ("in_dga_mouseaccel", "1", CVAR_ARCHIVE,
"None");
XAutoRepeatOff (x_disp);
if (COM_CheckParm("-nomouse"))
@ -451,3 +443,14 @@ IN_Init (void)
return;
}
void
IN_Init_Cvars (void)
{
JOY_Init_Cvars ();
_windowed_mouse = Cvar_Get ("_windowed_mouse", "0", CVAR_ARCHIVE, "None");
m_filter = Cvar_Get ("m_filter", "0", CVAR_ARCHIVE, "None");
in_dga = Cvar_Get ("in_dga", "1", CVAR_ARCHIVE, "DGA Input support");
in_dga_mouseaccel = Cvar_Get ("in_dga_mouseaccel", "1", CVAR_ARCHIVE,
"None");
}

View file

@ -40,6 +40,7 @@
#include "cvar.h"
#include "keys.h"
#include "protocol.h"
#include "view.h"
#define JOY_MAX_AXES 6
#define JOY_MAX_BUTTONS 10
@ -148,10 +149,6 @@ JOY_Move (usercmd_t *cmd)
void
JOY_Init (void)
{
joy_device = Cvar_Get ("joy_device", "/dev/js0", CVAR_NONE|CVAR_ROM, "Joystick device");
joy_enable = Cvar_Get ("joy_enable", "1", CVAR_NONE|CVAR_ARCHIVE, "Joystick enable flag");
joy_sensitivity = Cvar_Get ("joy_sensitivity", "1", CVAR_NONE|CVAR_ARCHIVE, "Joystick sensitivity");
// Open joystick device
joy_handle = open (joy_device->string, O_RDONLY|O_NONBLOCK);
if (joy_handle < 0) {
@ -168,11 +165,6 @@ JOY_Init (void)
}
} else {
// Initialize joystick if found and enabled
for (i = 0; i < JOY_MAX_AXES; i++) {
joy_axes[i].axis = Cvar_Get (joy_axes[i].var.name,
joy_axes[i].var.string,
CVAR_ARCHIVE, "None");
}
for (i = 0; i < JOY_MAX_BUTTONS; i++) {
joy_buttons[i].old = 0;
joy_buttons[i].current = 0;
@ -183,6 +175,22 @@ JOY_Init (void)
}
}
void
JOY_Init_Cvars (void)
{
int i;
joy_device = Cvar_Get ("joy_device", "/dev/js0", CVAR_NONE|CVAR_ROM, "Joystick device");
joy_enable = Cvar_Get ("joy_enable", "1", CVAR_NONE|CVAR_ARCHIVE, "Joystick enable flag");
joy_sensitivity = Cvar_Get ("joy_sensitivity", "1", CVAR_NONE|CVAR_ARCHIVE, "Joystick sensitivity");
for (i = 0; i < JOY_MAX_AXES; i++) {
joy_axes[i].axis = Cvar_Get (joy_axes[i].var.name,
joy_axes[i].var.string,
CVAR_ARCHIVE, "None");
}
}
void
JOY_Shutdown (void)
{

View file

@ -55,12 +55,16 @@ JOY_Move (usercmd_t *cmd)
void
JOY_Init (void)
{
Con_DPrintf ("This system does not have joystick support.\n");
}
void
JOY_Init_Cvars (void)
{
joy_device = Cvar_Get ("joy_device", "none", CVAR_NONE|CVAR_ROM, "Joystick device");
joy_enable = Cvar_Get ("joy_enable", "1", CVAR_NONE|CVAR_ARCHIVE, "Joystick enable flag");
joy_sensitivity = Cvar_Get ("joy_sensitivity", "1", CVAR_NONE|CVAR_ARCHIVE, "Joystick sensitivity");
Con_DPrintf ("This system does not have joystick support.\n");
}
void

View file

@ -760,7 +760,11 @@ Key_Init ( void )
Cmd_AddCommand ("bind", Key_Bind_f);
Cmd_AddCommand ("unbind", Key_Unbind_f);
Cmd_AddCommand ("unbindall", Key_Unbindall_f);
}
void
Key_Init_Cvars ( void )
{
cl_chatmode = Cvar_Get ("cl_chatmode", "2", 0,
"Controls when console text will be treated as a chat message\n"
"0 - never, 1 - always, 2 - smart");

View file

@ -46,6 +46,8 @@
#include "console.h"
#include "input.h"
#include "view.h"
#include "cl_main.h"
#include "cl_input.h"
void (*vid_menudrawfn)(void);
void (*vid_menukeyfn)(int key);

View file

@ -70,10 +70,14 @@ Mod_Init
*/
void Mod_Init (void)
{
gl_subdivide_size = Cvar_Get("gl_subdivide_size", "128", CVAR_ARCHIVE, "None");
memset (mod_novis, 0xff, sizeof(mod_novis));
}
void Mod_Init_Cvars (void)
{
gl_subdivide_size = Cvar_Get("gl_subdivide_size", "128", CVAR_ARCHIVE, "None");
}
/*
===================
Mod_ClearAll

View file

@ -48,6 +48,7 @@
#include "crc.h"
#include "server.h"
#include "msg.h"
#include "cl_main.h"
extern char loadname[];
extern model_t *loadmodel;

View file

@ -124,10 +124,14 @@ void Netchan_Init (void)
port = ((int)(getpid()+getuid()*1000) * time(NULL)) & 0xffff;
#endif
Cvar_SetValue (qport, port);
}
void Netchan_Init_Cvars (void)
{
showpackets = Cvar_Get("showpackets", "0", CVAR_NONE, "None");
showdrop = Cvar_Get("showdrop", "0", CVAR_NONE, "None");
qport = Cvar_Get("qport", "0", CVAR_NONE, "None");
Cvar_SetValue (qport, port);
}
/*

View file

@ -69,6 +69,10 @@ void PM_CategorizePosition (void);
void Pmove_Init (void)
{
PM_InitBoxHull ();
}
void Pmove_Init_Cvars (void)
{
no_pogo_stick = Cvar_Get ("no_pogo_stick", "0", CVAR_SERVERINFO,
"disable the ability to pogo stick");
}

View file

@ -886,8 +886,7 @@ char *ED_ParseEdict (char *data, edict_t *ent)
{
Info_SetValueForKey (svs.info, "skybox",
"1", MAX_SERVERINFO_STRING);
r_skyname = Cvar_Get ("r_skyname", com_token,
CVAR_NONE, "name of skybox");
Cvar_Set(r_skyname, com_token);
continue;
}
@ -1117,6 +1116,11 @@ void PR_Init (void)
Cmd_AddCommand ("profile", PR_Profile_f);
}
void PR_Init_Cvars (void)
{
r_skyname = Cvar_Get ("r_skyname", com_token, CVAR_NONE, "name of skybox");
}
edict_t *EDICT_NUM(int n)

View file

@ -1017,16 +1017,10 @@ COM_CreateGameDirectory (char *gamename)
COM_InitFilesystem
*/
void
COM_InitFilesystem ( void )
COM_Filesystem_Init ( void )
{
int i;
fs_sharepath = Cvar_Get ("fs_sharepath", FS_SHAREPATH, CVAR_ROM,
"location of shared (read only) game directories");
fs_userpath = Cvar_Get ("fs_userpath", FS_USERPATH, CVAR_ROM,
"location of your game directories");
fs_basegame = Cvar_Get ("fs_basegame", BASEGAME, CVAR_ROM,
"game to use by default");
Cmd_AddCommand ("gamedir", COM_Gamedir_f);
/*
@ -1056,6 +1050,17 @@ COM_InitFilesystem ( void )
com_base_searchpaths = com_searchpaths;
}
void
COM_Filesystem_Init_Cvars ( void )
{
fs_sharepath = Cvar_Get ("fs_sharepath", FS_SHAREPATH, CVAR_ROM,
"location of shared (read only) game directories");
fs_userpath = Cvar_Get ("fs_userpath", FS_USERPATH, CVAR_ROM,
"location of your game directories");
fs_basegame = Cvar_Get ("fs_basegame", BASEGAME, CVAR_ROM,
"game to use by default");
}
/*
============
COM_SkipPath

View file

@ -33,8 +33,7 @@
#include "console.h"
#include "d_ifacea.h"
#include "r_local.h"
#include "d_local.h" // FIXME: shouldn't be needed (is needed for patch
// right now, but that should move)
#include "skin.h"
#define LIGHT_MIN 5 // lowest light value we'll allow, to avoid the
// need for inner-loop light clamping

View file

@ -33,6 +33,7 @@
#include "console.h"
#include "bothdefs.h"
#include "r_local.h"
#include "cl_main.h"
mnode_t *r_pefragtopnode;

View file

@ -38,6 +38,9 @@
#include "screen.h"
#include "console.h"
#include "r_local.h"
#include "cl_cam.h"
#include "cl_main.h"
#include "view.h"
#include <math.h>
@ -167,10 +170,10 @@ void R_ZGraph (void);
/*
==================
R_InitTextures
R_Textures_Init
==================
*/
void R_InitTextures (void)
void R_Textures_Init (void)
{
int x,y, m;
byte *dest;
@ -220,6 +223,34 @@ void R_Init (void)
Cmd_AddCommand ("pointfile", R_ReadPointFile_f);
Cmd_AddCommand ("loadsky", R_LoadSky_f);
Cvar_SetValue (r_maxedges, (float)NUMSTACKEDGES);
Cvar_SetValue (r_maxsurfs, (float)NUMSTACKSURFACES);
view_clipplanes[0].leftedge = true;
view_clipplanes[1].rightedge = true;
view_clipplanes[1].leftedge = view_clipplanes[2].leftedge =
view_clipplanes[3].leftedge = false;
view_clipplanes[0].rightedge = view_clipplanes[2].rightedge =
view_clipplanes[3].rightedge = false;
r_refdef.xOrigin = XCENTERING;
r_refdef.yOrigin = YCENTERING;
R_InitParticles ();
// TODO: collect 386-specific code in one place
#ifdef USE_INTEL_ASM
Sys_MakeCodeWriteable ((long)R_EdgeCodeStart,
(long)R_EdgeCodeEnd - (long)R_EdgeCodeStart);
#endif // USE_INTEL_ASM
D_Init ();
}
void R_Init_Cvars (void)
{
D_Init_Cvars ();
r_draworder = Cvar_Get("r_draworder", "0", CVAR_NONE, "None");
r_speeds = Cvar_Get("r_speeds", "0", CVAR_NONE, "None");
r_timegraph = Cvar_Get("r_timegraph", "0", CVAR_NONE, "None");
@ -244,28 +275,6 @@ void R_Init (void)
r_aliastransadj = Cvar_Get("r_aliastransadj", "100", CVAR_NONE, "None");
gl_flashblend = Cvar_Get("gl_flashblend", "0", CVAR_NONE, "None"); // FIXME: remove this! --KB
Cvar_SetValue (r_maxedges, (float)NUMSTACKEDGES);
Cvar_SetValue (r_maxsurfs, (float)NUMSTACKSURFACES);
view_clipplanes[0].leftedge = true;
view_clipplanes[1].rightedge = true;
view_clipplanes[1].leftedge = view_clipplanes[2].leftedge =
view_clipplanes[3].leftedge = false;
view_clipplanes[0].rightedge = view_clipplanes[2].rightedge =
view_clipplanes[3].rightedge = false;
r_refdef.xOrigin = XCENTERING;
r_refdef.yOrigin = YCENTERING;
R_InitParticles ();
// TODO: collect 386-specific code in one place
#ifdef USE_INTEL_ASM
Sys_MakeCodeWriteable ((long)R_EdgeCodeStart,
(long)R_EdgeCodeEnd - (long)R_EdgeCodeStart);
#endif // USE_INTEL_ASM
D_Init ();
}
/*

View file

@ -37,6 +37,7 @@
#include "draw.h"
#include "menu.h"
#include "quakedef.h"
#include "cl_parse.h"
qboolean allowskybox; // whether or not to allow skyboxes --KB

View file

@ -34,6 +34,7 @@
#include "console.h"
#include "quakefs.h"
#include "quakedef.h"
#include "r_dynamic.h"
#include <stdlib.h>
@ -149,6 +150,40 @@ void R_ReadPointFile_f (void)
Con_Printf ("%i points read\n", c);
}
void R_RunSpikeEffect (vec3_t pos, byte type)
{
switch (type) {
case TE_WIZSPIKE:
R_RunParticleEffect (pos, 20, 30);
break;
case TE_KNIGHTSPIKE:
R_RunParticleEffect (pos, 226, 20);
break;
case TE_SPIKE:
R_RunParticleEffect (pos, 0, 10);
break;
case TE_SUPERSPIKE:
R_RunParticleEffect (pos, 0, 20);
break;
}
}
void R_RunPuffEffect (vec3_t pos, byte type, byte cnt)
{
switch (type)
{
case TE_GUNSHOT:
R_RunParticleEffect (pos, 0, 20*cnt);
break;
case TE_BLOOD:
R_RunParticleEffect (pos, 73, 20*cnt);
break;
case TE_LIGHTNINGBLOOD:
R_RunParticleEffect (pos, 225, 50);
break;
}
}
/*
===============
R_ParticleExplosion
@ -244,7 +279,7 @@ R_RunParticleEffect
===============
*/
void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
void R_RunParticleEffect (vec3_t org, int color, int count)
{
int i, j;
particle_t *p;
@ -272,7 +307,7 @@ void R_RunParticleEffect (vec3_t org, vec3_t dir, int color, int count)
for (j=0 ; j<3 ; j++)
{
p->org[j] = org[j] + scale*((rand()&15)-8);
p->vel[j] = dir[j]*15;// + (rand()%300)-150;
p->vel[j] = vec3_origin[j];// + (rand()%300)-150;
}
}
}

View file

@ -789,6 +789,11 @@ void V_Init (void)
Cmd_AddCommand ("bf", V_BonusFlash_f);
Cmd_AddCommand ("centerview", V_StartPitchDrift);
BuildGammaTable (1.0, 1.0); // no gamma yet
}
void V_Init_Cvars (void)
{
v_centermove = Cvar_Get("v_centermove", "0.15", CVAR_NONE, "None");
v_centerspeed = Cvar_Get("v_centerspeed", "500", CVAR_NONE, "None");
@ -821,7 +826,6 @@ void V_Init (void)
gl_cshiftpercent = Cvar_Get("gl_cshiftpercent", "100", CVAR_NONE, "None");
BuildGammaTable (1.0, 1.0); // no gamma yet
brightness = Cvar_Get("brightness", "1", CVAR_ARCHIVE, "None");
contrast = Cvar_Get("contrast", "1", CVAR_ARCHIVE, "None");
}

View file

@ -40,6 +40,7 @@
#include "bothdefs.h"
#include "va.h"
#include "msg.h"
#include "cl_cam.h"
#include <stdlib.h>
#include <string.h>

View file

@ -48,6 +48,9 @@
#include "sbar.h"
#include "sys.h"
#include "vid.h"
#include "skin.h"
#include "view.h"
#include "cl_parse.h"
/*
@ -393,7 +396,7 @@ void SCR_SizeDown_f (void)
SCR_Init
==================
*/
void SCR_InitCvars (void)
void SCR_Init_Cvars (void)
{
scr_fov = Cvar_Get("fov", "90", CVAR_NONE, "None");
scr_viewsize = Cvar_Get("viewsize", "100", CVAR_ARCHIVE, "None");

View file

@ -39,6 +39,8 @@
#include "pcx.h"
#include "sys.h"
#include "va.h"
#include "skin.h"
#include "cl_parse.h"
cvar_t *baseskin;
cvar_t *noskins;

View file

@ -198,17 +198,6 @@ void S_Init (void)
Cmd_AddCommand("soundlist", S_SoundList);
Cmd_AddCommand("soundinfo", S_SoundInfo_f);
nosound = Cvar_Get("nosound", "0", CVAR_NONE, "None");
volume = Cvar_Get("volume", "0.7", CVAR_ARCHIVE, "None");
precache = Cvar_Get("precache", "1", CVAR_NONE, "None");
loadas8bit = Cvar_Get("loadas8bit", "0", CVAR_NONE, "None");
bgmvolume = Cvar_Get("bgmvolume", "1", CVAR_ARCHIVE, "None");
ambient_level = Cvar_Get("ambient_level", "0.3", CVAR_NONE, "None");
ambient_fade = Cvar_Get("ambient_fade", "100", CVAR_NONE, "None");
snd_noextraupdate = Cvar_Get("snd_noextraupdate", "0", CVAR_NONE, "None");
snd_show = Cvar_Get("snd_show", "0", CVAR_NONE, "None");
snd_interp = Cvar_Get("snd_interp", "1", CVAR_ARCHIVE, "control sample interpolation");
_snd_mixahead = Cvar_Get("_snd_mixahead", "0.1", CVAR_ARCHIVE, "None");
if (COM_CheckParm("-nosound"))
return;
@ -266,6 +255,21 @@ void S_Init (void)
S_StopAllSounds (true);
}
void S_Init_Cvars (void)
{
nosound = Cvar_Get("nosound", "0", CVAR_NONE, "None");
volume = Cvar_Get("volume", "0.7", CVAR_ARCHIVE, "None");
precache = Cvar_Get("precache", "1", CVAR_NONE, "None");
loadas8bit = Cvar_Get("loadas8bit", "0", CVAR_NONE, "None");
bgmvolume = Cvar_Get("bgmvolume", "1", CVAR_ARCHIVE, "None");
ambient_level = Cvar_Get("ambient_level", "0.3", CVAR_NONE, "None");
ambient_fade = Cvar_Get("ambient_fade", "100", CVAR_NONE, "None");
snd_noextraupdate = Cvar_Get("snd_noextraupdate", "0", CVAR_NONE, "None");
snd_show = Cvar_Get("snd_show", "0", CVAR_NONE, "None");
snd_interp = Cvar_Get("snd_interp", "1", CVAR_ARCHIVE, "control sample interpolation");
_snd_mixahead = Cvar_Get("_snd_mixahead", "0.1", CVAR_ARCHIVE, "None");
}
// =======================================================================
// Shutdown sound engine

View file

@ -1892,6 +1892,7 @@ void SV_Init (quakeparms_t *parms)
COM_Init ();
PR_Init_Cvars ();
PR_Init ();
Mod_Init ();

View file

@ -101,7 +101,7 @@ void Sys_Printf (char *fmt, ...)
unsigned char *p;
if (sys_nostdout->int_val)
if (sys_nostdout && sys_nostdout->int_val)
return;
va_start (argptr, fmt);

View file

@ -299,7 +299,7 @@ void Team_NewMap ()
free(mapname);
}
void Team_InitTeamplay (void)
void Team_Init_Cvars (void)
{
cl_deadbodyfilter = Cvar_Get("cl_deadbodyfilter", "0", CVAR_NONE, "Hide dead player models");
cl_gibfilter = Cvar_Get("cl_gibfilter", "0", CVAR_NONE, "Hide gibs");

View file

@ -305,6 +305,11 @@ VID_Init(unsigned char *palette)
vid.recalc_refdef = 1; // force a surface cache flush
}
void
VID_Init_Cvars()
{
}
void
VID_ExtraOptionDraw(unsigned int options_draw_cursor)
{

View file

@ -381,11 +381,6 @@ VID_Init8bitPalette(void)
}
}
void
VID_InitCvars()
{
}
void
VID_LockBuffer ( void )
{

View file

@ -922,15 +922,22 @@ IN_Init(void)
{
JOY_Init ();
_windowed_mouse = Cvar_Get("_windowed_mouse", "0", CVAR_ARCHIVE, "None");
old_windowed_mouse = -1; /* Force update */
m_filter = Cvar_Get("m_filter", "0", CVAR_ARCHIVE, "None");
if (COM_CheckParm ("-nomouse")) return;
mouse_x = mouse_y = 0.0;
mouse_avail = 1;
}
void
IN_Init_Cvars(void)
{
JOY_Init_Cvars ();
_windowed_mouse = Cvar_Get("_windowed_mouse", "0", CVAR_ARCHIVE, "None");
m_filter = Cvar_Get("m_filter", "0", CVAR_ARCHIVE, "None");
}
void
IN_Shutdown(void)
@ -1005,7 +1012,7 @@ IN_Move(usercmd_t *cmd)
}
void VID_InitCvars(void) {}
void VID_Init_Cvars(void) {}
void VID_LockBuffer(void) {}
void VID_UnlockBuffer(void) {}

View file

@ -210,6 +210,12 @@ VID_Init (unsigned char *palette)
vid.recalc_refdef = 1; // force a surface cache flush
}
void
VID_Init_Cvars ()
{
x11_Init_Cvars();
}
void
VID_SetCaption (char *text)
{

View file

@ -175,17 +175,6 @@ void VID_MenuKey (int key);
LONG WINAPI MainWndProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void AppActivate(BOOL fActive, BOOL minimize);
/*
================
VID_InitCvars
================
*/
void
VID_InitCvars ()
{
// It may not look like it, but this is important
}
/*
================
VID_RememberWindowPos
@ -2106,19 +2095,6 @@ void VID_Init (unsigned char *palette)
int basenummodes;
byte *ptmp;
vid_mode = Cvar_Get("vid_mode", "0", CVAR_NONE, "None");
vid_nopageflip = Cvar_Get("vid_nopageflip", "0", CVAR_ARCHIVE, "None");
_vid_default_mode_win = Cvar_Get("_vid_default_mode_win", "3", 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);
Cmd_AddCommand ("vid_describecurrentmode", VID_DescribeCurrentMode_f);
@ -2219,6 +2195,22 @@ void VID_Init (unsigned char *palette)
strcpy (badmode.modedesc, "Bad mode");
}
void VID_Init_Cvars ()
{
vid_mode = Cvar_Get("vid_mode", "0", CVAR_NONE, "None");
vid_nopageflip = Cvar_Get("vid_nopageflip", "0", CVAR_ARCHIVE, "None");
_vid_default_mode_win = Cvar_Get("_vid_default_mode_win", "3", 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");
}
void VID_Shutdown (void)
{

View file

@ -67,6 +67,10 @@ void VID_Init (unsigned char *palette)
D_InitCaches (surfcache, sizeof(surfcache));
}
void VID_Init_Cvars ()
{
}
void VID_Shutdown (void)
{
}

View file

@ -134,8 +134,6 @@ VID_Init (unsigned char *palette)
//Uint16 video_w, video_h;
Uint32 flags;
vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ROM, "Toggles fullscreen game mode");
// Load the SDL library
if (SDL_Init(SDL_INIT_VIDEO)<0) //|SDL_INIT_AUDIO|SDL_INIT_CDROM) < 0)
Sys_Error("VID: Couldn't load SDL: %s", SDL_GetError());
@ -183,6 +181,12 @@ VID_Init (unsigned char *palette)
#endif
}
void
VID_Init_Cvars ()
{
vid_fullscreen = Cvar_Get ("vid_fullscreen", "0", CVAR_ROM, "Toggles fullscreen game mode");
}
void
VID_Shutdown (void)
{
@ -251,12 +255,6 @@ D_EndDirectRect (int x, int y, int width, int height)
SDL_UpdateRect(screen, x, y, width, height);
}
void
VID_InitCvars ()
{
// It may not look like it, but this is important
}
void
VID_LockBuffer ( void )
{

View file

@ -122,8 +122,6 @@ VID_Init (unsigned char *palette)
VID_GetWindowSize (640, 480);
vid_fullscreen = Cvar_Get ("vid_fullscreen","0",0,"None");
vid.maxwarpwidth = WARP_WIDTH;
vid.maxwarpheight = WARP_HEIGHT;
vid.colormap = host_colormap;
@ -211,6 +209,12 @@ VID_Init (unsigned char *palette)
vid.recalc_refdef = 1; // force a surface cache flush
}
void
VID_Init_Cvars ()
{
vid_fullscreen = Cvar_Get ("vid_fullscreen","0",0,"None");
}
void
VID_SetCaption (char *text)
{

View file

@ -554,11 +554,6 @@ VID_Init(unsigned char *palette)
VID_InitModes();
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,"None");
Cmd_AddCommand("vid_nummodes", VID_NumModes_f);
Cmd_AddCommand("vid_describemode", VID_DescribeMode_f);
Cmd_AddCommand("vid_describemodes", VID_DescribeModes_f);
@ -599,6 +594,15 @@ VID_Init(unsigned char *palette)
/* IN_Init(); */
}
void
VID_Init_Cvars ()
{
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,"None");
}
void
VID_Update(vrect_t *rects)
@ -733,11 +737,6 @@ VID_ExtraOptionCmd(int option_cursor)
#endif
}
void VID_InitCvars ()
{
// It may not look like it, but this is important
}
void
VID_LockBuffer ( void )
{

View file

@ -168,17 +168,6 @@ cvar_t *_windowed_mouse;
int window_center_x, window_center_y, window_x, window_y, window_width, window_height;
RECT window_rect;
/*
================
VID_InitCvars
================
*/
void
VID_InitCvars ()
{
// It may not look like it, but this is important
}
// direct draw software compatability stuff
void VID_HandlePause (qboolean pause)
@ -1586,8 +1575,6 @@ void VID_Init (unsigned char *palette)
memset(&devmode, 0, sizeof(devmode));
_windowed_mouse = Cvar_Get("_windowed_mouse", "0", CVAR_ARCHIVE, "None");
Cmd_AddCommand ("vid_nummodes", VID_NumModes_f);
Cmd_AddCommand ("vid_describecurrentmode", VID_DescribeCurrentMode_f);
Cmd_AddCommand ("vid_describemode", VID_DescribeMode_f);
@ -1825,6 +1812,12 @@ void VID_Init (unsigned char *palette)
fullsbardraw = false;
}
void
VID_Init_Cvars ()
{
_windowed_mouse = Cvar_Get("_windowed_mouse", "0", CVAR_ARCHIVE, "None");
}
//========================================================
// Video menu stuff

View file

@ -619,6 +619,12 @@ void VID_Init (unsigned char *palette)
x11_add_event(x_shmeventtype, event_shm);
}
void
VID_Init_Cvars ()
{
x11_Init_Cvars();
}
void
VID_ShiftPalette(unsigned char *p)
@ -768,12 +774,6 @@ VID_DitherOff (void)
}
}
void
VID_InitCvars (void)
{
// It may not look like it, but this is important
}
void
VID_LockBuffer ( void )
{