diff options
author | Kamil Zbrog | 2014-03-29 22:13:07 +0100 |
---|---|---|
committer | Kamil Zbrog | 2014-03-29 22:13:07 +0100 |
commit | 5ffa58dba7a941249af9ca8c1bd229c310fb296b (patch) | |
tree | 49faae8eb3424c32d890b4d3cd1eefeb11fc3cd9 /engines/cge/detection.cpp | |
parent | 8eac80cfc59c34299899ebe18a3b0582ef76e0d2 (diff) | |
parent | 620411bfebe72fb0f60c4d8f64558be088cff58d (diff) | |
download | scummvm-rg350-5ffa58dba7a941249af9ca8c1bd229c310fb296b.tar.gz scummvm-rg350-5ffa58dba7a941249af9ca8c1bd229c310fb296b.tar.bz2 scummvm-rg350-5ffa58dba7a941249af9ca8c1bd229c310fb296b.zip |
Merge remote-tracking branch 'sync/master' into prince-malik
Diffstat (limited to 'engines/cge/detection.cpp')
-rw-r--r-- | engines/cge/detection.cpp | 61 |
1 files changed, 39 insertions, 22 deletions
diff --git a/engines/cge/detection.cpp b/engines/cge/detection.cpp index c377970c51..4c2f81c1ae 100644 --- a/engines/cge/detection.cpp +++ b/engines/cge/detection.cpp @@ -8,12 +8,12 @@ * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * 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, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. @@ -24,10 +24,22 @@ #include "engines/advancedDetector.h" #include "common/savefile.h" #include "common/system.h" +#include "common/translation.h" #include "base/plugins.h" #include "graphics/thumbnail.h" #include "cge/cge.h" +namespace CGE { + +struct CgeGameDescription { + ADGameDescription desc; + GameType gameType; +}; + +#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF GUIO_GAMEOPTIONS1 + +} // End of namespace CGE + static const PlainGameDescriptor CGEGames[] = { { "soltys", "Soltys" }, { "sfinx", "Sfinx" }, @@ -36,11 +48,6 @@ static const PlainGameDescriptor CGEGames[] = { namespace CGE { -struct CgeGameDescription { - ADGameDescription desc; - GameType gameType; -}; - static const CgeGameDescription gameDescriptions[] = { { @@ -63,7 +70,7 @@ static const CgeGameDescription gameDescriptions[] = { {"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437676}, AD_LISTEND }, - Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0() + Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF) }, kGameTypeSoltys }, @@ -75,7 +82,7 @@ static const CgeGameDescription gameDescriptions[] = { {"vol.dat", 0, "75d385a6074c58b69f7730481f256051", 1796710}, AD_LISTEND }, - Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO , GUIO0() + Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF) }, kGameTypeSoltys }, @@ -87,7 +94,7 @@ static const CgeGameDescription gameDescriptions[] = { {"vol.dat", 0, "c5d9b15863cab61dc125551576dece04", 1075272}, AD_LISTEND }, - Common::PL_POL, Common::kPlatformDOS, ADGF_DEMO , GUIO0() + Common::PL_POL, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF) }, kGameTypeSoltys }, @@ -99,7 +106,7 @@ static const CgeGameDescription gameDescriptions[] = { {"vol.dat", 0, "4ffeff4abc99ac5999b55ccfc56ab1df", 8430868}, AD_LISTEND }, - Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO0() + Common::EN_ANY, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF) }, kGameTypeSoltys }, @@ -111,7 +118,7 @@ static const CgeGameDescription gameDescriptions[] = { {"vol.dat", 0, "0e43331c846094d77f5dd201827e0a3b", 8439339}, AD_LISTEND }, - Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0() + Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF) }, kGameTypeSoltys }, @@ -123,7 +130,7 @@ static const CgeGameDescription gameDescriptions[] = { {"vol.dat", 0, "ff10d54acc2c95696c57e05819b6906f", 8450151}, AD_LISTEND }, - Common::ES_ESP, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO0() + Common::ES_ESP, Common::kPlatformDOS, ADGF_NO_FLAGS , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF) }, kGameTypeSoltys }, @@ -136,7 +143,7 @@ static const CgeGameDescription gameDescriptions[] = { {"vol.dat", 0, "de14291869a8eb7c2732ab783c7542ef", 34180844}, AD_LISTEND }, - Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO0() + Common::PL_POL, Common::kPlatformDOS, ADGF_NO_FLAGS, GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF) }, kGameTypeSfinx }, @@ -148,12 +155,25 @@ static const ADFileBasedFallback fileBasedFallback[] = { { &gameDescriptions[0].desc, { "vol.cat", "vol.dat", 0 } }, { 0, { 0 } } }; - } // End of 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 + } + }, + + AD_EXTRA_GUI_OPTIONS_TERMINATOR +}; + class CGEMetaEngine : public AdvancedMetaEngine { public: - CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(CGE::CgeGameDescription), CGEGames) { + CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(CGE::CgeGameDescription), CGEGames, optionsList) { _singleid = "soltys"; } @@ -169,8 +189,6 @@ public: return "Soltys (c) 1994-1996 L.K. Avalon"; } - - virtual bool hasFeature(MetaEngineFeature f) const; virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const; virtual int getMaximumSaveSlot() const; @@ -208,10 +226,9 @@ SaveStateList CGEMetaEngine::listSaves(const char *target) const { sort(filenames.begin(), filenames.end()); // Sort (hopefully ensuring we are sorted numerically..) SaveStateList saveList; - int slotNum = 0; for (Common::StringArray::const_iterator filename = filenames.begin(); filename != filenames.end(); ++filename) { // Obtain the last 3 digits of the filename, since they correspond to the save slot - slotNum = atoi(filename->c_str() + filename->size() - 3); + int slotNum = atoi(filename->c_str() + filename->size() - 3); if (slotNum >= 0 && slotNum <= 99) { @@ -291,7 +308,7 @@ bool CGEMetaEngine::createInstance(OSystem *syst, Engine **engine, const ADGameD } #if PLUGIN_ENABLED_DYNAMIC(CGE) -REGISTER_PLUGIN_DYNAMIC(CGE, PLUGIN_TYPE_ENGINE, CGEMetaEngine); + REGISTER_PLUGIN_DYNAMIC(CGE, PLUGIN_TYPE_ENGINE, CGEMetaEngine); #else -REGISTER_PLUGIN_STATIC(CGE, PLUGIN_TYPE_ENGINE, CGEMetaEngine); + REGISTER_PLUGIN_STATIC(CGE, PLUGIN_TYPE_ENGINE, CGEMetaEngine); #endif |