From 3621ca37cb923b2a6e49f5a262da952c1e14d483 Mon Sep 17 00:00:00 2001 From: Nico Giansanti Date: Thu, 21 Jan 2021 23:34:15 +0200 Subject: [PATCH] Fix BlazBlue and Battle Fantasia - Fix Daytona 3 compile bug - Fix BlazBlue - Fix Battle Fantasia Enjoy pasta pizza mamma mia. --- OpenParrot/src/Functions/Games/Other/Daytona3.cpp | 1 + .../src/Functions/Games/TypeX2/TypeX2Generic.cpp | 12 ++++++++++++ OpenParrot/src/Functions/Types.h | 1 + OpenParrot/src/Utility/GameDetect.cpp | 2 +- 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/OpenParrot/src/Functions/Games/Other/Daytona3.cpp b/OpenParrot/src/Functions/Games/Other/Daytona3.cpp index a39f14b..e91c657 100644 --- a/OpenParrot/src/Functions/Games/Other/Daytona3.cpp +++ b/OpenParrot/src/Functions/Games/Other/Daytona3.cpp @@ -303,6 +303,7 @@ static int ThreadLoop() *(DWORD*)(imageBase + 0x15B5DB0) = 0x03; } } + return 0; } static DWORD WINAPI RunningLoop(LPVOID lpParam) diff --git a/OpenParrot/src/Functions/Games/TypeX2/TypeX2Generic.cpp b/OpenParrot/src/Functions/Games/TypeX2/TypeX2Generic.cpp index 6fa4eec..42710d6 100644 --- a/OpenParrot/src/Functions/Games/TypeX2/TypeX2Generic.cpp +++ b/OpenParrot/src/Functions/Games/TypeX2/TypeX2Generic.cpp @@ -1049,6 +1049,11 @@ static DWORD WINAPI KOFSkyStageRunningLoop(LPVOID lpParam) } } +static int ReturnsTrue() +{ + return 1; +} + static InitFunction initFunction([]() { DWORD imageBase = (DWORD)GetModuleHandleA(0); @@ -1304,6 +1309,8 @@ static InitFunction initFunction([]() injector::MakeNOP(imageBase + 0xD062, 2, true); // injector::WriteMemory(imageBase + 0xD055, 0xEB, true); // alternative patch? + injector::MakeJMP(imageBase + 0xFF0A0, ReturnsTrue); + DWORD oldPageProtection = 0; if (ToBool(config["General"]["Windowed"])) @@ -1319,6 +1326,11 @@ static InitFunction initFunction([]() break; } + case X2Type::BlazBlue: + { + injector::MakeJMP(imageBase + 0xECFD0, ReturnsTrue); + } + break; } if(GameDetect::currentGame == GameID::KOFMIRA) diff --git a/OpenParrot/src/Functions/Types.h b/OpenParrot/src/Functions/Types.h index a25c6fc..218e4ea 100644 --- a/OpenParrot/src/Functions/Types.h +++ b/OpenParrot/src/Functions/Types.h @@ -13,4 +13,5 @@ enum class X2Type { MB4, Wontertainment, BG4_Eng, + BlazBlue }; \ No newline at end of file diff --git a/OpenParrot/src/Utility/GameDetect.cpp b/OpenParrot/src/Utility/GameDetect.cpp index ed270ec..93fb9e8 100644 --- a/OpenParrot/src/Utility/GameDetect.cpp +++ b/OpenParrot/src/Utility/GameDetect.cpp @@ -241,7 +241,7 @@ void GameDetect::DetectCurrentGame() break; case 0xf9297ecb: // BlazBlue currentGame = GameID::BlazBlue; - X2Type = X2Type::Generic; + X2Type = X2Type::BlazBlue; break; case 0xee568daa: // BlazBlue Continuum Shift II currentGame = GameID::BlazBlueCS2;