From 2fcdf141c5fc7ffc0d0255ef6497183872d97c7a Mon Sep 17 00:00:00 2001 From: Akash Mozumdar Date: Sat, 11 Aug 2018 03:20:31 -0400 Subject: [PATCH] bugfix engine some more --- vnrhook/src/engine/engine.cc | 9 ++++++++- vnrhook/src/engine/match.cc | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/vnrhook/src/engine/engine.cc b/vnrhook/src/engine/engine.cc index 305b7e6..3d57de1 100644 --- a/vnrhook/src/engine/engine.cc +++ b/vnrhook/src/engine/engine.cc @@ -16435,6 +16435,13 @@ bool InsertAdobeFlash10Hook() return true; } +/** Artikash 8/10/2018: Ren'py +* +* Sample games: https://vndb.org/v19843 https://vndb.org/v12038 and many more OELVNs +* +* Uses CPython, and links to python27.dll. PyUicodeUCS2_Format is the function used to process text. +* seems to use __thiscall convention, so ecx points to string class. offset 0xc from that is a wchar_t* to the actual string +*/ bool InsertRenpyHook() { HookParam hp = {}; @@ -16444,7 +16451,7 @@ bool InsertRenpyHook() ConsoleOutput("NextHooker: Ren'py failed: failed to find python27.dll or PyUnicodeUCS2_Format"); return false; } - hp.offset = pusha_eax_off - 4; + hp.offset = pusha_ecx_off - 4; hp.index = 0xc; hp.length_offset = 0; hp.split = pusha_ebx_off - 4; diff --git a/vnrhook/src/engine/match.cc b/vnrhook/src/engine/match.cc index d34f00a..9703975 100644 --- a/vnrhook/src/engine/match.cc +++ b/vnrhook/src/engine/match.cc @@ -721,7 +721,7 @@ bool DetermineNoEngine() } // jichi 2/14/2015: Guilty+ RIN×SEN (PK) - if (Util::CheckFile(L"rio.ini") || Util::CheckFile(L"*.war")) { + if (/*Util::CheckFile(L"rio.ini") || */Util::CheckFile(L"*.war")) { ConsoleOutput("vnreng: IGNORE unknown ShinaRio"); return true; }