[Scummvm-git-logs] scummvm master -> 13932b68a51ef2b8326e9980b428ee5382e6cf0f
dreammaster
dreammaster at scummvm.org
Sat Dec 17 03:27:48 CET 2016
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:
13932b68a5 TITANIC: Fix entering & exiting first class suites
Commit: 13932b68a51ef2b8326e9980b428ee5382e6cf0f
https://github.com/scummvm/scummvm/commit/13932b68a51ef2b8326e9980b428ee5382e6cf0f
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-12-16T21:27:43-05:00
Commit Message:
TITANIC: Fix entering & exiting first class suites
Changed paths:
engines/titanic/moves/enter_exit_first_class_state.cpp
engines/titanic/moves/enter_exit_first_class_state.h
engines/titanic/titanic.h
diff --git a/engines/titanic/moves/enter_exit_first_class_state.cpp b/engines/titanic/moves/enter_exit_first_class_state.cpp
index efdead5..4b58c1b 100644
--- a/engines/titanic/moves/enter_exit_first_class_state.cpp
+++ b/engines/titanic/moves/enter_exit_first_class_state.cpp
@@ -21,6 +21,7 @@
*/
#include "titanic/moves/enter_exit_first_class_state.h"
+#include "titanic/titanic.h"
namespace Titanic {
@@ -30,13 +31,13 @@ END_MESSAGE_MAP()
void CEnterExitFirstClassState::save(SimpleFile *file, int indent) {
file->writeNumberLine(1, indent);
- file->writeQuotedLine(_viewName, indent);
+ file->writeQuotedLine(g_vm->_stateRoomExitView, indent);
CGameObject::save(file, indent);
}
void CEnterExitFirstClassState::load(SimpleFile *file) {
file->readNumber();
- _viewName = file->readString();
+ g_vm->_stateRoomExitView = file->readString();
CGameObject::load(file);
}
@@ -44,10 +45,12 @@ bool CEnterExitFirstClassState::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
switch (getPassengerClass()) {
case 1:
if (compareRoomNameTo("1stClassLobby")) {
- _viewName = getRoomNodeName() + ".E";
- changeView(_viewName);
+ // Entering room, so save where you were and change to stateroom
+ g_vm->_stateRoomExitView = getRoomNodeName() + ".E";
+ changeView("1stClassState.Node 1.S");
} else if (compareRoomNameTo("1stClassState")) {
- changeView(_viewName);
+ // Return to where you entered room from
+ changeView(g_vm->_stateRoomExitView);
}
break;
diff --git a/engines/titanic/moves/enter_exit_first_class_state.h b/engines/titanic/moves/enter_exit_first_class_state.h
index fe63e55..ea5c52a 100644
--- a/engines/titanic/moves/enter_exit_first_class_state.h
+++ b/engines/titanic/moves/enter_exit_first_class_state.h
@@ -30,8 +30,6 @@ namespace Titanic {
class CEnterExitFirstClassState : public CGameObject {
DECLARE_MESSAGE_MAP;
bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
-private:
- CString _viewName;
public:
CLASSDEF;
diff --git a/engines/titanic/titanic.h b/engines/titanic/titanic.h
index d8e0f88..43f3fa0 100644
--- a/engines/titanic/titanic.h
+++ b/engines/titanic/titanic.h
@@ -123,6 +123,7 @@ public:
StringArray _itemIds;
StringArray _roomNames;
Strings _strings;
+ CString _stateRoomExitView;
public:
TitanicEngine(OSystem *syst, const TitanicGameDescription *gameDesc);
virtual ~TitanicEngine();
More information about the Scummvm-git-logs
mailing list