From 03739c66aa6c9d3e683b046b23cbd90adea457fa Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Wed, 28 Sep 2011 21:05:04 -0400 Subject: PEGASUS: Fix exit table loading --- engines/pegasus/neighborhood/exit.cpp | 2 +- engines/pegasus/neighborhood/exit.h | 14 +++++++++++++- 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; -- cgit v1.2.3