aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorStrangerke2014-12-02 23:50:40 +0100
committerPaul Gilbert2014-12-12 22:56:11 -0500
commitf9685533292b0301ed9770439e55f39fbc934a7f (patch)
treedb05b575c160a29841956e01b8e898b32e97667b /engines
parent66f9d71f1dc27ab0e4d3499703e39ebf35e87a27 (diff)
downloadscummvm-rg350-f9685533292b0301ed9770439e55f39fbc934a7f.tar.gz
scummvm-rg350-f9685533292b0301ed9770439e55f39fbc934a7f.tar.bz2
scummvm-rg350-f9685533292b0301ed9770439e55f39fbc934a7f.zip
ACCESS: Fix RoomInfo for the demo version, fix a typo in a comment
Diffstat (limited to 'engines')
-rw-r--r--engines/access/files.cpp2
-rw-r--r--engines/access/room.cpp7
-rw-r--r--engines/access/room.h2
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