HYPNO: enable explicit cheat to unlock all levels

This commit is contained in:
neuromancer 2022-06-07 08:43:14 +02:00
parent 72d79bb184
commit aa88bd8f55
3 changed files with 14 additions and 0 deletions

View File

@ -277,6 +277,15 @@ static const ExtraGuiOption hypnoExtraGuiOptionInfiniteAmmoCheat = {
0
};
static const ExtraGuiOption hypnoExtraGuiOptionUnlockAllLevels = {
_s("Unlock all levels"),
_s("All levels will be available to play."),
"unlockAllLevels",
false,
0,
0
};
static const ExtraGuiOption hypnoExtraGuiOptionRestoredContent = {
_s("Enable restored content"),
_s("Add additional content that is not enabled the original implementation."),
@ -321,6 +330,7 @@ const ExtraGuiOptions HypnoMetaEngineDetection::getExtraGuiOptions(const Common:
options.push_back(hypnoExtraGuiOptionInfiniteHealthCheat);
options.push_back(hypnoExtraGuiOptionInfiniteAmmoCheat);
options.push_back(hypnoExtraGuiOptionRestoredContent);
options.push_back(hypnoExtraGuiOptionUnlockAllLevels);
return options;
}

View File

@ -77,6 +77,9 @@ HypnoEngine::HypnoEngine(OSystem *syst, const ADGameDescription *gd)
if (!Common::parseBool(ConfMan.get("infiniteAmmo"), _infiniteAmmoCheat))
error("Failed to parse bool from cheats options");
if (!Common::parseBool(ConfMan.get("unlockAllLevels"), _unlockAllLevels))
error("Failed to parse bool from cheats options");
if (!Common::parseBool(ConfMan.get("restored"), _restoredContentEnabled))
error("Failed to parse bool from restored options");
// Add quit level

View File

@ -96,6 +96,7 @@ public:
bool _cheatsEnabled;
bool _infiniteHealthCheat;
bool _infiniteAmmoCheat;
bool _unlockAllLevels;
bool _restoredContentEnabled;
Audio::SoundHandle _soundHandle;