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

dreammaster noreply at scummvm.org
Sun Feb 2 06:25:37 UTC 2025


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
457f04d4df M4: RIDDLE: Fixes for disabling hotspots in various close-ups
14e2e08172 M4: RIDDLE: Fixes for filling glass jar
afa52d82a4 M4: RIDDLE: Fix getting safe letter


Commit: 457f04d4df00caa2cf96be185f788813bbc32d57
    https://github.com/scummvm/scummvm/commit/457f04d4df00caa2cf96be185f788813bbc32d57
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-02-01T22:25:27-08:00

Commit Message:
M4: RIDDLE: Fixes for disabling hotspots in various close-ups

Changed paths:
    engines/m4/riddle/rooms/section4/room407.cpp


diff --git a/engines/m4/riddle/rooms/section4/room407.cpp b/engines/m4/riddle/rooms/section4/room407.cpp
index 0efcb8ee160..53550cf6894 100644
--- a/engines/m4/riddle/rooms/section4/room407.cpp
+++ b/engines/m4/riddle/rooms/section4/room407.cpp
@@ -89,6 +89,7 @@ void Room407::init() {
 			setGlobals1(_ripMedReach, 10, 10, 10, 10, 0, 10, 1, 1, 1);
 			sendWSMessage_110000(-1);
 			_drawerPopup = series_place_sprite("407 DRAWER POPUP", 0, 0, 0, 100, 0x200);
+
 			disableHotspots();
 			hotspot_set_active(" ", true);
 
@@ -113,6 +114,7 @@ void Room407::init() {
 			}
 		} else if (_tabletopState == 1030) {
 			_tabletopPopup = series_place_sprite("407 TABLETOP POPUP", 0, 0, 0, 100, 0x200);
+
 			disableHotspots();
 			hotspot_set_active(" ", true);
 
@@ -210,12 +212,14 @@ void Room407::init() {
 
 		} else if (_glassGoneState == 1030) {
 			_glassGone = series_place_sprite("407 GLASS GONE CU PU", 0, 0, 0, 100, 0x200);
+
 			disableHotspots();
 			hotspot_set_active(" ", true);
 
 		} else if (_comboLockState == 1030) {
 			_comboLockPopup = series_place_sprite(
 				"407 COMBINATION LOCK POPUP", 0, 0, 0, 100, 0x200);
+
 			disableHotspots();
 			hotspot_set_active(" ", true);
 			_407pu08a = series_load("407 COMBINATION LOCK NUMERALS");
@@ -2052,6 +2056,7 @@ void Room407::parser() {
 		case 1:
 			_drawerState = 1010;
 			_drawerPopup = series_place_sprite("407 DRAWER POPUP", 0, 0, 0, 100, 0x200);
+
 			disableHotspots();
 			hotspot_set_active(" ", true);
 
@@ -2778,6 +2783,7 @@ void Room407::useMicroscope() {
 			_microscopeCloseup = series_place_sprite("407pu07A", 0, 0, 0, 100, 0x200);
 		}
 
+		disableHotspots();
 		hotspot_set_active(" ", true);
 		player_set_commands_allowed(true);
 	}
@@ -2799,6 +2805,7 @@ void Room407::roofPistonPopup() {
 				"407 ROOF PISTON WITH ITEMS", 0, 0, 0, 100, 0);
 		}
 
+		disableHotspots();
 		hotspot_set_active(" ", true);
 		player_set_commands_allowed(true);
 	}
@@ -2826,6 +2833,7 @@ void Room407::glassBottomPopup() {
 			_tabletopPopupWithItems3 = series_place_sprite(
 				"407 GLS BOTTOM PU WITH ITEMS", 1, 0, 0, 100, 0x100);
 
+		disableHotspots();
 		hotspot_set_active(" ", true);
 		player_set_commands_allowed(true);
 	}
@@ -2867,6 +2875,7 @@ void Room407::glassGonePopup() {
 		_glassGoneState = 1030;
 		_glassGone = series_place_sprite("407 GLASS GONE CU PU",
 			0, 0, 0, 100, 0x200);
+
 		disableHotspots();
 		hotspot_set_active(" ", true);
 		player_set_commands_allowed(true);
@@ -2894,6 +2903,7 @@ void Room407::tabletopPopup() {
 		_tabletopState = 1030;
 		_tabletopPopup = series_place_sprite("407 TABLETOP POPUP",
 			0, 0, 0, 100, 0x200);
+
 		disableHotspots();
 		hotspot_set_active(" ", true);
 
@@ -3003,6 +3013,7 @@ void Room407::periodicTablePopup() {
 		_val15 = 1030;
 		_glassTopPopupWithItems2 = series_place_sprite(
 			"Large periodic table", 0, 0, 0, 100, 0);
+
 		disableHotspots();
 		hotspot_set_active(" ", true);
 		player_set_commands_allowed(true);
@@ -4315,6 +4326,7 @@ void Room407::useButtons() {
 		_comboLockState = 1030;
 		_comboLockPopup = series_place_sprite("407 COMBINATION LOCK POPUP",
 			0, 0, 0, 100, 0x200);
+
 		disableHotspots();
 		hotspot_set_active(" ", true);
 


Commit: 14e2e081721893dd5662194fd7b286a0b445f440
    https://github.com/scummvm/scummvm/commit/14e2e081721893dd5662194fd7b286a0b445f440
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-02-01T22:25:28-08:00

Commit Message:
M4: RIDDLE: Fixes for filling glass jar

Changed paths:
    engines/m4/riddle/rooms/section4/room407.cpp
    engines/m4/riddle/rooms/section4/room407.h


diff --git a/engines/m4/riddle/rooms/section4/room407.cpp b/engines/m4/riddle/rooms/section4/room407.cpp
index 53550cf6894..99023ee18b7 100644
--- a/engines/m4/riddle/rooms/section4/room407.cpp
+++ b/engines/m4/riddle/rooms/section4/room407.cpp
@@ -291,7 +291,7 @@ void Room407::init() {
 		_periodicTableState = 1112;
 		_xyzzy7 = 1112;
 		_items2State = 1116;
-		_xyzzy9 = 1118;
+		_corkState = 1118;
 		_xyzzy10 = 1040;
 		_frotz1 = 0;
 		_frotz2 = 0;
@@ -364,7 +364,7 @@ void Room407::init() {
 			_cpist = series_place_sprite("407CPIST", 0, 0, -53, 100, 0xf00);
 			_niche = series_place_sprite("407NICH", 0, 0, -53, 100, 0xf00);
 
-			if (_xyzzy9 == 1116 || _xyzzy9 == 1130) {
+			if (_corkState == 1116 || _corkState == 1130) {
 				_bits = series_place_sprite("407BITSR", 3, 0, -53, 100, 0xa00);
 			} else if (_xyzzy7 == 1112) {
 				_bits = series_place_sprite("407bbits", 0, 0, -53, 100, 0xa00);
@@ -557,7 +557,7 @@ void Room407::init() {
 		_tubeState = 1140;
 		_xyzzy7 = 1140;
 		_stopperState = 1130;
-		_xyzzy9 = 1130;
+		_corkState = 1130;
 		_pumpState = 1130;
 
 		setHotspots();
@@ -1219,7 +1219,7 @@ void Room407::daemon() {
 		break;
 
 	case 322:
-		if (_stopperState == 1116 && _xyzzy9 == 1116 && _pumpState == 1116) {
+		if (_stopperState == 1116 && _corkState == 1116 && _pumpState == 1116) {
 			terminateMachineAndNull(_faucetPipe);
 			terminateMachineAndNull(_tubeInDrawer);
 			terminateMachineAndNull(_drawerPopupHose);
@@ -1245,7 +1245,7 @@ void Room407::daemon() {
 					_jarWaterFallingLeft, 14, 19, 0);
 			}
 
-			if (_xyzzy9 != 1116) {
+			if (_corkState != 1116) {
 				_jarWaterFallingCentre = series_load("407 JAR WATER FALLING CENTRE");
 				_jarCentre = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0xe00, 0,
 					triggerMachineByHashCallback, "Center jar hole leaks");
@@ -1274,7 +1274,7 @@ void Room407::daemon() {
 		digi_play("407r37", 1, 255, 666);
 		_frotz2 = 1;
 		_stopperState = 1130;
-		_xyzzy9 = 1130;
+		_corkState = 1130;
 		_pumpState = 1130;
 
 		hotspot_set_active("MICROSCOPE", true);
@@ -1303,7 +1303,7 @@ void Room407::daemon() {
 			if (_stopperState != 1115)
 				sendWSMessage_10000(1, _jarLeft, _jarWaterFallingLeft, 20, 35, 350,
 					_jarWaterFallingLeft, 35, 35, 0);
-			if (_xyzzy9 != 1116)
+			if (_corkState != 1116)
 				sendWSMessage_10000(1, _jarCentre, _jarWaterFallingCentre, 16, 28, 351,
 					_jarWaterFallingCentre, 28, 28, 0);
 			if (_pumpState != 1116)
@@ -2013,7 +2013,7 @@ void Room407::parser() {
 			_leverKeyState == 1114 && _xyzzy7 != 1114 && _xyzzy7 != 1140) {
 		useLeverKey();
 	} else if (useFlag && player_said_any("FAUCET HANDLE", "FAUCET STEM") &&
-			_leverKeyState == 1100 && inv_object_is_here("FAUCET HANDLE")) {
+			_airValveState == 1100 && inv_object_is_here("FAUCET HANDLE")) {
 		if (_frotz2) {
 			digi_play("407r99e", 1);
 		} else if (_faucetPipeState == 1100) {
@@ -2137,7 +2137,7 @@ take:
 		takeJarCork1();
 	} else if (takeFlag && player_said("JAR/CORK ") &&
 			(_xyzzy7 == 1114 || _xyzzy7 == 1140) &&
-			_xyzzy9 == 1116) {
+			_corkState == 1116) {
 		takeJarCork2();
 	} else if (takeFlag && player_said("JAR/RUBBER PLUG") && _xyzzy7 == 1112) {
 		takeJarRubberPlug1();
@@ -2297,7 +2297,7 @@ take:
 			break;
 		case 2:
 			_xyzzy7 = 1056;
-			_xyzzy9 = 1116;
+			_corkState = 1116;
 			_stopperState = 1116;
 			_pumpState = 1116;
 			inv_move_object("JAR/PLUG/GRIPS", 407);
@@ -2322,7 +2322,7 @@ take:
 			break;
 		case 2:
 			_xyzzy7 = 1053;
-			_xyzzy9 = 1116;
+			_corkState = 1116;
 			_stopperState = 1116;
 			inv_move_object("JAR/RUBBER PLUG", 407);
 			inv_move_object("JAR/CORK", 407);
@@ -2344,7 +2344,7 @@ take:
 			break;
 		case 2:
 			_xyzzy7 = 1055;
-			_xyzzy9 = 1116;
+			_corkState = 1116;
 			_pumpState = 1116;
 			inv_move_object("JAR/GRIPS", 407);
 			inv_move_object("JAR/CORK", 407);
@@ -2379,7 +2379,7 @@ take:
 			break;
 		}
 	} else if (player_said("GLASS JAR", "CORK") &&
-			_xyzzy7 == 1000 && _xyzzy9 == 1000) {
+			_xyzzy7 == 1000 && _corkState == 1000) {
 		switch (_G(kernel).trigger) {
 		case -1:
 			kernel_examine_inventory_object("PING JAR/CORK",
@@ -2387,7 +2387,7 @@ take:
 			break;
 		case 2:
 			_xyzzy7 = 1051;
-			_xyzzy9 = 1116;
+			_corkState = 1116;
 			inv_move_object("GLASS JAR", 407);
 			inv_move_object("CORK", 407);
 			inv_give_to_player("JAR/CORK");
@@ -2481,7 +2481,7 @@ take:
 		inv_give_to_player("FAUCET PIPE");
 	} else if (useFlag && player_said("JAR/PLUG/CORK/GRIPS") && _xyzzy7 == 1056) {
 		_xyzzy7 = 1000;
-		_xyzzy9 = 1000;
+		_corkState = 1000;
 		_pumpState = 1000;
 		_stopperState = 1000;
 		inv_move_object("JAR/PLUG/CORK/GRIPS", 407);
@@ -2491,7 +2491,7 @@ take:
 		inv_give_to_player("RUBBER PLUG");
 	} else if (useFlag && player_said("JAR/CORK/PLUG") && _xyzzy7 == 1053) {
 		_xyzzy7 = 1000;
-		_xyzzy9 = 1000;
+		_corkState = 1000;
 		_stopperState = 1000;
 		inv_move_object("JAR/CORK/PLUG", 407);
 		inv_give_to_player("GLASS JAR");
@@ -2499,7 +2499,7 @@ take:
 		inv_give_to_player("CORK");
 	} else if (useFlag && player_said("JAR/CORK/GRIPS") && _xyzzy7 == 1055) {
 		_xyzzy7 = 1000;
-		_xyzzy9 = 1000;
+		_corkState = 1000;
 		_pumpState = 1000;
 		inv_move_object("JAR/CORK/GRIPS", 407);
 		inv_give_to_player("GLASS JAR");
@@ -2521,7 +2521,7 @@ take:
 		inv_give_to_player("PUMP GRIPS");
 	} else if (useFlag && player_said("JAR/CORK") && _xyzzy7 == 1051) {
 		_xyzzy7 = 1000;
-		_xyzzy9 = 1000;
+		_corkState = 1000;
 		inv_move_object("JAR/CORK", 407);
 		inv_give_to_player("GLASS JAR");
 		inv_give_to_player("CORK");
@@ -2541,7 +2541,7 @@ take:
 	} else if (useFlag && player_said("EMERALD/CORK") &&
 			inv_player_has("EMERALD/CORK")) {
 		_items2State = 1000;
-		_xyzzy9 = 1000;
+		_corkState = 1000;
 		inv_move_object("EMERALD/CORK", NOWHERE);
 		inv_give_to_player("ROMANOV EMERALD");
 		inv_give_to_player("CORK");
@@ -2574,7 +2574,7 @@ void Room407::syncGame(Common::Serializer &s) {
 	s.syncAsSint16LE(_periodicTableState);
 	s.syncAsSint16LE(_xyzzy7);
 	s.syncAsSint16LE(_items2State);
-	s.syncAsSint16LE(_xyzzy9);
+	s.syncAsSint16LE(_corkState);
 	s.syncAsSint16LE(_xyzzy10);
 	s.syncAsSint16LE(_frotz1);
 	s.syncAsSint16LE(_frotz2);
@@ -2680,7 +2680,7 @@ void Room407::setHotspots() {
 		if (_xyzzy7 == 1112) {
 			if (_stopperState != 1116)
 				hotspot_set_active("JAR/RUBBER PLUG", false);
-			if (_xyzzy9 != 1116)
+			if (_corkState != 1116)
 				hotspot_set_active("JAR/CORK", false);
 			if (_items2State != 1116)
 				hotspot_set_active("EMERALD PIN/CORK", false);
@@ -2699,7 +2699,7 @@ void Room407::setHotspots() {
 		} else {
 			if (_stopperState != 1116 && _stopperState != 1130)
 				hotspot_set_active("JAR/RUBBER PLUG ", false);
-			if (_xyzzy9 != 1116 && _xyzzy9 != 1130)
+			if (_corkState != 1116 && _corkState != 1130)
 				hotspot_set_active("JAR/CORK ", false);
 			if (_pumpState != 1116 && _pumpState != 1130)
 				hotspot_set_active("JAR/GRIP ", false);
@@ -3262,7 +3262,7 @@ void Room407::reachLeverKey() {
 			break;
 
 		case 1051:
-			_xyzzy9 = 1116;
+			_corkState = 1116;
 			hotspot_set_active("JAR/CORK ", true);
 			inv_move_object("JAR/CORK", 407);
 			_bits = series_place_sprite("407BITSR", 3, 0, -53, 100, 0xb00);
@@ -3276,7 +3276,7 @@ void Room407::reachLeverKey() {
 			break;
 
 		case 1053:
-			_xyzzy9 = 1116;
+			_corkState = 1116;
 			_stopperState = 1116;
 			hotspot_set_active("JAR/RUBBER PLUG ", true);
 			hotspot_set_active("JAR/CORK ", true);
@@ -3296,7 +3296,7 @@ void Room407::reachLeverKey() {
 			break;
 
 		case 1055:
-			_xyzzy9 = 1116;
+			_corkState = 1116;
 			_pumpState = 1116;
 			hotspot_set_active("JAR/CORK ", true);
 			hotspot_set_active("JAR/GRIPS ", true);
@@ -3306,7 +3306,7 @@ void Room407::reachLeverKey() {
 			break;
 
 		case 1056:
-			_xyzzy9 = 1116;
+			_corkState = 1116;
 			_pumpState = 1116;
 			_stopperState = 1116;
 			hotspot_set_active("JAR/RUBBER PLUG ", true);
@@ -3678,7 +3678,7 @@ void Room407::corkGlassJar2() {
 		break;
 
 	case 1:
-		_stopperInDrawer = series_place_sprite("407BITSR", 3, 0, -53, 100, 0xe00);
+		_bits = series_place_sprite("407BITSR", 3, 0, -53, 100, 0xe00);
 		inv_move_object("CORK", 407);
 		hotspot_set_active("JAR/CORK ", true);
 		sendWSMessage_120000(3);
@@ -3690,7 +3690,7 @@ void Room407::corkGlassJar2() {
 
 	case 4:
 		series_unload(_ripHiHand1);
-		_stopperState = 1116;
+		_corkState = 1116;
 		player_set_commands_allowed(true);
 		break;
 
@@ -4011,7 +4011,7 @@ void Room407::faucetPipeFaucetHandle1() {
 	case 1:
 		digi_play("407_s04", 2);
 		_airValve = series_place_sprite("407FAUC",
-			(_valveState2 == 1011) ? 1 : 0, 0, 0, 100, 0xe00);
+			(_valveState1 == 1011) ? 1 : 0, 0, 0, 100, 0xe00);
 
 		inv_move_object("FAUCET HANDLE", 407);
 		hotspot_set_active("FAUCET HANDLE", true);
@@ -5083,6 +5083,7 @@ void Room407::takeGardenHose4() {
 	case -1:
 		if (inv_object_is_here("GARDEN HOSE")) {
 			inv_give_to_player("GARDEN HOSE");
+			_hoseState = 1000;
 			hotspot_set_active("GARDEN HOSE", false);
 			terminateMachineAndNull(_drawerPopupHose);
 			kernel_examine_inventory_object("PING GARDEN HOSE",
@@ -5130,11 +5131,11 @@ void Room407::takeGlassJar1() {
 			_pumpState = 1000;
 		}
 
-		if (_xyzzy9 == 1116) {
+		if (_corkState == 1116) {
 			terminateMachineAndNull(_bits);
 			inv_give_to_player("CORK");
 			hotspot_set_active("JAR/CORK ", false);
-			_xyzzy9 = 1000;
+			_corkState = 1000;
 		}
 
 		kernel_examine_inventory_object("PING GLASS JAR",
@@ -5181,11 +5182,11 @@ void Room407::takeGlassJar2() {
 			_stopperState = 1000;
 		}
 
-		if (_xyzzy9 == 1116) {
+		if (_corkState == 1116) {
 			terminateMachineAndNull(_bits);
 			inv_give_to_player("CORK");
 			hotspot_set_active("JAR/CORK", false);
-			_xyzzy9 = 1000;
+			_corkState = 1000;
 		}
 
 		kernel_examine_inventory_object("PING GLASS JAR",
@@ -5340,7 +5341,7 @@ void Room407::takeJarCork1() {
 
 	case 5:
 		series_unload(_ripMedHand1);
-		_xyzzy9 = 1000;
+		_corkState = 1000;
 		player_set_commands_allowed(true);
 		break;
 
@@ -5376,7 +5377,7 @@ void Room407::takeJarCork2() {
 
 	case 5:
 		series_unload(_ripHiHand1);
-		_xyzzy9 = 1000;
+		_corkState = 1000;
 		player_set_commands_allowed(true);
 		break;
 
diff --git a/engines/m4/riddle/rooms/section4/room407.h b/engines/m4/riddle/rooms/section4/room407.h
index 5eda6296ff2..461f636ae13 100644
--- a/engines/m4/riddle/rooms/section4/room407.h
+++ b/engines/m4/riddle/rooms/section4/room407.h
@@ -48,7 +48,7 @@ private:
 	int _periodicTableState = 0;
 	int _xyzzy7 = 0;
 	int _items2State = 0;
-	int _xyzzy9 = 0;
+	int _corkState = 0;
 	int _xyzzy10 = 0;
 	int _frotz1 = 0;
 	int _frotz2 = 0;


Commit: afa52d82a486b638d8b594c9a56bae0a6958ec3e
    https://github.com/scummvm/scummvm/commit/afa52d82a486b638d8b594c9a56bae0a6958ec3e
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2025-02-01T22:25:28-08:00

Commit Message:
M4: RIDDLE: Fix getting safe letter

Changed paths:
    engines/m4/riddle/rooms/section4/room407.cpp
    engines/m4/riddle/rooms/section4/room407.h


diff --git a/engines/m4/riddle/rooms/section4/room407.cpp b/engines/m4/riddle/rooms/section4/room407.cpp
index 99023ee18b7..e483f07bff0 100644
--- a/engines/m4/riddle/rooms/section4/room407.cpp
+++ b/engines/m4/riddle/rooms/section4/room407.cpp
@@ -22,6 +22,7 @@
 #include "m4/riddle/rooms/section4/room407.h"
 #include "m4/graphics/gr_series.h"
 #include "m4/riddle/vars.h"
+#include "m4/riddle/riddle.h"
 
 namespace M4 {
 namespace Riddle {
@@ -109,7 +110,7 @@ void Room407::init() {
 			}
 
 			if (_pumpState == 1101) {
-				_handleInDrawer = series_place_sprite("407 PUMP HANDLE IN DRAWER", 0, 0, 0, 100, 0x100);
+				_grips = series_place_sprite("407 PUMP HANDLE IN DRAWER", 0, 0, 0, 100, 0x100);
 				hotspot_set_active("PUMP GRIPS", true);
 			}
 		} else if (_tabletopState == 1030) {
@@ -293,7 +294,7 @@ void Room407::init() {
 		_items2State = 1116;
 		_corkState = 1118;
 		_xyzzy10 = 1040;
-		_frotz1 = 0;
+		_faucetHookedToJar = 0;
 		_frotz2 = 0;
 		_frotz3 = 0;
 		_frotz4 = 0;
@@ -412,12 +413,12 @@ void Room407::init() {
 
 			switch (_pumpState) {
 			case 1115:
-				_handleInDrawer = series_place_sprite("407pump", 1, 0, -53, 100, 0xa00);
+				_grips = series_place_sprite("407pump", 1, 0, -53, 100, 0xa00);
 				break;
 			case 1116:
 			case 1130:
 				if (_xyzzy7 == 1114 || _xyzzy7 == 1140)
-					_handleInDrawer = series_place_sprite("407BITSR", 2, 0, -53, 100, 0xa00);
+					_grips = series_place_sprite("407BITSR", 2, 0, -53, 100, 0xa00);
 				break;
 			default:
 				break;
@@ -539,7 +540,7 @@ void Room407::init() {
 		terminateMachineAndNull(_bottle);
 		terminateMachineAndNull(_stopperInDrawer);
 		terminateMachineAndNull(_bits);
-		terminateMachineAndNull(_handleInDrawer);
+		terminateMachineAndNull(_grips);
 		terminateMachineAndNull(_niche);
 		terminateMachineAndNull(_lever);
 
@@ -579,7 +580,7 @@ void Room407::daemon() {
 		if (_tubeState == 1101)
 			terminateMachineAndNull(_tubeInDrawer);
 		if (_pumpState == 1101)
-			terminateMachineAndNull(_handleInDrawer);
+			terminateMachineAndNull(_grips);
 
 		sendWSMessage_120000(12);
 		break;
@@ -1145,7 +1146,7 @@ void Room407::daemon() {
 
 	case 305:
 		series_unload(_ripHiHand1);
-		_frotz1 = 1;
+		_faucetHookedToJar = 1;
 		player_set_commands_allowed(true);
 		break;
 
@@ -1208,7 +1209,7 @@ void Room407::daemon() {
 
 	case 319:
 		series_unload(_ripMedHand1);
-		_frotz1 = 1;
+		_faucetHookedToJar = 1;
 		player_set_commands_allowed(true);
 		break;
 
@@ -1226,7 +1227,7 @@ void Room407::daemon() {
 			terminateMachineAndNull(_bottle);
 			terminateMachineAndNull(_stopperInDrawer);
 			terminateMachineAndNull(_bits);
-			terminateMachineAndNull(_handleInDrawer);
+			terminateMachineAndNull(_grips);
 			terminateMachineAndNull(_niche);
 			terminateMachineAndNull(_lever);
 
@@ -1237,7 +1238,7 @@ void Room407::daemon() {
 			sendWSMessage_10000(1, _niche, _407h, 1, 29, 330, _407h, 29, 29, 0);
 			digi_play("407_s21", 2);
 		} else {
-			if (_stopperState == 1116) {
+			if (_stopperState != 1116) {
 				_jarWaterFallingLeft = series_load("407 JAR WATER FALLING LEFT");
 				_jarLeft = TriggerMachineByHash(1, 1, 0, 0, 0, 0, 0, 0, 100, 0xe00, 0,
 					triggerMachineByHashCallback, "407 JAR WATER FALLING LEFT");
@@ -1932,8 +1933,8 @@ void Room407::parser() {
 	} else if (player_said("RUBBER PLUG", "GLASS JAR") && _xyzzy7 == 1112) {
 		rubberPlugGlassJar();
 	} else if (player_said("CORK", "GLASS JAR") && _xyzzy7 == 1112) {
-		corkGlassJar();
-	} else if (player_said("pump grips", "glass jar") &&
+		corkGlassJar1();
+	} else if (player_said("pump grips", "glass jar ") &&
 			(_xyzzy7 == 1114 || _xyzzy7 == 1140)) {
 		pumpGripsGlassJar();
 	} else if (player_said("rubber plug", "glass jar ") &&
@@ -2026,9 +2027,9 @@ void Room407::parser() {
 				digi_play("407r99o", 1);
 			else
 				useFaucet();
-		} else if (_frotz1) {
+		} else if (_faucetHookedToJar) {
 			useFaucet();
-		} else if (_faucetPipeState == 1100 || _tubeState == 1130 || _frotz1) {
+		} else if (_faucetPipeState == 1100 || _tubeState == 1130 || _faucetHookedToJar) {
 			digi_play("407r99e", 1);
 		} else {
 			digi_play("407r99n", 1);
@@ -2078,7 +2079,7 @@ void Room407::parser() {
 			}
 
 			if (_pumpState == 1101) {
-				_handleInDrawer = series_place_sprite(
+				_grips = series_place_sprite(
 					"407 PUMP HANDLE IN DRAWER", 0, 0, 0, 100, 0x100);
 				hotspot_set_active("PUMP GRIPS", true);
 			}
@@ -2576,7 +2577,7 @@ void Room407::syncGame(Common::Serializer &s) {
 	s.syncAsSint16LE(_items2State);
 	s.syncAsSint16LE(_corkState);
 	s.syncAsSint16LE(_xyzzy10);
-	s.syncAsSint16LE(_frotz1);
+	s.syncAsSint16LE(_faucetHookedToJar);
 	s.syncAsSint16LE(_frotz2);
 	s.syncAsSint16LE(_frotz3);
 	s.syncAsSint16LE(_frotz4);
@@ -3302,7 +3303,7 @@ void Room407::reachLeverKey() {
 			hotspot_set_active("JAR/GRIPS ", true);
 			inv_move_object("JAR/CORK/GRIPS", 407);
 			_bits = series_place_sprite("407BITSR", 3, 0, -53, 100, 0xe00);
-			_handleInDrawer = series_place_sprite("407BITSR", 2, 0, -53, 100, 0xb00);
+			_grips = series_place_sprite("407BITSR", 2, 0, -53, 100, 0xb00);
 			break;
 
 		case 1056:
@@ -3640,7 +3641,7 @@ void Room407::rubberPlugGlassJar2() {
 	}
 }
 
-void Room407::corkGlassJar() {
+void Room407::corkGlassJar1() {
 	switch (_G(kernel).trigger) {
 	case -1:
 		reachHand(10);
@@ -3709,10 +3710,10 @@ void Room407::pumpGripsGlassJar() {
 		break;
 
 	case 1:
-		_handleInDrawer = series_place_sprite("407BITSR", 2, 0, -53, 100, 0xe00);
+		_grips = series_place_sprite("407BITSR", 2, 0, -53, 100, 0xe00);
 		inv_move_object("PUMP GRIPS", 407);
 		hotspot_set_active("JAR/GRIPS ", true);
-		sendWSMessage_110000(3);
+		sendWSMessage_120000(3);
 		break;
 
 	case 3:
@@ -4133,7 +4134,7 @@ void Room407::pumpGripsPump() {
 		break;
 
 	case 1:
-		_handleInDrawer = series_place_sprite("407pump", 1, 0, -53, 100, 0xe00);
+		_grips = series_place_sprite("407pump", 1, 0, -53, 100, 0xe00);
 		inv_move_object("PUMP GRIPS", 407);
 		hotspot_set_active("PUMP GRIPS ", true);
 		sendWSMessage_10000(1, _ripley, _pump407, 40, 1, 4,
@@ -4446,7 +4447,7 @@ void Room407::useFaucet() {
 	case 4:
 		series_unload(_ripMedHand1);
 
-		if (_frotz1 && _valveState1 == 1010)
+		if (_faucetHookedToJar && _valveState1 == 1010)
 			kernel_timing_trigger(1, 320, KT_DAEMON, KT_PARSE);
 		else if (_valveState1 == 1010 && _faucetPipeState == 1100)
 			kernel_timing_trigger(1, 410, KT_DAEMON, KT_PARSE);
@@ -4570,7 +4571,7 @@ void Room407::usePump2() {
 		break;
 
 	case 4:
-		_handleInDrawer = series_place_sprite("407pump", 1, 0, -53, 100, 0xf00);
+		_grips = series_place_sprite("407pump", 1, 0, -53, 100, 0xf00);
 		terminateMachineAndNull(_ripley);
 		terminateMachineAndNull(_safariShadow);
 		ws_unhide_walker();
@@ -4602,10 +4603,6 @@ void Room407::takeLetter() {
 		}
 		break;
 
-	case 8:
-		series_unload(_ripMedHand1);
-		break;
-
 	case 11:
 		terminateMachineAndNull(_letter);
 		hotspot_set_active("LETTER", false);
@@ -4632,9 +4629,16 @@ void Room407::takeLetter() {
 		sendWSMessage_150000(8);
 		break;
 
+	case 8:
+		series_unload(_ripMedHand1);
+		sketchInJournal(nullptr);
+		break;
+
 	default:
+		sketchInJournal(nullptr);
 		break;
 	}
+
 }
 
 void Room407::takeFaucetPipe1() {
@@ -5125,7 +5129,7 @@ void Room407::takeGlassJar1() {
 		}
 
 		if (_pumpState == 1116) {
-			terminateMachineAndNull(_handleInDrawer);
+			terminateMachineAndNull(_grips);
 			inv_give_to_player("PUMP GRIPS");
 			hotspot_set_active("JAR/GRIPS ", false);
 			_pumpState = 1000;
@@ -5291,7 +5295,7 @@ void Room407::takeJarGrips() {
 		break;
 
 	case 1:
-		terminateMachineAndNull(_handleInDrawer);
+		terminateMachineAndNull(_grips);
 		inv_give_to_player("PUMP GRIPS");
 		hotspot_set_active("PUMP GRIPS ", false);
 		kernel_examine_inventory_object("PING PUMP GRIPS",
@@ -5705,7 +5709,7 @@ void Room407::takePumpRod1() {
 
 	case 1:
 		if (_pumpState == 1115) {
-			terminateMachineAndNull(_handleInDrawer);
+			terminateMachineAndNull(_grips);
 			inv_give_to_player("PUMP GRIPS");
 			hotspot_set_active("PUMP GRIPS ", false);
 			_pumpState = 1000;
@@ -5855,7 +5859,7 @@ void Room407::takePumpGrips1() {
 			_pumpState = 1000;
 
 			hotspot_set_active("PUMP GRIPS", false);
-			terminateMachineAndNull(_handleInDrawer);
+			terminateMachineAndNull(_grips);
 			kernel_examine_inventory_object("PING PUMP GRIPS",
 				_G(master_palette), 5, 1, 85, 190, 2, nullptr, -1);
 			_G(player).command_ready = false;
@@ -5891,7 +5895,7 @@ void Room407::takePumpGrips2() {
 		break;
 
 	case 1:
-		terminateMachineAndNull(_handleInDrawer);
+		terminateMachineAndNull(_grips);
 		inv_give_to_player("PUMP GRIPS");
 		hotspot_set_active("PUMP GRIPS ", false);
 		_pumpState = 1000;
diff --git a/engines/m4/riddle/rooms/section4/room407.h b/engines/m4/riddle/rooms/section4/room407.h
index 461f636ae13..1334287de2a 100644
--- a/engines/m4/riddle/rooms/section4/room407.h
+++ b/engines/m4/riddle/rooms/section4/room407.h
@@ -50,7 +50,7 @@ private:
 	int _items2State = 0;
 	int _corkState = 0;
 	int _xyzzy10 = 0;
-	int _frotz1 = 0;
+	int _faucetHookedToJar = 0;
 	int _frotz2 = 0;
 	int _frotz3 = 0;
 	int _frotz4 = 0;
@@ -98,7 +98,7 @@ private:
 	machine *_drawerPopupHose = nullptr;
 	machine *_stopperInDrawer = nullptr;
 	machine *_tubeInDrawer = nullptr;
-	machine *_handleInDrawer = nullptr;
+	machine *_grips = nullptr;
 	machine *_tabletopPopup = nullptr;
 	machine *_tabletopPopupWithItems1 = nullptr;
 	machine *_tabletopPopupWithItems2 = nullptr;
@@ -191,7 +191,7 @@ private:
 	void placeLeverKey();
 	void rubberPlugGlassJar();
 	void rubberPlugGlassJar2();
-	void corkGlassJar();
+	void corkGlassJar1();
 	void corkGlassJar2();
 	void pumpGripsGlassJar();
 	void periodicTableGlassJar();




More information about the Scummvm-git-logs mailing list