diff options
author | Paul Gilbert | 2017-01-03 01:45:21 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-01-03 01:45:21 -0500 |
commit | 8d245d39599252f5a1f3b56303e4b8f8d7529fcc (patch) | |
tree | ce5b3aeaaf644e3d800ce7c9300f109acf6ae5f9 /engines/titanic/game/broken_pellerator.cpp | |
parent | 96c783899c9c05f0e32da1668ae990d50f46b7f1 (diff) | |
download | scummvm-rg350-8d245d39599252f5a1f3b56303e4b8f8d7529fcc.tar.gz scummvm-rg350-8d245d39599252f5a1f3b56303e4b8f8d7529fcc.tar.bz2 scummvm-rg350-8d245d39599252f5a1f3b56303e4b8f8d7529fcc.zip |
TITANIC: Fix opening the broken pellerator enabling the hose
Diffstat (limited to 'engines/titanic/game/broken_pellerator.cpp')
-rw-r--r-- | engines/titanic/game/broken_pellerator.cpp | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/engines/titanic/game/broken_pellerator.cpp b/engines/titanic/game/broken_pellerator.cpp index 8fb7244b7e..d3664acccd 100644 --- a/engines/titanic/game/broken_pellerator.cpp +++ b/engines/titanic/game/broken_pellerator.cpp @@ -34,8 +34,8 @@ END_MESSAGE_MAP() void CBrokenPellerator::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeQuotedLine(_string2, indent); - file->writeQuotedLine(_string3, indent); + file->writeQuotedLine(_exitLeftView, indent); + file->writeQuotedLine(_exitRightView, indent); file->writeQuotedLine(_string4, indent); file->writeQuotedLine(_string5, indent); @@ -44,8 +44,8 @@ void CBrokenPellerator::save(SimpleFile *file, int indent) { void CBrokenPellerator::load(SimpleFile *file) { file->readNumber(); - _string2 = file->readString(); - _string3 = file->readString(); + _exitLeftView = file->readString(); + _exitRightView = file->readString(); _string4 = file->readString(); _string5 = file->readString(); @@ -86,15 +86,15 @@ bool CBrokenPellerator::ActMsg(CActMsg *msg) { CStatusChangeMsg statusMsg; statusMsg.execute("PickupHose"); } else { - _fieldE0 = 0; + _exitAction = 0; bool closeFlag = msg->_action == "Close"; if (msg->_action == "CloseLeft") { closeFlag = true; - _fieldE0 = 1; + _exitAction = 1; } if (msg->_action == "CloseRight") { closeFlag = true; - _fieldE0 = 2; + _exitAction = 2; } if (closeFlag) { @@ -105,18 +105,18 @@ bool CBrokenPellerator::ActMsg(CActMsg *msg) { else playMovie(14, 28, MOVIE_NOTIFY_OBJECT); } else { - switch (_fieldE0) { + switch (_exitAction) { case 1: - changeView(_string2); + changeView(_exitLeftView); break; case 2: - changeView(_string3); + changeView(_exitRightView); break; default: break; } - _fieldE0 = 0; + _exitAction = 0; } } } @@ -126,23 +126,25 @@ bool CBrokenPellerator::ActMsg(CActMsg *msg) { bool CBrokenPellerator::MovieEndMsg(CMovieEndMsg *msg) { if (msg->_endFrame == 14) { + // Pellerator has been opened, so let the hose be picked up (if it's still there) CStatusChangeMsg statusMsg; statusMsg._newStatus = 1; statusMsg.execute("PickUpHose"); } if (msg->_endFrame == 28) { + // Pellerator has been closed, so disable the hose (if it's still there) CStatusChangeMsg statusMsg; statusMsg._newStatus = 0; statusMsg.execute("PickUpHose"); } - switch (_fieldE0) { + switch (_exitAction) { case 1: - changeView(_string2); + changeView(_exitLeftView); break; case 2: - changeView(_string3); + changeView(_exitRightView); break; default: break; |