init commit

This commit is contained in:
chinosk
2024-05-20 19:31:18 +08:00
parent eca1917745
commit c3ca03f812
105 changed files with 29901 additions and 0 deletions
+39
View File
@@ -0,0 +1,39 @@
#ifndef GAKUMAS_LOCALIFY_PLUGIN_H
#define GAKUMAS_LOCALIFY_PLUGIN_H
#include "Misc.h"
#include <string>
#include <memory>
namespace GakumasLocal {
struct HookInstaller
{
virtual ~HookInstaller();
virtual void InstallHook(void* addr, void* hook, void** orig) = 0;
virtual OpaqueFunctionPointer LookupSymbol(const char* name) = 0;
std::string m_il2cppLibraryPath;
std::string localizationFilesDir;
};
class Plugin
{
public:
static Plugin& GetInstance();
void InstallHook(std::unique_ptr<HookInstaller>&& hookInstaller);
HookInstaller* GetHookInstaller() const;
Plugin(Plugin const&) = delete;
Plugin& operator=(Plugin const&) = delete;
private:
Plugin() = default;
std::unique_ptr<HookInstaller> m_HookInstaller;
};
}
#endif //GAKUMAS_LOCALIFY_PLUGIN_H