aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Howell2004-08-24 16:02:26 +0000
committerTravis Howell2004-08-24 16:02:26 +0000
commit531b570394f506becb9d9aa85e3957f3da913b4c (patch)
tree756e8dbda265661acebd476bf204104445f77ac6
parent35a354bab7316fad0638533b35b487d35212c68f (diff)
downloadscummvm-rg350-531b570394f506becb9d9aa85e3957f3da913b4c.tar.gz
scummvm-rg350-531b570394f506becb9d9aa85e3957f3da913b4c.tar.bz2
scummvm-rg350-531b570394f506becb9d9aa85e3957f3da913b4c.zip
HE 7.2 uses different size in this opcode alone
svn-id: r14732
-rw-r--r--scumm/intern.h1
-rw-r--r--scumm/script_v72he.cpp13
2 files changed, 13 insertions, 1 deletions
diff --git a/scumm/intern.h b/scumm/intern.h
index 9e50aa44b5..05dc3e1826 100644
--- a/scumm/intern.h
+++ b/scumm/intern.h
@@ -654,6 +654,7 @@ protected:
virtual const char *getOpcodeDesc(byte i);
/* Version 7 script opcodes */
+ void o72_pushDWordVar();
void o72_getString();
void o72_compareStackList();
void o72_objectX();
diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp
index b29000f304..a401bb2242 100644
--- a/scumm/script_v72he.cpp
+++ b/scumm/script_v72he.cpp
@@ -48,7 +48,7 @@ void ScummEngine_v72he::setupOpcodes() {
/* 00 */
OPCODE(o6_pushByte),
OPCODE(o6_pushWord),
- OPCODE(o6_pushByteVar),
+ OPCODE(o72_pushDWordVar),
OPCODE(o6_pushWordVar),
/* 04 */
OPCODE(o72_getString),
@@ -379,6 +379,17 @@ const char *ScummEngine_v72he::getOpcodeDesc(byte i) {
return _opcodesV72he[i].desc;
}
+void ScummEngine_v72he::o72_pushDWordVar() {
+ int a;
+ if (*_lastCodePtr + sizeof(MemBlkHeader) != _scriptOrgPointer) {
+ uint32 oldoffs = _scriptPointer - _scriptOrgPointer;
+ getScriptBaseAddress();
+ _scriptPointer = _scriptOrgPointer + oldoffs;
+ }
+ a = READ_LE_UINT32(_scriptPointer);
+ _scriptPointer += 4;
+ push(a);
+}
void ScummEngine_v72he::o72_getString() {
int len;