1
0
mirror of synced 2025-02-20 20:41:34 +01:00

APM3 Kasiori is now playable

APM3 Kasiori is now playable
This commit is contained in:
Reaver 2021-11-12 22:53:20 +02:00
parent b6f62286af
commit cf4e2003c9
2 changed files with 25 additions and 4 deletions

View File

@ -342,12 +342,14 @@ struct GamepadInfo
char name[260];
};
static GamepadInfo* _gamePad;
GamepadInfo* CALLPLEB Input_getGamepadInfo()
{
#ifdef _LOGAPM3
info(true, "Input_getGamepadInfo");
#endif
static GamepadInfo* _gamePad;
if (_gamePad == nullptr)
{
_gamePad = (GamepadInfo*)malloc(sizeof(GamepadInfo));
@ -408,12 +410,13 @@ DWORD_PTR CALLPLEB Input_isOpenPewviewWindow()
return Input_isOpenPewviewWindowReturnValue;
}
char CALLPLEB Input_setGamepadConfig(DWORD_PTR a1)
GamepadInfo* CALLPLEB Input_setGamepadConfig(GamepadInfo *gamepadInfo)
{
#ifdef _LOGAPM3
info(true, "Input_setGamepadConfig");
#endif
return Input_setGamepadConfigReturnValue;
return 0;
}
char* CALLPLEB NetworkProperty_getAddressString()
@ -1077,8 +1080,26 @@ static InitFunction initNosferatuLilinorTestFunc([]()
}, GameID::NosferatuLilinor);
HMODULE(WINAPI* g_origLoadLibraryW)(
LPCWSTR lpRootPathName
);
HMODULE LoadLibraryWHook(LPCWSTR lpLibFileName)
{
if (wcscmp(L"X:/lib/apm.dll", lpLibFileName) == 0)
{
return g_origLoadLibraryW(L"apm.dll");
}
return g_origLoadLibraryW(lpLibFileName);
}
static InitFunction initKasioriTestFunc([]()
{
// voce pode copiar meu trabalho jajajajajajajaja
MH_Initialize();
MH_CreateHookApi(L"kernel32.dll", "LoadLibraryW", LoadLibraryWHook, (void**)&g_origLoadLibraryW);
MH_EnableHook(MH_ALL_HOOKS);
HookAPM3(L"SDHV");
__int64 mainModuleBase = (__int64)GetModuleHandle(0);

View File

@ -739,7 +739,7 @@ void GameDetect::DetectCurrentGame()
SetGameId(GameID::NosferatuLilinor, "Nosferatu Lilinor");
break;
case 0x5451ddfd:
SetGameId(GameID::NosferatuLilinor, "Kasiori");
SetGameId(GameID::Kasiori, "Kasiori");
break;
#endif
default: