1
0
mirror of synced 2025-01-20 09:42:49 +01:00

H2Overdrive: View Input will toggle other characters in name selection as screen says

This commit is contained in:
Aaron M 2021-05-08 10:53:12 +12:00
parent d4eb6bbd97
commit 33cc2a1803

View File

@ -20,6 +20,8 @@ static bool button4pressed = false;
static bool STARTpressed = false; static bool STARTpressed = false;
static bool STARTpressed2 = false; static bool STARTpressed2 = false;
static bool NameChoosing = false; static bool NameChoosing = false;
static bool NameViewButton = false;
static int ViewCount;
// controls // controls
extern int* ffbOffset; extern int* ffbOffset;
@ -51,12 +53,31 @@ DWORD WINAPI InputRT10(LPVOID lpParam)
exit(0); exit(0);
} }
BYTE ViewName = *(BYTE*)(0x398CB8 + BaseAddress10);
// FIX FOR NAME CHOOSING // FIX FOR NAME CHOOSING
if (strcmp((char*)0x3CB4F8 + BaseAddress10, EnterYourName) == 0) if (strcmp((char*)0x3CB4F8 + BaseAddress10, EnterYourName) == 0)
NameChoosing = true; NameChoosing = true;
else else
NameChoosing = false; NameChoosing = false;
if (NameChoosing && NameViewButton)
{
if (ViewName)
{
++ViewCount;
if (ViewCount == 2)
{
injector::WriteMemory<INT32>((0x398CB8 + BaseAddress10), 0, true);
ViewCount = 0;
}
}
else
if (ViewCount > 0)
ViewCount = 0;
}
// REAL NUMERIC KEYPAD // REAL NUMERIC KEYPAD
int keys[] = { VK_NUMPAD1, VK_NUMPAD2, VK_NUMPAD3, VK_NUMPAD4, VK_NUMPAD5, VK_NUMPAD6, VK_NUMPAD7, VK_NUMPAD8, VK_NUMPAD9, VK_MULTIPLY, VK_NUMPAD0, VK_DIVIDE }; int keys[] = { VK_NUMPAD1, VK_NUMPAD2, VK_NUMPAD3, VK_NUMPAD4, VK_NUMPAD5, VK_NUMPAD6, VK_NUMPAD7, VK_NUMPAD8, VK_NUMPAD9, VK_MULTIPLY, VK_NUMPAD0, VK_DIVIDE };
for (int i = 0; i < sizeof(keys) / sizeof(int); i++) for (int i = 0; i < sizeof(keys) / sizeof(int); i++)
@ -163,6 +184,13 @@ DWORD WINAPI InputRT10(LPVOID lpParam)
{ {
injector::WriteMemory<INT32>((ptr + 0x840), 1, true); injector::WriteMemory<INT32>((ptr + 0x840), 1, true);
} }
if (NameChoosing && !NameViewButton)
{
NameViewButton = true;
OutputDebugStringA("View Pressed");
injector::WriteMemory<INT32>((0x398CB8 + BaseAddress10), 1, true);
}
} }
else if (button2pressed == true) else if (button2pressed == true)
{ {
@ -181,6 +209,11 @@ DWORD WINAPI InputRT10(LPVOID lpParam)
{ {
injector::WriteMemory<INT32>((ptr + 0x840), 0, true); injector::WriteMemory<INT32>((ptr + 0x840), 0, true);
} }
if (NameViewButton)
{
NameViewButton = false;
}
} }
} }