HE 7.2 uses different size in this opcode alone

svn-id: r14732
This commit is contained in:
Travis Howell 2004-08-24 16:02:26 +00:00
parent 35a354bab7
commit 531b570394
2 changed files with 13 additions and 1 deletions

View File

@ -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();

View File

@ -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;