[Scummvm-git-logs] scummvm master -> 4c9bc8d1f2db37af06c4e4a27c21179da63d2b58

Strangerke noreply at scummvm.org
Wed Feb 5 06:28:42 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:
4c9bc8d1f2 M4: RIDDLE: Some work on Room809::parser


Commit: 4c9bc8d1f2db37af06c4e4a27c21179da63d2b58
    https://github.com/scummvm/scummvm/commit/4c9bc8d1f2db37af06c4e4a27c21179da63d2b58
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-02-05T07:28:35+01:00

Commit Message:
M4: RIDDLE: Some work on Room809::parser

Changed paths:
    engines/m4/riddle/rooms/section8/room809.cpp
    engines/m4/riddle/rooms/section8/room809.h


diff --git a/engines/m4/riddle/rooms/section8/room809.cpp b/engines/m4/riddle/rooms/section8/room809.cpp
index 726af91250c..05bc7681887 100644
--- a/engines/m4/riddle/rooms/section8/room809.cpp
+++ b/engines/m4/riddle/rooms/section8/room809.cpp
@@ -164,16 +164,120 @@ void Room809::parser() {
 
 	switch (_G(kernel).trigger) {
 	case -1:
+		if (check_said()) {
+			int32 destX;
+			int32 destY;
+			player_update_info(_G(my_walker), &_G(player_info));
+			if (_G(player_info).x >= _G(player).click_x) {
+				destY = imath_min(145, _G(player).x + 20);
+				destY = imath_max(destY, 145);
+				if (_G(player).click_y < 315) {
+					if (_dword1A1998 < 0)
+						_dword1A1998 = 11;
+					destX = 315;
+				} else if (_G(player).click_y <= 321) {
+					destX = _G(player).click_y;
+				} else {
+					if (_dword1A1998 < 0)
+						_dword1A1998 = 7;
+
+					destX = 321;
+				}
+			} else {
+				if (_G(player).click_x >= 1340)
+					destY = 1349;
+				else
+					destY = imath_max(_G(player_info).x, _G(player).click_x - 20);
+
+				if (_G(player).click_y < 315) {
+					if (_dword1A1998 < 0)
+						_dword1A1998 = 1;
+					destX = 315;
+				} else if (_G(player).click_y <= 321)
+					destX = _G(player).click_y;
+				else {
+					if (_dword1A1998 < 0)
+						_dword1A1998 = 5;
+
+					destX = 321;
+				}
+			}
+			ws_walk(_G(my_walker), destX, destY, nullptr, 1, _dword1A1998, true);
+		} else {
+			kernel_trigger_dispatchx(kernel_trigger_create(1));
+		}
+
+		break;
+
 	case 1:
+		//TODO Not implemented yet
+		break;
+
 	case 39:
+		_G(flags[V101]) = 1;
+		digi_play("809r07a", 1, 255, -1, -1);
+		break;
+
 	case 40:
+		//TODO Not implemented yet
+		break;
+
 	case 41:
+		digi_play("809r11", 1, 255, -1, -1);
+		break;
+
 	case 42:
+		//TODO Not implemented yet
+		break;
+
 	case 43:
+		player_set_commands_allowed(true);
+		sendWSMessage_150000(_G(my_walker), -1);
+		switch (imath_ranged_rand(1, 4)) {
+		case 1:
+			digi_play("com038", 1, 255, -1, 997);
+			break;
+
+		case 2:
+			digi_play("com039", 1, 255, -1, 997);
+			break;
+
+		case 3:
+			digi_play("com040", 1, 255, -1, 997);
+			break;
+
+		case 4:
+		default:
+			digi_play("com041", 1, 255, -1, 997);
+			break;
+		}
+
+		break;
+
 	case 44:
+		//TODO Not implemented yet
+		break;
+
 	case 45:
+		series_play("809rp03", 0, 0, 46, 5, 0, 100, 0, 0, 105, -1);
+		digi_play("809_s02", 2, 255, -1, -1);
+
+		break;
+
 	case 46:
+		series_play("809rp03", 0, 2, 47, 5, 0, 100, 0, 0, 0, -1);
+		digi_play("809R17", 1, 255, -1, -1);
+
+		break;
+
 	case 47:
+		player_set_commands_allowed(true);
+		series_unload(_809hallSeries);
+		ws_unhide_walker(_G(my_walker));
+		ws_demand_facing(_G(my_walker), 3);
+
+		break;
+
 	case 48:
 	case 49:
 	case 50:
@@ -198,7 +302,7 @@ void Room809::parser() {
 		break;
 	}
 
-	
+
 	// TODO Not implemented yet
 }
 
@@ -491,6 +595,12 @@ int32 Room809::room809_sub1(int32 val1, int32 val2) {
 	return 0;
 }
 
+bool Room809::check_said() {
+	//TODO Not implemented yet
+
+	return false;
+}
+
 } // namespace Rooms
 } // namespace Riddle
 } // namespace M4
diff --git a/engines/m4/riddle/rooms/section8/room809.h b/engines/m4/riddle/rooms/section8/room809.h
index 761a9bcd8e0..e5362085011 100644
--- a/engines/m4/riddle/rooms/section8/room809.h
+++ b/engines/m4/riddle/rooms/section8/room809.h
@@ -41,12 +41,13 @@ public:
 
 private:
 	int32 room809_sub1(int32 val1, int32 val2);
+	bool check_said();
 
 	int32 _field20 = 0;
 	int32 _field24 = 0;
 	int32 _field28 = 0;
 	int32 _field2C = 0;
-	
+
 	const char *_enableHotspotName = nullptr;
 
 	byte _byte1A1990[12]; // random size for the moment, enough for facings




More information about the Scummvm-git-logs mailing list