From c0f318aa1641830ab362fdd528e859a7c58acf3e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=81=8D=E5=85=AE=E6=83=9A=E5=85=AE?= <1173718158@qq.com> Date: Sat, 23 Nov 2024 22:44:47 +0800 Subject: [PATCH] . --- cpp/LunaHook/LunaHook/engine64/yuzu.cpp | 7 +++++++ cpp/LunaHook/LunaHook/main.cc | 7 ++++--- cpp/version.cmake | 4 ++-- py/LunaTranslator/gui/selecthook.py | 1 - py/LunaTranslator/myutils/utils.py | 3 ++- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/cpp/LunaHook/LunaHook/engine64/yuzu.cpp b/cpp/LunaHook/LunaHook/engine64/yuzu.cpp index df46c823..913303bd 100644 --- a/cpp/LunaHook/LunaHook/engine64/yuzu.cpp +++ b/cpp/LunaHook/LunaHook/engine64/yuzu.cpp @@ -678,6 +678,10 @@ namespace strReplace(s, "#n", "\n"); buffer->from(s); } + void F010035001D1B2000(TextBuffer *buffer, HookParam *hp) + { + StringFilter(buffer, "#n", 2); + } void F0100E1E00E2AE000(TextBuffer *buffer, HookParam *hp) { auto s = buffer->strA(); @@ -3355,6 +3359,9 @@ namespace // 大正メビウスライン大全 三合一 {0x800C43D4, {0, 0, 0, 0, F0100509013040000, "0100509013040000", "1.0.0"}}, // text {0x800C4468, {0, 0, 0, 0, F0100509013040000, "0100509013040000", "1.0.1"}}, // text + // 猛獣たちとお姫様 for Nintendo Switch 二合一 + {0x80115C70, {CODEC_UTF8, 0, 0, 0, F010035001D1B2000, "010035001D1B2000", "1.0.0"}}, // text + {0x80115F20, {CODEC_UTF8, 0, 0, 0, F010035001D1B2000, "010035001D1B2000", "1.0.1"}}, // text }; return 1; }(); diff --git a/cpp/LunaHook/LunaHook/main.cc b/cpp/LunaHook/LunaHook/main.cc index b636ff88..7265ff2e 100644 --- a/cpp/LunaHook/LunaHook/main.cc +++ b/cpp/LunaHook/LunaHook/main.cc @@ -262,10 +262,11 @@ void delayinsertadd(HookParam hp, std::string name) } void delayinsertNewHook(uint64_t em_address) { - if (delayinserthook->find(em_address) == delayinserthook->end()) + auto &&_delayinserthook = delayinserthook.Acquire(); + if (_delayinserthook->find(em_address) == _delayinserthook->end()) return; - auto h = delayinserthook->at(em_address); - delayinserthook->erase(em_address); + auto h = _delayinserthook->at(em_address); + _delayinserthook->erase(em_address); NewHook(h.second, h.first.c_str()); } bool NewHook(HookParam hp, LPCSTR name) diff --git a/cpp/version.cmake b/cpp/version.cmake index 86f1a327..2ab06532 100644 --- a/cpp/version.cmake +++ b/cpp/version.cmake @@ -1,7 +1,7 @@ set(VERSION_MAJOR 6) -set(VERSION_MINOR 5) -set(VERSION_PATCH 8) +set(VERSION_MINOR 6) +set(VERSION_PATCH 0) set(VERSION_REVISION 0) set(LUNA_VERSION "{${VERSION_MAJOR},${VERSION_MINOR},${VERSION_PATCH},${VERSION_REVISION}}") add_library(VERSION_DEF INTERFACE) diff --git a/py/LunaTranslator/gui/selecthook.py b/py/LunaTranslator/gui/selecthook.py index 1554268d..ee6291d9 100644 --- a/py/LunaTranslator/gui/selecthook.py +++ b/py/LunaTranslator/gui/selecthook.py @@ -5,7 +5,6 @@ from traceback import print_exc import qtawesome, windows, winsharedutils, gobject from myutils.config import savehook_new_data, static_data, globalconfig, _TR, isascii from myutils.utils import checkchaos, get_time_stamp, dynamiclink, is_ascii_control -from myutils.wrapper import Singleton_close from gui.dialog_savedgame import dialog_setting_game from gui.usefulwidget import ( closeashidewindow, diff --git a/py/LunaTranslator/myutils/utils.py b/py/LunaTranslator/myutils/utils.py index e36b5f71..31be681d 100644 --- a/py/LunaTranslator/myutils/utils.py +++ b/py/LunaTranslator/myutils/utils.py @@ -1057,7 +1057,8 @@ def is_ascii_symbo(c: str): def is_ascii_control(c: str): - return cinranges(c, (0, 0x1F), (0x7F, 0xA0)) + # 不要管\r\n + return cinranges(c, (0, 0x9), (0xB, 0xC), (0xE, 0x1F), (0x7F, 0xA0)) def checkchaos(text):