diff options
author | Travis Howell | 2004-08-25 02:48:44 +0000 |
---|---|---|
committer | Travis Howell | 2004-08-25 02:48:44 +0000 |
commit | 7aa9f41188560b58fe30f5df4abf0681fba8f848 (patch) | |
tree | b9fbba03b7518c6ad4905cbc44a15103ea42cbd6 | |
parent | 2917071bd616870f3edca551e491a70d18ed3e48 (diff) | |
download | scummvm-rg350-7aa9f41188560b58fe30f5df4abf0681fba8f848.tar.gz scummvm-rg350-7aa9f41188560b58fe30f5df4abf0681fba8f848.tar.bz2 scummvm-rg350-7aa9f41188560b58fe30f5df4abf0681fba8f848.zip |
Another array change for HE 7.2
svn-id: r14737
-rw-r--r-- | scumm/intern.h | 2 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 15 |
2 files changed, 17 insertions, 0 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index 1898a18303..7f24c6db1a 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -665,10 +665,12 @@ public: protected: virtual void setupScummVars(); + virtual void readArrayFromIndexFile(); virtual void setupOpcodes(); virtual void executeOpcode(byte i); virtual const char *getOpcodeDesc(byte i); + ArrayHeader *defineArray(int array, int type, int dim2start, int dim2end, int dim1start, int dim1end); int readArray(int array, int idx2, int idx1); void writeArray(int array, int idx2, int idx1, int value); diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 9dca4b48ce..9e3417d1d1 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -488,6 +488,21 @@ void ScummEngine_v72he::writeArray(int array, int idx2, int idx1, int value) { } } +void ScummEngine_v72he::readArrayFromIndexFile() { + int num; + int a, b, c; + + while ((num = _fileHandle.readUint16LE()) != 0) { + a = _fileHandle.readUint16LE(); + b = _fileHandle.readUint16LE(); + c = _fileHandle.readUint16LE(); + if (c == 1) + defineArray(num, kBitArray, 0, a, 0, b); + else + defineArray(num, kDwordArray, 0, a, 0, b); + } +} + void ScummEngine_v72he::o72_pushDWordVar() { int a; if (*_lastCodePtr + sizeof(MemBlkHeader) != _scriptOrgPointer) { |