add srpg hook

This commit is contained in:
Akash Mozumdar 2019-01-19 00:18:07 -05:00
parent 2e5ee9e547
commit a7a19ef017
3 changed files with 22 additions and 0 deletions

View File

@ -11885,6 +11885,21 @@ bool InsertSilkysHook()
return true;
}
bool InsertSRPGHook()
{
if (DWORD addr = (DWORD)GetProcAddress(GetModuleHandleW(L"oleaut32.dll"), "SysAllocString"))
{
HookParam hp = {};
hp.offset = 4;
hp.address = addr;
hp.type = USING_STRING | USING_UNICODE | NO_CONTEXT;
NewHook(hp, "SRPG");
return true;
}
ConsoleOutput("Textractor: SRPG: couldn't find function");
return false;
}
/** jichi 6/1/2014 Eushully
* Insert to the last GetTextExtentPoint32A
*

View File

@ -142,6 +142,7 @@ bool InsertScenarioPlayerHook();// sol-fa-soft: *.iar && *.sec5
bool InsertSiglusHook(); // SiglusEngine: SiglusEngine.exe
bool InsertSideBHook(); // SideB: Copyright side-B
bool InsertSilkysHook(); // SilkysPlus
bool InsertSRPGHook(); // SilverSoft SRPG studio: *.dts
bool InsertSyuntadaHook(); // Syuntada: dSoh.dat
bool InsertSystem43Hook(); // System43@AliceSoft: AliceStart.ini
bool InsertSystemAoiHook(); // SystemAoi: *.vfs

View File

@ -444,6 +444,12 @@ bool DetermineEngineByFile4()
return true;
}
// Artikash 1/18/2019: SRPG Studio sample game https://www.freem.ne.jp/win/game/16844
if (Util::CheckFile(L"*.dts")) {
InsertSRPGHook();
return true;
}
return false;
}