mirror of
https://github.com/HIllya51/LunaTranslator.git
synced 2024-12-27 15:44:12 +08:00
.
This commit is contained in:
parent
64d31d01da
commit
f01c6ef543
@ -19,12 +19,8 @@ add_library(pchhook pchhook.cpp)
|
||||
target_precompile_headers(pchhook PUBLIC pchhook.h)
|
||||
|
||||
|
||||
add_library(hostmain main.cc)
|
||||
target_link_libraries(hostmain VERSION_DEF minhook)
|
||||
target_precompile_headers(hostmain REUSE_FROM pchhook)
|
||||
|
||||
|
||||
set(texthook_src
|
||||
main.cc
|
||||
texthook.cc
|
||||
hookfinder.cc
|
||||
${enginessrc}
|
||||
@ -55,4 +51,4 @@ target_precompile_headers(LunaHook REUSE_FROM pchhook)
|
||||
|
||||
set_target_properties(LunaHook PROPERTIES OUTPUT_NAME "LunaHook${bitappendix}")
|
||||
|
||||
target_link_libraries(LunaHook hostmain Version httpapi ws2_32 Shlwapi pch minhook commonengine utils ${YY_Thunks_for_WinXP})
|
||||
target_link_libraries(LunaHook VERSION_DEF Version httpapi ws2_32 Shlwapi pch minhook commonengine utils ${YY_Thunks_for_WinXP})
|
@ -1753,6 +1753,12 @@ namespace
|
||||
strReplace(s, "#", "");
|
||||
buffer->from(s);
|
||||
}
|
||||
void F0100509013040000(TextBuffer *buffer, HookParam *hp)
|
||||
{
|
||||
auto ws = StringToWideString(buffer->viewA(), 932).value();
|
||||
strReplace(ws, L"^", L"");
|
||||
buffer->from(WideStringToString(ws, 932));
|
||||
}
|
||||
void F01002BB00A662000(TextBuffer *buffer, HookParam *hp)
|
||||
{
|
||||
auto s = buffer->strA();
|
||||
@ -3346,7 +3352,9 @@ namespace
|
||||
{0x8007C1D4, {0, 0, 0, 0, F01002BB00A662000, "01002BB00A662000", "1.0.0"}}, // name+text 这个两作都能提到。实际上只留这一个也行,但它显示完才有,速度慢。
|
||||
// Hakkenden
|
||||
{0x819ade74, {CODEC_UTF16, 0, 0, ReadTextAndLenDW<1>, F01007A901E728000, "01007A901E728000", "1.0.1"}},
|
||||
|
||||
// 大正メビウスライン大全 三合一
|
||||
{0x800C43D4, {0, 0, 0, 0, F0100509013040000, "0100509013040000", "1.0.0"}}, // text
|
||||
{0x800C4468, {0, 0, 0, 0, F0100509013040000, "0100509013040000", "1.0.1"}}, // text
|
||||
};
|
||||
return 1;
|
||||
}();
|
||||
|
@ -199,6 +199,7 @@ namespace ppsspp
|
||||
StringCharReplacer(buffer, "%N", 2, ' ');
|
||||
StringFilter(buffer, "%K", 2);
|
||||
StringFilter(buffer, "%P", 2);
|
||||
StringFilter(buffer, "%O030", 5);
|
||||
}
|
||||
|
||||
void ULJM05810(hook_stack *stack, HookParam *hp, TextBuffer *buffer, uintptr_t *split)
|
||||
@ -223,12 +224,17 @@ namespace ppsspp
|
||||
void T(TextBuffer *buffer, HookParam *)
|
||||
{
|
||||
current = buffer->strA();
|
||||
StringCharReplacer(buffer, "\\n", 2, '\n');
|
||||
}
|
||||
void N(TextBuffer *buffer, HookParam *)
|
||||
{
|
||||
auto current1 = buffer->strA();
|
||||
if (current == current1)
|
||||
buffer->clear();
|
||||
else
|
||||
{
|
||||
StringCharReplacer(buffer, "\\n", 2, '\n');
|
||||
}
|
||||
}
|
||||
}
|
||||
void FNPJH50243(TextBuffer *buffer, HookParam *)
|
||||
@ -348,6 +354,20 @@ namespace ppsspp
|
||||
return;
|
||||
buffer->from(addr + 0x20, *(DWORD *)(addr + 0x14) * 2);
|
||||
}
|
||||
void ULJM05433(TextBuffer *buffer, HookParam *hp)
|
||||
{
|
||||
auto s = buffer->strA();
|
||||
static std::string last;
|
||||
if (startWith(s, last))
|
||||
{
|
||||
auto _ = s.substr(last.size(), s.size() - last.size());
|
||||
last = s;
|
||||
s = _;
|
||||
}
|
||||
else
|
||||
last = s;
|
||||
buffer->from(s);
|
||||
}
|
||||
std::unordered_map<uintptr_t, emfuncinfo> emfunctionhooks = {
|
||||
// Shinigami to Shoujo
|
||||
{0x883bf34, {0, 1, 0, 0, ULJS00403_filter, "ULJS00403"}},
|
||||
@ -433,6 +453,8 @@ namespace ppsspp
|
||||
{0x8822F24, {0, 0xe, 0, 0, 0, "ULJS00316"}}, // text
|
||||
// 明治東亰恋伽 トワヰライト・キス
|
||||
{0x884DE44, {0, 0, 0, 0, NPJH50900, "NPJH50900"}}, // text
|
||||
// Never7 -the end of infinity-
|
||||
{0x88196F0, {0, 0xe, 0, 0, ULJM05433, "ULJM05433"}},
|
||||
};
|
||||
|
||||
}
|
@ -1,14 +1,10 @@
|
||||
|
||||
set(VERSION_MAJOR 6)
|
||||
set(VERSION_MINOR 5)
|
||||
set(VERSION_PATCH 6)
|
||||
set(VERSION_PATCH 7)
|
||||
set(VERSION_REVISION 0)
|
||||
set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}")
|
||||
add_library(VERSION_DEF INTERFACE)
|
||||
target_compile_definitions(VERSION_DEF INTERFACE
|
||||
VERSION_MAJOR=${VERSION_MAJOR}
|
||||
VERSION_MINOR=${VERSION_MINOR}
|
||||
VERSION_PATCH=${VERSION_PATCH}
|
||||
VERSION_REVISION=${VERSION_REVISION}
|
||||
target_compile_definitions(VERSION_DEF INTERFACE
|
||||
LUNA_VERSION=${LUNA_VERSION})
|
||||
include(${CMAKE_CURRENT_LIST_DIR}/version/generate_product_version.cmake)
|
@ -191,8 +191,8 @@ def _13_fEX(line: str):
|
||||
|
||||
|
||||
def _1_f(line):
|
||||
line = re.sub(r"\{(\w+)\}(.*?)\{\/\1\}", r"\2", line)
|
||||
line = re.sub(r"\{(.*?)[:/](.*?)\}", r"\1", line)
|
||||
line = re.sub(r"\{(\w+)(.*?)\}(.*?)\{\/\1\}", r"\3", line)
|
||||
line = re.sub(r"\{([^}]?)[:/](.*?)\}", r"\1", line)
|
||||
return line
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user