FREESCAPE: fixed parsing of global bytecode table

This commit is contained in:
neuromancer
2022-11-06 21:59:55 +01:00
committed by Eugene Sandulenko
parent c9effe9312
commit c4e0484271
@@ -386,18 +386,12 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
uint8 startEntrance = file->readByte();
debug("Entrace area: %d", startEntrance);
file->seek(0x46, SEEK_CUR);
file->seek(offset + 0x46); // 0x46
uint16 globalSomething;
globalSomething = file->readUint16LE();
debug("Pointer to something: %x\n", globalSomething);
if (_targetName.hasPrefix("driller")) {
file->seek(0x3b42);
for (int i = 0; i < 8; i++)
load8bitObject(file);
}
uint16 globalByteCodeTable;
globalByteCodeTable = file->readUint16LE();
debug("GBCT: %d\n", globalByteCodeTable);
@@ -419,6 +413,12 @@ void FreescapeEngine::load8bitBinary(Common::SeekableReadStream *file, int offse
debug("%s", conditions->c_str());
}
if (_targetName.hasPrefix("driller")) {
file->seek(0x3b42);
for (int i = 0; i < 8; i++)
load8bitObject(file);
}
if (_targetName != "castlemaster")
file->seek(offset + 0xc8);
else