Initial generalize Pokemon IR patching

This commit is contained in:
taxicat1
2025-12-06 08:51:58 -05:00
parent d12036e6a7
commit 005b8cab03
14 changed files with 158 additions and 164 deletions

View File

@@ -14,8 +14,7 @@
#include "patches/arm9/PokemonDownloaderArm9Patch.h"
#include "patches/arm9/OverlayPatches/FsStartOverlayHookPatch.h"
#include "patches/arm9/OverlayPatches/DSProtectPatches/DSProtectOverlayPatch.h"
#include "patches/arm9/OverlayPatches/PokemonBw1/PokemonBw1IrApPatch.h"
#include "patches/arm9/OverlayPatches/PokemonBw2/PokemonBw2IrApPatch.h"
#include "patches/arm9/OverlayPatches/PokemonIr/PokemonIrApPatch.h"
#include "patches/arm9/OverlayPatches/GoldenSunDarkDawn/GoldenSunDarkDawnOverlayHookPatch.h"
#include "SecureSysCallsUnusedSpaceLocator.h"
#include "fastSearch.h"
@@ -234,6 +233,25 @@ void Arm9Patcher::ApplyPatches(const LoaderPlatform* loaderPlatform, const ApLis
}
switch (romHeader->gameCode)
{
// Pokemon HeartGold & SoulSilver
case GAMECODE("IPGD"):
case GAMECODE("IPGE"):
case GAMECODE("IPGF"):
case GAMECODE("IPGI"):
case GAMECODE("IPGJ"):
case GAMECODE("IPGK"):
case GAMECODE("IPGS"):
case GAMECODE("IPKD"):
case GAMECODE("IPKE"):
case GAMECODE("IPKF"):
case GAMECODE("IPKI"):
case GAMECODE("IPKJ"):
case GAMECODE("IPKK"):
case GAMECODE("IPKS"):
{
overlayHookPatch->AddOverlayPatch(new PokemonIrApPatch(PokemonIrVersion::Hgss));
break;
}
// Pokemon Black & White
case GAMECODE("IRAD"):
case GAMECODE("IRAF"):
@@ -250,7 +268,7 @@ void Arm9Patcher::ApplyPatches(const LoaderPlatform* loaderPlatform, const ApLis
case GAMECODE("IRBO"):
case GAMECODE("IRBS"):
{
overlayHookPatch->AddOverlayPatch(new PokemonBw1IrApPatch());
overlayHookPatch->AddOverlayPatch(new PokemonIrApPatch(PokemonIrVersion::Bw1));
break;
}
// Pokemon Black & White 2
@@ -268,7 +286,7 @@ void Arm9Patcher::ApplyPatches(const LoaderPlatform* loaderPlatform, const ApLis
case GAMECODE("IREO"):
case GAMECODE("IRES"):
{
overlayHookPatch->AddOverlayPatch(new PokemonBw2IrApPatch());
overlayHookPatch->AddOverlayPatch(new PokemonIrApPatch(PokemonIrVersion::Bw2));
break;
}
}