diff options
author | uruk | 2014-07-09 11:55:27 +0200 |
---|---|---|
committer | uruk | 2014-07-09 11:55:27 +0200 |
commit | 8f869c74c09858dd3fd553c30ca645d942b4cdb0 (patch) | |
tree | 0128f7b162f7ea67ec0377ac262d9f7a548df19d /engines/cge2 | |
parent | c1bda3c973cda3c3d7ed73aac8ca8be7ce6f0bc8 (diff) | |
download | scummvm-rg350-8f869c74c09858dd3fd553c30ca645d942b4cdb0.tar.gz scummvm-rg350-8f869c74c09858dd3fd553c30ca645d942b4cdb0.tar.bz2 scummvm-rg350-8f869c74c09858dd3fd553c30ca645d942b4cdb0.zip |
CGE2: Add option for enabling color blind mode from the Launcher.
Diffstat (limited to 'engines/cge2')
-rw-r--r-- | engines/cge2/detection.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/detection.h | 21 | ||||
-rw-r--r-- | engines/cge2/vga13h.cpp | 6 |
3 files changed, 22 insertions, 7 deletions
diff --git a/engines/cge2/detection.cpp b/engines/cge2/detection.cpp index 6d4f6339d9..5fcbe2ed7a 100644 --- a/engines/cge2/detection.cpp +++ b/engines/cge2/detection.cpp @@ -64,7 +64,7 @@ const ADGameDescription *CGE2MetaEngine::fallbackDetect(const FileMap &allFiles, desc.language = Common::EN_ANY; desc.platform = Common::kPlatformDOS; desc.flags = ADGF_NO_FLAGS; - desc.guioptions = GUIO0(); + desc.guioptions = GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF); return (const ADGameDescription *)&desc; } diff --git a/engines/cge2/detection.h b/engines/cge2/detection.h index 556980774a..51e2988c86 100644 --- a/engines/cge2/detection.h +++ b/engines/cge2/detection.h @@ -30,9 +30,12 @@ #include "cge2/cge2.h" #include "engines/advancedDetector.h" +#include "common/translation.h" namespace CGE2 { +#define GAMEOPTION_COLOR_BLIND_DEFAULT_OFF GUIO_GAMEOPTIONS1 + static const PlainGameDescriptor CGE2Games[] = { { "sfinx", "Sfinx" }, { 0, 0 } @@ -46,14 +49,28 @@ static const ADGameDescription 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) }, 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 + } + }, + + AD_EXTRA_GUI_OPTIONS_TERMINATOR +}; + class CGE2MetaEngine : public AdvancedMetaEngine { public: - CGE2MetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), CGE2Games) { + CGE2MetaEngine() : AdvancedMetaEngine(gameDescriptions, sizeof(ADGameDescription), CGE2Games, optionsList) { _singleid = "sfinx"; } diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index 069c2672ae..10c6bbd5a4 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -840,10 +840,8 @@ Vga::Vga(CGE2Engine *vm) : _frmCnt(0), _msg(nullptr), _name(nullptr), _setPal(fa _page[idx]->create(kScrWidth, kScrHeight, Graphics::PixelFormat::createFormatCLUT8()); } - /*if (ConfMan.getBool("enable_color_blind")) - _mono = 1;*/ - - warning("STUB: Vga::Vga()"); + if (ConfMan.getBool("enable_color_blind")) + _mono = 1; _oldColors = (Dac *)malloc(sizeof(Dac) * kPalCount); _newColors = (Dac *)malloc(sizeof(Dac) * kPalCount); |