[Scummvm-git-logs] scummvm master -> 2989f97c5dfd5cbe501bf8475af8313bf2c8476b
athrxx
noreply at scummvm.org
Wed Jun 10 18:47:43 UTC 2026
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
2989f97c5d SCUMM: (EGA dithering mode) - fix color glitches in DOTT
Commit: 2989f97c5dfd5cbe501bf8475af8313bf2c8476b
https://github.com/scummvm/scummvm/commit/2989f97c5dfd5cbe501bf8475af8313bf2c8476b
Author: athrxx (athrxx at scummvm.org)
Date: 2026-06-10T20:47:02+02:00
Commit Message:
SCUMM: (EGA dithering mode) - fix color glitches in DOTT
- always set VAR_VIDEOMODE to VGA in SCUMM6 games, since the EGA
handling in the room entry and verb scripts is just leftover from MI2 which
wasn't properly updated (since the EGA mode is not supported in original
SCUMM6 games).
- make necessary fix to palette updates in EGA mode
Changed paths:
engines/scumm/palette.cpp
engines/scumm/room.cpp
engines/scumm/vars.cpp
diff --git a/engines/scumm/palette.cpp b/engines/scumm/palette.cpp
index 4c5da8ce304..a3758d7f7df 100644
--- a/engines/scumm/palette.cpp
+++ b/engines/scumm/palette.cpp
@@ -1489,9 +1489,11 @@ void ScummEngine::setCurrentPalette(int palindex) {
// Might be glitchy, though...
const byte *p = getPalettePtr(_curPalIndex, _roomResource);
for (int i = 0; i < 256; ++i) {
- byte col = egaFindBestMatch(p[0], p[1], p[2]);
- _egaColorMap[0][i] = col & 0x0F;
- _egaColorMap[1][i] = col >> 4;
+ if (_game.version < 6 || i == 15 || p[0] < 252 || p[1] < 252 || p[2] < 252) {
+ byte col = egaFindBestMatch(p[0], p[1], p[2]);
+ _egaColorMap[0][i] = col & 0x0F;
+ _egaColorMap[1][i] = col >> 4;
+ }
p += 3;
}
} else {
diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp
index e6a6109ebcc..2b29cdf4df1 100644
--- a/engines/scumm/room.cpp
+++ b/engines/scumm/room.cpp
@@ -630,6 +630,17 @@ void ScummEngine::resetRoomSubBlocks() {
// We need to setup the current palette before initCycl for Indy4 Amiga.
if (_PALS_offs || _CLUT_offs)
setCurrentPalette(0);
+
+ if (_game.id == GID_TENTACLE && VAR(VAR_VIDEOMODE) == 13) {
+ // This is a hack to avoid color glitches caused by incomplete EGA mode handling in the scripts.
+ // The original DOTT interpreter (executable and scripts) has various EGA mode handling leftovers
+ // from SCUMM5 in it, but the mode isn't supported. We always set VAR_VIDEOMODE to VGA setting for
+ // SCUMM6, so this codepath here is currently never executed. But it would be if we (for whatever reason)
+ // decided to change that.
+ const byte *room = getResourceAddress(rtRoom, _roomResource);
+ if (findPalInPals(room + _PALS_offs, 1))
+ setCurrentPalette(1);
+ }
// Color cycling
// HE 7.0 games load resources but don't use them.
diff --git a/engines/scumm/vars.cpp b/engines/scumm/vars.cpp
index e5f31017814..219aab84a56 100644
--- a/engines/scumm/vars.cpp
+++ b/engines/scumm/vars.cpp
@@ -849,7 +849,9 @@ void ScummEngine::setVideoModeVarToCurrentConfig() {
VAR(VAR_VIDEOMODE) = 6;
else if (_renderMode == Common::kRenderHercA || _renderMode == Common::kRenderHercG)
VAR(VAR_VIDEOMODE) = 30;
- else if (_renderMode == Common::kRenderEGA)
+ else if (_renderMode == Common::kRenderEGA && _game.version < 6)
+ // DOTT has leftover handling for VAR_VIDEOMODE in some of its scripts (room entry and verb scripts). But this hasn't been updated to work
+ // correctly, it's really just leftover from MI2. It is easier to prevent graphics glitches by just setting the var to VGA in that case.
VAR(VAR_VIDEOMODE) = 13;
else
VAR(VAR_VIDEOMODE) = 19;
More information about the Scummvm-git-logs
mailing list