[Scummvm-cvs-logs] scummvm master -> 06008ae5caf0e086b0952c73bd5047e9c78cd921

dreammaster dreammaster at scummvm.org
Sun Aug 21 17:25:45 CEST 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:
06008ae5ca TITANIC: Implemented more game classes


Commit: 06008ae5caf0e086b0952c73bd5047e9c78cd921
    https://github.com/scummvm/scummvm/commit/06008ae5caf0e086b0952c73bd5047e9c78cd921
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-08-21T11:25:39-04:00

Commit Message:
TITANIC: Implemented more game classes

Changed paths:
    engines/titanic/carry/eye.cpp
    engines/titanic/carry/eye.h
    engines/titanic/carry/head_piece.h
    engines/titanic/game/fan.cpp
    engines/titanic/game/fan.h
    engines/titanic/game/television.h
    engines/titanic/game/transport/lift.h
    engines/titanic/moves/enter_sec_class_state.cpp
    engines/titanic/moves/exit_arboretum.cpp
    engines/titanic/moves/exit_arboretum.h
    engines/titanic/moves/exit_bridge.cpp
    engines/titanic/moves/exit_bridge.h
    engines/titanic/moves/exit_lift.cpp
    engines/titanic/moves/exit_lift.h
    engines/titanic/moves/exit_state_room.cpp
    engines/titanic/moves/exit_state_room.h
    engines/titanic/moves/exit_tiania.cpp
    engines/titanic/moves/exit_tiania.h



diff --git a/engines/titanic/carry/eye.cpp b/engines/titanic/carry/eye.cpp
index 5de1789..400df2f 100644
--- a/engines/titanic/carry/eye.cpp
+++ b/engines/titanic/carry/eye.cpp
@@ -21,22 +21,119 @@
  */
 
 #include "titanic/carry/eye.h"
+#include "titanic/game/head_slot.h"
+#include "titanic/pet_control/pet_control.h"
+#include "titanic/game/transport/lift.h"
+#include "titanic/game/television.h"
 
 namespace Titanic {
 
-CEye::CEye() : CHeadPiece(), _eyeNum(0) {
+BEGIN_MESSAGE_MAP(CEye, CHeadPiece)
+	ON_MESSAGE(UseWithOtherMsg)
+	ON_MESSAGE(UseWithCharMsg)
+	ON_MESSAGE(ActMsg)
+	ON_MESSAGE(PETGainedObjectMsg)
+	ON_MESSAGE(PassOnDragStartMsg)
+END_MESSAGE_MAP()
+
+CEye::CEye() : CHeadPiece(), _eyeFlag(false) {
 }
 
 void CEye::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
-	file->writeNumberLine(_eyeNum, indent);
+	file->writeNumberLine(_eyeFlag, indent);
 	CHeadPiece::save(file, indent);
 }
 
 void CEye::load(SimpleFile *file) {
 	file->readNumber();
-	_eyeNum = file->readNumber();
+	_eyeFlag = file->readNumber();
 	CHeadPiece::load(file);
 }
 
+
+bool CEye::UseWithOtherMsg(CUseWithOtherMsg *msg) {
+	CHeadSlot *slot = dynamic_cast<CHeadSlot *>(msg->_other);
+	if (slot) {
+		petMoveToHiddenRoom();
+		_flag = true;
+		CAddHeadPieceMsg headMsg(getName());
+
+		if (headMsg._value != "NULL")
+			headMsg.execute(isEquals("Eye1") ? "Eye1Slot" : "Eye2Slot");
+	} else if (msg->_other->isEquals("LiftbotWithoutHead")) {
+		CPetControl *pet = getPetControl();
+		if (!CLift::_v1 && pet->getRoomsElevatorNum() == 4) {
+			_eyeFlag = true;
+			setPosition(_origPos);
+			setVisible(false);
+			CActMsg actMsg1(getName());
+			actMsg1.execute("GetLiftEye");
+
+			CActMsg actMsg2("AddWrongHead");
+			actMsg2.execute("FaultyLiftbot");
+		}
+	} else {
+		return CCarry::UseWithOtherMsg(msg);
+	}
+
+	return true;
+}
+
+bool CEye::UseWithCharMsg(CUseWithCharMsg *msg) {
+	CLift *lift = dynamic_cast<CLift *>(msg->_character);
+	if (lift && lift->getName() == "Well") {
+		CPetControl *pet = getPetControl();
+		if (!CLift::_v1 && pet->getRoomsElevatorNum() == 4) {
+			_eyeFlag = true;
+			setPosition(_origPos);
+			setVisible(false);
+
+			CActMsg actMsg1(getName());
+			actMsg1.execute("GetLiftEye");
+			CActMsg actMsg2("AddWrongHead");
+			actMsg2.execute(msg->_character);
+		}
+
+		return true;
+	} else {
+		return CHeadPiece::UseWithCharMsg(msg);
+	}
+}
+
+bool CEye::ActMsg(CActMsg *msg) {
+	if (msg->_action == "BellbotGetLight") {
+		setVisible(true);
+		petAddToInventory();
+		playSound("z#47.wav");
+
+		CActMsg actMsg("Eye Removed");
+		actMsg.execute("1stClassState");
+	} else {
+		_eyeFlag = false;
+
+		CActMsg actMsg("LoseHead");
+		actMsg.execute("FaultyLiftbot");
+	}
+
+	return true;
+}
+
+bool CEye::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
+	if (isEquals("Eye1"))
+		CTelevision::_v5 = 0;
+
+	return CHeadPiece::PETGainedObjectMsg(msg);
+}
+
+bool CEye::PassOnDragStartMsg(CPassOnDragStartMsg *msg) {
+	setVisible(true);
+	if (_eyeFlag)
+		CTelevision::_v6 = 0;
+	else if (isEquals("Eye1"))
+		CTelevision::_v5 = 0;
+
+	return CHeadPiece::PassOnDragStartMsg(msg);
+}
+
 } // End of namespace Titanic
diff --git a/engines/titanic/carry/eye.h b/engines/titanic/carry/eye.h
index 066a856..886bd39 100644
--- a/engines/titanic/carry/eye.h
+++ b/engines/titanic/carry/eye.h
@@ -28,8 +28,14 @@
 namespace Titanic {
 
 class CEye : public CHeadPiece {
+	DECLARE_MESSAGE_MAP;
+	bool UseWithOtherMsg(CUseWithOtherMsg *msg);
+	bool UseWithCharMsg(CUseWithCharMsg *msg);
+	bool ActMsg(CActMsg *msg);
+	bool PETGainedObjectMsg(CPETGainedObjectMsg *msg);
+	bool PassOnDragStartMsg(CPassOnDragStartMsg *msg);
 private:
-	int _eyeNum;
+	bool _eyeFlag;
 public:
 	CLASSDEF;
 	CEye();
diff --git a/engines/titanic/carry/head_piece.h b/engines/titanic/carry/head_piece.h
index a764960..367f781 100644
--- a/engines/titanic/carry/head_piece.h
+++ b/engines/titanic/carry/head_piece.h
@@ -33,7 +33,7 @@ class CHeadPiece : public CCarry {
 	bool SenseWorkingMsg(CSenseWorkingMsg *msg);
 	bool PETGainedObjectMsg(CPETGainedObjectMsg *msg);
 	bool MouseDragStartMsg(CMouseDragStartMsg *msg);
-private:
+protected:
 	bool _flag;
 	CString _string6;
 	bool _field13C;
diff --git a/engines/titanic/game/fan.cpp b/engines/titanic/game/fan.cpp
index eabaf63..3fdebbd 100644
--- a/engines/titanic/game/fan.cpp
+++ b/engines/titanic/game/fan.cpp
@@ -24,9 +24,15 @@
 
 namespace Titanic {
 
+BEGIN_MESSAGE_MAP(CFan, CGameObject)
+	ON_MESSAGE(EnterViewMsg)
+	ON_MESSAGE(StatusChangeMsg)
+	ON_MESSAGE(MovieEndMsg)
+END_MESSAGE_MAP()
+
 void CFan::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
-	file->writeNumberLine(_value1, indent);
+	file->writeNumberLine(_state, indent);
 	file->writeNumberLine(_value2, indent);
 
 	CGameObject::save(file, indent);
@@ -34,10 +40,87 @@ void CFan::save(SimpleFile *file, int indent) {
 
 void CFan::load(SimpleFile *file) {
 	file->readNumber();
-	_value1 = file->readNumber();
+	_state = file->readNumber();
 	_value2 = file->readNumber();
 
 	CGameObject::load(file);
 }
 
+bool CFan::EnterViewMsg(CEnterViewMsg *msg) {
+	switch (_state) {
+	case 0:
+	case 1:
+		loadFrame(0);
+		break;
+	case 2:
+		playMovie(24, 34, MOVIE_REPEAT);
+		break;
+	case 3:
+		playMovie(63, 65, MOVIE_REPEAT);
+		break;
+	}
+
+	return true;
+}
+
+bool CFan::StatusChangeMsg(CStatusChangeMsg *msg) {
+	if (msg->_newStatus >= -1 && msg->_newStatus < 3) {
+		int oldState = _state;
+		_state = msg->_newStatus;
+		switch (_state) {
+		case -1:
+		case 0:
+			if (oldState == 0)
+				loadFrame(0);
+			else if (oldState == 1)
+				playMovie(24, 34, MOVIE_STOP_PREVIOUS | MOVIE_NOTIFY_OBJECT);
+			else if (oldState == 2) {
+				playMovie(66, 79, MOVIE_STOP_PREVIOUS);
+				playMovie(24, 34, MOVIE_NOTIFY_OBJECT);
+			}
+			break;
+
+		case 1:
+			if (oldState == 0)
+				playMovie(24, 34, MOVIE_REPEAT | MOVIE_STOP_PREVIOUS);
+			if (oldState == 2)
+				playMovie(66, 79, MOVIE_NOTIFY_OBJECT | MOVIE_STOP_PREVIOUS);
+			break;
+
+		case 2:
+			if (oldState == 1)
+				playMovie(48, 62, MOVIE_NOTIFY_OBJECT | MOVIE_STOP_PREVIOUS);
+			break;
+
+		default:
+			break;
+		}
+	}
+
+	msg->execute("PromDeckFanNoises");
+	return true;
+}
+
+bool CFan::MovieEndMsg(CMovieEndMsg *msg) {
+	switch (_state) {
+	case -1:
+	case 0:
+		loadFrame(0);
+		break;
+
+	case 1:
+		playMovie(24, 34, MOVIE_REPEAT);
+		break;
+
+	case 2:
+		playMovie(63, 65, MOVIE_REPEAT);
+		break;
+
+	default:
+		break;
+	}
+
+	return true;
+}
+
 } // End of namespace Titanic
diff --git a/engines/titanic/game/fan.h b/engines/titanic/game/fan.h
index 2c5a241..9cffce8 100644
--- a/engines/titanic/game/fan.h
+++ b/engines/titanic/game/fan.h
@@ -28,11 +28,15 @@
 namespace Titanic {
 
 class CFan : public CGameObject {
+	DECLARE_MESSAGE_MAP;
+	bool EnterViewMsg(CEnterViewMsg *msg);
+	bool StatusChangeMsg(CStatusChangeMsg *msg);
+	bool MovieEndMsg(CMovieEndMsg *msg);
 public:
-	int _value1, _value2;
+	int _state, _value2;
 public:
 	CLASSDEF;
-	CFan() : CGameObject(), _value1(0), _value2(0) {}
+	CFan() : CGameObject(), _state(0), _value2(0) {}
 
 	/**
 	 * Save the data for the class to file
diff --git a/engines/titanic/game/television.h b/engines/titanic/game/television.h
index 6e6d9b2..2e8d469 100644
--- a/engines/titanic/game/television.h
+++ b/engines/titanic/game/television.h
@@ -45,18 +45,18 @@ class CTelevision : public CBackground {
 	bool TurnOn(CTurnOn *msg);
 	bool LightsMsg(CLightsMsg *msg);
 private:
+	int _fieldE0;
+	int _fieldE4;
+	bool _isOn;
+	int _fieldEC;
+	int _soundHandle;
+public:
 	static int _v1;
 	static bool _turnOn;
 	static int _v3;
 	static int _v4;
 	static int _v5;
 	static int _v6;
-private:
-	int _fieldE0;
-	int _fieldE4;
-	bool _isOn;
-	int _fieldEC;
-	int _soundHandle;
 public:
 	CLASSDEF;
 	CTelevision();
diff --git a/engines/titanic/game/transport/lift.h b/engines/titanic/game/transport/lift.h
index 4595f0f..763e545 100644
--- a/engines/titanic/game/transport/lift.h
+++ b/engines/titanic/game/transport/lift.h
@@ -31,7 +31,7 @@ namespace Titanic {
 class CLift : public CTransport {
 	DECLARE_MESSAGE_MAP;
 	bool EnterRoomMsg(CEnterRoomMsg *msg);
-private:
+public:
 	static int _v1;
 	static int _v2;
 	static int _v3;
diff --git a/engines/titanic/moves/enter_sec_class_state.cpp b/engines/titanic/moves/enter_sec_class_state.cpp
index 406803b..2a35621 100644
--- a/engines/titanic/moves/enter_sec_class_state.cpp
+++ b/engines/titanic/moves/enter_sec_class_state.cpp
@@ -70,7 +70,7 @@ bool CEnterSecClassState::StatusChangeMsg(CStatusChangeMsg *msg) {
 			_soundHandle = queueSound("b#31.wav", _soundHandle);
 		}
 		if (msg->_newStatus == 3)
-			msg->_newStatus == 2;
+			msg->_newStatus = 2;
 	} else {
 		changeView("SecClassLittleLift.Node 1.N");
 		if (msg->_newStatus == 1) {
diff --git a/engines/titanic/moves/exit_arboretum.cpp b/engines/titanic/moves/exit_arboretum.cpp
index d606510..169adb8 100644
--- a/engines/titanic/moves/exit_arboretum.cpp
+++ b/engines/titanic/moves/exit_arboretum.cpp
@@ -21,29 +21,85 @@
  */
 
 #include "titanic/moves/exit_arboretum.h"
+#include "titanic/titanic.h"
 
 namespace Titanic {
 
+BEGIN_MESSAGE_MAP(CExitArboretum, CMovePlayerTo)
+	ON_MESSAGE(MouseButtonDownMsg)
+	ON_MESSAGE(ChangeSeasonMsg)
+	ON_MESSAGE(TurnOn)
+	ON_MESSAGE(TurnOff)
+END_MESSAGE_MAP()
+
 CExitArboretum::CExitArboretum() : CMovePlayerTo(), 
-		_fieldC8(0), _fieldCC(0), _fieldD0(1) {
+		_seasonNum(0), _fieldCC(0), _enabled(true) {
 }
 
 void CExitArboretum::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
-	file->writeNumberLine(_fieldC8, indent);
+	file->writeNumberLine(_seasonNum, indent);
 	file->writeNumberLine(_fieldCC, indent);
-	file->writeNumberLine(_fieldD0, indent);
+	file->writeNumberLine(_enabled, indent);
 
 	CMovePlayerTo::save(file, indent);
 }
 
 void CExitArboretum::load(SimpleFile *file) {
 	file->readNumber();
-	_fieldC8 = file->readNumber();
+	_seasonNum = file->readNumber();
 	_fieldCC = file->readNumber();
-	_fieldD0 = file->readNumber();
+	_enabled = file->readNumber();
 
 	CMovePlayerTo::load(file);
 }
 
+bool CExitArboretum::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+	if (_enabled) {
+		CActMsg actMsg;
+		if (_seasonNum == AUTUMN) {
+			switch (_fieldCC) {
+			case 0:
+				actMsg._action = "ExitLFrozen";
+				break;
+			case 1:
+				actMsg._action = "ExitRFrozen";
+				break;
+			default:
+				break;
+			}
+		} else {
+			switch (_fieldCC) {
+			case 0:
+				actMsg._action = "ExitLNormal";
+				break;
+			case 1:
+				actMsg._action = "ExitRNormal";
+				break;
+			default:
+				break;
+			}
+		}
+
+		actMsg.execute("ArbGate");
+	}
+
+	return true;
+}
+
+bool CExitArboretum::ChangeSeasonMsg(CChangeSeasonMsg *msg) {
+	_seasonNum = (_seasonNum + 1) % 4;
+	return true;
+}
+
+bool CExitArboretum::TurnOn(CTurnOn *msg) {
+	_enabled = false;
+	return true;
+}
+
+bool CExitArboretum::TurnOff(CTurnOff *msg) {
+	_enabled = true;
+	return true;
+}
+
 } // End of namespace Titanic
diff --git a/engines/titanic/moves/exit_arboretum.h b/engines/titanic/moves/exit_arboretum.h
index f6ebf71..b65eb92 100644
--- a/engines/titanic/moves/exit_arboretum.h
+++ b/engines/titanic/moves/exit_arboretum.h
@@ -28,10 +28,15 @@
 namespace Titanic {
 
 class CExitArboretum : public CMovePlayerTo {
+	DECLARE_MESSAGE_MAP;
+	bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
+	bool ChangeSeasonMsg(CChangeSeasonMsg *msg);
+	bool TurnOn(CTurnOn *msg);
+	bool TurnOff(CTurnOff *msg);
 protected:
-	int _fieldC8;
+	int _seasonNum;
 	int _fieldCC;
-	int _fieldD0;
+	bool _enabled;
 public:
 	CLASSDEF;
 	CExitArboretum();
diff --git a/engines/titanic/moves/exit_bridge.cpp b/engines/titanic/moves/exit_bridge.cpp
index b913911..6b69b88 100644
--- a/engines/titanic/moves/exit_bridge.cpp
+++ b/engines/titanic/moves/exit_bridge.cpp
@@ -24,21 +24,35 @@
 
 namespace Titanic {
 
-CExitBridge::CExitBridge() : CMovePlayerTo() {
+BEGIN_MESSAGE_MAP(CExitBridge, CMovePlayerTo)
+	ON_MESSAGE(MouseButtonDownMsg)
+END_MESSAGE_MAP()
+
+CExitBridge::CExitBridge() : CMovePlayerTo(), _viewName("Titania.Node 1.S") {
 }
 
 void CExitBridge::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
-	file->writeQuotedLine(_string1, indent);
+	file->writeQuotedLine(_viewName, indent);
 
 	CMovePlayerTo::save(file, indent);
 }
 
 void CExitBridge::load(SimpleFile *file) {
 	file->readNumber();
-	_string1 = file->readString();
+	_viewName = file->readString();
 
 	CMovePlayerTo::load(file);
 }
 
+bool CExitBridge::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+	if (getGameManager()) {
+		changeView(_destination);
+		playSound("a#53.wav");
+		changeView(_viewName);
+	}
+
+	return true;
+}
+
 } // End of namespace Titanic
diff --git a/engines/titanic/moves/exit_bridge.h b/engines/titanic/moves/exit_bridge.h
index 4ab2952..6d8ba01 100644
--- a/engines/titanic/moves/exit_bridge.h
+++ b/engines/titanic/moves/exit_bridge.h
@@ -28,8 +28,10 @@
 namespace Titanic {
 
 class CExitBridge : public CMovePlayerTo {
+	DECLARE_MESSAGE_MAP;
+	bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
 private:
-	CString _string1;
+	CString _viewName;
 public:
 	CLASSDEF;
 	CExitBridge();
diff --git a/engines/titanic/moves/exit_lift.cpp b/engines/titanic/moves/exit_lift.cpp
index a264be8..de9a311 100644
--- a/engines/titanic/moves/exit_lift.cpp
+++ b/engines/titanic/moves/exit_lift.cpp
@@ -21,19 +21,101 @@
  */
 
 #include "titanic/moves/exit_lift.h"
+#include "titanic/pet_control/pet_control.h"
 
 namespace Titanic {
 
+BEGIN_MESSAGE_MAP(CExitLift, CGameObject)
+	ON_MESSAGE(MouseButtonDownMsg)
+END_MESSAGE_MAP()
+
+CExitLift::CExitLift() : CGameObject(), _viewName("NULL") {
+}
+
 void CExitLift::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
-	file->writeQuotedLine(_value, indent);
+	file->writeQuotedLine(_viewName, indent);
 	CGameObject::save(file, indent);
 }
 
 void CExitLift::load(SimpleFile *file) {
 	file->readNumber();
-	_value = file->readString();
+	_viewName = file->readString();
 	CGameObject::load(file);
 }
 
+bool CExitLift::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+	CPetControl *pet = getPetControl();
+	int floorNum = pet->getRoomsFloorNum();//ebx
+	int elevNum = pet->getRoomsElevatorNum(); //eax
+
+	if (floorNum == 39) {
+		switch (elevNum) {
+		case 1:
+			_viewName = "BottomOfWell.Node 5.SE";
+			break;
+		case 3:
+			_viewName = "BottomOfWell.Node 1.NW";
+			break;
+		default:
+			break;
+		}
+	} else if (floorNum > 27) {
+		switch (elevNum) {
+		case 1:
+		case 2:
+			_viewName = "SgtLobby.Node 1.N";
+			break;
+		default:
+			break;
+		}
+	} else if (floorNum > 19) {
+		switch (elevNum) {
+		case 0:
+		case 2:
+			_viewName = "2ndClassLobby.Node 8.N";
+			break;
+		case 1:
+		case 3:
+			_viewName = "2ndClassLobby.Node 1.N";
+			break;
+		default:
+			break;
+		}
+	} else if (floorNum > 1) {
+		switch (elevNum) {
+		case 0:
+		case 2:
+			_viewName = "1stClassLobby.Node 1.W";
+			break;
+		case 1:
+		case 3:
+			_viewName = "1stClassLobby.Node 1.E";
+			break;
+		default:
+			break;
+		}
+	} else {
+		switch (elevNum) {
+		case 0:
+			_viewName = "TopOfWell.Node 6.E";
+			break;
+		case 1:
+			_viewName = "TopOfWell.Node 6.W";
+			break;
+		case 2:
+			_viewName = "TopOfWell.Node 10.W";
+			break;
+		case 3:
+			_viewName = "TopOfWell.Node 10.E";
+			break;
+		default:
+			break;
+		}
+	}
+
+	changeView(_viewName);
+	return true;
+}
+
 } // End of namespace Titanic
diff --git a/engines/titanic/moves/exit_lift.h b/engines/titanic/moves/exit_lift.h
index 04dabfa..93d760c 100644
--- a/engines/titanic/moves/exit_lift.h
+++ b/engines/titanic/moves/exit_lift.h
@@ -28,10 +28,13 @@
 namespace Titanic {
 
 class CExitLift : public CGameObject {
+	DECLARE_MESSAGE_MAP;
+	bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
 public:
-	CString _value;
+	CString _viewName;
 public:
 	CLASSDEF;
+	CExitLift();
 
 	/**
 	 * Save the data for the class to file
diff --git a/engines/titanic/moves/exit_state_room.cpp b/engines/titanic/moves/exit_state_room.cpp
index 1c78a69..f0b0534 100644
--- a/engines/titanic/moves/exit_state_room.cpp
+++ b/engines/titanic/moves/exit_state_room.cpp
@@ -24,7 +24,11 @@
 
 namespace Titanic {
 
-CExitStateRoom::CExitStateRoom() : CMovePlayerTo(), _fieldC8(0) {
+BEGIN_MESSAGE_MAP(CExitStateRoom, CMovePlayerTo)
+	ON_MESSAGE(MouseButtonDownMsg)
+END_MESSAGE_MAP()
+
+CExitStateRoom::CExitStateRoom() : CMovePlayerTo() {
 }
 
 void CExitStateRoom::save(SimpleFile *file, int indent) {
@@ -37,4 +41,9 @@ void CExitStateRoom::load(SimpleFile *file) {
 	CMovePlayerTo::load(file);
 }
 
+bool CExitStateRoom::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+	changeView(_destination);
+	return true;
+}
+
 } // End of namespace Titanic
diff --git a/engines/titanic/moves/exit_state_room.h b/engines/titanic/moves/exit_state_room.h
index c0f9737..19322ce 100644
--- a/engines/titanic/moves/exit_state_room.h
+++ b/engines/titanic/moves/exit_state_room.h
@@ -28,8 +28,8 @@
 namespace Titanic {
 
 class CExitStateRoom : public CMovePlayerTo {
-protected:
-	int _fieldC8;
+	DECLARE_MESSAGE_MAP;
+	bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
 public:
 	CLASSDEF;
 	CExitStateRoom();
diff --git a/engines/titanic/moves/exit_tiania.cpp b/engines/titanic/moves/exit_tiania.cpp
index 6cb2422..fb0f149 100644
--- a/engines/titanic/moves/exit_tiania.cpp
+++ b/engines/titanic/moves/exit_tiania.cpp
@@ -24,16 +24,20 @@
 
 namespace Titanic {
 
-CExitTiania::CExitTiania() : CMovePlayerTo(), _fieldC8(0),
-		_string1("NULL"), _string2("NULL"), _string3("NULL") {
+BEGIN_MESSAGE_MAP(CExitTiania, CMovePlayerTo)
+	ON_MESSAGE(MouseButtonDownMsg)
+END_MESSAGE_MAP()
+
+CExitTiania::CExitTiania() : CMovePlayerTo(), _fieldC8(0) {
+	_viewNames[0] = _viewNames[1] = _viewNames[2] = "NULL";
 }
 
 void CExitTiania::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
 	file->writeNumberLine(_fieldC8, indent);
-	file->writeQuotedLine(_string1, indent);
-	file->writeQuotedLine(_string2, indent);
-	file->writeQuotedLine(_string3, indent);
+	file->writeQuotedLine(_viewNames[0], indent);
+	file->writeQuotedLine(_viewNames[1], indent);
+	file->writeQuotedLine(_viewNames[2], indent);
 
 	CMovePlayerTo::save(file, indent);
 }
@@ -41,11 +45,29 @@ void CExitTiania::save(SimpleFile *file, int indent) {
 void CExitTiania::load(SimpleFile *file) {
 	file->readNumber();
 	_fieldC8 = file->readNumber();
-	_string1 = file->readString();
-	_string2 = file->readString();
-	_string3 = file->readString();
+	_viewNames[0] = file->readString();
+	_viewNames[1] = file->readString();
+	_viewNames[2] = file->readString();
 
 	CMovePlayerTo::load(file);
 }
 
+bool CExitTiania::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
+	if (getPassengerClass() == 4) {
+		petDisplayMessage(1, "For mysterious and unknowable reasons, "
+			"this transport is temporarily out of order.");
+	} else {
+		lockMouse();
+		for (int idx = 0; idx < 3; ++idx)
+			changeView(_viewNames[idx]);
+		changeView("Titania.Node 16.N");
+		changeView("Dome.Node 4.N");
+		changeView("Dome.Node 3.N");
+		changeView("Dome.Node 3.S");
+		unlockMouse();
+	}
+
+	return true;
+}
+
 } // End of namespace Titanic
diff --git a/engines/titanic/moves/exit_tiania.h b/engines/titanic/moves/exit_tiania.h
index c2b7772..b911e10 100644
--- a/engines/titanic/moves/exit_tiania.h
+++ b/engines/titanic/moves/exit_tiania.h
@@ -28,11 +28,11 @@
 namespace Titanic {
 
 class CExitTiania : public CMovePlayerTo {
+	DECLARE_MESSAGE_MAP;
+	bool MouseButtonDownMsg(CMouseButtonDownMsg *msg);
 private:
 	int _fieldC8;
-	CString _string1;
-	CString _string2;
-	CString _string3;
+	CString _viewNames[3];
 public:
 	CLASSDEF;
 	CExitTiania();






More information about the Scummvm-git-logs mailing list