[Scummvm-git-logs] scummvm master -> 457c8548a9fb0d88bb5dd92a2891438f309c5ec2

dreammaster dreammaster at scummvm.org
Fri Jan 13 01:51:16 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:
457c8548a9 TITANIC: Renaming of CCarry fieldE0


Commit: 457c8548a9fb0d88bb5dd92a2891438f309c5ec2
    https://github.com/scummvm/scummvm/commit/457c8548a9fb0d88bb5dd92a2891438f309c5ec2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-01-12T19:51:09-05:00

Commit Message:
TITANIC: Renaming of CCarry fieldE0

Changed paths:
    engines/titanic/carry/arm.cpp
    engines/titanic/carry/auditory_centre.cpp
    engines/titanic/carry/bowl_ear.cpp
    engines/titanic/carry/carry.cpp
    engines/titanic/carry/carry.h
    engines/titanic/carry/carry_parrot.cpp
    engines/titanic/carry/crushed_tv.cpp
    engines/titanic/carry/ear.cpp
    engines/titanic/carry/fruit.cpp
    engines/titanic/carry/hammer.cpp
    engines/titanic/carry/head_piece.cpp
    engines/titanic/carry/key.cpp
    engines/titanic/carry/long_stick.cpp
    engines/titanic/carry/maitred_right_arm.cpp
    engines/titanic/carry/phonograph_ear.cpp
    engines/titanic/carry/photograph.cpp
    engines/titanic/carry/speech_centre.cpp
    engines/titanic/carry/vision_centre.cpp
    engines/titanic/npcs/parrot.cpp


diff --git a/engines/titanic/carry/arm.cpp b/engines/titanic/carry/arm.cpp
index 1f77247..5105ea8 100644
--- a/engines/titanic/carry/arm.cpp
+++ b/engines/titanic/carry/arm.cpp
@@ -84,7 +84,7 @@ void CArm::load(SimpleFile *file) {
 
 bool CArm::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
 	_field138 = 0;
-	_fieldE0 = 1;
+	_canTake = true;
 
 	CString name = getName();
 	if (name == "Arm1") {
@@ -137,7 +137,7 @@ bool CArm::UseWithOtherMsg(CUseWithOtherMsg *msg) {
 }
 
 bool CArm::MouseDragStartMsg(CMouseDragStartMsg *msg) {
-	if (!_fieldE0) {
+	if (!_canTake) {
 		CShowTextMsg textMsg(YOU_CANT_GET_THIS);
 		textMsg.execute("PET");
 	} else if (checkStartDragging(msg)) {
@@ -178,7 +178,7 @@ bool CArm::MaitreDHappyMsg(CMaitreDHappyMsg *msg) {
 	}
 
 	_field158 = 1;
-	_fieldE0 = 1;
+	_canTake = true;
 	return true;
 }
 
diff --git a/engines/titanic/carry/auditory_centre.cpp b/engines/titanic/carry/auditory_centre.cpp
index 0bda975..5d6fd14 100644
--- a/engines/titanic/carry/auditory_centre.cpp
+++ b/engines/titanic/carry/auditory_centre.cpp
@@ -39,7 +39,7 @@ void CAuditoryCentre::load(SimpleFile *file) {
 }
 
 bool CAuditoryCentre::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
-	_fieldE0 = 1;
+	_canTake = true;
 	setVisible(true);
 	return true;
 }
diff --git a/engines/titanic/carry/bowl_ear.cpp b/engines/titanic/carry/bowl_ear.cpp
index 852a778..ac28439 100644
--- a/engines/titanic/carry/bowl_ear.cpp
+++ b/engines/titanic/carry/bowl_ear.cpp
@@ -55,7 +55,7 @@ bool CBowlEar::ReplaceBowlAndNutsMsg(CReplaceBowlAndNutsMsg *msg) {
 
 bool CBowlEar::NutPuzzleMsg(CNutPuzzleMsg *msg) {
 	if (msg->_value == "BowlUnlocked")
-		_fieldE0 = 1;
+		_canTake = true;
 
 	return true;
 }
diff --git a/engines/titanic/carry/carry.cpp b/engines/titanic/carry/carry.cpp
index 075b2b3..f6403b1 100644
--- a/engines/titanic/carry/carry.cpp
+++ b/engines/titanic/carry/carry.cpp
@@ -44,7 +44,7 @@ BEGIN_MESSAGE_MAP(CCarry, CGameObject)
 	ON_MESSAGE(PassOnDragStartMsg)
 END_MESSAGE_MAP()
 
-CCarry::CCarry() : CGameObject(), _fieldDC(0), _fieldE0(1),
+CCarry::CCarry() : CGameObject(), _fieldDC(0), _canTake(true),
 		_field100(0), _field104(0), _field108(0), _field10C(0),
 		_itemFrame(0), _enterFrame(0), _enterFrameSet(false), _visibleFrame(0),
 	_string1("None"),
@@ -59,7 +59,7 @@ void CCarry::save(SimpleFile *file, int indent) {
 	file->writePoint(_origPos, indent);
 	file->writeQuotedLine(_fullViewName, indent);
 	file->writeNumberLine(_fieldDC, indent);
-	file->writeNumberLine(_fieldE0, indent);
+	file->writeNumberLine(_canTake, indent);
 	file->writeQuotedLine(_string3, indent);
 	file->writeQuotedLine(_string4, indent);
 	file->writePoint(_tempPos, indent);
@@ -81,7 +81,7 @@ void CCarry::load(SimpleFile *file) {
 	_origPos = file->readPoint();
 	_fullViewName = file->readString();
 	_fieldDC = file->readNumber();
-	_fieldE0 = file->readNumber();
+	_canTake = file->readNumber();
 	_string3 = file->readString();
 	_string4 = file->readString();
 	_tempPos = file->readPoint();
@@ -101,7 +101,7 @@ bool CCarry::MouseDragStartMsg(CMouseDragStartMsg *msg) {
 	CString name = getName();
 	debugC(ERROR_BASIC, kDebugScripts, "MosueDragStartMsg - %s", name.c_str());
 
-	if (_fieldE0) {
+	if (_canTake) {
 		if (checkStartDragging(msg)) {
 			CPassOnDragStartMsg startMsg(msg->_mousePos);
 			startMsg.execute(this);
diff --git a/engines/titanic/carry/carry.h b/engines/titanic/carry/carry.h
index 06e446a..cb53df4 100644
--- a/engines/titanic/carry/carry.h
+++ b/engines/titanic/carry/carry.h
@@ -59,7 +59,7 @@ protected:
 	int _visibleFrame;
 public:
 	CString _string1;
-	int _fieldE0;
+	bool _canTake;
 	Point _origPos;
 	CString _fullViewName;
 public:
diff --git a/engines/titanic/carry/carry_parrot.cpp b/engines/titanic/carry/carry_parrot.cpp
index 8b33261..c97adc0 100644
--- a/engines/titanic/carry/carry_parrot.cpp
+++ b/engines/titanic/carry/carry_parrot.cpp
@@ -93,7 +93,7 @@ bool CCarryParrot::IsParrotPresentMsg(CIsParrotPresentMsg *msg) {
 bool CCarryParrot::LeaveViewMsg(CLeaveViewMsg *msg) {
 	if (_visible) {
 		setVisible(false);
-		_fieldE0 = 0;
+		_canTake = false;
 		CParrot::_state = PARROT_ESCAPED;
 	}
 
@@ -109,7 +109,7 @@ bool CCarryParrot::MouseDragEndMsg(CMouseDragEndMsg *msg) {
 		if (msg->_mousePos.x >= 75 && msg->_mousePos.x <= 565 &&
 				!CParrot::_v2 && !CCage::_open) {
 			setVisible(false);
-			_fieldE0 = 0;
+			_canTake = false;
 			CTreeItem *perchedParrot = findUnder(getRoot(), "PerchedParrot");
 			detach();
 			addUnder(perchedParrot);
@@ -119,7 +119,7 @@ bool CCarryParrot::MouseDragEndMsg(CMouseDragEndMsg *msg) {
 			backMsg.execute(perchedParrot);
 		} else {
 			setVisible(false);
-			_fieldE0 = 0;
+			_canTake = false;
 			CParrot::_state = PARROT_ESCAPED;
 			playSound("z#475.wav");
 			sound8(true);
@@ -135,7 +135,7 @@ bool CCarryParrot::MouseDragEndMsg(CMouseDragEndMsg *msg) {
 			charMsg.execute(this, nullptr, 0);
 		} else {
 			setVisible(false);
-			_fieldE0 = 0;
+			_canTake = false;
 			playSound("z#475.wav");
 			sound8(true);
 			moveUnder(findRoom());
@@ -168,7 +168,7 @@ bool CCarryParrot::PassOnDragStartMsg(CPassOnDragStartMsg *msg) {
 	if (npc)
 		startTalking(npc, 0x446BF);
 
-	_fieldE0 = 0;
+	_canTake = false;
 	playSound("z#475.wav");
 	moveUnder(findRoom());
 	CParrot::_state = PARROT_ESCAPED;
@@ -181,7 +181,7 @@ bool CCarryParrot::PreEnterViewMsg(CPreEnterViewMsg *msg) {
 	loadSurface();
 	CCarryParrot *parrot = dynamic_cast<CCarryParrot *>(getRoot()->findByName("CarryParrot"));
 	if (parrot)
-		parrot->_fieldE0 = 0;
+		parrot->_canTake = false;
 
 	return true;
 }
@@ -201,7 +201,7 @@ bool CCarryParrot::ActMsg(CActMsg *msg) {
 			startTalking(npc, 0x446BF);
 
 		setVisible(false);
-		_fieldE0 = 0;
+		_canTake = false;
 
 		if (CParrot::_state == PARROT_4) {
 			playSound("z#475.wav");
diff --git a/engines/titanic/carry/crushed_tv.cpp b/engines/titanic/carry/crushed_tv.cpp
index 486537d..17d9bab 100644
--- a/engines/titanic/carry/crushed_tv.cpp
+++ b/engines/titanic/carry/crushed_tv.cpp
@@ -47,7 +47,7 @@ void CCrushedTV::load(SimpleFile *file) {
 bool CCrushedTV::ActMsg(CActMsg *msg) {
 	if (msg->_action == "SmashTV") {
 		setVisible(true);
-		_fieldE0 = 1;
+		_canTake = true;
 	}
 
 	return true;
diff --git a/engines/titanic/carry/ear.cpp b/engines/titanic/carry/ear.cpp
index a2234bc..580ebd6 100644
--- a/engines/titanic/carry/ear.cpp
+++ b/engines/titanic/carry/ear.cpp
@@ -45,7 +45,7 @@ void CEar::load(SimpleFile *file) {
 
 bool CEar::ActMsg(CActMsg *msg) {
 	if (msg->_action == "MusicSolved")
-		_fieldE0 = true;
+		_canTake = true;
 	return true;
 }
 
diff --git a/engines/titanic/carry/fruit.cpp b/engines/titanic/carry/fruit.cpp
index 68f3af7..a2d1d91 100644
--- a/engines/titanic/carry/fruit.cpp
+++ b/engines/titanic/carry/fruit.cpp
@@ -60,7 +60,7 @@ bool CFruit::UseWithCharMsg(CUseWithCharMsg *msg) {
 	if (msg->_character->isEquals("Barbot") && msg->_character->_visible) {
 		CActMsg actMsg("Fruit");
 		actMsg.execute(msg->_character);
-		_fieldE0 = 0;
+		_canTake = false;
 		setVisible(false);
 		return true;
 	} else {
diff --git a/engines/titanic/carry/hammer.cpp b/engines/titanic/carry/hammer.cpp
index 88c766d..e62b61d 100644
--- a/engines/titanic/carry/hammer.cpp
+++ b/engines/titanic/carry/hammer.cpp
@@ -43,7 +43,7 @@ void CHammer::load(SimpleFile *file) {
 }
 
 bool CHammer::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
-	_fieldE0 = 1;
+	_canTake = true;
 	return true;
 }
 
diff --git a/engines/titanic/carry/head_piece.cpp b/engines/titanic/carry/head_piece.cpp
index 3485048..1ce1d5b 100644
--- a/engines/titanic/carry/head_piece.cpp
+++ b/engines/titanic/carry/head_piece.cpp
@@ -70,7 +70,7 @@ bool CHeadPiece::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
 bool CHeadPiece::MouseDragStartMsg(CMouseDragStartMsg *msg) {
 	if (!checkPoint(msg->_mousePos, false, true)) {
 		return false;
-	} else if (!_fieldE0) {
+	} else if (!_canTake) {
 		return true;
 	}
 
diff --git a/engines/titanic/carry/key.cpp b/engines/titanic/carry/key.cpp
index 187ff1b..e8c1441 100644
--- a/engines/titanic/carry/key.cpp
+++ b/engines/titanic/carry/key.cpp
@@ -43,7 +43,7 @@ void CKey::load(SimpleFile *file) {
 }
 
 bool CKey::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
-	_fieldE0 = 1;
+	_canTake = true;
 	setVisible(true);
 	return true;
 }
diff --git a/engines/titanic/carry/long_stick.cpp b/engines/titanic/carry/long_stick.cpp
index 16cd69e..77f888b 100644
--- a/engines/titanic/carry/long_stick.cpp
+++ b/engines/titanic/carry/long_stick.cpp
@@ -60,7 +60,7 @@ bool CLongStick::UseWithOtherMsg(CUseWithOtherMsg *msg) {
 }
 
 bool CLongStick::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
-	_fieldE0 = 1;
+	_canTake = true;
 	return true;
 }
 
diff --git a/engines/titanic/carry/maitred_right_arm.cpp b/engines/titanic/carry/maitred_right_arm.cpp
index 5cec6be..e61a711 100644
--- a/engines/titanic/carry/maitred_right_arm.cpp
+++ b/engines/titanic/carry/maitred_right_arm.cpp
@@ -42,7 +42,7 @@ bool CMaitreDRightArm::DropZoneLostObjectMsg(CDropZoneLostObjectMsg *msg) {
 	CActMsg actMsg("LoseArm");
 	actMsg.execute("MaitreDBody");
 	actMsg.execute("MaitreD Arm Holder");
-	_fieldE0 = 1;
+	_canTake = true;
 	return true;
 }
 
diff --git a/engines/titanic/carry/phonograph_ear.cpp b/engines/titanic/carry/phonograph_ear.cpp
index 95297a7..df0445d 100644
--- a/engines/titanic/carry/phonograph_ear.cpp
+++ b/engines/titanic/carry/phonograph_ear.cpp
@@ -43,7 +43,7 @@ void CPhonographEar::load(SimpleFile *file) {
 }
 
 bool CPhonographEar::CorrectMusicPlayedMsg(CCorrectMusicPlayedMsg *msg) {
-	_fieldE0 = true;
+	_canTake = true;
 	return true;
 }
 
diff --git a/engines/titanic/carry/photograph.cpp b/engines/titanic/carry/photograph.cpp
index 039efd0..76487ca 100644
--- a/engines/titanic/carry/photograph.cpp
+++ b/engines/titanic/carry/photograph.cpp
@@ -93,7 +93,7 @@ bool CPhotograph::PETGainedObjectMsg(CPETGainedObjectMsg *msg) {
 
 bool CPhotograph::ActMsg(CActMsg *msg) {
 	if (msg->_action == "BecomeGettable") {
-		_fieldE0 = 1;
+		_canTake = true;
 		_cursorId = CURSOR_HAND;
 	}
 
diff --git a/engines/titanic/carry/speech_centre.cpp b/engines/titanic/carry/speech_centre.cpp
index 29ced48..859d70c 100644
--- a/engines/titanic/carry/speech_centre.cpp
+++ b/engines/titanic/carry/speech_centre.cpp
@@ -51,7 +51,7 @@ void CSpeechCentre::load(SimpleFile *file) {
 
 bool CSpeechCentre::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
 	if (_field13C == 1 && _season == "Autumn")
-		_fieldE0 = true;
+		_canTake = true;
 	return true;
 }
 
diff --git a/engines/titanic/carry/vision_centre.cpp b/engines/titanic/carry/vision_centre.cpp
index f81e35f..7e3afb5 100644
--- a/engines/titanic/carry/vision_centre.cpp
+++ b/engines/titanic/carry/vision_centre.cpp
@@ -41,12 +41,12 @@ void CVisionCentre::load(SimpleFile *file) {
 }
 
 bool CVisionCentre::PuzzleSolvedMsg(CPuzzleSolvedMsg *msg) {
-	_fieldE0 = true;
+	_canTake = true;
 	return true;
 }
 
 bool CVisionCentre::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
-	if (_fieldE0) {
+	if (_canTake) {
 		return CBrain::MouseButtonDownMsg(msg);
 	} else {
 		petDisplayMessage(1, NICE_IF_TAKE_BUT_CANT);
@@ -55,7 +55,7 @@ bool CVisionCentre::MouseButtonDownMsg(CMouseButtonDownMsg *msg) {
 }
 
 bool CVisionCentre::MouseDragStartMsg(CMouseDragStartMsg *msg) {
-	if (_fieldE0) {
+	if (_canTake) {
 		return CBrain::MouseDragStartMsg(msg);
 	} else {
 		petDisplayMessage(1, NICE_IF_TAKE_BUT_CANT);
diff --git a/engines/titanic/npcs/parrot.cpp b/engines/titanic/npcs/parrot.cpp
index e039b15..9e6366a 100644
--- a/engines/titanic/npcs/parrot.cpp
+++ b/engines/titanic/npcs/parrot.cpp
@@ -388,7 +388,7 @@ bool CParrot::MouseDragStartMsg(CMouseDragStartMsg *msg) {
 
 		CCarry *item = dynamic_cast<CCarry *>(getRoot()->findByName(_string2));
 		if (item) {
-			item->_fieldE0 = 1;
+			item->_canTake = true;
 			CPassOnDragStartMsg passMsg;
 			passMsg._mousePos = msg->_mousePos;
 			passMsg.execute(item);





More information about the Scummvm-git-logs mailing list