Initial commit

This commit is contained in:
Gericom
2025-11-22 11:08:28 +01:00
commit 9cf3ffbfcf
358 changed files with 58350 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#include "common.h"
#include "fastSearch.h"
#include "platform/LoaderPlatform.h"
#include "PatchContext.h"
u32* PatchContext::FindPattern32(const u32* pattern, u32 byteLength) const
{
#ifdef LIBTWL_ARM9
if (byteLength == 16)
{
return (u32*)fastSearch16((const u32*)_data, _dataSize, pattern);
}
#endif
return nullptr;
}
u32* PatchContext::FindPattern32Twl(const u32* pattern, u32 byteLength) const
{
if (!_twlData || _twlDataSize == 0)
{
return nullptr;
}
#ifdef LIBTWL_ARM9
if (byteLength == 16)
{
return (u32*)fastSearch16((const u32*)_twlData, _twlDataSize, pattern);
}
#endif
return nullptr;
}