Add multi-block support for HE games.

svn-id: r15217
This commit is contained in:
Travis Howell 2004-09-21 11:22:39 +00:00
parent b359c9281f
commit b0f0bf8dc2
2 changed files with 26 additions and 2 deletions

1
TODO
View File

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

View File

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