Update specialgames.hpp

Update specialgames.hpp
This commit is contained in:
恍兮惚兮 2024-04-01 19:15:48 +08:00
parent 505de799dd
commit 4681ccdd2a
4 changed files with 16 additions and 8 deletions

View File

@ -172,7 +172,7 @@ bool InsertPPSSPPHLEHooks()
}
return succ;
}
#if 0
bool PPSSPPinithooksearch(){
bool found = false;
SYSTEM_INFO systemInfo;
@ -218,7 +218,7 @@ bool PPSSPPinithooksearch(){
}
return found;
}
#endif
uintptr_t getDoJitAddress() {
#ifndef _WIN64
auto string1="Jump target too far away, needs indirect register";
@ -345,7 +345,6 @@ bool InsertPPSSPPcommonhooks()
{
auto succ=InsertPPSSPPHLEHooks();
succ|=PPSSPPinithooksearch();
succ|=ppsspp::hookPPSSPPDoJit();
return succ;
}

View File

@ -187,6 +187,18 @@ bool ULJM05943F(void* data, size_t* len, HookParam* hp){
return write_string_overwrite(data,len,result2);
}
bool FULJM05603(LPVOID data, size_t* size, HookParam*)
{
auto text = reinterpret_cast<LPSTR>(data);
auto len = reinterpret_cast<size_t*>(size);
StringCharReplacer(text, len, "%N", 2, ' ');
StringFilter(text, len, "%K", 2);
StringFilter(text, len, "%P", 2);
return true;
}
bool NPJH50619F(void* data, size_t* len, HookParam* hp){
auto s = std::string((char*)data,*len);
std::regex pattern1("[\\r\\n]+");
@ -263,6 +275,8 @@ namespace ppsspp{
{0x88eeba4,{"Gekka Ryouran Romance",0,0,0,0,ULJM05943F,L"ULJM05943"}},// a0 - monologue text
{0x8875e0c,{"Gekka Ryouran Romance",0,1,6,0,ULJM05943F,L"ULJM05943"}},// a1 - dialogue text
{0x886F014,{"My Merry May with be",0,3,0,0,FULJM05603,L"ULJM05603"}},
};
}

View File

@ -268,7 +268,6 @@ void SearchForHooks_Return(){
hp.type = CODEC_UTF16 | USING_STRING|BREAK_POINT;
hp.argidx=records[i].argidx;
}
if (sp.hookPostProcessor) sp.hookPostProcessor(hp); //actuall useless because of jit
NotifyHookFound(hp, (wchar_t*)records[i].text);
if (++results % 100'000 == 0) ConsoleOutput(ResultsNum, results);
}

View File

@ -141,10 +141,6 @@ struct SearchParam
wchar_t boundaryModule[MAX_MODULE_SIZE] = {}; // hook all functions within this module (middle priority)
wchar_t exportModule[MAX_MODULE_SIZE] = {}; // hook the exports of this module (highest priority)
wchar_t text[PATTERN_SIZE] = {}; // text to search for
#ifndef _WIN64
uint32_t __useless;
#endif
void(*hookPostProcessor)(HookParam&) = nullptr;
};
struct InsertHookCmd // From host