aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorMatthew Hoops2011-09-28 21:05:04 -0400
committerMatthew Hoops2011-09-28 21:05:04 -0400
commit03739c66aa6c9d3e683b046b23cbd90adea457fa (patch)
tree16d6e9cf9d5cfc349dcb702c851345504be6f805 /engines
parent1112b11df93805f763c0a44b392301bb7ea51ca1 (diff)
downloadscummvm-rg350-03739c66aa6c9d3e683b046b23cbd90adea457fa.tar.gz
scummvm-rg350-03739c66aa6c9d3e683b046b23cbd90adea457fa.tar.bz2
scummvm-rg350-03739c66aa6c9d3e683b046b23cbd90adea457fa.zip
PEGASUS: Fix exit table loading
Diffstat (limited to 'engines')
-rwxr-xr-xengines/pegasus/neighborhood/exit.cpp2
-rwxr-xr-xengines/pegasus/neighborhood/exit.h14
2 files changed, 14 insertions, 2 deletions
diff --git a/engines/pegasus/neighborhood/exit.cpp b/engines/pegasus/neighborhood/exit.cpp
index ce3fe9da9a..0ef12cc7e3 100755
--- a/engines/pegasus/neighborhood/exit.cpp
+++ b/engines/pegasus/neighborhood/exit.cpp
@@ -43,7 +43,7 @@ void ExitTable::loadFromStream(Common::SeekableReadStream *stream) {
_entries[i].movieEnd = stream->readUint32BE();
_entries[i].exitEnd = stream->readUint32BE();
_entries[i].exitLoop = stream->readUint32BE();
- _entries[i].exitRoom = stream->readUint32BE();
+ _entries[i].exitRoom = stream->readUint16BE();
_entries[i].exitDirection = stream->readByte();
stream->readByte(); // alignment
diff --git a/engines/pegasus/neighborhood/exit.h b/engines/pegasus/neighborhood/exit.h
index 671f30738f..d3e8d50446 100755
--- a/engines/pegasus/neighborhood/exit.h
+++ b/engines/pegasus/neighborhood/exit.h
@@ -48,8 +48,20 @@ public:
void clear();
struct Entry {
- Entry() { movieStart = 0xffffffff; }
+ Entry() { clear(); }
bool isEmpty() { return movieStart == 0xffffffff; }
+ void clear() {
+ room = kNoRoomID;
+ direction = kNoDirection;
+ altCode = kNoAlternateID;
+ movieStart = 0xffffffff;
+ movieEnd = 0xffffffff;
+ exitEnd = 0xffffffff;
+ originalEnd = 0xffffffff;
+ exitLoop = 0xffffffff;
+ exitRoom = kNoRoomID;
+ exitDirection = kNoDirection;
+ }
tRoomID room;
tDirectionConstant direction;