diff options
Diffstat (limited to 'engines/gob/game_v1.cpp')
-rw-r--r-- | engines/gob/game_v1.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/engines/gob/game_v1.cpp b/engines/gob/game_v1.cpp index 60b922e530..fd859fdc2d 100644 --- a/engines/gob/game_v1.cpp +++ b/engines/gob/game_v1.cpp @@ -137,14 +137,12 @@ void Game_v1::playTot(int16 skipPlay) { } } - byte *filePtr = _script->getData() + 0x34; _totResourceTable = 0; - if (READ_LE_UINT32(filePtr) != (uint32) -1) { + if (_script->getResourcesOffset() != ((uint32) -1)) { _totResourceTable = new TotResTable; - _totResourceTable->dataPtr = - _script->getData() + READ_LE_UINT32(_script->getData() + 0x34); + _totResourceTable->dataPtr = _script->getData() + _script->getResourcesOffset(); Common::MemoryReadStream totResTable(_totResourceTable->dataPtr, - 4294967295U); + _script->getSize() - _script->getResourcesOffset()); _totResourceTable->itemsCount = totResTable.readSint16LE(); _totResourceTable->unknown = totResTable.readByte(); |