aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scumm/resource.cpp31
1 files changed, 29 insertions, 2 deletions
diff --git a/scumm/resource.cpp b/scumm/resource.cpp
index bdf7df0fef..ea83040139 100644
--- a/scumm/resource.cpp
+++ b/scumm/resource.cpp
@@ -223,6 +223,7 @@ void Scumm::readIndexFile() {
uint32 blocktype, itemsize;
int numblock = 0;
int num, i;
+ bool stop = false;
debug(9, "readIndexFile()");
@@ -267,7 +268,7 @@ void Scumm::readIndexFile() {
_fileHandle.seek(0, SEEK_SET);
}
- while (1) {
+ while (!stop) {
blocktype = fileReadDword();
if (_fileHandle.ioFailed())
@@ -280,7 +281,11 @@ void Scumm::readIndexFile() {
case MKID('DCHR'):
readResTypeList(rtCharset, MKID('CHAR'), "charset");
break;
-
+
+ case MKID('DIRF'):
+ readResTypeList(rtCharset, MKID('DIRF'), "charset");
+ break;
+
case MKID('DOBJ'):
if (_features & GF_AFTER_V8)
num = _fileHandle.readUint32LE();
@@ -325,9 +330,15 @@ void Scumm::readIndexFile() {
break;
case MKID('RNAM'):
+ case MKID('DIRI'):
+ case MKID('DLFL'):
_fileHandle.seek(itemsize - 8, SEEK_CUR);
break;
+ case 0xFFFFFFFF:
+ stop = true;
+ break;
+
case MKID('ANAM'):
_numAudioNames = _fileHandle.readUint16LE();
_audioNames = (char*)malloc(_numAudioNames * 9);
@@ -338,6 +349,10 @@ void Scumm::readIndexFile() {
readResTypeList(rtRoom, MKID('ROOM'), "room");
break;
+ case MKID('DIRR'):
+ readResTypeList(rtRoom, MKID('DIRR'), "room");
+ break;
+
case MKID('DRSC'): // FIXME: Verify
readResTypeList(rtRoomScripts, MKID('RMSC'), "room script");
break;
@@ -346,10 +361,18 @@ void Scumm::readIndexFile() {
readResTypeList(rtScript, MKID('SCRP'), "script");
break;
+ case MKID('DIRS'):
+ readResTypeList(rtScript, MKID('DIRS'), "script");
+ break;
+
case MKID('DCOS'):
readResTypeList(rtCostume, MKID('COST'), "costume");
break;
+ case MKID('DIRC'):
+ readResTypeList(rtCostume, MKID('DIRC'), "costume");
+ break;
+
case MKID('MAXS'):
readMAXS();
break;
@@ -358,6 +381,10 @@ void Scumm::readIndexFile() {
readResTypeList(rtSound, MKID('SOUN'), "sound");
break;
+ case MKID('DIRN'):
+ readResTypeList(rtSound, MKID('DIRN'), "sound");
+ break;
+
case MKID('AARY'):
debug(3, "Going to call readArrayFromIndexFile (pos = 0x%08x)", _fileHandle.pos());
readArrayFromIndexFile();