aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMartin Kiewitz2015-06-12 18:14:36 +0200
committerMartin Kiewitz2015-06-12 18:14:36 +0200
commit174aa230b682c466018aadd2e69457a51cf0d2c5 (patch)
tree976c404fdbd051a1a6c46187589828ee41188db3 /engines
parentb6fe6ef8f54c09a6015c62dccfa973d385f735ae (diff)
downloadscummvm-rg350-174aa230b682c466018aadd2e69457a51cf0d2c5.tar.gz
scummvm-rg350-174aa230b682c466018aadd2e69457a51cf0d2c5.tar.bz2
scummvm-rg350-174aa230b682c466018aadd2e69457a51cf0d2c5.zip
SHERLOCK: 3DO: fix library loading on 3DO
also disable journal recording for 3DO
Diffstat (limited to 'engines')
-rw-r--r--engines/sherlock/journal.cpp5
-rw-r--r--engines/sherlock/resources.cpp17
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;
}
}
}