diff options
author | Martin Kiewitz | 2015-05-15 04:09:55 +0200 |
---|---|---|
committer | Martin Kiewitz | 2015-05-15 04:09:55 +0200 |
commit | e339cd66c118ad3764639f19381989791ab8932b (patch) | |
tree | fb3f51aae95781fd27fa6117bcbd92b44d99d8ef /engines/agi/detection.cpp | |
parent | c787560acb27773c7c269869e02d799a3562057d (diff) | |
download | scummvm-rg350-e339cd66c118ad3764639f19381989791ab8932b.tar.gz scummvm-rg350-e339cd66c118ad3764639f19381989791ab8932b.tar.bz2 scummvm-rg350-e339cd66c118ad3764639f19381989791ab8932b.zip |
AGI: implement engine option to disable mouse
engine option gets disabled for all Amiga games
also disabled for certain fanmade games, which
require a mouse.
defaults to enabled mouse
Engine options are not shown for previously
detected games until those games get redetected
If there is a way to handle those cases, please
fix.
Diffstat (limited to 'engines/agi/detection.cpp')
-rw-r--r-- | engines/agi/detection.cpp | 50 |
1 files changed, 48 insertions, 2 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 3230b4e5d3..a44053dd14 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -152,8 +152,49 @@ static const ExtraGuiOption agiExtraGuiOptionAmiga = { false }; +static const ExtraGuiOption agiExtraGuiOptionEnableMouse = { + _s("Enable mouse"), + _s("Enables mouse. Games, that require a mouse, will have mouse always enabled."), + "enablemouse", + true +}; + #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 + } + }, + + { + 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 + } + }, + + { + GAMEOPTION_DISABLE_MOUSE, + { + _s("Enable mouse"), + _s("Enables mouse. Games, that require a mouse, will have mouse always enabled."), + "enablemouse", + true + } + }, + + AD_EXTRA_GUI_OPTIONS_TERMINATOR +}; + using namespace Agi; class AgiMetaEngine : public AdvancedMetaEngine { @@ -161,7 +202,7 @@ class AgiMetaEngine : public AdvancedMetaEngine { mutable Common::String _extra; public: - AgiMetaEngine() : AdvancedMetaEngine(Agi::gameDescriptions, sizeof(Agi::AGIGameDescription), agiGames) { + AgiMetaEngine() : AdvancedMetaEngine(Agi::gameDescriptions, sizeof(Agi::AGIGameDescription), agiGames, optionsList) { _singleid = "agi"; _guioptions = GUIO1(GUIO_NOSPEECH); } @@ -175,7 +216,7 @@ public: virtual bool hasFeature(MetaEngineFeature f) const; virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const; - virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const; + //virtual const ExtraGuiOptions getExtraGuiOptions(const Common::String &target) const; virtual SaveStateList listSaves(const char *target) const; virtual int getMaximumSaveSlot() const; virtual void removeSaveState(const char *target, int slot) const; @@ -234,6 +275,10 @@ bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD return res; } +// TODO: original 2 gui engine options are not shown for games, that were detected before our change +// because gui-options from the detection-table are saved internally. +// I also can't set those 2 options manually in case they were not set by optionsList[] +#if 0 const ExtraGuiOptions AgiMetaEngine::getExtraGuiOptions(const Common::String &target) const { ExtraGuiOptions options; options.push_back(agiExtraGuiOption); @@ -241,6 +286,7 @@ const ExtraGuiOptions AgiMetaEngine::getExtraGuiOptions(const Common::String &ta options.push_back(agiExtraGuiOptionAmiga); return options; } +#endif SaveStateList AgiMetaEngine::listSaves(const char *target) const { const uint32 AGIflag = MKTAG('A','G','I',':'); |