[Scummvm-git-logs] scummvm master -> 89efab8bddd76786c3b1ca82556ee9e5486d0cf9

dreammaster dreammaster at scummvm.org
Tue Feb 21 05:32:33 CET 2017


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
89efab8bdd TITANIC: Fix cruise button on ship controls


Commit: 89efab8bddd76786c3b1ca82556ee9e5486d0cf9
    https://github.com/scummvm/scummvm/commit/89efab8bddd76786c3b1ca82556ee9e5486d0cf9
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-02-20T23:32:27-05:00

Commit Message:
TITANIC: Fix cruise button on ship controls

Changed paths:
    engines/titanic/game/bridge_view.cpp
    engines/titanic/game/captains_wheel.cpp
    engines/titanic/game/captains_wheel.h


diff --git a/engines/titanic/game/bridge_view.cpp b/engines/titanic/game/bridge_view.cpp
index 5b2b880..f8429f0 100644
--- a/engines/titanic/game/bridge_view.cpp
+++ b/engines/titanic/game/bridge_view.cpp
@@ -68,7 +68,7 @@ bool CBridgeView::ActMsg(CActMsg *msg) {
 			_mode = 2;
 			setVisible(true);
 			playMovie(MOVIE_NOTIFY_OBJECT);
-		} else if (msg->_action == "GoENd") {
+		} else if (msg->_action == "GoEnd") {
 			_mode = 3;
 			setVisible(true);
 			CChangeMusicMsg musicMsg;
@@ -87,20 +87,20 @@ bool CBridgeView::MovieEndMsg(CMovieEndMsg *msg) {
 	offMsg.execute("EngineSounds");
 
 	switch (_mode) {
-	case 0:
 	case 1:
+	case 2:
 		setVisible(false);
 		decTransitions();
 		break;
 
-	case 2: {
+	case 3: {
 		setVisible(false);
 		CActMsg actMsg("End");
 		actMsg.execute("HomeSequence");
 		break;
 	}
 
-	case 3:
+	case 4:
 		setVisible(false);
 		changeView("TheEnd.Node 3.N");
 		break;
diff --git a/engines/titanic/game/captains_wheel.cpp b/engines/titanic/game/captains_wheel.cpp
index eabee7e..1f0b177 100644
--- a/engines/titanic/game/captains_wheel.cpp
+++ b/engines/titanic/game/captains_wheel.cpp
@@ -34,14 +34,14 @@ BEGIN_MESSAGE_MAP(CCaptainsWheel, CBackground)
 END_MESSAGE_MAP()
 
 CCaptainsWheel::CCaptainsWheel() : CBackground(),
-		_stopEnabled(false), _fieldE4(0), _fieldE8(0),
+		_stopEnabled(false), _actionNum(0), _fieldE8(0),
 		_cruiseEnabled(false), _goEnabled(false), _fieldF4(0) {
 }
 
 void CCaptainsWheel::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
 	file->writeNumberLine(_stopEnabled, indent);
-	file->writeNumberLine(_fieldE4, indent);
+	file->writeNumberLine(_actionNum, indent);
 	file->writeNumberLine(_fieldE8, indent);
 	file->writeNumberLine(_cruiseEnabled, indent);
 	file->writeNumberLine(_goEnabled, indent);
@@ -53,7 +53,7 @@ void CCaptainsWheel::save(SimpleFile *file, int indent) {
 void CCaptainsWheel::load(SimpleFile *file) {
 	file->readNumber();
 	_stopEnabled = file->readNumber();
-	_fieldE4 = file->readNumber();
+	_actionNum = file->readNumber();
 	_fieldE8 = file->readNumber();
 	_cruiseEnabled = file->readNumber();
 	_goEnabled = file->readNumber();
@@ -101,7 +101,7 @@ bool CCaptainsWheel::ActMsg(CActMsg *msg) {
 		if (!_stopEnabled) {
 			incTransitions();
 			_stopEnabled = false;
-			_fieldE4 = 1;
+			_actionNum = 1;
 
 			CTurnOff offMsg;
 			offMsg.execute(this);
@@ -111,7 +111,7 @@ bool CCaptainsWheel::ActMsg(CActMsg *msg) {
 		if (_stopEnabled) {
 			incTransitions();
 			_stopEnabled = false;
-			_fieldE4 = 2;
+			_actionNum = 2;
 
 			CTurnOff offMsg;
 			offMsg.execute(this);
@@ -183,7 +183,7 @@ bool CCaptainsWheel::MovieEndMsg(CMovieEndMsg *msg) {
 	}
 
 	if (msg->_endFrame == 168) {
-		switch (_fieldE4) {
+		switch (_actionNum) {
 		case 1: {
 			CActMsg actMsg(starIsSolved() ? "GoEnd" : "Go");
 			actMsg.execute("GoSequence");
@@ -200,7 +200,7 @@ bool CCaptainsWheel::MovieEndMsg(CMovieEndMsg *msg) {
 			break;
 		}
 
-		_fieldE4 = 0;
+		_actionNum = 0;
 	}
 
 	return true;
diff --git a/engines/titanic/game/captains_wheel.h b/engines/titanic/game/captains_wheel.h
index a8a8553..7dce1ac 100644
--- a/engines/titanic/game/captains_wheel.h
+++ b/engines/titanic/game/captains_wheel.h
@@ -37,7 +37,7 @@ class CCaptainsWheel : public CBackground {
 	bool MovieEndMsg(CMovieEndMsg *msg);
 public:
 	bool _stopEnabled;
-	int _fieldE4;
+	int _actionNum;
 	int _fieldE8;
 	bool _cruiseEnabled;
 	bool _goEnabled;





More information about the Scummvm-git-logs mailing list