CGE: Add an option to toggle color blind mode from the launcher
This commit is contained in:
parent
aaf9ebfd68
commit
12e9c31f41
3 changed files with 41 additions and 16 deletions
2
NEWS
2
NEWS
|
@ -20,6 +20,8 @@ For a more comprehensive changelog of the latest experimental code, see:
|
||||||
Broken Sword 2:
|
Broken Sword 2:
|
||||||
- Added back support for MPEG-2 videos.
|
- Added back support for MPEG-2 videos.
|
||||||
|
|
||||||
|
CGE:
|
||||||
|
- Added an option to enable Color Blind deom the ScummVM GUI.
|
||||||
Gob:
|
Gob:
|
||||||
- Improved video quality in Urban Runner.
|
- Improved video quality in Urban Runner.
|
||||||
|
|
||||||
|
|
|
@ -24,10 +24,22 @@
|
||||||
#include "engines/advancedDetector.h"
|
#include "engines/advancedDetector.h"
|
||||||
#include "common/savefile.h"
|
#include "common/savefile.h"
|
||||||
#include "common/system.h"
|
#include "common/system.h"
|
||||||
|
#include "common/translation.h"
|
||||||
#include "base/plugins.h"
|
#include "base/plugins.h"
|
||||||
#include "graphics/thumbnail.h"
|
#include "graphics/thumbnail.h"
|
||||||
#include "cge/cge.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[] = {
|
static const PlainGameDescriptor CGEGames[] = {
|
||||||
{ "soltys", "Soltys" },
|
{ "soltys", "Soltys" },
|
||||||
{ "sfinx", "Sfinx" },
|
{ "sfinx", "Sfinx" },
|
||||||
|
@ -36,11 +48,6 @@ static const PlainGameDescriptor CGEGames[] = {
|
||||||
|
|
||||||
namespace CGE {
|
namespace CGE {
|
||||||
|
|
||||||
struct CgeGameDescription {
|
|
||||||
ADGameDescription desc;
|
|
||||||
GameType gameType;
|
|
||||||
};
|
|
||||||
|
|
||||||
static const CgeGameDescription gameDescriptions[] = {
|
static const CgeGameDescription gameDescriptions[] = {
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -63,7 +70,7 @@ static const CgeGameDescription gameDescriptions[] = {
|
||||||
{"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437676},
|
{"vol.dat", 0, "f9ae2e7f8f7cac91378cdafca43faf1e", 8437676},
|
||||||
AD_LISTEND
|
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
|
kGameTypeSoltys
|
||||||
},
|
},
|
||||||
|
@ -75,7 +82,7 @@ static const CgeGameDescription gameDescriptions[] = {
|
||||||
{"vol.dat", 0, "75d385a6074c58b69f7730481f256051", 1796710},
|
{"vol.dat", 0, "75d385a6074c58b69f7730481f256051", 1796710},
|
||||||
AD_LISTEND
|
AD_LISTEND
|
||||||
},
|
},
|
||||||
Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO , GUIO0()
|
Common::EN_ANY, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
|
||||||
},
|
},
|
||||||
kGameTypeSoltys
|
kGameTypeSoltys
|
||||||
},
|
},
|
||||||
|
@ -87,7 +94,7 @@ static const CgeGameDescription gameDescriptions[] = {
|
||||||
{"vol.dat", 0, "c5d9b15863cab61dc125551576dece04", 1075272},
|
{"vol.dat", 0, "c5d9b15863cab61dc125551576dece04", 1075272},
|
||||||
AD_LISTEND
|
AD_LISTEND
|
||||||
},
|
},
|
||||||
Common::PL_POL, Common::kPlatformDOS, ADGF_DEMO , GUIO0()
|
Common::PL_POL, Common::kPlatformDOS, ADGF_DEMO , GUIO1(GAMEOPTION_COLOR_BLIND_DEFAULT_OFF)
|
||||||
},
|
},
|
||||||
kGameTypeSoltys
|
kGameTypeSoltys
|
||||||
},
|
},
|
||||||
|
@ -99,7 +106,7 @@ static const CgeGameDescription gameDescriptions[] = {
|
||||||
{"vol.dat", 0, "4ffeff4abc99ac5999b55ccfc56ab1df", 8430868},
|
{"vol.dat", 0, "4ffeff4abc99ac5999b55ccfc56ab1df", 8430868},
|
||||||
AD_LISTEND
|
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
|
kGameTypeSoltys
|
||||||
},
|
},
|
||||||
|
@ -111,7 +118,7 @@ static const CgeGameDescription gameDescriptions[] = {
|
||||||
{"vol.dat", 0, "0e43331c846094d77f5dd201827e0a3b", 8439339},
|
{"vol.dat", 0, "0e43331c846094d77f5dd201827e0a3b", 8439339},
|
||||||
AD_LISTEND
|
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
|
kGameTypeSoltys
|
||||||
},
|
},
|
||||||
|
@ -123,7 +130,7 @@ static const CgeGameDescription gameDescriptions[] = {
|
||||||
{"vol.dat", 0, "ff10d54acc2c95696c57e05819b6906f", 8450151},
|
{"vol.dat", 0, "ff10d54acc2c95696c57e05819b6906f", 8450151},
|
||||||
AD_LISTEND
|
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
|
kGameTypeSoltys
|
||||||
},
|
},
|
||||||
|
@ -136,7 +143,7 @@ static const CgeGameDescription gameDescriptions[] = {
|
||||||
{"vol.dat", 0, "de14291869a8eb7c2732ab783c7542ef", 34180844},
|
{"vol.dat", 0, "de14291869a8eb7c2732ab783c7542ef", 34180844},
|
||||||
AD_LISTEND
|
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
|
kGameTypeSfinx
|
||||||
},
|
},
|
||||||
|
@ -148,12 +155,25 @@ static const ADFileBasedFallback fileBasedFallback[] = {
|
||||||
{ &gameDescriptions[0].desc, { "vol.cat", "vol.dat", 0 } },
|
{ &gameDescriptions[0].desc, { "vol.cat", "vol.dat", 0 } },
|
||||||
{ 0, { 0 } }
|
{ 0, { 0 } }
|
||||||
};
|
};
|
||||||
|
|
||||||
} // End of namespace CGE
|
} // 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 {
|
class CGEMetaEngine : public AdvancedMetaEngine {
|
||||||
public:
|
public:
|
||||||
CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(CGE::CgeGameDescription), CGEGames) {
|
CGEMetaEngine() : AdvancedMetaEngine(CGE::gameDescriptions, sizeof(CGE::CgeGameDescription), CGEGames, optionsList) {
|
||||||
_singleid = "soltys";
|
_singleid = "soltys";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,8 +189,6 @@ public:
|
||||||
return "Soltys (c) 1994-1996 L.K. Avalon";
|
return "Soltys (c) 1994-1996 L.K. Avalon";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
virtual bool hasFeature(MetaEngineFeature f) const;
|
virtual bool hasFeature(MetaEngineFeature f) const;
|
||||||
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
|
virtual bool createInstance(OSystem *syst, Engine **engine, const ADGameDescription *desc) const;
|
||||||
virtual int getMaximumSaveSlot() const;
|
virtual int getMaximumSaveSlot() const;
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "common/array.h"
|
#include "common/array.h"
|
||||||
|
#include "common/config-manager.h"
|
||||||
#include "common/rect.h"
|
#include "common/rect.h"
|
||||||
#include "graphics/palette.h"
|
#include "graphics/palette.h"
|
||||||
#include "cge/general.h"
|
#include "cge/general.h"
|
||||||
|
@ -637,6 +638,10 @@ Vga::Vga(CGEEngine *vm) : _frmCnt(0), _msg(NULL), _name(NULL), _setPal(false), _
|
||||||
_page[idx]->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
|
_page[idx]->create(320, 200, Graphics::PixelFormat::createFormatCLUT8());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (ConfMan.getBool("enable_color_blind"))
|
||||||
|
_mono = 1;
|
||||||
|
|
||||||
|
|
||||||
_oldColors = (Dac *)malloc(sizeof(Dac) * kPalCount);
|
_oldColors = (Dac *)malloc(sizeof(Dac) * kPalCount);
|
||||||
_newColors = (Dac *)malloc(sizeof(Dac) * kPalCount);
|
_newColors = (Dac *)malloc(sizeof(Dac) * kPalCount);
|
||||||
getColors(_oldColors);
|
getColors(_oldColors);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue