From 390152b0b87416ddf17e2a7b63bbcbf4daa21b84 Mon Sep 17 00:00:00 2001 From: Eugene Sandulenko Date: Fri, 16 Aug 2019 11:12:35 +0200 Subject: HDB: Implement cheating as GUI option --- engines/hdb/POTFILES | 1 + engines/hdb/detection.cpp | 36 +++++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 9 deletions(-) create mode 100644 engines/hdb/POTFILES (limited to 'engines') diff --git a/engines/hdb/POTFILES b/engines/hdb/POTFILES new file mode 100644 index 0000000000..5b8afe7d37 --- /dev/null +++ b/engines/hdb/POTFILES @@ -0,0 +1 @@ +engines/hdb/detection.cpp diff --git a/engines/hdb/detection.cpp b/engines/hdb/detection.cpp index 5637bf08a5..7da1e69ebe 100644 --- a/engines/hdb/detection.cpp +++ b/engines/hdb/detection.cpp @@ -22,6 +22,8 @@ #include "base/plugins.h" +#include "common/translation.h" + #include "engines/advancedDetector.h" #include "graphics/thumbnail.h" @@ -63,6 +65,8 @@ static const PlainGameDescriptor hdbGames[] = { {0, 0} }; +#define GAMEOPTION_CHEATMODE GUIO_GAMEOPTIONS1 + namespace HDB { static const ADGameDescription gameDescriptions[] = { { @@ -72,7 +76,7 @@ static const ADGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformWindows, ADGF_NO_FLAGS, - GUIO1(GUIO_NONE) + GAMEOPTION_CHEATMODE }, { "hdb", @@ -81,7 +85,7 @@ static const ADGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformLinux, ADGF_NO_FLAGS, - GUIO1(GUIO_NONE) + GAMEOPTION_CHEATMODE }, // PocketPC Arm { @@ -91,7 +95,7 @@ static const ADGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformPocketPC, ADGF_NO_FLAGS, - GUIO1(GUIO_NONE) + GAMEOPTION_CHEATMODE }, // Demos @@ -102,7 +106,7 @@ static const ADGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformLinux, ADGF_DEMO, - GUIO1(GUIO_NONE) + GAMEOPTION_CHEATMODE }, { "hdb", @@ -111,7 +115,7 @@ static const ADGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, - GUIO1(GUIO_NONE) + GAMEOPTION_CHEATMODE }, // provided by sev { @@ -121,7 +125,7 @@ static const ADGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, - GUIO1(GUIO_NONE) + GAMEOPTION_CHEATMODE }, { "hdb", @@ -130,7 +134,7 @@ static const ADGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformPocketPC, ADGF_DEMO, - GUIO1(GUIO_NONE) + GAMEOPTION_CHEATMODE }, { "hdb", @@ -139,15 +143,29 @@ static const ADGameDescription gameDescriptions[] = { Common::EN_ANY, Common::kPlatformPocketPC, (ADGF_DEMO | GF_HANDANGO), - GUIO1(GUIO_NONE) + GAMEOPTION_CHEATMODE }, AD_TABLE_END_MARKER }; } // End of namespace HDB +static const ADExtraGuiOptionsMap optionsList[] = { + { + GAMEOPTION_CHEATMODE, + { + _s("Enable cheat mode"), + _s("Debug info and level selection becomes available"), + "hypercheat", + false + } + }, + + AD_EXTRA_GUI_OPTIONS_TERMINATOR +}; + class HDBMetaEngine : public AdvancedMetaEngine { public: - HDBMetaEngine() : AdvancedMetaEngine(HDB::gameDescriptions, sizeof(ADGameDescription), hdbGames) { + HDBMetaEngine() : AdvancedMetaEngine(HDB::gameDescriptions, sizeof(ADGameDescription), hdbGames, optionsList) { _singleId = "hdb"; } -- cgit v1.2.3