aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/gfx.cpp
diff options
context:
space:
mode:
authorMax Horn2006-03-14 13:36:13 +0000
committerMax Horn2006-03-14 13:36:13 +0000
commitee087df293e0b5e15288fd5374790970df890089 (patch)
treed85ae41143d84cea245b09e68d4b27387b67833c /engines/scumm/gfx.cpp
parentab1694aef99c850b85f833413bd2c70cf732b664 (diff)
downloadscummvm-rg350-ee087df293e0b5e15288fd5374790970df890089.tar.gz
scummvm-rg350-ee087df293e0b5e15288fd5374790970df890089.tar.bz2
scummvm-rg350-ee087df293e0b5e15288fd5374790970df890089.zip
Enhance the new getCurrentLights to work for V6+ games, too, making it possible to remove several special cases throughout the code
svn-id: r21286
Diffstat (limited to 'engines/scumm/gfx.cpp')
-rw-r--r--engines/scumm/gfx.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index 4fbbe66f8a..37affec485 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -1172,15 +1172,20 @@ void ScummEngine::drawFlashlight() {
// C64 Maniac doesn't have a ScummVar for VAR_CURRENT_LIGHTS, and just uses
// an internal variable. Emulate this to prevent overwriting script vars...
+// And V6 games do not use the "lights" at all. There, the whole screen is
+// always visible, and actors are always colored, so we fake the correct
+// light value for it.
int ScummEngine::getCurrentLights() const {
if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformC64)
return _currentLights;
+ else if (_game.version >= 6)
+ return LIGHTMODE_screen | LIGHTMODE_actor_color;
else
return VAR(VAR_CURRENT_LIGHTS);
}
bool ScummEngine::isLightOn() const {
- return (_game.version >= 6) || (getCurrentLights() & LIGHTMODE_screen);
+ return (getCurrentLights() & LIGHTMODE_screen);
}
void ScummEngine::setShake(int mode) {