diff options
-rw-r--r-- | engines/access/files.cpp | 2 | ||||
-rw-r--r-- | engines/access/room.cpp | 7 | ||||
-rw-r--r-- | engines/access/room.h | 2 |
3 files changed, 6 insertions, 5 deletions
diff --git a/engines/access/files.cpp b/engines/access/files.cpp index 6671a484de..9fff6c4102 100644 --- a/engines/access/files.cpp +++ b/engines/access/files.cpp @@ -211,7 +211,7 @@ void FileManager::setAppended(Resource *res, int fileNum) { if (!res->_file.open(_filenames[fileNum])) error("Could not open file %s", _filenames[fileNum]); - // If a different file has been opened then previously, load it's index + // If a different file has been opened then previously, load its index if (_fileNumber != fileNum) { _fileNumber = fileNum; diff --git a/engines/access/room.cpp b/engines/access/room.cpp index a5873b2c38..97341b04b9 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -167,7 +167,7 @@ void Room::clearRoom() { } void Room::loadRoomData(const byte *roomData) { - RoomInfo roomInfo(roomData, _vm->getGameID(), _vm->isCD()); + RoomInfo roomInfo(roomData, _vm->getGameID(), _vm->isCD(), _vm->isDemo()); _roomFlag = roomInfo._roomFlag; @@ -777,7 +777,7 @@ bool Room::checkCode(int v1, int v2) { /*------------------------------------------------------------------------*/ -RoomInfo::RoomInfo(const byte *data, int gameType, bool isCD) { +RoomInfo::RoomInfo(const byte *data, int gameType, bool isCD, bool isDemo) { Common::MemoryReadStream stream(data, 999); _roomFlag = stream.readByte(); @@ -787,7 +787,8 @@ RoomInfo::RoomInfo(const byte *data, int gameType, bool isCD) { _estIndex = stream.readSint16LE(); else { _estIndex = -1; - stream.readSint16LE(); + if (!isDemo) + stream.readSint16LE(); } } else _estIndex = -1; diff --git a/engines/access/room.h b/engines/access/room.h index 4ec80d114c..db794dbc96 100644 --- a/engines/access/room.h +++ b/engines/access/room.h @@ -194,7 +194,7 @@ public: Common::Array<ExtraCell> _extraCells; Common::Array<SoundIdent> _sounds; public: - RoomInfo(const byte *data, int gameType, bool isCD); + RoomInfo(const byte *data, int gameType, bool isCD, bool isDemo); }; } // End of namespace Access |