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

Strangerke noreply at scummvm.org
Tue Oct 22 22:36:14 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:
c9025a7f7f M4: RIDDLE: Finish the implementation of room 805
ec1b54462f M4: RIDDLE: Partial implementation of room 806 (preload, init, pre-parser)


Commit: c9025a7f7faa7647268a961d432c2d6d141c2f6b
    https://github.com/scummvm/scummvm/commit/c9025a7f7faa7647268a961d432c2d6d141c2f6b
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-10-23T00:28:18+01:00

Commit Message:
M4: RIDDLE: Finish the implementation of room 805

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


diff --git a/engines/m4/riddle/rooms/section8/room805.cpp b/engines/m4/riddle/rooms/section8/room805.cpp
index bd071733065..18030d5921d 100644
--- a/engines/m4/riddle/rooms/section8/room805.cpp
+++ b/engines/m4/riddle/rooms/section8/room805.cpp
@@ -522,7 +522,7 @@ void Room805::parser() {
 			case -1:
 				player_set_commands_allowed(false);
 				ws_hide_walker(_G(my_walker));
-				_unkSeries4 = series_load("805 RIP LOOKS UP", -1, nullptr);
+				_ripLooksUpSeries = series_load("805 RIP LOOKS UP", -1, nullptr);
 				_ripSiftsDirtMach = series_play("805 RIP LOOKS UP", 256, 16, 2, 5, 0, 100, 0, 0, 0, 11);
 				digi_stop(1);
 
@@ -544,7 +544,7 @@ void Room805::parser() {
 				break;
 
 			case 4:
-				series_unload(_unkSeries4);
+				series_unload(_ripLooksUpSeries);
 				sendWSMessage_140000(_G(my_walker), 5);
 				ws_turn_to_face(_mcMach, 4, -1);
 
@@ -880,10 +880,239 @@ void Room805::parser() {
 		}
 	} // if (gearFl && player_said("CHARIOT"))
 
-	warning("STUB - Room805::parser");
+	else if (player_said("SOLDIER'S SHIELD", "SOLDIER") || player_said("TWO SOLDIERS' SHIELDS", "SOLDIER")) {
+		switch (_G(kernel).trigger) {
+		case -1:
+			if (_G(flags[V257])) {
+				player_set_commands_allowed(false);
+				setGlobals1(_unkSeries5, 1, 13, 13, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+				sendWSMessage_110000(_G(my_walker), 10);
+				digi_stop(1);
+			} else {
+				return;
+			}
 
-	_G(player).command_ready = false;
+			break;
+
+		case 2:
+			hotspot_set_active("SHIELD", true);
+			player_set_commands_allowed(true);
+			break;
+
+		case 10:
+			_G(flags[V257]) = 0;
+			if (_G(flags[V258])) {
+				inv_put_thing_in("TWO SOLDIERS' SHIELDS", 999);
+				inv_give_to_player("SOLDIER'S SHIELD");
+			} else {
+				inv_put_thing_in("TWO SOLDIERS' SHIELDS", 805);
+				inv_put_thing_in("SOLDIER'S SHIELD", 999);
+			}
+
+			_farSoldiersShieldMach = series_play("805 FAR SOLDIERS SHIELD", 2304, 0, -1, 0, -1, 100, 0, 0, 0, -1);
+			sendWSMessage_140000(_G(my_walker), 2);
+
+			break;
+
+		default:
+			break;
+		}
+	} // if (player_said("SOLDIER'S SHIELD", "SOLDIER") || player_said("TWO SOLDIERS' SHIELDS", "SOLDIER"))
+
+	else if (player_said("SOLDIER'S SHIELD", "SOLDIER ") || player_said("TWO SOLDIERS' SHIELDS", "SOLDIER ")) {
+		switch (_G(kernel).trigger) {
+		case -1:
+			if (_G(flags[V258])) {
+				player_set_commands_allowed(false);
+				setGlobals1(_unkSeries6, 1, 12, 12, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
+				sendWSMessage_110000(_G(my_walker), 10);
+				digi_stop(1);
+			} else {
+				return;
+			}
+
+			break;
+
+		case 2:
+			hotspot_set_active("SHIELD ", true);
+			player_set_commands_allowed(true);
+			break;
+
+		case 10:
+			_G(flags[V258]) = 0;
+			if (_G(flags[V257])) {
+				inv_put_thing_in("TWO SOLDIERS' SHIELDS", 999);
+				inv_give_to_player("SOLDIER'S SHIELD");
+			} else {
+				inv_put_thing_in("TWO SOLDIERS' SHIELDS", 805);
+				inv_put_thing_in("SOLDIER'S SHIELD", 999);
+			}
+
+			_nearSoldiersShieldMach = series_play("805 NEAR SOLDIERS SHIELD", 1280, 0, -1, 0, -1, 100, 0, 0, 0, -1);
+			sendWSMessage_140000(_G(my_walker), 2);
+
+			break;
+		default:
+			break;
+		}
+	} // if (player_said("SOLDIER'S SHIELD", "SOLDIER ") || player_said("TWO SOLDIERS' SHIELDS", "SOLDIER "))
+
+	else if (gearFl && (player_said("URN") || player_said("URN ")))
+		parserSub1("COM072", 1, 255, 1, 997);
+
+	else if (gearFl && player_said("UNLIT URN"))
+		parserSub1("COM073", 1, 255, 1, 997);
+
+	else if (gearFl && (player_said("SHIELD") || player_said("SHIELD ") || player_said("SOLDIER'S SHIELD")))
+		parserSub1("805R23", 1, 255, 1, -1);
+
+	else if (gearFl && (player_said("WOODEN POST") || player_said("WOODEN BEAM")))
+		parserSub1("805R24", 1, 255, 1, -1);
+
+	else if (gearFl && player_said("MEI CHEN"))
+		parserSub1("COM017", 1, 255, 1, 997);
+
+	else if ((player_said("WOODEN POST", "JADE DOOR") && inv_player_has("WOODEN POST") && !_G(flags[V272]))
+			|| (player_said("WOODEN POST", "JADE DOOR ") && inv_player_has("WOODEN POST") && !_G(flags[V272]))
+			|| (player_said("WOODEN BEAN", "JADE DOOR") && inv_player_has("WOODEN BEAN"))
+			|| (player_said("WOODEN BEAN", "JADE DOOR ") && inv_player_has("WOODEN BEAN")))
+		parserSub1("805r25", 1, 255, 1, -1);
+
+	else if (player_said("journal") && !takeFl && !lookFl && !inv_player_has(_G(player).noun))
+		parserSub1("com042", 1, 255, 1, 997);
+
+	else if (player_said("Fifth Door")) {
+		switch (_G(kernel).trigger) {
+		case -1:
+			player_set_commands_allowed(false);
+			disable_player_commands_and_fade_init(10);
+
+			break;
+
+		case 10:
+			adv_kill_digi_between_rooms(false);
+			digi_play_loop("950_s29", 3, 180, -1, 950);
+			_G(game).new_room = 844;
+
+			break;
+
+		default:
+			break;
+		}
+	} // if (player_said("Fifth Door"))
+
+	else if (player_said("Fourth Door")) {
+		switch (_G(kernel).trigger) {
+		case -1:
+			player_set_commands_allowed(false);
+			disable_player_commands_and_fade_init(10);
+
+			break;
+
+		case 10:
+			adv_kill_digi_between_rooms(false);
+			digi_play_loop("950_s29", 3, 180, -1, 950);
+			_G(game).new_room = 834;
+
+			break;
+
+		default:
+			break;
+		}
+	} // if (player_said("Fourth Door"))
+
+	else if (player_said("Third Door")) {
+		switch (_G(kernel).trigger) {
+		case -1:
+			player_set_commands_allowed(false);
+			disable_player_commands_and_fade_init(10);
+
+			break;
+
+		case 10:
+			adv_kill_digi_between_rooms(false);
+			digi_play_loop("950_s29", 3, 180, -1, 950);
+			_G(game).new_room = 814;
+
+			break;
+
+		default:
+			break;
+		}
+	} // if (player_said("Third Door"))
+
+	else if (player_said("Second Door")) {
+		switch (_G(kernel).trigger) {
+		case -1:
+			player_set_commands_allowed(false);
+			disable_player_commands_and_fade_init(10);
+
+			break;
+
+		case 10:
+			adv_kill_digi_between_rooms(false);
+			digi_play_loop("950_s29", 3, 180, -1, 950);
+			_G(game).new_room = 824;
+
+			break;
+
+		default:
+			break;
+		}
+	} // if (player_said("Second Door"))
+
+	else if (player_said("First Door")) {
+		switch (_G(kernel).trigger) {
+		case -1:
+			kernel_timing_trigger(15, 10, nullptr);
+
+			break;
+
+		case 2:
+			adv_kill_digi_between_rooms(false);
+			digi_play_loop("950_s29", 3, 180, -1, 950);
+			_G(game).new_room = 804;
+
+			break;
+
+		case 10:
+			player_set_commands_allowed(false);
+			disable_player_commands_and_fade_init(2);
+
+			break;
+
+		default:
+			break;
+		}
+	} // if (player_said("First Door"))
+
+	else if (goFl && (player_said("Jade Door") || player_said("Jade Door "))) {
+		switch (_G(kernel).trigger) {
+		case -1:
+			if (_G(flags[V272])) {
+				player_set_commands_allowed(false);
+				disable_player_commands_and_fade_init(3);
+			} else if (_G(flags[V271])) {
+				parserSub1("805r34", 1, 255, 1, -1);
+			}
+
+			break;
+		case 3:
+			adv_kill_digi_between_rooms(false);
+			digi_play_loop("950_s29", 3, 180, -1, 950);
+			_G(game).new_room = 806;
 
+			break;
+
+		default:
+			break;
+		}
+	} //  if (goFl && (player_said("Jade Door") || player_said("Jade Door ")))
+
+	else
+		return;
+
+	_G(player).command_ready = false;
 }
 
 void Room805::daemon() {
diff --git a/engines/m4/riddle/rooms/section8/room805.h b/engines/m4/riddle/rooms/section8/room805.h
index 7fef2b9a8f8..b930f023d01 100644
--- a/engines/m4/riddle/rooms/section8/room805.h
+++ b/engines/m4/riddle/rooms/section8/room805.h
@@ -44,17 +44,17 @@ private:
 	int32 _meiSpookedPos2 = 0;
 	int32 _meiTalkPos3 = 0;
 	int32 _meiTrekTalkerSeries = 0;
-	int32 _ripPos3LookAround = 0;
 	int32 _ripHeadTurnPos3 = 0;
 	int32 _ripLookDownPos3 = 0;
+	int32 _ripLooksUpSeries = 0;
 	int32 _ripLowReachPos2 = 0;
-	int32 _ripSiftsDirtSeries = 0;
-	int32 _ripTalkerPos3 = 0;
 	int32 _ripMedHiReachPos2 = 0;
 	int32 _ripMedHiReachPos3 = 0;
+	int32 _ripPos3LookAround = 0;
+	int32 _ripSiftsDirtSeries = 0;
+	int32 _ripTalkerPos3 = 0;
 
 	int32 _unkSeries1 = 0;
-	int32 _unkSeries4 = 0;
 	int32 _unkSeries5 = 0;
 	int32 _unkSeries6 = 0;
 	int32 _unkSeries7 = 0;


Commit: ec1b54462f9937359ae2c26de74f00028f7354e8
    https://github.com/scummvm/scummvm/commit/ec1b54462f9937359ae2c26de74f00028f7354e8
Author: Strangerke (arnaud.boutonne at gmail.com)
Date: 2024-10-23T00:28:18+01:00

Commit Message:
M4: RIDDLE: Partial implementation of room 806 (preload, init, pre-parser)

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


diff --git a/engines/m4/riddle/rooms/section8/room806.cpp b/engines/m4/riddle/rooms/section8/room806.cpp
index e9df4ea18aa..250ea1b6f33 100644
--- a/engines/m4/riddle/rooms/section8/room806.cpp
+++ b/engines/m4/riddle/rooms/section8/room806.cpp
@@ -20,14 +20,304 @@
  */
 
 #include "m4/riddle/rooms/section8/room806.h"
+
+#include "m4/adv_r/adv_file.h"
 #include "m4/graphics/gr_series.h"
+#include "m4/riddle/riddle.h"
 #include "m4/riddle/vars.h"
 
 namespace M4 {
 namespace Riddle {
 namespace Rooms {
 
+void Room806::preload() {
+	_G(player).walker_type = WALKER_ALT;
+	_G(player).shadow_type = SHADOW_ALT;
+}
+
 void Room806::init() {
+	_unkVar1 = 1;
+	_unkVar2 = 0;
+
+	_806rp03Series = series_load("806RP03", -1, nullptr);
+	_ripKneelAndExamineWallSeries = series_load("RIP KNEEL AND EXAMINE WALL", -1, nullptr);
+	_ripTrekLookDownPos3Series = series_load("RIP TREK LOOK DOWN POS3", -1, nullptr);
+	_ripLookUpPos3Series = series_load("RIP LOOKS UP POS3", -1, nullptr);
+	_ripMedHighReacherPos2Series = series_load("RIP MED HIGH REACHER POS2", -1, nullptr);
+	_ripHighReacherPos2Series = series_load("RIP HIGH REACHER POS2", -1, nullptr);
+	_ripTrekTalkerPos3Series = series_load("RIP TREK TALKER POS3", -1, nullptr);
+	_ripTrekHandTalkPos3Series = series_load("RIP TREK HAND TALK POS3", -1, nullptr);
+	_ripTrekHeadTurnPos3Series = series_load("RIP TREK HEAD TURN POS3", -1, nullptr);
+	_meiTalkPos3Series = series_load("MEI TALKS POS3", -1, nullptr);
+	_meiTrekHeadTurnPos3Series = series_load("MEI TREK HEAD TURN POS3", -1, nullptr);
+	_ripPos3LookAroundSeries = series_load("RIP POS 3 LOOK AROUND", -1, nullptr);
+	_meiTrekHandsOnHipsPos3Series = series_load("MEI TREK HANDS ON HIPS POS3", -1, nullptr);
+
+	series_play("LIT URN 1 ", 32767, 0, -1, 7, -1, 100, 0, 0, 0, -1);
+	series_play("LIT URN 2", 32767, 0, -1, 7, -1, 100, 0, 0, 0, -1);
+
+	if (!_G(flags[V265]))
+		series_play("806 flash light flicker", 32767, 0, -1, 7, 2, 100, 0, 0, 0, -1);
+
+	if (inv_object_is_here("CRANK")) {
+		_806CrankMach = series_show("806CRANK", 32767, 16, -1, -1, 0, 100, 0, 0);
+		hotspot_set_active(_G(currentSceneDef).hotspots, "SLOT", false);
+	} else {
+		hotspot_set_active(_G(currentSceneDef).hotspots, "CRANK", false);
+	}
+
+	if (_G(flags[V270]) == 806) {
+		hotspot_set_active(_G(currentSceneDef).hotspots, "CHARIOT", false);
+	} else {
+		digi_stop(2);
+		digi_unload("950_s33");
+		_806ChartMach = series_show("806chart", 3840, 16, -1, -1, 0, 100, 0, 0);
+		kernel_load_variant("806lock1");
+		digi_preload("806r20", -1);
+	}
+
+	if (_G(flags[V266])) {
+		series_show("806BOLTS", 32767, 16, -1, -1, 0, 100, 0, 0);
+	} else {
+		_806rp02Series = series_load("806RP02", -1, nullptr);
+		_806mc02Series = series_load("806MC02", -1, nullptr);
+
+		hotspot_set_active(_G(currentSceneDef).hotspots, "CROSSBOW BOLT  ", false);
+		digi_preload("806m08", -1);
+		digi_preload("806_s01", -1);
+		digi_preload("950_s52", -1);
+		digi_preload("950_s53", -1);
+	}
+
+	if (_G(flags[V276]) == 0) {
+		ws_walk_load_walker_series(S8_SHADOW_DIRS1, S8_SHADOW_NAMES1);
+		ws_walk_load_walker_series(S8_SHADOW_DIRS2, S8_SHADOW_NAMES2);
+	}
+
+	switch (_G(game).previous_room) {
+	case KERNEL_RESTORING_GAME:
+		digi_preload("950_s29", -1);
+		if (_G(flags[V276])) {
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
+		} else {
+			if (_unkVar3) {
+				_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 624, 306, 9, triggerMachineByHashCallback3000, "mc_trek");
+				hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
+				hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", true);
+			} else {
+				_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 225, 306, 3, triggerMachineByHashCallback3000, "mc_trek");
+				hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
+				hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", true);
+			}
+
+			if (!player_been_here(809))
+				kernel_timing_trigger(imath_ranged_rand(1200, 1800), 201, nullptr);
+
+			kernel_timing_trigger(imath_ranged_rand(1200, 1800), 701, nullptr);
+		}
+
+		_unkVar1 = 0;
+
+		break;
+
+	case 805:
+		if (!_G(flags[V265])) {
+			_806rp01Series = series_load("806RP01", -1, nullptr);
+			_806mc01Series = series_load("806MC01", -1, nullptr);
+			digi_preload("806m01");
+			digi_preload("806r01");
+			digi_preload("806m02");
+			digi_preload("806r02");
+			digi_preload("806m03");
+			digi_preload("806r03");
+		}
+
+		player_set_commands_allowed(false);
+		ws_demand_facing(_G(my_walker), 3);
+		ws_demand_location(_G(my_walker), -30, 316);
+
+		if (_G(flags[V276])) {
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
+		} else {
+			_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, -60, 306, 3, triggerMachineByHashCallback3000, "mc_trek");
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", true);
+			_unkVar3 = 0;
+		}
+
+		if (_G(flags[V270]) == 806) {
+			terminateMachine(_806ChartMach);
+			_806ChartMach = series_show("806chart", 1536, 16, -1, -1, 0, 100, 0, 0);
+			if (!_G(flags[V265])) {
+				ws_walk(_G(my_walker), 221, 316, nullptr, 12001, 3, true);
+			} else {
+				if (!player_been_here(809))
+					kernel_timing_trigger(imath_ranged_rand(1200, 1800), 201, nullptr);
+
+				kernel_timing_trigger(imath_ranged_rand(1200, 1800), 701, nullptr);
+			}
+
+			if (!_G(flags[V276]))
+				sendWSMessage_10000(_mcTrekMach, 30, 296, 0, 501, 1);
+
+		} else if (!_G(flags[V265])) {
+			sendWSMessage_10000(_mcTrekMach, 225, 306, 3, 101, 1);
+			ws_walk(221, 316, nullptr, 12001, 3, true);
+		} else {
+			if (!_G(flags[V276]))
+				sendWSMessage_10000(_mcTrekMach, 225, 306, 3, -1, 1);
+
+			ws_walk(221, 316, nullptr, 999, 3, true);
+
+			if (!_G(flags[V276])) {
+				if (!player_been_here(809))
+					kernel_timing_trigger(imath_ranged_rand(1200, 1800), 201, nullptr);
+
+				kernel_timing_trigger(imath_ranged_rand(1200, 1800), 701, nullptr);
+			}
+		}
+		break;
+
+	case 807:
+		player_set_commands_allowed(false);
+		ws_demand_facing(_G(my_walker), 9);
+		ws_demand_location(_G(my_walker), 670, 315);
+		ws_walk(_G(my_walker), 594, 315, nullptr, 999, 9, true);
+		if (_G(flags[V276])) {
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
+		} else {
+			_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 710, 306, 9, triggerMachineByHashCallback3000, "mc_trek");
+			sendWSMessage_10000(_mcTrekMach, 624, 306, 9, -1, 1);
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", true);
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
+
+			if (!player_been_here(809))
+				kernel_timing_trigger(imath_ranged_rand(1200, 1800), 201, nullptr);
+
+			kernel_timing_trigger(imath_ranged_rand(1200, 1800), 701, nullptr);
+		}
+
+		break;
+
+	default:
+		digi_preload("950_s29", -1);
+		ws_demand_facing(_G(my_walker), 3);
+		ws_demand_location(_G(my_walker), 221, 316);
+		if (_G(flags[V276])) {
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", true);
+			hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
+			_unkVar1 = 0;
+		} else {
+			if (_unkVar3) {
+				_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 624, 306, 9, triggerMachineByHashCallback3000, "mc_trek");
+				hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
+				hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", true);
+			} else {
+				_mcTrekMach = triggerMachineByHash_3000(8, 4, *S8_SHADOW_DIRS2, *S8_SHADOW_DIRS1, 225, 306, 3, triggerMachineByHashCallback3000, "mc_trek");
+				hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
+				hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", true);
+			}
+
+			if (!player_been_here(806))
+				kernel_timing_trigger(imath_ranged_rand(1200, 1800), 201, nullptr);
+
+			kernel_timing_trigger(imath_ranged_rand(1200, 1800), 701, nullptr);
+		}
+
+		_unkVar1 = 0;
+
+		break;
+	}
+
+	digi_play_loop("950_s29", 3, 75, -1, -1);
+}
+
+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");
+
+	if (player_said_any(" ", "WALL", "URN")) {
+		_G(player).need_to_walk = false;
+		_G(player).ready_to_walk = true;
+		_G(player).waiting_for_walk = false;
+	}
+
+	if (lookFl && player_said_any("  ", "    ")) {
+		_G(player).need_to_walk = false;
+		_G(player).ready_to_walk = true;
+		_G(player).waiting_for_walk = false;
+	}
+
+	if (walkFl && player_said_any("  ", "   ")) {
+		_G(player).need_to_walk = false;
+		_G(player).ready_to_walk = true;
+		_G(player).waiting_for_walk = false;
+	}
+
+	if (player_said("west") && player_said("     ")) {
+		_G(player).need_to_walk = false;
+		_G(player).ready_to_walk = true;
+		_G(player).waiting_for_walk = false;
+	}
+
+	if (player_said_any("    ", "      ") && _G(flags[266]) == 0) {
+		_G(player).need_to_walk = false;
+		_G(player).ready_to_walk = true;
+		_G(player).waiting_for_walk = false;
+	}
+
+	if (player_said_any("    ", "      ") && _G(flags[266]) != 0 && !walkFl && !player_said("east")) {
+		_G(player).need_to_walk = false;
+		_G(player).ready_to_walk = true;
+		_G(player).waiting_for_walk = false;
+	}
+
+	if (takeFl && player_said("CROSSBOW BOLT ")) {
+		_G(player).need_to_walk = false;
+		_G(player).ready_to_walk = true;
+		_G(player).waiting_for_walk = false;
+	}
+
+	if ((takeFl && player_said("CRANK")) || (player_said("CRANK") && player_said("SLOT")) || (gearFl && player_said("CRANK"))) {
+		_G(player).need_to_walk = false;
+		_G(player).ready_to_walk = true;
+		_G(player).waiting_for_walk = false;
+	}
+
+	if (player_said_any("MEI CHEN", "MEI CHEN ")) {
+		_G(player).need_to_walk = false;
+		_G(player).ready_to_walk = true;
+		_G(player).waiting_for_walk = false;
+	}
+
+	if (gearFl && player_said("CHARIOT")) {
+		_G(player).need_to_walk = false;
+		_G(player).ready_to_walk = true;
+		_G(player).waiting_for_walk = false;
+	}
+
+	if (player_said("west") && _G(flags[276]) == 0) {
+		sendWSMessage_10000(_mcTrekMach, 225, 306, 9, -1, 1);
+		_unkVar3 = 1;
+		hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", true);
+		hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", false);
+	}
+
+	if (player_said("east") && _G(flags[266]) && _G(flags[276]) == 0) {
+		sendWSMessage_10000(_mcTrekMach, 624, 306, 3, -1, 1);
+		_unkVar3 = 0;
+		hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN", false);
+		hotspot_set_active(_G(currentSceneDef).hotspots, "MEI CHEN ", true);
+	}
+
+}
+
+void Room806::parser() {
 }
 
 void Room806::daemon() {
diff --git a/engines/m4/riddle/rooms/section8/room806.h b/engines/m4/riddle/rooms/section8/room806.h
index ac99d9ec16d..ce2b6a9f218 100644
--- a/engines/m4/riddle/rooms/section8/room806.h
+++ b/engines/m4/riddle/rooms/section8/room806.h
@@ -33,8 +33,38 @@ public:
 	Room806() : Room() {}
 	~Room806() override {}
 
+	void preload() override;
 	void init() override;
+	void pre_parser() override;
+	void parser() override;
 	void daemon() override;
+
+private:
+	int32 _unkVar1 = 0;
+	int32 _unkVar2 = 0;
+	int32 _unkVar3 = 0;
+
+	int32 _806mc01Series = 0;
+	int32 _806mc02Series = 0;
+	int32 _806rp01Series = 0;
+	int32 _806rp02Series = 0;
+	int32 _806rp03Series = 0;
+	int32 _meiTalkPos3Series = 0;
+	int32 _meiTrekHandsOnHipsPos3Series = 0;
+	int32 _meiTrekHeadTurnPos3Series = 0;
+	int32 _ripHighReacherPos2Series = 0;
+	int32 _ripKneelAndExamineWallSeries = 0;
+	int32 _ripLookUpPos3Series = 0;
+	int32 _ripMedHighReacherPos2Series = 0;
+	int32 _ripPos3LookAroundSeries = 0;
+	int32 _ripTrekHandTalkPos3Series = 0;
+	int32 _ripTrekHeadTurnPos3Series = 0;
+	int32 _ripTrekLookDownPos3Series = 0;
+	int32 _ripTrekTalkerPos3Series = 0;
+
+	machine *_806CrankMach = nullptr;
+	machine *_806ChartMach = nullptr;
+	machine *_mcTrekMach = nullptr;
 };
 
 } // namespace Rooms




More information about the Scummvm-git-logs mailing list