diff options
Diffstat (limited to 'engines')
| -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  | 
