Skip to content

Commit

Permalink
th10: implement #79
Browse files Browse the repository at this point in the history
  • Loading branch information
32th-System committed Jan 30, 2024
1 parent 67ba462 commit 73dc47e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 6 deletions.
3 changes: 2 additions & 1 deletion thprac/src/thprac/thprac_games_def.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
8 changes: 6 additions & 2 deletions thprac/src/thprac/thprac_locale_def.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

namespace THPrac {

const char* th_glossary_str[3][904]
const char* th_glossary_str[3][905]
{
{
"",
Expand Down Expand Up @@ -126,6 +126,7 @@ const char* th_glossary_str[3][904]
"花映塚工具",
"TH10.5 东方绯想天 ~ Scarlet Weather Rhapsody.",
"信仰条",
"不掉信仰",
"TH10 东方风神录 ~ Mountain of Faith.",
"信号强度",
"TH11 东方地灵殿 ~ Subterranean Animism.",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -1938,6 +1940,7 @@ const char* th_glossary_str[3][904]
"花映塚ツール",
"TH10.5 東方緋想天 ~ Scarlet Weather Rhapsody.",
"カウンター",
"信仰点を減少させない",
"TH10 東方風神録 ~ Mountain of Faith.",
"交信強度",
"TH11 東方地霊殿 ~ Subterranean Animism.",
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down
5 changes: 3 additions & 2 deletions thprac/src/thprac/thprac_locale_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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];

Expand Down Expand Up @@ -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];

Expand Down
9 changes: 8 additions & 1 deletion thprac/src/thprac/thprac_th10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -442,6 +443,7 @@ namespace TH10 {
mInfPower();
mTimeLock();
mAutoBomb();
mNoFaithLoss();
mElBgm();
}
virtual void OnPreUpdate() override
Expand Down Expand Up @@ -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 {
Expand Down

0 comments on commit 73dc47e

Please sign in to comment.