Merge branch 'main' of ssh+git://git.axiodl.com:6431/AxioDL/metaforce

This commit is contained in:
Phillip Stephens 2021-05-16 12:20:59 -07:00
commit 167b671596
Signed by: Antidote
GPG Key ID: F8BEE4C83DACA60D
3 changed files with 8 additions and 7 deletions

View File

@ -78,8 +78,7 @@ void CTweakGame::initCVars(hecl::CVarManager* mgr) {
constexpr hecl::CVar::EFlags skDefaultFlags = hecl::CVar::EFlags::Game | hecl::CVar::EFlags::Archive;
CREATE_CVAR(WorldPrefix, "", x4_worldPrefix, skDefaultFlags);
CREATE_CVAR(FieldOfView, "", x24_fov, skDefaultFlags);
CREATE_CVAR(SplashScreensDisabled, "", x2b_splashScreensDisabled,
hecl::CVar::EFlags::Game | hecl::CVar::EFlags::Archive);
CREATE_CVAR(SplashScreensDisabled, "", x2b_splashScreensDisabled, skDefaultFlags);
CREATE_CVAR(PressStartDelay, "", x30_pressStartDelay, skDefaultFlags);
CREATE_CVAR(WavecapIntensityNormal, "", x34_wavecapIntensityNormal, skDefaultFlags);
CREATE_CVAR(WavecapIntensityPoison, "", x38_wavecapIntensityPoison, skDefaultFlags);

View File

@ -218,10 +218,7 @@ bool CVar::toBoolean(bool* isValid) const {
return false;
}
if (isValid != nullptr)
*isValid = true;
return athena::utility::parseBool(m_value);
return athena::utility::parseBool(m_value, isValid);
}
int32_t CVar::toSigned(bool* isValid) const {

View File

@ -97,7 +97,11 @@ void CVarManager::deserialize(CVar* cvar) {
if (cvar->isBoolean() && val.empty()) {
// We were deferred without a value, assume true
cvar->fromBoolean(true);
} else if (!val.empty() && cvar->fromLiteralToType(val)) {
cvar->m_wasDeserialized = true;
return;
}
if (!val.empty() && cvar->fromLiteralToType(val)) {
cvar->m_wasDeserialized = true;
return;
}
}
@ -327,6 +331,7 @@ void CVarManager::parseCommandLine(const std::vector<SystemString>& args) {
} else if (!cvarValue.empty()) {
cv->fromLiteralToType(cvarValue);
}
cv->m_wasDeserialized = true;
athena::utility::tolower(cvarName);
if (developerName == cvarName)
/* Make sure we're not overriding developer mode when we restore */