diff options
author | Paul Gilbert | 2015-05-31 14:45:10 -0400 |
---|---|---|
committer | Paul Gilbert | 2015-05-31 14:45:10 -0400 |
commit | e5296ebf8dd09f603499b1894a33865ec71bb28f (patch) | |
tree | d7de032efd54dfdb3159cbc778a0c9ce8cd8aa91 /engines/agi/detection.cpp | |
parent | 673537bad93f0b440172a0cc263ebf19cc95ffc0 (diff) | |
parent | 141ff4d08dc24b6bb17098bd71801e2a58e6a38f (diff) | |
download | scummvm-rg350-e5296ebf8dd09f603499b1894a33865ec71bb28f.tar.gz scummvm-rg350-e5296ebf8dd09f603499b1894a33865ec71bb28f.tar.bz2 scummvm-rg350-e5296ebf8dd09f603499b1894a33865ec71bb28f.zip |
Merge branch 'master' into phantom
Diffstat (limited to 'engines/agi/detection.cpp')
-rw-r--r-- | engines/agi/detection.cpp | 56 |
1 files changed, 37 insertions, 19 deletions
diff --git a/engines/agi/detection.cpp b/engines/agi/detection.cpp index 1d58900056..823ec7be66 100644 --- a/engines/agi/detection.cpp +++ b/engines/agi/detection.cpp @@ -138,15 +138,42 @@ static const PlainGameDescriptor agiGames[] = { {0, 0} }; -static const ExtraGuiOption agiExtraGuiOption = { - _s("Use original save/load screens"), - _s("Use the original save/load screens, instead of the ScummVM ones"), - "originalsaveload", - false -}; - #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("Mouse support"), + _s("Enables mouse support. Allows to use mouse for movement and in game menus."), + "mousesupport", + true + } + }, + + AD_EXTRA_GUI_OPTIONS_TERMINATOR +}; + using namespace Agi; class AgiMetaEngine : public AdvancedMetaEngine { @@ -154,7 +181,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); } @@ -168,7 +195,6 @@ 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 SaveStateList listSaves(const char *target) const; virtual int getMaximumSaveSlot() const; virtual void removeSaveState(const char *target, int slot) const; @@ -227,12 +253,6 @@ bool AgiMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD return res; } -const ExtraGuiOptions AgiMetaEngine::getExtraGuiOptions(const Common::String &target) const { - ExtraGuiOptions options; - options.push_back(agiExtraGuiOption); - return options; -} - SaveStateList AgiMetaEngine::listSaves(const char *target) const { const uint32 AGIflag = MKTAG('A','G','I',':'); Common::SaveFileManager *saveFileMan = g_system->getSavefileManager(); @@ -267,15 +287,13 @@ SaveStateList AgiMetaEngine::listSaves(const char *target) const { int AgiMetaEngine::getMaximumSaveSlot() const { return 999; } void AgiMetaEngine::removeSaveState(const char *target, int slot) const { - char fileName[MAXPATHLEN]; - sprintf(fileName, "%s.%03d", target, slot); + Common::String fileName = Common::String::format("%s.%03d", target, slot); g_system->getSavefileManager()->removeSavefile(fileName); } SaveStateDescriptor AgiMetaEngine::querySaveMetaInfos(const char *target, int slot) const { const uint32 AGIflag = MKTAG('A','G','I',':'); - char fileName[MAXPATHLEN]; - sprintf(fileName, "%s.%03d", target, slot); + Common::String fileName = Common::String::format("%s.%03d", target, slot); Common::InSaveFile *in = g_system->getSavefileManager()->openForLoading(fileName); |