mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2025-01-13 23:53:54 +08:00
.
This commit is contained in:
parent
4143f713cf
commit
bd39c925e7
@ -4,7 +4,7 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
|
||||
set(enginepath "engine64")
|
||||
set(collector "enginecollection64.cpp")
|
||||
else()
|
||||
set(enginessrc AbogadoPowers DAC BunBun antique T2U Moonstone Aromarie Winters Cage AGE_System AksysGames RPGMaker Stronger TACTICS Onscripter Sceplay DISCOVERY Erogos godot A98SYS GuruGuruSMF4 TeethingRing Fizz CoffeeMaker VALKYRIA mirage CisLugI tamasoft FrontWing solfasys Diskdream 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 UnknownEngine TSSystem Xbangbang Anisetta Nijyuei Interheart LovaGame Giga Jisatu101 EntisGLS Ciel ACTGS TerraLunar jukujojidai VanillawareGC cef V8 mono PONScripter Bishop sakanagl 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 AIL 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 e_Erekiteru AbogadoPowers DAC BunBun antique T2U Moonstone Aromarie Winters Cage AGE_System AksysGames RPGMaker Stronger TACTICS Onscripter Sceplay DISCOVERY Erogos godot A98SYS GuruGuruSMF4 TeethingRing Fizz CoffeeMaker VALKYRIA mirage CisLugI tamasoft FrontWing solfasys Diskdream 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 UnknownEngine TSSystem Xbangbang Anisetta Nijyuei Interheart LovaGame Giga Jisatu101 EntisGLS Ciel ACTGS TerraLunar jukujojidai VanillawareGC cef V8 mono PONScripter Bishop sakanagl 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 AIL 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()
|
||||
|
58
cpp/LunaHook/LunaHook/engine32/e_Erekiteru.cpp
Normal file
58
cpp/LunaHook/LunaHook/engine32/e_Erekiteru.cpp
Normal file
@ -0,0 +1,58 @@
|
||||
#include "e_Erekiteru.h"
|
||||
|
||||
bool e_Erekiteru::attach_function()
|
||||
{
|
||||
// https://vndb.org/v15578
|
||||
// 水素~1/2の奇蹟~
|
||||
const uint8_t bytes[] = {
|
||||
0x3C, 0x20,
|
||||
0x72, 0x04,
|
||||
0x3C, 0x7E,
|
||||
0x76, 0x15,
|
||||
0x3C, 0xA1,
|
||||
0x72, 0x04,
|
||||
0x3C, 0xDF,
|
||||
0x76, 0x0D};
|
||||
ULONG addr = MemDbg::findBytes(bytes, sizeof(bytes), processStartAddress, processStopAddress);
|
||||
if (!addr)
|
||||
return false;
|
||||
addr = MemDbg::findEnclosingAlignedFunction(addr);
|
||||
if (!addr)
|
||||
return false;
|
||||
BYTE bs[] = {0x8B, 0x85, XX4};
|
||||
BYTE bs2[] = {0x8A, 0x44, 0x29, XX};
|
||||
auto addr1 = MemDbg::findBytes(bs, sizeof(bs), addr, addr + 0x100);
|
||||
if (!addr1)
|
||||
return false;
|
||||
auto addr2 = MemDbg::findBytes(bs2, sizeof(bs2), addr, addr + 0x100);
|
||||
if (!addr2)
|
||||
return false;
|
||||
auto lengthoffset = *(int *)(addr1 + 2);
|
||||
auto stroffset = *(BYTE *)(addr2 + 3);
|
||||
HookParam hp;
|
||||
hp.address = addr;
|
||||
hp.user_value = (DWORD) new std::pair<int, int>{lengthoffset, stroffset};
|
||||
hp.text_fun = [](hook_context *context, HookParam *hp, TextBuffer *buffer, uintptr_t *split)
|
||||
{
|
||||
auto _ = reinterpret_cast<std::pair<int, int> *>(hp->user_value);
|
||||
auto lengthoffset = _->first;
|
||||
auto stroffset = _->second;
|
||||
static int lastlength = 0;
|
||||
static int lastslen = 0;
|
||||
auto thislength = *(DWORD *)(context->ecx + lengthoffset);
|
||||
auto slen = strlen((char *)context->ecx + stroffset);
|
||||
if ((lastslen != 0) && (lastslen != slen) && (thislength == slen))
|
||||
return;
|
||||
lastslen = slen;
|
||||
if (lastlength == thislength)
|
||||
return;
|
||||
if (lastlength > thislength)
|
||||
lastlength = 0;
|
||||
buffer->from((char *)context->ecx + stroffset + lastlength,
|
||||
thislength - lastlength);
|
||||
lastlength = thislength;
|
||||
};
|
||||
hp.filter_fun = NewLineCharToSpaceFilterA;
|
||||
hp.type = USING_STRING;
|
||||
return NewHook(hp, "e_Erekiteru");
|
||||
}
|
14
cpp/LunaHook/LunaHook/engine32/e_Erekiteru.h
Normal file
14
cpp/LunaHook/LunaHook/engine32/e_Erekiteru.h
Normal file
@ -0,0 +1,14 @@
|
||||
|
||||
|
||||
class e_Erekiteru : public ENGINE
|
||||
{
|
||||
public:
|
||||
e_Erekiteru()
|
||||
{
|
||||
// https://vndb.org/v15578
|
||||
// 水素~1/2の奇蹟~
|
||||
check_by = CHECK_BY::FILE_ALL;
|
||||
check_by_target = check_by_list{L"hmc.dll", L"*.pkk"};
|
||||
};
|
||||
bool attach_function();
|
||||
};
|
@ -183,6 +183,7 @@
|
||||
#include "engine32/A98SYS.h"
|
||||
#include "engine32/DAC.h"
|
||||
#include "engine32/ACTGS.h"
|
||||
#include "engine32/e_Erekiteru.h"
|
||||
#include "engine32/GuruGuruSMF4.h"
|
||||
#include "NoEngine.h"
|
||||
#include "engines/lua/lua51.h"
|
||||
@ -424,5 +425,6 @@ std::vector<ENGINE *> check_engines()
|
||||
new antique,
|
||||
new BunBun,
|
||||
new DAC,
|
||||
new AbogadoPowers};
|
||||
new AbogadoPowers,
|
||||
new e_Erekiteru};
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user