From d6946c8b653f2e28dbac735f767bb96058d21c80 Mon Sep 17 00:00:00 2001 From: NovaRain Date: Mon, 1 Jun 2026 13:29:39 +0800 Subject: [PATCH] Re-added NumberPatchLoop option to ddraw.ini --- artifacts/ddraw.ini | 4 +++- sfall/Modules/LoadOrder.cpp | 10 +++++----- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/artifacts/ddraw.ini b/artifacts/ddraw.ini index 473a6762..9a00f28b 100644 --- a/artifacts/ddraw.ini +++ b/artifacts/ddraw.ini @@ -309,8 +309,10 @@ WorldMapSlots=0 UseFileSystemOverride=0 ;To use a patch file other than patch000.dat, uncomment the next line and add your new file name -;If you want to load multiple patch files (up to 1000) at once, you can include a %d in the file name (sprintf syntax) +;If you want to load multiple patch files at once, you can include a %d in the file name (sprintf syntax) ;PatchFile=patch%03d.dat +;Uncomment the next line to change the number of patch files to load (valid range: 1..1000; default is 100) +;NumberPatchLoop=100 ;Set to 1 to change the order of how the engine loads game data ;Old: patchXXX.dat > critter_patches > critter_dat > f2_res_patches > f2_res_dat > master_patches > master_dat diff --git a/sfall/Modules/LoadOrder.cpp b/sfall/Modules/LoadOrder.cpp index f450a5d4..6679c89b 100644 --- a/sfall/Modules/LoadOrder.cpp +++ b/sfall/Modules/LoadOrder.cpp @@ -395,11 +395,11 @@ static void GetExtraPatches() { } static void MultiPatchesPatch() { - //if (IniReader::GetConfigInt("Misc", "MultiPatches", 0)) { - dlogr("Applying load multiple patches patch.", DL_INIT); - SafeWrite8(0x444354, CodeType::Nop); // Change step from 2 to 1 - SafeWrite8(0x44435C, 0xC4); // Disable check - //} + dlogr("Applying load multiple patches patch.", DL_INIT); + SafeWrite8(0x444354, CodeType::Nop); // Change step from 2 to 1 + SafeWrite8(0x44435C, 0xC4); // Disable check + // New loop count + SafeWrite32(0x444357, clamp(IniReader::GetConfigInt("Misc", "NumberPatchLoop", 100), 1, 1000)); } ///////////////////////// SAVE PARTY MEMBER PROTOTYPES /////////////////////////