1
0
mirror of synced 2025-01-20 17:48:51 +01:00

Modified Daytona 3 again to make ffb work correctly

This commit is contained in:
Boomslangnz 2018-12-03 21:11:04 +13:00
parent d0a4997923
commit 0a4dea24a9
2 changed files with 10 additions and 1 deletions

View File

@ -256,6 +256,7 @@ static InitFunction Daytona3Func([]()
injector::WriteMemoryRaw(imageBase + 0xDD697, "\x90\x90\x90\x90\x90\x90\x38\x05\xC8\xF9\x5A\x01\x90\x90\x90\x90\x90\x90", 18, true);
injector::WriteMemoryRaw(imageBase + 0x12958F, "\x33\xC0\x8A\x45\x08\x90\x90\x90\x90\x72\x08\x66\xA3\x46\xFC\x5A\x01\xEB\x06\x66\xA3\x44\xFC\x5A\x01\x31\xFF\x31\xF6\x47\xBE\x0F\x00\x00\x00\xEB\x4C\x90\x90\x90\x90", 41, true);
injector::WriteMemoryRaw(imageBase + 0xD8616C, "\x2E\x2E\x2F\x73\x68\x65\x6C\x6C\x00\x00\x00\x00\x00\x00\x00\x00\x2E\x2E\x2F\x73\x68\x65\x6C\x6C\x5C\x49\x6E\x70\x57\x72\x61\x70\x70\x65\x72\x2E\x65\x78\x65\x00\x00\x00\x00\x00\x00\x00\x00\x00", 48, true);
injector::WriteMemoryRaw(imageBase + 0x7D087, "\x85\xFF\x0F\x84\xE9\x01\x00\x00\x6A\x00\x8B\xCF\xE8\xC8\xD2\x21\x00\x8D\x80\x00\x80\x00\x00\x89\x46\x40\x6A\x05\x8B\xCF\xE8\xB6\xD2\x21\x00\xC1\xE0\x08\x89\x46\x44\x6A\x04\x8B\xCF\xE8\xA7\xD2\x21\x00\xC1\xE0\x08\x89\x46\x48\x90\xEB\x2E\xE8\xE9\xD4\x21\x00\x8B\x5E\x04\x8B\xF8\x8B\xCF\xE8\x2D\xD5\x21\x00\x8D\x4B\x01\x3B\xC1\x0F\x8C\x9A\x01\x00\x00\x53\x8B\xCF\xE8\xDA\xD4\x21\x00\x8B\xF8\xEB\x9D\x90\x90\x90\x90\x90\x90", 105, true);
injector::MakeNOP(imageBase + 0x1DDDFA, 5);
injector::MakeNOP(imageBase + 0x1DDE1E, 6);
injector::MakeNOP(imageBase + 0x1DDE45, 6);

View File

@ -57,6 +57,7 @@ int iround(double num) {
}
extern int* ffbOffset;
extern int* ffbOffset2;
DWORD WINAPI XInputGetState
(
@ -81,6 +82,10 @@ DWORD WINAPI XInputGetState
{
gamepadState.bRightTrigger = daytonaPressStart ? 0xFF : 0x00;
}
if (GameDetect::currentGame == GameID::Daytona3)
{
gamepadState.sThumbLX |= (-(33024 - *ffbOffset2) * 255);
}
#endif
if (pState->dwPacketNumber == UINT_MAX)
pState->dwPacketNumber = 0;
@ -285,8 +290,11 @@ DWORD WINAPI XInputGetStateEx
{
gamepadState.bRightTrigger = daytonaPressStart ? 0xFF : 0x00;
}
if (GameDetect::currentGame == GameID::Daytona3)
{
gamepadState.sThumbLX |= (-(33024 - *ffbOffset2) * 255);
}
#endif
if (pState->dwPacketNumber == UINT_MAX)
pState->dwPacketNumber = 0;
else