From 03fc351a35f699450204f11416e351f39e1d7bb1 Mon Sep 17 00:00:00 2001 From: Martin Michelsen Date: Wed, 29 Jan 2025 23:20:42 -0800 Subject: [PATCH] add 59NJ versions of some patches; closes #598 --- .../ClassicMainWarpBehavior.59NJ.patch.s | 32 +++++++++++++++++++ .../ClearUnreleasedItemList.59NJ.patch.s | 26 +++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 system/client-functions/BlueBurstExclusive/ClassicMainWarpBehavior.59NJ.patch.s create mode 100644 system/client-functions/BlueBurstExclusive/ClearUnreleasedItemList.59NJ.patch.s diff --git a/system/client-functions/BlueBurstExclusive/ClassicMainWarpBehavior.59NJ.patch.s b/system/client-functions/BlueBurstExclusive/ClassicMainWarpBehavior.59NJ.patch.s new file mode 100644 index 00000000..46249af6 --- /dev/null +++ b/system/client-functions/BlueBurstExclusive/ClassicMainWarpBehavior.59NJ.patch.s @@ -0,0 +1,32 @@ +# This patch disables the logic that causes all unlockable areas to be open by +# default for all players, instead restoring the logic that checks quest flags +# to open areas (as previous PSO versions used). + +# This patch is intended to be used in the BBRequiredPatches field in +# config.json if you want the classic behavior, hence the presence of the +# hide_from_patches_menu directive here. + +.meta name="Classic main warp behavior" +.meta description="" +.meta hide_from_patches_menu + +entry_ptr: +reloc0: + .offsetof start +start: + .include WriteCodeBlocksBB + .data 0x0064A642 # Episode 1 + .data 1 + .binary 01 + .data 0x0064A4AC # Episode 2 + .data 2 + .binary 0100 + .data 0x0064A58D # Episode 4 + .data 1 + .binary 01 + .data 0x0064A6BC # Non-Normal difficulty check + .data 2 + nop + nop + .data 0 + .data 0 diff --git a/system/client-functions/BlueBurstExclusive/ClearUnreleasedItemList.59NJ.patch.s b/system/client-functions/BlueBurstExclusive/ClearUnreleasedItemList.59NJ.patch.s new file mode 100644 index 00000000..8b7f09b0 --- /dev/null +++ b/system/client-functions/BlueBurstExclusive/ClearUnreleasedItemList.59NJ.patch.s @@ -0,0 +1,26 @@ +# It would be a bad idea to remove `.meta hide_from_patches_menu` to make this +# patch an option for players to be able to select; either all players on the +# server should have this patch, or none should have it. + +# This patch clears the list of unreleased items on the client, so the client +# never creates buggy items when the server generates an item that wasn't +# released on the official servers. + +.meta name="Clear unreleased item list" +.meta description="" +.meta hide_from_patches_menu + +entry_ptr: +reloc0: + .offsetof start +start: + xor eax, eax + mov edx, esp + mov esp, 0x009F61B0 + mov ecx, 0x3C +again: + push 0 + dec ecx + jnz again + mov esp, edx + ret