diff options
author | Paul Gilbert | 2017-02-20 23:48:41 -0500 |
---|---|---|
committer | Paul Gilbert | 2017-02-20 23:48:41 -0500 |
commit | f189cb15302ad3d0ed6dd24a9cdcbe896d0461c6 (patch) | |
tree | 23a67afdb365f2a9646c677c4b3b913686156d99 /engines/titanic/game | |
parent | 89efab8bddd76786c3b1ca82556ee9e5486d0cf9 (diff) | |
download | scummvm-rg350-f189cb15302ad3d0ed6dd24a9cdcbe896d0461c6.tar.gz scummvm-rg350-f189cb15302ad3d0ed6dd24a9cdcbe896d0461c6.tar.bz2 scummvm-rg350-f189cb15302ad3d0ed6dd24a9cdcbe896d0461c6.zip |
TITANIC: Renamings for CBridgeView
Diffstat (limited to 'engines/titanic/game')
-rw-r--r-- | engines/titanic/game/bridge_view.cpp | 22 | ||||
-rw-r--r-- | engines/titanic/game/bridge_view.h | 8 |
2 files changed, 17 insertions, 13 deletions
diff --git a/engines/titanic/game/bridge_view.cpp b/engines/titanic/game/bridge_view.cpp index f8429f06e3..e8d70c8c43 100644 --- a/engines/titanic/game/bridge_view.cpp +++ b/engines/titanic/game/bridge_view.cpp @@ -31,13 +31,13 @@ END_MESSAGE_MAP() void CBridgeView::save(SimpleFile *file, int indent) { file->writeNumberLine(1, indent); - file->writeNumberLine(_mode, indent); + file->writeNumberLine(_action, indent); CBackground::save(file, indent); } void CBridgeView::load(SimpleFile *file) { file->readNumber(); - _mode = file->readNumber(); + _action = (BridgeAction)file->readNumber(); CBackground::load(file); } @@ -47,13 +47,13 @@ bool CBridgeView::ActMsg(CActMsg *msg) { volumeMsg._secondsTransition = 1; if (msg->_action == "End") { - _mode = 4; + _action = BA_ENDING2; petLockInput(); petHide(); setVisible(true); playMovie(MOVIE_NOTIFY_OBJECT); } else if (msg->_action == "Go") { - _mode = 1; + _action = BA_GO; setVisible(true); volumeMsg._volume = 100; volumeMsg.execute("EngineSounds"); @@ -65,11 +65,11 @@ bool CBridgeView::ActMsg(CActMsg *msg) { onMsg.execute("EngineSounds"); if (msg->_action == "Cruise") { - _mode = 2; + _action = BA_CRUISE; setVisible(true); playMovie(MOVIE_NOTIFY_OBJECT); } else if (msg->_action == "GoEnd") { - _mode = 3; + _action = BA_ENDING1; setVisible(true); CChangeMusicMsg musicMsg; musicMsg._flags = 1; @@ -86,21 +86,21 @@ bool CBridgeView::MovieEndMsg(CMovieEndMsg *msg) { CTurnOff offMsg; offMsg.execute("EngineSounds"); - switch (_mode) { - case 1: - case 2: + switch (_action) { + case BA_GO: + case BA_CRUISE: setVisible(false); decTransitions(); break; - case 3: { + case BA_ENDING1: { setVisible(false); CActMsg actMsg("End"); actMsg.execute("HomeSequence"); break; } - case 4: + case BA_ENDING2: setVisible(false); changeView("TheEnd.Node 3.N"); break; diff --git a/engines/titanic/game/bridge_view.h b/engines/titanic/game/bridge_view.h index 45cfa3f4c8..01bd6310ce 100644 --- a/engines/titanic/game/bridge_view.h +++ b/engines/titanic/game/bridge_view.h @@ -27,15 +27,19 @@ namespace Titanic { +enum BridgeAction { + BA_NONE = 0, BA_GO = 1, BA_CRUISE = 2, BA_ENDING1 = 3, BA_ENDING2 = 4 +}; + class CBridgeView : public CBackground { DECLARE_MESSAGE_MAP; bool ActMsg(CActMsg *msg); bool MovieEndMsg(CMovieEndMsg *msg); public: - int _mode; + BridgeAction _action; public: CLASSDEF; - CBridgeView() : CBackground(), _mode(0) {} + CBridgeView() : CBackground(), _action(BA_NONE) {} /** * Save the data for the class to file |