[Scummvm-git-logs] scummvm master -> f5e9976dac7d3c15b16d38c6c84be1275feb65b8
AndywinXp
noreply at scummvm.org
Sun Feb 8 00:30:37 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:
f5e9976dac SCUMM: HE: Prevent bad palette initializations
Commit: f5e9976dac7d3c15b16d38c6c84be1275feb65b8
https://github.com/scummvm/scummvm/commit/f5e9976dac7d3c15b16d38c6c84be1275feb65b8
Author: AndywinXp (andywinxp at gmail.com)
Date: 2026-02-08T01:30:27+01:00
Commit Message:
SCUMM: HE: Prevent bad palette initializations
This is from the original source code.
This check is missing from earlier SPUTM versions,
but on later games it prevents stray palette initializations
(usually containing 255 values only, i.e. white).
This fixes drawBox calls on FunShop games which
resulted in e.g. a white screen after the HE logo at boot-up.
Changed paths:
engines/scumm/he/palette_he.cpp
diff --git a/engines/scumm/he/palette_he.cpp b/engines/scumm/he/palette_he.cpp
index 5ca49e6fae0..dd0b023e3cc 100644
--- a/engines/scumm/he/palette_he.cpp
+++ b/engines/scumm/he/palette_he.cpp
@@ -261,18 +261,22 @@ void ScummEngine_v99he::setPaletteFromPtr(const byte *ptr, int numcolor) {
g = *ptr++;
b = *ptr++;
- if (i == 15 || !(i > 10 && i < 246) || r < 252 || g < 252 || b < 252) {
- *dest++ = r;
- *dest++ = g;
- *dest++ = b;
-
- if (_game.features & GF_16BIT_COLOR) {
- WRITE_LE_UINT16(_hePalettes + 2048 + i * 2, get16BitColor(r, g, b));
+ if (i != 15 && i > 10 && i < 246 && r >= 252 && g >= 252 && b >= 252) {
+ dest += 3;
+ } else {
+ if (_game.heversion < 80 || ((i == 15) || !(r >= 252 && g >= 252 && b >= 252))) {
+ *dest++ = r;
+ *dest++ = g;
+ *dest++ = b;
+
+ if (_game.features & GF_16BIT_COLOR) {
+ WRITE_LE_UINT16(_hePalettes + 2048 + i * 2, get16BitColor(r, g, b));
+ } else {
+ _hePalettes[1792 + i] = i;
+ }
} else {
- _hePalettes[1792 + i] = i;
+ dest += 3;
}
- } else {
- dest += 3;
}
}
More information about the Scummvm-git-logs
mailing list