aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-09-22 00:22:32 +0000
committerTravis Howell2004-09-22 00:22:32 +0000
commitabefac8cd079ef786cdb9218d7bf665cd5df40e0 (patch)
tree2196f5c79b26b96562855388e4c970733849c407
parent6bfeab77e1d38d8f1583f2e5214764dcacf05d4a (diff)
downloadscummvm-rg350-abefac8cd079ef786cdb9218d7bf665cd5df40e0.tar.gz
scummvm-rg350-abefac8cd079ef786cdb9218d7bf665cd5df40e0.tar.bz2
scummvm-rg350-abefac8cd079ef786cdb9218d7bf665cd5df40e0.zip
Add missing cases
svn-id: r15227
-rw-r--r--scumm/intern.h2
-rw-r--r--scumm/script_v6he.cpp2
-rw-r--r--scumm/script_v80he.cpp19
-rw-r--r--scumm/script_v90he.cpp32
4 files changed, 35 insertions, 20 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 37bec5abcb..3f54b7545f 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -799,7 +799,7 @@ protected:
virtual void executeOpcode(byte i);
virtual const char *getOpcodeDesc(byte i);
- void loadImgSpot(int resId, int state, Common::Point &spot);
+ void loadImgSpot(int resId, int state, uint32 &w, uint32 &h);
void loadWizCursor(int resId, int resType, bool state);
/* HE version 80 script opcodes */
diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp
index c4b1a12402..66f2cd5c2e 100644
--- a/scumm/script_v6he.cpp
+++ b/scumm/script_v6he.cpp
@@ -1159,7 +1159,7 @@ void ScummEngine_v60he::localizeArray(int slot, int script) {
if (slot >= _numArray)
error("o60_localizeArray(%d): array slot out of range", slot);
- _arraySlot[slot] = vm.slot[_currentScript].number;
+ _arraySlot[slot] = script;
}
void ScummEngine_v60he::o60_localizeArray() {
diff --git a/scumm/script_v80he.cpp b/scumm/script_v80he.cpp
index 882cc13c6f..e5282e0724 100644
--- a/scumm/script_v80he.cpp
+++ b/scumm/script_v80he.cpp
@@ -559,29 +559,30 @@ void ScummEngine_v80he::o80_cursorCommand() {
VAR(VAR_USERPUT) = _userPut;
}
-void ScummEngine_v80he::loadImgSpot(int resId, int state, Common::Point &spot) {
+void ScummEngine_v80he::loadImgSpot(int resId, int state, uint32 &w, uint32 &h) {
const uint8 *dataPtr = getResourceAddress(rtImage, resId);
if (!dataPtr)
error("loadImgSpot: unknown Image %d", resId);
const uint8 *spotPtr = findWrappedBlock(MKID('SPOT'), dataPtr, state, 0);
- if (!spotPtr) {
- spot.x = spot.y = 0;
+ if (spotPtr) {
+ w = (int16)READ_LE_UINT32(spotPtr + 0);
+ h = (int16)READ_LE_UINT32(spotPtr + 4);
} else {
- spot.x = (int16)READ_LE_UINT32(spotPtr + 0);
- spot.y = (int16)READ_LE_UINT32(spotPtr + 4);
+ w = 0;
+ h = 0;
}
}
void ScummEngine_v80he::loadWizCursor(int resId, int resType, bool state) {
Common::Rect rc;
- Common::Point spot;
+ uint32 w, h;
- loadImgSpot(resId, 0, spot);
+ loadImgSpot(resId, 0, w, h);
- rc.top = spot.x;
- rc.right = spot.y;
+ rc.top = w;
+ rc.right = h;
rc.top = MAX((int)rc.top, 0);
rc.right = MAX((int)rc.right, 0);
diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp
index 487bb8d4c6..eddc7be04a 100644
--- a/scumm/script_v90he.cpp
+++ b/scumm/script_v90he.cpp
@@ -774,40 +774,54 @@ void ScummEngine_v90he::o90_unknown28() {
}
void ScummEngine_v90he::o90_unknown29() {
+ int state, resId;
+ uint32 w, h;
+
int subOp = fetchScriptByte();
subOp -= 30;
switch (subOp) {
case 0:
- pop();
- pop();
+ state = pop();
+ resId = pop();
+ loadImgSpot(resId, state, w, h);
+ push(w);
break;
case 1:
- pop();
- pop();
+ state = pop();
+ resId = pop();
+ loadImgSpot(resId, state, w, h);
+ push(h);
break;
case 2:
- pop();
- pop();
+ state = pop();
+ resId = pop();
+ getWizImageDim(resId, state, w, h);
+ push(w);
break;
case 3:
- pop();
- pop();
+ state = pop();
+ resId = pop();
+ getWizImageDim(resId, state, w, h);
+ push(h);
break;
case 6:
pop();
+ push(0);
break;
case 15:
pop();
pop();
pop();
pop();
+ push(0);
break;
case 36:
pop();
pop();
pop();
pop();
+ push(0);
break;
case 100:
pop();
@@ -816,11 +830,11 @@ void ScummEngine_v90he::o90_unknown29() {
pop();
pop();
pop();
+ push(0);
break;
default:
error("o90_unknown29: Unknown case %d", subOp);
}
- push(0);
debug(1,"o90_unknown29 stub (%d)", subOp);
}