diff options
-rw-r--r-- | engines/sherlock/journal.cpp | 5 | ||||
-rw-r--r-- | engines/sherlock/resources.cpp | 17 |
2 files changed, 17 insertions, 5 deletions
diff --git a/engines/sherlock/journal.cpp b/engines/sherlock/journal.cpp index 19502b52a2..d4a74ff069 100644 --- a/engines/sherlock/journal.cpp +++ b/engines/sherlock/journal.cpp @@ -71,6 +71,11 @@ void Journal::record(int converseNum, int statementNum, bool replyOnly) { int saveIndex = _index; int saveSub = _sub; + if (_vm->getPlatform() == Common::kPlatform3DO) { + // there seems to be no journal in the 3DO version + return; + } + // Record the entry into the list _journal.push_back(JournalEntry(converseNum, statementNum, replyOnly)); _index = _journal.size() - 1; diff --git a/engines/sherlock/resources.cpp b/engines/sherlock/resources.cpp index d171a579f0..71037fe6ad 100644 --- a/engines/sherlock/resources.cpp +++ b/engines/sherlock/resources.cpp @@ -229,6 +229,7 @@ void Resources::loadLibraryIndex(const Common::String &libFilename, int count = 0; if (_vm->getPlatform() != Common::kPlatform3DO) { + // PC count = stream->readUint16LE(); if (isNewStyle) @@ -258,30 +259,36 @@ void Resources::loadLibraryIndex(const Common::String &libFilename, } } else { + // 3DO count = stream->readUint16BE(); // 3DO header // Loop through reading in the entries + + // Read offset of first entry + offset = stream->readUint32BE(); + for (int idx = 0; idx < count; ++idx) { - // Read the offset - offset = stream->readUint32BE(); // Read the name of the resource char resName[13]; stream->read(resName, 13); resName[12] = '\0'; + stream->skip(3); // filler + if (idx == (count - 1)) { nextOffset = stream->size(); } else { - // Read the size by jumping forward to read the next entry's offset - stream->seek(13, SEEK_CUR); + // Read the offset of the next entry nextOffset = stream->readUint32BE(); - stream->seek(-17, SEEK_CUR); } // Add the entry to the index index[resName] = LibraryEntry(idx, offset, nextOffset - offset); + + // use next offset as current offset + offset = nextOffset; } } } |