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

alexbevi noreply at scummvm.org
Wed Oct 21 09:40:52 UTC 2026


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

Summary:
f9aadef7cb HARVESTER: Add custom patches for object modifications


Commit: f9aadef7cb86e41eecd513d9da8ff11e251606e6
    https://github.com/scummvm/scummvm/commit/f9aadef7cb86e41eecd513d9da8ff11e251606e6
Author: Alex Bevilacqua (alex at alexbevi.com)
Date: 2026-10-21T05:40:38-04:00

Commit Message:
HARVESTER: Add custom patches for object modifications

This allows us to fix bugs that are present in the original game, such as Steve being able to walk into the walls in the Pottsdam's house.

Assisted-by: Codex:gpt-6.1-sol

Changed paths:
  A engines/harvester/patches.cpp
  A engines/harvester/patches.h
    engines/harvester/module.mk
    engines/harvester/script/script_records.cpp


diff --git a/engines/harvester/module.mk b/engines/harvester/module.mk
index d978a7fb68e..e5d3c966a17 100644
--- a/engines/harvester/module.mk
+++ b/engines/harvester/module.mk
@@ -32,6 +32,7 @@ MODULE_OBJS = \
 	menu/menu_save.o \
 	metaengine.o \
 	monster.o \
+	patches.o \
 	player/player.o \
 	player/player_animation.o \
 	player/player_attack.o \
diff --git a/engines/harvester/patches.cpp b/engines/harvester/patches.cpp
new file mode 100644
index 00000000000..598a84e793b
--- /dev/null
+++ b/engines/harvester/patches.cpp
@@ -0,0 +1,48 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "harvester/patches.h"
+
+#include "common/debug.h"
+#include "harvester/detection.h"
+#include "harvester/script/script.h"
+
+namespace Harvester {
+
+void applyObjectPatches(ObjectRecord &object) {	
+	// The original game has a known issue with the depth checks in the Pottsdam's bathroom
+	// which allows the player to walk through them at certain depths.
+	if (!object.initialOwnerOrRoom.equalsIgnoreCase("ST_BATHRM") || !object.objectName.empty() ||
+			object.initialY != 0 || object.boundsY2 != 479 || object.initialZ != -8 || object.zExtent != 10)
+		return;
+
+	if ((object.initialX == 0 && object.boundsX2 == 195) ||
+			(object.initialX == 449 && object.boundsX2 == 639)) {
+		// The original HARVEST.SCR gives these walls Z -8 and extent 10, ending at
+		// depth 2. The room allows depth 4, so Steve can walk through either wall
+		// at depths 3 and 4. Extend the walls to depth 4 to close that gap.
+		object.zExtent = 12;
+		debugC(2, kDebugRoom, "Harvester: patched bathroom wall x=%d..%d depth=-8..4",
+			object.initialX, object.boundsX2);
+	}
+}
+
+} // End of namespace Harvester
diff --git a/engines/harvester/patches.h b/engines/harvester/patches.h
new file mode 100644
index 00000000000..a65e4a3c6c9
--- /dev/null
+++ b/engines/harvester/patches.h
@@ -0,0 +1,33 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef HARVESTER_PATCHES_H
+#define HARVESTER_PATCHES_H
+
+namespace Harvester {
+
+struct ObjectRecord;
+
+void applyObjectPatches(ObjectRecord &object);
+
+} // End of namespace Harvester
+
+#endif // HARVESTER_PATCHES_H
diff --git a/engines/harvester/script/script_records.cpp b/engines/harvester/script/script_records.cpp
index 7033d7745a9..4bfe0b0f583 100644
--- a/engines/harvester/script/script_records.cpp
+++ b/engines/harvester/script/script_records.cpp
@@ -25,6 +25,7 @@
 #include "common/debug.h"
 #include "harvester/detection.h"
 #include "harvester/parse_utils.h"
+#include "harvester/patches.h"
 #include "harvester/resources.h"
 
 namespace Harvester {
@@ -484,8 +485,9 @@ void Script::parseObjectRecord(ResourceManager &resources,
 	object.currentOwnerOrRoom = object.initialOwnerOrRoom;
 	object.runtimeVisible = object.visible;
 	object.identShown = object.identTextKey.empty();
+	applyObjectPatches(object);
 	if (object.objectName.empty()) {
-		// Native room scripts use unnamed OBJECT entries as blocker rectangles.
+		// Room scripts use unnamed OBJECT entries as blocker rectangles.
 		object.objectName = Common::String::format("__ANON_OBJECT_%u", anonymousObjectId++);
 	}
 	if (!object.initialOwnerOrRoom.empty())




More information about the Scummvm-git-logs mailing list