diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/cge2/toolbar.cpp | 2 | ||||
-rw-r--r-- | engines/cge2/vga13h.cpp | 7 | ||||
-rw-r--r-- | engines/cge2/vga13h.h | 2 |
3 files changed, 5 insertions, 6 deletions
diff --git a/engines/cge2/toolbar.cpp b/engines/cge2/toolbar.cpp index e595074435..2604a2fee7 100644 --- a/engines/cge2/toolbar.cpp +++ b/engines/cge2/toolbar.cpp @@ -88,6 +88,8 @@ void CGE2Engine::optionTouch(int opt, uint16 mask) { void CGE2Engine::switchColorMode() { _commandHandlerTurbo->addCommand(kCmdSeq, 121, _vga->_mono = !_vga->_mono, nullptr); + ConfMan.setBool("enable_color_blind", _vga->_mono); + ConfMan.flushToDisk(); keyClick(); _vga->setColors(_vga->_sysPal, 64); } diff --git a/engines/cge2/vga13h.cpp b/engines/cge2/vga13h.cpp index 4e43e9e9d8..c850db288b 100644 --- a/engines/cge2/vga13h.cpp +++ b/engines/cge2/vga13h.cpp @@ -826,7 +826,7 @@ bool Queue::locate(Sprite *spr) { return false; } -Vga::Vga(CGE2Engine *vm) : _frmCnt(0), _msg(nullptr), _name(nullptr), _setPal(false), _mono(0), _vm(vm) { +Vga::Vga(CGE2Engine *vm) : _frmCnt(0), _msg(nullptr), _name(nullptr), _setPal(false), _vm(vm) { _oldColors = nullptr; _newColors = nullptr; _showQ = new Queue(true); @@ -837,8 +837,7 @@ 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; + _mono = ConfMan.getBool("enable_color_blind"); _oldColors = (Dac *)malloc(sizeof(Dac) * kPalCount); _newColors = (Dac *)malloc(sizeof(Dac) * kPalCount); @@ -849,8 +848,6 @@ Vga::Vga(CGE2Engine *vm) : _frmCnt(0), _msg(nullptr), _name(nullptr), _setPal(fa } Vga::~Vga() { - _mono = 0; - Common::String buffer = ""; free(_oldColors); diff --git a/engines/cge2/vga13h.h b/engines/cge2/vga13h.h index 77bece6884..d98402e3e5 100644 --- a/engines/cge2/vga13h.h +++ b/engines/cge2/vga13h.h @@ -318,7 +318,7 @@ class Vga { public: uint32 _frmCnt; Queue *_showQ; - int _mono; + bool _mono; Graphics::Surface *_page[4]; Dac *_sysPal; |