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

Strangerke noreply at scummvm.org
Sat Dec 28 08:02:31 UTC 2024


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:
f8548ed3a4 M4: RIDDLE: Some polishing in rooms 801 to 806


Commit: f8548ed3a46fc323dbe66f6297ac2e332966aab7
    https://github.com/scummvm/scummvm/commit/f8548ed3a46fc323dbe66f6297ac2e332966aab7
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-12-28T09:02:18+01:00

Commit Message:
M4: RIDDLE: Some polishing in rooms 801 to 806

Changed paths:
    engines/m4/riddle/rooms/section8/room801.cpp
    engines/m4/riddle/rooms/section8/room802.cpp
    engines/m4/riddle/rooms/section8/room805.cpp
    engines/m4/riddle/rooms/section8/room806.cpp


diff --git a/engines/m4/riddle/rooms/section8/room801.cpp b/engines/m4/riddle/rooms/section8/room801.cpp
index bcaf78b4581..4662f1cb3f2 100644
--- a/engines/m4/riddle/rooms/section8/room801.cpp
+++ b/engines/m4/riddle/rooms/section8/room801.cpp
@@ -72,9 +72,9 @@ void Room801::init() {
 	_ripLooksLRDownSeries = series_load("rip looks l r down", -1, nullptr);
 	series_load("SAFARI SHADOW 5", -1, nullptr);
 	_mtcsh1Series = series_load("MCTSH1", -1, nullptr);
-	_farmerDisplacementMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1024, 0, triggerMachineByHashCallback, "farmer displacement");
+	_farmerDisplacementMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1024, false, triggerMachineByHashCallback, "farmer displacement");
 	sendWSMessage_10000(1, _farmerDisplacementMach, _farmerDisplacementSeries, 1, 14, 0, _farmerDisplacementSeries, 14, 14, 0);
-	_farmerShadowMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 151, 317, 100, 1280, 0, triggerMachineByHashCallback, "farmer shadow");
+	_farmerShadowMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 151, 317, 100, 1280, false, triggerMachineByHashCallback, "farmer shadow");
 	sendWSMessage_10000(1, _farmerShadowMach, _mtcsh1Series, 1, 1, -1, _mtcsh1Series, 1, 1, 0);
 	if (inv_player_has("farmer's shovel"))
 		hotspot_set_active(_G(currentSceneDef).hotspots, "farmer's shovel", false);
@@ -125,7 +125,7 @@ void Room801::init() {
 			_cellarDoorClosedMach = series_place_sprite("CELLAR DOOR CLOSED", 0, 0, -53, 100, 1280);
 		}
 
-		_mcTrekMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1280, 0, triggerMachineByHashCallback, "mc talk frames");
+		_mcTrekMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1280, false, triggerMachineByHashCallback, "mc talk frames");
 		_safariShadow5Mach = series_show("SAFARI SHADOW 5", 1280, 16, -1, -1, 0, 50, 124, 304);
 		sendWSMessage_10000(1, _mcTrekMach, _meiPrattleLoopSeries, 42, 42, 0, _meiPrattleLoopSeries, 42, 42, 0);
 	} else {
@@ -449,7 +449,7 @@ void Room801::parser() {
 				ws_hide_walker();
 				terminateMachine(_cellarDoorClosedMach);
 				_ripOpensCellarSeries = series_load("RIP OPENS CELLAR", -1, nullptr);
-				_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 256, 0, triggerMachineByHashCallback, "rip opens cellar");
+				_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 256, false, triggerMachineByHashCallback, "rip opens cellar");
 				sendWSMessage_10000(1, _ripAnimationMach, _ripOpensCellarSeries, 1, 28, 10, _ripOpensCellarSeries, 28, 28, 0);
 			}
 			break;
@@ -488,7 +488,7 @@ void Room801::parser() {
 				ws_hide_walker(_G(my_walker));
 				terminateMachine(_cellarDoorOpenMach);
 				_ripClosesCellarSeries = series_load("RIP CLOSES CELLAR", -1, nullptr);
-				_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 256, 0, triggerMachineByHashCallback, "rip closes cellar");
+				_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 256, false, triggerMachineByHashCallback, "rip closes cellar");
 				sendWSMessage_10000(1, _ripAnimationMach, _ripClosesCellarSeries, 1, 19, 10, _ripClosesCellarSeries, 34, 34, 0);
 			}
 			break;
@@ -521,7 +521,7 @@ void Room801::parser() {
 		if (_G(flags)[V252] || _G(flags)[V253] || _G(flags)[V255]) {
 			ws_hide_walker(_G(my_walker));
 			player_set_commands_allowed(false);
-			_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 167, 303, 49, 1280, 1, triggerMachineByHashCallback, "rip talking to farmer");
+			_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 167, 303, 49, 1280, true, triggerMachineByHashCallback, "rip talking to farmer");
 			sendWSMessage_10000(1, _ripAnimationMach, _ripTrekHeadTurnSeries, 1, 1, -1, _ripTrekHeadTurnSeries, 1, 1, 0);
 			_safariShadow5Mach2 = series_show("SAFARI SHADOW 5", 1280, 144, -1, -1, 0, 48, 167, 303);
 			_unkVal5 = 1;
@@ -639,7 +639,7 @@ void Room801::parser() {
 		case -1:
 			player_set_commands_allowed(false);
 			ws_hide_walker(_G(my_walker));
-			_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 256, 0, triggerMachineByHashCallback, "rip enters cellar");
+			_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 256, false, triggerMachineByHashCallback, "rip enters cellar");
 			sendWSMessage_10000(1, _ripAnimationMach, _ripEntersRootCellarSeries, 1, 14, 5, _ripEntersRootCellarSeries, 15, 19, 0);
 			break;
 		case 5:
@@ -694,14 +694,14 @@ void Room801::daemon() {
 	case 7:
 		player_set_commands_allowed(false);
 		ws_hide_walker(_G(my_walker));
-		_mcTrekMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1280, 0, triggerMachineByHashCallback, "mc talk frames");
+		_mcTrekMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1280, false, triggerMachineByHashCallback, "mc talk frames");
 		_safariShadow5Mach = series_show("SAFARI SHADOW 5", 1280, 16, -1, -1, 0, 50, 124, 304);
 		sendWSMessage_10000(1, _mcTrekMach, _meiPrattleLoopSeries, 42, 42, 0, _meiPrattleLoopSeries, 42, 42, 0);
 
 		if (_G(flags)[V260]) {
 			kernel_timing_trigger(30, 81, nullptr);
 		} else {
-			_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0, 0, triggerMachineByHashCallback, "rip returns from cellar");
+			_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0, false, triggerMachineByHashCallback, "rip returns from cellar");
 			sendWSMessage_10000(1, _ripAnimationMach, _ripReturnsFromRootCellarSeries, 1, 22, 8, _ripReturnsFromRootCellarSeries, 22, 22, 0);
 		}
 		break;
@@ -717,9 +717,9 @@ void Room801::daemon() {
 		break;
 	case 10:
 		terminateMachine(_farmerDisplacementMach);
-		_planeShadowMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 2048, 0, triggerMachineByHashCallback, "shadow of de plane");
-		_farmerDisplacementMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1024, 0, triggerMachineByHashCallback, "farmer looks to zero");
-		_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 1536, 0, triggerMachineByHashCallback, "rip looks to zero");
+		_planeShadowMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 2048, false, triggerMachineByHashCallback, "shadow of de plane");
+		_farmerDisplacementMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1024, false, triggerMachineByHashCallback, "farmer looks to zero");
+		_ripAnimationMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 1536, false, triggerMachineByHashCallback, "rip looks to zero");
 		sendWSMessage_10000(1, _planeShadowMach, _planeShadowSeries, 1, 47, 2, _planeShadowSeries, 47, 47, 0);
 		_unkFlag1 = false;
 		sendWSMessage_10000(1, _farmerDisplacementMach, _farmerLooksToZeroSeries, 1, 48, 12, _farmerLooksToZeroSeries, 48, 48, 0);
@@ -732,7 +732,7 @@ void Room801::daemon() {
 	case 11:
 		digi_play("801_s01", 2, 255, -1, -1);
 		sendWSMessage_60000(_mcTrekMach);
-		_mcTrekMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1280, 0, triggerMachineByHashCallback, "mei chen looks to zero");
+		_mcTrekMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1280, false, triggerMachineByHashCallback, "mei chen looks to zero");
 		sendWSMessage_10000(1, _mcTrekMach, _meiPrattleLoopSeries, 1, 7, 0, _meiPrattleLoopSeries, 7, 7, 0);
 		_safariShadow5Mach = series_show("SAFARI SHADOW 5", 1280, 16, -1, -1, 0, 50, 124, 304);
 		break;
@@ -853,9 +853,9 @@ void Room801::daemon() {
 			series_unload(_farmerLooksToZeroSeries);
 			series_unload(_meiLookToZeroSeries);
 			series_unload(_ripLooksToZeroSeries);
-			_farmerDisplacementMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1024, 0, triggerMachineByHashCallback, "farmer talk frames");
+			_farmerDisplacementMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1024, false, triggerMachineByHashCallback, "farmer talk frames");
 			sendWSMessage_10000(1, _farmerDisplacementMach, _farmerTalkLoopSeries, 1, 1, 0, _farmerTalkLoopSeries, 1, 1, 0);
-			_mcTrekMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1280, 0, triggerMachineByHashCallback, "mc talk frames");
+			_mcTrekMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, -53, 100, 1280, false, triggerMachineByHashCallback, "mc talk frames");
 			sendWSMessage_10000(1, _mcTrekMach, _meiPrattleLoopSeries, 8, 17, 33, _meiPrattleLoopSeries, 17, 17, 0);
 			_ripTrekHatTipPos5Series = series_load("RIP TREK HAT TIP POS5", -1, nullptr);
 			kernel_timing_trigger(210, 62, nullptr);
diff --git a/engines/m4/riddle/rooms/section8/room802.cpp b/engines/m4/riddle/rooms/section8/room802.cpp
index d250d139fc8..b957e8a6387 100644
--- a/engines/m4/riddle/rooms/section8/room802.cpp
+++ b/engines/m4/riddle/rooms/section8/room802.cpp
@@ -195,7 +195,7 @@ void Room802::parser() {
 			player_set_commands_allowed(false);
 			interface_hide();
 			ws_unhide_walker(_G(my_walker));
-			_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, 0, triggerMachineByHashCallback, "rip lights match");
+			_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "rip lights match");
 			sendWSMessage_10000(1, _ripWalksDownstairsMach, _lookWithMatch, 1, 12, 10, _lookWithMatch, 12, 12, 0);
 			break;
 		case 1:
@@ -230,7 +230,7 @@ void Room802::parser() {
 		case -1:
 			player_set_commands_allowed(false);
 			ws_hide_walker(_G(my_walker));
-			_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, 0, triggerMachineByHashCallback, "rip bends down to look in hole / at hand");
+			_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "rip bends down to look in hole / at hand");
 			sendWSMessage_10000(1, _ripWalksDownstairsMach, _ripLooksAtHand, 1, 17, 1, _ripLooksAtHand, 17, 17, 0);
 			break;
 		case 1:
@@ -264,7 +264,7 @@ void Room802::parser() {
 		switch (_G(kernel).trigger) {
 		case -1:
 			player_set_commands_allowed(false);
-			_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, 0, triggerMachineByHashCallback, "rip moves sack of rice");
+			_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "rip moves sack of rice");
 			ws_hide_walker(_G(my_walker));
 			terminateMachine(_sackAgainstWallMach);
 			sendWSMessage_10000(1, _ripWalksDownstairsMach, _ripDragsSack, 1, 15, 10, _ripDragsSack, 15, 15, 0);
@@ -307,7 +307,7 @@ void Room802::parser() {
 				player_set_commands_allowed(false);
 				ws_hide_walker(_G(my_walker));
 				terminateMachine(_handInWallMach);
-				_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, 0, triggerMachineByHashCallback, "802 rip digs at wall");
+				_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "802 rip digs at wall");
 				sendWSMessage_10000(1, _ripWalksDownstairsMach, _ripDigsWall, 1, 24, 10, _ripDigsWall, 24, 24, 0);
 				break;
 			case 1:
@@ -340,7 +340,7 @@ void Room802::parser() {
 				case -1:
 					player_set_commands_allowed(false);
 					ws_unhide_walker(_G(my_walker));
-					_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, 0, triggerMachineByHashCallback, "rip tugs at hand and removes it");
+					_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "rip tugs at hand and removes it");
 					terminateMachine(_handInWallMach);
 					sendWSMessage_10000(1, _ripWalksDownstairsMach, _ripTugsOnArm, 1, 36, 10, _ripTugsOnArm, 36, 36, 0);
 					break;
@@ -378,7 +378,7 @@ void Room802::parser() {
 			case -1:
 				player_set_commands_allowed(false);
 				ws_hide_walker(_G(my_walker));
-				_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, 0, triggerMachineByHashCallback, "rip tugs at hand (noshovel)");
+				_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 512, false, triggerMachineByHashCallback, "rip tugs at hand (noshovel)");
 				terminateMachine(_handInWallMach);
 				sendWSMessage_10000(1, _ripWalksDownstairsMach, _ripTugsBeforeDigging, 1, 15, 10, _ripTugsBeforeDigging, 15, 15, 0);
 				break;
@@ -422,7 +422,7 @@ void Room802::parser() {
 		switch (_G(kernel).trigger) {
 		case -1:
 			player_set_commands_allowed(false);
-			_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 768, 0, triggerMachineByHashCallback, "rip walks up stairs");
+			_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 768, false, triggerMachineByHashCallback, "rip walks up stairs");
 			ws_hide_walker(_G(my_walker));
 			sendWSMessage_10000(1, _ripWalksDownstairsMach, _ripUpStairs, 1, 23, 1, _ripUpStairs, 24, 29, 0);
 			break;
@@ -451,7 +451,7 @@ void Room802::daemon() {
 	case 6:
 	case 7:
 		player_set_commands_allowed(false);
-		_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 768, 0, triggerMachineByHashCallback, "rip walks down stairs");
+		_ripWalksDownstairsMach = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 768, false, triggerMachineByHashCallback, "rip walks down stairs");
 		sendWSMessage_10000(1, _ripWalksDownstairsMach, _ripDownStairs, 1, 20, 51, _ripDownStairs, 20, 20, 0);
 		break;
 	case 14:
diff --git a/engines/m4/riddle/rooms/section8/room805.cpp b/engines/m4/riddle/rooms/section8/room805.cpp
index a993909b50c..d9d88f7c31f 100644
--- a/engines/m4/riddle/rooms/section8/room805.cpp
+++ b/engines/m4/riddle/rooms/section8/room805.cpp
@@ -439,11 +439,11 @@ void Room805::init() {
 }
 
 void Room805::parser() {
-	bool lookFl = player_said_any("look", "look at");
-	bool takeFl = player_said("take");
-	bool talkFl = player_said_any("talk", "talk to");
-	bool gearFl = player_said("gear");
-	bool goFl = player_said("go");
+	const bool lookFl = player_said_any("look", "look at");
+	const bool takeFl = player_said("take");
+	const bool talkFl = player_said_any("talk", "talk to");
+	const bool gearFl = player_said("gear");
+	const bool goFl = player_said("go");
 
 	if (lookFl && player_said(" "))
 		parserSub1("805R01", 1, 255, 1, -1);
diff --git a/engines/m4/riddle/rooms/section8/room806.cpp b/engines/m4/riddle/rooms/section8/room806.cpp
index 8771905ae59..6007b1af88d 100644
--- a/engines/m4/riddle/rooms/section8/room806.cpp
+++ b/engines/m4/riddle/rooms/section8/room806.cpp
@@ -237,10 +237,10 @@ void Room806::init() {
 }
 
 void Room806::pre_parser() {
-	bool lookFl = player_said_any("look", "look at");
-	bool walkFl = player_said("walk to");
-	bool takeFl = player_said("take");
-	bool gearFl = player_said_any("push", "pull", "gear", "open", "close");
+	const bool lookFl = player_said_any("look", "look at");
+	const bool walkFl = player_said("walk to");
+	const bool takeFl = player_said("take");
+	const bool gearFl = player_said_any("push", "pull", "gear", "open", "close");
 
 	if (player_said_any(" ", "WALL", "URN")) {
 		_G(player).need_to_walk = false;
@@ -319,10 +319,10 @@ void Room806::pre_parser() {
 }
 
 void Room806::parser() {
-	bool lookFl = player_said("look at");
-	bool walkFl = player_said("walk to");
-	bool takeFl = player_said("take");
-	bool gearFl = player_said("gear");
+	const bool lookFl = player_said("look at");
+	const bool walkFl = player_said("walk to");
+	const bool takeFl = player_said("take");
+	const bool gearFl = player_said("gear");
 
 	if (lookFl && player_said_any(" ", "   "))
 		digi_play("806r04", 1, 255, -1, -1);




More information about the Scummvm-git-logs mailing list