1
0
mirror of synced 2025-02-01 12:17:55 +01:00

RTFNF_all

added MACHINE ID setting
added fullscreen HD patch (breaks game UI)
fixed windowed mode
This commit is contained in:
00C0FFEE 2019-05-24 10:09:42 +02:00
parent dea1c7a53a
commit 23af813847
4 changed files with 98 additions and 24 deletions

View File

@ -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
@ -404,11 +405,29 @@ static InitFunction FNFFunc([]()
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 else if (ToBool(config["General"]["HDPatch"]))
// { {
// // BROKEN RESOLUTION PATCH WHEN FULLSCREEN // BROKEN RESOLUTION PATCH WHEN FULLSCREEN
// injector::WriteMemory<DWORD>((0x135954 + BaseAddress3), horizontal3, true); injector::WriteMemory<DWORD>((0x135954 + BaseAddress3), horizontal3, true);
// injector::WriteMemory<DWORD>((0x135958 + BaseAddress3), vertical3, 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);
}
}, GameID::FNF); }, GameID::FNF);

View File

@ -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);

View File

@ -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);

View File

@ -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);