From 50d313a547ae1bec050be8d6b64ccc01161da22f Mon Sep 17 00:00:00 2001 From: Paul Gilbert Date: Sat, 16 Jul 2011 15:44:17 +1000 Subject: CGE: Implement monochrome view mode button --- engines/cge/cge_main.cpp | 1 - engines/cge/vga13h.cpp | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'engines') diff --git a/engines/cge/cge_main.cpp b/engines/cge/cge_main.cpp index e518c668f4..b43360c0b5 100644 --- a/engines/cge/cge_main.cpp +++ b/engines/cge/cge_main.cpp @@ -299,7 +299,6 @@ void CGEEngine::setMapBrick(int x, int z) { } } -//static void switchColorMode(); //static void switchDebug(); //static void pullSprite(); //static void NextStep(); diff --git a/engines/cge/vga13h.cpp b/engines/cge/vga13h.cpp index 716a6b584d..a7b9d8c080 100644 --- a/engines/cge/vga13h.cpp +++ b/engines/cge/vga13h.cpp @@ -1128,9 +1128,9 @@ void Vga::setColors(Dac *tab, int lum) { if (_mono) { destP = _newColors; - for (int idx = 0; idx < PAL_CNT; ++idx, ++palP) { + for (int idx = 0; idx < PAL_CNT; ++idx, ++destP) { // Form a greyscalce colour from 30% R, 59% G, 11% B - uint8 intensity = (destP->_r * 77) + (destP->_g * 151) + (destP->_b * 28); + uint8 intensity = (((int)destP->_r * 77) + ((int)destP->_g * 151) + ((int)destP->_b * 28)) >> 8; destP->_r = intensity; destP->_g = intensity; destP->_b = intensity; -- cgit v1.2.3