Skip to content

Commit

Permalink
ACCESS: Fix RoomInfo for the demo version, fix a typo in a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Strangerke authored and dreammaster committed Dec 13, 2014
1 parent 66f9d71 commit f968553
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion engines/access/files.cpp
Expand Up @@ -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;

Expand Down
7 changes: 4 additions & 3 deletions engines/access/room.cpp
Expand Up @@ -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;

Expand Down Expand Up @@ -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();
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion engines/access/room.h
Expand Up @@ -194,7 +194,7 @@ class RoomInfo {
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
Expand Down

0 comments on commit f968553

Please sign in to comment.