[Scummvm-git-logs] scummvm master -> 2c8a7d390071728971c4331357763a4a19b4bdd1
sev-
noreply at scummvm.org
Wed Nov 16 22:59:16 UTC 2022
This automated email contains information about 43 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
fd37e09acb ENGINES: Allow getExtraGuiOptions() to be implemented in MetaEngine subclasses
794a61395a ADL: Move the engine options into the MetaEngine subclass
2c306f7624 AGI: Move the engine options into the MetaEngine subclass
69a7c386a9 AGOS: Move the engine options into the MetaEngine subclass
53a70986ac BLADERUNNER: Move the engine options into the MetaEngine subclass
38596980b1 BURIED: Move the engine options into the MetaEngine subclass
9297e6fbfa CGE: Move the engine options into the MetaEngine subclass
66b2483fd5 CGE2: Move the engine options into the MetaEngine subclass
d8c06f9869 CHEWY: Move the engine options into the MetaEngine subclass
bf02991f02 CINE: Move the engine options into the MetaEngine subclass
48e7c9c956 DRASCULA: Move the engine options into the MetaEngine subclass
c11cf35f48 DREAMWEB: Move the engine options into the MetaEngine subclass
2d6ac650b3 GLK: Move the engine options into the MetaEngine subclass
e8dee87a04 GRIFFON: Move the engine options into the MetaEngine subclass
6c20aaa057 GRIM: Move the engine options into the MetaEngine subclass
ea9722bcea GROOVIE: Move the engine options into the MetaEngine subclass
8c46a377ec HDB: Move the engine options into the MetaEngine subclass
328c2333c9 HOPKINS: Move the engine options into the MetaEngine subclass
a7cfc03df0 HYPNO: Move the engine options into the MetaEngine subclass
ca29054d6b KYRA: Move the engine options into the MetaEngine subclass
0a3d7be2e8 LURE: Move the engine options into the MetaEngine subclass
f3cb449566 MADE: Move the engine options into the MetaEngine subclass
1f0a0ebe87 MADS: Move the engine options into the MetaEngine subclass
425bcfeb0c MTROPOLIS: Move the engine options into the MetaEngine subclass
dbbf3d35c1 MYST3: Move the engine options into the MetaEngine subclass
37ee0ca0ef NEVERHOOD: Move the engine options into the MetaEngine subclass
ac5858ba65 QUEEN: Move the engine options into the MetaEngine subclass
7a7ba38f3c SCUMM: Move the engine options into the MetaEngine subclass
bb788e054b SHERLOCK: Move the engine options into the MetaEngine subclass
4e3498c580 SKY: Move the engine options into the MetaEngine subclass
6a1bccc649 STARK: Move the engine options into the MetaEngine subclass
32c49c29be SUPERNOVA: Move the engine options into the MetaEngine subclass
b272c96668 SWORD2: Move the engine options into the MetaEngine subclass
fbea7888a0 SWORD25: Move the engine options into the MetaEngine subclass
0b58507314 TOLTECS: Move the engine options into the MetaEngine subclass
3c61812ed8 TRECISION: Move the engine options into the MetaEngine subclass
a46a6e15ee TWINE: Move the engine options into the MetaEngine subclass
5c557c480b ULTIMA: Move the engine options into the MetaEngine subclass
d2555ce998 WINTERMUTE: Move the engine options into the MetaEngine subclass
33e8509634 XEEN: Move the engine options into the MetaEngine subclass
4860969b85 ZVISION: Move the engine options into the MetaEngine subclass
0da774a218 FREESCAPE: Move the engine options into the MetaEngine subclass
2c8a7d3900 ENGINES: Remove support for GUI options in MetaEngineDetection subclasses
Commit: fd37e09acb32613bdf5f40ad166c721d5a965af6
https://github.com/scummvm/scummvm/commit/fd37e09acb32613bdf5f40ad166c721d5a965af6
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
ENGINES: Allow getExtraGuiOptions() to be implemented in MetaEngine subclasses
Changed paths:
engines/advancedDetector.cpp
engines/advancedDetector.h
engines/metaengine.cpp
engines/metaengine.h
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 5d5558e5014..18d9bcdaafe 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -337,6 +337,35 @@ const ExtraGuiOptions AdvancedMetaEngineDetection::getExtraGuiOptions(const Comm
return options;
}
+const ExtraGuiOptions AdvancedMetaEngine::getExtraGuiOptions(const Common::String &target) const {
+ const ADExtraGuiOptionsMap *extraGuiOptions = getAdvancedExtraGuiOptions();
+ if (!extraGuiOptions)
+ return ExtraGuiOptions();
+
+ ExtraGuiOptions options;
+
+ // If there isn't any target specified, return all available GUI options.
+ // Only used when an engine starts in order to set option defaults.
+ if (target.empty()) {
+ for (const ADExtraGuiOptionsMap *entry = extraGuiOptions; entry->guioFlag; ++entry)
+ options.push_back(entry->option);
+
+ return options;
+ }
+
+ // Query the GUI options
+ const Common::String guiOptionsString = ConfMan.get("guioptions", target);
+ const Common::String guiOptions = parseGameGUIOptions(guiOptionsString);
+
+ // Add all the applying extra GUI options.
+ for (const ADExtraGuiOptionsMap *entry = extraGuiOptions; entry->guioFlag; ++entry) {
+ if (guiOptions.contains(entry->guioFlag))
+ options.push_back(entry->option);
+ }
+
+ return options;
+}
+
Common::Error AdvancedMetaEngineDetection::createInstance(OSystem *syst, Engine **engine) {
assert(engine);
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index ab0d7113e06..351071e3a04 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -531,6 +531,28 @@ public:
* Based on @ref MetaEngine::getFileProperties.
*/
bool getFilePropertiesExtern(uint md5Bytes, const FileMap &allFiles, const ADGameDescription &game, const Common::String &fname, FileProperties &fileProps) const;
+
+protected:
+ /**
+ * Return a list of extra GUI options for the specified target.
+ *
+ * If no target is specified, all of the available custom GUI options are
+ * returned for the plugin (used to set default values).
+ *
+ * Currently, this only supports options with checkboxes.
+ *
+ * The default implementation returns an empty list.
+ *
+ * @param target Name of a config manager target.
+ *
+ * @return A list of extra GUI options for an engine plugin and target.
+ */
+ const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override final;
+
+ /**
+ * Returns a map containing all the extra game GUI options the engine supports.
+ */
+ virtual const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const { return nullptr; }
};
/**
diff --git a/engines/metaengine.cpp b/engines/metaengine.cpp
index 1373c75b83b..707f2a063df 100644
--- a/engines/metaengine.cpp
+++ b/engines/metaengine.cpp
@@ -384,6 +384,17 @@ SaveStateList MetaEngine::listSaves(const char *target, bool saveMode) const {
return saveList;
}
+void MetaEngine::registerDefaultSettings(const Common::String &) const {
+ // Note that as we don't pass the target to getExtraGuiOptions
+ // we get all the options, even those not relevant for the current
+ // game. This is necessary because some engines unconditionally
+ // access the configuration.
+ const ExtraGuiOptions engineOptions = getExtraGuiOptions("");
+ for (uint i = 0; i < engineOptions.size(); i++) {
+ ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState);
+ }
+}
+
void MetaEngineDetection::registerDefaultSettings(const Common::String &) const {
// Note that as we don't pass the target to getExtraGuiOptions
// we get all the options, even those not relevant for the current
@@ -395,6 +406,15 @@ void MetaEngineDetection::registerDefaultSettings(const Common::String &) const
}
}
+GUI::OptionsContainerWidget *MetaEngine::buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
+ const ExtraGuiOptions engineOptions = getExtraGuiOptions(target);
+ if (engineOptions.empty()) {
+ return nullptr;
+ }
+
+ return new GUI::ExtraGuiOptionsWidget(boss, name, target, engineOptions);
+}
+
GUI::OptionsContainerWidget *MetaEngineDetection::buildEngineOptionsWidgetStatic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
const ExtraGuiOptions engineOptions = getExtraGuiOptions(target);
if (engineOptions.empty()) {
diff --git a/engines/metaengine.h b/engines/metaengine.h
index bb3877c59aa..21a5220d687 100644
--- a/engines/metaengine.h
+++ b/engines/metaengine.h
@@ -261,6 +261,24 @@ protected:
*/
int findEmptySaveSlot(const char *target);
+ /**
+ * Return a list of extra GUI options for the specified target.
+ *
+ * If no target is specified, all of the available custom GUI options are
+ * returned for the plugin (used to set default values).
+ *
+ * Currently, this only supports options with checkboxes.
+ *
+ * The default implementation returns an empty list.
+ *
+ * @param target Name of a config manager target.
+ *
+ * @return A list of extra GUI options for an engine plugin and target.
+ */
+ virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const {
+ return ExtraGuiOptions();
+ }
+
public:
virtual ~MetaEngine() {}
@@ -404,7 +422,7 @@ public:
*
* @param target Name of a config manager target.
*/
- virtual void registerDefaultSettings(const Common::String &target) const {}
+ virtual void registerDefaultSettings(const Common::String &target) const;
/**
* Return a GUI widget container for configuring the specified target options.
@@ -418,9 +436,7 @@ public:
* @param name The name that the returned widget must use.
* @param target Name of a config manager target.
*/
- virtual GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
- return nullptr;
- }
+ virtual GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const;
/**
* MetaEngine feature flags.
Commit: 794a61395a1d2abea01798fa62c20950a6dfec01
https://github.com/scummvm/scummvm/commit/794a61395a1d2abea01798fa62c20950a6dfec01
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
ADL: Move the engine options into the MetaEngine subclass
Changed paths:
engines/adl/POTFILES
engines/adl/detection.cpp
engines/adl/detection.h
engines/adl/metaengine.cpp
diff --git a/engines/adl/POTFILES b/engines/adl/POTFILES
index 5db3e19a4fa..827634c7a48 100644
--- a/engines/adl/POTFILES
+++ b/engines/adl/POTFILES
@@ -1,2 +1 @@
-engines/adl/detection.cpp
engines/adl/metaengine.cpp
diff --git a/engines/adl/detection.cpp b/engines/adl/detection.cpp
index 8c74f8369c0..3cd25e5e17f 100644
--- a/engines/adl/detection.cpp
+++ b/engines/adl/detection.cpp
@@ -19,7 +19,6 @@
*
*/
-#include "common/translation.h"
#include "common/file.h"
#include "common/md5.h"
#include "common/debug.h"
@@ -33,83 +32,11 @@
namespace Adl {
-// Mystery House was designed for monochrome display, so we default to
-// monochrome mode there. All the other games default to color mode.
-#define GAMEOPTION_COLOR_DEFAULT_OFF GUIO_GAMEOPTIONS1
-#define GAMEOPTION_SCANLINES GUIO_GAMEOPTIONS2
-#define GAMEOPTION_COLOR_DEFAULT_ON GUIO_GAMEOPTIONS3
-#define GAMEOPTION_NTSC GUIO_GAMEOPTIONS4
-#define GAMEOPTION_MONO_TEXT GUIO_GAMEOPTIONS5
-
static const DebugChannelDef debugFlagList[] = {
{Adl::kDebugChannelScript, "Script", "Trace script execution"},
DEBUG_CHANNEL_END
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_NTSC,
- {
- _s("TV emulation"),
- _s("Emulate composite output to an NTSC TV"),
- "ntsc",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_COLOR_DEFAULT_OFF,
- {
- _s("Color graphics"),
- _s("Use color graphics instead of monochrome"),
- "color",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_COLOR_DEFAULT_ON,
- {
- _s("Color graphics"),
- _s("Use color graphics instead of monochrome"),
- "color",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_SCANLINES,
- {
- _s("Show scanlines"),
- _s("Darken every other scanline to mimic the look of a CRT"),
- "scanlines",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_MONO_TEXT,
- {
- _s("Always use sharp monochrome text"),
- _s("Do not emulate NTSC artifacts for text"),
- "monotext",
- true,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
#define DEFAULT_OPTIONS GUIO5(GAMEOPTION_NTSC, GAMEOPTION_COLOR_DEFAULT_ON, GAMEOPTION_MONO_TEXT, GAMEOPTION_SCANLINES, GUIO_NOMIDI)
#define MH_OPTIONS GUIO5(GAMEOPTION_NTSC, GAMEOPTION_COLOR_DEFAULT_OFF, GAMEOPTION_MONO_TEXT, GAMEOPTION_SCANLINES, GUIO_NOMIDI)
@@ -470,7 +397,7 @@ static const AdlGameDescription gameDiskDescriptions[] = {
class AdlMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- AdlMetaEngineDetection() : AdvancedMetaEngineDetection(gameFileDescriptions, sizeof(AdlGameDescription), adlGames, optionsList) { }
+ AdlMetaEngineDetection() : AdvancedMetaEngineDetection(gameFileDescriptions, sizeof(AdlGameDescription), adlGames) { }
const char *getEngineName() const override {
return "ADL";
diff --git a/engines/adl/detection.h b/engines/adl/detection.h
index bf01093f937..0592a1f804f 100644
--- a/engines/adl/detection.h
+++ b/engines/adl/detection.h
@@ -71,6 +71,14 @@ struct AdlGameDescription {
GameVersion version;
};
+// Mystery House was designed for monochrome display, so we default to
+// monochrome mode there. All the other games default to color mode.
+#define GAMEOPTION_COLOR_DEFAULT_OFF GUIO_GAMEOPTIONS1
+#define GAMEOPTION_SCANLINES GUIO_GAMEOPTIONS2
+#define GAMEOPTION_COLOR_DEFAULT_ON GUIO_GAMEOPTIONS3
+#define GAMEOPTION_NTSC GUIO_GAMEOPTIONS4
+#define GAMEOPTION_MONO_TEXT GUIO_GAMEOPTIONS5
+
} // End of namespace Adl
#endif // ADL_DETECTION_H
diff --git a/engines/adl/metaengine.cpp b/engines/adl/metaengine.cpp
index 7d317589fad..3469d772f67 100644
--- a/engines/adl/metaengine.cpp
+++ b/engines/adl/metaengine.cpp
@@ -37,6 +37,70 @@
namespace Adl {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_NTSC,
+ {
+ _s("TV emulation"),
+ _s("Emulate composite output to an NTSC TV"),
+ "ntsc",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_COLOR_DEFAULT_OFF,
+ {
+ _s("Color graphics"),
+ _s("Use color graphics instead of monochrome"),
+ "color",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_COLOR_DEFAULT_ON,
+ {
+ _s("Color graphics"),
+ _s("Use color graphics instead of monochrome"),
+ "color",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_SCANLINES,
+ {
+ _s("Show scanlines"),
+ _s("Darken every other scanline to mimic the look of a CRT"),
+ "scanlines",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_MONO_TEXT,
+ {
+ _s("Always use sharp monochrome text"),
+ _s("Do not emulate NTSC artifacts for text"),
+ "monotext",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
Common::String getDiskImageName(const AdlGameDescription &adlDesc, byte volume) {
const ADGameDescription &desc = adlDesc.desc;
for (uint i = 0; desc.filesDescriptions[i].fileName; ++i) {
@@ -81,6 +145,10 @@ public:
return "adl";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
int getAutosaveSlot() const override { return 15; }
Commit: 2c306f7624ab78f93a6f868fcd3f314f2f4b4376
https://github.com/scummvm/scummvm/commit/2c306f7624ab78f93a6f868fcd3f314f2f4b4376
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
AGI: Move the engine options into the MetaEngine subclass
Changed paths:
engines/agi/POTFILES
engines/agi/detection.cpp
engines/agi/detection.h
engines/agi/detection_tables.h
engines/agi/metaengine.cpp
diff --git a/engines/agi/POTFILES b/engines/agi/POTFILES
index fb6326869bf..3abb9fb7bc6 100644
--- a/engines/agi/POTFILES
+++ b/engines/agi/POTFILES
@@ -1,3 +1,4 @@
-engines/agi/detection.cpp
+engines/agi/detection_tables.h
engines/agi/font.cpp
+engines/agi/metaengine.cpp
engines/agi/saveload.cpp
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp
index de079440584..b5b0dd75eb1 100644
--- a/engines/agi/detection.cpp
+++ b/engines/agi/detection.cpp
@@ -81,82 +81,6 @@ static const PlainGameDescriptor agiGames[] = {
#include "agi/detection_tables.h"
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE,
- {
- _s("Use an alternative palette"),
- _s("Use an alternative palette, common for all Amiga games. This was the old behavior"),
- "altamigapalette",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_DISABLE_MOUSE,
- {
- _s("Mouse support"),
- _s("Enables mouse support. Allows to use mouse for movement and in game menus."),
- "mousesupport",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_USE_HERCULES_FONT,
- {
- _s("Use Hercules hires font"),
- _s("Uses Hercules hires font, when font file is available."),
- "herculesfont",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_COMMAND_PROMPT_WINDOW,
- {
- _s("Pause when entering commands"),
- _s("Shows a command prompt window and pauses the game (like in SCI) instead of a real-time prompt."),
- "commandpromptwindow",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_APPLE2GS_ADD_SPEED_MENU,
- {
- _s("Add speed menu"),
- _s("Add game speed menu (similar to PC version)"),
- "apple2gs_speedmenu",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
using namespace Agi;
class AgiMetaEngineDetection : public AdvancedMetaEngineDetection {
@@ -164,7 +88,7 @@ class AgiMetaEngineDetection : public AdvancedMetaEngineDetection {
mutable Common::String _extra;
public:
- AgiMetaEngineDetection() : AdvancedMetaEngineDetection(Agi::gameDescriptions, sizeof(Agi::AGIGameDescription), agiGames, optionsList) {
+ AgiMetaEngineDetection() : AdvancedMetaEngineDetection(Agi::gameDescriptions, sizeof(Agi::AGIGameDescription), agiGames) {
_guiOptions = GUIO1(GUIO_NOSPEECH);
_maxScanDepth = 2;
_flags = kADFlagMatchFullPaths;
diff --git a/engines/agi/detection.h b/engines/agi/detection.h
index 751e9db4a8a..63101e67e58 100644
--- a/engines/agi/detection.h
+++ b/engines/agi/detection.h
@@ -85,6 +85,14 @@ struct AGIGameDescription {
uint16 version;
};
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
+#define GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE GUIO_GAMEOPTIONS2
+#define GAMEOPTION_DISABLE_MOUSE GUIO_GAMEOPTIONS3
+#define GAMEOPTION_USE_HERCULES_FONT GUIO_GAMEOPTIONS4
+#define GAMEOPTION_COMMAND_PROMPT_WINDOW GUIO_GAMEOPTIONS5
+#define GAMEOPTION_APPLE2GS_ADD_SPEED_MENU GUIO_GAMEOPTIONS6
+ // TODO: properly implement GAMEOPTIONs
+
} // End of namespace Agi
#endif // AGI_DETECTION_H
diff --git a/engines/agi/detection_tables.h b/engines/agi/detection_tables.h
index a60ae239d2f..0550055ff8c 100644
--- a/engines/agi/detection_tables.h
+++ b/engines/agi/detection_tables.h
@@ -21,14 +21,6 @@
namespace Agi {
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-#define GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE GUIO_GAMEOPTIONS2
-#define GAMEOPTION_DISABLE_MOUSE GUIO_GAMEOPTIONS3
-#define GAMEOPTION_USE_HERCULES_FONT GUIO_GAMEOPTIONS4
-#define GAMEOPTION_COMMAND_PROMPT_WINDOW GUIO_GAMEOPTIONS5
-#define GAMEOPTION_APPLE2GS_ADD_SPEED_MENU GUIO_GAMEOPTIONS6
- // TODO: properly implement GAMEOPTIONs
-
#define GAMEOPTIONS_DEFAULT GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
#define GAMEOPTIONS_AMIGA GUIO4(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW)
#define GAMEOPTIONS_APPLE2GS GUIO5(GAMEOPTION_ORIGINAL_SAVELOAD,GAMEOPTION_DISABLE_MOUSE,GAMEOPTION_USE_HERCULES_FONT,GAMEOPTION_COMMAND_PROMPT_WINDOW, GAMEOPTION_APPLE2GS_ADD_SPEED_MENU)
diff --git a/engines/agi/metaengine.cpp b/engines/agi/metaengine.cpp
index fe5ceb39022..dac4bc678a4 100644
--- a/engines/agi/metaengine.cpp
+++ b/engines/agi/metaengine.cpp
@@ -24,6 +24,7 @@
#include "common/md5.h"
#include "common/savefile.h"
#include "common/textconsole.h"
+#include "common/translation.h"
#include "graphics/thumbnail.h"
#include "graphics/surface.h"
@@ -111,6 +112,81 @@ bool AgiBase::hasFeature(EngineFeature f) const {
} // End of namespace Agi
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_AMIGA_ALTERNATIVE_PALETTE,
+ {
+ _s("Use an alternative palette"),
+ _s("Use an alternative palette, common for all Amiga games. This was the old behavior"),
+ "altamigapalette",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_DISABLE_MOUSE,
+ {
+ _s("Mouse support"),
+ _s("Enables mouse support. Allows to use mouse for movement and in game menus."),
+ "mousesupport",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_USE_HERCULES_FONT,
+ {
+ _s("Use Hercules hires font"),
+ _s("Uses Hercules hires font, when font file is available."),
+ "herculesfont",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_COMMAND_PROMPT_WINDOW,
+ {
+ _s("Pause when entering commands"),
+ _s("Shows a command prompt window and pauses the game (like in SCI) instead of a real-time prompt."),
+ "commandpromptwindow",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_APPLE2GS_ADD_SPEED_MENU,
+ {
+ _s("Add speed menu"),
+ _s("Add game speed menu (similar to PC version)"),
+ "apple2gs_speedmenu",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
using namespace Agi;
@@ -120,6 +196,10 @@ public:
return "agi";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
SaveStateList listSaves(const char *target) const override;
Commit: 69a7c386a95b228df5c21c4741bf44863d4582ed
https://github.com/scummvm/scummvm/commit/69a7c386a95b228df5c21c4741bf44863d4582ed
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
AGOS: Move the engine options into the MetaEngine subclass
Changed paths:
engines/agos/POTFILES
engines/agos/detection.cpp
engines/agos/detection.h
engines/agos/detection_tables.h
engines/agos/metaengine.cpp
diff --git a/engines/agos/POTFILES b/engines/agos/POTFILES
index ac001c84591..95027f8fe42 100644
--- a/engines/agos/POTFILES
+++ b/engines/agos/POTFILES
@@ -2,4 +2,3 @@ engines/agos/saveload.cpp
engines/agos/animation.cpp
engines/agos/metaengine.cpp
engines/agos/midi.cpp
-engines/agos/detection.cpp
diff --git a/engines/agos/detection.cpp b/engines/agos/detection.cpp
index 88e551f4a6e..c9b167f3a88 100644
--- a/engines/agos/detection.cpp
+++ b/engines/agos/detection.cpp
@@ -28,7 +28,6 @@
#include "common/system.h"
#include "common/textconsole.h"
#include "common/installshield_cab.h"
-#include "common/translation.h"
#include "agos/detection.h"
#include "agos/intern_detection.h"
@@ -73,72 +72,9 @@ static const char *const directoryGlobs[] = {
using namespace AGOS;
-namespace AGOS {
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_OPL3_MODE,
- {
- _s("AdLib OPL3 mode"),
- _s("When AdLib is selected, OPL3 features will be used. Depending on the game, this will prevent cut-off notes, add extra notes or instruments and/or add stereo."),
- "opl3_mode",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_DOS_TEMPOS,
- {
- _s("Use DOS version music tempos"),
- _s("Selecting this option will play the music using the tempos used by the DOS version of the game. Otherwise, the faster tempos of the Windows version will be used."),
- "dos_music_tempos",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_WINDOWS_TEMPOS,
- {
- _s("Use DOS version music tempos"),
- _s("Selecting this option will play the music using the tempos used by the DOS version of the game. Otherwise, the faster tempos of the Windows version will be used."),
- "dos_music_tempos",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_PREFER_DIGITAL_SFX,
- {
- _s("Prefer digital sound effects"),
- _s("Prefer digital sound effects instead of synthesized ones"),
- "prefer_digitalsfx",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_DISABLE_FADE_EFFECTS,
- {
- _s("Disable fade-out effects"),
- _s("Don't fade every screen to black when leaving a room."),
- "disable_fade_effects",
- false,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
-} // End of namespace AGOS
-
class AgosMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- AgosMetaEngineDetection() : AdvancedMetaEngineDetection(AGOS::gameDescriptions, sizeof(AGOS::AGOSGameDescription), agosGames, AGOS::optionsList) {
+ AgosMetaEngineDetection() : AdvancedMetaEngineDetection(AGOS::gameDescriptions, sizeof(AGOS::AGOSGameDescription), agosGames) {
_guiOptions = GUIO1(GUIO_NOLAUNCHLOAD);
_maxScanDepth = 2;
_directoryGlobs = directoryGlobs;
diff --git a/engines/agos/detection.h b/engines/agos/detection.h
index 985ac7af7f3..fac29c7e00e 100644
--- a/engines/agos/detection.h
+++ b/engines/agos/detection.h
@@ -45,6 +45,12 @@ struct AGOSGameDescription {
uint32 features;
};
+#define GAMEOPTION_OPL3_MODE GUIO_GAMEOPTIONS1
+#define GAMEOPTION_DOS_TEMPOS GUIO_GAMEOPTIONS2
+#define GAMEOPTION_WINDOWS_TEMPOS GUIO_GAMEOPTIONS3
+#define GAMEOPTION_PREFER_DIGITAL_SFX GUIO_GAMEOPTIONS4
+#define GAMEOPTION_DISABLE_FADE_EFFECTS GUIO_GAMEOPTIONS5
+
} // End of namespace AGOS
#endif // AGOS_DETECTION_H
diff --git a/engines/agos/detection_tables.h b/engines/agos/detection_tables.h
index 714282c3b6c..10edca0b2c7 100644
--- a/engines/agos/detection_tables.h
+++ b/engines/agos/detection_tables.h
@@ -19,12 +19,6 @@
*
*/
-#define GAMEOPTION_OPL3_MODE GUIO_GAMEOPTIONS1
-#define GAMEOPTION_DOS_TEMPOS GUIO_GAMEOPTIONS2
-#define GAMEOPTION_WINDOWS_TEMPOS GUIO_GAMEOPTIONS3
-#define GAMEOPTION_PREFER_DIGITAL_SFX GUIO_GAMEOPTIONS4
-#define GAMEOPTION_DISABLE_FADE_EFFECTS GUIO_GAMEOPTIONS5
-
namespace AGOS {
static const AGOSGameDescription gameDescriptions[] = {
diff --git a/engines/agos/metaengine.cpp b/engines/agos/metaengine.cpp
index 60714efc711..c918c87fa64 100644
--- a/engines/agos/metaengine.cpp
+++ b/engines/agos/metaengine.cpp
@@ -33,12 +33,79 @@
#include "agos/detection.h"
#include "agos/obsolete.h"
+namespace AGOS {
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_OPL3_MODE,
+ {
+ _s("AdLib OPL3 mode"),
+ _s("When AdLib is selected, OPL3 features will be used. Depending on the game, this will prevent cut-off notes, add extra notes or instruments and/or add stereo."),
+ "opl3_mode",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_DOS_TEMPOS,
+ {
+ _s("Use DOS version music tempos"),
+ _s("Selecting this option will play the music using the tempos used by the DOS version of the game. Otherwise, the faster tempos of the Windows version will be used."),
+ "dos_music_tempos",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_WINDOWS_TEMPOS,
+ {
+ _s("Use DOS version music tempos"),
+ _s("Selecting this option will play the music using the tempos used by the DOS version of the game. Otherwise, the faster tempos of the Windows version will be used."),
+ "dos_music_tempos",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_PREFER_DIGITAL_SFX,
+ {
+ _s("Prefer digital sound effects"),
+ _s("Prefer digital sound effects instead of synthesized ones"),
+ "prefer_digitalsfx",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_DISABLE_FADE_EFFECTS,
+ {
+ _s("Disable fade-out effects"),
+ _s("Don't fade every screen to black when leaving a room."),
+ "disable_fade_effects",
+ false,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
+} // End of namespace AGOS
+
class AgosMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "agos";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return AGOS::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine) override {
Commit: 53a70986ac7803a168531aa781517f224f651cf3
https://github.com/scummvm/scummvm/commit/53a70986ac7803a168531aa781517f224f651cf3
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
BLADERUNNER: Move the engine options into the MetaEngine subclass
Changed paths:
A engines/bladerunner/detection.h
engines/bladerunner/POTFILES
engines/bladerunner/detection.cpp
engines/bladerunner/detection_tables.h
engines/bladerunner/metaengine.cpp
diff --git a/engines/bladerunner/POTFILES b/engines/bladerunner/POTFILES
index 6aaf1dfa895..c7d226e1bf7 100644
--- a/engines/bladerunner/POTFILES
+++ b/engines/bladerunner/POTFILES
@@ -1,4 +1,3 @@
engines/bladerunner/bladerunner.cpp
-engines/bladerunner/detection.cpp
engines/bladerunner/detection_tables.h
engines/bladerunner/metaengine.cpp
diff --git a/engines/bladerunner/detection.cpp b/engines/bladerunner/detection.cpp
index df041efb4cd..7326616c88e 100644
--- a/engines/bladerunner/detection.cpp
+++ b/engines/bladerunner/detection.cpp
@@ -46,76 +46,6 @@ static const PlainGameDescriptor bladeRunnerGames[] = {
{nullptr, nullptr}
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_SITCOM,
- {
- _s("Sitcom mode"),
- _s("Game will add laughter after actor's line or narration"),
- "sitcom",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_SHORTY,
- {
- _s("Shorty mode"),
- _s("Game will shrink the actors and make their voices high pitched"),
- "shorty",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_FRAMELIMITER_NODELAYMILLIS,
- {
- _s("Frame limiter high performance mode"),
- _s("This mode may result in high CPU usage! It avoids use of delayMillis() function."),
- "nodelaymillisfl",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_FRAMELIMITER_FPS,
- {
- _s("Max frames per second limit"),
- _s("This mode targets a maximum of 120 fps. When disabled, the game targets 60 fps"),
- "frames_per_secondfl",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_DISABLE_STAMINA_DRAIN,
- {
- _s("Disable McCoy's quick stamina drain"),
- _s("When running, McCoy won't start slowing down as soon as the player stops clicking the mouse"),
- "disable_stamina_drain",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_SHOW_SUBS_IN_CRAWL,
- {
- _s("Show subtitles during text crawl"),
- _s("During the intro cutscene, show subtitles during the text crawl"),
- "use_crawl_subs",
- true,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
} // End of namespace BladeRunner
class BladeRunnerMetaEngineDetection : public AdvancedMetaEngineDetection {
@@ -132,8 +62,7 @@ BladeRunnerMetaEngineDetection::BladeRunnerMetaEngineDetection()
: AdvancedMetaEngineDetection(
BladeRunner::gameDescriptions,
sizeof(BladeRunner::gameDescriptions[0]),
- BladeRunner::bladeRunnerGames,
- BladeRunner::optionsList) {
+ BladeRunner::bladeRunnerGames) {
// Setting this, allows the demo files to be copied in the BladeRunner
// game data folder and be detected and subsequently launched without
// any issues (eg. like ScummVM launching Blade Runner instead of the demo).
diff --git a/engines/bladerunner/detection.h b/engines/bladerunner/detection.h
new file mode 100644
index 00000000000..a81cca1fee4
--- /dev/null
+++ b/engines/bladerunner/detection.h
@@ -0,0 +1,32 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef BLADERUNNER_DETECTION_H
+#define BLADERUNNER_DETECTION_H
+
+#define GAMEOPTION_SITCOM GUIO_GAMEOPTIONS1
+#define GAMEOPTION_SHORTY GUIO_GAMEOPTIONS2
+#define GAMEOPTION_FRAMELIMITER_NODELAYMILLIS GUIO_GAMEOPTIONS3
+#define GAMEOPTION_FRAMELIMITER_FPS GUIO_GAMEOPTIONS4
+#define GAMEOPTION_DISABLE_STAMINA_DRAIN GUIO_GAMEOPTIONS5
+#define GAMEOPTION_SHOW_SUBS_IN_CRAWL GUIO_GAMEOPTIONS6
+
+#endif
diff --git a/engines/bladerunner/detection_tables.h b/engines/bladerunner/detection_tables.h
index e093ca6bf09..38b2ade5062 100644
--- a/engines/bladerunner/detection_tables.h
+++ b/engines/bladerunner/detection_tables.h
@@ -24,13 +24,7 @@
#include "common/translation.h"
#include "engines/advancedDetector.h"
-
-#define GAMEOPTION_SITCOM GUIO_GAMEOPTIONS1
-#define GAMEOPTION_SHORTY GUIO_GAMEOPTIONS2
-#define GAMEOPTION_FRAMELIMITER_NODELAYMILLIS GUIO_GAMEOPTIONS3
-#define GAMEOPTION_FRAMELIMITER_FPS GUIO_GAMEOPTIONS4
-#define GAMEOPTION_DISABLE_STAMINA_DRAIN GUIO_GAMEOPTIONS5
-#define GAMEOPTION_SHOW_SUBS_IN_CRAWL GUIO_GAMEOPTIONS6
+#include "bladerunner/detection.h"
namespace BladeRunner {
diff --git a/engines/bladerunner/metaengine.cpp b/engines/bladerunner/metaengine.cpp
index cd00e38fafb..ec9e188d638 100644
--- a/engines/bladerunner/metaengine.cpp
+++ b/engines/bladerunner/metaengine.cpp
@@ -21,6 +21,7 @@
#include "bladerunner/bladerunner.h"
+#include "bladerunner/detection.h"
#include "bladerunner/savefile.h"
#include "backends/keymapper/action.h"
@@ -35,10 +36,88 @@
#include "engines/advancedDetector.h"
+namespace BladeRunner {
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_SITCOM,
+ {
+ _s("Sitcom mode"),
+ _s("Game will add laughter after actor's line or narration"),
+ "sitcom",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_SHORTY,
+ {
+ _s("Shorty mode"),
+ _s("Game will shrink the actors and make their voices high pitched"),
+ "shorty",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_FRAMELIMITER_NODELAYMILLIS,
+ {
+ _s("Frame limiter high performance mode"),
+ _s("This mode may result in high CPU usage! It avoids use of delayMillis() function."),
+ "nodelaymillisfl",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_FRAMELIMITER_FPS,
+ {
+ _s("Max frames per second limit"),
+ _s("This mode targets a maximum of 120 fps. When disabled, the game targets 60 fps"),
+ "frames_per_secondfl",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_DISABLE_STAMINA_DRAIN,
+ {
+ _s("Disable McCoy's quick stamina drain"),
+ _s("When running, McCoy won't start slowing down as soon as the player stops clicking the mouse"),
+ "disable_stamina_drain",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_SHOW_SUBS_IN_CRAWL,
+ {
+ _s("Show subtitles during text crawl"),
+ _s("During the intro cutscene, show subtitles during the text crawl"),
+ "use_crawl_subs",
+ true,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
+} // End of namespace BladeRunner
+
class BladeRunnerMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override;
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return BladeRunner::optionsList;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
bool hasFeature(MetaEngineFeature f) const override;
Common::KeymapArray initKeymaps(const char *target) const override;
Commit: 38596980b1918cc2dd6af96e6e4b00be09689e4f
https://github.com/scummvm/scummvm/commit/38596980b1918cc2dd6af96e6e4b00be09689e4f
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
BURIED: Move the engine options into the MetaEngine subclass
Changed paths:
A engines/buried/detection.h
engines/buried/POTFILES
engines/buried/detection.cpp
engines/buried/detection_tables.h
engines/buried/metaengine.cpp
diff --git a/engines/buried/POTFILES b/engines/buried/POTFILES
index e0c53f64d26..dc445692a60 100644
--- a/engines/buried/POTFILES
+++ b/engines/buried/POTFILES
@@ -1,3 +1,4 @@
engines/buried/biochip_view.cpp
engines/buried/buried.cpp
+engines/buried/metaengine.cpp
engines/buried/saveload.cpp
diff --git a/engines/buried/detection.cpp b/engines/buried/detection.cpp
index 441dd36ae27..fe6b78cde0f 100644
--- a/engines/buried/detection.cpp
+++ b/engines/buried/detection.cpp
@@ -26,9 +26,9 @@
#include "common/file.h"
#include "common/savefile.h"
#include "common/system.h"
-#include "common/translation.h"
#include "buried/buried.h"
+#include "buried/detection.h"
static const PlainGameDescriptor buriedGames[] = {
{"buried", "The Journeyman Project 2: Buried in Time"},
@@ -45,21 +45,6 @@ static const char *directoryGlobs[] = {
nullptr
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ALLOW_SKIP,
- {
- // I18N: This option allows the user to skip cutscenes.
- _s("Skip support"),
- _s("Allow cutscenes to be skipped"),
- "skip_support",
- true,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
} // End of namespace Buried
@@ -68,8 +53,7 @@ public:
BuriedMetaEngineDetection() : AdvancedMetaEngineDetection(
Buried::gameDescriptions,
sizeof(ADGameDescription),
- buriedGames,
- Buried::optionsList) {
+ buriedGames) {
_flags = kADFlagUseExtraAsHint;
_maxScanDepth = 3;
_directoryGlobs = Buried::directoryGlobs;
diff --git a/engines/buried/detection.h b/engines/buried/detection.h
new file mode 100644
index 00000000000..d03311d2ebb
--- /dev/null
+++ b/engines/buried/detection.h
@@ -0,0 +1,29 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef BURIED_DETECTION_H
+#define BURIED_DETECTION_H
+
+#define GAMEOPTION_ALLOW_SKIP GUIO_GAMEOPTIONS1
+#define GUIO_FULL_GAME GUIO1(GAMEOPTION_ALLOW_SKIP)
+#define GUIO_GAME_DEMO GUIO1(GUIO_NOLAUNCHLOAD)
+
+#endif
diff --git a/engines/buried/detection_tables.h b/engines/buried/detection_tables.h
index 1271db2a6b6..456b4c7a115 100644
--- a/engines/buried/detection_tables.h
+++ b/engines/buried/detection_tables.h
@@ -21,10 +21,6 @@
namespace Buried {
-#define GAMEOPTION_ALLOW_SKIP GUIO_GAMEOPTIONS1
-#define GUIO_FULL_GAME GUIO1(GAMEOPTION_ALLOW_SKIP)
-#define GUIO_GAME_DEMO GUIO1(GUIO_NOLAUNCHLOAD)
-
// NOTE: If variants with new languages are added, the Mayan death god
// box puzzle will need to be updated. Check environ/mayan.cpp,
// DeathGodPuzzleBox::isPuzzleSolved()
diff --git a/engines/buried/metaengine.cpp b/engines/buried/metaengine.cpp
index a7bb1676a61..b7cda3510b1 100644
--- a/engines/buried/metaengine.cpp
+++ b/engines/buried/metaengine.cpp
@@ -23,13 +23,31 @@
#include "common/savefile.h"
#include "common/system.h"
+#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "buried/buried.h"
+#include "buried/detection.h"
namespace Buried {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ALLOW_SKIP,
+ {
+ // I18N: This option allows the user to skip cutscenes.
+ _s("Skip support"),
+ _s("Allow cutscenes to be skipped"),
+ "skip_support",
+ true,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
bool BuriedEngine::hasFeature(EngineFeature f) const {
return
(f == kSupportsReturnToLauncher)
@@ -78,6 +96,10 @@ public:
return "buried";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Buried::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
int getMaximumSaveSlot() const override { return 999; }
Commit: 9297e6fbfa4c56b231cbd15280d72f73ed681545
https://github.com/scummvm/scummvm/commit/9297e6fbfa4c56b231cbd15280d72f73ed681545
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
CGE: Move the engine options into the MetaEngine subclass
Changed paths:
A engines/cge/detection.h
engines/cge/POTFILES
engines/cge/detection.cpp
engines/cge/metaengine.cpp
diff --git a/engines/cge/POTFILES b/engines/cge/POTFILES
index dd2e170a24a..690a5c17b8c 100644
--- a/engines/cge/POTFILES
+++ b/engines/cge/POTFILES
@@ -1 +1,2 @@
engines/cge/detection.cpp
+engines/cge/metaengine.cpp
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp
index 9891eb11911..7c10825cc4a 100644
--- a/engines/cge/detection.cpp
+++ b/engines/cge/detection.cpp
@@ -27,6 +27,7 @@
#include "cge/fileio.h"
#include "cge/cge.h"
+#include "cge/detection.h"
static const DebugChannelDef debugFlagList[] = {
{CGE::kCGEDebugBitmap, "bitmap", "CGE Bitmap debug channel"},
@@ -37,9 +38,6 @@ static const DebugChannelDef debugFlagList[] = {
namespace CGE {
-#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF GUIO_GAMEOPTIONS1
-#define GAMEOPTION_TTS GUIO_GAMEOPTIONS2
-
static const PlainGameDescriptor CGEGames[] = {
{ "soltys", "So\305\202tys" },
{ nullptr, nullptr }
@@ -106,39 +104,9 @@ static const ADGameDescription gameDescriptions[] = {
AD_TABLE_END_MARKER
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_COLOR_BLIND_DEFAULT_OFF,
- {
- _s("Color Blind Mode"),
- _s("Enable Color Blind Mode by default"),
- "enable_color_blind",
- false,
- 0,
- 0
- }
- },
-
-#ifdef USE_TTS
- {
- GAMEOPTION_TTS,
- {
- _s("Enable Text to Speech"),
- _s("Use TTS to read text in the game (if TTS is available)"),
- "tts_enabled",
- false,
- 0,
- 0
- }
- },
-#endif
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class CGEMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- CGEMetaEngineDetection() : AdvancedMetaEngineDetection(CGE::gameDescriptions, sizeof(ADGameDescription), CGEGames, optionsList) {
+ CGEMetaEngineDetection() : AdvancedMetaEngineDetection(CGE::gameDescriptions, sizeof(ADGameDescription), CGEGames) {
}
const char *getName() const override {
diff --git a/engines/cge/detection.h b/engines/cge/detection.h
new file mode 100644
index 00000000000..68bafafb950
--- /dev/null
+++ b/engines/cge/detection.h
@@ -0,0 +1,28 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CGE_DETECTION_H
+#define CGE_DETECTION_H
+
+#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF GUIO_GAMEOPTIONS1
+#define GAMEOPTION_TTS GUIO_GAMEOPTIONS2
+
+#endif
diff --git a/engines/cge/metaengine.cpp b/engines/cge/metaengine.cpp
index 5ad2283b3b1..3be4b809767 100644
--- a/engines/cge/metaengine.cpp
+++ b/engines/cge/metaengine.cpp
@@ -25,17 +25,53 @@
#include "common/savefile.h"
#include "common/system.h"
+#include "common/translation.h"
#include "cge/cge.h"
+#include "cge/detection.h"
namespace CGE {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_COLOR_BLIND_DEFAULT_OFF,
+ {
+ _s("Color Blind Mode"),
+ _s("Enable Color Blind Mode by default"),
+ "enable_color_blind",
+ false,
+ 0,
+ 0
+ }
+ },
+
+#ifdef USE_TTS
+ {
+ GAMEOPTION_TTS,
+ {
+ _s("Enable Text to Speech"),
+ _s("Use TTS to read text in the game (if TTS is available)"),
+ "tts_enabled",
+ false,
+ 0,
+ 0
+ }
+ },
+#endif
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class CGEMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "cge";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: 66b2483fd598554b17060d6ba1c2708970a4dcf5
https://github.com/scummvm/scummvm/commit/66b2483fd598554b17060d6ba1c2708970a4dcf5
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
CGE2: Move the engine options into the MetaEngine subclass
Changed paths:
A engines/cge2/POTFILES
A engines/cge2/detection.h
engines/cge2/detection.cpp
engines/cge2/metaengine.cpp
diff --git a/engines/cge2/POTFILES b/engines/cge2/POTFILES
new file mode 100644
index 00000000000..adc1f42e764
--- /dev/null
+++ b/engines/cge2/POTFILES
@@ -0,0 +1 @@
+engines/cge2/metaengine.cpp
diff --git a/engines/cge2/detection.cpp b/engines/cge2/detection.cpp
index 6e06155def0..dfe69d3f3b8 100644
--- a/engines/cge2/detection.cpp
+++ b/engines/cge2/detection.cpp
@@ -25,9 +25,9 @@
*/
#include "engines/advancedDetector.h"
-#include "common/translation.h"
#include "cge2/fileio.h"
#include "cge2/cge2.h"
+#include "cge2/detection.h"
static const DebugChannelDef debugFlagList[] = {
{CGE2::kCGE2DebugOpcode, "opcode", "CGE2 opcode debug channel"},
@@ -36,10 +36,6 @@ static const DebugChannelDef debugFlagList[] = {
namespace CGE2 {
-#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF GUIO_GAMEOPTIONS1
-#define GAMEOPTION_TTS_OBJECTS GUIO_GAMEOPTIONS2
-#define GAMEOPTION_TTS_SPEECH GUIO_GAMEOPTIONS3
-
static const PlainGameDescriptor CGE2Games[] = {
{ "sfinx", "Sfinx" },
{ nullptr, nullptr }
@@ -98,51 +94,9 @@ static const ADGameDescription gameDescriptions[] = {
AD_TABLE_END_MARKER
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_COLOR_BLIND_DEFAULT_OFF,
- {
- _s("Color Blind Mode"),
- _s("Enable Color Blind Mode by default"),
- "enable_color_blind",
- false,
- 0,
- 0
- }
- },
-
-#ifdef USE_TTS
- {
- GAMEOPTION_TTS_OBJECTS,
- {
- _s("Enable Text to Speech for Objects and Options"),
- _s("Use TTS to read the descriptions (if TTS is available)"),
- "tts_enabled_objects",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_TTS_SPEECH,
- {
- _s("Enable Text to Speech for Subtitles"),
- _s("Use TTS to read the subtitles (if TTS is available)"),
- "tts_enabled_speech",
- false,
- 0,
- 0
- }
- },
-#endif
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class CGE2MetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- CGE2MetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(ADGameDescription), CGE2Games, optionsList) {
+ CGE2MetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(ADGameDescription), CGE2Games) {
}
const char *getName() const override {
diff --git a/engines/cge2/detection.h b/engines/cge2/detection.h
new file mode 100644
index 00000000000..92c2355e0d0
--- /dev/null
+++ b/engines/cge2/detection.h
@@ -0,0 +1,29 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef CGE2_DETECTION_H
+#define CGE2_DETECTION_H
+
+#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF GUIO_GAMEOPTIONS1
+#define GAMEOPTION_TTS_OBJECTS GUIO_GAMEOPTIONS2
+#define GAMEOPTION_TTS_SPEECH GUIO_GAMEOPTIONS3
+
+#endif
diff --git a/engines/cge2/metaengine.cpp b/engines/cge2/metaengine.cpp
index 92bf5b6b990..54efa379300 100644
--- a/engines/cge2/metaengine.cpp
+++ b/engines/cge2/metaengine.cpp
@@ -26,18 +26,67 @@
#include "engines/advancedDetector.h"
+#include "common/translation.h"
+
#include "graphics/surface.h"
#include "cge2/cge2.h"
+#include "cge2/detection.h"
namespace CGE2 {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_COLOR_BLIND_DEFAULT_OFF,
+ {
+ _s("Color Blind Mode"),
+ _s("Enable Color Blind Mode by default"),
+ "enable_color_blind",
+ false,
+ 0,
+ 0
+ }
+ },
+
+#ifdef USE_TTS
+ {
+ GAMEOPTION_TTS_OBJECTS,
+ {
+ _s("Enable Text to Speech for Objects and Options"),
+ _s("Use TTS to read the descriptions (if TTS is available)"),
+ "tts_enabled_objects",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_TTS_SPEECH,
+ {
+ _s("Enable Text to Speech for Subtitles"),
+ _s("Use TTS to read the subtitles (if TTS is available)"),
+ "tts_enabled_speech",
+ false,
+ 0,
+ 0
+ }
+ },
+#endif
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class CGE2MetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "cge2";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
bool hasFeature(MetaEngineFeature f) const override;
int getMaximumSaveSlot() const override;
Commit: d8c06f986944ea7050f30e1aba34f4387dc28eb7
https://github.com/scummvm/scummvm/commit/d8c06f986944ea7050f30e1aba34f4387dc28eb7
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
CHEWY: Move the engine options into the MetaEngine subclass
Changed paths:
A engines/chewy/POTFILES
engines/chewy/detection.cpp
engines/chewy/detection.h
engines/chewy/metaengine.cpp
diff --git a/engines/chewy/POTFILES b/engines/chewy/POTFILES
new file mode 100644
index 00000000000..44059955492
--- /dev/null
+++ b/engines/chewy/POTFILES
@@ -0,0 +1 @@
+engines/chewy/metaengine.cpp
diff --git a/engines/chewy/detection.cpp b/engines/chewy/detection.cpp
index 1e99a192df6..f1de4f703f6 100644
--- a/engines/chewy/detection.cpp
+++ b/engines/chewy/detection.cpp
@@ -24,8 +24,6 @@
#include "chewy/detection.h"
-#include "common/translation.h"
-
static const PlainGameDescriptor chewyGames[] = {
{"chewy", "Chewy: Esc from F5"},
{nullptr, nullptr}
@@ -33,8 +31,6 @@ static const PlainGameDescriptor chewyGames[] = {
namespace Chewy {
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-
static const ChewyGameDescription gameDescriptions[] = {
{
@@ -106,25 +102,11 @@ static const ChewyGameDescription gameDescriptions[] = {
{ AD_TABLE_END_MARKER }
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "original_menus",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR};
} // namespace Chewy
class ChewyMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- ChewyMetaEngineDetection() : AdvancedMetaEngineDetection(Chewy::gameDescriptions, sizeof(Chewy::ChewyGameDescription), chewyGames, Chewy::optionsList) {
+ ChewyMetaEngineDetection() : AdvancedMetaEngineDetection(Chewy::gameDescriptions, sizeof(Chewy::ChewyGameDescription), chewyGames) {
_maxScanDepth = 2;
_flags = kADFlagMatchFullPaths;
}
diff --git a/engines/chewy/detection.h b/engines/chewy/detection.h
index 528f9817850..a8f5fc281d4 100644
--- a/engines/chewy/detection.h
+++ b/engines/chewy/detection.h
@@ -28,6 +28,8 @@ struct ChewyGameDescription {
ADGameDescription desc;
};
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
+
} // End of namespace Chewy
#endif
diff --git a/engines/chewy/metaengine.cpp b/engines/chewy/metaengine.cpp
index ceb0e5961fc..5503666cbf5 100644
--- a/engines/chewy/metaengine.cpp
+++ b/engines/chewy/metaengine.cpp
@@ -21,6 +21,7 @@
#include "common/savefile.h"
#include "common/system.h"
+#include "common/translation.h"
#include "base/plugins.h"
#include "engines/advancedDetector.h"
#include "chewy/chewy.h"
@@ -28,6 +29,21 @@
namespace Chewy {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "original_menus",
+ false,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
uint32 ChewyEngine::getFeatures() const {
return _gameDescription->desc.flags;
}
@@ -44,6 +60,10 @@ public:
return "chewy";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Chewy::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: bf02991f023e1e5ea26723a1b712295402eebc60
https://github.com/scummvm/scummvm/commit/bf02991f023e1e5ea26723a1b712295402eebc60
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
CINE: Move the engine options into the MetaEngine subclass
Changed paths:
engines/cine/POTFILES
engines/cine/detection.cpp
engines/cine/detection.h
engines/cine/detection_tables.h
engines/cine/metaengine.cpp
diff --git a/engines/cine/POTFILES b/engines/cine/POTFILES
index 9343ecdba40..90ae858cd60 100644
--- a/engines/cine/POTFILES
+++ b/engines/cine/POTFILES
@@ -1,4 +1,3 @@
-engines/cine/detection.cpp
engines/cine/metaengine.cpp
engines/cine/saveload.cpp
engines/cine/various.cpp
diff --git a/engines/cine/detection.cpp b/engines/cine/detection.cpp
index 064f467cb3d..603ac91da91 100644
--- a/engines/cine/detection.cpp
+++ b/engines/cine/detection.cpp
@@ -23,8 +23,6 @@
#include "engines/advancedDetector.h"
-#include "common/translation.h"
-
#include "cine/detection.h"
#include "cine/cine.h"
@@ -44,36 +42,9 @@ static const DebugChannelDef debugFlagList[] = {
DEBUG_CHANNEL_END
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_TRANSPARENT_DIALOG_BOXES,
- {
- _s("Use transparent dialog boxes in 16 color scenes"),
- _s("Use transparent dialog boxes in 16 color scenes even if the original game version did not support them"),
- "transparentdialogboxes",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class CineMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- CineMetaEngineDetection() : AdvancedMetaEngineDetection(Cine::gameDescriptions, sizeof(Cine::CINEGameDescription), cineGames, optionsList) {
+ CineMetaEngineDetection() : AdvancedMetaEngineDetection(Cine::gameDescriptions, sizeof(Cine::CINEGameDescription), cineGames) {
_guiOptions = GUIO3(GUIO_NOSPEECH, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_TRANSPARENT_DIALOG_BOXES);
}
diff --git a/engines/cine/detection.h b/engines/cine/detection.h
index bbdeb515fbb..26c26462adc 100644
--- a/engines/cine/detection.h
+++ b/engines/cine/detection.h
@@ -45,6 +45,9 @@ struct CINEGameDescription {
uint32 features;
};
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
+#define GAMEOPTION_TRANSPARENT_DIALOG_BOXES GUIO_GAMEOPTIONS2
+
} // End of namespace Cine
#endif // CINE_DETECTION_H
diff --git a/engines/cine/detection_tables.h b/engines/cine/detection_tables.h
index 77ec8bae0e5..1bfd98b7b74 100644
--- a/engines/cine/detection_tables.h
+++ b/engines/cine/detection_tables.h
@@ -21,9 +21,6 @@
namespace Cine {
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-#define GAMEOPTION_TRANSPARENT_DIALOG_BOXES GUIO_GAMEOPTIONS2
-
static const CINEGameDescription gameDescriptions[] = {
{
{
diff --git a/engines/cine/metaengine.cpp b/engines/cine/metaengine.cpp
index 26d3c63758a..66db429ca78 100644
--- a/engines/cine/metaengine.cpp
+++ b/engines/cine/metaengine.cpp
@@ -35,6 +35,33 @@
namespace Cine {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_TRANSPARENT_DIALOG_BOXES,
+ {
+ _s("Use transparent dialog boxes in 16 color scenes"),
+ _s("Use transparent dialog boxes in 16 color scenes even if the original game version did not support them"),
+ "transparentdialogboxes",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
#define MAX_SAVEGAMES (ARRAYSIZE(Cine::currentSaveName))
#define SAVEGAME_NAME_LEN (sizeof(Cine::currentSaveName[0]))
#define SAVELIST_SIZE (MAX_SAVEGAMES * SAVEGAME_NAME_LEN)
@@ -53,6 +80,10 @@ public:
return "cine";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Cine::optionsList;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
bool hasFeature(MetaEngineFeature f) const override;
Commit: 48e7c9c95695e760c765d69578c21235e617bb14
https://github.com/scummvm/scummvm/commit/48e7c9c95695e760c765d69578c21235e617bb14
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
DRASCULA: Move the engine options into the MetaEngine subclass
Changed paths:
engines/drascula/POTFILES
engines/drascula/detection.cpp
engines/drascula/detection.h
engines/drascula/metaengine.cpp
diff --git a/engines/drascula/POTFILES b/engines/drascula/POTFILES
index 925b3099960..cd1b30b7461 100644
--- a/engines/drascula/POTFILES
+++ b/engines/drascula/POTFILES
@@ -1,3 +1,3 @@
engines/drascula/drascula.cpp
-engines/drascula/detection.cpp
+engines/drascula/metaengine.cpp
engines/drascula/saveload.cpp
diff --git a/engines/drascula/detection.cpp b/engines/drascula/detection.cpp
index 8d9b4055615..ea130643f7f 100644
--- a/engines/drascula/detection.cpp
+++ b/engines/drascula/detection.cpp
@@ -21,14 +21,11 @@
#include "base/plugins.h"
#include "common/file.h"
-#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "drascula/detection.h"
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-
static const PlainGameDescriptor drasculaGames[] = {
{"drascula", "Drascula: The Vampire Strikes Back"},
{nullptr, nullptr}
@@ -296,24 +293,9 @@ static const DrasculaGameDescription gameDescriptions[] = {
{ AD_TABLE_END_MARKER }
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class DrasculaMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- DrasculaMetaEngineDetection() : AdvancedMetaEngineDetection(Drascula::gameDescriptions, sizeof(Drascula::DrasculaGameDescription), drasculaGames, Drascula::optionsList) {
+ DrasculaMetaEngineDetection() : AdvancedMetaEngineDetection(Drascula::gameDescriptions, sizeof(Drascula::DrasculaGameDescription), drasculaGames) {
_guiOptions = GUIO2(GUIO_NOMIDI, GAMEOPTION_ORIGINAL_SAVELOAD);
}
diff --git a/engines/drascula/detection.h b/engines/drascula/detection.h
index 41cd37b00f6..63126513257 100644
--- a/engines/drascula/detection.h
+++ b/engines/drascula/detection.h
@@ -34,6 +34,8 @@ struct DrasculaGameDescription {
ADGameDescription desc;
};
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
+
} // End of namespace Drascula
#endif // DRASCULA_DETECTION_H
diff --git a/engines/drascula/metaengine.cpp b/engines/drascula/metaengine.cpp
index d96f1a21701..a22b918aafd 100644
--- a/engines/drascula/metaengine.cpp
+++ b/engines/drascula/metaengine.cpp
@@ -22,6 +22,8 @@
#include "engines/savestate.h"
#include "engines/advancedDetector.h"
+#include "common/translation.h"
+
#include "graphics/thumbnail.h"
#include "drascula/drascula.h"
@@ -29,6 +31,21 @@
namespace Drascula {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
uint32 DrasculaEngine::getFeatures() const {
return _gameDescription->desc.flags;
}
@@ -63,6 +80,10 @@ public:
return "drascula";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Drascula::optionsList;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const override;
bool hasFeature(MetaEngineFeature f) const override;
Commit: c11cf35f4851cd44906c76fea09394155c378d3d
https://github.com/scummvm/scummvm/commit/c11cf35f4851cd44906c76fea09394155c378d3d
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
DREAMWEB: Move the engine options into the MetaEngine subclass
Changed paths:
engines/dreamweb/POTFILES
engines/dreamweb/detection.cpp
engines/dreamweb/metaengine.cpp
diff --git a/engines/dreamweb/POTFILES b/engines/dreamweb/POTFILES
index 64fb20db670..7f488d2ebad 100644
--- a/engines/dreamweb/POTFILES
+++ b/engines/dreamweb/POTFILES
@@ -1,3 +1,3 @@
-engines/dreamweb/detection.cpp
+engines/dreamweb/metaengine.cpp
engines/dreamweb/saveload.cpp
diff --git a/engines/dreamweb/detection.cpp b/engines/dreamweb/detection.cpp
index 11bf01b0438..c237887c6b8 100644
--- a/engines/dreamweb/detection.cpp
+++ b/engines/dreamweb/detection.cpp
@@ -23,7 +23,6 @@
#include "common/algorithm.h"
#include "common/system.h"
-#include "common/translation.h"
#include "common/text-to-speech.h"
#include "engines/advancedDetector.h"
@@ -44,66 +43,11 @@ static const DebugChannelDef debugFlagList[] = {
#include "dreamweb/detection_tables.h"
-static const ADExtraGuiOptionsMap gameGuiOptions[] = {
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_BRIGHTPALETTE,
- {
- _s("Use bright palette mode"),
- _s("Display graphics using the game's bright palette"),
- "bright_palette",
- true,
- 0,
- 0
- }
- },
-
-#ifdef USE_TTS
- {
- GAMEOPTION_TTS_THINGS,
- {
- _s("Enable Text to Speech for Objects, Options, and the Bible Quote"),
- _s("Use TTS to read the descriptions (if TTS is available)"),
- "tts_enabled_objects",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_TTS_SPEECH,
- {
- _s("Enable Text to Speech for Subtitles"),
- _s("Use TTS to read the subtitles (if TTS is available)"),
- "tts_enabled_speech",
- false,
- 0,
- 0
- }
- },
-#endif
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class DreamWebMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
DreamWebMetaEngineDetection():
AdvancedMetaEngineDetection(DreamWeb::gameDescriptions,
- sizeof(DreamWeb::DreamWebGameDescription), dreamWebGames,
- gameGuiOptions) {
+ sizeof(DreamWeb::DreamWebGameDescription), dreamWebGames) {
_guiOptions = GUIO5(GUIO_NOMIDI, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_BRIGHTPALETTE, GAMEOPTION_TTS_THINGS, GAMEOPTION_TTS_SPEECH);
}
diff --git a/engines/dreamweb/metaengine.cpp b/engines/dreamweb/metaengine.cpp
index ca5aa6e0059..51fd01c2d53 100644
--- a/engines/dreamweb/metaengine.cpp
+++ b/engines/dreamweb/metaengine.cpp
@@ -20,6 +20,7 @@
*/
#include "common/savefile.h"
+#include "common/translation.h"
#include "graphics/thumbnail.h"
@@ -28,12 +29,70 @@
#include "dreamweb/dreamweb.h"
#include "dreamweb/detection.h"
+static const ADExtraGuiOptionsMap gameGuiOptions[] = {
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_BRIGHTPALETTE,
+ {
+ _s("Use bright palette mode"),
+ _s("Display graphics using the game's bright palette"),
+ "bright_palette",
+ true,
+ 0,
+ 0
+ }
+ },
+
+#ifdef USE_TTS
+ {
+ GAMEOPTION_TTS_THINGS,
+ {
+ _s("Enable Text to Speech for Objects, Options, and the Bible Quote"),
+ _s("Use TTS to read the descriptions (if TTS is available)"),
+ "tts_enabled_objects",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_TTS_SPEECH,
+ {
+ _s("Enable Text to Speech for Subtitles"),
+ _s("Use TTS to read the subtitles (if TTS is available)"),
+ "tts_enabled_speech",
+ false,
+ 0,
+ 0
+ }
+ },
+#endif
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class DreamWebMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "dreamweb";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return gameGuiOptions;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
bool hasFeature(MetaEngineFeature f) const override;
Commit: 2d6ac650b37bdb1bc17069d1fe2d531b460ee239
https://github.com/scummvm/scummvm/commit/2d6ac650b37bdb1bc17069d1fe2d531b460ee239
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
GLK: Move the engine options into the MetaEngine subclass
Changed paths:
engines/glk/POTFILES
engines/glk/detection.cpp
engines/glk/detection.h
engines/glk/metaengine.cpp
diff --git a/engines/glk/POTFILES b/engines/glk/POTFILES
index 98899fc0422..7ae8591a127 100644
--- a/engines/glk/POTFILES
+++ b/engines/glk/POTFILES
@@ -1,6 +1,6 @@
-engines/glk/detection.cpp
engines/glk/glk_api.cpp
engines/glk/quetzal.cpp
+engines/glk/metaengine.cpp
engines/glk/streams.cpp
engines/glk/adrift/os_glk.cpp
engines/glk/advsys/advsys.cpp
diff --git a/engines/glk/detection.cpp b/engines/glk/detection.cpp
index 5e1e8904695..24cea551133 100644
--- a/engines/glk/detection.cpp
+++ b/engines/glk/detection.cpp
@@ -24,7 +24,6 @@
#include "common/memstream.h"
#include "common/str-array.h"
#include "common/file.h"
-#include "common/translation.h"
#include "common/config-manager.h"
#include "glk/detection.h"
@@ -231,29 +230,4 @@ void GlkMetaEngineDetection::detectClashes() const {
#endif
}
-const ExtraGuiOptions GlkMetaEngineDetection::getExtraGuiOptions(const Common::String &) const {
- ExtraGuiOptions options;
-#if defined(USE_TTS)
- static const ExtraGuiOption ttsSpeakOptions = {
- _s("Enable Text to Speech"),
- _s("Use TTS to read the text"),
- "speak",
- false,
- 0,
- 0
- };
- static const ExtraGuiOption ttsSpeakInputOptions = {
- _s("Also read input text"),
- _s("Use TTS to read the input text"),
- "speak_input",
- false,
- 0,
- 0
- };
- options.push_back(ttsSpeakOptions);
- options.push_back(ttsSpeakInputOptions);
-#endif
- return options;
-}
-
REGISTER_PLUGIN_STATIC(GLK_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, GlkMetaEngineDetection);
diff --git a/engines/glk/detection.h b/engines/glk/detection.h
index c089425e2ee..50c9728f1ea 100644
--- a/engines/glk/detection.h
+++ b/engines/glk/detection.h
@@ -67,11 +67,6 @@ public:
* Calls each sub-engine in turn to ensure no game Id accidentally shares the same Id
*/
void detectClashes() const;
-
- /**
- * Return a list of extra GUI options for the specified target.
- */
- const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
};
namespace Glk {
diff --git a/engines/glk/metaengine.cpp b/engines/glk/metaengine.cpp
index ac92410a2ae..13693dcbfe5 100644
--- a/engines/glk/metaengine.cpp
+++ b/engines/glk/metaengine.cpp
@@ -65,6 +65,7 @@
#include "common/savefile.h"
#include "common/str-array.h"
#include "common/system.h"
+#include "common/translation.h"
#include "graphics/surface.h"
#include "common/config-manager.h"
#include "common/file.h"
@@ -82,6 +83,8 @@ public:
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine) override;
+ const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
+
SaveStateList listSaves(const char *target) const override;
int getMaximumSaveSlot() const override;
void removeSaveState(const char *target, int slot) const override;
@@ -233,6 +236,31 @@ Common::Error GlkMetaEngine::createInstance(OSystem *syst, Engine **engine) {
return *engine ? Common::kNoError : Common::kUserCanceled;
}
+const ExtraGuiOptions GlkMetaEngine::getExtraGuiOptions(const Common::String &) const {
+ ExtraGuiOptions options;
+#if defined(USE_TTS)
+ static const ExtraGuiOption ttsSpeakOptions = {
+ _s("Enable Text to Speech"),
+ _s("Use TTS to read the text"),
+ "speak",
+ false,
+ 0,
+ 0
+ };
+ static const ExtraGuiOption ttsSpeakInputOptions = {
+ _s("Also read input text"),
+ _s("Use TTS to read the input text"),
+ "speak_input",
+ false,
+ 0,
+ 0
+ };
+ options.push_back(ttsSpeakOptions);
+ options.push_back(ttsSpeakInputOptions);
+#endif
+ return options;
+}
+
SaveStateList GlkMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
Common::StringArray filenames;
Commit: e8dee87a04669d38d016ea9e719cf261ceb3b132
https://github.com/scummvm/scummvm/commit/e8dee87a04669d38d016ea9e719cf261ceb3b132
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
GRIFFON: Move the engine options into the MetaEngine subclass
Changed paths:
A engines/griffon/detection.h
engines/griffon/detection.cpp
engines/griffon/metaengine.cpp
diff --git a/engines/griffon/detection.cpp b/engines/griffon/detection.cpp
index c6ba927475a..d80f8151406 100644
--- a/engines/griffon/detection.cpp
+++ b/engines/griffon/detection.cpp
@@ -23,34 +23,14 @@
#include "engines/advancedDetector.h"
#include "common/text-to-speech.h"
-#include "common/translation.h"
+
+#include "griffon/detection.h"
static const PlainGameDescriptor griffonGames[] = {
{"griffon", "The Griffon Legend"},
{nullptr, nullptr}
};
-#ifdef USE_TTS
-
-#define GAMEOPTION_TTS_NARRATOR GUIO_GAMEOPTIONS1
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_TTS_NARRATOR,
- {
- _s("Enable Text to Speech"),
- _s("Use TTS to read the descriptions (if TTS is available)"),
- "tts_enabled",
- false,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
-#endif
-
namespace Griffon {
static const ADGameDescription gameDescriptions[] = {
@@ -75,11 +55,7 @@ static const ADGameDescription gameDescriptions[] = {
class GriffonMetaEngineDetection: public AdvancedMetaEngineDetection {
public:
- GriffonMetaEngineDetection() : AdvancedMetaEngineDetection(Griffon::gameDescriptions, sizeof(ADGameDescription), griffonGames
-#ifdef USE_TTS
- , optionsList
-#endif
- ) {
+ GriffonMetaEngineDetection() : AdvancedMetaEngineDetection(Griffon::gameDescriptions, sizeof(ADGameDescription), griffonGames) {
}
const char *getName() const override {
diff --git a/engines/griffon/detection.h b/engines/griffon/detection.h
new file mode 100644
index 00000000000..92321975c48
--- /dev/null
+++ b/engines/griffon/detection.h
@@ -0,0 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef GRIFFON_DETECTION_H
+#define GRIFFON_DETECTION_H
+
+#define GAMEOPTION_TTS_NARRATOR GUIO_GAMEOPTIONS1
+
+#endif
diff --git a/engines/griffon/metaengine.cpp b/engines/griffon/metaengine.cpp
index 990688c18e0..838e89db58b 100644
--- a/engines/griffon/metaengine.cpp
+++ b/engines/griffon/metaengine.cpp
@@ -29,6 +29,26 @@
#include "backends/keymapper/standard-actions.h"
#include "griffon/griffon.h"
+#include "griffon/detection.h"
+
+#ifdef USE_TTS
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_TTS_NARRATOR,
+ {
+ _s("Enable Text to Speech"),
+ _s("Use TTS to read the descriptions (if TTS is available)"),
+ "tts_enabled",
+ false,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
+#endif
class GriffonMetaEngine: public AdvancedMetaEngine {
public:
@@ -36,6 +56,12 @@ public:
return "griffon";
}
+#ifdef USE_TTS
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+#endif
+
int getMaximumSaveSlot() const override {
return ConfMan.getInt("autosave_period") ? 4 : 3;
}
Commit: 6c20aaa057b073f4a0b4324694cf444202709c49
https://github.com/scummvm/scummvm/commit/6c20aaa057b073f4a0b4324694cf444202709c49
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
GRIM: Move the engine options into the MetaEngine subclass
Changed paths:
engines/grim/POTFILES
engines/grim/detection.cpp
engines/grim/detection.h
engines/grim/metaengine.cpp
diff --git a/engines/grim/POTFILES b/engines/grim/POTFILES
index 46af45379fb..0f3769b02b7 100644
--- a/engines/grim/POTFILES
+++ b/engines/grim/POTFILES
@@ -1,4 +1,3 @@
-engines/grim/detection.cpp
engines/grim/grim.cpp
engines/grim/inputdialog.cpp
engines/grim/md5check.cpp
diff --git a/engines/grim/detection.cpp b/engines/grim/detection.cpp
index 7e018b70749..a26c75ceb22 100644
--- a/engines/grim/detection.cpp
+++ b/engines/grim/detection.cpp
@@ -19,8 +19,6 @@
*
*/
-#include "common/translation.h"
-
#include "engines/advancedDetector.h"
#include "engines/grim/detection.h"
#include "engines/grim/debug.h"
@@ -57,38 +55,6 @@ static const PlainGameDescriptor grimGames[] = {
{nullptr, nullptr}
};
-#define GAMEOPTION_LOAD_DATAUSR GUIO_GAMEOPTIONS1
-#define GAMEOPTION_SHOW_FPS GUIO_GAMEOPTIONS2
-
-#define GUI_OPTIONS_GRIME GUIO2(GAMEOPTION_LOAD_DATAUSR, GAMEOPTION_SHOW_FPS)
-
-static const ADExtraGuiOptionsMap gameGuiOptions[] = {
- {
- GAMEOPTION_LOAD_DATAUSR,
- {
- _s("Load user patch (unsupported)"),
- _s("Load an user patch. Please note that the ScummVM team doesn't provide support for using such patches."),
- "datausr_load",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_SHOW_FPS,
- {
- _s("Show FPS"),
- _s("Show the current FPS-rate, while you play."),
- "show_fps",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
static const GrimGameDescription gameDescriptions[] = {
{
// Grim Fandango English version (patched)
@@ -633,7 +599,7 @@ static const GrimGameDescription gameDescriptions[] = {
class GrimMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- GrimMetaEngineDetection() : AdvancedMetaEngineDetection(Grim::gameDescriptions, sizeof(Grim::GrimGameDescription), grimGames, gameGuiOptions) {
+ GrimMetaEngineDetection() : AdvancedMetaEngineDetection(Grim::gameDescriptions, sizeof(Grim::GrimGameDescription), grimGames) {
_guiOptions = GUIO_NOMIDI;
}
diff --git a/engines/grim/detection.h b/engines/grim/detection.h
index 9fe0a78040e..7007d045472 100644
--- a/engines/grim/detection.h
+++ b/engines/grim/detection.h
@@ -42,6 +42,11 @@ struct GrimGameDescription {
GrimGameType gameType;
};
+#define GAMEOPTION_LOAD_DATAUSR GUIO_GAMEOPTIONS1
+#define GAMEOPTION_SHOW_FPS GUIO_GAMEOPTIONS2
+
+#define GUI_OPTIONS_GRIME GUIO2(GAMEOPTION_LOAD_DATAUSR, GAMEOPTION_SHOW_FPS)
+
} // End of namespace Grim
#endif // GRIM_DETECTION_H
diff --git a/engines/grim/metaengine.cpp b/engines/grim/metaengine.cpp
index 6cf7001326f..fd9082a4ec1 100644
--- a/engines/grim/metaengine.cpp
+++ b/engines/grim/metaengine.cpp
@@ -30,12 +30,43 @@
namespace Grim {
+static const ADExtraGuiOptionsMap gameGuiOptions[] = {
+ {
+ GAMEOPTION_LOAD_DATAUSR,
+ {
+ _s("Load user patch (unsupported)"),
+ _s("Load an user patch. Please note that the ScummVM team doesn't provide support for using such patches."),
+ "datausr_load",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_SHOW_FPS,
+ {
+ _s("Show FPS"),
+ _s("Show the current FPS-rate, while you play."),
+ "show_fps",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class GrimMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "grim";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return gameGuiOptions;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine) override {
Engines::upgradeTargetIfNecessary(obsoleteGameIDsTable);
return AdvancedMetaEngine::createInstance(syst, engine);
Commit: ea9722bcead72bd3209c601a0686d402d8a33bd3
https://github.com/scummvm/scummvm/commit/ea9722bcead72bd3209c601a0686d402d8a33bd3
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
GROOVIE: Move the engine options into the MetaEngine subclass
Changed paths:
engines/groovie/detection.cpp
engines/groovie/detection.h
engines/groovie/metaengine.cpp
diff --git a/engines/groovie/detection.cpp b/engines/groovie/detection.cpp
index 9e17f30f325..145f20ecfad 100644
--- a/engines/groovie/detection.cpp
+++ b/engines/groovie/detection.cpp
@@ -30,12 +30,6 @@ using namespace Common;
namespace Groovie {
-#define GAMEOPTION_T7G_FAST_MOVIE_SPEED GUIO_GAMEOPTIONS1
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS2
-#define GAMEOPTION_EASIER_AI GUIO_GAMEOPTIONS3
-#define GAMEOPTION_FINAL_HOUR GUIO_GAMEOPTIONS4
-#define GAMEOPTION_SPEEDRUN GUIO_GAMEOPTIONS5
-
static const DebugChannelDef debugFlagList[] = {
{Groovie::kDebugVideo, "Video", "Debug video and audio playback"},
{Groovie::kDebugResource, "Resource", "Debug resource management"},
@@ -282,6 +276,7 @@ static const GroovieGameDescription gameDescriptions[] = {
{AD_TABLE_END_MARKER, kGroovieT7G}
};
+// clang-format on
static const char *directoryGlobs[] = {
"MIDI",
@@ -290,74 +285,9 @@ static const char *directoryGlobs[] = {
nullptr
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_T7G_FAST_MOVIE_SPEED,
- {
- _s("Fast movie speed"),
- _s("Play movies at an increased speed"),
- "fast_movie_speed",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_EASIER_AI,
- {
- _s("Easier AI"),
- _s("Decrease the difficulty of AI puzzles"),
- "easier_ai",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_FINAL_HOUR,
- {
- _s("Updated Credits Music"),
- _s("Play the song The Final Hour during the credits instead of reusing MIDI songs"),
- "credits_music",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_SPEEDRUN,
- {
- _s("Speedrun Mode"),
- _s("Affects the controls for fast forwarding the game"),
- "speedrun_mode",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-// clang-format on
-
class GroovieMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- GroovieMetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(GroovieGameDescription), groovieGames, optionsList) {
+ GroovieMetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(GroovieGameDescription), groovieGames) {
// Use kADFlagUseExtraAsHint in order to distinguish the 11th hour from
// its "Making of" as well as the Clandestiny Trailer; they all share
// the same MD5.
diff --git a/engines/groovie/detection.h b/engines/groovie/detection.h
index 552f0c10767..dea8b219adc 100644
--- a/engines/groovie/detection.h
+++ b/engines/groovie/detection.h
@@ -40,6 +40,12 @@ struct GroovieGameDescription {
EngineVersion version; // Version of the engine
};
+#define GAMEOPTION_T7G_FAST_MOVIE_SPEED GUIO_GAMEOPTIONS1
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS2
+#define GAMEOPTION_EASIER_AI GUIO_GAMEOPTIONS3
+#define GAMEOPTION_FINAL_HOUR GUIO_GAMEOPTIONS4
+#define GAMEOPTION_SPEEDRUN GUIO_GAMEOPTIONS5
+
} // End of namespace Groovie
#endif
diff --git a/engines/groovie/metaengine.cpp b/engines/groovie/metaengine.cpp
index 2621f5c3196..2b0f012c0dc 100644
--- a/engines/groovie/metaengine.cpp
+++ b/engines/groovie/metaengine.cpp
@@ -30,12 +30,80 @@
namespace Groovie {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_T7G_FAST_MOVIE_SPEED,
+ {
+ _s("Fast movie speed"),
+ _s("Play movies at an increased speed"),
+ "fast_movie_speed",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_EASIER_AI,
+ {
+ _s("Easier AI"),
+ _s("Decrease the difficulty of AI puzzles"),
+ "easier_ai",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_FINAL_HOUR,
+ {
+ _s("Updated Credits Music"),
+ _s("Play the song The Final Hour during the credits instead of reusing MIDI songs"),
+ "credits_music",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_SPEEDRUN,
+ {
+ _s("Speedrun Mode"),
+ _s("Affects the controls for fast forwarding the game"),
+ "speedrun_mode",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class GroovieMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "groovie";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const override;
bool hasFeature(MetaEngineFeature f) const override;
Commit: 8c46a377ec05324fbcb382a59af9b128b1ca3c8a
https://github.com/scummvm/scummvm/commit/8c46a377ec05324fbcb382a59af9b128b1ca3c8a
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
HDB: Move the engine options into the MetaEngine subclass
Changed paths:
engines/hdb/POTFILES
engines/hdb/detection.cpp
engines/hdb/detection.h
engines/hdb/metaengine.cpp
diff --git a/engines/hdb/POTFILES b/engines/hdb/POTFILES
index e3c185bd1f8..f5828c53cab 100644
--- a/engines/hdb/POTFILES
+++ b/engines/hdb/POTFILES
@@ -1,2 +1 @@
-engines/hdb/detection.cpp
engines/hdb/metaengine.cpp
diff --git a/engines/hdb/detection.cpp b/engines/hdb/detection.cpp
index 6b4567dbee4..bf386beaa7a 100644
--- a/engines/hdb/detection.cpp
+++ b/engines/hdb/detection.cpp
@@ -20,7 +20,6 @@
*/
#include "base/plugins.h"
-#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "hdb/detection.h"
@@ -30,8 +29,6 @@ static const PlainGameDescriptor hdbGames[] = {
{nullptr, nullptr}
};
-#define GAMEOPTION_CHEATMODE GUIO_GAMEOPTIONS1
-
namespace HDB {
static const ADGameDescription gameDescriptions[] = {
@@ -116,25 +113,9 @@ static const ADGameDescription gameDescriptions[] = {
} // End of namespace HDB
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_CHEATMODE,
- {
- _s("Enable cheat mode"),
- _s("Debug info and level selection becomes available"),
- "hypercheat",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class HDBMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- HDBMetaEngineDetection() : AdvancedMetaEngineDetection(HDB::gameDescriptions, sizeof(ADGameDescription), hdbGames, optionsList) {
+ HDBMetaEngineDetection() : AdvancedMetaEngineDetection(HDB::gameDescriptions, sizeof(ADGameDescription), hdbGames) {
}
const char *getName() const override {
diff --git a/engines/hdb/detection.h b/engines/hdb/detection.h
index 85983ba9aae..5b94c2bb644 100644
--- a/engines/hdb/detection.h
+++ b/engines/hdb/detection.h
@@ -28,6 +28,8 @@ enum HDBGameFeatures {
GF_HANDANGO = (1 << 0)
};
+#define GAMEOPTION_CHEATMODE GUIO_GAMEOPTIONS1
+
} // End of namespace HDB
#endif // HDB_DETECTION_H
diff --git a/engines/hdb/metaengine.cpp b/engines/hdb/metaengine.cpp
index 3d71e188c54..f90dee6b7ab 100644
--- a/engines/hdb/metaengine.cpp
+++ b/engines/hdb/metaengine.cpp
@@ -37,6 +37,22 @@
namespace HDB {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_CHEATMODE,
+ {
+ _s("Enable cheat mode"),
+ _s("Debug info and level selection becomes available"),
+ "hypercheat",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
const char *HDBGame::getGameId() const { return _gameDescription->gameId; }
Common::Platform HDBGame::getPlatform() const { return _gameDescription->platform; }
@@ -68,6 +84,10 @@ public:
return "hdb";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return HDB::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
int getMaximumSaveSlot() const override;
Commit: 328c2333c982ab87515102b2b13c7506b4fdd866
https://github.com/scummvm/scummvm/commit/328c2333c982ab87515102b2b13c7506b4fdd866
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
HOPKINS: Move the engine options into the MetaEngine subclass
Changed paths:
engines/hopkins/POTFILES
engines/hopkins/detection.cpp
engines/hopkins/detection.h
engines/hopkins/detection_tables.h
engines/hopkins/metaengine.cpp
diff --git a/engines/hopkins/POTFILES b/engines/hopkins/POTFILES
index 1ea7d5111b9..8514e90a916 100644
--- a/engines/hopkins/POTFILES
+++ b/engines/hopkins/POTFILES
@@ -1,2 +1,2 @@
-engines/hopkins/detection.cpp
+engines/hopkins/metaengine.cpp
diff --git a/engines/hopkins/detection.cpp b/engines/hopkins/detection.cpp
index 3bbf73a91fc..b355f95d226 100644
--- a/engines/hopkins/detection.cpp
+++ b/engines/hopkins/detection.cpp
@@ -21,7 +21,6 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
-#include "common/translation.h"
#include "hopkins/detection.h"
#include "hopkins/hopkins.h"
@@ -39,34 +38,6 @@ static const PlainGameDescriptor hopkinsGames[] = {
#include "hopkins/detection_tables.h"
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_GORE_DEFAULT_OFF,
- {
- _s("Gore Mode"),
- _s("Enable Gore Mode when available"),
- "enable_gore",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_GORE_DEFAULT_ON,
- {
- _s("Gore Mode"),
- _s("Enable Gore Mode when available"),
- "enable_gore",
- true,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
const static char *directoryGlobs[] = {
"voice",
"link",
@@ -75,7 +46,7 @@ const static char *directoryGlobs[] = {
class HopkinsMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- HopkinsMetaEngineDetection() : AdvancedMetaEngineDetection(Hopkins::gameDescriptions, sizeof(Hopkins::HopkinsGameDescription), hopkinsGames, optionsList) {
+ HopkinsMetaEngineDetection() : AdvancedMetaEngineDetection(Hopkins::gameDescriptions, sizeof(Hopkins::HopkinsGameDescription), hopkinsGames) {
_maxScanDepth = 3;
_directoryGlobs = directoryGlobs;
}
diff --git a/engines/hopkins/detection.h b/engines/hopkins/detection.h
index a4cede61345..e5c66ccd139 100644
--- a/engines/hopkins/detection.h
+++ b/engines/hopkins/detection.h
@@ -28,6 +28,9 @@ struct HopkinsGameDescription {
ADGameDescription desc;
};
+#define GAMEOPTION_GORE_DEFAULT_ON GUIO_GAMEOPTIONS1
+#define GAMEOPTION_GORE_DEFAULT_OFF GUIO_GAMEOPTIONS2
+
} // End of namespace Hopkins
#endif // HOPKINS_DETECTION_H
diff --git a/engines/hopkins/detection_tables.h b/engines/hopkins/detection_tables.h
index 8b7318d7283..6999c63ed30 100644
--- a/engines/hopkins/detection_tables.h
+++ b/engines/hopkins/detection_tables.h
@@ -21,9 +21,6 @@
namespace Hopkins {
-#define GAMEOPTION_GORE_DEFAULT_ON GUIO_GAMEOPTIONS1
-#define GAMEOPTION_GORE_DEFAULT_OFF GUIO_GAMEOPTIONS2
-
static const HopkinsGameDescription gameDescriptions[] = {
{
// Hopkins FBI Linux Demo UK 1.00 and 1.02
diff --git a/engines/hopkins/metaengine.cpp b/engines/hopkins/metaengine.cpp
index 129cea3b5c9..b35ac3b84ae 100644
--- a/engines/hopkins/metaengine.cpp
+++ b/engines/hopkins/metaengine.cpp
@@ -24,6 +24,7 @@
#include "base/plugins.h"
#include "common/savefile.h"
#include "common/str-array.h"
+#include "common/translation.h"
#include "common/memstream.h"
#include "engines/advancedDetector.h"
#include "common/system.h"
@@ -35,6 +36,34 @@
namespace Hopkins {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_GORE_DEFAULT_OFF,
+ {
+ _s("Gore Mode"),
+ _s("Enable Gore Mode when available"),
+ "enable_gore",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_GORE_DEFAULT_ON,
+ {
+ _s("Gore Mode"),
+ _s("Enable Gore Mode when available"),
+ "enable_gore",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
uint32 HopkinsEngine::getFeatures() const {
return _gameDescription->desc.flags;
}
@@ -63,6 +92,10 @@ public:
return "hopkins";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Hopkins::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: a7cfc03df0cf6401b0c501ce36ef51190ed51253
https://github.com/scummvm/scummvm/commit/a7cfc03df0cf6401b0c501ce36ef51190ed51253
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
HYPNO: Move the engine options into the MetaEngine subclass
Changed paths:
A engines/hypno/detection.h
engines/hypno/POTFILES
engines/hypno/detection.cpp
engines/hypno/metaengine.cpp
diff --git a/engines/hypno/POTFILES b/engines/hypno/POTFILES
index 94c22b97d51..d7a3c1fe694 100644
--- a/engines/hypno/POTFILES
+++ b/engines/hypno/POTFILES
@@ -1 +1 @@
-engines/hypno/detection.cpp
+engines/hypno/metaengine.cpp
diff --git a/engines/hypno/detection.cpp b/engines/hypno/detection.cpp
index 3fa69969afc..0549b881f07 100644
--- a/engines/hypno/detection.cpp
+++ b/engines/hypno/detection.cpp
@@ -20,15 +20,9 @@
*/
#include "base/plugins.h"
-#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "hypno/hypno.h"
-
-#define GAMEOPTION_ORIGINAL_CHEATS GUIO_GAMEOPTIONS1
-#define GAMEOPTION_INFINITE_HEALTH GUIO_GAMEOPTIONS2
-#define GAMEOPTION_INFINITE_AMMO GUIO_GAMEOPTIONS3
-#define GAMEOPTION_UNLOCK_ALL_LEVELS GUIO_GAMEOPTIONS4
-#define GAMEOPTION_RESTORED_CONTENT GUIO_GAMEOPTIONS5
+#include "hypno/detection.h"
static const DebugChannelDef debugFlagList[] = {
{Hypno::kHypnoDebugMedia, "media", "Media debug channel"},
@@ -251,65 +245,6 @@ static const ADGameDescription gameDescriptions[] = {
AD_TABLE_END_MARKER
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ORIGINAL_CHEATS,
- {
- _s("Enable original cheats"),
- _s("Allow cheats using the C key."),
- "cheats",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_INFINITE_HEALTH,
- {
- _s("Enable infinite health cheat"),
- _s("Player health will never decrease (except for game over scenes)."),
- "infiniteHealth",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_INFINITE_AMMO,
- {
- _s("Enable infinite ammo cheat"),
- _s("Player ammo will never decrease."),
- "infiniteAmmo",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_UNLOCK_ALL_LEVELS,
- {
- _s("Unlock all levels"),
- _s("All levels will be available to play."),
- "unlockAllLevels",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_RESTORED_CONTENT,
- {
- _s("Enable restored content"),
- _s("Add additional content that is not enabled the original implementation."),
- "restored",
- true,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
} // End of namespace Hypno
static const char *const directoryGlobs[] = {
@@ -328,7 +263,7 @@ static const char *const directoryGlobs[] = {
class HypnoMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- HypnoMetaEngineDetection() : AdvancedMetaEngineDetection(Hypno::gameDescriptions, sizeof(ADGameDescription), Hypno::hypnoGames, Hypno::optionsList) {
+ HypnoMetaEngineDetection() : AdvancedMetaEngineDetection(Hypno::gameDescriptions, sizeof(ADGameDescription), Hypno::hypnoGames) {
_guiOptions = GUIO6(GUIO_NOMIDI, GAMEOPTION_ORIGINAL_CHEATS, GAMEOPTION_INFINITE_HEALTH, GAMEOPTION_INFINITE_AMMO, GAMEOPTION_UNLOCK_ALL_LEVELS, GAMEOPTION_RESTORED_CONTENT);
_maxScanDepth = 3;
_directoryGlobs = directoryGlobs;
diff --git a/engines/hypno/detection.h b/engines/hypno/detection.h
new file mode 100644
index 00000000000..8d80ad2f2dd
--- /dev/null
+++ b/engines/hypno/detection.h
@@ -0,0 +1,31 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HYPNO_DETECTION_H
+#define HYPNO_DETECTION_H
+
+#define GAMEOPTION_ORIGINAL_CHEATS GUIO_GAMEOPTIONS1
+#define GAMEOPTION_INFINITE_HEALTH GUIO_GAMEOPTIONS2
+#define GAMEOPTION_INFINITE_AMMO GUIO_GAMEOPTIONS3
+#define GAMEOPTION_UNLOCK_ALL_LEVELS GUIO_GAMEOPTIONS4
+#define GAMEOPTION_RESTORED_CONTENT GUIO_GAMEOPTIONS5
+
+#endif
diff --git a/engines/hypno/metaengine.cpp b/engines/hypno/metaengine.cpp
index 5252cc41e8d..20d51dfd620 100644
--- a/engines/hypno/metaengine.cpp
+++ b/engines/hypno/metaengine.cpp
@@ -21,7 +21,69 @@
#include "engines/advancedDetector.h"
+#include "common/translation.h"
+
#include "hypno/hypno.h"
+#include "hypno/detection.h"
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ORIGINAL_CHEATS,
+ {
+ _s("Enable original cheats"),
+ _s("Allow cheats using the C key."),
+ "cheats",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_INFINITE_HEALTH,
+ {
+ _s("Enable infinite health cheat"),
+ _s("Player health will never decrease (except for game over scenes)."),
+ "infiniteHealth",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_INFINITE_AMMO,
+ {
+ _s("Enable infinite ammo cheat"),
+ _s("Player ammo will never decrease."),
+ "infiniteAmmo",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_UNLOCK_ALL_LEVELS,
+ {
+ _s("Unlock all levels"),
+ _s("All levels will be available to play."),
+ "unlockAllLevels",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_RESTORED_CONTENT,
+ {
+ _s("Enable restored content"),
+ _s("Add additional content that is not enabled the original implementation."),
+ "restored",
+ true,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
class HypnoMetaEngine : public AdvancedMetaEngine {
public:
@@ -29,6 +91,10 @@ public:
return "hypno";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
};
Commit: ca29054d6b64c8f1c83c3f3541b38062a5785188
https://github.com/scummvm/scummvm/commit/ca29054d6b64c8f1c83c3f3541b38062a5785188
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
KYRA: Move the engine options into the MetaEngine subclass
Changed paths:
engines/kyra/detection.cpp
engines/kyra/detection.h
engines/kyra/detection_tables.h
engines/kyra/metaengine.cpp
diff --git a/engines/kyra/detection.cpp b/engines/kyra/detection.cpp
index 95573e83656..1bacaadc1a3 100644
--- a/engines/kyra/detection.cpp
+++ b/engines/kyra/detection.cpp
@@ -50,130 +50,11 @@ const char *const directoryGlobs[] = {
nullptr
};
-const ADExtraGuiOptionsMap gameGuiOptions[] = {
- // Kyrandia 3 options
-
- {
- GAMEOPTION_KYRA3_AUDIENCE,
- {
- // I18N: Studio audience adds an applause and cheering sounds whenever
- // Malcolm makes a joke.
- _s("Studio audience"),
- _s("Enable studio audience"),
- "studio_audience",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_KYRA3_SKIP,
- {
- // I18N: This option allows the user to skip text and cutscenes.
- _s("Skip support"),
- _s("Allow text and cutscenes to be skipped"),
- "skip_support",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_KYRA3_HELIUM,
- {
- // I18N: Helium mode makes people sound like they've inhaled Helium.
- _s("Helium mode"),
- _s("Enable helium mode"),
- "helium_mode",
- false,
- 0,
- 0
- }
- },
-
- // LoL options
-
- {
- GAMEOPTION_LOL_SCROLLING,
- {
- // I18N: When enabled, this option makes scrolling smoother when
- // changing from one screen to another.
- _s("Smooth scrolling"),
- _s("Enable smooth scrolling when walking"),
- "smooth_scrolling",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_LOL_CURSORS,
- {
- // I18N: When enabled, this option changes the cursor when it floats to the
- // edge of the screen to a directional arrow. The player can then click to
- // walk towards that direction.
- _s("Floating cursors"),
- _s("Enable floating cursors"),
- "floating_cursors",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_LOL_SAVENAMES,
- {
- // I18N: When enabled, this option will fill in an autogenerated savegame
- // description into the input prompt where.
- _s("Suggest save names"),
- _s("Autogenerated naming suggestions for savegames"),
- "auto_savenames",
- false,
- 0,
- 0
- }
- },
-
- // EoB options
-
- {
- GAMEOPTION_EOB_HPGRAPHS,
- {
- // I18N: HP stands for Hit Points
- _s("HP bar graphs"),
- _s("Enable hit point bar graphs"),
- "hpbargraphs",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_EOB_MOUSESWAP,
- {
- // I18N: L/R stands for Left/Right
- _s("Fight Button L/R Swap"),
- _s("Left button to attack, right button to pick up items"),
- "mousebtswap",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
} // End of anonymous namespace
class KyraMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- KyraMetaEngineDetection() : AdvancedMetaEngineDetection(adGameDescs, sizeof(KYRAGameDescription), gameList, gameGuiOptions) {
+ KyraMetaEngineDetection() : AdvancedMetaEngineDetection(adGameDescs, sizeof(KYRAGameDescription), gameList) {
_md5Bytes = 1024 * 1024;
_maxScanDepth = 2;
_directoryGlobs = directoryGlobs;
diff --git a/engines/kyra/detection.h b/engines/kyra/detection.h
index 88b6d738365..add17e93ae6 100644
--- a/engines/kyra/detection.h
+++ b/engines/kyra/detection.h
@@ -70,6 +70,17 @@ struct KYRAGameDescription {
Kyra::GameFlags flags;
};
+#define GAMEOPTION_KYRA3_AUDIENCE GUIO_GAMEOPTIONS1
+#define GAMEOPTION_KYRA3_SKIP GUIO_GAMEOPTIONS2
+#define GAMEOPTION_KYRA3_HELIUM GUIO_GAMEOPTIONS3
+
+#define GAMEOPTION_LOL_SCROLLING GUIO_GAMEOPTIONS4
+#define GAMEOPTION_LOL_CURSORS GUIO_GAMEOPTIONS5
+#define GAMEOPTION_LOL_SAVENAMES GUIO_GAMEOPTIONS8
+
+#define GAMEOPTION_EOB_HPGRAPHS GUIO_GAMEOPTIONS6
+#define GAMEOPTION_EOB_MOUSESWAP GUIO_GAMEOPTIONS7
+
} // End of anonymous namespace
#endif // KYRA_DETECTION_H
diff --git a/engines/kyra/detection_tables.h b/engines/kyra/detection_tables.h
index 2bd824e1acc..41972c8851f 100644
--- a/engines/kyra/detection_tables.h
+++ b/engines/kyra/detection_tables.h
@@ -67,17 +67,6 @@ namespace {
#define EOB2_FLAGS FLAGS(false, false, false, false, false, false, false, false, false, Kyra::GI_EOB2)
#define EOB2_FMTOWNS_FLAGS FLAGS(false, false, false, false, true, false, true, false, false, Kyra::GI_EOB2)
-#define GAMEOPTION_KYRA3_AUDIENCE GUIO_GAMEOPTIONS1
-#define GAMEOPTION_KYRA3_SKIP GUIO_GAMEOPTIONS2
-#define GAMEOPTION_KYRA3_HELIUM GUIO_GAMEOPTIONS3
-
-#define GAMEOPTION_LOL_SCROLLING GUIO_GAMEOPTIONS4
-#define GAMEOPTION_LOL_CURSORS GUIO_GAMEOPTIONS5
-#define GAMEOPTION_LOL_SAVENAMES GUIO_GAMEOPTIONS8
-
-#define GAMEOPTION_EOB_HPGRAPHS GUIO_GAMEOPTIONS6
-#define GAMEOPTION_EOB_MOUSESWAP GUIO_GAMEOPTIONS7
-
static const char msg_missingLangResources[] = _s("Missing language specific game code and/or resources.");
static const char msg_fanTrans_missingLangResources[] = _s("Missing language specific game code and/or resources for this fan translation.");
static const char msg_fanTrans_unsupportiveTranslator[] = _s("The fan translator does not wish his translation to be incorporated into ScummVM.");
diff --git a/engines/kyra/metaengine.cpp b/engines/kyra/metaengine.cpp
index 7e92d0a1568..a1ed1ad7063 100644
--- a/engines/kyra/metaengine.cpp
+++ b/engines/kyra/metaengine.cpp
@@ -37,12 +37,135 @@
#include "kyra/detection.h"
+const ADExtraGuiOptionsMap gameGuiOptions[] = {
+ // Kyrandia 3 options
+
+ {
+ GAMEOPTION_KYRA3_AUDIENCE,
+ {
+ // I18N: Studio audience adds an applause and cheering sounds whenever
+ // Malcolm makes a joke.
+ _s("Studio audience"),
+ _s("Enable studio audience"),
+ "studio_audience",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_KYRA3_SKIP,
+ {
+ // I18N: This option allows the user to skip text and cutscenes.
+ _s("Skip support"),
+ _s("Allow text and cutscenes to be skipped"),
+ "skip_support",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_KYRA3_HELIUM,
+ {
+ // I18N: Helium mode makes people sound like they've inhaled Helium.
+ _s("Helium mode"),
+ _s("Enable helium mode"),
+ "helium_mode",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ // LoL options
+
+ {
+ GAMEOPTION_LOL_SCROLLING,
+ {
+ // I18N: When enabled, this option makes scrolling smoother when
+ // changing from one screen to another.
+ _s("Smooth scrolling"),
+ _s("Enable smooth scrolling when walking"),
+ "smooth_scrolling",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_LOL_CURSORS,
+ {
+ // I18N: When enabled, this option changes the cursor when it floats to the
+ // edge of the screen to a directional arrow. The player can then click to
+ // walk towards that direction.
+ _s("Floating cursors"),
+ _s("Enable floating cursors"),
+ "floating_cursors",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_LOL_SAVENAMES,
+ {
+ // I18N: When enabled, this option will fill in an autogenerated savegame
+ // description into the input prompt where.
+ _s("Suggest save names"),
+ _s("Autogenerated naming suggestions for savegames"),
+ "auto_savenames",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ // EoB options
+
+ {
+ GAMEOPTION_EOB_HPGRAPHS,
+ {
+ // I18N: HP stands for Hit Points
+ _s("HP bar graphs"),
+ _s("Enable hit point bar graphs"),
+ "hpbargraphs",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_EOB_MOUSESWAP,
+ {
+ // I18N: L/R stands for Left/Right
+ _s("Fight Button L/R Swap"),
+ _s("Left button to attack, right button to pick up items"),
+ "mousebtswap",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class KyraMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "kyra";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return gameGuiOptions;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: 0a3d7be2e8cac2725e6525af1973c48f370fd0c6
https://github.com/scummvm/scummvm/commit/0a3d7be2e8cac2725e6525af1973c48f370fd0c6
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
LURE: Move the engine options into the MetaEngine subclass
Changed paths:
engines/lure/POTFILES
engines/lure/detection.cpp
engines/lure/detection.h
engines/lure/metaengine.cpp
diff --git a/engines/lure/POTFILES b/engines/lure/POTFILES
index b2c9559826c..9fa20047215 100644
--- a/engines/lure/POTFILES
+++ b/engines/lure/POTFILES
@@ -1,2 +1,3 @@
engines/lure/lure.cpp
engines/lure/detection.cpp
+engines/lure/metaengine.cpp
diff --git a/engines/lure/detection.cpp b/engines/lure/detection.cpp
index e0a04aa4475..1d07867f644 100644
--- a/engines/lure/detection.cpp
+++ b/engines/lure/detection.cpp
@@ -33,28 +33,6 @@ static const PlainGameDescriptor lureGames[] = {
{nullptr, nullptr}
};
-
-#ifdef USE_TTS
-#define GAMEOPTION_TTS_NARRATOR GUIO_GAMEOPTIONS1
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_TTS_NARRATOR,
- {
- _s("TTS Narrator"),
- _s("Use TTS to read the descriptions (if TTS is available)"),
- "tts_narrator",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
-#endif
-
static const DebugChannelDef debugFlagList[] = {
{Lure::kLureDebugScripts, "scripts", "Scripts debugging"},
{Lure::kLureDebugAnimations, "animations", "Animations debugging"},
@@ -266,11 +244,7 @@ static const LureGameDescription gameDescriptions[] = {
class LureMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- LureMetaEngineDetection() : AdvancedMetaEngineDetection(Lure::gameDescriptions, sizeof(Lure::LureGameDescription), lureGames
-#ifdef USE_TTS
- , optionsList
-#endif
- ) {
+ LureMetaEngineDetection() : AdvancedMetaEngineDetection(Lure::gameDescriptions, sizeof(Lure::LureGameDescription), lureGames) {
_md5Bytes = 1024;
// Use kADFlagUseExtraAsHint to distinguish between EGA and VGA versions
diff --git a/engines/lure/detection.h b/engines/lure/detection.h
index e3bc91cb209..67a2386edab 100644
--- a/engines/lure/detection.h
+++ b/engines/lure/detection.h
@@ -39,6 +39,8 @@ struct LureGameDescription {
uint32 features;
};
+#define GAMEOPTION_TTS_NARRATOR GUIO_GAMEOPTIONS1
+
} // End of namespace Lure
#endif // LURE_DETECTION_H
diff --git a/engines/lure/metaengine.cpp b/engines/lure/metaengine.cpp
index ce42de7a285..315cd63227d 100644
--- a/engines/lure/metaengine.cpp
+++ b/engines/lure/metaengine.cpp
@@ -21,6 +21,7 @@
#include "common/savefile.h"
#include "common/system.h"
+#include "common/translation.h"
#include "engines/advancedDetector.h"
@@ -29,6 +30,26 @@
namespace Lure {
+#ifdef USE_TTS
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_TTS_NARRATOR,
+ {
+ _s("TTS Narrator"),
+ _s("Use TTS to read the descriptions (if TTS is available)"),
+ "tts_narrator",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
+#endif
+
uint32 LureEngine::getFeatures() const { return _gameDescription->features; }
Common::Language LureEngine::getLanguage() const { return _gameDescription->desc.language; }
Common::Platform LureEngine::getPlatform() const { return _gameDescription->desc.platform; }
@@ -56,6 +77,12 @@ public:
return "lure";
}
+#ifdef USE_TTS
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Lure::optionsList;
+ }
+#endif
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: f3cb4495664a20e767824c87b1fbf829d67f9075
https://github.com/scummvm/scummvm/commit/f3cb4495664a20e767824c87b1fbf829d67f9075
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
MADE: Move the engine options into the MetaEngine subclass
Changed paths:
engines/made/POTFILES
engines/made/detection.cpp
engines/made/detection.h
engines/made/detection_tables.h
engines/made/metaengine.cpp
diff --git a/engines/made/POTFILES b/engines/made/POTFILES
index afff719f649..6406996a3c9 100644
--- a/engines/made/POTFILES
+++ b/engines/made/POTFILES
@@ -1,2 +1,3 @@
engines/made/detection.cpp
engines/made/detection_tables.h
+engines/made/metaengine.cpp
diff --git a/engines/made/detection.cpp b/engines/made/detection.cpp
index 18f5ddd3fa1..ad504d21b89 100644
--- a/engines/made/detection.cpp
+++ b/engines/made/detection.cpp
@@ -36,28 +36,9 @@ static const PlainGameDescriptor madeGames[] = {
#include "made/detection_tables.h"
-namespace Made {
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_INTRO_MUSIC_DIGITAL,
- {
- _s("Play a digital soundtrack during the opening movie"),
- _s("If selected, the game will use a digital soundtrack during the introduction. Otherwise, it will play MIDI music."),
- "intro_music_digital",
- true,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
-} // End of namespace Made
-
class MadeMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- MadeMetaEngineDetection() : AdvancedMetaEngineDetection(Made::gameDescriptions, sizeof(Made::MadeGameDescription), madeGames, Made::optionsList) {
+ MadeMetaEngineDetection() : AdvancedMetaEngineDetection(Made::gameDescriptions, sizeof(Made::MadeGameDescription), madeGames) {
}
const char *getName() const override {
diff --git a/engines/made/detection.h b/engines/made/detection.h
index 5b59eb58616..642d5467c43 100644
--- a/engines/made/detection.h
+++ b/engines/made/detection.h
@@ -49,6 +49,8 @@ struct MadeGameDescription {
uint16 version;
};
+#define GAMEOPTION_INTRO_MUSIC_DIGITAL GUIO_GAMEOPTIONS1
+
} // End of namespace Made
#endif // MADE_DETECTION_H
diff --git a/engines/made/detection_tables.h b/engines/made/detection_tables.h
index 18b1188520a..e223e64162a 100644
--- a/engines/made/detection_tables.h
+++ b/engines/made/detection_tables.h
@@ -25,8 +25,6 @@
#include "engines/advancedDetector.h"
#include "common/translation.h"
-#define GAMEOPTION_INTRO_MUSIC_DIGITAL GUIO_GAMEOPTIONS1
-
namespace Made {
static const MadeGameDescription gameDescriptions[] = {
diff --git a/engines/made/metaengine.cpp b/engines/made/metaengine.cpp
index b1269fe3d32..4545def13c5 100644
--- a/engines/made/metaengine.cpp
+++ b/engines/made/metaengine.cpp
@@ -20,12 +20,28 @@
*/
#include "engines/advancedDetector.h"
+#include "common/translation.h"
#include "made/made.h"
#include "made/detection.h"
namespace Made {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_INTRO_MUSIC_DIGITAL,
+ {
+ _s("Play a digital soundtrack during the opening movie"),
+ _s("If selected, the game will use a digital soundtrack during the introduction. Otherwise, it will play MIDI music."),
+ "intro_music_digital",
+ true,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
uint32 MadeEngine::getGameID() const {
return _gameDescription->gameID;
}
@@ -50,6 +66,10 @@ public:
return "made";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Made::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
};
Commit: 1f0a0ebe87b6a28a8b8fc058e54b11a4196beace
https://github.com/scummvm/scummvm/commit/1f0a0ebe87b6a28a8b8fc058e54b11a4196beace
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
MADS: Move the engine options into the MetaEngine subclass
Changed paths:
engines/mads/POTFILES
engines/mads/detection.cpp
engines/mads/detection.h
engines/mads/metaengine.cpp
diff --git a/engines/mads/POTFILES b/engines/mads/POTFILES
index 815741a2b4d..93c9e355970 100644
--- a/engines/mads/POTFILES
+++ b/engines/mads/POTFILES
@@ -1,2 +1,2 @@
-engines/mads/detection.cpp
+engines/mads/metaengine.cpp
engines/mads/nebular/dialogs_nebular.cpp
diff --git a/engines/mads/detection.cpp b/engines/mads/detection.cpp
index 1ab01cc4e16..33aee907255 100644
--- a/engines/mads/detection.cpp
+++ b/engines/mads/detection.cpp
@@ -24,7 +24,6 @@
#include "common/str-array.h"
#include "engines/advancedDetector.h"
#include "common/system.h"
-#include "common/translation.h"
#include "mads/detection.h"
#include "mads/mads.h"
@@ -43,99 +42,11 @@ static const DebugChannelDef debugFlagList[] = {
DEBUG_CHANNEL_END
};
-#define GAMEOPTION_EASY_MOUSE GUIO_GAMEOPTIONS1
-#define GAMEOPTION_ANIMATED_INVENTORY GUIO_GAMEOPTIONS2
-#define GAMEOPTION_ANIMATED_INTERFACE GUIO_GAMEOPTIONS3
-#define GAMEOPTION_NAUGHTY_MODE GUIO_GAMEOPTIONS4
-//#define GAMEOPTION_GRAPHICS_DITHERING GUIO_GAMEOPTIONS5
-
-#ifdef USE_TTS
-#define GAMEOPTION_TTS_NARRATOR GUIO_GAMEOPTIONS5
-#endif
-
#include "mads/detection_tables.h"
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_EASY_MOUSE,
- {
- _s("Easy mouse interface"),
- _s("Shows object names when hovering the mouse over them"),
- "EasyMouse",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_ANIMATED_INVENTORY,
- {
- _s("Animated inventory items"),
- _s("Animated inventory items"),
- "InvObjectsAnimated",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_ANIMATED_INTERFACE,
- {
- _s("Animated game interface"),
- _s("Animated game interface"),
- "TextWindowAnimated",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_NAUGHTY_MODE,
- {
- _s("Naughty game mode"),
- _s("Naughty game mode"),
- "NaughtyMode",
- true,
- 0,
- 0
- }
- },
-
- /*{
- GAMEOPTION_GRAPHICS_DITHERING,
- {
- _s("Graphics dithering"),
- _s("Graphics dithering"),
- "GraphicsDithering",
- true,
- 0,
- 0
- }
- },*/
-
-#ifdef USE_TTS
- {
- GAMEOPTION_TTS_NARRATOR,
- {
- _s("TTS Narrator"),
- _s("Use TTS to read the descriptions (if TTS is available)"),
- "tts_narrator",
- false,
- 0,
- 0
- }
- },
-#endif
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class MADSMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- MADSMetaEngineDetection() : AdvancedMetaEngineDetection(MADS::gameDescriptions, sizeof(MADS::MADSGameDescription), MADSGames, optionsList) {
+ MADSMetaEngineDetection() : AdvancedMetaEngineDetection(MADS::gameDescriptions, sizeof(MADS::MADSGameDescription), MADSGames) {
_maxScanDepth = 3;
}
diff --git a/engines/mads/detection.h b/engines/mads/detection.h
index e9785884a71..476491cf6c0 100644
--- a/engines/mads/detection.h
+++ b/engines/mads/detection.h
@@ -44,6 +44,16 @@ struct MADSGameDescription {
uint32 features;
};
+#define GAMEOPTION_EASY_MOUSE GUIO_GAMEOPTIONS1
+#define GAMEOPTION_ANIMATED_INVENTORY GUIO_GAMEOPTIONS2
+#define GAMEOPTION_ANIMATED_INTERFACE GUIO_GAMEOPTIONS3
+#define GAMEOPTION_NAUGHTY_MODE GUIO_GAMEOPTIONS4
+//#define GAMEOPTION_GRAPHICS_DITHERING GUIO_GAMEOPTIONS5
+
+#ifdef USE_TTS
+#define GAMEOPTION_TTS_NARRATOR GUIO_GAMEOPTIONS5
+#endif
+
} // End of namespace MADS
#endif // MADS_DETECTION_H
diff --git a/engines/mads/metaengine.cpp b/engines/mads/metaengine.cpp
index 91f92e59d35..de1b4bf4039 100644
--- a/engines/mads/metaengine.cpp
+++ b/engines/mads/metaengine.cpp
@@ -29,6 +29,7 @@
#include "common/str-array.h"
#include "common/memstream.h"
#include "common/system.h"
+#include "common/translation.h"
#include "graphics/surface.h"
#include "mads/events.h"
@@ -39,6 +40,84 @@
namespace MADS {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_EASY_MOUSE,
+ {
+ _s("Easy mouse interface"),
+ _s("Shows object names when hovering the mouse over them"),
+ "EasyMouse",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_ANIMATED_INVENTORY,
+ {
+ _s("Animated inventory items"),
+ _s("Animated inventory items"),
+ "InvObjectsAnimated",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_ANIMATED_INTERFACE,
+ {
+ _s("Animated game interface"),
+ _s("Animated game interface"),
+ "TextWindowAnimated",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_NAUGHTY_MODE,
+ {
+ _s("Naughty game mode"),
+ _s("Naughty game mode"),
+ "NaughtyMode",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ /*{
+ GAMEOPTION_GRAPHICS_DITHERING,
+ {
+ _s("Graphics dithering"),
+ _s("Graphics dithering"),
+ "GraphicsDithering",
+ true,
+ 0,
+ 0
+ }
+ },*/
+
+#ifdef USE_TTS
+ {
+ GAMEOPTION_TTS_NARRATOR,
+ {
+ _s("TTS Narrator"),
+ _s("Use TTS to read the descriptions (if TTS is available)"),
+ "tts_narrator",
+ false,
+ 0,
+ 0
+ }
+ },
+#endif
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
uint32 MADSEngine::getGameID() const {
return _gameDescription->gameID;
}
@@ -67,6 +146,10 @@ public:
return "mads";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return MADS::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: 425bcfeb0c975eadd771e4aa20672108be7e79df
https://github.com/scummvm/scummvm/commit/425bcfeb0c975eadd771e4aa20672108be7e79df
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
MTROPOLIS: Move the engine options into the MetaEngine subclass
Changed paths:
engines/mtropolis/POTFILES
engines/mtropolis/detection.cpp
engines/mtropolis/detection.h
engines/mtropolis/detection_tables.h
engines/mtropolis/metaengine.cpp
diff --git a/engines/mtropolis/POTFILES b/engines/mtropolis/POTFILES
index 1d78dd6a65c..d28bd9c5a1a 100644
--- a/engines/mtropolis/POTFILES
+++ b/engines/mtropolis/POTFILES
@@ -1,3 +1,3 @@
-engines/mtropolis/detection.cpp
+engines/mtropolis/metaengine.cpp
engines/mtropolis/mtropolis.cpp
engines/mtropolis/saveload.cpp
diff --git a/engines/mtropolis/detection.cpp b/engines/mtropolis/detection.cpp
index cc7d2d123b8..6bf96ee8947 100644
--- a/engines/mtropolis/detection.cpp
+++ b/engines/mtropolis/detection.cpp
@@ -23,7 +23,6 @@
#include "engines/advancedDetector.h"
#include "common/config-manager.h"
-#include "common/translation.h"
#include "mtropolis/detection.h"
@@ -36,80 +35,6 @@ static const PlainGameDescriptor mTropolisGames[] = {
#include "mtropolis/detection_tables.h"
-namespace MTropolis {
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_WIDESCREEN_MOD,
- {
- _s("16:9 widescreen mod"),
- _s("Removes letterboxing and moves some display elements, improving coverage on widescreen displays"),
- "mtropolis_mod_obsidian_widescreen",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_DYNAMIC_MIDI,
- {
- _s("Improved music mixing"),
- _s("Enables dynamic MIDI mixer, improving quality, but behaving less like mTropolis Player."),
- "mtropolis_mod_dynamic_midi",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_AUTO_SAVE_AT_CHECKPOINTS,
- {
- _s("Autosave at progress points"),
- _s("Automatically saves the game after completing puzzles and chapters."),
- "mtropolis_mod_auto_save_at_checkpoints",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_ENABLE_SHORT_TRANSITIONS,
- {
- _s("Enable short transitions"),
- _s("Enables transitions that are set to maximum rate instead of skipping them."),
- "mtropolis_mod_minimum_transition_duration",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_SOUND_EFFECT_SUBTITLES,
- {
- _s("Enable subtitles for important sound effects"),
- _s("Enables subtitles for important sound effects. This may reduce the difficulty of sound recognition puzzles and minigames."),
- "mtropolis_mod_sound_gameplay_subtitles",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_LAUNCH_DEBUG,
- {
- _s("Start with debugger"),
- _s("Starts with the debugger dashboard active."),
- "mtropolis_debug_at_start",
- false,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
-} // End of namespace MTropolis
-
static const char *directoryGlobs[] = {
"Obsidian",
"RESOURCE",
@@ -121,7 +46,7 @@ static const char *directoryGlobs[] = {
class MTropolisMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- MTropolisMetaEngineDetection() : AdvancedMetaEngineDetection(MTropolis::gameDescriptions, sizeof(MTropolis::MTropolisGameDescription), mTropolisGames, MTropolis::optionsList) {
+ MTropolisMetaEngineDetection() : AdvancedMetaEngineDetection(MTropolis::gameDescriptions, sizeof(MTropolis::MTropolisGameDescription), mTropolisGames) {
_guiOptions = GUIO3(GAMEOPTION_DYNAMIC_MIDI, GAMEOPTION_LAUNCH_DEBUG, GAMEOPTION_ENABLE_SHORT_TRANSITIONS);
_maxScanDepth = 3;
_directoryGlobs = directoryGlobs;
diff --git a/engines/mtropolis/detection.h b/engines/mtropolis/detection.h
index 7bd18e77e3d..111efd7d2e1 100644
--- a/engines/mtropolis/detection.h
+++ b/engines/mtropolis/detection.h
@@ -67,6 +67,13 @@ struct MTropolisGameDescription {
MTropolisGameBootID bootID;
};
+#define GAMEOPTION_WIDESCREEN_MOD GUIO_GAMEOPTIONS1
+#define GAMEOPTION_DYNAMIC_MIDI GUIO_GAMEOPTIONS2
+#define GAMEOPTION_LAUNCH_DEBUG GUIO_GAMEOPTIONS3
+#define GAMEOPTION_SOUND_EFFECT_SUBTITLES GUIO_GAMEOPTIONS4
+#define GAMEOPTION_AUTO_SAVE_AT_CHECKPOINTS GUIO_GAMEOPTIONS5
+#define GAMEOPTION_ENABLE_SHORT_TRANSITIONS GUIO_GAMEOPTIONS6
+
} // End of namespace MTropolis
#endif // MTROPOLIS_DETECTION_H
diff --git a/engines/mtropolis/detection_tables.h b/engines/mtropolis/detection_tables.h
index 0a538a1976c..6a7dde5656e 100644
--- a/engines/mtropolis/detection_tables.h
+++ b/engines/mtropolis/detection_tables.h
@@ -26,13 +26,6 @@
#include "mtropolis/detection.h"
-#define GAMEOPTION_WIDESCREEN_MOD GUIO_GAMEOPTIONS1
-#define GAMEOPTION_DYNAMIC_MIDI GUIO_GAMEOPTIONS2
-#define GAMEOPTION_LAUNCH_DEBUG GUIO_GAMEOPTIONS3
-#define GAMEOPTION_SOUND_EFFECT_SUBTITLES GUIO_GAMEOPTIONS4
-#define GAMEOPTION_AUTO_SAVE_AT_CHECKPOINTS GUIO_GAMEOPTIONS5
-#define GAMEOPTION_ENABLE_SHORT_TRANSITIONS GUIO_GAMEOPTIONS6
-
namespace MTropolis {
static const MTropolisGameDescription gameDescriptions[] = {
diff --git a/engines/mtropolis/metaengine.cpp b/engines/mtropolis/metaengine.cpp
index bb85092386b..0a3acf3512c 100644
--- a/engines/mtropolis/metaengine.cpp
+++ b/engines/mtropolis/metaengine.cpp
@@ -45,6 +45,76 @@ struct Surface;
namespace MTropolis {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_WIDESCREEN_MOD,
+ {
+ _s("16:9 widescreen mod"),
+ _s("Removes letterboxing and moves some display elements, improving coverage on widescreen displays"),
+ "mtropolis_mod_obsidian_widescreen",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_DYNAMIC_MIDI,
+ {
+ _s("Improved music mixing"),
+ _s("Enables dynamic MIDI mixer, improving quality, but behaving less like mTropolis Player."),
+ "mtropolis_mod_dynamic_midi",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_AUTO_SAVE_AT_CHECKPOINTS,
+ {
+ _s("Autosave at progress points"),
+ _s("Automatically saves the game after completing puzzles and chapters."),
+ "mtropolis_mod_auto_save_at_checkpoints",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_ENABLE_SHORT_TRANSITIONS,
+ {
+ _s("Enable short transitions"),
+ _s("Enables transitions that are set to maximum rate instead of skipping them."),
+ "mtropolis_mod_minimum_transition_duration",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_SOUND_EFFECT_SUBTITLES,
+ {
+ _s("Enable subtitles for important sound effects"),
+ _s("Enables subtitles for important sound effects. This may reduce the difficulty of sound recognition puzzles and minigames."),
+ "mtropolis_mod_sound_gameplay_subtitles",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_LAUNCH_DEBUG,
+ {
+ _s("Start with debugger"),
+ _s("Starts with the debugger dashboard active."),
+ "mtropolis_debug_at_start",
+ false,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
uint32 MTropolisEngine::getGameID() const {
return _gameDescription->gameID;
}
@@ -61,6 +131,10 @@ public:
return "mtropolis";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return MTropolis::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: dbbf3d35c1cdcd11e30377bd090342edb5464201
https://github.com/scummvm/scummvm/commit/dbbf3d35c1cdcd11e30377bd090342edb5464201
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
MYST3: Move the engine options into the MetaEngine subclass
Changed paths:
engines/myst3/POTFILES
engines/myst3/detection.cpp
engines/myst3/detection.h
engines/myst3/metaengine.cpp
diff --git a/engines/myst3/POTFILES b/engines/myst3/POTFILES
index dc55484070a..8621a58ae6e 100644
--- a/engines/myst3/POTFILES
+++ b/engines/myst3/POTFILES
@@ -1,2 +1,3 @@
engines/myst3/detection.cpp
+engines/myst3/metaengine.cpp
engines/myst3/myst3.cpp
diff --git a/engines/myst3/detection.cpp b/engines/myst3/detection.cpp
index 5dadc65e8b2..48be2a5f84f 100644
--- a/engines/myst3/detection.cpp
+++ b/engines/myst3/detection.cpp
@@ -203,27 +203,9 @@ static const Myst3GameDescription gameDescriptions[] = {
{ AD_TABLE_END_MARKER, 0 }
};
-#define GAMEOPTION_WIDESCREEN_MOD GUIO_GAMEOPTIONS1
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_WIDESCREEN_MOD,
- {
- _s("Widescreen mod"),
- _s("Enable widescreen rendering in fullscreen mode."),
- "widescreen_mod",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class Myst3MetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- Myst3MetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(Myst3GameDescription), myst3Games, optionsList) {
+ Myst3MetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(Myst3GameDescription), myst3Games) {
_guiOptions = GUIO5(GUIO_NOMIDI, GUIO_NOSFX, GUIO_NOSPEECH, GUIO_NOSUBTITLES, GAMEOPTION_WIDESCREEN_MOD);
_maxScanDepth = 3;
_directoryGlobs = directoryGlobs;
diff --git a/engines/myst3/detection.h b/engines/myst3/detection.h
index 6f91663afc5..634fd29969c 100644
--- a/engines/myst3/detection.h
+++ b/engines/myst3/detection.h
@@ -37,6 +37,8 @@ struct Myst3GameDescription {
uint32 localizationType;
};
+#define GAMEOPTION_WIDESCREEN_MOD GUIO_GAMEOPTIONS1
+
} // End of namespace Myst3
#endif // MYST3_DETECTION_H
diff --git a/engines/myst3/metaengine.cpp b/engines/myst3/metaengine.cpp
index 32511a5677d..c915484744a 100644
--- a/engines/myst3/metaengine.cpp
+++ b/engines/myst3/metaengine.cpp
@@ -27,17 +27,38 @@
#include "common/config-manager.h"
#include "common/savefile.h"
+#include "common/translation.h"
#include "graphics/scaler.h"
namespace Myst3{
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_WIDESCREEN_MOD,
+ {
+ _s("Widescreen mod"),
+ _s("Enable widescreen rendering in fullscreen mode."),
+ "widescreen_mod",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class Myst3MetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "myst3";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override {
return (f == kSupportsListSaves) ||
(f == kSupportsDeleteSave) ||
Commit: 37ee0ca0efd2b1db57c4e711030dc146a7721f6c
https://github.com/scummvm/scummvm/commit/37ee0ca0efd2b1db57c4e711030dc146a7721f6c
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
NEVERHOOD: Move the engine options into the MetaEngine subclass
Changed paths:
engines/neverhood/POTFILES
engines/neverhood/detection.cpp
engines/neverhood/detection.h
engines/neverhood/metaengine.cpp
diff --git a/engines/neverhood/POTFILES b/engines/neverhood/POTFILES
index 36628cf4ddc..5d6888cc380 100644
--- a/engines/neverhood/POTFILES
+++ b/engines/neverhood/POTFILES
@@ -1,2 +1,3 @@
engines/neverhood/detection.cpp
engines/neverhood/menumodule.cpp
+engines/neverhood/metaengine.cpp
diff --git a/engines/neverhood/detection.cpp b/engines/neverhood/detection.cpp
index 3f4e6e3931a..8c85308832c 100644
--- a/engines/neverhood/detection.cpp
+++ b/engines/neverhood/detection.cpp
@@ -27,10 +27,6 @@
#include "neverhood/detection.h"
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-#define GAMEOPTION_SKIP_HALL_OF_RECORDS GUIO_GAMEOPTIONS2
-#define GAMEOPTION_SCALE_MAKING_OF_VIDEOS GUIO_GAMEOPTIONS3
-
static const PlainGameDescriptor neverhoodGames[] = {
{"neverhood", "The Neverhood Chronicles"},
{nullptr, nullptr}
@@ -132,49 +128,12 @@ static const ADGameDescription gameDescriptions[] = {
AD_TABLE_END_MARKER
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_SKIP_HALL_OF_RECORDS,
- {
- _s("Skip the Hall of Records storyboard scenes"),
- _s("Allows the player to skip past the Hall of Records storyboard scenes"),
- "skiphallofrecordsscenes",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_SCALE_MAKING_OF_VIDEOS,
- {
- _s("Scale the making of videos to full screen"),
- _s("Scale the making of videos, so that they use the whole screen"),
- "scalemakingofvideos",
- false,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
} // End of namespace Neverhood
class NeverhoodMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- NeverhoodMetaEngineDetection() : AdvancedMetaEngineDetection(Neverhood::gameDescriptions, sizeof(ADGameDescription), neverhoodGames, Neverhood::optionsList) {
+ NeverhoodMetaEngineDetection() : AdvancedMetaEngineDetection(Neverhood::gameDescriptions, sizeof(ADGameDescription), neverhoodGames) {
_guiOptions = GUIO5(GUIO_NOSUBTITLES, GUIO_NOMIDI, GAMEOPTION_ORIGINAL_SAVELOAD, GAMEOPTION_SKIP_HALL_OF_RECORDS, GAMEOPTION_SCALE_MAKING_OF_VIDEOS);
}
diff --git a/engines/neverhood/detection.h b/engines/neverhood/detection.h
index 543a5ea8bad..e15505a5aff 100644
--- a/engines/neverhood/detection.h
+++ b/engines/neverhood/detection.h
@@ -28,6 +28,10 @@ enum NeverhoodGameFeatures {
GF_BIG_DEMO = (1 << 0)
};
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
+#define GAMEOPTION_SKIP_HALL_OF_RECORDS GUIO_GAMEOPTIONS2
+#define GAMEOPTION_SCALE_MAKING_OF_VIDEOS GUIO_GAMEOPTIONS3
+
} // End of namespace Neverhood
#endif // NEVERHOOD_DETECTION_H
diff --git a/engines/neverhood/metaengine.cpp b/engines/neverhood/metaengine.cpp
index c898086ccec..060f805e7a1 100644
--- a/engines/neverhood/metaengine.cpp
+++ b/engines/neverhood/metaengine.cpp
@@ -23,12 +23,50 @@
#include "engines/advancedDetector.h"
#include "common/file.h"
+#include "common/translation.h"
#include "neverhood/neverhood.h"
#include "neverhood/detection.h"
namespace Neverhood {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_SKIP_HALL_OF_RECORDS,
+ {
+ _s("Skip the Hall of Records storyboard scenes"),
+ _s("Allows the player to skip past the Hall of Records storyboard scenes"),
+ "skiphallofrecordsscenes",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_SCALE_MAKING_OF_VIDEOS,
+ {
+ _s("Scale the making of videos to full screen"),
+ _s("Scale the making of videos, so that they use the whole screen"),
+ "scalemakingofvideos",
+ false,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
const char *NeverhoodEngine::getGameId() const {
return _gameDescription->gameId;
}
@@ -61,6 +99,10 @@ public:
return "neverhood";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Neverhood::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: ac5858ba658a493c51487d48ff3404f8a27dd296
https://github.com/scummvm/scummvm/commit/ac5858ba658a493c51487d48ff3404f8a27dd296
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
QUEEN: Move the engine options into the MetaEngine subclass
Changed paths:
engines/queen/POTFILES
engines/queen/detection.cpp
engines/queen/detection.h
engines/queen/metaengine.cpp
diff --git a/engines/queen/POTFILES b/engines/queen/POTFILES
index 28624662ca9..67e7d35b993 100644
--- a/engines/queen/POTFILES
+++ b/engines/queen/POTFILES
@@ -1 +1 @@
-engines/queen/detection.cpp
+engines/queen/metaengine.cpp
diff --git a/engines/queen/detection.cpp b/engines/queen/detection.cpp
index 02dc27756b1..396e8394f19 100644
--- a/engines/queen/detection.cpp
+++ b/engines/queen/detection.cpp
@@ -25,7 +25,6 @@
#include "common/gui_options.h"
#include "common/file.h"
-#include "common/translation.h"
#include "queen/detection.h"
#include "queen/resource.h"
@@ -35,36 +34,6 @@ static const PlainGameDescriptor queenGames[] = {
{nullptr, nullptr}
};
-#define GAMEOPTION_ALT_INTRO GUIO_GAMEOPTIONS1
-#define GAMEOPTION_ALT_FONT GUIO_GAMEOPTIONS2
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ALT_INTRO,
- {
- _s("Alternative intro"),
- _s("Use an alternative game intro (CD version only)"),
- "alt_intro",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_ALT_FONT,
- {
- _s("Improved font"),
- _s("Use an easier to read custom font"),
- "alt_font",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
namespace Queen {
static const QueenGameDescription gameDescriptions[] = {
@@ -494,7 +463,7 @@ static const QueenGameDescription gameDescriptions[] = {
class QueenMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- QueenMetaEngineDetection() : AdvancedMetaEngineDetection(Queen::gameDescriptions, sizeof(Queen::QueenGameDescription), queenGames, optionsList) {
+ QueenMetaEngineDetection() : AdvancedMetaEngineDetection(Queen::gameDescriptions, sizeof(Queen::QueenGameDescription), queenGames) {
}
const char *getName() const override {
diff --git a/engines/queen/detection.h b/engines/queen/detection.h
index c8d162e5d85..4e65dd4c3ba 100644
--- a/engines/queen/detection.h
+++ b/engines/queen/detection.h
@@ -28,6 +28,9 @@ struct QueenGameDescription {
ADGameDescription desc;
};
+#define GAMEOPTION_ALT_INTRO GUIO_GAMEOPTIONS1
+#define GAMEOPTION_ALT_FONT GUIO_GAMEOPTIONS2
+
} // End of namespace Queen
#endif // QUEEN_DETECTION_H
diff --git a/engines/queen/metaengine.cpp b/engines/queen/metaengine.cpp
index 06bdd336dba..41482dc3d99 100644
--- a/engines/queen/metaengine.cpp
+++ b/engines/queen/metaengine.cpp
@@ -23,17 +23,49 @@
#include "common/savefile.h"
#include "common/system.h"
+#include "common/translation.h"
#include "queen/queen.h"
#include "queen/resource.h"
#include "queen/detection.h"
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ALT_INTRO,
+ {
+ _s("Alternative intro"),
+ _s("Use an alternative game intro (CD version only)"),
+ "alt_intro",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_ALT_FONT,
+ {
+ _s("Improved font"),
+ _s("Use an easier to read custom font"),
+ "alt_font",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class QueenMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "queen";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
SaveStateList listSaves(const char *target) const override;
Commit: 7a7ba38f3cc9661cc0b0229b724c07e1f689934d
https://github.com/scummvm/scummvm/commit/7a7ba38f3cc9661cc0b0229b724c07e1f689934d
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
SCUMM: Move the engine options into the MetaEngine subclass
Changed paths:
engines/scumm/detection.cpp
engines/scumm/metaengine.cpp
engines/scumm/metaengine.h
diff --git a/engines/scumm/detection.cpp b/engines/scumm/detection.cpp
index 3ce92238efd..1ea3ed1eb2c 100644
--- a/engines/scumm/detection.cpp
+++ b/engines/scumm/detection.cpp
@@ -85,7 +85,6 @@ public:
DetectedGames detectGames(const Common::FSList &fslist, uint32 /*skipADFlags*/, bool /*skipIncomplete*/) override;
Common::String parseAndCustomizeGuiOptions(const Common::String &optionsString, const Common::String &domain) const override;
- const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
};
PlainGameList ScummMetaEngineDetection::getSupportedGames() const {
@@ -172,87 +171,6 @@ const char *ScummMetaEngineDetection::getOriginalCopyright() const {
"Humongous SCUMM Games (C) Humongous";
}
-static const ExtraGuiOption comiObjectLabelsOption = {
- _s("Show Object Line"),
- _s("Show the names of objects at the bottom of the screen"),
- "object_labels",
- true,
- 0,
- 0
-};
-
-static const ExtraGuiOption mmnesObjectLabelsOption = {
- _s("Use NES Classic Palette"),
- _s("Use a more neutral color palette that closely emulates the NES Classic"),
- "mm_nes_classic_palette",
- false,
- 0,
- 0
-};
-
-static const ExtraGuiOption fmtownsTrimTo200 = {
- _s("Trim FM-TOWNS games to 200 pixels height"),
- _s("Cut the extra 40 pixels at the bottom of the screen, to make it standard 200 pixels height, allowing using 'aspect ratio correction'"),
- "trim_fmtowns_to_200_pixels",
- false,
- 0,
- 0
-};
-
-static const ExtraGuiOption macV3LowQualityMusic = {
- _s("Play simplified music"),
- _s("This music was presumably intended for low-end Macs, and uses only one channel."),
- "mac_v3_low_quality_music",
- false,
- 0,
- 0
-};
-
-static const ExtraGuiOption smoothScrolling = {
- _s("Enable smooth scrolling"),
- _s("(instead of the normal 8-pixels steps scrolling)"),
- "smooth_scroll",
- true,
- 0,
- 1
-};
-
-static const ExtraGuiOption semiSmoothScrolling = {
- _s("Allow semi-smooth scrolling"),
- _s("Allow scrolling to be less smooth during the fast camera movement in the intro."),
- "semi_smooth_scroll",
- false,
- 1,
- 0
-};
-
-static const ExtraGuiOption enableEnhancements {
- _s("Enable game-specific enhancements"),
- _s("Allow ScummVM to make small enhancements to the game, usually based on other versions of the same game."),
- "enable_enhancements",
- true,
- 0,
- 0
-};
-
-static const ExtraGuiOption audioOverride {
- _s("Load modded audio"),
- _s("Replace music, sound effects, and speech clips with modded audio files, if available."),
- "audio_override",
- true,
- 0,
- 0
-};
-
-static const ExtraGuiOption enableOriginalGUI = {
- _s("Enable the original GUI and Menu"),
- _s("Allow the game to use the in-engine graphical interface and the original save/load menu."),
- "original_gui",
- true,
- 0,
- 0
-};
-
Common::String ScummMetaEngineDetection::parseAndCustomizeGuiOptions(const Common::String &optionsString, const Common::String &domain) const {
Common::String result = MetaEngineDetection::parseAndCustomizeGuiOptions(optionsString, domain);
const char *defaultRenderOption = nullptr;
@@ -300,50 +218,4 @@ Common::String ScummMetaEngineDetection::parseAndCustomizeGuiOptions(const Commo
return result;
}
-const ExtraGuiOptions ScummMetaEngineDetection::getExtraGuiOptions(const Common::String &target) const {
- ExtraGuiOptions options;
- // Query the GUI options
- const Common::String guiOptionsString = ConfMan.get("guioptions", target);
- const Common::String gameid = ConfMan.get("gameid", target);
- const Common::String extra = ConfMan.get("extra", target);
- const Common::String guiOptions = parseGameGUIOptions(guiOptionsString);
- const Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", target));
-
- if (target.empty() || guiOptions.contains(GUIO_ORIGINALGUI)) {
- options.push_back(enableOriginalGUI);
- }
- if (target.empty() || guiOptions.contains(GUIO_ENHANCEMENTS)) {
- options.push_back(enableEnhancements);
- }
- if (target.empty() || guiOptions.contains(GUIO_AUDIO_OVERRIDE)) {
- options.push_back(audioOverride);
- }
- if (target.empty() || gameid == "comi") {
- options.push_back(comiObjectLabelsOption);
- }
- if (target.empty() || platform == Common::kPlatformNES) {
- options.push_back(mmnesObjectLabelsOption);
- }
- if (target.empty() || platform == Common::kPlatformFMTowns) {
- options.push_back(smoothScrolling);
- if (target.empty() || gameid == "loom")
- options.push_back(semiSmoothScrolling);
- if (guiOptions.contains(GUIO_TRIM_FMTOWNS_TO_200_PIXELS))
- options.push_back(fmtownsTrimTo200);
- }
-
- // The Steam Mac versions of Loom and Indy 3 are more akin to the VGA
- // DOS versions, and that's how ScummVM usually sees them. But that
- // rebranding does not happen until later.
-
- // The low quality music in Loom was probably intended for low-end
- // Macs. It plays only one channel, instead of three.
-
- if (target.empty() || (gameid == "loom" && platform == Common::kPlatformMacintosh && extra != "Steam")) {
- options.push_back(macV3LowQualityMusic);
- }
-
- return options;
-}
-
REGISTER_PLUGIN_STATIC(SCUMM_DETECTION, PLUGIN_TYPE_ENGINE_DETECTION, ScummMetaEngineDetection);
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index da40f7c02b6..f7fce81b1e9 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -563,7 +563,7 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidgetDynamic(GU
if (gameid == "loom") {
Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", target));
if (platform != Common::kPlatformUnknown && platform != Common::kPlatformDOS)
- return nullptr;
+ return MetaEngine::buildEngineOptionsWidgetDynamic(boss, name, target);
// The VGA Loom settings are only relevant for the DOS CD
// version, not the Steam version (which is assumed to be well
@@ -573,7 +573,7 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidgetDynamic(GU
return new Scumm::LoomVgaGameOptionsWidget(boss, name, target);
if (extra == "Steam")
- return nullptr;
+ return MetaEngine::buildEngineOptionsWidgetDynamic(boss, name, target);
// These EGA Loom settings are only relevant for the EGA
// version, since that is the only one that has an overture.
@@ -581,12 +581,139 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidgetDynamic(GU
return new Scumm::LoomEgaGameOptionsWidget(boss, name, target);
} else if (gameid == "monkey") {
if (extra != "CD" && extra != "FM-TOWNS" && extra != "SEGA")
- return nullptr;
+ return MetaEngine::buildEngineOptionsWidgetDynamic(boss, name, target);
return new Scumm::MI1CdGameOptionsWidget(boss, name, target);
}
- return nullptr;
+ return MetaEngine::buildEngineOptionsWidgetDynamic(boss, name, target);
+}
+
+static const ExtraGuiOption comiObjectLabelsOption = {
+ _s("Show Object Line"),
+ _s("Show the names of objects at the bottom of the screen"),
+ "object_labels",
+ true,
+ 0,
+ 0
+};
+
+static const ExtraGuiOption mmnesObjectLabelsOption = {
+ _s("Use NES Classic Palette"),
+ _s("Use a more neutral color palette that closely emulates the NES Classic"),
+ "mm_nes_classic_palette",
+ false,
+ 0,
+ 0
+};
+
+static const ExtraGuiOption fmtownsTrimTo200 = {
+ _s("Trim FM-TOWNS games to 200 pixels height"),
+ _s("Cut the extra 40 pixels at the bottom of the screen, to make it standard 200 pixels height, allowing using 'aspect ratio correction'"),
+ "trim_fmtowns_to_200_pixels",
+ false,
+ 0,
+ 0
+};
+
+static const ExtraGuiOption macV3LowQualityMusic = {
+ _s("Play simplified music"),
+ _s("This music was presumably intended for low-end Macs, and uses only one channel."),
+ "mac_v3_low_quality_music",
+ false,
+ 0,
+ 0
+};
+
+static const ExtraGuiOption smoothScrolling = {
+ _s("Enable smooth scrolling"),
+ _s("(instead of the normal 8-pixels steps scrolling)"),
+ "smooth_scroll",
+ true,
+ 0,
+ 1
+};
+
+static const ExtraGuiOption semiSmoothScrolling = {
+ _s("Allow semi-smooth scrolling"),
+ _s("Allow scrolling to be less smooth during the fast camera movement in the intro."),
+ "semi_smooth_scroll",
+ false,
+ 1,
+ 0
+};
+
+static const ExtraGuiOption enableEnhancements {
+ _s("Enable game-specific enhancements"),
+ _s("Allow ScummVM to make small enhancements to the game, usually based on other versions of the same game."),
+ "enable_enhancements",
+ true,
+ 0,
+ 0
+};
+
+static const ExtraGuiOption audioOverride {
+ _s("Load modded audio"),
+ _s("Replace music, sound effects, and speech clips with modded audio files, if available."),
+ "audio_override",
+ true,
+ 0,
+ 0
+};
+
+static const ExtraGuiOption enableOriginalGUI = {
+ _s("Enable the original GUI and Menu"),
+ _s("Allow the game to use the in-engine graphical interface and the original save/load menu."),
+ "original_gui",
+ true,
+ 0,
+ 0
+};
+
+const ExtraGuiOptions ScummMetaEngine::getExtraGuiOptions(const Common::String &target) const {
+ ExtraGuiOptions options;
+ // Query the GUI options
+ const Common::String guiOptionsString = ConfMan.get("guioptions", target);
+ const Common::String gameid = ConfMan.get("gameid", target);
+ const Common::String extra = ConfMan.get("extra", target);
+ const Common::String guiOptions = parseGameGUIOptions(guiOptionsString);
+ const Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", target));
+
+ if (target.empty() || guiOptions.contains(GUIO_ORIGINALGUI)) {
+ options.push_back(enableOriginalGUI);
+ }
+ if (target.empty() || guiOptions.contains(GUIO_ENHANCEMENTS)) {
+ options.push_back(enableEnhancements);
+ }
+ if (target.empty() || guiOptions.contains(GUIO_AUDIO_OVERRIDE)) {
+ options.push_back(audioOverride);
+ }
+ if (target.empty() || gameid == "comi") {
+ options.push_back(comiObjectLabelsOption);
+ }
+ if (target.empty() || platform == Common::kPlatformNES) {
+ options.push_back(mmnesObjectLabelsOption);
+ }
+ if (target.empty() || platform == Common::kPlatformFMTowns) {
+ options.push_back(smoothScrolling);
+ if (target.empty() || gameid == "loom")
+ options.push_back(semiSmoothScrolling);
+ if (guiOptions.contains(GUIO_TRIM_FMTOWNS_TO_200_PIXELS))
+ options.push_back(fmtownsTrimTo200);
+ }
+
+ // The Steam Mac versions of Loom and Indy 3 are more akin to the VGA
+ // DOS versions, and that's how ScummVM usually sees them. But that
+ // rebranding does not happen until later.
+
+ // The low quality music in Loom was probably intended for low-end
+ // Macs. It plays only one channel, instead of three.
+
+ if (target.empty() || (gameid == "loom" && platform == Common::kPlatformMacintosh && extra != "Steam")) {
+ options.push_back(macV3LowQualityMusic);
+ }
+
+ return options;
}
#if PLUGIN_ENABLED_DYNAMIC(SCUMM)
diff --git a/engines/scumm/metaengine.h b/engines/scumm/metaengine.h
index 051e8f4d4ff..226bc9fd844 100644
--- a/engines/scumm/metaengine.h
+++ b/engines/scumm/metaengine.h
@@ -36,6 +36,7 @@ class ScummMetaEngine : public MetaEngine {
void removeSaveState(const char *target, int slot) const override;
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
+ const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
};
Commit: bb788e054b69c1d0232e867932a59b2c8722e1a1
https://github.com/scummvm/scummvm/commit/bb788e054b69c1d0232e867932a59b2c8722e1a1
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
SHERLOCK: Move the engine options into the MetaEngine subclass
Changed paths:
engines/sherlock/POTFILES
engines/sherlock/detection.cpp
engines/sherlock/detection.h
engines/sherlock/metaengine.cpp
diff --git a/engines/sherlock/POTFILES b/engines/sherlock/POTFILES
index 2748b07516b..b4bfa040d91 100644
--- a/engines/sherlock/POTFILES
+++ b/engines/sherlock/POTFILES
@@ -1,4 +1,4 @@
engines/sherlock/detection_tables.h
-engines/sherlock/detection.cpp
+engines/sherlock/metaengine.cpp
engines/sherlock/scalpel/scalpel.cpp
engines/sherlock/tattoo/widget_files.cpp
diff --git a/engines/sherlock/detection.cpp b/engines/sherlock/detection.cpp
index 53a5169ae91..f7e61db06f1 100644
--- a/engines/sherlock/detection.cpp
+++ b/engines/sherlock/detection.cpp
@@ -39,114 +39,12 @@ static const DebugChannelDef debugFlagList[] = {
DEBUG_CHANNEL_END
};
-
-#define GAMEOPTION_ORIGINAL_SAVES GUIO_GAMEOPTIONS1
-#define GAMEOPTION_FADE_STYLE GUIO_GAMEOPTIONS2
-#define GAMEOPTION_HELP_STYLE GUIO_GAMEOPTIONS3
-#define GAMEOPTION_PORTRAITS_ON GUIO_GAMEOPTIONS4
-#define GAMEOPTION_WINDOW_STYLE GUIO_GAMEOPTIONS5
-#define GAMEOPTION_TRANSPARENT_WINDOWS GUIO_GAMEOPTIONS6
-
-#ifdef USE_TTS
-#define GAMEOPTION_TTS_NARRATOR GUIO_GAMEOPTIONS7
-#endif
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ORIGINAL_SAVES,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_FADE_STYLE,
- {
- _s("Pixellated scene transitions"),
- _s("When changing scenes, a randomized pixel transition is done"),
- "fade_style",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_HELP_STYLE,
- {
- _s("Don't show hotspots when moving mouse"),
- _s("Only show hotspot names after you actually click on a hotspot or action button"),
- "help_style",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_PORTRAITS_ON,
- {
- _s("Show character portraits"),
- _s("Show portraits for the characters when conversing"),
- "portraits_on",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_WINDOW_STYLE,
- {
- _s("Slide dialogs into view"),
- _s("Slide UI dialogs into view, rather than simply showing them immediately"),
- "window_style",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_TRANSPARENT_WINDOWS,
- {
- _s("Transparent windows"),
- _s("Show windows with a partially transparent background"),
- "transparent_windows",
- true,
- 0,
- 0
- }
- },
-
-#ifdef USE_TTS
- {
- GAMEOPTION_TTS_NARRATOR,
- {
- _s("TTS Narrator"),
- _s("Use TTS to read the descriptions (if TTS is available)"),
- "tts_narrator",
- false,
- 0,
- 0
- }
- },
-#endif
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
-
#include "sherlock/detection_tables.h"
class SherlockMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
SherlockMetaEngineDetection() : AdvancedMetaEngineDetection(Sherlock::gameDescriptions, sizeof(Sherlock::SherlockGameDescription),
- sherlockGames, optionsList) {}
+ sherlockGames) {}
const char *getName() const override {
return "sherlock";
diff --git a/engines/sherlock/detection.h b/engines/sherlock/detection.h
index f80814fe3bf..3ac34c2a170 100644
--- a/engines/sherlock/detection.h
+++ b/engines/sherlock/detection.h
@@ -37,6 +37,17 @@ struct SherlockGameDescription {
GameType gameID;
};
+#define GAMEOPTION_ORIGINAL_SAVES GUIO_GAMEOPTIONS1
+#define GAMEOPTION_FADE_STYLE GUIO_GAMEOPTIONS2
+#define GAMEOPTION_HELP_STYLE GUIO_GAMEOPTIONS3
+#define GAMEOPTION_PORTRAITS_ON GUIO_GAMEOPTIONS4
+#define GAMEOPTION_WINDOW_STYLE GUIO_GAMEOPTIONS5
+#define GAMEOPTION_TRANSPARENT_WINDOWS GUIO_GAMEOPTIONS6
+
+#ifdef USE_TTS
+#define GAMEOPTION_TTS_NARRATOR GUIO_GAMEOPTIONS7
+#endif
+
} // End of namespace Sherlock
#endif // SHERLOCK_DETECTION_H
diff --git a/engines/sherlock/metaengine.cpp b/engines/sherlock/metaengine.cpp
index 83afdca1eac..1d4d3ec9693 100644
--- a/engines/sherlock/metaengine.cpp
+++ b/engines/sherlock/metaengine.cpp
@@ -25,12 +25,102 @@
#include "sherlock/tattoo/tattoo.h"
#include "common/system.h"
+#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "sherlock/detection.h"
namespace Sherlock {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ORIGINAL_SAVES,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_FADE_STYLE,
+ {
+ _s("Pixellated scene transitions"),
+ _s("When changing scenes, a randomized pixel transition is done"),
+ "fade_style",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_HELP_STYLE,
+ {
+ _s("Don't show hotspots when moving mouse"),
+ _s("Only show hotspot names after you actually click on a hotspot or action button"),
+ "help_style",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_PORTRAITS_ON,
+ {
+ _s("Show character portraits"),
+ _s("Show portraits for the characters when conversing"),
+ "portraits_on",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_WINDOW_STYLE,
+ {
+ _s("Slide dialogs into view"),
+ _s("Slide UI dialogs into view, rather than simply showing them immediately"),
+ "window_style",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_TRANSPARENT_WINDOWS,
+ {
+ _s("Transparent windows"),
+ _s("Show windows with a partially transparent background"),
+ "transparent_windows",
+ true,
+ 0,
+ 0
+ }
+ },
+
+#ifdef USE_TTS
+ {
+ GAMEOPTION_TTS_NARRATOR,
+ {
+ _s("TTS Narrator"),
+ _s("Use TTS to read the descriptions (if TTS is available)"),
+ "tts_narrator",
+ false,
+ 0,
+ 0
+ }
+ },
+#endif
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
GameType SherlockEngine::getGameID() const {
return _gameDescription->gameID;
}
@@ -52,6 +142,10 @@ public:
return "sherlock";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Sherlock::optionsList;
+ }
+
/**
* Creates an instance of the game engine
*/
Commit: 4e3498c5800f1c304c4ffc96a63fcedf7403bc7e
https://github.com/scummvm/scummvm/commit/4e3498c5800f1c304c4ffc96a63fcedf7403bc7e
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
SKY: Move the engine options into the MetaEngine subclass
Changed paths:
engines/sky/POTFILES
engines/sky/detection.cpp
engines/sky/metaengine.cpp
diff --git a/engines/sky/POTFILES b/engines/sky/POTFILES
index d6b59779216..f0396744973 100644
--- a/engines/sky/POTFILES
+++ b/engines/sky/POTFILES
@@ -1,3 +1,2 @@
engines/sky/compact.cpp
-engines/sky/detection.cpp
engines/sky/metaengine.cpp
diff --git a/engines/sky/detection.cpp b/engines/sky/detection.cpp
index d4878067d62..452b4b1cda4 100644
--- a/engines/sky/detection.cpp
+++ b/engines/sky/detection.cpp
@@ -27,20 +27,10 @@
#include "common/system.h"
#include "common/file.h"
#include "common/textconsole.h"
-#include "common/translation.h"
static const PlainGameDescriptor skySetting =
{"sky", "Beneath a Steel Sky" };
-static const ExtraGuiOption skyExtraGuiOption = {
- _s("Floppy intro"),
- _s("Use the floppy version's intro (CD version only)"),
- "alt_intro",
- false,
- 0,
- 0
-};
-
struct SkyVersion {
int dinnerTableEntries;
int dataDiskSize;
@@ -74,7 +64,6 @@ public:
}
PlainGameList getSupportedGames() const override;
- const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
PlainGameDescriptor findGame(const char *gameid) const override;
DetectedGames detectGames(const Common::FSList &fslist, uint32 /*skipADFlags*/, bool /*skipIncomplete*/) override;
};
@@ -93,25 +82,6 @@ PlainGameList SkyMetaEngineDetection::getSupportedGames() const {
return games;
}
-const ExtraGuiOptions SkyMetaEngineDetection::getExtraGuiOptions(const Common::String &target) const {
- Common::String guiOptions;
- ExtraGuiOptions options;
-
- if (target.empty()) {
- options.push_back(skyExtraGuiOption);
- return options;
- }
-
- if (ConfMan.hasKey("guioptions", target)) {
- guiOptions = ConfMan.get("guioptions", target);
- guiOptions = parseGameGUIOptions(guiOptions);
- }
-
- if (!guiOptions.contains(GUIO_NOSPEECH))
- options.push_back(skyExtraGuiOption);
- return options;
-}
-
PlainGameDescriptor SkyMetaEngineDetection::findGame(const char *gameid) const {
if (0 == scumm_stricmp(gameid, skySetting.gameId))
return skySetting;
diff --git a/engines/sky/metaengine.cpp b/engines/sky/metaengine.cpp
index 66d5c1591a1..774558e2840 100644
--- a/engines/sky/metaengine.cpp
+++ b/engines/sky/metaengine.cpp
@@ -25,6 +25,7 @@
#include "backends/keymapper/keymap.h"
#include "backends/keymapper/standard-actions.h"
+#include "common/gui_options.h"
#include "common/system.h"
#include "common/savefile.h"
#include "common/translation.h"
@@ -45,6 +46,8 @@ class SkyMetaEngine : public MetaEngine {
Common::Error createInstance(OSystem *syst, Engine **engine) override;
+ const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
+
SaveStateList listSaves(const char *target) const override;
int getMaximumSaveSlot() const override;
void removeSaveState(const char *target, int slot) const override;
@@ -147,6 +150,34 @@ Common::Error SkyMetaEngine::createInstance(OSystem *syst, Engine **engine) {
return Common::kNoError;
}
+static const ExtraGuiOption skyExtraGuiOption = {
+ _s("Floppy intro"),
+ _s("Use the floppy version's intro (CD version only)"),
+ "alt_intro",
+ false,
+ 0,
+ 0
+};
+
+const ExtraGuiOptions SkyMetaEngine::getExtraGuiOptions(const Common::String &target) const {
+ Common::String guiOptions;
+ ExtraGuiOptions options;
+
+ if (target.empty()) {
+ options.push_back(skyExtraGuiOption);
+ return options;
+ }
+
+ if (ConfMan.hasKey("guioptions", target)) {
+ guiOptions = ConfMan.get("guioptions", target);
+ guiOptions = parseGameGUIOptions(guiOptions);
+ }
+
+ if (!guiOptions.contains(GUIO_NOSPEECH))
+ options.push_back(skyExtraGuiOption);
+ return options;
+}
+
SaveStateList SkyMetaEngine::listSaves(const char *target) const {
Common::SaveFileManager *saveFileMan = g_system->getSavefileManager();
SaveStateList saveList;
Commit: 6a1bccc6491557acf8f42f7555889241516e930e
https://github.com/scummvm/scummvm/commit/6a1bccc6491557acf8f42f7555889241516e930e
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
STARK: Move the engine options into the MetaEngine subclass
Changed paths:
engines/stark/POTFILES
engines/stark/detection.cpp
engines/stark/detection.h
engines/stark/metaengine.cpp
diff --git a/engines/stark/POTFILES b/engines/stark/POTFILES
index af9c7d566a2..138283388c2 100644
--- a/engines/stark/POTFILES
+++ b/engines/stark/POTFILES
@@ -1,2 +1,3 @@
engines/stark/detection.cpp
+engines/stark/metaengine.cpp
engines/stark/stark.cpp
diff --git a/engines/stark/detection.cpp b/engines/stark/detection.cpp
index 83b14732244..2655afbc5db 100644
--- a/engines/stark/detection.cpp
+++ b/engines/stark/detection.cpp
@@ -376,51 +376,9 @@ static const ADGameDescription gameDescriptions[] = {
AD_TABLE_END_MARKER
};
-#define GAMEOPTION_ASSETS_MOD GUIO_GAMEOPTIONS1
-#define GAMEOPTION_LINEAR_FILTERING GUIO_GAMEOPTIONS2
-#define GAMEOPTION_FONT_ANTIALIASING GUIO_GAMEOPTIONS3
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ASSETS_MOD,
- {
- _s("Load modded assets"),
- _s("Enable loading of external replacement assets."),
- "enable_assets_mod",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_LINEAR_FILTERING,
- {
- _s("Enable linear filtering of the backgrounds images"),
- _s("When linear filtering is enabled the background graphics are smoother in full screen mode, at the cost of some details."),
- "use_linear_filtering",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_FONT_ANTIALIASING,
- {
- _s("Enable font anti-aliasing"),
- _s("When font anti-aliasing is enabled, the text is smoother."),
- "enable_font_antialiasing",
- true,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class StarkMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- StarkMetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(ADGameDescription), starkGames, optionsList) {
+ StarkMetaEngineDetection() : AdvancedMetaEngineDetection(gameDescriptions, sizeof(ADGameDescription), starkGames) {
_guiOptions = GUIO4(GUIO_NOMIDI, GAMEOPTION_ASSETS_MOD, GAMEOPTION_LINEAR_FILTERING, GAMEOPTION_FONT_ANTIALIASING);
}
diff --git a/engines/stark/detection.h b/engines/stark/detection.h
index 0cbb4cc88b0..581dc401df8 100644
--- a/engines/stark/detection.h
+++ b/engines/stark/detection.h
@@ -28,6 +28,10 @@ enum GameFlags {
GF_MISSING_EXE_RESOURCES = 1 << 0
};
+#define GAMEOPTION_ASSETS_MOD GUIO_GAMEOPTIONS1
+#define GAMEOPTION_LINEAR_FILTERING GUIO_GAMEOPTIONS2
+#define GAMEOPTION_FONT_ANTIALIASING GUIO_GAMEOPTIONS3
+
} // End of namespace Stark
#endif // STARK_DETECTION_H
diff --git a/engines/stark/metaengine.cpp b/engines/stark/metaengine.cpp
index 888c79d1084..8482e51058d 100644
--- a/engines/stark/metaengine.cpp
+++ b/engines/stark/metaengine.cpp
@@ -26,15 +26,58 @@
#include "common/savefile.h"
#include "common/system.h"
+#include "common/translation.h"
namespace Stark {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ASSETS_MOD,
+ {
+ _s("Load modded assets"),
+ _s("Enable loading of external replacement assets."),
+ "enable_assets_mod",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_LINEAR_FILTERING,
+ {
+ _s("Enable linear filtering of the backgrounds images"),
+ _s("When linear filtering is enabled the background graphics are smoother in full screen mode, at the cost of some details."),
+ "use_linear_filtering",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_FONT_ANTIALIASING,
+ {
+ _s("Enable font anti-aliasing"),
+ _s("When font anti-aliasing is enabled, the text is smoother."),
+ "enable_font_antialiasing",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class StarkMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "stark";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override {
return
(f == kSupportsListSaves) ||
Commit: 32c49c29bebad21e5221cb292457c1be22520946
https://github.com/scummvm/scummvm/commit/32c49c29bebad21e5221cb292457c1be22520946
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
SUPERNOVA: Move the engine options into the MetaEngine subclass
Changed paths:
A engines/supernova/detection.h
engines/supernova/POTFILES
engines/supernova/detection.cpp
engines/supernova/metaengine.cpp
diff --git a/engines/supernova/POTFILES b/engines/supernova/POTFILES
index 1cd0707b6ca..3d0b7fcc6de 100644
--- a/engines/supernova/POTFILES
+++ b/engines/supernova/POTFILES
@@ -1,3 +1,3 @@
engines/supernova/supernova.cpp
-engines/supernova/detection.cpp
+engines/supernova/metaengine.cpp
diff --git a/engines/supernova/detection.cpp b/engines/supernova/detection.cpp
index 3c449808dc6..dbb5c2c55b9 100644
--- a/engines/supernova/detection.cpp
+++ b/engines/supernova/detection.cpp
@@ -22,46 +22,15 @@
#include "base/plugins.h"
#include "common/file.h"
#include "common/gui_options.h"
-#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "supernova/supernova.h"
-
-#define GAMEOPTION_IMPROVED GUIO_GAMEOPTIONS1
-#define GAMEOPTION_TTS GUIO_GAMEOPTIONS2
+#include "supernova/detection.h"
static const DebugChannelDef debugFlagList[] = {
{Supernova::kDebugGeneral, "general", "Supernova general debug channel"},
DEBUG_CHANNEL_END
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_IMPROVED,
- {
- _s("Improved mode"),
- _s("Removes some repetitive actions, adds possibility to change verbs by keyboard"),
- "improved",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_TTS,
- {
- _s("Enable Text to Speech"),
- _s("Use TTS to read the descriptions (if TTS is available)"),
- "tts_enabled",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
static const PlainGameDescriptor supernovaGames[] = {
{"msn1", "Mission Supernova 1"},
{"msn2", "Mission Supernova 2"},
@@ -123,7 +92,7 @@ static const ADGameDescription gameDescriptions[] = {
class SupernovaMetaEngineDetection: public AdvancedMetaEngineDetection {
public:
- SupernovaMetaEngineDetection() : AdvancedMetaEngineDetection(Supernova::gameDescriptions, sizeof(ADGameDescription), supernovaGames, optionsList) {
+ SupernovaMetaEngineDetection() : AdvancedMetaEngineDetection(Supernova::gameDescriptions, sizeof(ADGameDescription), supernovaGames) {
}
const char *getName() const override {
diff --git a/engines/supernova/detection.h b/engines/supernova/detection.h
new file mode 100644
index 00000000000..36be015fdf0
--- /dev/null
+++ b/engines/supernova/detection.h
@@ -0,0 +1,28 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef SUPERNOVA_DETECTION_H
+#define SUPERNOVA_DETECTION_H
+
+#define GAMEOPTION_IMPROVED GUIO_GAMEOPTIONS1
+#define GAMEOPTION_TTS GUIO_GAMEOPTIONS2
+
+#endif
diff --git a/engines/supernova/metaengine.cpp b/engines/supernova/metaengine.cpp
index cee930a2b6c..316fba84d67 100644
--- a/engines/supernova/metaengine.cpp
+++ b/engines/supernova/metaengine.cpp
@@ -24,10 +24,40 @@
#include "common/gui_options.h"
#include "common/savefile.h"
#include "common/system.h"
+#include "common/translation.h"
#include "graphics/thumbnail.h"
#include "engines/advancedDetector.h"
#include "supernova/supernova.h"
+#include "supernova/detection.h"
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_IMPROVED,
+ {
+ _s("Improved mode"),
+ _s("Removes some repetitive actions, adds possibility to change verbs by keyboard"),
+ "improved",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_TTS,
+ {
+ _s("Enable Text to Speech"),
+ _s("Use TTS to read the descriptions (if TTS is available)"),
+ "tts_enabled",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
class SupernovaMetaEngine : public AdvancedMetaEngine {
public:
@@ -35,6 +65,10 @@ public:
return "supernova";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: b272c96668d5935d488a6fb80c4962885416692b
https://github.com/scummvm/scummvm/commit/b272c96668d5935d488a6fb80c4962885416692b
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
SWORD2: Move the engine options into the MetaEngine subclass
Changed paths:
engines/sword2/POTFILES
engines/sword2/detection.cpp
engines/sword2/detection.h
engines/sword2/detection_tables.h
engines/sword2/metaengine.cpp
diff --git a/engines/sword2/POTFILES b/engines/sword2/POTFILES
index e08c96b4c73..aa170f3df97 100644
--- a/engines/sword2/POTFILES
+++ b/engines/sword2/POTFILES
@@ -1,3 +1,3 @@
engines/sword2/animation.cpp
-engines/sword2/detection.cpp
+engines/sword2/metaengine.cpp
engines/sword2/sword2.cpp
diff --git a/engines/sword2/detection.cpp b/engines/sword2/detection.cpp
index 0ce6e7e0a81..6587e1f6169 100644
--- a/engines/sword2/detection.cpp
+++ b/engines/sword2/detection.cpp
@@ -21,8 +21,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "common/translation.h"
-
#include "engines/advancedDetector.h"
#include "engines/obsolete.h"
@@ -43,28 +41,9 @@ static const char *const directoryGlobs[] = {
nullptr
};
-namespace Sword2 {
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_OBJECT_LABELS,
- {
- _s("Show object labels"),
- _s("Show labels for objects on mouse hover"),
- "object_labels",
- false,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
-} // End of namespace Sword2
-
class Sword2MetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- Sword2MetaEngineDetection() : AdvancedMetaEngineDetection(Sword2::gameDescriptions, sizeof(Sword2::Sword2GameDescription), sword2Games, Sword2::optionsList) {
+ Sword2MetaEngineDetection() : AdvancedMetaEngineDetection(Sword2::gameDescriptions, sizeof(Sword2::Sword2GameDescription), sword2Games) {
_guiOptions = GUIO3(GUIO_NOMIDI, GUIO_NOASPECT, GAMEOPTION_OBJECT_LABELS);
_maxScanDepth = 2;
_directoryGlobs = directoryGlobs;
diff --git a/engines/sword2/detection.h b/engines/sword2/detection.h
index 0cce1bf219d..164dcff691a 100644
--- a/engines/sword2/detection.h
+++ b/engines/sword2/detection.h
@@ -39,6 +39,8 @@ struct Sword2GameDescription {
uint32 features;
};
+#define GAMEOPTION_OBJECT_LABELS GUIO_GAMEOPTIONS1
+
} // End of namespace Sword2
#endif // SWORD2_DETECTION_H
diff --git a/engines/sword2/detection_tables.h b/engines/sword2/detection_tables.h
index 44cb858019b..907252d8ceb 100644
--- a/engines/sword2/detection_tables.h
+++ b/engines/sword2/detection_tables.h
@@ -21,8 +21,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#define GAMEOPTION_OBJECT_LABELS GUIO_GAMEOPTIONS1
-
namespace Sword2 {
static const Sword2GameDescription gameDescriptions[] = {
diff --git a/engines/sword2/metaengine.cpp b/engines/sword2/metaengine.cpp
index e34fb6116b9..3add0fb6744 100644
--- a/engines/sword2/metaengine.cpp
+++ b/engines/sword2/metaengine.cpp
@@ -31,17 +31,41 @@
#include "common/gui_options.h"
#include "common/savefile.h"
#include "common/system.h"
+#include "common/translation.h"
#include "sword2/sword2.h"
#include "sword2/saveload.h"
#include "sword2/obsolete.h"
+namespace Sword2 {
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_OBJECT_LABELS,
+ {
+ _s("Show object labels"),
+ _s("Show labels for objects on mouse hover"),
+ "object_labels",
+ false,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
+} // End of namespace Sword2
+
class Sword2MetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "sword2";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Sword2::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
SaveStateList listSaves(const char *target) const override;
Commit: fbea7888a06d4586c73490f2b5471ddbbbb8b100
https://github.com/scummvm/scummvm/commit/fbea7888a06d4586c73490f2b5471ddbbbb8b100
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
SWORD25: Move the engine options into the MetaEngine subclass
Changed paths:
engines/sword25/POTFILES
engines/sword25/detection.cpp
engines/sword25/detection.h
engines/sword25/detection_tables.h
engines/sword25/metaengine.cpp
diff --git a/engines/sword25/POTFILES b/engines/sword25/POTFILES
index f4b0e6fc27f..b3bbcfae017 100644
--- a/engines/sword25/POTFILES
+++ b/engines/sword25/POTFILES
@@ -1 +1 @@
-engines/sword25/detection.cpp
+engines/sword25/metaengine.cpp
diff --git a/engines/sword25/detection.cpp b/engines/sword25/detection.cpp
index 398e4df9b0c..b8a450133f1 100644
--- a/engines/sword25/detection.cpp
+++ b/engines/sword25/detection.cpp
@@ -20,7 +20,6 @@
*/
#include "base/plugins.h"
-#include "common/translation.h"
#include "engines/advancedDetector.h"
#include "sword25/detection.h"
@@ -43,24 +42,9 @@ static const char *directoryGlobs[] = {
0
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ENGLISH_SPEECH,
- {
- _s("Use English speech"),
- _s("Use English speech instead of German for every language other than German"),
- "english_speech",
- false,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class Sword25MetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- Sword25MetaEngineDetection() : AdvancedMetaEngineDetection(Sword25::gameDescriptions, sizeof(ADGameDescription), sword25Game, optionsList) {
+ Sword25MetaEngineDetection() : AdvancedMetaEngineDetection(Sword25::gameDescriptions, sizeof(ADGameDescription), sword25Game) {
_guiOptions = GUIO2(GUIO_NOMIDI, GAMEOPTION_ENGLISH_SPEECH);
_maxScanDepth = 2;
_directoryGlobs = directoryGlobs;
diff --git a/engines/sword25/detection.h b/engines/sword25/detection.h
index 6933d533f16..971629f577f 100644
--- a/engines/sword25/detection.h
+++ b/engines/sword25/detection.h
@@ -28,6 +28,8 @@ enum GameFlags {
GF_EXTRACTED = 1 << 0
};
+#define GAMEOPTION_ENGLISH_SPEECH GUIO_GAMEOPTIONS1
+
} // End of namespace Sword25
#endif // SWORD25_DETECTION_H
diff --git a/engines/sword25/detection_tables.h b/engines/sword25/detection_tables.h
index 13275020e21..18d4a52fe54 100644
--- a/engines/sword25/detection_tables.h
+++ b/engines/sword25/detection_tables.h
@@ -19,8 +19,6 @@
*
*/
-#define GAMEOPTION_ENGLISH_SPEECH GUIO_GAMEOPTIONS1
-
namespace Sword25 {
static const ADGameDescription gameDescriptions[] = {
diff --git a/engines/sword25/metaengine.cpp b/engines/sword25/metaengine.cpp
index 5e7faef8ad8..c5d1858d5e7 100644
--- a/engines/sword25/metaengine.cpp
+++ b/engines/sword25/metaengine.cpp
@@ -19,6 +19,8 @@
*
*/
+#include "common/translation.h"
+
#include "engines/advancedDetector.h"
#include "sword25/sword25.h"
@@ -26,6 +28,21 @@
namespace Sword25 {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ENGLISH_SPEECH,
+ {
+ _s("Use English speech"),
+ _s("Use English speech instead of German for every language other than German"),
+ "english_speech",
+ false,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
uint32 Sword25Engine::getGameFlags() const { return _gameDescription->flags; }
} // End of namespace Sword25
@@ -36,6 +53,10 @@ public:
return "sword25";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Sword25::optionsList;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
bool hasFeature(MetaEngineFeature f) const override;
Commit: 0b585073146f1cd3166fbc309eb9f7fddb966066
https://github.com/scummvm/scummvm/commit/0b585073146f1cd3166fbc309eb9f7fddb966066
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
TOLTECS: Move the engine options into the MetaEngine subclass
Changed paths:
engines/toltecs/POTFILES
engines/toltecs/detection.cpp
engines/toltecs/detection.h
engines/toltecs/metaengine.cpp
diff --git a/engines/toltecs/POTFILES b/engines/toltecs/POTFILES
index 81adbb86a1e..602d5e0817a 100644
--- a/engines/toltecs/POTFILES
+++ b/engines/toltecs/POTFILES
@@ -1,2 +1,3 @@
engines/toltecs/detection.cpp
engines/toltecs/menu.cpp
+engines/toltecs/metaengine.cpp
diff --git a/engines/toltecs/detection.cpp b/engines/toltecs/detection.cpp
index fe61b9d7454..307292093cc 100644
--- a/engines/toltecs/detection.cpp
+++ b/engines/toltecs/detection.cpp
@@ -32,8 +32,6 @@
#include "toltecs/toltecs.h"
#include "toltecs/detection.h"
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-
static const PlainGameDescriptor toltecsGames[] = {
{"toltecs", "3 Skulls of the Toltecs"},
{0, 0}
@@ -221,26 +219,11 @@ static const ToltecsGameDescription gameDescriptions[] = {
{ AD_TABLE_END_MARKER }
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
} // End of namespace Toltecs
class ToltecsMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- ToltecsMetaEngineDetection() : AdvancedMetaEngineDetection(Toltecs::gameDescriptions, sizeof(Toltecs::ToltecsGameDescription), toltecsGames, Toltecs::optionsList) {
+ ToltecsMetaEngineDetection() : AdvancedMetaEngineDetection(Toltecs::gameDescriptions, sizeof(Toltecs::ToltecsGameDescription), toltecsGames) {
}
const char *getName() const override {
diff --git a/engines/toltecs/detection.h b/engines/toltecs/detection.h
index 2e2f70edac2..8f3fc5f2d9e 100644
--- a/engines/toltecs/detection.h
+++ b/engines/toltecs/detection.h
@@ -28,6 +28,8 @@ struct ToltecsGameDescription {
ADGameDescription desc;
};
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
+
} // End of namespace Toltecs
#endif // TOLTECS_DETECTION_H
diff --git a/engines/toltecs/metaengine.cpp b/engines/toltecs/metaengine.cpp
index c4ee4add86d..2a5879eeea3 100644
--- a/engines/toltecs/metaengine.cpp
+++ b/engines/toltecs/metaengine.cpp
@@ -26,12 +26,28 @@
#include "common/savefile.h"
#include "common/str-array.h"
#include "common/system.h"
+#include "common/translation.h"
#include "toltecs/toltecs.h"
#include "toltecs/detection.h"
namespace Toltecs {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
uint32 ToltecsEngine::getFeatures() const {
return _gameDescription->desc.flags;
}
@@ -48,6 +64,10 @@ public:
return "toltecs";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Toltecs::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: 3c61812ed88c4b02271a613e6c41262024b854b3
https://github.com/scummvm/scummvm/commit/3c61812ed88c4b02271a613e6c41262024b854b3
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
TRECISION: Move the engine options into the MetaEngine subclass
Changed paths:
A engines/trecision/detection.h
engines/trecision/POTFILES
engines/trecision/detection.cpp
engines/trecision/metaengine.cpp
diff --git a/engines/trecision/POTFILES b/engines/trecision/POTFILES
index b54e124cc9b..672a21b848c 100644
--- a/engines/trecision/POTFILES
+++ b/engines/trecision/POTFILES
@@ -1,2 +1,3 @@
engines/trecision/detection.cpp
+engines/trecision/metaengine.cpp
engines/trecision/saveload.cpp
diff --git a/engines/trecision/detection.cpp b/engines/trecision/detection.cpp
index d95d67e6363..d93eacb6fdb 100644
--- a/engines/trecision/detection.cpp
+++ b/engines/trecision/detection.cpp
@@ -23,6 +23,8 @@
#include "common/translation.h"
#include "engines/advancedDetector.h"
+#include "trecision/detection.h"
+
static const PlainGameDescriptor trecisionGames[] = {
{"aot", "Ark of Time"},
{"nl", "Nightlong: Union City Conspiracy"},
@@ -209,24 +211,6 @@ static const ADGameDescription gameDescriptions[] = {
AD_TABLE_END_MARKER
};
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-
-static const ADExtraGuiOptionsMap optionsList[] = {
-
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
} // End of namespace Trecision
static const char *directoryGlobs[] = {
@@ -237,7 +221,7 @@ static const char *directoryGlobs[] = {
class TrecisionMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- TrecisionMetaEngineDetection() : AdvancedMetaEngineDetection(Trecision::gameDescriptions, sizeof(ADGameDescription), trecisionGames, Trecision::optionsList) {
+ TrecisionMetaEngineDetection() : AdvancedMetaEngineDetection(Trecision::gameDescriptions, sizeof(ADGameDescription), trecisionGames) {
_maxScanDepth = 2;
_directoryGlobs = directoryGlobs;
_guiOptions = GUIO2(GUIO_NOMIDI, GAMEOPTION_ORIGINAL_SAVELOAD);
diff --git a/engines/trecision/detection.h b/engines/trecision/detection.h
new file mode 100644
index 00000000000..03dc5f30a02
--- /dev/null
+++ b/engines/trecision/detection.h
@@ -0,0 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef TRECISION_DETECTION_H
+#define TRECISION_DETECTION_H
+
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
+
+#endif
diff --git a/engines/trecision/metaengine.cpp b/engines/trecision/metaengine.cpp
index 89d0c07ffa3..dcf356e9765 100644
--- a/engines/trecision/metaengine.cpp
+++ b/engines/trecision/metaengine.cpp
@@ -24,14 +24,36 @@
#include "graphics/surface.h"
#include "common/system.h"
#include "common/savefile.h"
+#include "common/translation.h"
#include "trecision/trecision.h"
+#include "trecision/detection.h"
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
class TrecisionMetaEngine : public AdvancedMetaEngine {
const char *getName() const override {
return "trecision";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
void getSavegameThumbnail(Graphics::Surface &thumb) override;
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
Commit: a46a6e15eeac3a05f3b154c0336a930cb71cf2d8
https://github.com/scummvm/scummvm/commit/a46a6e15eeac3a05f3b154c0336a930cb71cf2d8
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
TWINE: Move the engine options into the MetaEngine subclass
Changed paths:
engines/twine/detection.cpp
engines/twine/detection.h
engines/twine/metaengine.cpp
diff --git a/engines/twine/detection.cpp b/engines/twine/detection.cpp
index fc4ca65ea35..c21267426a2 100644
--- a/engines/twine/detection.cpp
+++ b/engines/twine/detection.cpp
@@ -27,19 +27,6 @@
#include "twine/detection.h"
#include "twine/shared.h"
-#define GAMEOPTION_WALL_COLLISION GUIO_GAMEOPTIONS1
-#define GAMEOPTION_DISABLE_SAVE_MENU GUIO_GAMEOPTIONS2
-#define GAMEOPTION_DEBUG GUIO_GAMEOPTIONS3
-#define GAMEOPTION_AUDIO_CD GUIO_GAMEOPTIONS4
-#define GAMEOPTION_SOUND GUIO_GAMEOPTIONS5
-#define GAMEOPTION_VOICES GUIO_GAMEOPTIONS6
-#define GAMEOPTION_TEXT GUIO_GAMEOPTIONS7
-#define GAMEOPTION_MOVIES GUIO_GAMEOPTIONS8
-#define GAMEOPTION_MOUSE GUIO_GAMEOPTIONS9
-#define GAMEOPTION_USA_VERSION GUIO_GAMEOPTIONS10
-#define GAMEOPTION_HIGH_RESOLUTION GUIO_GAMEOPTIONS11
-#define GAMEOPTION_TEXT_TO_SPEECH GUIO_GAMEOPTIONS12
-
static const PlainGameDescriptor twineGames[] = {
{ "lba", "Little Big Adventure" },
{ "lbashow", "Little Big Adventure Freeware Slide Show" },
@@ -421,148 +408,9 @@ static const ADGameDescription twineGameDescriptions[] = {
AD_TABLE_END_MARKER
};
-static const ADExtraGuiOptionsMap twineOptionsList[] = {
- {
- GAMEOPTION_WALL_COLLISION,
- {
- _s("Enable wall collisions"),
- _s("Enable the original wall collision damage"),
- "wallcollision",
- false,
- 0,
- 0
- }
- },
- {
- // this only changes the menu and doesn't change the autosave behaviour - as scummvm is handling this now
- GAMEOPTION_DISABLE_SAVE_MENU,
- {
- _s("Disable save menu"),
- _s("The original only had autosaves. This allows you to save whenever you want."),
- "useautosaving",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_DEBUG,
- {
- _s("Enable debug mode"),
- _s("Enable the debug mode"),
- "debug",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_AUDIO_CD,
- {
- _s("Enable audio CD"),
- _s("Enable the original audio cd track"),
- "usecd",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_SOUND,
- {
- _s("Enable sound"),
- _s("Enable the sound for the game"),
- "sound",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_VOICES,
- {
- _s("Enable voices"),
- _s("Enable the voices for the game"),
- "voice",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_TEXT,
- {
- _s("Enable text"),
- _s("Enable the text for the game"),
- "displaytext",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_MOVIES,
- {
- _s("Enable movies"),
- _s("Enable the cutscenes for the game"),
- "movie",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_MOUSE,
- {
- _s("Enable mouse"),
- _s("Enable the mouse for the UI"),
- "mouse",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_USA_VERSION,
- {
- _s("Use the USA version"),
- _s("Enable the USA specific version flags"),
- "version",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_HIGH_RESOLUTION,
- {
- _s("Enable high resolution"),
- _s("Enable a higher resolution for the game"),
- "usehighres",
- false,
- 0,
- 0
- }
- },
-#ifdef USE_TTS
- {
- GAMEOPTION_TEXT_TO_SPEECH,
- {
- _s("TTS Narrator"),
- _s("Use TTS to read the descriptions (if TTS is available)"),
- "tts_narrator",
- false,
- 0,
- 0
- }
- },
-#endif
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class TwinEMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- TwinEMetaEngineDetection() : AdvancedMetaEngineDetection(twineGameDescriptions, sizeof(ADGameDescription), twineGames, twineOptionsList) {
+ TwinEMetaEngineDetection() : AdvancedMetaEngineDetection(twineGameDescriptions, sizeof(ADGameDescription), twineGames) {
_guiOptions = GUIO12(GAMEOPTION_WALL_COLLISION, GAMEOPTION_DISABLE_SAVE_MENU, GAMEOPTION_DEBUG, GAMEOPTION_AUDIO_CD, GAMEOPTION_SOUND, GAMEOPTION_VOICES, GAMEOPTION_TEXT, GAMEOPTION_MOVIES, GAMEOPTION_MOUSE, GAMEOPTION_USA_VERSION, GAMEOPTION_HIGH_RESOLUTION, GAMEOPTION_TEXT_TO_SPEECH);
}
diff --git a/engines/twine/detection.h b/engines/twine/detection.h
index c8de9ccd32a..ad5978872ee 100644
--- a/engines/twine/detection.h
+++ b/engines/twine/detection.h
@@ -41,6 +41,19 @@ enum TwineFeatureFlags {
TF_MOD = (1 << 6)
};
+#define GAMEOPTION_WALL_COLLISION GUIO_GAMEOPTIONS1
+#define GAMEOPTION_DISABLE_SAVE_MENU GUIO_GAMEOPTIONS2
+#define GAMEOPTION_DEBUG GUIO_GAMEOPTIONS3
+#define GAMEOPTION_AUDIO_CD GUIO_GAMEOPTIONS4
+#define GAMEOPTION_SOUND GUIO_GAMEOPTIONS5
+#define GAMEOPTION_VOICES GUIO_GAMEOPTIONS6
+#define GAMEOPTION_TEXT GUIO_GAMEOPTIONS7
+#define GAMEOPTION_MOVIES GUIO_GAMEOPTIONS8
+#define GAMEOPTION_MOUSE GUIO_GAMEOPTIONS9
+#define GAMEOPTION_USA_VERSION GUIO_GAMEOPTIONS10
+#define GAMEOPTION_HIGH_RESOLUTION GUIO_GAMEOPTIONS11
+#define GAMEOPTION_TEXT_TO_SPEECH GUIO_GAMEOPTIONS12
+
} // End of namespace TwinE
#endif // TWINE_DETECTION_H
diff --git a/engines/twine/metaengine.cpp b/engines/twine/metaengine.cpp
index 407303789e6..7578bbf8f7a 100644
--- a/engines/twine/metaengine.cpp
+++ b/engines/twine/metaengine.cpp
@@ -37,12 +37,155 @@
namespace TwinE {
+static const ADExtraGuiOptionsMap twineOptionsList[] = {
+ {
+ GAMEOPTION_WALL_COLLISION,
+ {
+ _s("Enable wall collisions"),
+ _s("Enable the original wall collision damage"),
+ "wallcollision",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ // this only changes the menu and doesn't change the autosave behaviour - as scummvm is handling this now
+ GAMEOPTION_DISABLE_SAVE_MENU,
+ {
+ _s("Disable save menu"),
+ _s("The original only had autosaves. This allows you to save whenever you want."),
+ "useautosaving",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_DEBUG,
+ {
+ _s("Enable debug mode"),
+ _s("Enable the debug mode"),
+ "debug",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_AUDIO_CD,
+ {
+ _s("Enable audio CD"),
+ _s("Enable the original audio cd track"),
+ "usecd",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_SOUND,
+ {
+ _s("Enable sound"),
+ _s("Enable the sound for the game"),
+ "sound",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_VOICES,
+ {
+ _s("Enable voices"),
+ _s("Enable the voices for the game"),
+ "voice",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_TEXT,
+ {
+ _s("Enable text"),
+ _s("Enable the text for the game"),
+ "displaytext",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_MOVIES,
+ {
+ _s("Enable movies"),
+ _s("Enable the cutscenes for the game"),
+ "movie",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_MOUSE,
+ {
+ _s("Enable mouse"),
+ _s("Enable the mouse for the UI"),
+ "mouse",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_USA_VERSION,
+ {
+ _s("Use the USA version"),
+ _s("Enable the USA specific version flags"),
+ "version",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_HIGH_RESOLUTION,
+ {
+ _s("Enable high resolution"),
+ _s("Enable a higher resolution for the game"),
+ "usehighres",
+ false,
+ 0,
+ 0
+ }
+ },
+#ifdef USE_TTS
+ {
+ GAMEOPTION_TEXT_TO_SPEECH,
+ {
+ _s("TTS Narrator"),
+ _s("Use TTS to read the descriptions (if TTS is available)"),
+ "tts_narrator",
+ false,
+ 0,
+ 0
+ }
+ },
+#endif
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
class TwinEMetaEngine : public AdvancedMetaEngine {
public:
const char *getName() const override {
return "twine";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return twineOptionsList;
+ }
+
int getMaximumSaveSlot() const override {
return 6;
}
Commit: 5c557c480b80c0b1892d8f7de9b0c87208efe6bd
https://github.com/scummvm/scummvm/commit/5c557c480b80c0b1892d8f7de9b0c87208efe6bd
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
ULTIMA: Move the engine options into the MetaEngine subclass
Changed paths:
engines/ultima/POTFILES
engines/ultima/detection.cpp
engines/ultima/detection.h
engines/ultima/detection_tables.h
engines/ultima/metaengine.cpp
engines/ultima/metaengine.h
diff --git a/engines/ultima/POTFILES b/engines/ultima/POTFILES
index e0052515fde..5303a44834d 100644
--- a/engines/ultima/POTFILES
+++ b/engines/ultima/POTFILES
@@ -1,4 +1,4 @@
-engines/ultima/detection.cpp
+engines/ultima/metaengine.cpp
engines/ultima/shared/early/ultima_early.cpp
engines/ultima/shared/engine/ultima.cpp
engines/ultima/shared/engine/data_archive.cpp
diff --git a/engines/ultima/detection.cpp b/engines/ultima/detection.cpp
index 88952097b4a..580275e6562 100644
--- a/engines/ultima/detection.cpp
+++ b/engines/ultima/detection.cpp
@@ -22,7 +22,6 @@
#include "base/plugins.h"
#include "common/config-manager.h"
-#include "common/translation.h"
#include "ultima/detection.h"
#include "ultima/detection_tables.h"
@@ -48,136 +47,10 @@ static const PlainGameDescriptor ULTIMA_GAMES[] = {
{ 0, 0 }
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_FRAME_SKIPPING,
- {
- _s("Enable frame skipping"),
- _s("Allow the game to skip animation frames when running too slow."),
- "frameSkip",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_FRAME_LIMITING,
- {
- _s("Enable frame limiting"),
- _s("Limits the speed of the game to prevent running too fast."),
- "frameLimit",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_CHEATS,
- {
- _s("Enable cheats"),
- _s("Allow cheats by commands and a menu when player is clicked."),
- "cheat",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_HIGH_RESOLUTION,
- {
- _s("Enable high resolution"),
- _s("Enable a higher resolution for the game"),
- "usehighres",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_FOOTSTEP_SOUNDS,
- {
- _s("Play foot step sounds"),
- _s("Plays sound when the player moves."),
- "footsteps",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_JUMP_TO_MOUSE,
- {
- _s("Enable jump to mouse position"),
- _s("Jumping while not moving targets the mouse cursor rather than direction only."),
- "targetedjump",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_FONT_REPLACEMENT,
- {
- _s("Enable font replacement"),
- _s("Replaces game fonts with rendered fonts"),
- "font_override",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_FONT_ANTIALIASING,
- {
- _s("Enable font anti-aliasing"),
- _s("When font anti-aliasing is enabled, the text is smoother."),
- "font_antialiasing",
- false,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_CAMERA_WITH_SILENCER,
- {
- // I18N: Silencer is the player-character in Crusader games, known as the Avatar in Ultima series.
- _s("Camera moves with Silencer"),
- _s("Camera tracks the player movement rather than snapping to defined positions."),
- "camera_on_player",
- true,
- 0,
- 0
- }
- },
- {
- GAMEOPTION_ALWAYS_CHRISTMAS,
- {
- _s("Always enable Christmas easter-egg"),
- _s("Enable the Christmas music at any time of year."),
- "always_christmas",
- true,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
} // End of namespace Ultima
UltimaMetaEngineDetection::UltimaMetaEngineDetection() : AdvancedMetaEngineDetection(Ultima::GAME_DESCRIPTIONS,
- sizeof(Ultima::UltimaGameDescription), Ultima::ULTIMA_GAMES, Ultima::optionsList) {
+ sizeof(Ultima::UltimaGameDescription), Ultima::ULTIMA_GAMES) {
static const char *const DIRECTORY_GLOBS[2] = { "usecode", 0 };
_maxScanDepth = 2;
_directoryGlobs = DIRECTORY_GLOBS;
diff --git a/engines/ultima/detection.h b/engines/ultima/detection.h
index da89c6bf961..ee85c1f4cec 100644
--- a/engines/ultima/detection.h
+++ b/engines/ultima/detection.h
@@ -68,6 +68,18 @@ struct UltimaGameDescription {
uint32 features;
};
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
+#define GAMEOPTION_FRAME_SKIPPING GUIO_GAMEOPTIONS2
+#define GAMEOPTION_FRAME_LIMITING GUIO_GAMEOPTIONS3
+#define GAMEOPTION_CHEATS GUIO_GAMEOPTIONS4
+#define GAMEOPTION_HIGH_RESOLUTION GUIO_GAMEOPTIONS5
+#define GAMEOPTION_FOOTSTEP_SOUNDS GUIO_GAMEOPTIONS6
+#define GAMEOPTION_JUMP_TO_MOUSE GUIO_GAMEOPTIONS7
+#define GAMEOPTION_FONT_REPLACEMENT GUIO_GAMEOPTIONS8
+#define GAMEOPTION_FONT_ANTIALIASING GUIO_GAMEOPTIONS9
+#define GAMEOPTION_CAMERA_WITH_SILENCER GUIO_GAMEOPTIONS10
+#define GAMEOPTION_ALWAYS_CHRISTMAS GUIO_GAMEOPTIONS11
+
} // End of namespace Ultima
class UltimaMetaEngineDetection : public AdvancedMetaEngineDetection {
diff --git a/engines/ultima/detection_tables.h b/engines/ultima/detection_tables.h
index e6d8b1b096a..ca0b6918b4e 100644
--- a/engines/ultima/detection_tables.h
+++ b/engines/ultima/detection_tables.h
@@ -21,18 +21,6 @@
namespace Ultima {
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-#define GAMEOPTION_FRAME_SKIPPING GUIO_GAMEOPTIONS2
-#define GAMEOPTION_FRAME_LIMITING GUIO_GAMEOPTIONS3
-#define GAMEOPTION_CHEATS GUIO_GAMEOPTIONS4
-#define GAMEOPTION_HIGH_RESOLUTION GUIO_GAMEOPTIONS5
-#define GAMEOPTION_FOOTSTEP_SOUNDS GUIO_GAMEOPTIONS6
-#define GAMEOPTION_JUMP_TO_MOUSE GUIO_GAMEOPTIONS7
-#define GAMEOPTION_FONT_REPLACEMENT GUIO_GAMEOPTIONS8
-#define GAMEOPTION_FONT_ANTIALIASING GUIO_GAMEOPTIONS9
-#define GAMEOPTION_CAMERA_WITH_SILENCER GUIO_GAMEOPTIONS10
-#define GAMEOPTION_ALWAYS_CHRISTMAS GUIO_GAMEOPTIONS11
-
#define GUI_OPTIONS_ULTIMA1 GUIO0()
#define GUI_OPTIONS_ULTIMA4 GUIO1(GUIO_NOSPEECH)
#define GUI_OPTIONS_ULTIMA6 GUIO0()
diff --git a/engines/ultima/metaengine.cpp b/engines/ultima/metaengine.cpp
index 72a147b0441..c3e0f7ee746 100644
--- a/engines/ultima/metaengine.cpp
+++ b/engines/ultima/metaengine.cpp
@@ -37,10 +37,140 @@
#include "ultima/metaengine.h"
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_FRAME_SKIPPING,
+ {
+ _s("Enable frame skipping"),
+ _s("Allow the game to skip animation frames when running too slow."),
+ "frameSkip",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_FRAME_LIMITING,
+ {
+ _s("Enable frame limiting"),
+ _s("Limits the speed of the game to prevent running too fast."),
+ "frameLimit",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_CHEATS,
+ {
+ _s("Enable cheats"),
+ _s("Allow cheats by commands and a menu when player is clicked."),
+ "cheat",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_HIGH_RESOLUTION,
+ {
+ _s("Enable high resolution"),
+ _s("Enable a higher resolution for the game"),
+ "usehighres",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_FOOTSTEP_SOUNDS,
+ {
+ _s("Play foot step sounds"),
+ _s("Plays sound when the player moves."),
+ "footsteps",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_JUMP_TO_MOUSE,
+ {
+ _s("Enable jump to mouse position"),
+ _s("Jumping while not moving targets the mouse cursor rather than direction only."),
+ "targetedjump",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_FONT_REPLACEMENT,
+ {
+ _s("Enable font replacement"),
+ _s("Replaces game fonts with rendered fonts"),
+ "font_override",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_FONT_ANTIALIASING,
+ {
+ _s("Enable font anti-aliasing"),
+ _s("When font anti-aliasing is enabled, the text is smoother."),
+ "font_antialiasing",
+ false,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_CAMERA_WITH_SILENCER,
+ {
+ // I18N: Silencer is the player-character in Crusader games, known as the Avatar in Ultima series.
+ _s("Camera moves with Silencer"),
+ _s("Camera tracks the player movement rather than snapping to defined positions."),
+ "camera_on_player",
+ true,
+ 0,
+ 0
+ }
+ },
+ {
+ GAMEOPTION_ALWAYS_CHRISTMAS,
+ {
+ _s("Always enable Christmas easter-egg"),
+ _s("Enable the Christmas music at any time of year."),
+ "always_christmas",
+ true,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
const char *UltimaMetaEngine::getName() const {
return "ultima";
}
+const ADExtraGuiOptionsMap *UltimaMetaEngine::getAdvancedExtraGuiOptions() const {
+ return optionsList;
+}
+
Common::Error UltimaMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
const Ultima::UltimaGameDescription *gd = (const Ultima::UltimaGameDescription *)desc;
switch (gd->gameId) {
diff --git a/engines/ultima/metaengine.h b/engines/ultima/metaengine.h
index 57104d988a7..08e6cb8173d 100644
--- a/engines/ultima/metaengine.h
+++ b/engines/ultima/metaengine.h
@@ -35,6 +35,7 @@ private:
static Common::String getGameId(const Common::String& target);
public:
const char *getName() const override;
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
int getMaximumSaveSlot() const override;
Commit: d2555ce9987fc9d8b182fb28d0b9e083b31b934b
https://github.com/scummvm/scummvm/commit/d2555ce9987fc9d8b182fb28d0b9e083b31b934b
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
WINTERMUTE: Move the engine options into the MetaEngine subclass
Changed paths:
engines/wintermute/POTFILES
engines/wintermute/detection.cpp
engines/wintermute/detection.h
engines/wintermute/detection_tables.h
engines/wintermute/metaengine.cpp
diff --git a/engines/wintermute/POTFILES b/engines/wintermute/POTFILES
index 506282eab0a..0532d5aa997 100644
--- a/engines/wintermute/POTFILES
+++ b/engines/wintermute/POTFILES
@@ -1,4 +1,3 @@
-engines/wintermute/detection.cpp
engines/wintermute/metaengine.cpp
engines/wintermute/wintermute.cpp
engines/wintermute/keymapper_tables.h
diff --git a/engines/wintermute/detection.cpp b/engines/wintermute/detection.cpp
index defa000f156..2f24ef8f3bd 100644
--- a/engines/wintermute/detection.cpp
+++ b/engines/wintermute/detection.cpp
@@ -25,7 +25,6 @@
#include "common/error.h"
#include "common/fs.h"
#include "common/util.h"
-#include "common/translation.h"
#include "engines/metaengine.h"
@@ -45,48 +44,6 @@ static const DebugChannelDef debugFlagList[] = {
namespace Wintermute {
-static const ADExtraGuiOptionsMap gameGuiOptions[] = {
- {
- GAMEOPTION_SHOW_FPS,
- {
- _s("Show FPS-counter"),
- _s("Show the current number of frames per second in the upper left corner"),
- "show_fps",
- false,
- 0,
- 0
- },
- },
-
- {
- GAMEOPTION_BILINEAR,
- {
- _s("Sprite bilinear filtering (SLOW)"),
- _s("Apply bilinear filtering to individual sprites"),
- "bilinear_filtering",
- false,
- 0,
- 0
- }
- },
-
-#ifdef ENABLE_WME3D
- {
- GAMEOPTION_FORCE_2D_RENDERER,
- {
- _s("Force to use 2D renderer (2D games only)"),
- _s("This setting forces ScummVM to use 2D renderer while running 2D games"),
- "force_2d_renderer",
- false,
- 0,
- 0
- }
- },
-#endif
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
static const char *directoryGlobs[] = {
"language", // To detect the various languages
"languages", // To detect the various languages
@@ -96,7 +53,7 @@ static const char *directoryGlobs[] = {
class WintermuteMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- WintermuteMetaEngineDetection() : AdvancedMetaEngineDetection(Wintermute::gameDescriptions, sizeof(WMEGameDescription), Wintermute::wintermuteGames, gameGuiOptions) {
+ WintermuteMetaEngineDetection() : AdvancedMetaEngineDetection(Wintermute::gameDescriptions, sizeof(WMEGameDescription), Wintermute::wintermuteGames) {
// Use kADFlagUseExtraAsHint to distinguish between SD and HD versions
// of J.U.L.I.A. when their datafiles sit in the same directory (e.g. in Steam distribution).
_flags = kADFlagUseExtraAsHint;
diff --git a/engines/wintermute/detection.h b/engines/wintermute/detection.h
index 09440441f02..eb81e5829b4 100644
--- a/engines/wintermute/detection.h
+++ b/engines/wintermute/detection.h
@@ -133,6 +133,12 @@ struct WMEGameDescription {
WMETargetExecutable targetExecutable;
};
+#define GAMEOPTION_SHOW_FPS GUIO_GAMEOPTIONS1
+#define GAMEOPTION_BILINEAR GUIO_GAMEOPTIONS2
+#ifdef ENABLE_WME3D
+#define GAMEOPTION_FORCE_2D_RENDERER GUIO_GAMEOPTIONS3
+#endif
+
} // End of namespace Wintermute
#endif /* WINTERMUTE_GAME_DESCRIPTION_H_ */
diff --git a/engines/wintermute/detection_tables.h b/engines/wintermute/detection_tables.h
index 9af9178086f..4dd9eda22b3 100644
--- a/engines/wintermute/detection_tables.h
+++ b/engines/wintermute/detection_tables.h
@@ -21,12 +21,6 @@
namespace Wintermute {
-#define GAMEOPTION_SHOW_FPS GUIO_GAMEOPTIONS1
-#define GAMEOPTION_BILINEAR GUIO_GAMEOPTIONS2
-#ifdef ENABLE_WME3D
-#define GAMEOPTION_FORCE_2D_RENDERER GUIO_GAMEOPTIONS3
-#endif
-
static const PlainGameDescriptor wintermuteGames[] = {
{"5ld", "Five Lethal Demons"},
{"5ma", "Five Magical Amulets"},
diff --git a/engines/wintermute/metaengine.cpp b/engines/wintermute/metaengine.cpp
index f06e0d9f843..d680d9ce69a 100644
--- a/engines/wintermute/metaengine.cpp
+++ b/engines/wintermute/metaengine.cpp
@@ -20,6 +20,7 @@
*/
#include "common/achievements.h"
+#include "common/translation.h"
#include "engines/wintermute/wintermute.h"
#include "engines/wintermute/base/base_persistence_manager.h"
@@ -33,6 +34,48 @@
namespace Wintermute {
+static const ADExtraGuiOptionsMap gameGuiOptions[] = {
+ {
+ GAMEOPTION_SHOW_FPS,
+ {
+ _s("Show FPS-counter"),
+ _s("Show the current number of frames per second in the upper left corner"),
+ "show_fps",
+ false,
+ 0,
+ 0
+ },
+ },
+
+ {
+ GAMEOPTION_BILINEAR,
+ {
+ _s("Sprite bilinear filtering (SLOW)"),
+ _s("Apply bilinear filtering to individual sprites"),
+ "bilinear_filtering",
+ false,
+ 0,
+ 0
+ }
+ },
+
+#ifdef ENABLE_WME3D
+ {
+ GAMEOPTION_FORCE_2D_RENDERER,
+ {
+ _s("Force to use 2D renderer (2D games only)"),
+ _s("This setting forces ScummVM to use 2D renderer while running 2D games"),
+ "force_2d_renderer",
+ false,
+ 0,
+ 0
+ }
+ },
+#endif
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
/**
* The fallback game descriptor used by the Wintermute engine's fallbackDetector.
* Contents of this struct are overwritten by the fallbackDetector. (logic copied partially
@@ -56,6 +99,10 @@ public:
return "wintermute";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return gameGuiOptions;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override {
const WMEGameDescription *gd = (const WMEGameDescription *)desc;
Commit: 33e850963438c79b4470e0a732a8dbfc70f30f28
https://github.com/scummvm/scummvm/commit/33e850963438c79b4470e0a732a8dbfc70f30f28
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
XEEN: Move the engine options into the MetaEngine subclass
Changed paths:
engines/xeen/POTFILES
engines/xeen/detection.cpp
engines/xeen/detection.h
engines/xeen/metaengine.cpp
diff --git a/engines/xeen/POTFILES b/engines/xeen/POTFILES
index e23e418b801..81634cb98e3 100644
--- a/engines/xeen/POTFILES
+++ b/engines/xeen/POTFILES
@@ -1,2 +1,2 @@
-engines/xeen/detection.cpp
+engines/xeen/metaengine.cpp
engines/xeen/saves.cpp
diff --git a/engines/xeen/detection.cpp b/engines/xeen/detection.cpp
index a789c8497aa..70c2bd07a9e 100644
--- a/engines/xeen/detection.cpp
+++ b/engines/xeen/detection.cpp
@@ -21,7 +21,6 @@
#include "base/plugins.h"
#include "engines/advancedDetector.h"
-#include "common/translation.h"
#include "xeen/detection.h"
#include "xeen/xeen.h"
@@ -42,44 +41,12 @@ static const DebugChannelDef debugFlagList[] = {
DEBUG_CHANNEL_END
};
-#define GAMEOPTION_SHOW_ITEM_COSTS GUIO_GAMEOPTIONS1
-#define GAMEOPTION_DURABLE_ARMOR GUIO_GAMEOPTIONS2
-
#include "xeen/detection_tables.h"
-
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_SHOW_ITEM_COSTS,
- {
- _s("Show item costs in standard inventory mode"),
- _s("Shows item costs in standard inventory mode, allowing the value of items to be compared"),
- "ShowItemCosts",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_DURABLE_ARMOR,
- {
- _s("More durable armor"),
- _s("Armor won't break until character is at -80HP, rather than merely -10HP"),
- "DurableArmor",
- false,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class XeenMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
XeenMetaEngineDetection() : AdvancedMetaEngineDetection(Xeen::gameDescriptions, sizeof(Xeen::XeenGameDescription),
- XeenGames, optionsList) {
+ XeenGames) {
_maxScanDepth = 3;
}
diff --git a/engines/xeen/detection.h b/engines/xeen/detection.h
index 530b59b9395..d2b2aaa39c7 100644
--- a/engines/xeen/detection.h
+++ b/engines/xeen/detection.h
@@ -40,6 +40,9 @@ struct XeenGameDescription {
uint32 features;
};
+#define GAMEOPTION_SHOW_ITEM_COSTS GUIO_GAMEOPTIONS1
+#define GAMEOPTION_DURABLE_ARMOR GUIO_GAMEOPTIONS2
+
} // End of namespace Xeen
#endif // XEEN_DETECTION_H
diff --git a/engines/xeen/metaengine.cpp b/engines/xeen/metaengine.cpp
index 983263a6b2c..12cc9f08ad0 100644
--- a/engines/xeen/metaengine.cpp
+++ b/engines/xeen/metaengine.cpp
@@ -27,12 +27,41 @@
#include "common/savefile.h"
#include "engines/advancedDetector.h"
#include "common/system.h"
+#include "common/translation.h"
#include "xeen/detection.h"
#define MAX_SAVES 99
namespace Xeen {
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_SHOW_ITEM_COSTS,
+ {
+ _s("Show item costs in standard inventory mode"),
+ _s("Shows item costs in standard inventory mode, allowing the value of items to be compared"),
+ "ShowItemCosts",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_DURABLE_ARMOR,
+ {
+ _s("More durable armor"),
+ _s("Armor won't break until character is at -80HP, rather than merely -10HP"),
+ "DurableArmor",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
uint32 XeenEngine::getGameID() const {
return _gameDescription->gameID;
}
@@ -73,6 +102,10 @@ public:
return "xeen";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return Xeen::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
SaveStateList listSaves(const char *target) const override;
Commit: 4860969b8575885278b98766926a75e2c50bb4d9
https://github.com/scummvm/scummvm/commit/4860969b8575885278b98766926a75e2c50bb4d9
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
ZVISION: Move the engine options into the MetaEngine subclass
Changed paths:
engines/zvision/detection.cpp
engines/zvision/detection.h
engines/zvision/detection_tables.h
engines/zvision/metaengine.cpp
diff --git a/engines/zvision/detection.cpp b/engines/zvision/detection.cpp
index 9a8e1340aca..02953d191f8 100644
--- a/engines/zvision/detection.cpp
+++ b/engines/zvision/detection.cpp
@@ -33,7 +33,7 @@
class ZVisionMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- ZVisionMetaEngineDetection() : AdvancedMetaEngineDetection(ZVision::gameDescriptions, sizeof(ZVision::ZVisionGameDescription), ZVision::zVisionGames, ZVision::optionsList) {
+ ZVisionMetaEngineDetection() : AdvancedMetaEngineDetection(ZVision::gameDescriptions, sizeof(ZVision::ZVisionGameDescription), ZVision::zVisionGames) {
_maxScanDepth = 2;
_directoryGlobs = ZVision::directoryGlobs;
}
diff --git a/engines/zvision/detection.h b/engines/zvision/detection.h
index b2dbd9f290a..56358206ad5 100644
--- a/engines/zvision/detection.h
+++ b/engines/zvision/detection.h
@@ -41,6 +41,12 @@ struct ZVisionGameDescription {
ZVisionGameId gameId;
};
+#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
+#define GAMEOPTION_DOUBLE_FPS GUIO_GAMEOPTIONS2
+#define GAMEOPTION_ENABLE_VENUS GUIO_GAMEOPTIONS3
+#define GAMEOPTION_DISABLE_ANIM_WHILE_TURNING GUIO_GAMEOPTIONS4
+#define GAMEOPTION_USE_HIRES_MPEG_MOVIES GUIO_GAMEOPTIONS5
+
} // End of namespace ZVision
#endif // ZVISION_DETECTION_H
diff --git a/engines/zvision/detection_tables.h b/engines/zvision/detection_tables.h
index 3f9711ad243..c22d0654fc9 100644
--- a/engines/zvision/detection_tables.h
+++ b/engines/zvision/detection_tables.h
@@ -36,77 +36,6 @@ static const char *directoryGlobs[] = {
0
};
-#define GAMEOPTION_ORIGINAL_SAVELOAD GUIO_GAMEOPTIONS1
-#define GAMEOPTION_DOUBLE_FPS GUIO_GAMEOPTIONS2
-#define GAMEOPTION_ENABLE_VENUS GUIO_GAMEOPTIONS3
-#define GAMEOPTION_DISABLE_ANIM_WHILE_TURNING GUIO_GAMEOPTIONS4
-#define GAMEOPTION_USE_HIRES_MPEG_MOVIES GUIO_GAMEOPTIONS5
-
-static const ADExtraGuiOptionsMap optionsList[] = {
-
- {
- GAMEOPTION_ORIGINAL_SAVELOAD,
- {
- _s("Use original save/load screens"),
- _s("Use the original save/load screens instead of the ScummVM ones"),
- "originalsaveload",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_DOUBLE_FPS,
- {
- _s("Double FPS"),
- _s("Increase framerate from 30 to 60 FPS"),
- "doublefps",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_ENABLE_VENUS,
- {
- _s("Enable Venus"),
- _s("Enable the Venus help system"),
- "venusenabled",
- true,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_DISABLE_ANIM_WHILE_TURNING,
- {
- _s("Disable animation while turning"),
- _s("Disable animation while turning in panorama mode"),
- "noanimwhileturning",
- false,
- 0,
- 0
- }
- },
-
- {
- GAMEOPTION_USE_HIRES_MPEG_MOVIES,
- {
- _s("Use high resolution MPEG video"),
- _s("Use MPEG video from the DVD version instead of lower resolution AVI"),
- "mpegmovies",
- true,
- 0,
- 0
- }
- },
-
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
static const ZVisionGameDescription gameDescriptions[] = {
{
diff --git a/engines/zvision/metaengine.cpp b/engines/zvision/metaengine.cpp
index d3beb628b9f..b4ea238694b 100644
--- a/engines/zvision/metaengine.cpp
+++ b/engines/zvision/metaengine.cpp
@@ -38,6 +38,71 @@
namespace ZVision {
+static const ADExtraGuiOptionsMap optionsList[] = {
+
+ {
+ GAMEOPTION_ORIGINAL_SAVELOAD,
+ {
+ _s("Use original save/load screens"),
+ _s("Use the original save/load screens instead of the ScummVM ones"),
+ "originalsaveload",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_DOUBLE_FPS,
+ {
+ _s("Double FPS"),
+ _s("Increase framerate from 30 to 60 FPS"),
+ "doublefps",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_ENABLE_VENUS,
+ {
+ _s("Enable Venus"),
+ _s("Enable the Venus help system"),
+ "venusenabled",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_DISABLE_ANIM_WHILE_TURNING,
+ {
+ _s("Disable animation while turning"),
+ _s("Disable animation while turning in panorama mode"),
+ "noanimwhileturning",
+ false,
+ 0,
+ 0
+ }
+ },
+
+ {
+ GAMEOPTION_USE_HIRES_MPEG_MOVIES,
+ {
+ _s("Use high resolution MPEG video"),
+ _s("Use MPEG video from the DVD version instead of lower resolution AVI"),
+ "mpegmovies",
+ true,
+ 0,
+ 0
+ }
+ },
+
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
+
ZVisionGameId ZVision::getGameId() const {
return _gameDescription->gameId;
}
@@ -56,6 +121,10 @@ public:
return "zvision";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return ZVision::optionsList;
+ }
+
bool hasFeature(MetaEngineFeature f) const override;
Common::KeymapArray initKeymaps(const char *target) const override;
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const override;
Commit: 0da774a218962717f63e52c4620d8b8eb7d58ec9
https://github.com/scummvm/scummvm/commit/0da774a218962717f63e52c4620d8b8eb7d58ec9
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
FREESCAPE: Move the engine options into the MetaEngine subclass
Changed paths:
A engines/freescape/detection.h
engines/freescape/POTFILES
engines/freescape/detection.cpp
engines/freescape/metaengine.cpp
diff --git a/engines/freescape/POTFILES b/engines/freescape/POTFILES
index 69559eb9fe8..c594a893e04 100644
--- a/engines/freescape/POTFILES
+++ b/engines/freescape/POTFILES
@@ -1 +1 @@
-engines/freescape/detection.cpp
+engines/freescape/metaengine.cpp
diff --git a/engines/freescape/detection.cpp b/engines/freescape/detection.cpp
index f1cf0883d80..22ebd9d293d 100644
--- a/engines/freescape/detection.cpp
+++ b/engines/freescape/detection.cpp
@@ -19,11 +19,8 @@
*
*/
-#include "common/translation.h"
-
#include "freescape/freescape.h"
-
-#define GAMEOPTION_PRERECORDED_SOUNDS GUIO_GAMEOPTIONS1
+#include "freescape/detection.h"
namespace Freescape {
@@ -252,24 +249,9 @@ static const DebugChannelDef debugFlagList[] = {
DEBUG_CHANNEL_END
};
-static const ADExtraGuiOptionsMap optionsList[] = {
- {
- GAMEOPTION_PRERECORDED_SOUNDS,
- {
- _s("Prerecorded sounds"),
- _s("Use high-quality pre-recorded sounds instead of pc speaker emulation"),
- "prerecorded_sounds",
- true,
- 0,
- 0
- }
- },
- AD_EXTRA_GUI_OPTIONS_TERMINATOR
-};
-
class FreescapeMetaEngineDetection : public AdvancedMetaEngineDetection {
public:
- FreescapeMetaEngineDetection() : AdvancedMetaEngineDetection(Freescape::gameDescriptions, sizeof(ADGameDescription), Freescape::freescapeGames, optionsList) {
+ FreescapeMetaEngineDetection() : AdvancedMetaEngineDetection(Freescape::gameDescriptions, sizeof(ADGameDescription), Freescape::freescapeGames) {
_guiOptions = GUIO2(GUIO_NOMIDI, GAMEOPTION_PRERECORDED_SOUNDS);
}
diff --git a/engines/freescape/detection.h b/engines/freescape/detection.h
new file mode 100644
index 00000000000..f48383ff3c1
--- /dev/null
+++ b/engines/freescape/detection.h
@@ -0,0 +1,27 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef FREESCAPE_DETECTION_H
+#define FREESCAPE_DETECTION_H
+
+#define GAMEOPTION_PRERECORDED_SOUNDS GUIO_GAMEOPTIONS1
+
+#endif
diff --git a/engines/freescape/metaengine.cpp b/engines/freescape/metaengine.cpp
index 6b96ee7658b..2b521de313a 100644
--- a/engines/freescape/metaengine.cpp
+++ b/engines/freescape/metaengine.cpp
@@ -19,7 +19,25 @@
*
*/
+#include "common/translation.h"
+
#include "freescape/freescape.h"
+#include "freescape/detection.h"
+
+static const ADExtraGuiOptionsMap optionsList[] = {
+ {
+ GAMEOPTION_PRERECORDED_SOUNDS,
+ {
+ _s("Prerecorded sounds"),
+ _s("Use high-quality pre-recorded sounds instead of pc speaker emulation"),
+ "prerecorded_sounds",
+ true,
+ 0,
+ 0
+ }
+ },
+ AD_EXTRA_GUI_OPTIONS_TERMINATOR
+};
class FreescapeMetaEngine : public AdvancedMetaEngine {
public:
@@ -27,6 +45,10 @@ public:
return "freescape";
}
+ const ADExtraGuiOptionsMap *getAdvancedExtraGuiOptions() const override {
+ return optionsList;
+ }
+
Common::Error createInstance(OSystem *syst, Engine **engine, const ADGameDescription *gd) const override;
};
Commit: 2c8a7d390071728971c4331357763a4a19b4bdd1
https://github.com/scummvm/scummvm/commit/2c8a7d390071728971c4331357763a4a19b4bdd1
Author: Cameron Cawley (ccawley2011 at gmail.com)
Date: 2022-11-16T23:58:54+01:00
Commit Message:
ENGINES: Remove support for GUI options in MetaEngineDetection subclasses
Changed paths:
base/main.cpp
engines/advancedDetector.cpp
engines/advancedDetector.h
engines/ags/dialogs.cpp
engines/ags/metaengine.h
engines/dialogs.cpp
engines/metaengine.cpp
engines/metaengine.h
engines/mohawk/metaengine.cpp
engines/nancy/metaengine.cpp
engines/sci/metaengine.cpp
engines/scumm/metaengine.cpp
engines/scumm/metaengine.h
gui/editgamedialog.cpp
diff --git a/base/main.cpp b/base/main.cpp
index 5fc1bf9cfaa..eedba6649ae 100644
--- a/base/main.cpp
+++ b/base/main.cpp
@@ -186,12 +186,6 @@ static Common::Error runGame(const Plugin *plugin, const Plugin *enginePlugin, O
// Create the game's MetaEngineDetection.
const MetaEngineDetection &metaEngineDetection = plugin->get<MetaEngineDetection>();
- if (err.getCode() == Common::kNoError) {
- // Set default values for all of the custom engine options
- // Apparently some engines query them in their constructor, thus we
- // need to set this up before instance creation.
- metaEngineDetection.registerDefaultSettings(target);
- }
// before we instantiate the engine, we register debug channels for it
DebugMan.addAllDebugChannels(metaEngineDetection.getDebugChannels());
diff --git a/engines/advancedDetector.cpp b/engines/advancedDetector.cpp
index 18d9bcdaafe..7b915a8636b 100644
--- a/engines/advancedDetector.cpp
+++ b/engines/advancedDetector.cpp
@@ -309,34 +309,6 @@ DetectedGames AdvancedMetaEngineDetection::detectGames(const Common::FSList &fsl
return detectedGames;
}
-const ExtraGuiOptions AdvancedMetaEngineDetection::getExtraGuiOptions(const Common::String &target) const {
- if (!_extraGuiOptions)
- return ExtraGuiOptions();
-
- ExtraGuiOptions options;
-
- // If there isn't any target specified, return all available GUI options.
- // Only used when an engine starts in order to set option defaults.
- if (target.empty()) {
- for (const ADExtraGuiOptionsMap *entry = _extraGuiOptions; entry->guioFlag; ++entry)
- options.push_back(entry->option);
-
- return options;
- }
-
- // Query the GUI options
- const Common::String guiOptionsString = ConfMan.get("guioptions", target);
- const Common::String guiOptions = parseGameGUIOptions(guiOptionsString);
-
- // Add all the applying extra GUI options.
- for (const ADExtraGuiOptionsMap *entry = _extraGuiOptions; entry->guioFlag; ++entry) {
- if (guiOptions.contains(entry->guioFlag))
- options.push_back(entry->option);
- }
-
- return options;
-}
-
const ExtraGuiOptions AdvancedMetaEngine::getExtraGuiOptions(const Common::String &target) const {
const ADExtraGuiOptionsMap *extraGuiOptions = getAdvancedExtraGuiOptions();
if (!extraGuiOptions)
@@ -828,9 +800,8 @@ static const char *grayList[] = {
0
};
-AdvancedMetaEngineDetection::AdvancedMetaEngineDetection(const void *descs, uint descItemSize, const PlainGameDescriptor *gameIds, const ADExtraGuiOptionsMap *extraGuiOptions)
- : _gameDescriptors((const byte *)descs), _descItemSize(descItemSize), _gameIds(gameIds),
- _extraGuiOptions(extraGuiOptions) {
+AdvancedMetaEngineDetection::AdvancedMetaEngineDetection(const void *descs, uint descItemSize, const PlainGameDescriptor *gameIds)
+ : _gameDescriptors((const byte *)descs), _descItemSize(descItemSize), _gameIds(gameIds) {
_md5Bytes = 5000;
_flags = 0;
diff --git a/engines/advancedDetector.h b/engines/advancedDetector.h
index 351071e3a04..ea3f4467c2e 100644
--- a/engines/advancedDetector.h
+++ b/engines/advancedDetector.h
@@ -283,11 +283,6 @@ protected:
*/
const PlainGameDescriptor *_gameIds;
- /**
- * A map containing all the extra game GUI options the engine supports.
- */
- const ADExtraGuiOptionsMap * const _extraGuiOptions;
-
/**
* The number of bytes to compute the MD5 checksum for.
*
@@ -343,7 +338,7 @@ public:
/**
* Initialize game detection using AdvancedMetaEngineDetection.
*/
- AdvancedMetaEngineDetection(const void *descs, uint descItemSize, const PlainGameDescriptor *gameIds, const ADExtraGuiOptionsMap *extraGuiOptions = 0);
+ AdvancedMetaEngineDetection(const void *descs, uint descItemSize, const PlainGameDescriptor *gameIds);
/**
* Return a list of targets supported by the engine.
@@ -370,22 +365,6 @@ public:
*/
Common::Error createInstance(OSystem *syst, Engine **engine);
- /**
- * Return a list of extra GUI options for the specified target.
- *
- * If no target is specified, all of the available custom GUI options are
- * returned for the plugin (used to set default values).
- *
- * Currently, this only supports options with checkboxes.
- *
- * The default implementation returns an empty list.
- *
- * @param target Name of a config manager target.
- *
- * @return A list of extra GUI options for an engine plugin and target.
- */
- const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override final;
-
static Common::StringArray getPathsFromEntry(const ADGameDescription *g);
uint getMD5Bytes() const { return _md5Bytes; }
diff --git a/engines/ags/dialogs.cpp b/engines/ags/dialogs.cpp
index 1188cd24444..901fb89e470 100644
--- a/engines/ags/dialogs.cpp
+++ b/engines/ags/dialogs.cpp
@@ -132,6 +132,6 @@ bool AGSOptionsWidget::save() {
} // namespace AGS3
-GUI::OptionsContainerWidget *AGSMetaEngine::buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
+GUI::OptionsContainerWidget *AGSMetaEngine::buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
return new AGS3::AGSOptionsWidget(boss, name, target);
}
diff --git a/engines/ags/metaengine.h b/engines/ags/metaengine.h
index e4ebae3a7c2..1231c18a611 100644
--- a/engines/ags/metaengine.h
+++ b/engines/ags/metaengine.h
@@ -51,7 +51,7 @@ public:
*/
Common::String getSavegameFile(int saveGameIdx, const char *target = nullptr) const override;
- GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
+ GUI::OptionsContainerWidget *buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
/**
* Determine whether the engine supports the specified MetaEngine feature.
diff --git a/engines/dialogs.cpp b/engines/dialogs.cpp
index 5131c81e86f..15f8a4eb393 100644
--- a/engines/dialogs.cpp
+++ b/engines/dialogs.cpp
@@ -265,7 +265,6 @@ ConfigDialog::ConfigDialog() :
const Common::String &gameDomain = ConfMan.getActiveDomainName();
const MetaEngine *metaEngine = g_engine->getMetaEngine();
- const MetaEngineDetection &metaEngineDetection = g_engine->getMetaEngineDetection();
// GUI: Add tab widget
GUI::TabWidget *tab = new GUI::TabWidget(this, "GlobalConfig.TabWidget");
@@ -277,9 +276,7 @@ ConfigDialog::ConfigDialog() :
int tabId = tab->addTab(_("Game"), "GlobalConfig_Engine");
if (g_engine->hasFeature(Engine::kSupportsChangingOptionsDuringRuntime)) {
- _engineOptions = metaEngine->buildEngineOptionsWidgetDynamic(tab, "GlobalConfig_Engine.Container", gameDomain);
- if (!_engineOptions)
- _engineOptions = metaEngineDetection.buildEngineOptionsWidgetStatic(tab, "GlobalConfig_Engine.Container", gameDomain);
+ _engineOptions = metaEngine->buildEngineOptionsWidget(tab, "GlobalConfig_Engine.Container", gameDomain);
}
if (_engineOptions) {
diff --git a/engines/metaengine.cpp b/engines/metaengine.cpp
index 707f2a063df..32755ea4625 100644
--- a/engines/metaengine.cpp
+++ b/engines/metaengine.cpp
@@ -395,27 +395,7 @@ void MetaEngine::registerDefaultSettings(const Common::String &) const {
}
}
-void MetaEngineDetection::registerDefaultSettings(const Common::String &) const {
- // Note that as we don't pass the target to getExtraGuiOptions
- // we get all the options, even those not relevant for the current
- // game. This is necessary because some engines unconditionally
- // access the configuration.
- const ExtraGuiOptions engineOptions = getExtraGuiOptions("");
- for (uint i = 0; i < engineOptions.size(); i++) {
- ConfMan.registerDefault(engineOptions[i].configOption, engineOptions[i].defaultState);
- }
-}
-
-GUI::OptionsContainerWidget *MetaEngine::buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
- const ExtraGuiOptions engineOptions = getExtraGuiOptions(target);
- if (engineOptions.empty()) {
- return nullptr;
- }
-
- return new GUI::ExtraGuiOptionsWidget(boss, name, target, engineOptions);
-}
-
-GUI::OptionsContainerWidget *MetaEngineDetection::buildEngineOptionsWidgetStatic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
+GUI::OptionsContainerWidget *MetaEngine::buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
const ExtraGuiOptions engineOptions = getExtraGuiOptions(target);
if (engineOptions.empty()) {
return nullptr;
diff --git a/engines/metaengine.h b/engines/metaengine.h
index 21a5220d687..231413c363a 100644
--- a/engines/metaengine.h
+++ b/engines/metaengine.h
@@ -163,24 +163,6 @@ public:
*/
virtual DetectedGames detectGames(const Common::FSList &fslist, uint32 skipADFlags = 0, bool skipIncomplete = false) = 0;
- /**
- * Return a list of extra GUI options for the specified target.
- *
- * If no target is specified, all of the available custom GUI options are
- * returned for the plugin (used to set default values).
- *
- * Currently, this only supports options with checkboxes.
- *
- * The default implementation returns an empty list.
- *
- * @param target Name of a config manager target.
- *
- * @return A list of extra GUI options for an engine plugin and target.
- */
- virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const {
- return ExtraGuiOptions();
- }
-
/**
* The default version of this method will just parse the options string from
* the config manager. However it also allows the meta engine to post process
@@ -206,30 +188,6 @@ public:
virtual const DebugChannelDef *getDebugChannels() const {
return NULL;
}
-
- /**
- * Register the default values for the settings that the engine uses into the
- * configuration manager.
- *
- * @param target Name of a config manager target.
- */
- void registerDefaultSettings(const Common::String &target) const;
-
- /**
- * Return a GUI widget container for configuring the specified target options.
- *
- * The returned widget is shown in the Engine tab in the Edit Game dialog.
- * Engines can build custom option dialogs, but by default a simple widget
- * allowing to configure the extra GUI options is used.
- *
- * Engines that are not supposed to have an Engine tab in the Edit Game dialog
- * can return nullptr.
- *
- * @param boss The widget or dialog that the returned widget is a child of.
- * @param name The name that the returned widget must use.
- * @param target Name of a config manager target.
- */
- GUI::OptionsContainerWidget *buildEngineOptionsWidgetStatic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const;
};
/**
@@ -436,7 +394,7 @@ public:
* @param name The name that the returned widget must use.
* @param target Name of a config manager target.
*/
- virtual GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const;
+ virtual GUI::OptionsContainerWidget *buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const;
/**
* MetaEngine feature flags.
diff --git a/engines/mohawk/metaengine.cpp b/engines/mohawk/metaengine.cpp
index 3ab65f886a2..c368f562fae 100644
--- a/engines/mohawk/metaengine.cpp
+++ b/engines/mohawk/metaengine.cpp
@@ -140,7 +140,7 @@ public:
void registerDefaultSettings(const Common::String &target) const override;
- GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
+ GUI::OptionsContainerWidget *buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
Common::String getSavegameFile(int saveGameIdx, const char *target) const override {
if (!target)
target = getName();
@@ -338,7 +338,7 @@ void MohawkMetaEngine::registerDefaultSettings(const Common::String &target) con
return MetaEngine::registerDefaultSettings(target);
}
-GUI::OptionsContainerWidget *MohawkMetaEngine::buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
+GUI::OptionsContainerWidget *MohawkMetaEngine::buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
Common::String gameId = ConfMan.get("gameid", target);
#ifdef ENABLE_MYST
@@ -352,7 +352,7 @@ GUI::OptionsContainerWidget *MohawkMetaEngine::buildEngineOptionsWidgetDynamic(G
}
#endif
- return MetaEngine::buildEngineOptionsWidgetDynamic(boss, name, target);
+ return MetaEngine::buildEngineOptionsWidget(boss, name, target);
}
#if PLUGIN_ENABLED_DYNAMIC(MOHAWK)
diff --git a/engines/nancy/metaengine.cpp b/engines/nancy/metaengine.cpp
index 9ec0e684589..cd6c57b3d20 100644
--- a/engines/nancy/metaengine.cpp
+++ b/engines/nancy/metaengine.cpp
@@ -39,7 +39,7 @@ public:
Common::KeymapArray initKeymaps(const char *target) const override;
void registerDefaultSettings(const Common::String &target) const override;
- GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
+ GUI::OptionsContainerWidget *buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
};
Common::KeymapArray NancyMetaEngine::initKeymaps(const char *target) const {
@@ -82,7 +82,7 @@ void NancyMetaEngine::registerDefaultSettings(const Common::String &target) cons
ConfMan.setBool("subtitles", true, target);
}
-GUI::OptionsContainerWidget *NancyMetaEngine::buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
+GUI::OptionsContainerWidget *NancyMetaEngine::buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
return new Nancy::NancyOptionsWidget(boss, name, target);
}
diff --git a/engines/sci/metaengine.cpp b/engines/sci/metaengine.cpp
index c6af60afe93..b7397a2eee1 100644
--- a/engines/sci/metaengine.cpp
+++ b/engines/sci/metaengine.cpp
@@ -288,7 +288,7 @@ public:
ADDetectedGame fallbackDetectExtern(uint md5Bytes, const FileMap &allFiles, const Common::FSList &fslist, ADDetectedGameExtraInfo **extra) const override;
void registerDefaultSettings(const Common::String &target) const override;
- GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
+ GUI::OptionsContainerWidget *buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
};
Common::Error SciMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const {
@@ -716,7 +716,7 @@ void SciMetaEngine::registerDefaultSettings(const Common::String &target) const
ConfMan.registerDefault(entry->configOption, entry->defaultState);
}
-GUI::OptionsContainerWidget *SciMetaEngine::buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
+GUI::OptionsContainerWidget *SciMetaEngine::buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
return new OptionsWidget(boss, name, target);
}
diff --git a/engines/scumm/metaengine.cpp b/engines/scumm/metaengine.cpp
index f7fce81b1e9..20b220a2a07 100644
--- a/engines/scumm/metaengine.cpp
+++ b/engines/scumm/metaengine.cpp
@@ -556,14 +556,14 @@ SaveStateDescriptor ScummMetaEngine::querySaveMetaInfos(const char *target, int
return desc;
}
-GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
+GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const {
Common::String gameid = ConfMan.get("gameid", target);
Common::String extra = ConfMan.get("extra", target);
if (gameid == "loom") {
Common::Platform platform = Common::parsePlatform(ConfMan.get("platform", target));
if (platform != Common::kPlatformUnknown && platform != Common::kPlatformDOS)
- return MetaEngine::buildEngineOptionsWidgetDynamic(boss, name, target);
+ return MetaEngine::buildEngineOptionsWidget(boss, name, target);
// The VGA Loom settings are only relevant for the DOS CD
// version, not the Steam version (which is assumed to be well
@@ -573,7 +573,7 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidgetDynamic(GU
return new Scumm::LoomVgaGameOptionsWidget(boss, name, target);
if (extra == "Steam")
- return MetaEngine::buildEngineOptionsWidgetDynamic(boss, name, target);
+ return MetaEngine::buildEngineOptionsWidget(boss, name, target);
// These EGA Loom settings are only relevant for the EGA
// version, since that is the only one that has an overture.
@@ -581,12 +581,12 @@ GUI::OptionsContainerWidget *ScummMetaEngine::buildEngineOptionsWidgetDynamic(GU
return new Scumm::LoomEgaGameOptionsWidget(boss, name, target);
} else if (gameid == "monkey") {
if (extra != "CD" && extra != "FM-TOWNS" && extra != "SEGA")
- return MetaEngine::buildEngineOptionsWidgetDynamic(boss, name, target);
+ return MetaEngine::buildEngineOptionsWidget(boss, name, target);
return new Scumm::MI1CdGameOptionsWidget(boss, name, target);
}
- return MetaEngine::buildEngineOptionsWidgetDynamic(boss, name, target);
+ return MetaEngine::buildEngineOptionsWidget(boss, name, target);
}
static const ExtraGuiOption comiObjectLabelsOption = {
diff --git a/engines/scumm/metaengine.h b/engines/scumm/metaengine.h
index 226bc9fd844..dd9ef7a482f 100644
--- a/engines/scumm/metaengine.h
+++ b/engines/scumm/metaengine.h
@@ -37,7 +37,7 @@ class ScummMetaEngine : public MetaEngine {
SaveStateDescriptor querySaveMetaInfos(const char *target, int slot) const override;
const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const override;
- GUI::OptionsContainerWidget *buildEngineOptionsWidgetDynamic(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
+ GUI::OptionsContainerWidget *buildEngineOptionsWidget(GUI::GuiObject *boss, const Common::String &name, const Common::String &target) const override;
};
#endif // SCUMM_METAENGINE_H
diff --git a/gui/editgamedialog.cpp b/gui/editgamedialog.cpp
index 556483eb343..e69a8f52f54 100644
--- a/gui/editgamedialog.cpp
+++ b/gui/editgamedialog.cpp
@@ -176,15 +176,9 @@ EditGameDialog::EditGameDialog(const Common::String &domain)
// 2) The engine's game settings (shown only if the engine implements one or there are custom engine options)
//
- if (metaEnginePlugin) {
- const MetaEngineDetection &metaEngineDetection = metaEnginePlugin->get<MetaEngineDetection>();
- metaEngineDetection.registerDefaultSettings(_domain);
- if (enginePlugin) {
- enginePlugin->get<MetaEngine>().registerDefaultSettings(_domain);
- _engineOptions = enginePlugin->get<MetaEngine>().buildEngineOptionsWidgetDynamic(tab, "GameOptions_Game.Container", _domain);
- }
- if (!_engineOptions)
- _engineOptions = metaEngineDetection.buildEngineOptionsWidgetStatic(tab, "GameOptions_Game.Container", _domain);
+ if (enginePlugin) {
+ enginePlugin->get<MetaEngine>().registerDefaultSettings(_domain);
+ _engineOptions = enginePlugin->get<MetaEngine>().buildEngineOptionsWidget(tab, "GameOptions_Game.Container", _domain);
if (_engineOptions) {
_engineOptions->setParentDialog(this);
More information about the Scummvm-git-logs
mailing list