RTFNF_all
added MACHINE ID setting added fullscreen HD patch (breaks game UI) fixed windowed mode
This commit is contained in:
parent
dea1c7a53a
commit
23af813847
@ -16,7 +16,7 @@ int vertical3 = 0;
|
|||||||
HWND hWndRT3 = 0;
|
HWND hWndRT3 = 0;
|
||||||
bool movable3 = false;
|
bool movable3 = false;
|
||||||
bool polling3 = false;
|
bool polling3 = false;
|
||||||
|
int oldvalue3 = 0;
|
||||||
static bool previousLeft = false;
|
static bool previousLeft = false;
|
||||||
static bool previousRight = false;
|
static bool previousRight = false;
|
||||||
static bool previousUp = false;
|
static bool previousUp = false;
|
||||||
@ -269,11 +269,12 @@ DWORD WINAPI InputRT3(LPVOID lpParam)
|
|||||||
int iWheel = (int)((width - 20) * 0.5 * wheel);
|
int iWheel = (int)((width - 20) * 0.5 * wheel);
|
||||||
double fx = (float)((wheel) * (65535.0f / horizontal3));
|
double fx = (float)((wheel) * (65535.0f / horizontal3));
|
||||||
|
|
||||||
if (movable3 == false) // then poll ugly mouse input
|
if ((movable3 == false) && (oldvalue3 != *ffbOffset2)) // then poll ugly mouse input
|
||||||
{
|
{
|
||||||
polling3 = true;
|
polling3 = true;
|
||||||
mouse_event(MOUSEEVENTF_MOVE, fx, 0, 0, 0);
|
mouse_event(MOUSEEVENTF_MOVE, fx, 0, 0, 0);
|
||||||
polling3 = false;
|
polling3 = false;
|
||||||
|
oldvalue3 = *ffbOffset2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GAS
|
// GAS
|
||||||
@ -354,7 +355,7 @@ DWORD WINAPI CreateWindowExART3(DWORD dwExStyle, LPCSTR lpClassName, LPCSTR lpWi
|
|||||||
|
|
||||||
DWORD WINAPI SetCursorPosRT3(int X, int Y)
|
DWORD WINAPI SetCursorPosRT3(int X, int Y)
|
||||||
{
|
{
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
DWORD WINAPI SetWindowPosRT3(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags)
|
DWORD WINAPI SetWindowPosRT3(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int cx, int cy, UINT uFlags)
|
||||||
@ -365,13 +366,13 @@ DWORD WINAPI SetWindowPosRT3(HWND hWnd, HWND hWndInsertAfter, int X, int Y, int
|
|||||||
static InitFunction FNFFunc([]()
|
static InitFunction FNFFunc([]()
|
||||||
{
|
{
|
||||||
GetDesktopResolution(horizontal3, vertical3);
|
GetDesktopResolution(horizontal3, vertical3);
|
||||||
|
|
||||||
// BUTTON VIEW 1 HACK
|
// BUTTON VIEW 1 HACK
|
||||||
injector::WriteMemory<BYTE>((0x35B9A + BaseAddress3), DIK_F1, true);
|
injector::WriteMemory<BYTE>((0x35B9A + BaseAddress3), DIK_F1, true);
|
||||||
|
|
||||||
// BUTTON VIEW 3 HACK
|
// BUTTON VIEW 3 HACK
|
||||||
injector::WriteMemory<BYTE>((0x83739 + BaseAddress3), DIK_F4, true);
|
injector::WriteMemory<BYTE>((0x83739 + BaseAddress3), DIK_F4, true);
|
||||||
|
|
||||||
// DISABLE CURSOR RESET
|
// DISABLE CURSOR RESET
|
||||||
injector::WriteMemory<BYTE>((0x4C489 + BaseAddress3), 0xEB, true);
|
injector::WriteMemory<BYTE>((0x4C489 + BaseAddress3), 0xEB, true);
|
||||||
|
|
||||||
@ -398,17 +399,35 @@ static InitFunction FNFFunc([]()
|
|||||||
|
|
||||||
if (ToBool(config["General"]["Windowed"]))
|
if (ToBool(config["General"]["Windowed"]))
|
||||||
{
|
{
|
||||||
CreateThread(NULL, 0, WindowRT3, NULL, 0, NULL);
|
CreateThread(NULL, 0, WindowRT3, NULL, 0, NULL);
|
||||||
|
|
||||||
MH_Initialize();
|
MH_Initialize();
|
||||||
MH_CreateHookApi(L"user32.dll", "CreateWindowExA", &CreateWindowExART3, (void**)&original_CreateWindowExA3);
|
MH_CreateHookApi(L"user32.dll", "CreateWindowExA", &CreateWindowExART3, (void**)&original_CreateWindowExA3);
|
||||||
MH_EnableHook(MH_ALL_HOOKS);
|
MH_EnableHook(MH_ALL_HOOKS);
|
||||||
|
}
|
||||||
|
else if (ToBool(config["General"]["HDPatch"]))
|
||||||
|
{
|
||||||
|
// BROKEN RESOLUTION PATCH WHEN FULLSCREEN
|
||||||
|
injector::WriteMemory<DWORD>((0x135954 + BaseAddress3), horizontal3, true);
|
||||||
|
injector::WriteMemory<DWORD>((0x135958 + BaseAddress3), vertical3, true);
|
||||||
|
}
|
||||||
|
|
||||||
|
// MACHINE ID setting
|
||||||
|
if ((strcmp(config["Network"]["MachineID"].c_str(), "2") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0xCD808 + BaseAddress3), 0x01, true);
|
||||||
|
}
|
||||||
|
else if ((strcmp(config["Network"]["MachineID"].c_str(), "3") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0xCD808 + BaseAddress3), 0x02, true);
|
||||||
|
}
|
||||||
|
else if ((strcmp(config["Network"]["MachineID"].c_str(), "4") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0xCD808 + BaseAddress3), 0x03, true);
|
||||||
|
}
|
||||||
|
else // MACHINE ID = 1
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0xCD808 + BaseAddress3), 0x00, true);
|
||||||
}
|
}
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// // BROKEN RESOLUTION PATCH WHEN FULLSCREEN
|
|
||||||
// injector::WriteMemory<DWORD>((0x135954 + BaseAddress3), horizontal3, true);
|
|
||||||
// injector::WriteMemory<DWORD>((0x135958 + BaseAddress3), vertical3, true);
|
|
||||||
// }
|
|
||||||
|
|
||||||
}, GameID::FNF);
|
}, GameID::FNF);
|
||||||
|
@ -285,4 +285,22 @@ static InitFunction FNFDriftFunc([]()
|
|||||||
MH_EnableHook(MH_ALL_HOOKS);
|
MH_EnableHook(MH_ALL_HOOKS);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MACHINE ID setting
|
||||||
|
if ((strcmp(config["Network"]["MachineID"].c_str(), "2") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x137F88 + BaseAddress), 0x01, true);
|
||||||
|
}
|
||||||
|
else if ((strcmp(config["Network"]["MachineID"].c_str(), "3") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x137F88 + BaseAddress), 0x02, true);
|
||||||
|
}
|
||||||
|
else if ((strcmp(config["Network"]["MachineID"].c_str(), "4") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x137F88 + BaseAddress), 0x03, true);
|
||||||
|
}
|
||||||
|
else // MACHINE ID = 1
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x137F88 + BaseAddress), 0x00, true);
|
||||||
|
}
|
||||||
|
|
||||||
}, GameID::FNFDrift);
|
}, GameID::FNFDrift);
|
||||||
|
@ -14,7 +14,7 @@ int vertical4 = 0;
|
|||||||
HWND hWndRT4 = 0;
|
HWND hWndRT4 = 0;
|
||||||
bool movable4 = false;
|
bool movable4 = false;
|
||||||
bool polling4 = false;
|
bool polling4 = false;
|
||||||
|
int oldvalue4 = 0;
|
||||||
static bool previousLeft = false;
|
static bool previousLeft = false;
|
||||||
static bool previousRight = false;
|
static bool previousRight = false;
|
||||||
static bool previousUp = false;
|
static bool previousUp = false;
|
||||||
@ -268,11 +268,12 @@ DWORD WINAPI InputRT4(LPVOID lpParam)
|
|||||||
int iWheel = (int)((width - 20) * 0.5 * wheel);
|
int iWheel = (int)((width - 20) * 0.5 * wheel);
|
||||||
double fx = (float)((wheel) * (65535.0f / horizontal4));
|
double fx = (float)((wheel) * (65535.0f / horizontal4));
|
||||||
|
|
||||||
if (movable4 == false) // then poll ugly mouse input
|
if ((movable4 == false) && (oldvalue4 != *ffbOffset2)) // then poll ugly mouse input
|
||||||
{
|
{
|
||||||
polling4 = true;
|
polling4 = true;
|
||||||
mouse_event(MOUSEEVENTF_MOVE, fx, 0, 0, 0);
|
mouse_event(MOUSEEVENTF_MOVE, fx, 0, 0, 0);
|
||||||
polling4 = false;
|
polling4 = false;
|
||||||
|
oldvalue4 = *ffbOffset2;
|
||||||
}
|
}
|
||||||
|
|
||||||
// GAS
|
// GAS
|
||||||
@ -405,11 +406,29 @@ static InitFunction FNFSBFunc([]()
|
|||||||
MH_CreateHookApi(L"user32.dll", "CreateWindowExA", &CreateWindowExART4, (void**)&original_CreateWindowExA4);
|
MH_CreateHookApi(L"user32.dll", "CreateWindowExA", &CreateWindowExART4, (void**)&original_CreateWindowExA4);
|
||||||
MH_EnableHook(MH_ALL_HOOKS);
|
MH_EnableHook(MH_ALL_HOOKS);
|
||||||
}
|
}
|
||||||
// else
|
else if (ToBool(config["General"]["HDPatch"]))
|
||||||
// {
|
{
|
||||||
// // BROKEN RESOLUTION PATCH WHEN FULLSCREEN
|
// BROKEN RESOLUTION PATCH WHEN FULLSCREEN
|
||||||
// injector::WriteMemory<DWORD>((0x1522F8 + BaseAddress3), horizontal3, true);
|
injector::WriteMemory<DWORD>((0x1522F8 + BaseAddress4), horizontal4, true);
|
||||||
// injector::WriteMemory<DWORD>((0x1522FC + BaseAddress3), vertical3, true);
|
injector::WriteMemory<DWORD>((0x1522FC + BaseAddress4), vertical4, true);
|
||||||
// }
|
}
|
||||||
|
|
||||||
|
// MACHINE ID setting
|
||||||
|
if ((strcmp(config["Network"]["MachineID"].c_str(), "2") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x11FA18 + BaseAddress4), 0x01, true);
|
||||||
|
}
|
||||||
|
else if ((strcmp(config["Network"]["MachineID"].c_str(), "3") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x11FA18 + BaseAddress4), 0x02, true);
|
||||||
|
}
|
||||||
|
else if ((strcmp(config["Network"]["MachineID"].c_str(), "4") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x11FA18 + BaseAddress4), 0x03, true);
|
||||||
|
}
|
||||||
|
else // MACHINE ID = 1
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x11FA18 + BaseAddress4), 0x00, true);
|
||||||
|
}
|
||||||
|
|
||||||
}, GameID::FNFSB);
|
}, GameID::FNFSB);
|
||||||
|
@ -311,4 +311,22 @@ static InitFunction FNFSCFunc([]()
|
|||||||
CreateThread(NULL, 0, FullscreenRT2, NULL, 0, NULL);
|
CreateThread(NULL, 0, FullscreenRT2, NULL, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// MACHINE ID setting
|
||||||
|
if ((strcmp(config["Network"]["MachineID"].c_str(), "2") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x3036A8 + BaseAddress2), 0x01, true);
|
||||||
|
}
|
||||||
|
else if ((strcmp(config["Network"]["MachineID"].c_str(), "3") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x3036A8 + BaseAddress2), 0x02, true);
|
||||||
|
}
|
||||||
|
else if ((strcmp(config["Network"]["MachineID"].c_str(), "4") == 0))
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x3036A8 + BaseAddress2), 0x03, true);
|
||||||
|
}
|
||||||
|
else // MACHINE ID = 1
|
||||||
|
{
|
||||||
|
injector::WriteMemory<DWORD>((0x3036A8 + BaseAddress2), 0x00, true);
|
||||||
|
}
|
||||||
|
|
||||||
}, GameID::FNFSC);
|
}, GameID::FNFSC);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user