From 91a259534168a9127ae1c737f48c60c86c719cfb Mon Sep 17 00:00:00 2001 From: Paweł Kołodziejski Date: Sun, 20 Apr 2003 20:58:00 +0000 Subject: added loading global objects states for v2 svn-id: r7041 --- scumm/resource_v2.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scumm') diff --git a/scumm/resource_v2.cpp b/scumm/resource_v2.cpp index 3c77315502..7c4fb326d4 100644 --- a/scumm/resource_v2.cpp +++ b/scumm/resource_v2.cpp @@ -57,8 +57,11 @@ void Scumm_v2::readIndexFile() { _palManipIntermediatePal = 0; // Will allocate when needed _fileHandle.readUint16LE(); /* version magic number */ - _fileHandle.readUint16LE(); /* nb global objects */ - _fileHandle.seek(_numGlobalObjects, SEEK_CUR); // Skip object flags + int num = _fileHandle.readUint16LE(); + assert(num == _numGlobalObjects); + for (int i = 0; i != num; i++) { + _objectStateTable[i] = _fileHandle.readByte(); + } readResTypeList(rtRoom, MKID('ROOM'), "room"); readResTypeList(rtCostume, MKID('COST'), "costume"); readResTypeList(rtScript, MKID('SCRP'), "script"); -- cgit v1.2.3