diff options
author | Eugene Sandulenko | 2004-02-14 16:09:07 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2004-02-14 16:09:07 +0000 |
commit | 4e7850b0f1ad9a297fe8e213a9200cf6b4c79593 (patch) | |
tree | 4c374720034f0a1b422b40ae31c38c428f67754c | |
parent | abdb4fbe8784593d57e8e80afe8196a8cfc50dc8 (diff) | |
download | scummvm-rg350-4e7850b0f1ad9a297fe8e213a9200cf6b4c79593.tar.gz scummvm-rg350-4e7850b0f1ad9a297fe8e213a9200cf6b4c79593.tar.bz2 scummvm-rg350-4e7850b0f1ad9a297fe8e213a9200cf6b4c79593.zip |
Fix E4 opcode implemetnation. Now it works
svn-id: r12888
-rw-r--r-- | scumm/script_v6.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index e6325d468e..b92840e2d9 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -3115,15 +3115,15 @@ void ScummEngine_v6::o6_unknownE1() { void ScummEngine_v6::o6_unknownE4() { int arg = pop(); const byte *room = getResourceAddress(rtRoom, _roomResource); - const byte *boxd = room; - const byte *boxm = room; + const byte *boxd, *boxm; int32 dboxSize, mboxSize; + ResourceIterator boxds(room, false); for (int i = 0; i < arg; i++) - boxd = findResource(MKID('BOXD'), boxd); + boxd = boxds.findNext(MKID('BOXD')); if (!boxd) - error("ScummEngine_v6::o6_unknownE4: Can't find boxes for set %d", arg); + error("ScummEngine_v6::o6_unknownE4: Can't find dboxes for set %d", arg); dboxSize = READ_BE_UINT32(boxd + 4); byte *matrix = createResource(rtMatrix, 2, dboxSize); @@ -3131,11 +3131,12 @@ void ScummEngine_v6::o6_unknownE4() { assert(matrix); memcpy(matrix, boxd, dboxSize); + ResourceIterator boxms(room, false); for (int i = 0; i < arg; i++) - boxm = findResource(MKID('BOXM'), boxm); + boxm = boxms.findNext(MKID('BOXM')); if (!boxm) - error("ScummEngine_v6::o6_unknownE4: Can't find boxes for set %d", arg); + error("ScummEngine_v6::o6_unknownE4: Can't find mboxes for set %d", arg); mboxSize = READ_BE_UINT32(boxd + 4); matrix = createResource(rtMatrix, 1, mboxSize); |