aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm/he/script_v90he.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/scumm/he/script_v90he.cpp')
-rw-r--r--engines/scumm/he/script_v90he.cpp40
1 files changed, 26 insertions, 14 deletions
diff --git a/engines/scumm/he/script_v90he.cpp b/engines/scumm/he/script_v90he.cpp
index be20a229f0..e302af1144 100644
--- a/engines/scumm/he/script_v90he.cpp
+++ b/engines/scumm/he/script_v90he.cpp
@@ -1255,7 +1255,7 @@ void ScummEngine_v90he::o90_setSpriteGroupInfo() {
void ScummEngine_v90he::o90_getWizData() {
byte filename[4096];
- int state, resId;
+ int resId, state, type;
int32 w, h;
int32 x, y;
@@ -1319,9 +1319,10 @@ void ScummEngine_v90he::o90_getWizData() {
push(computeWizHistogram(resId, state, x, y, w, h));
break;
case 139:
- pop();
- pop();
- push(0);
+ type = pop();
+ state = pop();
+ resId = pop();
+ push(_wiz->getWizImageData(resId, state, type));
break;
case 141:
pop();
@@ -2101,7 +2102,8 @@ void ScummEngine_v90he::o90_getObjectData() {
}
void ScummEngine_v90he::o90_getPaletteData() {
- int b, c, d, e;
+ int c, d, e;
+ int r, g, b;
int palSlot, color;
byte subOp = fetchScriptByte();
@@ -2111,10 +2113,10 @@ void ScummEngine_v90he::o90_getPaletteData() {
e = pop();
d = pop();
palSlot = pop();
- pop();
- c = pop();
b = pop();
- push(getHEPaletteSimilarColor(palSlot, b, c, d, e));
+ g = pop();
+ r = pop();
+ push(getHEPaletteSimilarColor(palSlot, r, g, d, e));
break;
case 52:
c = pop();
@@ -2130,17 +2132,27 @@ void ScummEngine_v90he::o90_getPaletteData() {
case 132:
c = pop();
b = pop();
- push(getHEPaletteColorComponent(1, b, c));
+ if (_game.features & GF_16BIT_COLOR)
+ push(getHEPalette16BitColorComponent(b, c));
+ else
+ push(getHEPaletteColorComponent(1, b, c));
break;
case 217:
- pop();
- c = pop();
- c = MAX(0, c);
- c = MIN(c, 255);
b = pop();
b = MAX(0, b);
b = MIN(b, 255);
- push(getHEPaletteSimilarColor(1, b, c, 10, 245));
+ g = pop();
+ g = MAX(0, g);
+ g = MIN(g, 255);
+ r = pop();
+ r = MAX(0, r);
+ r = MIN(r, 255);
+
+ if (_game.features & GF_16BIT_COLOR) {
+ push(get16BitColor(r, g, b));
+ } else {
+ push(getHEPaletteSimilarColor(1, r, g, 10, 245));
+ }
break;
default:
error("o90_getPaletteData: Unknown case %d", subOp);