[Scummvm-git-logs] scummvm master -> 8d245d39599252f5a1f3b56303e4b8f8d7529fcc

dreammaster dreammaster at scummvm.org
Tue Jan 3 07:45:28 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:
8d245d3959 TITANIC: Fix opening the broken pellerator enabling the hose


Commit: 8d245d39599252f5a1f3b56303e4b8f8d7529fcc
    https://github.com/scummvm/scummvm/commit/8d245d39599252f5a1f3b56303e4b8f8d7529fcc
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-03T01:45:21-05:00

Commit Message:
TITANIC: Fix opening the broken pellerator enabling the hose

Changed paths:
    engines/titanic/game/broken_pell_base.cpp
    engines/titanic/game/broken_pell_base.h
    engines/titanic/game/broken_pellerator.cpp
    engines/titanic/game/broken_pellerator.h
    engines/titanic/game/broken_pellerator_froz.cpp
    engines/titanic/game/pickup/pick_up_hose.cpp


diff --git a/engines/titanic/game/broken_pell_base.cpp b/engines/titanic/game/broken_pell_base.cpp
index 02c2d87..a3825d5 100644
--- a/engines/titanic/game/broken_pell_base.cpp
+++ b/engines/titanic/game/broken_pell_base.cpp
@@ -33,7 +33,7 @@ void CBrokenPellBase::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
 	file->writeNumberLine(_v1, indent);
 	file->writeNumberLine(_v2, indent);
-	file->writeNumberLine(_fieldE0, indent);
+	file->writeNumberLine(_exitAction, indent);
 	CBackground::save(file, indent);
 }
 
@@ -41,7 +41,7 @@ void CBrokenPellBase::load(SimpleFile *file) {
 	file->readNumber();
 	_v1 = file->readNumber();
 	_v2 = file->readNumber();
-	_fieldE0 = file->readNumber();
+	_exitAction = file->readNumber();
 	CBackground::load(file);
 }
 
diff --git a/engines/titanic/game/broken_pell_base.h b/engines/titanic/game/broken_pell_base.h
index 4ca7edd..c5b27d8 100644
--- a/engines/titanic/game/broken_pell_base.h
+++ b/engines/titanic/game/broken_pell_base.h
@@ -33,10 +33,10 @@ protected:
 	static bool _v1;
 	static int _v2;
 
-	int _fieldE0;
+	int _exitAction;
 public:
 	CLASSDEF;
-	CBrokenPellBase() : CBackground(), _fieldE0(0) {}
+	CBrokenPellBase() : CBackground(), _exitAction(0) {}
 
 	/**
 	 * Save the data for the class to file
diff --git a/engines/titanic/game/broken_pellerator.cpp b/engines/titanic/game/broken_pellerator.cpp
index 8fb7244..d3664ac 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;
diff --git a/engines/titanic/game/broken_pellerator.h b/engines/titanic/game/broken_pellerator.h
index 3b8c3ba..f243f4e 100644
--- a/engines/titanic/game/broken_pellerator.h
+++ b/engines/titanic/game/broken_pellerator.h
@@ -34,8 +34,8 @@ class CBrokenPellerator : public CBrokenPellBase {
 	bool ActMsg(CActMsg *msg);
 	bool MovieEndMsg(CMovieEndMsg *msg);
 private:
-	CString _string2;
-	CString _string3;
+	CString _exitLeftView;
+	CString _exitRightView;
 	CString _string4;
 	CString _string5;
 public:
diff --git a/engines/titanic/game/broken_pellerator_froz.cpp b/engines/titanic/game/broken_pellerator_froz.cpp
index 690ab76..7025b37 100644
--- a/engines/titanic/game/broken_pellerator_froz.cpp
+++ b/engines/titanic/game/broken_pellerator_froz.cpp
@@ -85,15 +85,15 @@ bool CBrokenPelleratorFroz::ActMsg(CActMsg *msg) {
 		statusMsg._newStatus = 0;
 		statusMsg.execute("FPickUpHose");
 	} 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) {
@@ -104,7 +104,7 @@ bool CBrokenPelleratorFroz::ActMsg(CActMsg *msg) {
 				else
 					playMovie(72, 84, MOVIE_NOTIFY_OBJECT);
 			} else {
-				switch (_fieldE0) {
+				switch (_exitAction) {
 				case 1:
 					changeView(_string2);
 					break;
@@ -115,7 +115,7 @@ bool CBrokenPelleratorFroz::ActMsg(CActMsg *msg) {
 					break;
 				}
 
-				_fieldE0 = 0;
+				_exitAction = 0;
 			}
 		}
 	}
@@ -136,12 +136,12 @@ bool CBrokenPelleratorFroz::MovieEndMsg(CMovieEndMsg *msg) {
 		statusMsg.execute("FPickUpHose");
 	}
 
-	if (_fieldE0 == 1) {
+	if (_exitAction == 1) {
 		changeView(_string2);
-		_fieldE0 = 0;
-	} else if (_fieldE0 == 2) {
+		_exitAction = 0;
+	} else if (_exitAction == 2) {
 		changeView(_string3);
-		_fieldE0 = 0;
+		_exitAction = 0;
 	}
 
 	return true;
diff --git a/engines/titanic/game/pickup/pick_up_hose.cpp b/engines/titanic/game/pickup/pick_up_hose.cpp
index d07088c..6b7419e 100644
--- a/engines/titanic/game/pickup/pick_up_hose.cpp
+++ b/engines/titanic/game/pickup/pick_up_hose.cpp
@@ -91,7 +91,7 @@ bool CPickUpHose::MouseDragStartMsg(CMouseDragStartMsg *msg) {
 
 bool CPickUpHose::StatusChangeMsg(CStatusChangeMsg *msg) {
 	_cursorId = msg->_newStatus == 1 ? CURSOR_HAND : CURSOR_IGNORE;
-	return true;
+	return CPickUp::StatusChangeMsg(msg);
 }
 
 bool CPickUpHose::EnterViewMsg(CEnterViewMsg *msg) {





More information about the Scummvm-git-logs mailing list