1
0
mirror of synced 2024-11-14 14:57:36 +01:00

Progress on Elevator Action Death Parade (debug only)

Credit Harm for work he started last year
This commit is contained in:
Aaron M 2022-01-25 17:56:21 +13:00
parent a9302aaf16
commit 2fdebd1062
4 changed files with 30 additions and 3 deletions

View File

@ -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<BYTE>(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<DWORD>(imageBase + 0x22EC, (DWORD)title, true);
}
}
});
#endif
#pragma optimize("", on)

View File

@ -13,5 +13,6 @@ enum class X2Type {
MB4,
Wontertainment,
BG4_Eng,
BlazBlue
BlazBlue,
ElevatorActionDeathParade
};

View File

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

View File

@ -133,5 +133,6 @@ enum class GameID
KoihimeEnbuAPM3,
UnderNightAPM3,
UnderNightAPM3Test,
OtoshuDX
OtoshuDX,
ElevatorActionDeathParade
};