new hook for UpdateDraw2D (should be compatible with DivaGL)
This commit is contained in:
@@ -8,7 +8,7 @@ constexpr uint8_t JNE_OPCODE = 0x85;
|
||||
|
||||
//constexpr uint64_t ENGINE_UPDATE_HOOK_TARGET_ADDRESS = 0x000000014018CC40;
|
||||
constexpr uint64_t ENGINE_UPDATE_INPUT_ADDRESS = 0x000000014018CBB0;
|
||||
constexpr uint64_t ENGINE_DRAW_2D_ADDRESS = 0x0000000140501F70;
|
||||
constexpr uint64_t ENGINE_STAGE_DISP_SHADOW_ADDRESS = 0x0000000140649840;
|
||||
constexpr uint64_t ENGINE_FINISH_DRAW_ADDRESS = 0x0000000140192730;
|
||||
|
||||
constexpr uint64_t CURRENT_GAME_STATE_ADDRESS = 0x0000000140EDA810;
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
#pragma comment(lib, "detours.lib")
|
||||
|
||||
void(__cdecl* divaEngineUpdate)() = (void(__cdecl*)())0x14018CC40;
|
||||
void(__cdecl* divaEngineDraw2D)(void* addr) = (void(__cdecl*)(void* addr))ENGINE_DRAW_2D_ADDRESS;
|
||||
void(__cdecl* divaEngineStageDispShadow)() = (void(__cdecl*)())ENGINE_STAGE_DISP_SHADOW_ADDRESS;
|
||||
|
||||
LRESULT CALLBACK MessageWindowProcessCallback(HWND, UINT, WPARAM, LPARAM);
|
||||
DWORD WINAPI WindowMessageDispatcher(LPVOID);
|
||||
@@ -396,10 +396,10 @@ void hookedEngineUpdate()
|
||||
//divaEngineUpdate();
|
||||
}
|
||||
|
||||
void hookedEngineDraw2D(void* addr)
|
||||
void hookedEngineStageDispShadow()
|
||||
{
|
||||
divaEngineStageDispShadow();
|
||||
TLAC::UpdateDraw2D();
|
||||
divaEngineDraw2D(addr);
|
||||
}
|
||||
|
||||
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved)
|
||||
@@ -425,7 +425,7 @@ BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReser
|
||||
|
||||
DetourTransactionBegin();
|
||||
DetourUpdateThread(GetCurrentThread());
|
||||
DetourAttach(&(PVOID&)divaEngineDraw2D, hookedEngineDraw2D);
|
||||
DetourAttach(&(PVOID&)divaEngineStageDispShadow, hookedEngineStageDispShadow);
|
||||
DetourTransactionCommit();
|
||||
|
||||
//TLAC::InitializeExtraSettings();
|
||||
|
||||
Reference in New Issue
Block a user