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

Strangerke noreply at scummvm.org
Sun Feb 2 21:11:57 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:
b8eadc06ce M4: RIDDLE: Finish the implementation of Room808


Commit: b8eadc06ce0a8d8650d7134fc2697773a16c6afd
    https://github.com/scummvm/scummvm/commit/b8eadc06ce0a8d8650d7134fc2697773a16c6afd
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2025-02-02T22:11:45+01:00

Commit Message:
M4: RIDDLE: Finish the implementation of Room808

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


diff --git a/engines/m4/riddle/rooms/section8/room808.cpp b/engines/m4/riddle/rooms/section8/room808.cpp
index 49478299eed..55a2bea44fa 100644
--- a/engines/m4/riddle/rooms/section8/room808.cpp
+++ b/engines/m4/riddle/rooms/section8/room808.cpp
@@ -426,7 +426,7 @@ void Room808::parser() {
 				setBridgeHotspots(_G(flags[V094]), false);
 				ws_hide_walker(_G(my_walker));
 				terminateMachine(_808PosMach);
-				room808_sub1();
+				setPosMachInfo();
 				_808PosMach = series_stream(_posMachName, 5, 1281, 10);
 				series_stream_break_on_frame(_808PosMach, 7, _posMachFrameNum);
 				player_update_info(_G(my_walker), &_G(player_info));
@@ -1891,8 +1891,165 @@ void Room808::addMcHotspot(int32 val1) {
 	_G(currentSceneDef).hotspots = hotspot_add(_G(currentSceneDef).hotspots, newHotspot, true);
 }
 
-void Room808::room808_sub1() {
-	// TODO Not implemented yet
+void Room808::setPosMachInfo() {
+	if (_G(flags[V095])) {
+		if (inv_object_in_scene("FARMER'S SHOVEL", 808)) {
+			switch (_G(flags[V094])) {
+			case 1:
+				_posMachName = "808spn16";
+				_G(flags[V095]) = 0;
+				_posMachIndex = 0;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 0;
+
+				break;
+
+			case 2:
+				_posMachName = "808spn15";
+				_posMachIndex = 6;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 1;
+
+				break;
+
+			case 3:
+				_posMachName = "808spn14";
+				_posMachIndex = 4;
+				_posMachFrameNum = 17;
+				_G(flags[V094]) = 2;
+
+				break;
+
+			case 4:
+				_posMachName = "808spn13";
+				_posMachIndex = 3;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 3;
+
+				break;
+
+			default:
+				break;
+			}
+		} else {
+			switch (_G(flags[V094])) {
+			case 1:
+				_posMachName = "808spn08";
+
+				_G(flags[V095]) = 0;
+				_posMachIndex = 0;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 0;
+
+				break;
+
+			case 2:
+				_posMachName = "808spn07";
+				_posMachIndex = 6;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 1;
+
+				break;
+
+			case 3:
+				_posMachName = "808spn06";
+				_posMachIndex = 5;
+				_posMachFrameNum = 17;
+				_G(flags[V094]) = 2;
+
+				break;
+
+			case 4:
+				_posMachName = "808spn05";
+				_posMachIndex = 3;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 3;
+
+				break;
+
+			default:
+				break;
+			}
+		}
+	} else {
+		if (inv_object_in_scene("FARMER'S SHOVEL", 808)) {
+			switch (_G(flags[V094])) {
+			case 1:
+				_posMachName = "808spn09";
+				_posMachIndex = 1;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 1;
+
+				break;
+
+			case 2:
+				_posMachName = "808spn10";
+				_posMachIndex = 2;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 2;
+
+				break;
+
+			case 3:
+				_posMachName = "808spn11";
+				_posMachIndex = 3;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 3;
+
+				break;
+
+			case 4:
+				_posMachName = "808spn12";
+				_posMachIndex = 5;
+				_posMachFrameNum = 10;
+				_G(flags[V094]) = 4;
+				_G(flags[V095]) = 1;
+
+				break;
+
+			default:
+				break;
+			}
+		} else {
+			switch (_G(flags[V094])) {
+			case 1:
+				_posMachName = "808spn01";
+				_posMachIndex = 1;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 1;
+
+				break;
+
+			case 2:
+				_posMachName = "808spn02";
+				_posMachIndex = 2;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 2;
+
+				break;
+
+			case 3:
+				_posMachName = "808spn03";
+				_posMachIndex = 3;
+				_posMachFrameNum = 13;
+				_G(flags[V094]) = 3;
+
+				break;
+
+			case 4:
+				_posMachName = "808spn04";
+				_posMachIndex = 4;
+				_posMachFrameNum = 10;
+				_G(flags[V094]) = 4;
+				_G(flags[V095]) = 1;
+
+				break;
+
+			default:
+				break;
+			}
+		}
+	}
 }
 
 } // namespace Rooms
diff --git a/engines/m4/riddle/rooms/section8/room808.h b/engines/m4/riddle/rooms/section8/room808.h
index fefcd568a72..401acc922c2 100644
--- a/engines/m4/riddle/rooms/section8/room808.h
+++ b/engines/m4/riddle/rooms/section8/room808.h
@@ -44,7 +44,7 @@ private:
 	void addMcHotspot(int32 val1);
 	bool getWalkPath(machine *machine, int32 walk_x, int32 walk_y);
 	void setBridgeHotspots(int val1, bool activeFl);
-	void room808_sub1();
+	void setPosMachInfo();
 
 	int32 _dword1A195C_facing = 0;
 	int32 _dword1A1958 = 0;




More information about the Scummvm-git-logs mailing list