This commit is contained in:
恍兮惚兮 2024-05-18 00:12:49 +08:00
parent 7c7fbd45c7
commit 101af2d063
4 changed files with 69 additions and 2 deletions

View File

@ -4,7 +4,7 @@ if(${CMAKE_SIZEOF_VOID_P} EQUAL 8)
set(enginepath "engine64")
set(collector "enginecollection64.cpp")
else()
set(enginessrc 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 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 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 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()

View File

@ -0,0 +1,50 @@
#include"VALKYRIA.h"
bool VALKYRIA::attach_function() {
auto addr=findiatcallormov((DWORD)GetTextExtentPoint32A,processStartAddress,processStartAddress, processStopAddress);
ConsoleOutput("%p",addr);
if(addr==0)return false;
BYTE sehstart[]={
0x6a,0xff,
0x68,XX4,
0x64,0xa1,0,0,0,0,
0x50,
0x81,0xec,XX4,
0xa1,XX4
};
addr=reverseFindBytes(sehstart,sizeof(sehstart),addr-0x400,addr,0,true);
if(addr==0)return false;
HookParam hp;
hp.address=addr;
hp.type=USING_STRING;
hp.offset=get_stack(5);
hp.filter_fun=[](void* data, size_t* len, HookParam* hp){
//实际上是单字符
auto str=std::string((char*)data,*len);
if(str=="\\r"||str=="\\R")
write_string_overwrite(data,len,"\n");
return true;
// switch ( v12 )
// {
// case 'U':
// case 'u':
// String[0] = strtol(a6 + 2, 0, 16);
// String[1] = 0;
// HIBYTE(v92) = v14;
// LOWORD(v92) = a4;
// BYTE2(v92) = BYTE2(a4);
// return sub_454C40(a2, a3, v92, a5, String, (int)lprcDst, a8);
// case 'R':
// case 'r':
// sub_453E20();
// return 0;
// case '\\':
// wcscpy(String, L"\\");
// HIBYTE(v91) = HIBYTE(this);
// LOWORD(v91) = a4;
// BYTE2(v91) = BYTE2(a4);
// return sub_454C40(a2, a3, v91, a5, String, (int)a7, a8);
// }
};
return NewHook(hp,"VALKYRIA");
}

View File

@ -0,0 +1,15 @@
class VALKYRIA:public ENGINE{
public:
VALKYRIA(){
check_by=CHECK_BY::CUSTOM;
is_engine_certain=true;
check_by_target=[](){
return Util::SearchResourceString(L"Copyright(C)VALKYRIA") && Util::CheckFile(L"data0*-00.dat");
};
}
bool attach_function();
};

View File

@ -14,6 +14,7 @@
#include"engine32/FrontWing.h"
#include"engine32/GSX.h"
#include"engine32/pchooks.h"
#include"engine32/VALKYRIA.h"
#include"engine32/mirage.h"
#include"engine32/Sprite.h"
#include"engine32/PONScripter.h"
@ -326,7 +327,8 @@ std::vector<ENGINE*> check_engines(){
new FrontWing,
new tamasoft,
new CisLugI,
new mirage
new mirage,
new VALKYRIA
};
}