#include "shared/shared.h"
#include "common/cmd.h"
#include "common/common.h"
#include "common/cvar.h"
#include "common/files.h"
#include "common/prompt.h"
#include "common/utils.h"
#include "common/zone.h"
#include "client/client.h"
Go to the source code of this file.
Macros | |
#define | Cvar_Malloc(size) Z_TagMalloc(size, TAG_CVAR) |
#define | CVARHASH_SIZE 256 |
Functions | |
cvar_t * | Cvar_FindVar (const char *var_name) |
xgenerator_t | Cvar_FindGenerator (const char *var_name) |
qboolean | Cvar_Exists (const char *var_name, qboolean weak) |
float | Cvar_VariableValue (const char *var_name) |
int | Cvar_VariableInteger (const char *var_name) |
char * | Cvar_VariableString (const char *var_name) |
void | Cvar_Variable_g (genctx_t *ctx) |
void | Cvar_Default_g (genctx_t *ctx) |
static void | parse_string_value (cvar_t *var) |
static void | change_string_value (cvar_t *var, const char *value, from_t from) |
static qboolean | validate_info_cvar (const char *s) |
static void | get_engine_cvar (cvar_t *var, const char *var_value, int flags) |
cvar_t * | Cvar_Get (const char *var_name, const char *var_value, int flags) |
cvar_t * | Cvar_WeakGet (const char *var_name) |
static void | set_back_cvar (cvar_t *var) |
void | Cvar_SetByVar (cvar_t *var, const char *value, from_t from) |
cvar_t * | Cvar_SetEx (const char *var_name, const char *value, from_t from) |
cvar_t * | Cvar_FullSet (const char *var_name, const char *value, int flags, from_t from) |
cvar_t * | Cvar_Set (const char *var_name, const char *value) |
cvar_t * | Cvar_UserSet (const char *var_name, const char *value) |
void | Cvar_SetValue (cvar_t *var, float value, from_t from) |
void | Cvar_SetInteger (cvar_t *var, int value, from_t from) |
int | Cvar_ClampInteger (cvar_t *var, int min, int max) |
float | Cvar_ClampValue (cvar_t *var, float min, float max) |
void | Cvar_FixCheats (void) |
void | Cvar_GetLatchedVars (void) |
int | Cvar_CountLatchedVars (void) |
void | Cvar_Command (cvar_t *v) |
static void | Cvar_Set_c (genctx_t *ctx, int argnum) |
void | Cvar_Set_f (void) |
static void | Cvar_SetFlag_f (void) |
static void | Cvar_List_c (genctx_t *ctx, int argnum) |
static void | Cvar_List_f (void) |
static void | Cvar_Toggle_f (void) |
static void | Cvar_Toggle_c (genctx_t *ctx, int argnum) |
static void | Cvar_Inc_f (void) |
static void | Cvar_Reset_f (void) |
static void | Cvar_Reset_c (genctx_t *ctx, int argnum) |
static void | Cvar_ResetAll_f (void) |
size_t | Cvar_BitInfo (char *info, int bit) |
void | Cvar_Init (void) |
Variables | |
cvar_t * | cvar_vars |
int | cvar_modified |
static cvar_t * | cvarHash [CVARHASH_SIZE] |
static const cmd_option_t | o_cvarlist [] |
static const cmdreg_t | c_cvar [] |
#define Cvar_Malloc | ( | size | ) | Z_TagMalloc(size, TAG_CVAR) |
|
static |
size_t Cvar_BitInfo | ( | char * | info, |
int | bit | ||
) |
Definition at line 1109 of file cvar.c.
Referenced by CL_CheckForResend(), CL_SendUserinfo(), CL_Userinfo_f(), SV_Serverinfo_f(), SV_ShowServerInfo_f(), and SV_StatusString().
Definition at line 549 of file cvar.c.
Referenced by CalcPingRate(), CL_Record_f(), CL_SendBatchedCmd(), CL_UpdateFrameTimes(), drs_maxscale_changed(), drs_minscale_changed(), drs_target_changed(), GL_UpscaleLevel(), LoadGL(), MVD_Say_f(), net_maxmsglen_changed(), parse_hello(), parse_stream_data(), Qcommon_Frame(), R_InitCaches(), R_NewMap(), R_SetupFrame(), S_Activate(), SCR_LagDraw(), SV_BeginDownload_f(), SV_InitGame(), SV_MvdInit(), ui_sortdemos_changed(), ui_sortservers_changed(), and viewsize_changed().
float Cvar_ClampValue | ( | cvar_t * | var, |
float | min, | ||
float | max | ||
) |
Definition at line 571 of file cvar.c.
Referenced by CL_AddViewWeapon(), CL_MouseMove(), Con_DrawSolidConsole(), Con_RunConsole(), GL_BuildIntensityTable(), GL_InitImages(), gl_lightmap_changed(), HQ2x_Init(), R_ClampScale(), scr_crosshair_changed(), SCR_Draw2D(), SCR_DrawCenterString(), setup_celshading(), and vkpt_freecam_mousemove().
void Cvar_Command | ( | cvar_t * | v | ) |
void Cvar_Default_g | ( | genctx_t * | ctx | ) |
qboolean Cvar_Exists | ( | const char * | var_name, |
qboolean | weak | ||
) |
Definition at line 73 of file cvar.c.
Referenced by Cmd_AddMacro(), Cmd_Alias_f(), Cmd_Complete_f(), and Cmd_RegCommand().
xgenerator_t Cvar_FindGenerator | ( | const char * | var_name | ) |
Definition at line 61 of file cvar.c.
Referenced by Cvar_Toggle_c().
cvar_t* Cvar_FindVar | ( | const char * | var_name | ) |
Definition at line 45 of file cvar.c.
Referenced by CL_PingServers_f(), Cmd_ExecuteCommand(), Cmd_MacroExpandString(), Com_Address_g(), Com_Generic_c(), Cvar_Exists(), Cvar_FindGenerator(), Cvar_FullSet(), Cvar_Get(), Cvar_Inc_f(), Cvar_Reset_f(), Cvar_Set_c(), Cvar_SetEx(), Cvar_Toggle_f(), Cvar_VariableInteger(), Cvar_VariableString(), Cvar_VariableValue(), dummy_exec_string(), and ParseAddressBook().
cvar_t* Cvar_FullSet | ( | const char * | var_name, |
const char * | value, | ||
int | flags, | ||
from_t | from | ||
) |
Definition at line 437 of file cvar.c.
Referenced by AC_Disconnect(), AC_ParseReady(), Cvar_Set_f(), Cvar_SetFlag_f(), setup_game_paths(), and SV_InitGame().
cvar_t* Cvar_Get | ( | const char * | var_name, |
const char * | var_value, | ||
int | flags | ||
) |
Definition at line 257 of file cvar.c.
Referenced by AC_Register(), BSP_Init(), CL_InitDemos(), CL_InitLocal(), CL_InitRefresh(), CL_InitTEnts(), CL_PrepRefresh(), CL_RegisterInput(), CM_Init(), Con_Init(), Cvar_FullSet(), Cvar_SetEx(), Cvar_WeakGet(), DMA_Init(), drs_init(), FS_Init(), FX_Init(), GL_InitImages(), GL_Register(), GL_SetupConfig(), HQ2x_Init(), HTTP_Init(), IMG_Init(), IN_Init(), InitialiseSkyCVars(), initialize_transparency(), LOC_Init(), M_Menu_Demos(), M_Menu_Servers(), MVD_GameInit(), MVD_Register(), NET_Init(), Netchan_Init(), OGG_Init(), OGG_InitTrackList(), PF_cvar(), Prompt_Init(), QAL_Init(), Qcommon_Init(), R_Init_RTX(), R_ModeChanged(), R_Register(), S_Init(), SCR_Init(), SV_BuildClientFrame(), SV_Init(), SV_MvdRegister(), SV_RegisterSavegames(), Sys_Init(), UI_Init(), UI_ModeChanged(), V_Init(), VID_Init(), vkpt_bloom_initialize(), vkpt_initialize_god_rays(), vkpt_pt_init(), vkpt_tone_mapping_record_cmd_buffer(), and Win_Init().
Definition at line 1169 of file cvar.c.
Referenced by Qcommon_Init().
cvar_t* Cvar_Set | ( | const char * | var_name, |
const char * | value | ||
) |
Definition at line 466 of file cvar.c.
Referenced by check_paused(), CL_CheckForPause(), CL_Connect_f(), CL_FixUpGender(), CL_Init(), CL_InitLocal(), CL_InitRefresh(), CL_Pause_f(), CL_RunRefresh(), CL_Shutdown(), DMA_Init(), finish_demo(), fs_game_changed(), GL_InitPrograms(), GL_PostInit(), IN_Init(), LoadGL(), logfile_open(), logfile_write(), MVD_GameInit(), MVD_GameShutdown(), MVD_Spawn(), R_BeginRegistration_RTX(), ready_to_send(), SCR_PlayCinematic(), SCR_StopCinematic(), SetRconAddress(), SV_InitGame(), SV_InitGameProgs(), SV_MvdInit(), SV_MvdMapChanged(), SV_NextServer_f(), SV_ParseMapCmd(), SV_SetMaster_f(), SV_Shutdown(), SV_ShutdownGameProgs(), SV_SpawnServer(), upload_world_surfaces(), VID_Init(), VID_ToggleFullscreen(), win_disablewinkey_changed(), Win_Init(), and Win_InitMouse().
void Cvar_SetByVar | ( | cvar_t * | var, |
const char * | value, | ||
from_t | from | ||
) |
Definition at line 345 of file cvar.c.
Referenced by AC_Connect(), AC_Disable(), Cvar_ClampInteger(), Cvar_ClampValue(), Cvar_Command(), Cvar_FixCheats(), Cvar_FullSet(), Cvar_Inc_f(), Cvar_Reset_f(), Cvar_ResetAll_f(), Cvar_SetEx(), Cvar_SetInteger(), Cvar_SetValue(), Cvar_Toggle_f(), Field_Pop(), Pairs_Pop(), R_InterceptKey_RTX(), Strings_Pop(), VID_SetGeometry(), vkpt_freecam_reset(), vkpt_freecam_update(), and vkpt_next_sun_preset().
cvar_t* Cvar_SetEx | ( | const char * | var_name, |
const char * | value, | ||
from_t | from | ||
) |
Definition at line 417 of file cvar.c.
Referenced by Com_AddEarlyCommands(), Cvar_Set(), Cvar_Set_f(), Cvar_SetFlag_f(), Cvar_UserSet(), and Pop().
Definition at line 509 of file cvar.c.
Referenced by BitField_Pop(), MVD_Spawn(), R_EndFrame_RTX(), S_Init(), SCR_SizeDown_f(), SCR_SizeUp_f(), set_frame_time(), SpinControl_Pop(), SV_InitGame(), SV_SpawnServer(), and Toggle_Pop().
void Cvar_SetValue | ( | cvar_t * | var, |
float | value, | ||
from_t | from | ||
) |
Definition at line 487 of file cvar.c.
Referenced by OGG_RecoverState(), R_ClampScale(), Slider_Pop(), and UpdatePhysicalSkyCVars().
cvar_t* Cvar_UserSet | ( | const char * | var_name, |
const char * | value | ||
) |
Definition at line 476 of file cvar.c.
Referenced by CL_ParseServerData(), MVD_ParseServerData(), read_server_file(), and SV_InitGameProgs().
void Cvar_Variable_g | ( | genctx_t * | ctx | ) |
Definition at line 133 of file cvar.c.
Referenced by Com_Generic_c(), Cvar_Reset_c(), Cvar_Set_c(), Cvar_Toggle_c(), Prompt_CompleteCommand(), and SCR_Draw_c().
int Cvar_VariableInteger | ( | const char * | var_name | ) |
Definition at line 105 of file cvar.c.
Referenced by CL_CheatsOK(), Push(), SV_InitGame(), SV_NextServer_f(), SV_NoSaveGames(), SV_Savegame_f(), and SV_SpawnServer().
char* Cvar_VariableString | ( | const char * | var_name | ) |
float Cvar_VariableValue | ( | const char * | var_name | ) |
cvar_t* Cvar_WeakGet | ( | const char * | var_name | ) |
Definition at line 324 of file cvar.c.
Referenced by Parse_Field(), Parse_If(), Parse_Pairs(), Parse_Range(), Parse_Spin(), Parse_Toggle(), SCR_Draw_f(), SCR_UnDraw_f(), and SV_SpawnServer().
|
static |
Definition at line 157 of file cvar.c.
Referenced by change_string_value(), Cvar_Get(), and Cvar_GetLatchedVars().
|
static |
Definition at line 329 of file cvar.c.
Referenced by Cvar_SetByVar(), Cvar_SetInteger(), and Cvar_SetValue().
|
static |
Definition at line 198 of file cvar.c.
Referenced by Cvar_Get(), Cvar_SetByVar(), and get_engine_cvar().
|
static |
Definition at line 1149 of file cvar.c.
Referenced by Cvar_Init().
int cvar_modified |
Definition at line 32 of file cvar.c.
Referenced by change_string_value(), CL_InitRefresh(), CL_RestartFilesystem(), CL_RestartRefresh(), CL_RunRefresh(), Cvar_GetLatchedVars(), and S_Update().
cvar_t* cvar_vars |
Definition at line 30 of file cvar.c.
Referenced by Cvar_BitInfo(), Cvar_CountLatchedVars(), Cvar_FixCheats(), Cvar_Get(), Cvar_GetLatchedVars(), Cvar_List_f(), Cvar_ResetAll_f(), Cvar_Variable_g(), and write_server_file().
|
static |
Definition at line 38 of file cvar.c.
Referenced by Cvar_FindVar(), and Cvar_Get().
|
static |
Definition at line 824 of file cvar.c.
Referenced by Cvar_List_c(), and Cvar_List_f().