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

dreammaster noreply at scummvm.org
Sat Feb 10 03:32:22 UTC 2024


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:
dae8fa2b97 M4: Fixes for slipping on kibble


Commit: dae8fa2b97ecddf0cd49da56703c807848e17f92
    https://github.com/scummvm/scummvm/commit/dae8fa2b97ecddf0cd49da56703c807848e17f92
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2024-02-09T19:32:15-08:00

Commit Message:
M4: Fixes for slipping on kibble

Changed paths:
    engines/m4/burger/flags.h
    engines/m4/burger/rooms/section6/room602.cpp
    engines/m4/burger/rooms/section6/room602.h
    engines/m4/burger/rooms/section6/room603.cpp
    engines/m4/burger/rooms/section6/room604.cpp


diff --git a/engines/m4/burger/flags.h b/engines/m4/burger/flags.h
index b685dd83ca8..2bf1be4a15e 100644
--- a/engines/m4/burger/flags.h
+++ b/engines/m4/burger/flags.h
@@ -298,7 +298,7 @@ enum {
 	V261 = 261,
 	V262 = 262,
 	V263 = 263,
-	V264 = 264,
+	kStandingOnKibble = 264,
 	V265 = 265,
 	V266 = 266,
 	V267 = 267,
diff --git a/engines/m4/burger/rooms/section6/room602.cpp b/engines/m4/burger/rooms/section6/room602.cpp
index 350df03ac3f..abcdaf2550c 100644
--- a/engines/m4/burger/rooms/section6/room602.cpp
+++ b/engines/m4/burger/rooms/section6/room602.cpp
@@ -313,16 +313,16 @@ void Room602::init() {
 		if (_G(game).previous_room != 609)
 			kernel_trigger_dispatch_now(kCHANGE_MOTOR_ANIMATION);
 
-		_val2 = 48;
+		_kibbleOffset = 48;
 	} else {
-		_val2 = 0;
+		_kibbleOffset = 0;
 	}
 
-	_G(flags)[V264] = 0;
+	_G(flags)[kStandingOnKibble] = 0;
 	if (_G(flags)[V255] == 1)
 		series_show("602spill", 0xf00);
 
-	if (_G(flags)[V255] && _G(flags)[V278])
+	if (_G(flags)[V255] && !_G(flags)[V278])
 		_G(kernel).call_daemon_every_loop = true;
 
 	if (_G(flags)[V277] == 6003 && _G(flags)[V278] == 1) {
@@ -800,7 +800,7 @@ void Room602::daemon() {
 			break;
 
 		case 3:
-			_G(flags)[V264] = 0;
+			_G(flags)[kStandingOnKibble] = 0;
 			ws_demand_location(367, 280, 5);
 			ws_hide_walker();
 			_G(wilbur_should) = 4;
@@ -1090,7 +1090,7 @@ void Room602::daemon() {
 			player_set_commands_allowed(false);
 			ws_demand_location(314, 319, 3);
 			ws_hide_walker();
-			_G(flags)[V264] = 0;
+			_G(flags)[kStandingOnKibble] = 0;
 
 			intr_remove_no_walk_rect(_walk1);
 			_walk1 = intr_add_no_walk_rect(322, 304, 472, 329, 312, 320);
@@ -1260,20 +1260,21 @@ void Room602::daemon() {
 		if (_G(player).walker_in_this_scene) {
 			player_update_info();
 
-			if (_G(player_info).x >= (_val2 + 330) &&
-					_G(player_info).y > 289 && _G(player_info).y < 305) {
-				if (_G(flags)[V255] == 1 && _G(flags)[V278] == 0 &&
-						_G(player_info).facing > 2 && _G(player_info).facing < 7) {
-					if (_G(flags)[V264]) {
-						_G(flags)[V264] = 1;
-					} else {
-						_G(flags)[V264] = 1;
-						term_message("Wilbur now slips on kibble!");
-						intr_cancel_sentence();
-						_G(wilbur_should) = 20;
-						kernel_trigger_dispatch_now(kCHANGE_WILBUR_ANIMATION);
-					}
+			if (_G(player_info).x >= (_kibbleOffset + 330) && _G(player_info).x < 396 &&
+					_G(player_info).y > 289 && _G(player_info).y < 305 &&
+					_G(flags)[V255] == 1 && _G(flags)[V278] == 0 &&
+					_G(player_info).facing > 2 && _G(player_info).facing < 7) {
+				if (_G(flags)[kStandingOnKibble]) {
+					_G(flags)[kStandingOnKibble] = 1;
+				} else {
+					_G(flags)[kStandingOnKibble] = 1;
+					term_message("Wilbur now slips on kibble!");
+					intr_cancel_sentence();
+					_G(wilbur_should) = 20;
+					kernel_trigger_dispatch_now(kCHANGE_WILBUR_ANIMATION);
 				}
+			} else {
+				_G(flags)[kStandingOnKibble] = 0;
 			}
 		}
 		break;
diff --git a/engines/m4/burger/rooms/section6/room602.h b/engines/m4/burger/rooms/section6/room602.h
index f61c149b1dc..b44a9947e7b 100644
--- a/engines/m4/burger/rooms/section6/room602.h
+++ b/engines/m4/burger/rooms/section6/room602.h
@@ -68,7 +68,7 @@ private:
 	machine *_series9 = nullptr;
 	machine *_series10 = nullptr;
 	int _val1 = 0;
-	int _val2 = 0;
+	int _kibbleOffset = 0;
 	int _doorShould = 0;
 	int _magnetState = 0;
 
diff --git a/engines/m4/burger/rooms/section6/room603.cpp b/engines/m4/burger/rooms/section6/room603.cpp
index da42a2455fd..517fc0e58ce 100644
--- a/engines/m4/burger/rooms/section6/room603.cpp
+++ b/engines/m4/burger/rooms/section6/room603.cpp
@@ -178,11 +178,11 @@ Room603::Room603() : Section6Room() {
 void Room603::init() {
 	player_set_commands_allowed(false);
 	_G(flags)[V246] = 0;
-	_G(flags)[V264] = 0;
+	_G(flags)[kStandingOnKibble] = 0;
 
 	if (_G(flags)[V269] == 1)
 		series_show("602spill", 0x900, 0, -1, -1, 0, 100, 80, 0);
-	_G(kernel).continue_handling_trigger = _G(flags)[V269] == 1 ? 1 : 0;
+	_G(kernel).call_daemon_every_loop = _G(flags)[V269] == 1;
 
 	if (_G(flags)[V270] == 6000) {
 		hotspot_set_active("WATER", true);
@@ -564,16 +564,17 @@ void Room603::daemon() {
 				_G(player_info).y > 284 && _G(player_info).y < 305 &&
 				_G(player_info).facing > 2 && _G(player_info).facing < 7 &&
 				_G(flags)[V269] == 1) {
-			if (_G(flags)[V264]) {
-				_G(flags)[V264] = 1;
+			if (_G(flags)[kStandingOnKibble]) {
+				_G(flags)[kStandingOnKibble] = 1;
 			} else {
+				_G(flags)[kStandingOnKibble] = 1;
 				term_message("Wilbur now slips on kibble!");
 				intr_cancel_sentence();
 				_G(wilbur_should) = 12;
 				kernel_trigger_dispatch_now(kCHANGE_WILBUR_ANIMATION);
 			}
 		} else {
-			_G(flags)[V264] = 0;
+			_G(flags)[kStandingOnKibble] = 0;
 		}
 		break;
 
diff --git a/engines/m4/burger/rooms/section6/room604.cpp b/engines/m4/burger/rooms/section6/room604.cpp
index 351af26de97..070b272e6df 100644
--- a/engines/m4/burger/rooms/section6/room604.cpp
+++ b/engines/m4/burger/rooms/section6/room604.cpp
@@ -176,7 +176,7 @@ void Room604::init() {
 		}
 	}
 
-	_G(flags)[V264] = 0;
+	_G(flags)[kStandingOnKibble] = 0;
 
 	if (_G(flags)[V273] == 1) {
 		series_show("602spill", 0x900);
@@ -648,16 +648,16 @@ void Room604::daemon() {
 				_G(player_info).y > 280 && _G(player_info).y < 305 &&
 				_G(player_info).facing > 2 && _G(player_info).facing < 7 &&
 				_G(flags)[V273] == 1) {
-			if (_G(flags)[V264]) {
-				_G(flags)[V264] = 1;
+			if (_G(flags)[kStandingOnKibble]) {
+				_G(flags)[kStandingOnKibble] = 1;
 			} else {
-				_G(flags)[V264] = 1;
+				_G(flags)[kStandingOnKibble] = 1;
 				intr_cancel_sentence();
 				_G(wilbur_should) = 14;
 				kernel_trigger_dispatch_now(kCHANGE_WILBUR_ANIMATION);
 			}
 		} else {
-			_G(flags)[V264] = 0;
+			_G(flags)[kStandingOnKibble] = 0;
 		}
 		break;
 




More information about the Scummvm-git-logs mailing list