diff options
author | Eugene Sandulenko | 2004-02-14 14:48:14 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-02-14 14:48:14 +0000 |
commit | d766470e343d08f0e37e8662a30a152e3e6fc3a7 (patch) | |
tree | f8e745a578d8e901c693162bc45fe321a62986ed | |
parent | d51f4c3b468c2b73e5d2da34c7268b78cbd18533 (diff) | |
download | scummvm-rg350-d766470e343d08f0e37e8662a30a152e3e6fc3a7.tar.gz scummvm-rg350-d766470e343d08f0e37e8662a30a152e3e6fc3a7.tar.bz2 scummvm-rg350-d766470e343d08f0e37e8662a30a152e3e6fc3a7.zip |
Implementation of o6_unknownE4
svn-id: r12884
-rw-r--r-- | scumm/script_v6.cpp | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 7ac2d84c7d..530fcd8950 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -3113,7 +3113,37 @@ void ScummEngine_v6::o6_unknownE1() { } void ScummEngine_v6::o6_unknownE4() { - warning("o6_unknownE4(%d) stub", pop()); + int arg = pop(); + const byte *room = getResourceAddress(rtRoom, _roomResource); + const byte *boxd = room; + const byte *boxm = room; + int32 dboxSize, mboxSize; + + for (int i = 0; i < arg; i++) + boxd = findResource(MKID('BOXD'), boxd); + + if (!boxd) + error("ScummEngine_v6::o6_unknownE4: Can't find boxes for set %d", arg); + + dboxSize = READ_BE_UINT32(boxd + 4); + byte *matrix = createResource(rtMatrix, 2, dboxSize); + + assert(matrix); + memcpy(matrix, boxd, dboxSize); + + for (int i = 0; i < arg; i++) + boxm = findResource(MKID('BOXM'), boxm); + + if (!boxm) + error("ScummEngine_v6::o6_unknownE4: Can't find boxes for set %d", arg); + + mboxSize = READ_BE_UINT32(boxd + 4); + matrix = createResource(rtMatrix, 1, mboxSize); + + assert(matrix); + memcpy(matrix, boxm, mboxSize); + + showActors(); } void ScummEngine_v6::decodeParseString(int m, int n) { |