diff options
author | Strangerke | 2014-08-31 01:09:29 +0200 |
---|---|---|
committer | Strangerke | 2014-08-31 01:09:29 +0200 |
commit | 2cc6d9299ae6a7037704dd72eeebc44ab2c3c1b4 (patch) | |
tree | d5e8d073b77c327e02ff73ba6ac05dc67dd8b289 /engines | |
parent | aa755b9f3ff93e1e0918abe77b2a49b2e203e2a5 (diff) | |
download | scummvm-rg350-2cc6d9299ae6a7037704dd72eeebc44ab2c3c1b4.tar.gz scummvm-rg350-2cc6d9299ae6a7037704dd72eeebc44ab2c3c1b4.tar.bz2 scummvm-rg350-2cc6d9299ae6a7037704dd72eeebc44ab2c3c1b4.zip |
ACCESS: Add a check to work around a difference in hardcoded data between the CD and the floppy version
Diffstat (limited to 'engines')
-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 |