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

dreammaster dreammaster at scummvm.org
Wed Sep 27 03:08:18 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:
a65a0c4768 TITANIC: DE: Fix switch in DeskbotScript::doSentenceEntry


Commit: a65a0c47688c54bd2d07758420596e1821821c1b
    https://github.com/scummvm/scummvm/commit/a65a0c47688c54bd2d07758420596e1821821c1b
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2017-09-26T21:08:06-04:00

Commit Message:
TITANIC: DE: Fix switch in DeskbotScript::doSentenceEntry

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


diff --git a/engines/titanic/true_talk/deskbot_script.cpp b/engines/titanic/true_talk/deskbot_script.cpp
index 128868c..f45b1b1 100644
--- a/engines/titanic/true_talk/deskbot_script.cpp
+++ b/engines/titanic/true_talk/deskbot_script.cpp
@@ -386,48 +386,70 @@ uint DeskbotScript::getDialsBitset() const {
 }
 
 int DeskbotScript::doSentenceEntry(int val1, const int *srcIdP, const TTroomScript *roomScript, const TTsentence *sentence) {
-	uint id;
+	uint id = *srcIdP;
 
-	if (g_language == Common::DE_DEU && val1 != 4501)
-		return TTnpcScript::doSentenceEntry(val1, srcIdP, roomScript, sentence);
+	if (g_language == Common::DE_DEU) {
+		if (val1 != 4501)
+			return TTnpcScript::doSentenceEntry(val1, srcIdP, roomScript, sentence);
 
-	switch (val1) {
-	case 1:
-		id = *srcIdP;
-		if (id == 240431 || id == 240432) {
-			switch (getValue(1)) {
-			case 1:
-				id = 240336;
-				break;
-			case 2:
-				id = addAssignedRoomDialogue();
-				break;
-			case 3:
+		switch (getValue(1)) {
+		case 1:
+			id = 240336;
+			break;
+		case 2:
+			addAssignedRoom();
+			break;
+		case 3:
+			if (id == 240431 || id == 240432) {
 				if (getValue(3) == 1) {
 					if (id == 240431)
 						id = 240432;
-				}
-				else {
+				} else {
 					if (id == 240432)
 						id = 240431;
 				}
-			default:
-				break;
 			}
-
-			addResponse(getDialogueId(id));
-			applyResponse();
-			return 2;
+			break;
+		default:
+			break;
 		}
-		break;
+	} else {
+		switch (val1) {
+		case 1:
+			if (id == 240431 || id == 240432) {
+				switch (getValue(1)) {
+				case 1:
+					id = 240336;
+					break;
+				case 2:
+					id = addAssignedRoomDialogue();
+					break;
+				case 3:
+					if (getValue(3) == 1) {
+						if (id == 240431)
+							id = 240432;
+					} else {
+						if (id == 240432)
+							id = 240431;
+					}
+				default:
+					break;
+				}
 
-	case 2:
-		if (getValue(1) == 1)
-			return true;
-		break;
+				addResponse(getDialogueId(id));
+				applyResponse();
+				return 2;
+			}
+			break;
 
-	default:
-		break;
+		case 2:
+			if (getValue(1) == 1)
+				return true;
+			break;
+
+		default:
+			break;
+		}
 	}
 
 	return 0;





More information about the Scummvm-git-logs mailing list