diff options
-rw-r--r-- | scumm/palette_he.cpp | 1 | ||||
-rw-r--r-- | scumm/script_v100he.cpp | 37 |
2 files changed, 21 insertions, 17 deletions
diff --git a/scumm/palette_he.cpp b/scumm/palette_he.cpp index 4999e0891a..e7a8d1886b 100644 --- a/scumm/palette_he.cpp +++ b/scumm/palette_he.cpp @@ -138,7 +138,6 @@ int ScummEngine_v90he::getPaletteUnk2(int palSlot, int unk1, int unk2) { return _hePalettes[palSlot * 1024 + unk1 * 3 + unk2 / 3]; } - int ScummEngine_v90he::getHEPaletteColor(int palSlot, int color) { assert(palSlot >= 1 && palSlot <= _numPalettes); assert(color >= 1 && color <= 255); diff --git a/scumm/script_v100he.cpp b/scumm/script_v100he.cpp index 2cd8136c85..6910e1b905 100644 --- a/scumm/script_v100he.cpp +++ b/scumm/script_v100he.cpp @@ -2388,15 +2388,16 @@ void ScummEngine_v100he::o100_getWizData() { } void ScummEngine_v100he::o100_getPaletteData() { + int b, c, d, e; int palSlot, color; byte subOp = fetchScriptByte(); switch (subOp) { case 13: - pop(); - pop(); - push(0); + c = pop(); + b = pop(); + push(getPaletteUnk2(1, b, c)); break; case 20: color = pop(); @@ -2404,25 +2405,29 @@ void ScummEngine_v100he::o100_getPaletteData() { push(getHEPaletteColor(palSlot, color)); break; case 33: + e = pop(); + d = pop(); + palSlot = pop(); pop(); - pop(); - pop(); - pop(); - pop(); - pop(); - push(0); + c = pop(); + b = pop(); + push(getPaletteUnk1(palSlot, b, c, d, e)); break; case 53: pop(); - pop(); - pop(); - push(0); + c = pop(); + c = MAX(0, c); + c = MIN(c, 255); + b = pop(); + b = MAX(0, b); + b = MIN(b, 255); + push(getPaletteUnk1(1, b, c, 10, 245)); break; case 73: - pop(); - pop(); - pop(); - push(0); + c = pop(); + b = pop(); + palSlot = pop(); + push(getPaletteUnk2(palSlot, b, c)); break; default: error("o100_getPaletteData: Unknown case %d", subOp); |