diff --git a/source/blood/src/blood.cpp b/source/blood/src/blood.cpp index 518cd1660..ac819ae73 100644 --- a/source/blood/src/blood.cpp +++ b/source/blood/src/blood.cpp @@ -416,7 +416,7 @@ void PreloadCache(void) tileLoad(i); #ifdef USE_OPENGL - if (useprecache) PrecacheHardwareTextures(i); + if (r_precache) PrecacheHardwareTextures(i); #endif MUSIC_Update(); diff --git a/source/blood/src/config.cpp b/source/blood/src/config.cpp index 4ce9ae4df..e8380d6e0 100644 --- a/source/blood/src/config.cpp +++ b/source/blood/src/config.cpp @@ -73,7 +73,6 @@ int32_t mus_restartonload; int32_t configversion; int32_t CheckForUpdates; int32_t LastUpdateCheck; -int32_t useprecache; char CommbatMacro[MAXRIDECULE][MAXRIDECULELENGTH]; char szPlayerName[MAXPLAYERNAME]; int32_t gTurnSpeed; @@ -279,7 +278,6 @@ void CONFIG_SetDefaults(void) gBrightness = 8; //ud.config.ShowWeapons = 0; - useprecache = 1; configversion = 0; //ud.crosshair = 1; //ud.default_skill = 1; diff --git a/source/blood/src/config.h b/source/blood/src/config.h index 29168924e..764afb982 100644 --- a/source/blood/src/config.h +++ b/source/blood/src/config.h @@ -54,7 +54,6 @@ extern int32_t setupread; extern int32_t configversion; extern int32_t CheckForUpdates; extern int32_t LastUpdateCheck; -extern int32_t useprecache; extern char CommbatMacro[MAXRIDECULE][MAXRIDECULELENGTH]; extern char szPlayerName[MAXPLAYERNAME]; extern int32_t gTurnSpeed; diff --git a/source/blood/src/menu.cpp b/source/blood/src/menu.cpp index 943c3cb15..af78a3c60 100644 --- a/source/blood/src/menu.cpp +++ b/source/blood/src/menu.cpp @@ -1712,7 +1712,7 @@ void SetupVideoPolymostMenu(CGameMenuItemChain *pItem) } itemOptionsDisplayPolymostTrueColorTextures.at20 = usehightile; itemOptionsDisplayPolymostTexQuality.m_nFocus = r_downsize; - itemOptionsDisplayPolymostPreloadCache.at20 = useprecache; + itemOptionsDisplayPolymostPreloadCache.at20 = r_precache; itemOptionsDisplayPolymostDetailTex.at20 = r_detailmapping; itemOptionsDisplayPolymostGlowTex.at20 = r_glowmapping; itemOptionsDisplayPolymost3DModels.at20 = usemodels; @@ -1755,7 +1755,7 @@ void UpdateTexQuality(CGameMenuItemZCycle *pItem) void UpdatePreloadCache(CGameMenuItemZBool *pItem) { - useprecache = pItem->at20; + r_precache = pItem->at20; } void UpdateDetailTex(CGameMenuItemZBool *pItem) diff --git a/source/blood/src/menus.cpp b/source/blood/src/menus.cpp index 516b6e1c2..0aaf889c9 100644 --- a/source/blood/src/menus.cpp +++ b/source/blood/src/menus.cpp @@ -1043,7 +1043,7 @@ static MenuOption_t MEO_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTION(&MF_Bluefont, static MenuEntry_t ME_RENDERERSETUP_TEXQUALITY = MAKE_MENUENTRY("GL texture quality:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXQUALITY, Option); -static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.config.useprecache ); +static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &r_precache.Value ); static MenuEntry_t ME_RENDERERSETUP_PRECACHE = MAKE_MENUENTRY( "Pre-load map textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_PRECACHE, Option ); # ifndef EDUKE32_GLES static char const *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compr.", }; diff --git a/source/common/gamecvars.cpp b/source/common/gamecvars.cpp index 26edee3b8..5a331fcc8 100644 --- a/source/common/gamecvars.cpp +++ b/source/common/gamecvars.cpp @@ -230,6 +230,7 @@ CUSTOM_CVARD(Bool, in_mouse, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG|CVAR_NOINITCAL CONTROL_MouseEnabled = (self && CONTROL_MousePresent); } +// Does it even make sense to have this configurable? It is in the menu but can be switched around at will by the mouse input code. int32_t g_MyAimMode = 1; CUSTOM_CVARD(Bool, in_mousemode, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "toggles vertical mouse view") { @@ -284,18 +285,20 @@ CVARD(Bool, r_shadows, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable spr // Gross hack stuff. Only settable from the command line CVARD(Bool, r_rotatespritenowidescreen, false, CVAR_NOSET, "pass bit 1024 to all CON rotatesprite calls") +CVARD(Bool, r_precache, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "enable/disable the pre-level caching routine") + +CUSTOM_CVAR(Int, r_maxfps, 200, CVAR_ARCHIVE|CVAR_GLOBALCONFIG, "limit the frame rate") +{ + if (self < 30) self = 30; + else if (self > 1000) self = 1000; +} #if 0 // DN3D static osdcvardata_t cvars_game[] = { - { "r_precache", "enable/disable the pre-level caching routine", (void *)&ud.config.useprecache, CVAR_BOOL, 0, 1 }, - { "r_precache", "enable/disable the pre-level caching routine", (void *)&useprecache, CVAR_BOOL, 0, 1 }, - - { "r_maxfps", "limit the frame rate",(void *)&r_maxfps, CVAR_INT|CVAR_FUNCPTR, 0, 1000 }, - { "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 }, { "r_maxfpsoffset", "menu-controlled offset for r_maxfps",(void *)&r_maxfpsoffset, CVAR_INT|CVAR_FUNCPTR, -10, 10 }, diff --git a/source/duke3d/src/config.cpp b/source/duke3d/src/config.cpp index ff9fb96ca..a16a70a88 100644 --- a/source/duke3d/src/config.cpp +++ b/source/duke3d/src/config.cpp @@ -240,8 +240,6 @@ void CONFIG_SetDefaults(void) ud.color = 0; ud.config.CheckForUpdates = 1; ud.config.ShowWeapons = 0; - in_mousesmoothing = 1; - ud.config.useprecache = 1; ud.configversion = 0; ud.default_skill = 1; ud.detail = 0; diff --git a/source/duke3d/src/game.h b/source/duke3d/src/game.h index 8619277b2..e3a172a02 100644 --- a/source/duke3d/src/game.h +++ b/source/duke3d/src/game.h @@ -240,7 +240,6 @@ typedef struct { int32_t CheckForUpdates; int32_t LastUpdateCheck; - int32_t useprecache; } config; ud_setup_t setup; diff --git a/source/duke3d/src/menus.cpp b/source/duke3d/src/menus.cpp index c539ebfea..219b74a30 100644 --- a/source/duke3d/src/menus.cpp +++ b/source/duke3d/src/menus.cpp @@ -1042,7 +1042,7 @@ static MenuOption_t MEO_RENDERERSETUP_TEXQUALITY = MAKE_MENUOPTION(&MF_Bluefont, static MenuEntry_t ME_RENDERERSETUP_TEXQUALITY = MAKE_MENUENTRY("GL texture quality:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_TEXQUALITY, Option); -static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &ud.config.useprecache ); +static MenuOption_t MEO_RENDERERSETUP_PRECACHE = MAKE_MENUOPTION( &MF_Bluefont, &MEOS_OffOn, &r_precache.Value ); static MenuEntry_t ME_RENDERERSETUP_PRECACHE = MAKE_MENUENTRY( "Pre-load map textures:", &MF_Bluefont, &MEF_SmallOptions, &MEO_RENDERERSETUP_PRECACHE, Option ); # ifndef EDUKE32_GLES static char const *MEOSN_RENDERERSETUP_TEXCACHE[] = { "Off", "On", "Compr.", }; diff --git a/source/duke3d/src/premap.cpp b/source/duke3d/src/premap.cpp index 229422b29..0f758307c 100644 --- a/source/duke3d/src/premap.cpp +++ b/source/duke3d/src/premap.cpp @@ -464,7 +464,7 @@ void G_CacheMapData(void) tileLoad(i); #ifdef USE_OPENGL - if (ud.config.useprecache) PrecacheHardwareTextures(i); + if (r_precache) PrecacheHardwareTextures(i); #endif MUSIC_Update(); diff --git a/source/rr/src/config.cpp b/source/rr/src/config.cpp index 3009c3476..39a38810c 100644 --- a/source/rr/src/config.cpp +++ b/source/rr/src/config.cpp @@ -211,8 +211,6 @@ void CONFIG_SetDefaults(void) #else ud.setup.bpp = 8; #endif - ud.config.useprecache = 1; - in_mousebias = 0; g_player[0].ps->aim_mode = 1; ud.config.ShowOpponentWeapons = 0; ud.althud = 1; @@ -224,7 +222,6 @@ void CONFIG_SetDefaults(void) ud.color = 0; ud.detail = 0; - r_drawweapon = 1; ud.lockout = 0; ud.m_ffire = 1; ud.m_marker = 1; @@ -240,14 +237,12 @@ void CONFIG_SetDefaults(void) ud.statusbarmode = 1; ud.statusbarscale = 100; ud.team = 0; - cl_weaponswitch = 3; // new+empty ud.angleinterpolation = 0; ud.setup.forcesetup = 1; ud.setup.noautoload = 1; ud.setup.fullscreen = 1; - snd_speech = 5; // bitfield, 1 = local, 2 = dummy, 4 = other players in DM ud.display_bonus_screen = 1; ud.show_level_text = 1; ud.configversion = 0; diff --git a/source/rr/src/game.h b/source/rr/src/game.h index 4ed9e4a93..eaf6a63f3 100644 --- a/source/rr/src/game.h +++ b/source/rr/src/game.h @@ -214,7 +214,6 @@ typedef struct { int32_t CheckForUpdates; int32_t LastUpdateCheck; - int32_t useprecache; } config; ud_setup_t setup; diff --git a/source/rr/src/premap.cpp b/source/rr/src/premap.cpp index 382cd4d65..2315402ea 100644 --- a/source/rr/src/premap.cpp +++ b/source/rr/src/premap.cpp @@ -618,7 +618,7 @@ void G_CacheMapData(void) tileLoad(i); #ifdef USE_OPENGL - if (ud.config.useprecache) PrecacheHardwareTextures(i); + if (r_precache) PrecacheHardwareTextures(i); #endif j++; pc++; diff --git a/source/sw/src/cache.cpp b/source/sw/src/cache.cpp index f8ff86f4f..3ab5fc762 100644 --- a/source/sw/src/cache.cpp +++ b/source/sw/src/cache.cpp @@ -637,7 +637,7 @@ void DoTheCache(void) if (videoGetRenderMode() < REND_POLYMOST) tileLoad(i); #ifdef USE_OPENGL - /*if (useprecache)*/ PrecacheHardwareTextures(i); + if (r_precache) PrecacheHardwareTextures(i); #endif cnt++;