From 73dc47efa12394ae27c8aeda78b869dc51a06b98 Mon Sep 17 00:00:00 2001 From: 32th-System Date: Tue, 30 Jan 2024 19:03:40 +0100 Subject: [PATCH] th10: implement #79 --- thprac/src/thprac/thprac_games_def.json | 3 ++- thprac/src/thprac/thprac_locale_def.cpp | 8 ++++++-- thprac/src/thprac/thprac_locale_def.h | 5 +++-- thprac/src/thprac/thprac_th10.cpp | 9 ++++++++- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/thprac/src/thprac/thprac_games_def.json b/thprac/src/thprac/thprac_games_def.json index c49d94a..d244cbc 100644 --- a/thprac/src/thprac/thprac_games_def.json +++ b/thprac/src/thprac/thprac_games_def.json @@ -3028,7 +3028,8 @@ "namespace": "TH10", "glossary": { - "TH10_FAITH_BAR": [ "信仰条", "Faith Bar", "カウンター" ] + "TH10_FAITH_BAR": [ "信仰条", "Faith Bar", "カウンター" ], + "TH10_NO_FAITH_LOSS": [ "不掉信仰", "No faith loss", "信仰点を減少させない" ] }, "sections": { diff --git a/thprac/src/thprac/thprac_locale_def.cpp b/thprac/src/thprac/thprac_locale_def.cpp index 75ff29d..af72bc8 100644 --- a/thprac/src/thprac/thprac_locale_def.cpp +++ b/thprac/src/thprac/thprac_locale_def.cpp @@ -7,7 +7,7 @@ namespace THPrac { -const char* th_glossary_str[3][904] +const char* th_glossary_str[3][905] { { "", @@ -126,6 +126,7 @@ const char* th_glossary_str[3][904] "花映塚工具", "TH10.5 东方绯想天 ~ Scarlet Weather Rhapsody.", "信仰条", + "不掉信仰", "TH10 东方风神录 ~ Mountain of Faith.", "信号强度", "TH11 东方地灵殿 ~ Subterranean Animism.", @@ -1032,6 +1033,7 @@ const char* th_glossary_str[3][904] "TH09 Tools", "TH10.5 Scarlet Weather Rhapsody", "Faith Bar", + "No faith loss", "TH10 Mountain of Faith", "C. Gauge", "TH11 Subterranean Animism", @@ -1938,6 +1940,7 @@ const char* th_glossary_str[3][904] "花映塚ツール", "TH10.5 東方緋想天 ~ Scarlet Weather Rhapsody.", "カウンター", + "信仰点を減少させない", "TH10 東方風神録 ~ Mountain of Faith.", "交信強度", "TH11 東方地霊殿 ~ Subterranean Animism.", @@ -20054,7 +20057,7 @@ const th_sections_t th_sections_cbt[1][2][1] } -const wchar_t __thprac_loc_range_zh[3143] { +const wchar_t __thprac_loc_range_zh[3145] { 0x0020, 0x00FF, 0x2014, 0x2014, 0x201c, 0x201c, @@ -20697,6 +20700,7 @@ const wchar_t __thprac_loc_range_zh[3143] { 0x6362, 0x6362, 0x636e, 0x636e, 0x6377, 0x6377, + 0x6389, 0x6389, 0x638c, 0x638c, 0x6392, 0x6392, 0x6398, 0x6398, diff --git a/thprac/src/thprac/thprac_locale_def.h b/thprac/src/thprac/thprac_locale_def.h index a405f3b..c6e0598 100644 --- a/thprac/src/thprac/thprac_locale_def.h +++ b/thprac/src/thprac/thprac_locale_def.h @@ -126,6 +126,7 @@ enum th_glossary_t TH09_TOOLS_TITLE, TH105_TITLE, TH10_FAITH_BAR, + TH10_NO_FAITH_LOSS, TH10_TITLE, TH11_SIGNAL, TH11_TITLE, @@ -916,7 +917,7 @@ enum th_glossary_t TH_WARP, }; -extern const char* th_glossary_str[3][904]; +extern const char* th_glossary_str[3][905]; extern const th_glossary_t TH_TYPE_SELECT[13]; @@ -2427,7 +2428,7 @@ extern const th_sections_t th_sections_cbt[1][2][1]; } -extern const wchar_t __thprac_loc_range_zh[3143]; +extern const wchar_t __thprac_loc_range_zh[3145]; extern const wchar_t __thprac_loc_range_en[35]; diff --git a/thprac/src/thprac/thprac_th10.cpp b/thprac/src/thprac/thprac_th10.cpp index d6b0582..74cea54 100644 --- a/thprac/src/thprac/thprac_th10.cpp +++ b/thprac/src/thprac/thprac_th10.cpp @@ -433,6 +433,7 @@ namespace TH10 { mInfPower.SetTextOffsetRel(x_offset_1, x_offset_2); mTimeLock.SetTextOffsetRel(x_offset_1, x_offset_2); mAutoBomb.SetTextOffsetRel(x_offset_1, x_offset_2); + mNoFaithLoss.SetTextOffsetRel(x_offset_1, x_offset_2); mElBgm.SetTextOffsetRel(x_offset_1, x_offset_2); } virtual void OnContentUpdate() override @@ -442,6 +443,7 @@ namespace TH10 { mInfPower(); mTimeLock(); mAutoBomb(); + mNoFaithLoss(); mElBgm(); } virtual void OnPreUpdate() override @@ -471,9 +473,14 @@ namespace TH10 { new HookCtx(0x40E5B0, "\x90", 1) } }; Gui::GuiHotKey mAutoBomb { TH_AUTOBOMB, "F5", VK_F5, { new HookCtx(0x425C13, "\xc6", 1) } }; + Gui::GuiHotKey mNoFaithLoss { TH10_NO_FAITH_LOSS, "F6", VK_F6, { + new HookCtx(0x418A2B, "\x90\x90\x90", 3), + new HookCtx(0x426A22, "\x90\x90\x90\x90\x90\x90", 6), + new HookCtx(0x412E8F, "\x90\x90\x90", 3) } }; + public: - Gui::GuiHotKey mElBgm { TH_EL_BGM, "F6", VK_F6 }; + Gui::GuiHotKey mElBgm { TH_EL_BGM, "F7", VK_F7 }; }; class THAdvOptWnd : public Gui::PPGuiWnd {