Merge remote-tracking branch 'Blu3train/RpgmXPEngineHooks'

This commit is contained in:
Chenx221 2024-09-05 11:43:33 +08:00
commit 52ed363565
3 changed files with 27 additions and 0 deletions

View File

@ -22356,6 +22356,28 @@ bool InsertNamcoPS2Hook()
} }
#endif // 0 #endif // 0
bool InsertRpgmXPHook()
{
//by Blu3train
/*
* Sample games:
* (RJ137364)
*/
HookParam hp = {};
wcsncpy_s(hp.module, L"gdi32.dll", MAX_MODULE_SIZE - 1);
strncpy_s(hp.function, "GetGlyphOutlineW", MAX_MODULE_SIZE - 1);
hp.address = 0;
hp.offset = 0x8; //arg2
hp.index = 0;
hp.split = pusha_esi_off - 4;
hp.split_index = 0;
hp.type = USING_UNICODE | USING_SPLIT | MODULE_OFFSET | FUNCTION_OFFSET;
hp.length_offset = 1;
ConsoleOutput("vnreng: INSERT RpgmXP");
NewHook(hp, "RpgmXP");
return true;
}
bool Minori1EngFilter(LPVOID data, DWORD *size, HookParam *, BYTE) bool Minori1EngFilter(LPVOID data, DWORD *size, HookParam *, BYTE)
{ {
auto text = reinterpret_cast<LPSTR>(data); auto text = reinterpret_cast<LPSTR>(data);

View File

@ -165,6 +165,7 @@ void InsertRealliveHook(); // RealLive: RealLive*.exe
void InsertStuffScriptHook(); // Stuff: *.mpk void InsertStuffScriptHook(); // Stuff: *.mpk
bool InsertTinkerBellHook(); // TinkerBell: arc00.dat bool InsertTinkerBellHook(); // TinkerBell: arc00.dat
bool InsertWaffleHook(); // WAFFLE: cg.pak bool InsertWaffleHook(); // WAFFLE: cg.pak
bool InsertRpgmXPHook(); // Rpgm XP: *.rgssad
bool InsertMinoriHooks(); // Minori: *.paz bool InsertMinoriHooks(); // Minori: *.paz
bool InsertSystemNNNHooks(); // System-NNN: nya/configse.xtx bool InsertSystemNNNHooks(); // System-NNN: nya/configse.xtx

View File

@ -372,6 +372,10 @@ bool DetermineEngineByFile3()
bool DetermineEngineByFile4() bool DetermineEngineByFile4()
{ {
if (Util::CheckFile(L"*.rgssad")) {
if (InsertRpgmXPHook())
return true;
}
if (Util::CheckFile(L"*.paz")) { if (Util::CheckFile(L"*.paz")) {
if (InsertMinoriHooks()) if (InsertMinoriHooks())
return true; return true;