aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2011-07-16 15:44:17 +1000
committerPaul Gilbert2011-07-16 15:44:17 +1000
commit50d313a547ae1bec050be8d6b64ccc01161da22f (patch)
tree18e012a916eb8c37ebc4b689020e325554f13daf /engines
parentb957eda759c060048ca2c1d371105c64776d1207 (diff)
downloadscummvm-rg350-50d313a547ae1bec050be8d6b64ccc01161da22f.tar.gz
scummvm-rg350-50d313a547ae1bec050be8d6b64ccc01161da22f.tar.bz2
scummvm-rg350-50d313a547ae1bec050be8d6b64ccc01161da22f.zip
CGE: Implement monochrome view mode button
Diffstat (limited to 'engines')
-rw-r--r--engines/cge/cge_main.cpp1
-rw-r--r--engines/cge/vga13h.cpp4
2 files changed, 2 insertions, 3 deletions
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;