[Scummvm-git-logs] scummvm master -> 3e2f084b412f178c884d0b4cfc81fce29beaf007

dreammaster dreammaster at scummvm.org
Mon Jan 16 17:36:54 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:
3e2f084b41 TITANIC: Rename light fields to more closely match original


Commit: 3e2f084b412f178c884d0b4cfc81fce29beaf007
    https://github.com/scummvm/scummvm/commit/3e2f084b412f178c884d0b4cfc81fce29beaf007
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-16T11:36:44-05:00

Commit Message:
TITANIC: Rename light fields to more closely match original

Changed paths:
    engines/titanic/game/light.cpp
    engines/titanic/game/light.h
    engines/titanic/game/television.cpp
    engines/titanic/messages/messages.h


diff --git a/engines/titanic/game/light.cpp b/engines/titanic/game/light.cpp
index 76dc9a4..5bfb2c3 100644
--- a/engines/titanic/game/light.cpp
+++ b/engines/titanic/game/light.cpp
@@ -37,18 +37,18 @@ BEGIN_MESSAGE_MAP(CLight, CBackground)
 	ON_MESSAGE(EnterRoomMsg)
 END_MESSAGE_MAP()
 
-CLight::CLight() : CBackground(), _unused1(0), _upRight(false),
-	_upLeft(false), _downLeft(false), _downRight(false), _unused2(0),
+CLight::CLight() : CBackground(), _unused1(0), _topRight(false),
+	_topLeft(false), _bottomLeft(false), _bottomRight(false), _unused2(0),
 	_unused3(0), _eyePresent(false) {
 }
 
 void CLight::save(SimpleFile *file, int indent) {
 	file->writeNumberLine(1, indent);
 	file->writeNumberLine(_unused1, indent);
-	file->writeNumberLine(_upRight, indent);
-	file->writeNumberLine(_upLeft, indent);
-	file->writeNumberLine(_downLeft, indent);
-	file->writeNumberLine(_downRight, indent);
+	file->writeNumberLine(_topRight, indent);
+	file->writeNumberLine(_topLeft, indent);
+	file->writeNumberLine(_bottomLeft, indent);
+	file->writeNumberLine(_bottomRight, indent);
 	file->writeNumberLine(_unused2, indent);
 	file->writeNumberLine(_unused3, indent);
 	file->writeNumberLine(_eyePresent, indent);
@@ -59,10 +59,10 @@ void CLight::save(SimpleFile *file, int indent) {
 void CLight::load(SimpleFile *file) {
 	file->readNumber();
 	_unused1 = file->readNumber();
-	_upRight = file->readNumber();
-	_upLeft = file->readNumber();
-	_downLeft = file->readNumber();
-	_downRight = file->readNumber();
+	_topRight = file->readNumber();
+	_topLeft = file->readNumber();
+	_bottomLeft = file->readNumber();
+	_bottomRight = file->readNumber();
 	_unused2 = file->readNumber();
 	_unused3 = file->readNumber();
 	_eyePresent = file->readNumber();
@@ -76,8 +76,8 @@ bool CLight::TurnOff(CTurnOff *msg) {
 }
 
 bool CLight::LightsMsg(CLightsMsg *msg) {
-	if ((msg->_upLeft && _upLeft) || (msg->_downLeft && _downLeft)
-			|| (msg->_upRight && _upRight) || (msg->_downRight && _downRight)) {
+	if ((msg->_topLeft && _topLeft) || (msg->_bottomLeft && _bottomLeft)
+			|| (msg->_topRight && _topRight) || (msg->_bottomRight && _bottomRight)) {
 		setVisible(true);
 	} else {
 		setVisible(false);
@@ -138,7 +138,7 @@ bool CLight::EnterRoomMsg(CEnterRoomMsg *msg) {
 	setVisible(true);
 
 	if (isEquals("6WTL")) {
-		CLightsMsg lightsMsg(1, 1, 1, 1);
+		CLightsMsg lightsMsg(true, true, true, true);
 		lightsMsg.execute("1stClassState", CLight::_type, MSGFLAG_SCAN);
 
 		bool flag = pet ? pet->isRoom59706() : false;
diff --git a/engines/titanic/game/light.h b/engines/titanic/game/light.h
index 12f7d88..2e5dbfa 100644
--- a/engines/titanic/game/light.h
+++ b/engines/titanic/game/light.h
@@ -40,10 +40,10 @@ class CLight : public CBackground {
 	bool EnterRoomMsg(CEnterRoomMsg *msg);
 private:
 	int _unused1;
-	bool _upRight;
-	bool _upLeft;
-	bool _downLeft;
-	bool _downRight;
+	bool _topRight;
+	bool _topLeft;
+	bool _bottomLeft;
+	bool _bottomRight;
 	int _unused2;
 	int _unused3;
 	bool _eyePresent;
diff --git a/engines/titanic/game/television.cpp b/engines/titanic/game/television.cpp
index ba48d80..9dce393 100644
--- a/engines/titanic/game/television.cpp
+++ b/engines/titanic/game/television.cpp
@@ -288,7 +288,7 @@ bool CTelevision::LightsMsg(CLightsMsg *msg) {
 	if (pet)
 		flag = pet->isRoom59706();
 
-	if (msg->_upLeft || !flag)
+	if (msg->_topLeft || !flag)
 		_turnOn = true;
 
 	return true;
diff --git a/engines/titanic/messages/messages.h b/engines/titanic/messages/messages.h
index 123003f..2a95c3f 100644
--- a/engines/titanic/messages/messages.h
+++ b/engines/titanic/messages/messages.h
@@ -280,7 +280,7 @@ MESSAGE2(CLeaveNodeMsg, CNodeItem *, oldNode, nullptr, CNodeItem *, newNode, nul
 MESSAGE2(CLeaveRoomMsg, CRoomItem *, oldRoom, nullptr, CRoomItem *, newRoom, nullptr);
 MESSAGE2(CLeaveViewMsg, CViewItem *, oldView, nullptr, CViewItem *, newView, nullptr);
 MESSAGE1(CLemonFallsFromTreeMsg, Point, pt, Point());
-MESSAGE4(CLightsMsg, bool, upRight, false, bool, upLeft, false, bool, downLeft, false, bool, downRight, false);
+MESSAGE4(CLightsMsg, bool, topRight, false, bool, topLeft, false, bool, bottomLeft, false, bool, bottomRight, false);
 MESSAGE1(CLoadSuccessMsg, int, ticks, 0);
 MESSAGE1(CLockPhonographMsg, int, value, 0);
 MESSAGE0(CMaitreDDefeatedMsg);





More information about the Scummvm-git-logs mailing list