diff options
author | Travis Howell | 2004-09-21 11:22:39 +0000 |
---|---|---|
committer | Travis Howell | 2004-09-21 11:22:39 +0000 |
commit | b0f0bf8dc2b0c1604b664307b34bf210a31ce4e9 (patch) | |
tree | 894992a8fa1900a17b85865d01fd0d9f6e130fd4 | |
parent | b359c9281fe66f6488aad3f15b5c468a64343bae (diff) | |
download | scummvm-rg350-b0f0bf8dc2b0c1604b664307b34bf210a31ce4e9.tar.gz scummvm-rg350-b0f0bf8dc2b0c1604b664307b34bf210a31ce4e9.tar.bz2 scummvm-rg350-b0f0bf8dc2b0c1604b664307b34bf210a31ce4e9.zip |
Add multi-block support for HE games.
svn-id: r15217
-rw-r--r-- | TODO | 1 | ||||
-rw-r--r-- | scumm/script_v72he.cpp | 27 |
2 files changed, 26 insertions, 2 deletions
@@ -244,7 +244,6 @@ SCUMM - Add support for song sync. in HE80+ games. - Add support for additional sound resources - Add support for sprites (Used by HE90+ games) - - Add support for multi-blocks, often used when loading wizImages - Add support for additional drawWizImage flags - Add support for WizPolygon rendering (cyx) - Add support for aux animation code used by cut scenes (cyx) diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index 9875ad717f..6dbc833ff5 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -625,8 +625,33 @@ int ScummEngine_v72he::findObject(int x, int y, int *args) { } const byte *ScummEngine_v72he::findWrappedBlock(uint32 tag, const byte *ptr, int state, bool errorFlag) { + printf("findWrappedBlock: tag %x\n", tag); if (READ_UINT32(ptr) == MKID('MULT')) { - error("findWrappedBlock: multi blocks aren't implemented"); + const byte *offs, *wrap; + uint32 size; + + wrap = findResource(MKID('WRAP'), ptr); + if (wrap == NULL) + return NULL; + + offs = findResourceData(MKID('OFFS'), wrap); + if (offs == NULL) + return NULL; + + size = getResourceDataSize(offs) / 4; + if ((uint32)state >= (uint32)size) + return NULL; + + offs += READ_LE_UINT32(offs + state * sizeof(uint32)); + offs = findResourceData(tag, offs - 8); +; if (offs) + return offs; + + offs = findResourceData(MKID('DEFA'), ptr); + if (offs == NULL) + return NULL; + + return findResourceData(tag, offs - 8); } else { return findResourceData(tag, ptr); } |