[Scummvm-git-logs] scummvm master -> 5809ee193ae736f841d4d229a42c2abec255efb5

Strangerke noreply at scummvm.org
Thu Jan 9 21:37:46 UTC 2025


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:
5809ee193a M4: RIDDLE: Room 808: Implement daemon up to trigger 17, some renaming


Commit: 5809ee193ae736f841d4d229a42c2abec255efb5
    https://github.com/scummvm/scummvm/commit/5809ee193ae736f841d4d229a42c2abec255efb5
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-01-09T22:37:35+01:00

Commit Message:
M4: RIDDLE: Room 808: Implement daemon up to trigger 17, some renaming

Changed paths:
    engines/m4/riddle/rooms/section8/room807.cpp
    engines/m4/riddle/rooms/section8/room808.cpp
    engines/m4/riddle/rooms/section8/section8_room.cpp
    engines/m4/riddle/rooms/section8/section8_room.h
    engines/m4/wscript/ws_machine.h


diff --git a/engines/m4/riddle/rooms/section8/room807.cpp b/engines/m4/riddle/rooms/section8/room807.cpp
index acedeaf8c97..9963fcd7609 100644
--- a/engines/m4/riddle/rooms/section8/room807.cpp
+++ b/engines/m4/riddle/rooms/section8/room807.cpp
@@ -254,7 +254,7 @@ void Room807::parser() {
 			case 10:
 				player_set_commands_allowed(false);
 				setGlobals3(_ripLowReachPos1Series, 1, 24);
-				subD7916(_G(my_walker), 20);
+				sendWSMessage_3840000(_G(my_walker), 20);
 
 				break;
 
@@ -269,7 +269,7 @@ void Room807::parser() {
 			case 40:
 				digi_play("807r14", 1, 255, -1, -1);
 				setGlobals3(_ripLowReachPos1Series, 24, 1);
-				subD7916(_G(my_walker), 50);
+				sendWSMessage_3840000(_G(my_walker), 50);
 
 				break;
 
@@ -498,7 +498,7 @@ void Room807::parser() {
 					if (inv_object_in_scene("wooden post", 807)) {
 						player_set_commands_allowed(false);
 						setGlobals3(_ripTrekHiReach2HndSeries, 1, 13);
-						subD7916(_G(my_walker), 10);
+						sendWSMessage_3840000(_G(my_walker), 10);
 					} else {
 						digi_play("807r26", 1, 255, -1, -1);
 					}
@@ -517,7 +517,7 @@ void Room807::parser() {
 			case 15:
 				terminateMachine(_807PostMach);
 				setGlobals3(_ripTrekHiReach2HndSeries, 13, 1);
-				subD7916(_G(my_walker), 20);
+				sendWSMessage_3840000(_G(my_walker), 20);
 
 				break;
 
@@ -1123,7 +1123,7 @@ void Room807::daemon() {
 		}
 
 		setGlobals3(_mctd82aSeries, 1, 22);
-		subD7916(_mcTrekMach, 18);
+		sendWSMessage_3840000(_mcTrekMach, 18);
 		switch (_807newFacing) {
 		case 3:
 		case 9:
@@ -1135,7 +1135,7 @@ void Room807::daemon() {
 			break;
 		}
 
-		subD7916(_G(my_walker), 17);
+		sendWSMessage_3840000(_G(my_walker), 17);
 
 		break;
 
@@ -1179,13 +1179,13 @@ void Room807::daemon() {
 			break;
 		}
 
-		subD7916(_G(my_walker), 21);
+		sendWSMessage_3840000(_G(my_walker), 21);
 
 		break;
 
 	case 20:
 		setGlobals3(_mctd82aSeries, 22, 1);
-		subD7916(_mcTrekMach, 21);
+		sendWSMessage_3840000(_mcTrekMach, 21);
 
 		break;
 
diff --git a/engines/m4/riddle/rooms/section8/room808.cpp b/engines/m4/riddle/rooms/section8/room808.cpp
index e45321d541c..8185a2d15fe 100644
--- a/engines/m4/riddle/rooms/section8/room808.cpp
+++ b/engines/m4/riddle/rooms/section8/room808.cpp
@@ -21,6 +21,8 @@
 
 #include "m4/riddle/rooms/section8/room808.h"
 
+
+#include "m4/adv_r/other.h"
 #include "m4/core/errors.h"
 #include "m4/graphics/gr_series.h"
 #include "m4/riddle/riddle.h"
@@ -288,7 +290,7 @@ void Room808::daemon() {
 		if (_G(flags[V097]) == 0) {
 			_meiChienHandsBehindBackSeries = series_load("MEI CHIEN HANDS BEHIND BACK", -1, nullptr);
 			setGlobals3(_meiChienHandsBehindBackSeries, 1, 17);
-			subD7916(_mcTrekMach, -1);
+			sendWSMessage_3840000(_mcTrekMach, -1);
 		}
 
 		kernel_timing_trigger(imath_ranged_rand(1200, 1800), 18);
@@ -362,6 +364,7 @@ void Room808::daemon() {
 		player_set_commands_allowed(false);
 		ws_hide_walker(_G(my_walker));
 		terminateMachine(_808PosMach);
+
 		digi_preload("808_s04", -1);
 		digi_preload("808_s02", -1);
 		digi_preload("28_02n01", 807);
@@ -372,14 +375,112 @@ void Room808::daemon() {
 		break;
 
 	case 9:
+		disable_player_commands_and_fade_init(12);
+		break;
+
 	case 10:
+		player_set_commands_allowed(false);
+		ws_hide_walker(_G(my_walker));
+		terminateMachine(_808PosMach);
+
+		digi_preload("808_s04", -1);
+		digi_preload("808_s02", -1);
+		digi_preload("28_02n01", 807);
+
+		if (inv_object_in_scene("farmer's shovel", 808)) {
+			_808RipFallShovelNearSideMach = series_stream("808 RIP FALL WSHOVEL FAR SIDE", 5, 0, -1);
+			series_stream_break_on_frame(_808RipFallShovelNearSideMach, 5, 13);
+		} else {
+			_808RipFallShovelNearSideMach = series_stream("808 RIP FALLS", 5, 0, -1);
+			series_stream_break_on_frame(_808RipFallShovelNearSideMach, 5, 14);
+		}
+
+		digi_play("808_s04", 3, 255, -1, -1);
+
+		break;
+
 	case 11:
+		if (inv_object_in_scene("farmer's shovel", 808)) {
+			series_show("808pos2", 0, 0, -1, -1, 4, 100, 0, 0);
+		}
+
+		disable_player_commands_and_fade_init(12);
+
+		break;
+
 	case 12:
+		if (_G(spleenSpraying)) {
+			kernel_timing_trigger(200, 966, nullptr);
+		} else {
+			ws_unhide_walker(_G(my_walker));
+			ws_demand_location(_G(my_walker), 202, 179);
+			ws_demand_facing(_G(my_walker), 2);
+			other_save_game_for_resurrection();
+
+			_G(game).new_section = 4;
+			_G(game).new_room = 413;
+		}
+
+		break;
+
 	case 13:
+		series_stream_break_on_frame(_808RipFallShovelNearSideMach, 21, 11);
+		digi_play("808_s02", 2, 255, -1, -1);
+
+		if (_G(flags[V097] == 0)) {
+			setGlobals3(_meiChienHandsBehindBackSeries, 17, 1);
+			sendWSMessage_3840000(_mcTrekMach, 16);
+		} else {
+			ws_hide_walker(_mcTrekMach);
+			series_play("808mc99", 3840, 16, -1, 5, 0, 100, 0, 0, 0, -1);
+		}
+
+		kernel_timing_trigger(45, 17, nullptr);
+
+		break;
+
 	case 14:
+		series_stream_break_on_frame(_808RipFallShovelNearSideMach, 24, 11);
+		digi_play("808_s02", 2, 255, -1, -1);
+
+		if (_G(flags[V097] == 0)) {
+			setGlobals3(_meiChienHandsBehindBackSeries, 17, 1);
+			sendWSMessage_3840000(_mcTrekMach, 16);
+		} else {
+			ws_hide_walker(_mcTrekMach);
+			series_play("808mc99", 3840, 16, -1, 5, 0, 100, 0, 0, 0, -1);
+		}
+
+		kernel_timing_trigger(45, 17, nullptr);
+
+
+		break;
+
 	case 15:
+		series_stream_break_on_frame(_808RipFallShovelNearSideMach, 24, 9);
+		digi_play("808_s02", 2, 255, -1, -1);
+
+		if (_G(flags[V097] == 0)) {
+			setGlobals3(_meiChienHandsBehindBackSeries, 17, 1);
+			sendWSMessage_3840000(_mcTrekMach, 16);
+		} else {
+			ws_demand_location(_mcTrekMach, -1000, -1000);
+			ws_hide_walker(_mcTrekMach);
+			series_play("808mc99", 3840, 16, -1, 5, 0, 100, 0, 0, 0, -1);
+		}
+
+		kernel_timing_trigger(45, 17, nullptr);
+
+		break;
+
 	case 16:
+		series_play("808mc98", 0, 16, -1, 5, 0, 100, 0, 0, 0, -1);
+		break;
+
 	case 17:
+		digi_play("28_02n01", 1, 255, -1, 807);
+		break;
+
 	case 18:
 	case 19:
 	case 20:
diff --git a/engines/m4/riddle/rooms/section8/section8_room.cpp b/engines/m4/riddle/rooms/section8/section8_room.cpp
index d0b048281d1..bfecc7751c8 100644
--- a/engines/m4/riddle/rooms/section8/section8_room.cpp
+++ b/engines/m4/riddle/rooms/section8/section8_room.cpp
@@ -47,13 +47,13 @@ int32 Section8Room::subCE498(int32 val1) {
 	return -1;
 }
 
-void Section8Room::subD7916(machine *machine, int32 trigger) {
+void Section8Room::sendWSMessage_3840000(machine *machine, int32 trigger) {
 	int32 num = trigger;
 	if (trigger == 0)
 		num = -1;
 
 	_G(globals)[GLB_TEMP_4] = kernel_trigger_create(num);
-	sendWSMessage(0x3840000, 0, machine, 0, nullptr, 1);
+	sendWSMessage(ACTION_900 << 16, 0, machine, 0, nullptr, 1);
 }
 
 int32 Section8Room::subCE52E(int32 val1) {
@@ -400,7 +400,7 @@ void Section8Room::parser() {
 				_savedPlayerInfoFacing = _G(player_info).facing;
 				_rptldSerie = series_load("rptld1a", -1, nullptr);
 				setGlobals3(_rptldSerie, 1, 6);
-				subD7916(_G(my_walker), 10);
+				sendWSMessage_3840000(_G(my_walker), 10);
 
 				break;
 
@@ -414,7 +414,7 @@ void Section8Room::parser() {
 
 			case 20:
 				setGlobals3(_rptldSerie, 6, 1);
-				subD7916(_G(my_walker), 30);
+				sendWSMessage_3840000(_G(my_walker), 30);
 				break;
 
 			case 30:
@@ -512,7 +512,7 @@ void Section8Room::parser() {
 					player_set_commands_allowed(false);
 					_ripTrekLowReach = series_load("RIP TREK LOW REACH POS2", -1, nullptr);
 					setGlobals3(_ripTrekLowReach, 1, 16);
-					subD7916(_G(my_walker), 10);
+					sendWSMessage_3840000(_G(my_walker), 10);
 				} else
 					_G(player).command_ready = true;
 
@@ -527,7 +527,7 @@ void Section8Room::parser() {
 			case 20:
 				terminateMachine(_844postMach);
 				setGlobals3(_ripTrekLowReach, 16, 1);
-				subD7916(_G(my_walker), 30);
+				sendWSMessage_3840000(_G(my_walker), 30);
 				digi_play("844r22", 1, 255, -1, -1);
 
 				break;
@@ -638,7 +638,7 @@ void Section8Room::parser() {
 			player_set_commands_allowed(false);
 			if (_G(flags)[V276] == 0) {
 				setGlobals3(_meiHandsBehindBack, 17, 1);
-				subD7916(_mcTrekMach, -1);
+				sendWSMessage_3840000(_mcTrekMach, -1);
 			}
 			disable_player_commands_and_fade_init(20);
 
@@ -685,7 +685,7 @@ void Section8Room::daemon() {
 			series_unload(S8_SHADOW_DIRS1[4]);
 			_meiHandsBehindBack = series_load("MEI CHIEN HANDS BEHIND BACK", -1, nullptr);
 			setGlobals3(_meiHandsBehindBack, 1, 17);
-			subD7916(_mcTrekMach, 4);
+			sendWSMessage_3840000(_mcTrekMach, 4);
 			_guessHotspotName = Common::String("MEI CHEN      ");
 			_unkArray[_unkArrayIndex] = 0;
 			kernel_timing_trigger(imath_ranged_rand(1200, 1800), 5, nullptr);
@@ -725,7 +725,7 @@ void Section8Room::daemon() {
 		series_unload(S8_SHADOW_DIRS2[2]);
 		_meiHandsBehindBack = series_load("MEI CHIEN HANDS BEHIND BACK", -1, nullptr);
 		setGlobals3(_meiHandsBehindBack, 1, 17);
-		subD7916(_mcTrekMach, 4);
+		sendWSMessage_3840000(_mcTrekMach, 4);
 		break;
 
 	case 4:
@@ -793,7 +793,7 @@ void Section8Room::daemon() {
 		series_unload(_meiHandsBehindBack);
 		_mctdSerie = series_load("mctd82a", -1, nullptr);
 		setGlobals3(_mctdSerie, 1, 22);
-		subD7916(_mcTrekMach, 11);
+		sendWSMessage_3840000(_mcTrekMach, 11);
 		if (_guessFacing == 3 || _guessFacing == 9) {
 			_ripLooksAround = series_load("RIP POS 3 LOOK AROUND", -1, nullptr);
 			setGlobals3(_ripLooksAround, 1, 20);
@@ -802,7 +802,7 @@ void Section8Room::daemon() {
 			setGlobals3(_ripLooksAround, 1, 14);
 		}
 
-		subD7916(_G(my_walker), 10);
+		sendWSMessage_3840000(_G(my_walker), 10);
 		_case7RandVal = imath_ranged_rand(1, 4);
 		switch (_case7RandVal) {
 		case 1:
@@ -860,12 +860,12 @@ void Section8Room::daemon() {
 			setGlobals3(_ripLooksAround, 13, 1);
 		}
 
-		subD7916(_G(my_walker), 14);
+		sendWSMessage_3840000(_G(my_walker), 14);
 		break;
 
 	case 13:
 		setGlobals3(_mctdSerie, 22, 1);
-		subD7916(_mcTrekMach, 14);
+		sendWSMessage_3840000(_mcTrekMach, 14);
 		break;
 
 	case 14:
@@ -877,7 +877,7 @@ void Section8Room::daemon() {
 			series_unload(_mctdSerie);
 			_meiHandsBehindBack = series_load("MEI CHIEN HANDS BEHIND BACK", -1, nullptr);
 			setGlobals3(_mctdSerie, 17, 17);
-			subD7916(_mcTrekMach, -1);
+			sendWSMessage_3840000(_mcTrekMach, -1);
 			kernel_timing_trigger(imath_ranged_rand(7200, 14400), 5, nullptr);
 		}
 		break;
diff --git a/engines/m4/riddle/rooms/section8/section8_room.h b/engines/m4/riddle/rooms/section8/section8_room.h
index 95d21509967..5bf5a2a9bb3 100644
--- a/engines/m4/riddle/rooms/section8/section8_room.h
+++ b/engines/m4/riddle/rooms/section8/section8_room.h
@@ -87,7 +87,7 @@ protected:
 	machine *_ripPushMach = nullptr;
 
 	int32 subCE498(int32 val1);
-	void subD7916(machine *machine, int32 trigger);
+	void sendWSMessage_3840000(machine *machine, int32 trigger);
 	int32 subCE52E(int32 val1);
 	void moveScreen(int32 dx, int32 dy);
 	void getSeriesName(int32 val1, bool true_or_False);
diff --git a/engines/m4/wscript/ws_machine.h b/engines/m4/wscript/ws_machine.h
index 30f1b930514..3a8f1f75949 100644
--- a/engines/m4/wscript/ws_machine.h
+++ b/engines/m4/wscript/ws_machine.h
@@ -64,7 +64,8 @@ enum {
 	ACTION_31 = 31,
 	ACTION_32 = 32,
 	ACTION_33 = 33,
-	ACTION_666 = 666
+	ACTION_666 = 666,
+	ACTION_900 = 900
 };
 
 // A message request




More information about the Scummvm-git-logs mailing list