diff options
Diffstat (limited to 'engines/access')
-rw-r--r-- | engines/access/room.cpp | 18 | ||||
-rw-r--r-- | engines/access/room.h | 2 |
2 files changed, 12 insertions, 8 deletions
diff --git a/engines/access/room.cpp b/engines/access/room.cpp index c26a811225..3696a4cadf 100644 --- a/engines/access/room.cpp +++ b/engines/access/room.cpp @@ -162,7 +162,7 @@ void Room::clearRoom() { } void Room::loadRoomData(const byte *roomData) { - RoomInfo roomInfo(roomData, _vm->getGameID()); + RoomInfo roomInfo(roomData, _vm->getGameID(), _vm->isCD()); _roomFlag = roomInfo._roomFlag; @@ -734,14 +734,19 @@ bool Room::checkCode(int v1, int v2) { /*------------------------------------------------------------------------*/ -RoomInfo::RoomInfo(const byte *data, int gameType) { +RoomInfo::RoomInfo(const byte *data, int gameType, bool isCD) { Common::MemoryReadStream stream(data, 999); _roomFlag = stream.readByte(); - if (gameType != GType_MartianMemorandum) - _estIndex = stream.readSint16LE(); - else + if (gameType == GType_Amazon) { + if (isCD) + _estIndex = stream.readSint16LE(); + else { + _estIndex = -1; + stream.readSint16LE(); + } + } else _estIndex = -1; _musicFile.load(stream); @@ -779,8 +784,7 @@ RoomInfo::RoomInfo(const byte *data, int gameType) { _extraCells.push_back(ec); } - for (int16 fileNum = stream.readSint16LE(); fileNum != -1; - fileNum = stream.readSint16LE()) { + for (int16 fileNum = stream.readSint16LE(); fileNum != -1; fileNum = stream.readSint16LE()) { SoundIdent fi; fi._fileNum = fileNum; fi._subfile = stream.readUint16LE(); diff --git a/engines/access/room.h b/engines/access/room.h index 321ace4fd1..fdeccc87c8 100644 --- a/engines/access/room.h +++ b/engines/access/room.h @@ -191,7 +191,7 @@ public: Common::Array<ExtraCell> _extraCells; Common::Array<SoundIdent> _sounds; public: - RoomInfo(const byte *data, int gameType); + RoomInfo(const byte *data, int gameType, bool isCD); }; } // End of namespace Access |