diff --git a/vnrhook/engine/engine.cc b/vnrhook/engine/engine.cc index 0896d3a..f7472ee 100644 --- a/vnrhook/engine/engine.cc +++ b/vnrhook/engine/engine.cc @@ -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 * diff --git a/vnrhook/engine/engine.h b/vnrhook/engine/engine.h index 3004ee8..fd33dec 100644 --- a/vnrhook/engine/engine.h +++ b/vnrhook/engine/engine.h @@ -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 diff --git a/vnrhook/engine/match.cc b/vnrhook/engine/match.cc index 3e4a774..3b154a6 100644 --- a/vnrhook/engine/match.cc +++ b/vnrhook/engine/match.cc @@ -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; }