mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-01 00:12:59 +00:00
SHERLOCK: 3DO: fix library loading on 3DO
also disable journal recording for 3DO
This commit is contained in:
parent
b6fe6ef8f5
commit
174aa230b6
@ -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;
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user