[Scummvm-git-logs] scummvm master -> 231d9ba4d86e3951b083cab2bc34bc02e5d2807c

dreammaster dreammaster at scummvm.org
Tue Jul 25 02:51:54 CEST 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:
231d9ba4d8 TITANIC: Fix incorrect Liftbot response to 'what floor am I on'


Commit: 231d9ba4d86e3951b083cab2bc34bc02e5d2807c
    https://github.com/scummvm/scummvm/commit/231d9ba4d86e3951b083cab2bc34bc02e5d2807c
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-07-24T20:51:46-04:00

Commit Message:
TITANIC: Fix incorrect Liftbot response to 'what floor am I on'

Changed paths:
    engines/titanic/true_talk/liftbot_script.cpp


diff --git a/engines/titanic/true_talk/liftbot_script.cpp b/engines/titanic/true_talk/liftbot_script.cpp
index 18f32a7..237f628 100644
--- a/engines/titanic/true_talk/liftbot_script.cpp
+++ b/engines/titanic/true_talk/liftbot_script.cpp
@@ -357,7 +357,8 @@ uint LiftbotScript::getDialsBitset() const {
 
 
 int LiftbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) {
-	static const int ARRAY13[] = {
+	// Responses for each floor when asked "what floor are we on"
+	static const int FLOOR_RESPONSE_IDS[] = {
 		210724, 210735, 210746, 210757, 210758, 210759, 210760,
 		210761, 210762, 210725, 210726, 210727, 210728, 210729,
 		210730, 210731, 210732, 210733, 210734, 210736, 210737,
@@ -365,7 +366,8 @@ int LiftbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScri
 		210745, 210747, 210748, 210749, 210750, 210751, 210752,
 		210753, 210754, 210755, 210756
 	};
-	static const int ARRAY14[] = {
+	// Responses for each lift when asked "which lift am I in"
+	static const int LIFT_RESPONSE_IDS[] = {
 		0, 210849, 210850, 210851, 210852, 210838, 210839, 210840, 210841, 0
 	};
 
@@ -425,15 +427,17 @@ int LiftbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScri
 			return 1;
 		break;
 	case 13:
-		selectResponse(ARRAY13[getCurrentFloor()]);
+		// What floor am I on
+		selectResponse(FLOOR_RESPONSE_IDS[getCurrentFloor() - 1]);
 		applyResponse();
 		return 2;
 	case 14:
+		// Which lift am I in
 		stateVal = getState6();
 		if (sentence->contains("elevator") ||
 			(!sentence->contains("lift") && getRandomNumber(100) > 60))
 			stateVal += 4;
-		selectResponse(ARRAY14[stateVal]);
+		selectResponse(LIFT_RESPONSE_IDS[stateVal]);
 		applyResponse();
 		return 2;
 	case 15:





More information about the Scummvm-git-logs mailing list