Merge branch 'PDModdingCommunity:dev' into switch_hori
This commit is contained in:
@@ -32,9 +32,13 @@ namespace TLAC::Components
|
||||
Pause::menusets Pause::curMenuSet = MENUSET_MAIN;
|
||||
std::chrono::time_point<std::chrono::high_resolution_clock> Pause::menuItemMoveTime;
|
||||
std::vector<uint8_t> Pause::origAetMovOp;
|
||||
float_t Pause::origDeltaFrameHistory = 0.0f;
|
||||
int32_t Pause::origDeltaFrameHistoryInt = 0;
|
||||
uint8_t* Pause::aetMovPatchAddress = (uint8_t*)0x1401703b3;
|
||||
std::vector<uint8_t> Pause::origFramespeedOp;
|
||||
uint8_t* Pause::framespeedPatchAddress = (uint8_t*)0x140192D50;
|
||||
float_t* Pause::deltaFrameHistoryAddress = (float_t*)0x140EDA6C0;
|
||||
int32_t* Pause::deltaFrameHistoryIntAddress = (int32_t*)0x140EDA6C4;
|
||||
std::vector<uint8_t> Pause::origAgeageHairOp;
|
||||
uint8_t* Pause::ageageHairPatchAddress = (uint8_t*)0x14054352c;
|
||||
std::vector<bool> Pause::streamPlayStates;
|
||||
@@ -136,6 +140,12 @@ namespace TLAC::Components
|
||||
InjectCode(framespeedPatchAddress, { 0x0f, 0x57, 0xc0, 0xc3 }); // XORPS XMM0,XMM0; RET
|
||||
InjectCode(ageageHairPatchAddress, { 0x0f, 0x57, 0xdb }); // XORPS XMM3,XMM3
|
||||
|
||||
origDeltaFrameHistory = *deltaFrameHistoryAddress;
|
||||
origDeltaFrameHistoryInt = *deltaFrameHistoryIntAddress;
|
||||
|
||||
*deltaFrameHistoryAddress = 0.0f;
|
||||
*deltaFrameHistoryIntAddress = 0;
|
||||
|
||||
uint64_t audioMixerAddr = *(uint64_t*)(AUDIO_MAIN_CLASS_ADDRESS + 0x70);
|
||||
uint64_t audioStreamsAddress = *(uint64_t*)(audioMixerAddr + 0x18);
|
||||
int nAudioStreams = *(uint64_t*)(audioMixerAddr + 0x20);
|
||||
@@ -279,6 +289,9 @@ namespace TLAC::Components
|
||||
InjectCode(framespeedPatchAddress, origFramespeedOp);
|
||||
InjectCode(ageageHairPatchAddress, origAgeageHairOp);
|
||||
|
||||
*deltaFrameHistoryAddress = origDeltaFrameHistory;
|
||||
*deltaFrameHistoryIntAddress = origDeltaFrameHistoryInt;
|
||||
|
||||
uint64_t audioMixerAddr = *(uint64_t*)(AUDIO_MAIN_CLASS_ADDRESS + 0x70);
|
||||
uint64_t audioStreamsAddress = *(uint64_t*)(audioMixerAddr + 0x18);
|
||||
int nAudioStreams = *(uint64_t*)(audioMixerAddr + 0x20);
|
||||
|
||||
@@ -47,6 +47,10 @@ namespace TLAC::Components
|
||||
|
||||
static std::vector<uint8_t> origFramespeedOp;
|
||||
static uint8_t* framespeedPatchAddress;
|
||||
static float_t origDeltaFrameHistory;
|
||||
static int32_t origDeltaFrameHistoryInt;
|
||||
static float_t* deltaFrameHistoryAddress;
|
||||
static int32_t* deltaFrameHistoryIntAddress;
|
||||
|
||||
static std::vector<uint8_t> origAgeageHairOp;
|
||||
static uint8_t* ageageHairPatchAddress;
|
||||
|
||||
@@ -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