From 2293ba4c525cd435b1fc8e49b8962ec7e070a68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <101191390+HIllya51@users.noreply.github.com> Date: Wed, 17 Apr 2024 19:47:45 +0800 Subject: [PATCH] splushwave Update splushwave.cpp --- LunaHook/CMakeLists.txt | 2 +- LunaHook/engine32/splushwave.cpp | 43 ++++++++++++++++++++++++++++++++ LunaHook/engine32/splushwave.h | 12 +++++++++ LunaHook/enginecollection32.cpp | 4 ++- 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 LunaHook/engine32/splushwave.cpp create mode 100644 LunaHook/engine32/splushwave.h diff --git a/LunaHook/CMakeLists.txt b/LunaHook/CMakeLists.txt index ff55a14..07e7c65 100644 --- a/LunaHook/CMakeLists.txt +++ b/LunaHook/CMakeLists.txt @@ -4,7 +4,7 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8) set(enginepath "engine64") set(collector "enginecollection64.cpp") else() - set(enginessrc ransel akatombo GASTRO GSX Aksys ScrPlayer SYSD KISS IGScript Jellyfish BKEngine Overflow SRPGStudio Suika2 FVP LCScript Ohgetsu RPGMakerRGSS3 ONScripterru OVERDRIVE HXP Palette Purple Ruf RUNE Tarte Tomato Sakuradog Troy VitaminSoft Unknown TSSystem Xbangbang Anisetta Nijyuei Interheart LovaGame Giga Jisatu101 lua51 EntisGLS Ciel ACTGS TerraLunar PPSSPP jukujojidai PCSX2 VanillawareGC cef V8 mono pchooks PONScripter Bishop sakanagl Renpy Lightvn KiriKiri SideB BGI Bootup morning shyakunage Regista NNNConfig Eushully Majiro littlecheese Elf Silkys CMVS Wolf Circus1 Circus2 Cotopha Artemis CatSystem Atelier Tenco QLIE Pal AIL2 NeXAS LunaSoft Unicorn Rejet Interlude AdobeAir Retouch Malie Live Nexton Lucifen Waffle TinkerBell SystemAoi Yuris Nitroplus2 Bruns EME RRE Candy Speed ApricoT Triangle AB2Try MBLMED GameMaker DxLib CodeX Minori Sprite RpgmXP Eagls Debonosu C4 WillPlus Tanuki GXP AOS Mink YukaSystem2 sakusesu Exp Syuntada Pensil Anim hibiki Nitroplus Reallive Siglus Taskforce2 RUGP IronGameSystem Anex86 ShinyDaysGame MarineHeart ShinaRio CaramelBox UnisonShift Escude Ryokucha Alice Footy2 utawarerumono System4x Abalone Abel 5pb HorkEye XUSE Leaf Nekopack AXL AGS AdobeFlash10 FocasLens Tamamo Ages3ResT) + set(enginessrc splushwave ransel akatombo GASTRO GSX Aksys ScrPlayer SYSD KISS IGScript Jellyfish BKEngine Overflow SRPGStudio Suika2 FVP LCScript Ohgetsu RPGMakerRGSS3 ONScripterru OVERDRIVE HXP Palette Purple Ruf RUNE Tarte Tomato Sakuradog Troy VitaminSoft Unknown TSSystem Xbangbang Anisetta Nijyuei Interheart LovaGame Giga Jisatu101 lua51 EntisGLS Ciel ACTGS TerraLunar PPSSPP jukujojidai PCSX2 VanillawareGC cef V8 mono pchooks PONScripter Bishop sakanagl Renpy Lightvn KiriKiri SideB BGI Bootup morning shyakunage Regista NNNConfig Eushully Majiro littlecheese Elf Silkys CMVS Wolf Circus1 Circus2 Cotopha Artemis CatSystem Atelier Tenco QLIE Pal AIL2 NeXAS LunaSoft Unicorn Rejet Interlude AdobeAir Retouch Malie Live Nexton Lucifen Waffle TinkerBell SystemAoi Yuris Nitroplus2 Bruns EME RRE Candy Speed ApricoT Triangle AB2Try MBLMED GameMaker DxLib CodeX Minori Sprite RpgmXP Eagls Debonosu C4 WillPlus Tanuki GXP AOS Mink YukaSystem2 sakusesu Exp Syuntada Pensil Anim hibiki Nitroplus Reallive Siglus Taskforce2 RUGP IronGameSystem Anex86 ShinyDaysGame MarineHeart ShinaRio CaramelBox UnisonShift Escude Ryokucha Alice Footy2 utawarerumono System4x Abalone Abel 5pb HorkEye XUSE Leaf Nekopack AXL AGS AdobeFlash10 FocasLens Tamamo Ages3ResT) set(enginepath "engine32") set(collector "enginecollection32.cpp") endif() diff --git a/LunaHook/engine32/splushwave.cpp b/LunaHook/engine32/splushwave.cpp new file mode 100644 index 0000000..9427b12 --- /dev/null +++ b/LunaHook/engine32/splushwave.cpp @@ -0,0 +1,43 @@ +#include"splushwave.h" +bool splushwave_(const char* buf,int size){ + auto addr = MemDbg::findBytes(buf, size, processStartAddress, processStopAddress); + ConsoleOutput("%p",addr); + if(addr==0)return false; + addr=MemDbg::findPushAddress(addr,processStartAddress, processStopAddress); + ConsoleOutput("%p",addr); + if(addr==0)return false; + addr=MemDbg::findEnclosingAlignedFunction(addr); + ConsoleOutput("%p",addr); + if(addr==0)return false; + HookParam hp; + hp.address=addr; + hp.offset=get_reg(regs::eax); + hp.type=USING_STRING; + hp.filter_fun=[](void* data, size_t* len, HookParam* hp){ + /* +[VID_Z_RIZ_016]リーゼロッテ「知ってるわ。でも、これから徐々に――」 +提督「強くなれないのに強敵と戦うのか? それではいつか死ぬだけだ」 +#STM:リーゼロッテ_怒り[VID_Z_RIZ_017]リーゼロッテ「…………」 +提督「プリンセスクラスとは名ばかりで、今のままでは、君は使い物にならないと上層部は思っている」 +[VID_Z_RIZ_018]リーゼロッテ「評価なんて、覆せばいいだけよ」 +提督「その通りだ。上層部が考えを改めるほどに、俺が君を強くする」 + +#EVENT_FLAG_ON:E_OP_終了#BGM_FADEOUT#FADE_SET#FADEOUT_BK +#BGM:KM_強化#FADE_SET#MES_CLR#MES_OFF#CG_CLR#BG:調教部屋#FADE_IN +*/ + if(*len==0)return false; + if((*(char*)data)=='#')return false; + StringFilterBetween((char*)data,len,"[",1,"]",1); + return true; + }; + return NewHook(hp,"splushwave"); +} +bool splushwave::attach_function() { + //https://vndb.org/r113134 + //天色戦姫 体験版 https://gyutto.com/i/item128979?select_uaflag=1 + char aErrMesbufS[]="err:mesbuf %s\0"; + //ドラゴンアカデミー http://gyutto.com/i/item98617?select_uaflag=1 + //ドラゴンアカデミー3 http://gyutto.com/i/item208616?select_uaflag=1 + char aCidS[]="CID_%s\0"; + return splushwave_(aErrMesbufS,sizeof(aErrMesbufS)) | splushwave_(aCidS,sizeof(aCidS)); +} \ No newline at end of file diff --git a/LunaHook/engine32/splushwave.h b/LunaHook/engine32/splushwave.h new file mode 100644 index 0000000..3a52878 --- /dev/null +++ b/LunaHook/engine32/splushwave.h @@ -0,0 +1,12 @@ +#include"engine.h" + +class splushwave:public ENGINE{ + public: + splushwave(){ + + check_by=CHECK_BY::RESOURCE_STR; + check_by_target=L"splush wave"; + is_engine_certain=false; + }; + bool attach_function(); +}; \ No newline at end of file diff --git a/LunaHook/enginecollection32.cpp b/LunaHook/enginecollection32.cpp index 45630da..6781048 100644 --- a/LunaHook/enginecollection32.cpp +++ b/LunaHook/enginecollection32.cpp @@ -10,6 +10,7 @@ #include"engine32/sakanagl.h" #include"engine32/LCScript.h" #include"engine32/ONScripterru.h" +#include"engine32/splushwave.h" #include"engine32/GSX.h" #include"engine32/pchooks.h" #include"engine32/Sprite.h" @@ -312,7 +313,8 @@ std::vector check_engines(){ new GASTRO, new akatombo, new ransel, - new Silkyssakura + new Silkyssakura, + new splushwave }; }