aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engines/scumm/costume.cpp12
-rw-r--r--engines/scumm/gfx.cpp7
-rw-r--r--engines/scumm/scumm.cpp3
3 files changed, 13 insertions, 9 deletions
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 95bd0b598d..af15257b32 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -837,7 +837,7 @@ void ClassicCostumeRenderer::setPalette(byte *palette) {
if (_loaded._format == 0x57) {
memcpy(_palette, palette, 13);
} else if (_vm->_game.features & GF_OLD_BUNDLE) {
- if ((_vm->getCurrentLights() & LIGHTMODE_actor_color)) {
+ if (_vm->getCurrentLights() & LIGHTMODE_actor_color) {
memcpy(_palette, palette, 16);
} else {
memset(_palette, 8, 16);
@@ -845,7 +845,7 @@ void ClassicCostumeRenderer::setPalette(byte *palette) {
}
_palette[_loaded._palette[0]] = _palette[0];
} else {
- if (_vm->_game.version >= 6 || (_vm->getCurrentLights() & LIGHTMODE_actor_color)) {
+ if (_vm->getCurrentLights() & LIGHTMODE_actor_color) {
for (i = 0; i < _loaded._numColors; i++) {
color = palette[i];
if (color == 255)
@@ -1019,12 +1019,12 @@ byte C64CostumeRenderer::drawLimb(const Actor *a, int limb) {
// Set up the palette data
byte palette[4] = { 0, 0, 0, 0 };
- if (!(_vm->getCurrentLights() & LIGHTMODE_actor_color)) {
- palette[2] = 11;
- palette[3] = 11;
- } else {
+ if (_vm->getCurrentLights() & LIGHTMODE_actor_color) {
palette[1] = 10;
palette[2] = actorColorsMMC64[_actorID];
+ } else {
+ palette[2] = 11;
+ palette[3] = 11;
}
int width = *data++;
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) {
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index 65a60d1686..1eda957bf1 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -2060,8 +2060,7 @@ load_game:
setActorRedrawFlags();
resetActorBgs();
- if (_game.version <= 5 &&
- !(getCurrentLights() & LIGHTMODE_screen) &&
+ if (!(getCurrentLights() & LIGHTMODE_screen) &&
getCurrentLights() & LIGHTMODE_flashlight) {
drawFlashlight();
setActorRedrawFlags();