- r_useprecache

This commit is contained in:
Christoph Oelckers 2019-10-23 14:39:33 +02:00
parent 63f020996e
commit 43413e4dff
14 changed files with 16 additions and 25 deletions

View File

@ -416,7 +416,7 @@ void PreloadCache(void)
tileLoad(i);
#ifdef USE_OPENGL
if (useprecache) PrecacheHardwareTextures(i);
if (r_precache) PrecacheHardwareTextures(i);
#endif
MUSIC_Update();

View File

@ -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;

View File

@ -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;

View File

@ -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)

View File

@ -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.", };

View File

@ -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 },

View File

@ -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;

View File

@ -240,7 +240,6 @@ typedef struct {
int32_t CheckForUpdates;
int32_t LastUpdateCheck;
int32_t useprecache;
} config;
ud_setup_t setup;

View File

@ -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.", };

View File

@ -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();

View File

@ -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;

View File

@ -214,7 +214,6 @@ typedef struct {
int32_t CheckForUpdates;
int32_t LastUpdateCheck;
int32_t useprecache;
} config;
ud_setup_t setup;

View File

@ -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++;

View File

@ -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++;