diff --git a/OpenParrot/src/Functions/Games/TypeX2/TypeX2Generic.cpp b/OpenParrot/src/Functions/Games/TypeX2/TypeX2Generic.cpp index d10a418..0b16d96 100644 --- a/OpenParrot/src/Functions/Games/TypeX2/TypeX2Generic.cpp +++ b/OpenParrot/src/Functions/Games/TypeX2/TypeX2Generic.cpp @@ -182,7 +182,7 @@ static HANDLE __stdcall CreateFileAWrap(LPCSTR lpFileName, DWORD dwFlagsAndAttributes, HANDLE hTemplateFile) { - if (GameDetect::X2Type == X2Type::BG4 || GameDetect::X2Type == X2Type::BG4_Eng || GameDetect::X2Type == X2Type::VRL) + if (GameDetect::X2Type == X2Type::BG4 || GameDetect::X2Type == X2Type::BG4_Eng || GameDetect::X2Type == X2Type::VRL || GameDetect::X2Type == X2Type::ElevatorActionDeathParade) { if (strncmp(lpFileName, "COM1", 4) == 0) { @@ -1108,6 +1108,24 @@ static InitFunction initFunction([]() injector::WriteMemory(imageBase + 0x1CD8, 0x01, true); } } + + if (GameDetect::currentGame == GameID::ElevatorActionDeathParade) + { + DWORD oldPageProtection = 0; + + if (ToBool(config["General"]["Windowed"])) + { + VirtualProtect((LPVOID)(imageBase + 0X18F270), 4, PAGE_EXECUTE_READWRITE, &oldPageProtection); + windowHooks hooks = { 0 }; + hooks.createWindowExA = imageBase + 0X18F270; + init_windowHooks(&hooks); + VirtualProtect((LPVOID)(imageBase + 0X18F270), 4, oldPageProtection, &oldPageProtection); + + // change window title + static const char* title = "OpenParrot - Elevator Action: Death Parade"; + injector::WriteMemory(imageBase + 0x22EC, (DWORD)title, true); + } + } }); #endif #pragma optimize("", on) diff --git a/OpenParrot/src/Functions/Types.h b/OpenParrot/src/Functions/Types.h index 218e4ea..493f1c4 100644 --- a/OpenParrot/src/Functions/Types.h +++ b/OpenParrot/src/Functions/Types.h @@ -13,5 +13,6 @@ enum class X2Type { MB4, Wontertainment, BG4_Eng, - BlazBlue + BlazBlue, + ElevatorActionDeathParade }; \ No newline at end of file diff --git a/OpenParrot/src/Utility/GameDetect.cpp b/OpenParrot/src/Utility/GameDetect.cpp index baf01a0..3b44116 100644 --- a/OpenParrot/src/Utility/GameDetect.cpp +++ b/OpenParrot/src/Utility/GameDetect.cpp @@ -671,6 +671,12 @@ void GameDetect::DetectCurrentGame() case 0x24df738f: // Under Night Proto SetGameId(GameID::UnderNightAPM3Test, "Under Night In Birth APM3 Test Menu"); break; +#ifdef _DEBUG + case 0x148CC191: // Elevator Action Death Parade + currentGame = GameID::ElevatorActionDeathParade; + X2Type = X2Type::ElevatorActionDeathParade; + break; +#endif #endif #ifdef _AMD64_ case 0xf322d053: @@ -886,6 +892,7 @@ bool GameDetect::IsTypeX() case GameID::VirtuaRLimit: case GameID::MB4: case GameID::BG4_Eng: + case GameID::ElevatorActionDeathParade: return true; default: return false; diff --git a/OpenParrot/src/Utility/GameID.h b/OpenParrot/src/Utility/GameID.h index 700eaa7..7b24b94 100644 --- a/OpenParrot/src/Utility/GameID.h +++ b/OpenParrot/src/Utility/GameID.h @@ -133,5 +133,6 @@ enum class GameID KoihimeEnbuAPM3, UnderNightAPM3, UnderNightAPM3Test, - OtoshuDX + OtoshuDX, + ElevatorActionDeathParade }; \ No newline at end of file