remove il2cpp bloat

This commit is contained in:
REL
2024-10-09 08:14:41 -04:00
parent bf5525d2ea
commit 99fec63867
9 changed files with 26 additions and 84 deletions

View File

@@ -3,25 +3,10 @@
// ReSharper disable CppClangTidyBugproneMacroParentheses
// ReSharper disable CppClangTidyClangDiagnosticCastAlign
#include "pch.h"
#include <Windows.h>
#include <string>
#include "il2cpp-init.h"
#define DO_APP_FUNC(ca, oa, r, n, p) r (*n) p
namespace Genshin {
#include "il2cpp-functions.h"
}
#undef DO_APP_FUNC
using std::string;
void InitIL2CPP() {
TCHAR szFileName[MAX_PATH];
GetModuleFileName(nullptr, szFileName, MAX_PATH);
_strupr_s(szFileName);
const auto isCN = strstr(szFileName, "YUANSHEN.EXE");
const auto uBase = reinterpret_cast<uint64_t>(GetModuleHandle(isCN ? "YuanShen.exe" : "GenshinImpact.exe"));
#define DO_APP_FUNC(ca, oa, r, n, p) n = (r (*) p)(uBase + (isCN ? ca : oa))
#include "il2cpp-functions.h"
#undef DO_APP_FUNC
void InitIL2CPP()
{
}