[Scummvm-git-logs] scummvm master -> 1085f05f118b33d1e021b3db53d993193dd95bce

Strangerke noreply at scummvm.org
Tue Dec 24 06:54:37 UTC 2024


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
de72fbe46b M4: RIDDLE: Room 709: Finish the implementation of parser
1085f05f11 M4: RIDDLE: Room 709: rename flags in parser


Commit: de72fbe46b3feb4b1ed99654e04dd108ce87aa0c
    https://github.com/scummvm/scummvm/commit/de72fbe46b3feb4b1ed99654e04dd108ce87aa0c
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-12-24T07:52:32+01:00

Commit Message:
M4: RIDDLE: Room 709: Finish the implementation of parser

Changed paths:
    engines/m4/riddle/rooms/section7/room709.cpp


diff --git a/engines/m4/riddle/rooms/section7/room709.cpp b/engines/m4/riddle/rooms/section7/room709.cpp
index d8c0e2b97c3..bc0dcd9272b 100644
--- a/engines/m4/riddle/rooms/section7/room709.cpp
+++ b/engines/m4/riddle/rooms/section7/room709.cpp
@@ -936,13 +936,43 @@ void Room709::parser() {
 		default:
 			break;
 		}
-	}
+	} else if (!ecx && player_said("journal") && !inv_player_has(_G(player).noun)) {
+		digi_play("709R11", 1, 255, -1, -1);
+	} else if (!ecx && !edi && player_said_any("LIGHTER", "LIT LIGHTER")) {
+		digi_play("com141", 1, 255, -1, 997);
+	} else if (ecx && player_said(" ")) {
+		digi_play("709R01", 1, 255, -1, -1);
+	} else if (ecx && player_said("  ")) {
+		digi_play("708R02", 1, 255, -1, 708);
+	} else if (esi || edi) {
+		switch (imath_ranged_rand(1, 5)) {
+		case 1:
+			digi_play("com006", 1, 255, -1, 997);
+			break;
 
-	warning("Fake variable use - %d %d %d", ecx ? 1 : 0, esi ? 1 : 0, edi ? 1 : 0);
+		case 2:
+			digi_play("com008", 1, 255, -1, 997);
+			break;
 
-	_G(player).command_ready = false;
+		case 3:
+			digi_play("com013", 1, 255, -1, 997);
+			break;
 
-	// TODO Not implemented yet
+		case 4:
+			digi_play("com010", 1, 255, -1, 997);
+			break;
+
+		case 5:
+			digi_play("com011", 1, 255, -1, 997);
+			break;
+
+		default:
+			break;
+		}
+	} else
+		return;
+
+	_G(player).command_ready = false;
 }
 
 void Room709::daemon() {


Commit: 1085f05f118b33d1e021b3db53d993193dd95bce
    https://github.com/scummvm/scummvm/commit/1085f05f118b33d1e021b3db53d993193dd95bce
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-12-24T07:54:29+01:00

Commit Message:
M4: RIDDLE: Room 709: rename flags in parser

Changed paths:
    engines/m4/riddle/rooms/section7/room709.cpp


diff --git a/engines/m4/riddle/rooms/section7/room709.cpp b/engines/m4/riddle/rooms/section7/room709.cpp
index bc0dcd9272b..df44ab53948 100644
--- a/engines/m4/riddle/rooms/section7/room709.cpp
+++ b/engines/m4/riddle/rooms/section7/room709.cpp
@@ -591,11 +591,11 @@ void Room709::pre_parser() {
 }
 
 void Room709::parser() {
-	bool ecx = player_said_any("look", "look at");
-	bool edi = player_said_any("talk", "talk to", "take");
-	bool esi = player_said_any("push", "pull", "gear", "open", "close", "RopeS", "RopeL", "RopeR", "RopeB");
+	const bool lookFl = player_said_any("look", "look at");
+	const bool talkFl = player_said_any("talk", "talk to", "take");
+	const bool gearFl = player_said_any("push", "pull", "gear", "open", "close", "RopeS", "RopeL", "RopeR", "RopeB");
 
-	if (esi && player_said("rope   ")) {
+	if (gearFl && player_said("rope   ")) {
 		switch (_G(kernel).trigger) {
 		case -1:
 			player_set_commands_allowed(false);
@@ -641,7 +641,7 @@ void Room709::parser() {
 		}
 	} // esi && player_said("rope   ")
 
-	else if (esi && player_said("rope     ")) {
+	else if (gearFl && player_said("rope     ")) {
 		switch (_G(kernel).trigger) {
 		case -1:
 			player_set_commands_allowed(false);
@@ -687,7 +687,7 @@ void Room709::parser() {
 		}
 	} // esi && player_said("rope     ")
 
-	else if (esi && player_said("rope  ")) {
+	else if (gearFl && player_said("rope  ")) {
 		switch (_G(kernel).trigger) {
 		case -1:
 			player_set_commands_allowed(false);
@@ -734,7 +734,7 @@ void Room709::parser() {
 		}
 	} // esi && player_said("rope  ")
 
-	else if (esi && player_said("rope    ")) {
+	else if (gearFl && player_said("rope    ")) {
 		switch (_G(kernel).trigger) {
 		case -1:
 			player_set_commands_allowed(false);
@@ -898,13 +898,13 @@ void Room709::parser() {
 		}
 	} // player_said("Back")
 
-	else if (ecx && player_said("Incense Burner") && inv_object_is_here("Incense Burner")) {
+	else if (lookFl && player_said("Incense Burner") && inv_object_is_here("Incense Burner")) {
 		digi_play("709R12", 1, 255, -1, -1);
-	} else if (ecx && player_said("Chisel") && inv_object_is_here("Chisel")) {
+	} else if (lookFl && player_said("Chisel") && inv_object_is_here("Chisel")) {
 		digi_play("709R02", 1, 255, -1, -1);
-	} else if (ecx && player_said_any("rope  ", "rope   ", "rope    ", "rope     ")) {
+	} else if (lookFl && player_said_any("rope  ", "rope   ", "rope    ", "rope     ")) {
 		digi_play("com110", 1, 255, -1, 997);
-	} else if (edi && player_said("Incense Burner") && inv_object_is_here("Incense Burner")) {
+	} else if (talkFl && player_said("Incense Burner") && inv_object_is_here("Incense Burner")) {
 		switch (_G(kernel).trigger) {
 		case -1:
 			ws_walk(_G(my_walker), 373, 279, nullptr, 2, 2, true);
@@ -920,7 +920,7 @@ void Room709::parser() {
 		default:
 			break;
 		}
-	} else if (edi && player_said("Chisel") && inv_object_is_here("chisel")) {
+	} else if (talkFl && player_said("Chisel") && inv_object_is_here("chisel")) {
 		switch (_G(kernel).trigger) {
 		case -1:
 			ws_walk(_G(my_walker), 267, 278, nullptr, 2, 10, true);
@@ -936,15 +936,15 @@ void Room709::parser() {
 		default:
 			break;
 		}
-	} else if (!ecx && player_said("journal") && !inv_player_has(_G(player).noun)) {
+	} else if (!lookFl && player_said("journal") && !inv_player_has(_G(player).noun)) {
 		digi_play("709R11", 1, 255, -1, -1);
-	} else if (!ecx && !edi && player_said_any("LIGHTER", "LIT LIGHTER")) {
+	} else if (!lookFl && !talkFl && player_said_any("LIGHTER", "LIT LIGHTER")) {
 		digi_play("com141", 1, 255, -1, 997);
-	} else if (ecx && player_said(" ")) {
+	} else if (lookFl && player_said(" ")) {
 		digi_play("709R01", 1, 255, -1, -1);
-	} else if (ecx && player_said("  ")) {
+	} else if (lookFl && player_said("  ")) {
 		digi_play("708R02", 1, 255, -1, 708);
-	} else if (esi || edi) {
+	} else if (gearFl || talkFl) {
 		switch (imath_ranged_rand(1, 5)) {
 		case 1:
 			digi_play("com006", 1, 255, -1, 997);




More information about the Scummvm-git-logs mailing list