[Scummvm-git-logs] scummvm master -> fc818fd2d640b9c2ec705cb926359bf201399724

dreammaster dreammaster at scummvm.org
Mon Jan 23 05:27:46 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:
fc818fd2d6 TITANIC: Fix seeing and getting crushed tv


Commit: fc818fd2d640b9c2ec705cb926359bf201399724
    https://github.com/scummvm/scummvm/commit/fc818fd2d640b9c2ec705cb926359bf201399724
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-22T23:27:38-05:00

Commit Message:
TITANIC: Fix seeing and getting crushed tv

Changed paths:
    engines/titanic/game/bottom_of_well_monitor.cpp
    engines/titanic/game/bottom_of_well_monitor.h


diff --git a/engines/titanic/game/bottom_of_well_monitor.cpp b/engines/titanic/game/bottom_of_well_monitor.cpp
index 3821104..bf19023 100644
--- a/engines/titanic/game/bottom_of_well_monitor.cpp
+++ b/engines/titanic/game/bottom_of_well_monitor.cpp
@@ -31,46 +31,46 @@ BEGIN_MESSAGE_MAP(CBottomOfWellMonitor, CGameObject)
 	ON_MESSAGE(LeaveViewMsg)
 END_MESSAGE_MAP()
 
-int CBottomOfWellMonitor::_v1;
-int CBottomOfWellMonitor::_v2;
+bool CBottomOfWellMonitor::_tvPresent;
+bool CBottomOfWellMonitor::_headPresent;
 
 void CBottomOfWellMonitor::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
-	file->writeNumberLine(_v1, indent);
-	file->writeNumberLine(_v2, indent);
+	file->writeNumberLine(_tvPresent, indent);
+	file->writeNumberLine(_headPresent, indent);
 	file->writeNumberLine(_flag, indent);
 	CGameObject::save(file, indent);
 }
 
 void CBottomOfWellMonitor::load(SimpleFile *file) {
 	file->readNumber();
-	_v1 = file->readNumber();
-	_v2 = file->readNumber();
+	_tvPresent = file->readNumber();
+	_headPresent = file->readNumber();
 	_flag = file->readNumber();
 	CGameObject::load(file);
 }
 
 bool CBottomOfWellMonitor::ActMsg(CActMsg *msg) {
-	if (msg->_action == "TelevisionTaken") {
-		_v1 = 0;
+	if (msg->_action == "ThrownTVDownWell") {
+		_tvPresent = true;
+		CVisibleMsg visibleMsg;
+		visibleMsg.execute("CrushedTV2NE");
+		visibleMsg.execute("CrushedTV4SW");
+		_cursorId = CURSOR_MOVE_DOWN1;
+	} else if (msg->_action == "TelevisionTaken") {
+		_tvPresent = false;
 		_cursorId = CURSOR_ARROW;
 		CVisibleMsg visibleMsg;
 		visibleMsg.execute("CrushedTV2NE");
 		visibleMsg.execute("CrushedTV4SW");
 		_cursorId = CURSOR_ARROW;
 	} else if (msg->_action == "LiftbotHeadTaken") {
-		_v2 = 0;
+		_headPresent = false;
 		_cursorId = CURSOR_ARROW;
 		CVisibleMsg visibleMsg;
 		visibleMsg.execute("LiftbotHead2NE");
 		visibleMsg.execute("LiftbotHead4SW");
 		_cursorId = CURSOR_ARROW;
-	} else if (msg->_action == "LiftbotHeadTaken") {
-		_v2 = 1;
-		CVisibleMsg visibleMsg;
-		visibleMsg.execute("CrushedTV2NE");
-		visibleMsg.execute("CrushedTV4SW");
-		_cursorId = CURSOR_MOVE_DOWN1;
 	}
 
 	return true;
@@ -78,10 +78,10 @@ bool CBottomOfWellMonitor::ActMsg(CActMsg *msg) {
 
 bool CBottomOfWellMonitor::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
 	if (isEquals("BOWTelevisionMonitor")) {
-		if (_v1)
+		if (_tvPresent)
 			changeView("BottomOfWell.Node 7.N", "");
 	} else {
-		if (_v2)
+		if (_headPresent)
 			changeView("BottomOfWell.Node 8.N", "");
 	}
 
@@ -91,12 +91,12 @@ bool CBottomOfWellMonitor::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
 bool CBottomOfWellMonitor::EnterViewMsg(CEnterViewMsg *msg) {
 	if (_flag) {
 		if (isEquals("BOWTelevisionMonitor")) {
-			if (_v1) {
+			if (_tvPresent) {
 				changeView("BottomOfWell.Node 7.N", "");
 				_flag = false;
 			}
 		} else {
-			if (_v2) {
+			if (_headPresent) {
 				changeView("BottomOfWell.Node 8.N", "");
 				_flag = false;
 			}
diff --git a/engines/titanic/game/bottom_of_well_monitor.h b/engines/titanic/game/bottom_of_well_monitor.h
index be9ae2c..e17c8ab 100644
--- a/engines/titanic/game/bottom_of_well_monitor.h
+++ b/engines/titanic/game/bottom_of_well_monitor.h
@@ -34,7 +34,8 @@ class CBottomOfWellMonitor : public CGameObject {
 	bool EnterViewMsg(CEnterViewMsg *msg);
 	bool LeaveViewMsg(CLeaveViewMsg *msg);
 public:
-	static int _v1, _v2;
+	static bool _tvPresent;
+	static bool _headPresent;
 	bool _flag;
 public:
 	CLASSDEF;





More information about the Scummvm-git-logs mailing list