aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorPaul Gilbert2017-01-03 01:45:21 -0500
committerPaul Gilbert2017-01-03 01:45:21 -0500
commit8d245d39599252f5a1f3b56303e4b8f8d7529fcc (patch)
treece5b3aeaaf644e3d800ce7c9300f109acf6ae5f9 /engines
parent96c783899c9c05f0e32da1668ae990d50f46b7f1 (diff)
downloadscummvm-rg350-8d245d39599252f5a1f3b56303e4b8f8d7529fcc.tar.gz
scummvm-rg350-8d245d39599252f5a1f3b56303e4b8f8d7529fcc.tar.bz2
scummvm-rg350-8d245d39599252f5a1f3b56303e4b8f8d7529fcc.zip
TITANIC: Fix opening the broken pellerator enabling the hose
Diffstat (limited to 'engines')
-rw-r--r--engines/titanic/game/broken_pell_base.cpp4
-rw-r--r--engines/titanic/game/broken_pell_base.h4
-rw-r--r--engines/titanic/game/broken_pellerator.cpp30
-rw-r--r--engines/titanic/game/broken_pellerator.h4
-rw-r--r--engines/titanic/game/broken_pellerator_froz.cpp18
-rw-r--r--engines/titanic/game/pickup/pick_up_hose.cpp2
6 files changed, 32 insertions, 30 deletions
diff --git a/engines/titanic/game/broken_pell_base.cpp b/engines/titanic/game/broken_pell_base.cpp
index 02c2d873ac..a3825d503e 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 4ca7eddd20..c5b27d88bf 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 8fb7244b7e..d3664acccd 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 3b8c3ba587..f243f4ebfe 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 690ab76820..7025b37a0c 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 d07088cefd..6b7419e403 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) {