HYPNO: add a flag to enable restored content

This commit is contained in:
neuromancer 2022-03-12 10:53:45 +01:00
parent 85c2aee6ec
commit 61f64a4d28
3 changed files with 13 additions and 2 deletions

View File

@ -186,13 +186,20 @@ static const char *const directoryGlobs[] = {
nullptr
};
static const ExtraGuiOption hypnoExtraGuiOption = {
static const ExtraGuiOption hypnoExtraGuiOptionCheats = {
_s("Enable cheats"),
_s("Allow cheats using the C key."),
"cheats",
false
};
static const ExtraGuiOption hypnoExtraGuiOptionRestoredContent = {
_s("Enable restored content"),
_s("Add additional content that is not enabled the original implementation."),
"restored",
false
};
class HypnoMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
HypnoMetaEngineDetection() : AdvancedMetaEngineDetection(Hypno::gameDescriptions, sizeof(ADGameDescription), Hypno::hypnoGames) {
@ -223,7 +230,8 @@ public:
const ExtraGuiOptions HypnoMetaEngineDetection::getExtraGuiOptions(const Common::String &target) const {
ExtraGuiOptions options;
options.push_back(hypnoExtraGuiOption);
options.push_back(hypnoExtraGuiOptionCheats);
options.push_back(hypnoExtraGuiOptionRestoredContent);
return options;
}

View File

@ -70,6 +70,8 @@ HypnoEngine::HypnoEngine(OSystem *syst, const ADGameDescription *gd)
if (!Common::parseBool(ConfMan.get("cheats"), _cheatsEnabled))
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
Hotspot q(MakeMenu);
Action *a = new Quit();

View File

@ -82,6 +82,7 @@ public:
Common::Platform _platform;
Common::String _variant;
bool _cheatsEnabled;
bool _restoredContentEnabled;
Audio::SoundHandle _soundHandle;
Common::InstallShieldV3 _installerArchive;