mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-24 02:30:46 +00:00
- started transitioning the CVARs.
This is going to be a lot of work consolidating the 3 frontends' settings but a necessary evil for eventually getting Shadow Warrior to work as it is quite lacking here.
This commit is contained in:
parent
f7b9fb92c1
commit
79d02a405e
25 changed files with 38 additions and 347 deletions
|
@ -787,6 +787,7 @@ set (PCH_SOURCES
|
|||
|
||||
common/rts.cpp
|
||||
common/gameconfigfile.cpp
|
||||
common/gamecvars.cpp
|
||||
|
||||
common/console/c_cvars.cpp
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ int32_t gViewVBobbing;
|
|||
int32_t gFollowMap;
|
||||
int32_t gOverlayMap;
|
||||
int32_t gRotateMap;
|
||||
int32_t gAimReticle;
|
||||
int32_t gSlopeTilting;
|
||||
int32_t gMessageState;
|
||||
int32_t gMessageCount;
|
||||
|
@ -390,7 +389,6 @@ void CONFIG_SetDefaults(void)
|
|||
gFollowMap = 1;
|
||||
gOverlayMap = 0;
|
||||
gRotateMap = 0;
|
||||
gAimReticle = 0;
|
||||
gSlopeTilting = 0;
|
||||
gMessageState = 1;
|
||||
gMessageCount = 4;
|
||||
|
|
|
@ -29,6 +29,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "control.h"
|
||||
#include "_control.h"
|
||||
#include "hash.h"
|
||||
#include "gamecvars.h"
|
||||
|
||||
BEGIN_BLD_NS
|
||||
|
||||
|
@ -70,7 +71,6 @@ extern int32_t gViewVBobbing;
|
|||
extern int32_t gFollowMap;
|
||||
extern int32_t gOverlayMap;
|
||||
extern int32_t gRotateMap;
|
||||
extern int32_t gAimReticle;
|
||||
extern int32_t gSlopeTilting;
|
||||
extern int32_t gMessageState;
|
||||
extern int32_t gMessageCount;
|
||||
|
|
|
@ -277,7 +277,7 @@ void ctrlGetInput(void)
|
|||
if (BUTTON(gamefunc_Toggle_Crosshair))
|
||||
{
|
||||
CONTROL_ClearButton(gamefunc_Toggle_Crosshair);
|
||||
gAimReticle = !gAimReticle;
|
||||
cl_crosshair = !cl_crosshair;
|
||||
}
|
||||
|
||||
if (BUTTON(gamefunc_Next_Weapon))
|
||||
|
|
|
@ -227,7 +227,7 @@ CGameMenuItemSlider sliderMusic("MUSIC:", 3, 66, 70, 180, MusicVolume, 0, 256, 4
|
|||
CGameMenuItemSlider sliderSound("SOUND:", 3, 66, 80, 180, FXVolume, 0, 256, 48, SetSoundVol, -1, -1);
|
||||
CGameMenuItemSlider sliderCDAudio("CD AUDIO:", 3, 66, 90, 180, CDVolume, 0, 256, 48, SetCDVol, -1, -1);
|
||||
CGameMenuItemZBool bool3DAudio("3D AUDIO:", 3, 66, 100, 180, gDoppler, SetDoppler, NULL, NULL);
|
||||
CGameMenuItemZBool boolCrosshair("CROSSHAIR:", 3, 66, 110, 180, gAimReticle, SetCrosshair, NULL, NULL);
|
||||
CGameMenuItemZBool boolCrosshair("CROSSHAIR:", 3, 66, 110, 180, cl_crosshair, SetCrosshair, NULL, NULL);
|
||||
CGameMenuItemZBool boolShowWeapons("SHOW WEAPONS:", 3, 66, 120, 180, gShowWeapon, SetShowWeapons, NULL, NULL);
|
||||
CGameMenuItemZBool boolSlopeTilting("SLOPE TILTING:", 3, 66, 130, 180, gSlopeTilting, SetSlopeTilting, NULL, NULL);
|
||||
CGameMenuItemZBool boolViewBobbing("VIEW BOBBING:", 3, 66, 140, 180, gViewVBobbing, SetViewBobbing, NULL, NULL);
|
||||
|
@ -414,7 +414,7 @@ CGameMenuItemChain itemOptionsGameChainParentalLock("PARENTAL LOCK", 3, 0, 120,
|
|||
CGameMenuItemTitle itemOptionsDisplayTitle("DISPLAY SETUP", 1, 160, 20, 2038);
|
||||
CGameMenuItemChain itemOptionsDisplayColor("COLOR CORRECTION", 3, 66, 60, 180, 0, &menuOptionsDisplayColor, -1, NULL, 0);
|
||||
CGameMenuItemChain itemOptionsDisplayMode("VIDEO MODE", 3, 66, 70, 180, 0, &menuOptionsDisplayMode, -1, SetupVideoModeMenu, 0);
|
||||
CGameMenuItemZBool itemOptionsDisplayBoolCrosshair("CROSSHAIR:", 3, 66, 80, 180, gAimReticle, SetCrosshair, NULL, NULL);
|
||||
CGameMenuItemZBool itemOptionsDisplayBoolCrosshair("CROSSHAIR:", 3, 66, 80, 180, cl_crosshair, SetCrosshair, NULL, NULL);
|
||||
CGameMenuItemZBool itemOptionsDisplayBoolCenterHoriz("CENTER HORIZON LINE:", 3, 66, 90, 180, gCenterHoriz, SetCenterHoriz, NULL, NULL);
|
||||
CGameMenuItemZBool itemOptionsDisplayBoolLevelStats("LEVEL STATS:", 3, 66, 100, 180, gLevelStats, SetLevelStats, NULL, NULL);
|
||||
CGameMenuItemZBool itemOptionsDisplayBoolPowerupDuration("POWERUP DURATION:", 3, 66, 110, 180, gPowerupDuration, SetPowerupDuration, NULL, NULL);
|
||||
|
@ -751,7 +751,7 @@ void SetupOptionsOldMenu(void)
|
|||
sliderMusic.nValue = ClipRange(MusicVolume, sliderMusic.nRangeLow, sliderMusic.nRangeHigh);
|
||||
sliderSound.nValue = ClipRange(FXVolume, sliderSound.nRangeLow, sliderSound.nRangeHigh);
|
||||
bool3DAudio.at20 = gDoppler;
|
||||
boolCrosshair.at20 = gAimReticle;
|
||||
boolCrosshair.at20 = cl_crosshair;
|
||||
boolShowWeapons.at20 = gShowWeapon;
|
||||
boolSlopeTilting.at20 = gSlopeTilting;
|
||||
boolViewBobbing.at20 = gViewVBobbing;
|
||||
|
@ -1144,7 +1144,7 @@ void SetupOptionsMenu(void)
|
|||
menuOptionsDisplay.Add(&itemOptionsDisplayPolymost, false);
|
||||
#endif
|
||||
menuOptionsDisplay.Add(&itemBloodQAV, false);
|
||||
itemOptionsDisplayBoolCrosshair.at20 = gAimReticle;
|
||||
itemOptionsDisplayBoolCrosshair.at20 = cl_crosshair;
|
||||
itemOptionsDisplayBoolCenterHoriz.at20 = gCenterHoriz;
|
||||
itemOptionsDisplayBoolLevelStats.at20 = gLevelStats;
|
||||
itemOptionsDisplayBoolPowerupDuration.at20 = gPowerupDuration;
|
||||
|
@ -1371,7 +1371,7 @@ void SetDoppler(CGameMenuItemZBool *pItem)
|
|||
|
||||
void SetCrosshair(CGameMenuItemZBool *pItem)
|
||||
{
|
||||
gAimReticle = pItem->at20;
|
||||
cl_crosshair = pItem->at20;
|
||||
}
|
||||
|
||||
void SetCenterHoriz(CGameMenuItemZBool *pItem)
|
||||
|
|
|
@ -3451,7 +3451,7 @@ RORHACK:
|
|||
#endif
|
||||
if (gViewPos == 0)
|
||||
{
|
||||
if (gAimReticle)
|
||||
if (cl_crosshair)
|
||||
{
|
||||
rotatesprite(160<<16, defaultHoriz<<16, 65536, 0, kCrosshairTile, 0, CROSSHAIR_PAL, 2, gViewX0, gViewY0, gViewX1, gViewY1);
|
||||
}
|
||||
|
|
|
@ -231,8 +231,10 @@ public:
|
|||
protected:
|
||||
virtual void DoSet (UCVarValue value, ECVarType type);
|
||||
|
||||
bool Value;
|
||||
bool DefaultValue;
|
||||
// int is needed as long as this needs to connect to the menus
|
||||
public: // also for the menu code which still needs variable references. (Cannot change everything at once.)
|
||||
int/*bool*/ Value;
|
||||
int/*bool*/ DefaultValue;
|
||||
};
|
||||
|
||||
class FIntCVar : public FBaseCVar
|
||||
|
@ -257,6 +259,7 @@ public:
|
|||
protected:
|
||||
virtual void DoSet (UCVarValue value, ECVarType type);
|
||||
|
||||
public: // for the menu code which still needs variable references. (Cannot change everything at once.)
|
||||
int Value;
|
||||
int DefaultValue;
|
||||
|
||||
|
@ -286,6 +289,7 @@ public:
|
|||
protected:
|
||||
virtual void DoSet (UCVarValue value, ECVarType type);
|
||||
|
||||
public: // for the menu code which still needs variable references. (Cannot change everything at once.)
|
||||
float Value;
|
||||
float DefaultValue;
|
||||
};
|
||||
|
@ -428,8 +432,7 @@ void C_ForgetCVars (void);
|
|||
static void cvarfunc_##name(F##type##CVar &self)
|
||||
|
||||
#define CVARD(type,name,def,flags, descr) \
|
||||
F##type##CVar name (#name, def, flags, descr);
|
||||
|
||||
F##type##CVar name (#name, def, flags, nullptr, descr);
|
||||
|
||||
extern FBaseCVar *CVars;
|
||||
|
||||
|
|
|
@ -7561,7 +7561,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
|
||||
case SE_27_DEMO_CAM:
|
||||
{
|
||||
if (pSprite->extra < 1 && (ud.recstat == 0 || !ud.democams) && g_BenchmarkMode == BENCHMARKMODE_OFF) break;
|
||||
if (pSprite->extra < 1 && (ud.recstat == 0 || !ud.democams)) break;
|
||||
|
||||
if (klabs(pSprite->extra) == 2)
|
||||
{
|
||||
|
@ -7606,7 +7606,7 @@ ACTOR_STATIC void G_MoveEffectors(void) //STATNUM 3
|
|||
}
|
||||
|
||||
//if we are benchmarking, take a screenshot at each waypoint (camera start point/locator)
|
||||
benchmarkScreenshot = g_BenchmarkMode == BENCHMARKMODE_GENERATE_REFERENCE;
|
||||
benchmarkScreenshot = false;
|
||||
}
|
||||
if (pSprite->owner == -1)
|
||||
{
|
||||
|
|
|
@ -279,7 +279,6 @@ void CONFIG_SetDefaults(void)
|
|||
ud.config.VoiceToggle = 5; // bitfield, 1 = local, 2 = dummy, 4 = other players in DM
|
||||
ud.config.useprecache = 1;
|
||||
ud.configversion = 0;
|
||||
ud.crosshair = 1;
|
||||
ud.crosshairscale = 50;
|
||||
ud.default_skill = 1;
|
||||
ud.democams = 1;
|
||||
|
|
|
@ -42,6 +42,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "screens.h"
|
||||
#include "cmdline.h"
|
||||
#include "palette.h"
|
||||
#include "gamecvars.h"
|
||||
|
||||
#include "vfs.h"
|
||||
|
||||
|
@ -88,8 +89,6 @@ char boardfilename[BMAX_PATH] = {0}, currentboardfilename[BMAX_PATH] = {0};
|
|||
int32_t voting = -1;
|
||||
int32_t vote_map = -1, vote_episode = -1;
|
||||
|
||||
int32_t g_BenchmarkMode = BENCHMARKMODE_OFF;
|
||||
|
||||
int32_t g_Debug = 0;
|
||||
|
||||
#ifndef EDUKE32_STANDALONE
|
||||
|
@ -4621,8 +4620,8 @@ void G_HandleLocalKeys(void)
|
|||
if (BUTTON(gamefunc_Toggle_Crosshair))
|
||||
{
|
||||
CONTROL_ClearButton(gamefunc_Toggle_Crosshair);
|
||||
ud.crosshair = !ud.crosshair;
|
||||
P_DoQuote(QUOTE_CROSSHAIR_OFF-ud.crosshair, &myplayer);
|
||||
cl_crosshair = !cl_crosshair;
|
||||
P_DoQuote(QUOTE_CROSSHAIR_OFF-cl_crosshair, &myplayer);
|
||||
}
|
||||
|
||||
if (ud.overhead_on && BUTTON(gamefunc_Map_Follow_Mode))
|
||||
|
|
|
@ -115,12 +115,6 @@ enum {
|
|||
STATUSBAR_NOMODERN = 0x00000040,
|
||||
};
|
||||
|
||||
enum {
|
||||
BENCHMARKMODE_OFF = 0x0,
|
||||
BENCHMARKMODE_PERFORMANCE = 0x1,
|
||||
BENCHMARKMODE_GENERATE_REFERENCE = 0x2,
|
||||
};
|
||||
|
||||
void A_DeleteSprite(int spriteNum);
|
||||
|
||||
static inline int32_t G_GetLogoFlags(void)
|
||||
|
@ -193,7 +187,7 @@ typedef struct {
|
|||
int32_t menu_scrollbartilenum, menu_scrollbarz, menu_scrollcursorz;
|
||||
|
||||
int32_t entered_name,screen_tilting,shadows,fta_on,executions,auto_run;
|
||||
int32_t coords,showfps,levelstats,m_coop,coop,screen_size,lockout,crosshair;
|
||||
int32_t coords,showfps,levelstats,m_coop,coop,screen_size,lockout;
|
||||
int32_t playerai,angleinterpolation,obituaries;
|
||||
|
||||
int32_t respawn_monsters,respawn_items,respawn_inventory,recstat,monsters_off,brightness;
|
||||
|
@ -322,7 +316,6 @@ extern char ror_protectedsectors[MAXSECTORS];
|
|||
|
||||
extern float r_ambientlight;
|
||||
|
||||
extern int32_t g_BenchmarkMode;
|
||||
extern int32_t g_Debug;
|
||||
extern int32_t g_Shareware;
|
||||
#if !defined LUNATIC
|
||||
|
|
|
@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "osdcmds.h"
|
||||
#include "savegame.h"
|
||||
#include "scriplib.h"
|
||||
#include "gamecvars.h"
|
||||
|
||||
#include "vfs.h"
|
||||
|
||||
|
|
|
@ -1418,7 +1418,7 @@ int32_t __fastcall VM_GetUserdef(int32_t labelNum, int const lParm2)
|
|||
case USERDEFS_COOP: labelNum = ud.coop; break;
|
||||
case USERDEFS_SCREEN_SIZE: labelNum = ud.screen_size; break;
|
||||
case USERDEFS_LOCKOUT: labelNum = ud.lockout; break;
|
||||
case USERDEFS_CROSSHAIR: labelNum = ud.crosshair; break;
|
||||
case USERDEFS_CROSSHAIR: labelNum = cl_crosshair; break;
|
||||
case USERDEFS_PLAYERAI: labelNum = ud.playerai; break;
|
||||
case USERDEFS_RESPAWN_MONSTERS: labelNum = ud.respawn_monsters; break;
|
||||
case USERDEFS_RESPAWN_ITEMS: labelNum = ud.respawn_items; break;
|
||||
|
@ -1620,7 +1620,7 @@ void __fastcall VM_SetUserdef(int const labelNum, int const lParm2, int32_t cons
|
|||
}
|
||||
break;
|
||||
case USERDEFS_LOCKOUT: ud.lockout = iSet; break;
|
||||
case USERDEFS_CROSSHAIR: ud.crosshair = iSet; break;
|
||||
case USERDEFS_CROSSHAIR: cl_crosshair = iSet; break;
|
||||
case USERDEFS_PLAYERAI: ud.playerai = iSet; break;
|
||||
case USERDEFS_RESPAWN_MONSTERS: ud.respawn_monsters = iSet; break;
|
||||
case USERDEFS_RESPAWN_ITEMS: ud.respawn_items = iSet; break;
|
||||
|
|
|
@ -25,6 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "duke3d.h"
|
||||
#include "menus.h"
|
||||
#include "savegame.h"
|
||||
#include "gamecvars.h"
|
||||
|
||||
#include "vfs.h"
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "osdcmds.h"
|
||||
#include "savegame.h"
|
||||
#include "xxhash.h"
|
||||
#include "gamecvars.h"
|
||||
#include "../../glbackend/glbackend.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
@ -600,7 +601,7 @@ static MenuEntry_t ME_DISPLAYSETUP_TOUCHALPHA = MAKE_MENUENTRY("UI opacity:", &M
|
|||
|
||||
static char const s_Scale[] = "Scale:";
|
||||
|
||||
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.crosshair);
|
||||
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &cl_crosshair.Value);
|
||||
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option );
|
||||
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &ud.crosshairscale, &MF_Redfont, 25, 100, 0, 16, 2 );
|
||||
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 );
|
||||
|
|
|
@ -1572,161 +1572,6 @@ static int osdcmd_cvar_set_multi(osdcmdptr_t parm)
|
|||
|
||||
int32_t registerosdcommands(void)
|
||||
{
|
||||
static osdcvardata_t cvars_game[] =
|
||||
{
|
||||
{ "benchmarkmode", "Set the benchmark mode (0: off, 1: performance test, 2: generate reference screenshots for correctness testing)", (void *) &g_BenchmarkMode, CVAR_INT|CVAR_NOSAVE, 0, 2 },
|
||||
|
||||
{ "crosshair", "enable/disable crosshair", (void *)&ud.crosshair, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_autoaim", "enable/disable weapon autoaim", (void *)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 3 },
|
||||
{ "cl_automsg", "enable/disable automatically sending messages to all players", (void *)&ud.automsg, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_autorun", "enable/disable autorun", (void *)&ud.auto_run, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_autosave", "enable/disable autosaves", (void *) &ud.autosave, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_autosavedeletion", "enable/disable automatic deletion of autosaves", (void *) &ud.autosavedeletion, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_maxautosaves", "number of autosaves to keep before deleting the oldest", (void *) &ud.maxautosaves, CVAR_INT, 1, 100 },
|
||||
|
||||
{ "cl_autovote", "enable/disable automatic voting", (void *)&ud.autovote, CVAR_INT, 0, 2 },
|
||||
|
||||
{ "cl_cheatmask", "configure what cheats show in the cheats menu", (void *)&cl_cheatmask, CVAR_UINT, 0, ~0 },
|
||||
|
||||
{ "cl_obituaries", "enable/disable multiplayer death messages", (void *)&ud.obituaries, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_democams", "enable/disable demo playback cameras", (void *)&ud.democams, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_idplayers", "enable/disable name display when aiming at opponents", (void *)&ud.idplayers, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_runmode", "enable/disable modernized run key operation", (void *)&ud.runkey_mode, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_showcoords", "show your position in the game world", (void *)&ud.coords, CVAR_INT, 0,
|
||||
#ifdef USE_OPENGL
|
||||
2
|
||||
#else
|
||||
1
|
||||
#endif
|
||||
},
|
||||
|
||||
{ "cl_viewbob", "enable/disable player head bobbing", (void *)&ud.viewbob, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_weaponsway", "enable/disable player weapon swaying", (void *)&ud.weaponsway, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_weaponswitch", "enable/disable auto weapon switching", (void *)&ud.weaponswitch, CVAR_INT|CVAR_MULTI, 0, 7 },
|
||||
|
||||
{ "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
||||
|
||||
{ "crosshairscale","changes the size of the crosshair", (void *)&ud.crosshairscale, CVAR_INT, 10, 100 },
|
||||
|
||||
{ "demorec_diffs","enable/disable diff recording in demos",(void *)&demorec_diffs_cvar, CVAR_BOOL, 0, 1 },
|
||||
{ "demorec_force","enable/disable forced demo recording",(void *)&demorec_force_cvar, CVAR_BOOL|CVAR_NOSAVE, 0, 1 },
|
||||
{
|
||||
"demorec_difftics","sets game tic interval after which a diff is recorded",
|
||||
(void *)&demorec_difftics_cvar, CVAR_INT, 2, 60*REALGAMETICSPERSEC
|
||||
},
|
||||
{ "demorec_diffcompress","Compression method for diffs. (0: none, 1: KSLZW)",(void *)&demorec_diffcompress_cvar, CVAR_BOOL, 0, 1 },
|
||||
{ "demorec_synccompress","Compression method for input. (0: none, 1: KSLZW)",(void *)&demorec_synccompress_cvar, CVAR_BOOL, 0, 1 },
|
||||
{ "demorec_seeds","enable/disable recording of random seed for later sync checking",(void *)&demorec_seeds_cvar, CVAR_BOOL, 0, 1 },
|
||||
{ "demoplay_diffs","enable/disable application of diffs in demo playback",(void *)&demoplay_diffs, CVAR_BOOL, 0, 1 },
|
||||
{ "demoplay_showsync","enable/disable display of sync status",(void *)&demoplay_showsync, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "fov", "change the field of view", (void *)&ud.fov, CVAR_INT, 60, 140 },
|
||||
|
||||
{ "hud_althud", "enable/disable alternate mini-hud", (void *)&ud.althud, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_custom", "change the custom hud", (void *)&ud.statusbarcustom, CVAR_INT, 0, ud.statusbarrange },
|
||||
{ "hud_position", "aligns the status bar to the bottom/top", (void *)&ud.hudontop, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_bgstretch", "enable/disable background image stretching in wide resolutions", (void *)&ud.bgstretch, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_messagetime", "length of time to display multiplayer chat messages", (void *)&ud.msgdisptime, CVAR_INT, 0, 3600 },
|
||||
{ "hud_numbertile", "first tile in alt hud number set", (void *)&althud_numbertile, CVAR_INT, 0, MAXUSERTILES-10 },
|
||||
{ "hud_numberpal", "pal for alt hud numbers", (void *)&althud_numberpal, CVAR_INT, 0, MAXPALOOKUPS-1 },
|
||||
{ "hud_shadows", "enable/disable althud shadows", (void *)&althud_shadows, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_flashing", "enable/disable althud flashing", (void *)&althud_flashing, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_glowingquotes", "enable/disable \"glowing\" quote text", (void *)&hud_glowingquotes, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_scale","changes the hud scale", (void *)&ud.statusbarscale, CVAR_INT|CVAR_FUNCPTR, 50, 100 },
|
||||
{ "hud_showmapname", "enable/disable map name display on load", (void *)&hud_showmapname, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_stats", "enable/disable level statistics display", (void *)&ud.levelstats, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_textscale", "sets multiplayer chat message size", (void *)&ud.textscale, CVAR_INT, 100, 400 },
|
||||
{ "hud_weaponscale","changes the weapon scale", (void *)&ud.weaponscale, CVAR_INT, 10, 100 },
|
||||
{ "hud_statusbarmode", "change overlay mode of status bar", (void *)&ud.statusbarmode, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
|
||||
#ifdef EDUKE32_TOUCH_DEVICES
|
||||
{ "hud_hidestick", "hide the touch input stick", (void *)&droidinput.hideStick, CVAR_BOOL, 0, 1 },
|
||||
#endif
|
||||
|
||||
{ "in_joystick","enables input from the joystick if it is present",(void *)&ud.setup.usejoystick, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
{ "in_mouse","enables input from the mouse if it is present",(void *)&ud.setup.usemouse, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
|
||||
{ "in_aimmode", "0:toggle, 1:hold to aim", (void *)&ud.mouseaiming, CVAR_BOOL, 0, 1 },
|
||||
{
|
||||
"in_mousebias", "emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time",
|
||||
(void *)&ud.config.MouseBias, CVAR_INT, 0, 32
|
||||
},
|
||||
{ "in_mousedeadzone", "amount of mouse movement to filter out", (void *)&ud.config.MouseDeadZone, CVAR_INT, 0, 512 },
|
||||
{ "in_mouseflip", "invert vertical mouse movement", (void *)&ud.mouseflip, CVAR_BOOL, 0, 1 },
|
||||
{ "in_mousemode", "toggles vertical mouse view", (void *)&g_myAimMode, CVAR_BOOL, 0, 1 },
|
||||
{ "in_mousesmoothing", "enable/disable mouse input smoothing", (void *)&ud.config.SmoothInput, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "mus_enabled", "enables/disables music", (void *)&ud.config.MusicToggle, CVAR_BOOL, 0, 1 },
|
||||
{ "mus_volume", "controls music volume", (void *)&ud.config.MusicVolume, CVAR_INT, 0, 255 },
|
||||
|
||||
{ "osdhightile", "enable/disable hires art replacements for console text", (void *)&osdhightile, CVAR_BOOL, 0, 1 },
|
||||
{ "osdscale", "adjust console text size", (void *)&osdscale, CVAR_FLOAT|CVAR_FUNCPTR, 1, 4 },
|
||||
|
||||
{ "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
|
||||
{ "r_drawweapon", "enable/disable weapon drawing", (void *)&ud.drawweapon, CVAR_INT, 0, 2 },
|
||||
{ "r_showfps", "show the frame rate counter", (void *)&ud.showfps, CVAR_INT, 0, 3 },
|
||||
{ "r_showfpsperiod", "time in seconds before averaging min and max stats for r_showfps 2+", (void *)&ud.frameperiod, CVAR_INT, 0, 5 },
|
||||
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
||||
{ "r_size", "change size of viewable area", (void *)&ud.screen_size, CVAR_INT|CVAR_FUNCPTR, 0, 64 },
|
||||
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
{ "r_upscalefactor", "increase performance by rendering at upscalefactor less than the screen resolution and upscale to the full resolution in the software renderer", (void *)&ud.detail, CVAR_INT|CVAR_FUNCPTR, 1, 16 },
|
||||
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "r_maxfps", "limit the frame rate",(void *)&r_maxfps, CVAR_INT|CVAR_FUNCPTR, 0, 1000 },
|
||||
{ "r_maxfpsoffset", "menu-controlled offset for r_maxfps",(void *)&r_maxfpsoffset, CVAR_INT|CVAR_FUNCPTR, -10, 10 },
|
||||
|
||||
{ "sensitivity","changes the mouse sensitivity", (void *)&CONTROL_MouseSensitivity, CVAR_FLOAT|CVAR_FUNCPTR, 0, 25 },
|
||||
|
||||
{ "skill","changes the game skill setting", (void *)&ud.m_player_skill, CVAR_INT|CVAR_FUNCPTR|CVAR_NOSAVE/*|CVAR_NOMULTI*/, 0, 5 },
|
||||
|
||||
{ "snd_ambience", "enables/disables ambient sounds", (void *)&ud.config.AmbienceToggle, CVAR_BOOL, 0, 1 },
|
||||
{ "snd_enabled", "enables/disables sound effects", (void *)&ud.config.SoundToggle, CVAR_BOOL, 0, 1 },
|
||||
{ "snd_fxvolume", "controls volume for sound effects", (void *)&ud.config.FXVolume, CVAR_INT, 0, 255 },
|
||||
{ "snd_mixrate", "sound mixing rate", (void *)&ud.config.MixRate, CVAR_INT, 0, 48000 },
|
||||
{ "snd_numchannels", "the number of sound channels", (void *)&ud.config.NumChannels, CVAR_INT, 0, 2 },
|
||||
{ "snd_numvoices", "the number of concurrent sounds", (void *)&ud.config.NumVoices, CVAR_INT, 1, 128 },
|
||||
{ "snd_reversestereo", "reverses the stereo channels", (void *)&ud.config.ReverseStereo, CVAR_BOOL, 0, 1 },
|
||||
{ "snd_speech", "enables/disables player speech", (void *)&ud.config.VoiceToggle, CVAR_INT, 0, 5 },
|
||||
{ "snd_tryformats", "enables/disables automatic discovery of replacement sounds and music in .flac and .ogg formats", (void *)&g_maybeUpgradeSoundFormats, CVAR_BOOL, 0, 1 },
|
||||
{ "team","change team in multiplayer", (void *)&ud.team, CVAR_INT|CVAR_MULTI, 0, 3 },
|
||||
|
||||
#ifdef EDUKE32_TOUCH_DEVICES
|
||||
{ "touch_sens_move_x","touch input sensitivity for moving forward/back", (void *)&droidinput.forward_sens, CVAR_FLOAT, 1, 9 },
|
||||
{ "touch_sens_move_y","touch input sensitivity for strafing", (void *)&droidinput.strafe_sens, CVAR_FLOAT, 1, 9 },
|
||||
{ "touch_sens_look_x", "touch input sensitivity for turning left/right", (void *) &droidinput.yaw_sens, CVAR_FLOAT, 1, 9 },
|
||||
{ "touch_sens_look_y", "touch input sensitivity for looking up/down", (void *) &droidinput.pitch_sens, CVAR_FLOAT, 1, 9 },
|
||||
{ "touch_invert", "invert look up/down touch input", (void *) &droidinput.invertLook, CVAR_BOOL, 0, 1 },
|
||||
#endif
|
||||
|
||||
{ "vid_gamma","adjusts gamma component of gamma ramp",(void *)&g_videoGamma, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "vid_contrast","adjusts contrast component of gamma ramp",(void *)&g_videoContrast, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "vid_brightness","adjusts brightness component of gamma ramp",(void *)&g_videoBrightness, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "wchoice","sets weapon autoselection order", (void *)ud.wchoice, CVAR_STRING|CVAR_FUNCPTR, 0, MAX_WEAPONS },
|
||||
};
|
||||
|
||||
osdcmd_cheatsinfo_stat.cheatnum = -1;
|
||||
|
||||
for (auto & cv : cvars_game)
|
||||
{
|
||||
switch (cv.flags & (CVAR_FUNCPTR|CVAR_MULTI))
|
||||
{
|
||||
case CVAR_FUNCPTR:
|
||||
OSD_RegisterCvar(&cv, osdcmd_cvar_set_game); break;
|
||||
case CVAR_MULTI:
|
||||
case CVAR_FUNCPTR|CVAR_MULTI:
|
||||
OSD_RegisterCvar(&cv, osdcmd_cvar_set_multi); break;
|
||||
default:
|
||||
OSD_RegisterCvar(&cv, osdcmd_cvar_set); break;
|
||||
}
|
||||
}
|
||||
|
||||
#if !defined NETCODE_DISABLE
|
||||
OSD_RegisterFunction("connect","connect: connects to a multiplayer game", osdcmd_connect);
|
||||
OSD_RegisterFunction("disconnect","disconnect: disconnects from the local multiplayer game", osdcmd_disconnect);
|
||||
|
|
|
@ -1404,7 +1404,6 @@ static const dataspec_t svgm_udnetw[] =
|
|||
{ DS_NOCHK, &ud.respawn_inventory, sizeof(ud.respawn_inventory), 1 },
|
||||
{ 0, &ud.god, sizeof(ud.god), 1 },
|
||||
{ 0, &ud.auto_run, sizeof(ud.auto_run), 1 },
|
||||
// { DS_NOCHK, &ud.crosshair, sizeof(ud.crosshair), 1 },
|
||||
{ DS_NOCHK, &ud.monsters_off, sizeof(ud.monsters_off), 1 },
|
||||
{ DS_NOCHK, &ud.last_level, sizeof(ud.last_level), 1 },
|
||||
{ 0, &ud.eog, sizeof(ud.eog), 1 },
|
||||
|
|
|
@ -31,6 +31,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "mdsprite.h"
|
||||
#include "sbar.h"
|
||||
#include "screens.h"
|
||||
#include "gamecvars.h"
|
||||
|
||||
BEGIN_DUKE_NS
|
||||
|
||||
|
@ -1119,7 +1120,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
}
|
||||
}
|
||||
|
||||
if (g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && ud.crosshair && ud.camerasprite == -1)
|
||||
if (g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && cl_crosshair && ud.camerasprite == -1)
|
||||
{
|
||||
ud.returnvar[0] = (160<<16) - (g_player[myconnectindex].ps->look_ang<<15);
|
||||
ud.returnvar[1] = 100<<16;
|
||||
|
|
|
@ -254,7 +254,6 @@ void CONFIG_SetDefaults(void)
|
|||
#endif
|
||||
|
||||
ud.color = 0;
|
||||
ud.crosshair = 1;
|
||||
ud.crosshairscale = 50;
|
||||
ud.obituaries = 1;
|
||||
ud.democams = 1;
|
||||
|
|
|
@ -42,6 +42,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "screens.h"
|
||||
#include "cmdline.h"
|
||||
#include "palette.h"
|
||||
#include "gamecvars.h"
|
||||
|
||||
|
||||
// Uncomment to prevent anything except mirrors from drawing. It is sensible to
|
||||
|
@ -6131,8 +6132,8 @@ void G_HandleLocalKeys(void)
|
|||
if (BUTTON(gamefunc_Toggle_Crosshair))
|
||||
{
|
||||
CONTROL_ClearButton(gamefunc_Toggle_Crosshair);
|
||||
ud.crosshair = !ud.crosshair;
|
||||
P_DoQuote(QUOTE_CROSSHAIR_OFF-ud.crosshair,g_player[screenpeek].ps);
|
||||
cl_crosshair = !cl_crosshair;
|
||||
P_DoQuote(QUOTE_CROSSHAIR_OFF-cl_crosshair,g_player[screenpeek].ps);
|
||||
}
|
||||
|
||||
if (ud.overhead_on && BUTTON(gamefunc_Map_Follow_Mode))
|
||||
|
|
|
@ -33,6 +33,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "osdcmds.h"
|
||||
#include "savegame.h"
|
||||
#include "scriplib.h"
|
||||
#include "gamecvars.h"
|
||||
|
||||
#include "debugbreak.h"
|
||||
|
||||
|
|
|
@ -30,6 +30,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "input.h"
|
||||
#include "menus.h"
|
||||
#include "cheats.h"
|
||||
#include "gamecvars.h"
|
||||
#include "../../glbackend/glbackend.h"
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
@ -578,7 +579,7 @@ static MenuEntry_t ME_DISPLAYSETUP_TOUCHALPHA = MAKE_MENUENTRY("UI opacity:", &M
|
|||
|
||||
static char const s_Scale[] = "Scale:";
|
||||
|
||||
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &ud.crosshair);
|
||||
static MenuOption_t MEO_SCREENSETUP_CROSSHAIR = MAKE_MENUOPTION(&MF_Redfont, &MEOS_OffOn, &cl_crosshair.Value);
|
||||
static MenuEntry_t ME_SCREENSETUP_CROSSHAIR = MAKE_MENUENTRY( "Crosshair:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_SCREENSETUP_CROSSHAIR, Option );
|
||||
static MenuRangeInt32_t MEO_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENURANGE( &ud.crosshairscale, &MF_Redfont, 25, 100, 0, 16, 2 );
|
||||
static MenuEntry_t ME_SCREENSETUP_CROSSHAIRSIZE = MAKE_MENUENTRY( s_Scale, &MF_Redfont, &MEF_BigOptions_Apply, &MEO_SCREENSETUP_CROSSHAIRSIZE, RangeInt32 );
|
||||
|
|
|
@ -1359,158 +1359,6 @@ static int osdcmd_cvar_set_multi(osdcmdptr_t parm)
|
|||
|
||||
int32_t registerosdcommands(void)
|
||||
{
|
||||
static osdcvardata_t cvars_game[] =
|
||||
{
|
||||
{ "crosshair", "enable/disable crosshair", (void *)&ud.crosshair, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_autoaim", "enable/disable weapon autoaim", (void *)&ud.config.AutoAim, CVAR_INT|CVAR_MULTI, 0, 3 },
|
||||
{ "cl_automsg", "enable/disable automatically sending messages to all players", (void *)&ud.automsg, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_autorun", "enable/disable autorun", (void *)&ud.auto_run, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_autosave", "enable/disable autosaves", (void *) &ud.autosave, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_autosavedeletion", "enable/disable automatic deletion of autosaves", (void *) &ud.autosavedeletion, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_maxautosaves", "number of autosaves to keep before deleting the oldest", (void *) &ud.maxautosaves, CVAR_INT, 1, 100 },
|
||||
|
||||
{ "cl_autovote", "enable/disable automatic voting", (void *)&ud.autovote, CVAR_INT, 0, 2 },
|
||||
|
||||
{ "cl_cheatmask", "configure what cheats show in the cheats menu", (void *)&cl_cheatmask, CVAR_UINT, 0, ~0 },
|
||||
|
||||
{ "cl_obituaries", "enable/disable multiplayer death messages", (void *)&ud.obituaries, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_democams", "enable/disable demo playback cameras", (void *)&ud.democams, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_idplayers", "enable/disable name display when aiming at opponents", (void *)&ud.idplayers, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_runmode", "enable/disable modernized run key operation", (void *)&ud.runkey_mode, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_showcoords", "show your position in the game world", (void *)&ud.coords, CVAR_INT, 0,
|
||||
#ifdef USE_OPENGL
|
||||
2
|
||||
#else
|
||||
1
|
||||
#endif
|
||||
},
|
||||
|
||||
{ "cl_viewbob", "enable/disable player head bobbing", (void *)&ud.viewbob, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "cl_weaponsway", "enable/disable player weapon swaying", (void *)&ud.weaponsway, CVAR_BOOL, 0, 1 },
|
||||
{ "cl_weaponswitch", "enable/disable auto weapon switching", (void *)&ud.weaponswitch, CVAR_INT|CVAR_MULTI, 0, 7 },
|
||||
|
||||
{ "color", "changes player palette", (void *)&ud.color, CVAR_INT|CVAR_MULTI, 0, MAXPALOOKUPS-1 },
|
||||
|
||||
{ "crosshairscale","changes the size of the crosshair", (void *)&ud.crosshairscale, CVAR_INT, 10, 100 },
|
||||
|
||||
{ "demorec_diffs","enable/disable diff recording in demos",(void *)&demorec_diffs_cvar, CVAR_BOOL, 0, 1 },
|
||||
{ "demorec_force","enable/disable forced demo recording",(void *)&demorec_force_cvar, CVAR_BOOL|CVAR_NOSAVE, 0, 1 },
|
||||
{
|
||||
"demorec_difftics","sets game tic interval after which a diff is recorded",
|
||||
(void *)&demorec_difftics_cvar, CVAR_INT, 2, 60*REALGAMETICSPERSEC
|
||||
},
|
||||
{ "demorec_diffcompress","Compression method for diffs. (0: none, 1: KSLZW)",(void *)&demorec_diffcompress_cvar, CVAR_INT, 0, 1 },
|
||||
{ "demorec_synccompress","Compression method for input. (0: none, 1: KSLZW)",(void *)&demorec_synccompress_cvar, CVAR_INT, 0, 1 },
|
||||
{ "demorec_seeds","enable/disable recording of random seed for later sync checking",(void *)&demorec_seeds_cvar, CVAR_BOOL, 0, 1 },
|
||||
{ "demoplay_diffs","enable/disable application of diffs in demo playback",(void *)&demoplay_diffs, CVAR_BOOL, 0, 1 },
|
||||
{ "demoplay_showsync","enable/disable display of sync status",(void *)&demoplay_showsync, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "fov", "change the field of view", (void *)&ud.fov, CVAR_INT|CVAR_FUNCPTR, 75, 120 },
|
||||
|
||||
{ "hud_althud", "enable/disable alternate mini-hud", (void *)&ud.althud, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_custom", "change the custom hud", (void *)&ud.statusbarcustom, CVAR_INT, 0, ud.statusbarrange },
|
||||
{ "hud_position", "aligns the status bar to the bottom/top", (void *)&ud.hudontop, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_bgstretch", "enable/disable background image stretching in wide resolutions", (void *)&ud.bgstretch, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_messagetime", "length of time to display multiplayer chat messages", (void *)&ud.msgdisptime, CVAR_INT, 0, 3600 },
|
||||
{ "hud_numbertile", "first tile in alt hud number set", (void *)&althud_numbertile, CVAR_INT, 0, MAXUSERTILES-10 },
|
||||
{ "hud_numberpal", "pal for alt hud numbers", (void *)&althud_numberpal, CVAR_INT, 0, MAXPALOOKUPS-1 },
|
||||
{ "hud_shadows", "enable/disable althud shadows", (void *)&althud_shadows, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_flashing", "enable/disable althud flashing", (void *)&althud_flashing, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_glowingquotes", "enable/disable \"glowing\" quote text", (void *)&hud_glowingquotes, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_scale","changes the hud scale", (void *)&ud.statusbarscale, CVAR_INT|CVAR_FUNCPTR, 36, 100 },
|
||||
{ "hud_showmapname", "enable/disable map name display on load", (void *)&hud_showmapname, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_stats", "enable/disable level statistics display", (void *)&ud.levelstats, CVAR_BOOL, 0, 1 },
|
||||
{ "hud_textscale", "sets multiplayer chat message size", (void *)&ud.textscale, CVAR_INT, 100, 400 },
|
||||
{ "hud_weaponscale","changes the weapon scale", (void *)&ud.weaponscale, CVAR_INT, 10, 100 },
|
||||
{ "hud_statusbarmode", "change overlay mode of status bar", (void *)&ud.statusbarmode, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
|
||||
#ifdef EDUKE32_TOUCH_DEVICES
|
||||
{ "hud_hidestick", "hide the touch input stick", (void *)&droidinput.hideStick, CVAR_BOOL, 0, 1 },
|
||||
#endif
|
||||
|
||||
{ "in_joystick","enables input from the joystick if it is present",(void *)&ud.setup.usejoystick, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
{ "in_mouse","enables input from the mouse if it is present",(void *)&ud.setup.usemouse, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
|
||||
{ "in_aimmode", "0:toggle, 1:hold to aim", (void *)&ud.mouseaiming, CVAR_BOOL, 0, 1 },
|
||||
{
|
||||
"in_mousebias", "emulates the original mouse code's weighting of input towards whichever axis is moving the most at any given time",
|
||||
(void *)&ud.config.MouseBias, CVAR_INT, 0, 32
|
||||
},
|
||||
{ "in_mousedeadzone", "amount of mouse movement to filter out", (void *)&ud.config.MouseDeadZone, CVAR_INT, 0, 512 },
|
||||
{ "in_mouseflip", "invert vertical mouse movement", (void *)&ud.mouseflip, CVAR_BOOL, 0, 1 },
|
||||
{ "in_mousemode", "toggles vertical mouse view", (void *)&g_myAimMode, CVAR_BOOL, 0, 1 },
|
||||
{ "in_mousesmoothing", "enable/disable mouse input smoothing", (void *)&ud.config.SmoothInput, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "mus_enabled", "enables/disables music", (void *)&ud.config.MusicToggle, CVAR_BOOL, 0, 1 },
|
||||
{ "mus_volume", "controls music volume", (void *)&ud.config.MusicVolume, CVAR_INT, 0, 255 },
|
||||
|
||||
{ "osdhightile", "enable/disable hires art replacements for console text", (void *)&osdhightile, CVAR_BOOL, 0, 1 },
|
||||
{ "osdscale", "adjust console text size", (void *)&osdscale, CVAR_FLOAT|CVAR_FUNCPTR, 1, 4 },
|
||||
|
||||
{ "r_camrefreshdelay", "minimum delay between security camera sprite updates, 120 = 1 second", (void *)&ud.camera_time, CVAR_INT, 1, 240 },
|
||||
{ "r_drawweapon", "enable/disable weapon drawing", (void *)&ud.drawweapon, CVAR_INT, 0, 2 },
|
||||
{ "r_showfps", "show the frame rate counter", (void *)&ud.showfps, CVAR_INT, 0, 3 },
|
||||
{ "r_showfpsperiod", "time in seconds before averaging min and max stats for r_showfps 2+", (void *)&ud.frameperiod, CVAR_INT, 0, 5 },
|
||||
{ "r_shadows", "enable/disable sprite and model shadows", (void *)&ud.shadows, CVAR_BOOL, 0, 1 },
|
||||
{ "r_size", "change size of viewable area", (void *)&ud.screen_size, CVAR_INT|CVAR_FUNCPTR, 0, 64 },
|
||||
{ "r_rotatespritenowidescreen", "pass bit 1024 to all CON rotatesprite calls", (void *)&g_rotatespriteNoWidescreen, CVAR_BOOL|CVAR_FUNCPTR, 0, 1 },
|
||||
{ "r_upscalefactor", "increase performance by rendering at upscalefactor less than the screen resolution and upscale to the full resolution in the software renderer", (void *)&ud.detail, CVAR_INT|CVAR_FUNCPTR, 1, 16 },
|
||||
{ "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 },
|
||||
|
||||
{ "r_ambientlight", "sets the global map light level",(void *)&r_ambientlight, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "r_maxfps", "limit the frame rate",(void *)&r_maxfps, CVAR_INT|CVAR_FUNCPTR, 0, 1000 },
|
||||
{ "r_maxfpsoffset", "menu-controlled offset for r_maxfps",(void *)&r_maxfpsoffset, CVAR_INT|CVAR_FUNCPTR, -10, 10 },
|
||||
|
||||
{ "sensitivity","changes the mouse sensitivity", (void *)&CONTROL_MouseSensitivity, CVAR_FLOAT|CVAR_FUNCPTR, 0, 25 },
|
||||
|
||||
{ "skill","changes the game skill setting", (void *)&ud.m_player_skill, CVAR_INT|CVAR_FUNCPTR|CVAR_NOSAVE/*|CVAR_NOMULTI*/, 0, 5 },
|
||||
|
||||
{ "snd_ambience", "enables/disables ambient sounds", (void *)&ud.config.AmbienceToggle, CVAR_BOOL, 0, 1 },
|
||||
{ "snd_enabled", "enables/disables sound effects", (void *)&ud.config.SoundToggle, CVAR_BOOL, 0, 1 },
|
||||
{ "snd_fxvolume", "controls volume for sound effects", (void *)&ud.config.FXVolume, CVAR_INT, 0, 255 },
|
||||
{ "snd_mixrate", "sound mixing rate", (void *)&ud.config.MixRate, CVAR_INT, 0, 48000 },
|
||||
{ "snd_numchannels", "the number of sound channels", (void *)&ud.config.NumChannels, CVAR_INT, 0, 2 },
|
||||
{ "snd_numvoices", "the number of concurrent sounds", (void *)&ud.config.NumVoices, CVAR_INT, 1, 128 },
|
||||
{ "snd_reversestereo", "reverses the stereo channels", (void *)&ud.config.ReverseStereo, CVAR_BOOL, 0, 1 },
|
||||
{ "snd_speech", "enables/disables player speech", (void *)&ud.config.VoiceToggle, CVAR_INT, 0, 5 },
|
||||
|
||||
{ "team","change team in multiplayer", (void *)&ud.team, CVAR_INT|CVAR_MULTI, 0, 3 },
|
||||
|
||||
#ifdef EDUKE32_TOUCH_DEVICES
|
||||
{ "touch_sens_move_x","touch input sensitivity for moving forward/back", (void *)&droidinput.forward_sens, CVAR_FLOAT, 1, 9 },
|
||||
{ "touch_sens_move_y","touch input sensitivity for strafing", (void *)&droidinput.strafe_sens, CVAR_FLOAT, 1, 9 },
|
||||
{ "touch_sens_look_x", "touch input sensitivity for turning left/right", (void *) &droidinput.yaw_sens, CVAR_FLOAT, 1, 9 },
|
||||
{ "touch_sens_look_y", "touch input sensitivity for looking up/down", (void *) &droidinput.pitch_sens, CVAR_FLOAT, 1, 9 },
|
||||
{ "touch_invert", "invert look up/down touch input", (void *) &droidinput.invertLook, CVAR_INT, 0, 1 },
|
||||
#endif
|
||||
|
||||
{ "vid_gamma","adjusts gamma component of gamma ramp",(void *)&g_videoGamma, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "vid_contrast","adjusts contrast component of gamma ramp",(void *)&g_videoContrast, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "vid_brightness","adjusts brightness component of gamma ramp",(void *)&g_videoBrightness, CVAR_FLOAT|CVAR_FUNCPTR, 0, 10 },
|
||||
{ "wchoice","sets weapon autoselection order", (void *)ud.wchoice, CVAR_STRING|CVAR_FUNCPTR, 0, MAX_WEAPONS },
|
||||
};
|
||||
|
||||
osdcmd_cheatsinfo_stat.cheatnum = -1;
|
||||
|
||||
for (auto & cv : cvars_game)
|
||||
{
|
||||
switch (cv.flags & (CVAR_FUNCPTR|CVAR_MULTI))
|
||||
{
|
||||
case CVAR_FUNCPTR:
|
||||
OSD_RegisterCvar(&cv, osdcmd_cvar_set_game); break;
|
||||
case CVAR_MULTI:
|
||||
case CVAR_FUNCPTR|CVAR_MULTI:
|
||||
OSD_RegisterCvar(&cv, osdcmd_cvar_set_multi); break;
|
||||
default:
|
||||
OSD_RegisterCvar(&cv, osdcmd_cvar_set); break;
|
||||
}
|
||||
}
|
||||
|
||||
if (VOLUMEONE)
|
||||
OSD_RegisterFunction("changelevel","changelevel <level>: warps to the given level", osdcmd_changelevel);
|
||||
|
|
|
@ -1090,7 +1090,6 @@ static const dataspec_t svgm_udnetw[] =
|
|||
{ DS_NOCHK, &ud.respawn_inventory, sizeof(ud.respawn_inventory), 1 },
|
||||
{ 0, &ud.god, sizeof(ud.god), 1 },
|
||||
{ 0, &ud.auto_run, sizeof(ud.auto_run), 1 },
|
||||
// { DS_NOCHK, &ud.crosshair, sizeof(ud.crosshair), 1 },
|
||||
{ DS_NOCHK, &ud.monsters_off, sizeof(ud.monsters_off), 1 },
|
||||
{ DS_NOCHK, &ud.last_level, sizeof(ud.last_level), 1 },
|
||||
{ 0, &ud.eog, sizeof(ud.eog), 1 },
|
||||
|
|
|
@ -32,6 +32,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|||
#include "osdfuncs.h"
|
||||
#include "demo.h"
|
||||
#include "mdsprite.h"
|
||||
#include "gamecvars.h"
|
||||
|
||||
BEGIN_RR_NS
|
||||
|
||||
|
@ -1144,7 +1145,7 @@ void G_DisplayRest(int32_t smoothratio)
|
|||
}
|
||||
}
|
||||
|
||||
if (g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && ud.crosshair && ud.camerasprite == -1)
|
||||
if (g_player[myconnectindex].ps->newowner == -1 && ud.overhead_on == 0 && cl_crosshair && ud.camerasprite == -1)
|
||||
{
|
||||
int32_t a = CROSSHAIR;
|
||||
if ((unsigned) a < MAXTILES)
|
||||
|
|
Loading…
Reference in a new issue