Skip to content

Commit

Permalink
TITANIC: Fix cruise button on ship controls
Browse files Browse the repository at this point in the history
  • Loading branch information
dreammaster committed Feb 21, 2017
1 parent 75571a8 commit 89efab8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions engines/titanic/game/bridge_view.cpp
Expand Up @@ -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;
Expand All @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions engines/titanic/game/captains_wheel.cpp
Expand Up @@ -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);
Expand All @@ -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();
Expand Down Expand Up @@ -101,7 +101,7 @@ bool CCaptainsWheel::ActMsg(CActMsg *msg) {
if (!_stopEnabled) {
incTransitions();
_stopEnabled = false;
_fieldE4 = 1;
_actionNum = 1;

CTurnOff offMsg;
offMsg.execute(this);
Expand All @@ -111,7 +111,7 @@ bool CCaptainsWheel::ActMsg(CActMsg *msg) {
if (_stopEnabled) {
incTransitions();
_stopEnabled = false;
_fieldE4 = 2;
_actionNum = 2;

CTurnOff offMsg;
offMsg.execute(this);
Expand Down Expand Up @@ -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");
Expand All @@ -200,7 +200,7 @@ bool CCaptainsWheel::MovieEndMsg(CMovieEndMsg *msg) {
break;
}

_fieldE4 = 0;
_actionNum = 0;
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion engines/titanic/game/captains_wheel.h
Expand Up @@ -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;
Expand Down

0 comments on commit 89efab8

Please sign in to comment.