diff options
author | Paul Gilbert | 2017-02-20 21:15:00 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-20 21:15:00 -0500 |
commit | 90e4e8a06403dc54b862cc08676718a29fdf6f94 (patch) | |
tree | b5709060fcc2c6f0cd03e3f1bfe544aae4438b5b /engines/titanic/game/captains_wheel.cpp | |
parent | e878332cc4f0581343b794d8a20b396b726e3543 (diff) | |
download | scummvm-rg350-90e4e8a06403dc54b862cc08676718a29fdf6f94.tar.gz scummvm-rg350-90e4e8a06403dc54b862cc08676718a29fdf6f94.tar.bz2 scummvm-rg350-90e4e8a06403dc54b862cc08676718a29fdf6f94.zip |
TITANIC: Initial cleanup & renamings for bridge controls
Diffstat (limited to 'engines/titanic/game/captains_wheel.cpp')
-rw-r--r-- | engines/titanic/game/captains_wheel.cpp | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/engines/titanic/game/captains_wheel.cpp b/engines/titanic/game/captains_wheel.cpp index 7a21047908..eabee7e418 100644 --- a/engines/titanic/game/captains_wheel.cpp +++ b/engines/titanic/game/captains_wheel.cpp @@ -34,17 +34,17 @@ BEGIN_MESSAGE_MAP(CCaptainsWheel, CBackground) END_MESSAGE_MAP() CCaptainsWheel::CCaptainsWheel() : CBackground(), - _fieldE0(0), _fieldE4(0), _fieldE8(0), _fieldEC(0), - _fieldF0(0), _fieldF4(0) { + _stopEnabled(false), _fieldE4(0), _fieldE8(0), + _cruiseEnabled(false), _goEnabled(false), _fieldF4(0) { } void CCaptainsWheel::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_fieldE0, indent); + file->writeNumberLine(_stopEnabled, indent); file->writeNumberLine(_fieldE4, indent); file->writeNumberLine(_fieldE8, indent); - file->writeNumberLine(_fieldEC, indent); - file->writeNumberLine(_fieldF0, indent); + file->writeNumberLine(_cruiseEnabled, indent); + file->writeNumberLine(_goEnabled, indent); file->writeNumberLine(_fieldF4, indent); CBackground::save(file, indent); @@ -52,19 +52,19 @@ void CCaptainsWheel::save(SimpleFile *file, int indent) { void CCaptainsWheel::load(SimpleFile *file) { file->readNumber(); - _fieldE0 = file->readNumber(); + _stopEnabled = file->readNumber(); _fieldE4 = file->readNumber(); _fieldE8 = file->readNumber(); - _fieldEC = file->readNumber(); - _fieldF0 = file->readNumber(); + _cruiseEnabled = file->readNumber(); + _goEnabled = file->readNumber(); _fieldF4 = file->readNumber(); CBackground::load(file); } bool CCaptainsWheel::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { - if (_fieldE0) { - _fieldE0 = false; + if (_stopEnabled) { + _stopEnabled = false; CTurnOff offMsg; offMsg.execute(this); playMovie(162, 168, 0); @@ -76,8 +76,8 @@ bool CCaptainsWheel::MouseButtonDownMsg(CMouseButtonDownMsg *msg) { } bool CCaptainsWheel::LeaveViewMsg(CLeaveViewMsg *msg) { - if (_fieldE0) { - _fieldE0 = false; + if (_stopEnabled) { + _stopEnabled = false; CTurnOff offMsg; offMsg.execute(this); playMovie(162, 168, MOVIE_WAIT_FOR_FINISH); @@ -88,19 +88,19 @@ bool CCaptainsWheel::LeaveViewMsg(CLeaveViewMsg *msg) { bool CCaptainsWheel::ActMsg(CActMsg *msg) { if (msg->_action == "Spin") { - if (_fieldE0) { + if (_stopEnabled) { CTurnOn onMsg; onMsg.execute("RatchetySound"); playMovie(8, 142, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); } } else if (msg->_action == "Honk") { - if (_fieldE0) { + if (_stopEnabled) { playMovie(150, 160, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); } } else if (msg->_action == "Go") { - if (!_fieldE0) { + if (!_stopEnabled) { incTransitions(); - _fieldE0 = false; + _stopEnabled = false; _fieldE4 = 1; CTurnOff offMsg; @@ -108,9 +108,9 @@ bool CCaptainsWheel::ActMsg(CActMsg *msg) { playMovie(162, 168, MOVIE_NOTIFY_OBJECT | MOVIE_WAIT_FOR_FINISH); } } else if (msg->_action == "Cruise") { - if (_fieldE0) { + if (_stopEnabled) { incTransitions(); - _fieldE0 = false; + _stopEnabled = false; _fieldE4 = 2; CTurnOff offMsg; @@ -124,9 +124,9 @@ bool CCaptainsWheel::ActMsg(CActMsg *msg) { volumeMsg.execute("EngineSounds"); CTurnOn onMsg; onMsg.execute("EngineSounds"); - _fieldF0 = 1; + _goEnabled = true; } else if (msg->_action == "ClearDestin") { - _fieldF0 = 0; + _goEnabled = false; } return true; @@ -152,17 +152,17 @@ bool CCaptainsWheel::TurnOn(CTurnOn *msg) { signalMsg.execute("WheelSpin"); signalMsg.execute("SeagullHorn"); - if (_fieldE0) { + if (_stopEnabled) { signalMsg.execute("WheelStopButt"); signalMsg.execute("StopHotSpot"); } - if (_fieldEC) { + if (_cruiseEnabled) { signalMsg.execute("WheelCruiseButt"); signalMsg.execute("CruiseHotSpot"); } - if (_fieldF0) { + if (_goEnabled) { signalMsg.execute("WheelGoButt"); signalMsg.execute("GoHotSpot"); } @@ -172,7 +172,7 @@ bool CCaptainsWheel::TurnOn(CTurnOn *msg) { bool CCaptainsWheel::MovieEndMsg(CMovieEndMsg *msg) { if (msg->_endFrame == 8) { - _fieldE0 = true; + _stopEnabled = true; CTurnOn onMsg; onMsg.execute(this); } @@ -185,7 +185,7 @@ bool CCaptainsWheel::MovieEndMsg(CMovieEndMsg *msg) { if (msg->_endFrame == 168) { switch (_fieldE4) { case 1: { - CActMsg actMsg(starFn2() ? "GoEnd" : "Go"); + CActMsg actMsg(starIsSolved() ? "GoEnd" : "Go"); actMsg.execute("GoSequence"); break; } |