diff options
author | Matthew Hoops | 2011-09-16 09:17:00 -0400 |
---|---|---|
committer | Matthew Hoops | 2011-09-16 09:17:00 -0400 |
commit | ecde87260c1db0de463f294b551402c08e731d0e (patch) | |
tree | 2416eecc72ecedf62444f7a8722aede9e79923a0 /engines/pegasus/gamestate.cpp | |
parent | dc0254c1ce10647f179a674e924d17a62640007f (diff) | |
download | scummvm-rg350-ecde87260c1db0de463f294b551402c08e731d0e.tar.gz scummvm-rg350-ecde87260c1db0de463f294b551402c08e731d0e.tar.bz2 scummvm-rg350-ecde87260c1db0de463f294b551402c08e731d0e.zip |
PEGASUS: Fix saving/loading the game state
Diffstat (limited to 'engines/pegasus/gamestate.cpp')
-rwxr-xr-x | engines/pegasus/gamestate.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/engines/pegasus/gamestate.cpp b/engines/pegasus/gamestate.cpp index bc88c5ed22..5c889bdd20 100755 --- a/engines/pegasus/gamestate.cpp +++ b/engines/pegasus/gamestate.cpp @@ -45,6 +45,7 @@ Common::Error GameStateManager::writeGameState(Common::WriteStream *stream) { stream->writeByte(_nextDirection); stream->writeUint16BE(_lastNeighborhood); stream->writeUint16BE(_lastRoom); + stream->writeByte(_lastDirection); stream->writeUint16BE(_openDoorRoom); stream->writeByte(_openDoorDirection); @@ -74,6 +75,7 @@ Common::Error GameStateManager::readGameState(Common::ReadStream *stream) { _nextDirection = stream->readByte(); _lastNeighborhood = stream->readUint16BE(); _lastRoom = stream->readUint16BE(); + _lastDirection = stream->readByte(); _openDoorRoom = stream->readUint16BE(); _openDoorDirection = stream->readByte(); @@ -599,13 +601,13 @@ void GameStateManager::resetPrehistoricState() { void GameStateManager::writeNoradState(Common::WriteStream *stream) { _noradFlags.writeToStream(stream); stream->writeUint16BE(_noradSubRoomPressure); - stream->writeUint32BE(_noradSubPrepState); // FIXME: sizeof(enum)! + stream->writeByte(_noradSubPrepState); } void GameStateManager::readNoradState(Common::ReadStream *stream) { _noradFlags.readFromStream(stream); _noradSubRoomPressure = stream->readUint16BE(); - _noradSubPrepState = (tNoradSubPrepState)stream->readUint32BE(); // FIXME: sizeof(enum)! + _noradSubPrepState = (tNoradSubPrepState)stream->readByte(); } void GameStateManager::resetNoradState() { |