mirror of
https://github.com/HIllya51/LunaHook.git
synced 2024-11-24 06:15:35 +08:00
Update yuzusuyu.cpp
Update yuzusuyu.cpp Update yuzusuyu.cpp Update yuzusuyu.cpp Update yuzusuyu.cpp Update yuzusuyu.cpp Update yuzusuyu.cpp Update yuzusuyu.cpp Update yuzusuyu.cpp Update yuzusuyu.cpp
This commit is contained in:
parent
ddf2c53118
commit
42c4cdb50b
@ -89,11 +89,11 @@ bool checkiscurrentgame(const emfuncinfo& em){
|
|||||||
for(auto&& info:wininfos){
|
for(auto&& info:wininfos){
|
||||||
if((game_info.version.size())&&(info.title.find(acastw(game_info.version))!=info.title.npos)&&(game_info.id!=0)){
|
if((game_info.version.size())&&(info.title.find(acastw(game_info.version))!=info.title.npos)&&(game_info.id!=0)){
|
||||||
//判断是有效的info
|
//判断是有效的info
|
||||||
auto checkversion=(std::string(em._version)==(game_info.version));
|
auto checkversion=(em._version==0)||(std::string(em._version)==(game_info.version));
|
||||||
auto checkid=(std::stoll(em._id,0,16)==game_info.id);
|
auto checkid=(std::stoll(em._id,0,16)==game_info.id);
|
||||||
if(checkid&&checkversion)return true;
|
if(checkid&&checkversion)return true;
|
||||||
}
|
}
|
||||||
else if(info.title.find(acastw(em._version))!=info.title.npos)return true;
|
else if((em._version==0)||(info.title.find(acastw(em._version))!=info.title.npos))return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -443,6 +443,13 @@ bool F010001D015260000(void* data, size_t* len, HookParam* hp){
|
|||||||
strReplace(s,"#n","\n");
|
strReplace(s,"#n","\n");
|
||||||
return write_string_overwrite(data,len,s);
|
return write_string_overwrite(data,len,s);
|
||||||
}
|
}
|
||||||
|
bool F0100E1E00E2AE000(void* data, size_t* len, HookParam* hp){
|
||||||
|
auto s=std::string((char*)data,*len);
|
||||||
|
s = std::regex_replace(s, std::regex("#n"), "\n");
|
||||||
|
s = std::regex_replace(s, std::regex("[A-Za-z0-9]"), "");
|
||||||
|
s = std::regex_replace(s, std::regex("[~^,\\-\\[\\]#]"), "");
|
||||||
|
return write_string_overwrite(data,len,s);
|
||||||
|
}
|
||||||
bool F0100DE200C0DA000(void* data, size_t* len, HookParam* hp){
|
bool F0100DE200C0DA000(void* data, size_t* len, HookParam* hp){
|
||||||
StringReplacer((char*)data,len,"#n",2," ",1);
|
StringReplacer((char*)data,len,"#n",2," ",1);
|
||||||
StringReplacer((char*)data,len,"\n",1," ",1);
|
StringReplacer((char*)data,len,"\n",1," ",1);
|
||||||
@ -568,6 +575,110 @@ void T01005940182EC000(hook_stack* stack, HookParam* hp, uintptr_t* data, uintpt
|
|||||||
*data=address+0x14;
|
*data=address+0x14;
|
||||||
*len=wcslen((wchar_t*)*data)*2;
|
*len=wcslen((wchar_t*)*data)*2;
|
||||||
}
|
}
|
||||||
|
template<int idx>
|
||||||
|
bool F0100B0601852A000(void* data, size_t* len, HookParam* hp){
|
||||||
|
auto s = std::wstring((wchar_t*)data,*len/2);
|
||||||
|
static std::wstring last;
|
||||||
|
if(last==s)return false;
|
||||||
|
last=s;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
template<int idx>
|
||||||
|
bool F0100B0C016164000(void* data, size_t* len, HookParam* hp){
|
||||||
|
auto s = std::wstring((wchar_t*)data,*len/2);
|
||||||
|
std::wregex htmlTagsPattern(L"<[^>]*>");
|
||||||
|
std::wregex lettersAndNumbersPattern(L"[A-Za-z0-9]");
|
||||||
|
s = std::regex_replace(s, htmlTagsPattern, L"");
|
||||||
|
s = std::regex_replace(s, lettersAndNumbersPattern, L"");
|
||||||
|
static std::wstring last;
|
||||||
|
if(last==s)return false;
|
||||||
|
last=s;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool F0100B5500CA0C000(void* data, size_t* len, HookParam* hp){
|
||||||
|
auto s = std::string((char*)data,*len);
|
||||||
|
std::regex pattern1("\\\\u0000+$");
|
||||||
|
std::regex pattern2("\\\\");
|
||||||
|
std::regex pattern3("\\$");
|
||||||
|
s = std::regex_replace(s, pattern1, "");
|
||||||
|
s = std::regex_replace(s, pattern2, "");
|
||||||
|
s = std::regex_replace(s, pattern3, "");
|
||||||
|
return write_string_overwrite(data,len,s);
|
||||||
|
}
|
||||||
|
void T0100B5500CA0C000(hook_stack* stack, HookParam* hp, uintptr_t* data, uintptr_t* split, size_t* len){
|
||||||
|
auto address=YUZU::emu_arg(stack)[3];
|
||||||
|
*data=address;
|
||||||
|
*len=*(WORD*)(address-2);
|
||||||
|
}
|
||||||
|
bool F0100A8401A0A8000(void* data, size_t* len, HookParam* hp){
|
||||||
|
auto s = std::wstring((wchar_t*)data,*len/2);
|
||||||
|
std::wregex samePageNewLineRegex(L"[\r\n]+");
|
||||||
|
s = std::regex_replace(s, samePageNewLineRegex, L"");
|
||||||
|
std::wregex newPageTextRegex(L"(<.+?>)+");
|
||||||
|
s = std::regex_replace(s, newPageTextRegex, L"\r\n");
|
||||||
|
strReplace(s,L"",L"(L)");
|
||||||
|
strReplace(s,L"",L"(ZL)");
|
||||||
|
strReplace(s,L"",L"(Y)");
|
||||||
|
strReplace(s,L"",L"(X)");
|
||||||
|
strReplace(s,L"",L"(A)");
|
||||||
|
strReplace(s,L"",L"(B)");
|
||||||
|
strReplace(s,L"",L"(+)");
|
||||||
|
strReplace(s,L"",L"(-)");
|
||||||
|
strReplace(s,L"",L"(DPAD_DOWN)");
|
||||||
|
strReplace(s,L"",L"(DPAD_LEFT)");
|
||||||
|
strReplace(s,L"",L"(LSTICK)");
|
||||||
|
strReplace(s,L"",L"(L3)");
|
||||||
|
return write_string_overwrite(data,len,s);
|
||||||
|
}
|
||||||
|
bool F0100BC0018138000(void* data, size_t* len, HookParam* hp){
|
||||||
|
auto s = std::wstring((wchar_t*)data,*len/2);
|
||||||
|
std::wregex tagContentRegex(L"<[^>]*>([^<]*)<\\/[^>]*>");
|
||||||
|
s = std::regex_replace(s, tagContentRegex, L"");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"<sprite name=L>"), L"L");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"<sprite name=R>"), L"R");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"<sprite name=A>"), L"A");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"<sprite name=B>"), L"B");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"<sprite name=X>"), L"X");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"<sprite name=Y>"), L"Y");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"<sprite name=PLUS>"), L"+");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"<sprite name=MINUS>"), L"-");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"<[^>]+>"), L"");
|
||||||
|
return write_string_overwrite(data,len,s);
|
||||||
|
}
|
||||||
|
bool F0100D7800E9E0000(void* data, size_t* len, HookParam* hp){
|
||||||
|
auto s = std::wstring((wchar_t*)data,*len/2);
|
||||||
|
s = std::regex_replace(s, std::wregex(L"[A-Za-z0-9]"), L"");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"<[^>]*>"), L"");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"^二十五字二.*(\r?\n|\r)?"), L"");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"^操作を割り当てる.*(\r?\n|\r)?"), L"");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"^上記アイコンが出.*(\r?\n|\r)?"), L"");
|
||||||
|
s = std::regex_replace(s, std::wregex(L"[()~^,ö.!]"), L"");
|
||||||
|
static std::wstring last;
|
||||||
|
if(last==s)return false;
|
||||||
|
last=s;
|
||||||
|
return write_string_overwrite(data,len,s);
|
||||||
|
}
|
||||||
|
|
||||||
|
void T0100DB300B996000(hook_stack* stack, HookParam* hp, uintptr_t* data, uintptr_t* split, size_t* len){
|
||||||
|
auto address=YUZU::emu_arg(stack)[8]+1;
|
||||||
|
std::string s;
|
||||||
|
int i=0;
|
||||||
|
while(1){
|
||||||
|
auto c=*(BYTE*)(address+i);
|
||||||
|
if(c==0)break;
|
||||||
|
if(c<0x20&&c>0x10){
|
||||||
|
auto sz=*(BYTE*)(address+i+2);
|
||||||
|
i+=3+sz;
|
||||||
|
}
|
||||||
|
else{
|
||||||
|
auto l=1+IsDBCSLeadByteEx(932,c);
|
||||||
|
s+=std::string((char*)(address+i),l);
|
||||||
|
i+=l;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
write_string_new(data,len,s);
|
||||||
|
}
|
||||||
|
|
||||||
namespace{
|
namespace{
|
||||||
auto _=[](){
|
auto _=[](){
|
||||||
@ -703,6 +814,8 @@ auto _=[](){
|
|||||||
{0x8003E874,{CODEC_UTF8,0,0,0,F0100068019996000,"0100068019996000","1.0.0"}},//English
|
{0x8003E874,{CODEC_UTF8,0,0,0,F0100068019996000,"0100068019996000","1.0.0"}},//English
|
||||||
//薄桜鬼 真改 万葉ノ抄
|
//薄桜鬼 真改 万葉ノ抄
|
||||||
{0x8004E8F0,{CODEC_UTF8,1,0,0,F010001D015260000,"0100EA601A0A0000","1.0.0"}},
|
{0x8004E8F0,{CODEC_UTF8,1,0,0,F010001D015260000,"0100EA601A0A0000","1.0.0"}},
|
||||||
|
//Hakuouki Shinkai: Tsukikage no Shou / 薄桜鬼 真改 月影ノ抄
|
||||||
|
{0x8019ecd0,{CODEC_UTF8,1,0,0,F0100E1E00E2AE000,"0100E1E00E2AE000","1.0.0"}},//Text
|
||||||
//Chrono Cross: The Radical Dreamers Edition
|
//Chrono Cross: The Radical Dreamers Edition
|
||||||
{0x802b1254,{CODEC_UTF32,1,0,0,0,"0100AC20128AC000","1.0.2"}},//Text
|
{0x802b1254,{CODEC_UTF32,1,0,0,0,"0100AC20128AC000","1.0.2"}},//Text
|
||||||
//AIR
|
//AIR
|
||||||
@ -745,6 +858,72 @@ auto _=[](){
|
|||||||
{0x8004a8d0,{CODEC_UTF8,1,0,0,F0100DE200C0DA000,"0100DE200C0DA000","1.0.0"}},// choice
|
{0x8004a8d0,{CODEC_UTF8,1,0,0,F0100DE200C0DA000,"0100DE200C0DA000","1.0.0"}},// choice
|
||||||
//サマータイムレンダ Another Horizon
|
//サマータイムレンダ Another Horizon
|
||||||
{0x818ebaf0,{CODEC_UTF16,0,0,T01005940182EC000,F01005940182EC000,"01005940182EC000","1.0.0"}},//dialogue
|
{0x818ebaf0,{CODEC_UTF16,0,0,T01005940182EC000,F01005940182EC000,"01005940182EC000","1.0.0"}},//dialogue
|
||||||
|
//Aquarium
|
||||||
|
{0x8051a990,{CODEC_UTF8,0,1,0,F01006590155AC000,"0100D11018A7E000","1.0.0"}},//name
|
||||||
|
{0x8051a9a8,{CODEC_UTF8,0,0,0,F01006590155AC000,"0100D11018A7E000","1.0.0"}},//dialogue
|
||||||
|
{0x80500178,{CODEC_UTF8,0,0,0,F01006590155AC000,"0100D11018A7E000","1.0.0"}},//choice
|
||||||
|
//AKA
|
||||||
|
{0x8166eb80,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100B0601852A000<0>,"0100B0601852A000","1.0.0"}},//Main text
|
||||||
|
{0x817d44a4,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100B0601852A000<1>,"0100B0601852A000","1.0.0"}},//Letter
|
||||||
|
{0x815cb0f4,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100B0601852A000<2>,"0100B0601852A000","1.0.0"}},//Mission title
|
||||||
|
{0x815cde30,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100B0601852A000<3>,"0100B0601852A000","1.0.0"}},//Mission description
|
||||||
|
{0x8162a910,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100B0601852A000<4>,"0100B0601852A000","1.0.0"}},//Craft description
|
||||||
|
{0x817fdca8,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100B0601852A000<5>,"0100B0601852A000","1.0.0"}},//Inventory item name
|
||||||
|
//Etrian Odyssey II HD
|
||||||
|
{0x82f24c70,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100B0C016164000<0>,"0100B0C016164000","1.0.2"}},//Text
|
||||||
|
{0x82cc0988,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100B0C016164000<1>,"0100B0C016164000","1.0.2"}},//Config Description
|
||||||
|
{0x8249acd4,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100B0C016164000<2>,"0100B0C016164000","1.0.2"}},//Class Description
|
||||||
|
{0x81b27644,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100B0C016164000<3>,"0100B0C016164000","1.0.2"}},//Item Description
|
||||||
|
//Fire Emblem Engage
|
||||||
|
{0x8248c550,{CODEC_UTF16,0,0,ReadTextAndLen<2>,0,"0100A6301214E000","1.3.0"}},// App.Talk3D.TalkLog$$AddLog
|
||||||
|
{0x820C6530,{CODEC_UTF16,0,0,ReadTextAndLen<2>,0,"0100A6301214E000","2.0.0"}},// App.Talk3D.TalkLog$$AddLog
|
||||||
|
//AMNESIA LATER×CROWD for Nintendo Switch
|
||||||
|
{0x800ebc34,{CODEC_UTF16,0,0,ReadTextAndLen<1>,F0100982015606000,"0100B5700CDFC000","1.0.0"}},// waterfall
|
||||||
|
{0x8014dc64,{CODEC_UTF16,0,0,ReadTextAndLen<1>,F0100982015606000,"0100B5700CDFC000","1.0.0"}},// name
|
||||||
|
{0x80149b10,{CODEC_UTF16,0,0,ReadTextAndLen<1>,F0100982015606000,"0100B5700CDFC000","1.0.0"}},// dialogue
|
||||||
|
{0x803add50,{CODEC_UTF16,0,0,ReadTextAndLen<1>,F0100982015606000,"0100B5700CDFC000","1.0.0"}},// choice
|
||||||
|
//Hanayaka Nari, Waga Ichizoku Gentou Nostalgie
|
||||||
|
{0x27ca10+0x80004000,{CODEC_UTF8,0,0,T0100B5500CA0C000,F0100B5500CA0C000,"0100B5500CA0C000","1.0.0"}},// x3 (double trigged), name+text, onscreen
|
||||||
|
//Natsumon! 20th Century Summer Vacation
|
||||||
|
{0x80db5d34,{CODEC_UTF16,0,0,0,F0100A8401A0A8000,"0100A8401A0A8000","1.1.0"}},// tutorial
|
||||||
|
{0x846fa578,{CODEC_UTF16,0,0,0,F0100A8401A0A8000,"0100A8401A0A8000","1.1.0"}},// choice
|
||||||
|
{0x8441e800,{CODEC_UTF16,0,0,0,F0100A8401A0A8000,"0100A8401A0A8000","1.1.0"}},// examine + dialog
|
||||||
|
//Super Mario RPG
|
||||||
|
{0x81d78c58,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Main Text
|
||||||
|
{0x81dc9cf8,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Name
|
||||||
|
{0x81c16b80,{CODEC_UTF16,0,0,ReadTextAndLen<1>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Cutscene
|
||||||
|
{0x821281f0,{CODEC_UTF16,0,0,ReadTextAndLen<1>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Special/Item/Menu/Objective Description
|
||||||
|
{0x81cd8148,{CODEC_UTF16,0,0,ReadTextAndLen<1>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Special Name
|
||||||
|
{0x81fc2820,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Item Name Battle
|
||||||
|
{0x81d08d28,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Item Name Off-battle
|
||||||
|
{0x82151aac,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Shop Item Name
|
||||||
|
{0x81fcc870,{CODEC_UTF16,0,0,ReadTextAndLen<1>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Objective Title
|
||||||
|
{0x821bd328,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Monster List - Name
|
||||||
|
{0x820919b8,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Monster List - Description
|
||||||
|
{0x81f56518,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Info
|
||||||
|
{0x82134ce0,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Help Category
|
||||||
|
{0x82134f30,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Help Name
|
||||||
|
{0x821372e4,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Help Description 1
|
||||||
|
{0x82137344,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Help Description 2
|
||||||
|
{0x81d0ee80,{CODEC_UTF16,0,0,ReadTextAndLen<2>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Location
|
||||||
|
{0x82128f64,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Album Title
|
||||||
|
{0x81f572a0,{CODEC_UTF16,0,0,ReadTextAndLen<3>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Load/Save Text
|
||||||
|
{0x81d040a8,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Levelup First Part
|
||||||
|
{0x81d043fc,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Levelup Second Part
|
||||||
|
{0x81d04550,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Levelup New Ability Description
|
||||||
|
{0x81fbfa18,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Yoshi Mini-Game Header
|
||||||
|
{0x81fbfa74,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Yoshi Mini-Game Text
|
||||||
|
{0x81cf41b4,{CODEC_UTF16,0,0,ReadTextAndLen<0>,F0100BC0018138000,"0100BC0018138000","1.0.0"}},// Enemy Special Attacks
|
||||||
|
//Trials of Mana
|
||||||
|
{0x800e8abc,{CODEC_UTF16,1,0,0,F0100D7800E9E0000,"0100D7800E9E0000","1.1.1"}},// Text
|
||||||
|
//Utsusemi no Meguri
|
||||||
|
{0x821b452c,{CODEC_UTF16,0,0,ReadTextAndLen<0>,0,"0100DA101D9AA000","1.0.0"}},// text1
|
||||||
|
{0x821b456c,{CODEC_UTF16,0,0,ReadTextAndLen<0>,0,"0100DA101D9AA000","1.0.0"}},// text2
|
||||||
|
{0x821b45ac,{CODEC_UTF16,0,0,ReadTextAndLen<0>,0,"0100DA101D9AA000","1.0.0"}},// text3
|
||||||
|
//Buddy Mission BOND
|
||||||
|
{0x80046dd0,{0,0,0,T0100DB300B996000,0,"0100DB300B996000",0}},//1.0.0, 1.0.1
|
||||||
|
{0x80046de0,{0,0,0,T0100DB300B996000,0,"0100DB300B996000",0}},
|
||||||
|
|
||||||
};
|
};
|
||||||
return 1;
|
return 1;
|
||||||
}();
|
}();
|
||||||
|
Loading…
Reference in New Issue
Block a user