aboutsummaryrefslogtreecommitdiff
path: root/scumm/script_v72he.cpp
diff options
context:
space:
mode:
authorTravis Howell2005-05-21 14:20:28 +0000
committerTravis Howell2005-05-21 14:20:28 +0000
commit2b2c6a404f840096d977e20c1b48d307770c783e (patch)
tree83e72462adcb0ee932663b49f548f0ef6ae749d6 /scumm/script_v72he.cpp
parent31974eaead154ae6637b5655d5a5eb573ce342e2 (diff)
downloadscummvm-rg350-2b2c6a404f840096d977e20c1b48d307770c783e.tar.gz
scummvm-rg350-2b2c6a404f840096d977e20c1b48d307770c783e.tar.bz2
scummvm-rg350-2b2c6a404f840096d977e20c1b48d307770c783e.zip
Add HE73 version for opcode difference.
svn-id: r18207
Diffstat (limited to 'scumm/script_v72he.cpp')
-rw-r--r--scumm/script_v72he.cpp35
1 files changed, 34 insertions, 1 deletions
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index 90ee366eec..e74913edc4 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -2215,8 +2215,41 @@ void ScummEngine_v72he::o72_writeINI() {
}
void ScummEngine_v72he::o72_getResourceSize() {
+ const byte *ptr;
+ int size, type;
+
int resid = pop();
- push(getSoundResourceSize(resid));
+ if (_heversion == 72) {
+ push(getSoundResourceSize(resid));
+ return;
+ }
+
+ byte subOp = fetchScriptByte();
+
+ switch (subOp) {
+ case 13:
+ push (getSoundResourceSize(resid));
+ return;
+ case 14:
+ type = rtRoomImage;
+ break;
+ case 15:
+ type = rtImage;
+ break;
+ case 16:
+ type = rtCostume;
+ break;
+ case 17:
+ type = rtScript;
+ break;
+ default:
+ error("o80_getResourceSize: default type %d", subOp);
+ }
+
+ ptr = getResourceAddress(type, resid);
+ assert(ptr);
+ size = READ_BE_UINT32(ptr + 4) - 8;
+ push(size);
}
void ScummEngine_v72he::o72_setFilePath() {