aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2014-08-21 07:44:41 -0400
committerPaul Gilbert2014-08-21 07:44:41 -0400
commit966515a7d0f0e9bccc8ad2a761020372d4bae19f (patch)
tree650a3585b7ba617186f8e71442a7ff61591a6d34 /engines
parentafc41c7eecc5c8d6b410534b5c66aa02807d11cb (diff)
downloadscummvm-rg350-966515a7d0f0e9bccc8ad2a761020372d4bae19f.tar.gz
scummvm-rg350-966515a7d0f0e9bccc8ad2a761020372d4bae19f.tar.bz2
scummvm-rg350-966515a7d0f0e9bccc8ad2a761020372d4bae19f.zip
ACCESS: Fix room data loading for MM
Diffstat (limited to 'engines')
-rw-r--r--engines/access/martian/martian_resources.cpp12
-rw-r--r--engines/access/room.cpp14
-rw-r--r--engines/access/room.h2
3 files changed, 16 insertions, 12 deletions
diff --git a/engines/access/martian/martian_resources.cpp b/engines/access/martian/martian_resources.cpp
index 6e881f3b36..b596797ab5 100644
--- a/engines/access/martian/martian_resources.cpp
+++ b/engines/access/martian/martian_resources.cpp
@@ -32,12 +32,12 @@ const char *const FILENAMES[] = {
"R08.AP", "R09.AP", "R10.AP", "R11.AP", "R12.AP", "R13.AP", "R14.AP", "R15.AP",
"R16.AP", "R17.AP", "R18.AP", "R19.AP", "R20.AP", "R21.AP", "R22.AP", "R23.AP",
"R24.AP", "R25.AP", "R26.AP", "R27.AP", "R28.AP", "R29.AP", "R30.AP", "R31.AP",
- "R32.AP", "R34.AP", "R35.AP", "R36.AP", "R37.AP", "R38.AP", "R39.AP", "R40.AP",
- "TITLE.AP","R42.AP","S01.AP", "R45.AP","SOUND.AP","MUSIC.AP","DEAD.AP","EST.AP",
- "W02.AP", "C02.AP", "C05.AP", "C04.AP", "C10.AP", "C03.AP", "C07.AP", "LOVE.AP",
- "CAFE.AP","C08.AP", "C18.AP", "C19.AP", "C21.AP", "C23.AP", "C12.AP", "C16.AP",
- "CAFE1.AP","C05A.AP","C06.AP","C11.AP", "C13.AP", "C20.AP", "C16A.AP","C09.AP",
- "R45.AP", "R46.AP", "R47.AP", "R48.AP", "R49.AP"
+ "R32.AP", "R33.AP", "R34.AP", "R35.AP", "R36.AP", "R37.AP", "R38.AP", "R39.AP",
+ "R40.AP","TITLE.AP","R42.AP","S01.AP", "R44.AP", "R45.AP","SOUND.AP","MUSIC.AP",
+ "DEAD.AP","EST.AP", "W02.AP", "C02.AP", "C05.AP", "C04.AP", "C10.AP", "C03.AP",
+ "C07.AP", "LOVE.AP","CAFE.AP","C08.AP", "C18.AP", "C19.AP", "C21.AP", "C23.AP",
+ "C12.AP", "C16.AP","CAFE1.AP","C05A.AP","C06.AP","C11.AP", "C13.AP", "C20.AP",
+ "C16A.AP","C09.AP", "R45.AP", "R46.AP", "R47.AP", "R48.AP", "R49.AP"
};
const byte MOUSE0[] = {
diff --git a/engines/access/room.cpp b/engines/access/room.cpp
index f45ffe7afb..0e6cba052d 100644
--- a/engines/access/room.cpp
+++ b/engines/access/room.cpp
@@ -159,7 +159,7 @@ void Room::clearRoom() {
}
void Room::loadRoomData(const byte *roomData) {
- RoomInfo roomInfo(roomData);
+ RoomInfo roomInfo(roomData, _vm->getGameID());
_roomFlag = roomInfo._roomFlag;
@@ -716,11 +716,16 @@ bool Room::checkCode(int v1, int v2) {
/*------------------------------------------------------------------------*/
-RoomInfo::RoomInfo(const byte *data) {
+RoomInfo::RoomInfo(const byte *data, int gameType) {
Common::MemoryReadStream stream(data, 999);
_roomFlag = stream.readByte();
- _estIndex = (int16)stream.readUint16LE();
+
+ if (gameType != GType_MartianMemorandum)
+ _estIndex = (int16)stream.readUint16LE();
+ else
+ _estIndex = -1;
+
_musicFile._fileNum = (int16)stream.readUint16LE();
_musicFile._subfile = stream.readUint16LE();
_scaleH1 = stream.readByte();
@@ -748,8 +753,7 @@ RoomInfo::RoomInfo(const byte *data) {
_paletteFile._subfile = stream.readUint16LE();
if (_paletteFile._fileNum == -1) {
_startColor = _numColors = 0;
- }
- else {
+ } else {
_startColor = stream.readUint16LE();
_numColors = stream.readUint16LE();
}
diff --git a/engines/access/room.h b/engines/access/room.h
index 9b3f922528..e1a26a4e4e 100644
--- a/engines/access/room.h
+++ b/engines/access/room.h
@@ -187,7 +187,7 @@ public:
Common::Array<uint32> _vidTable;
Common::Array<SoundIdent> _sounds;
public:
- RoomInfo(const byte *data);
+ RoomInfo(const byte *data, int gameType);
};
} // End of namespace Access