Skip to content

Commit

Permalink
TH19: translations
Browse files Browse the repository at this point in the history
  • Loading branch information
32th-System committed Jan 29, 2024
1 parent 6407107 commit c49a23e
Show file tree
Hide file tree
Showing 6 changed files with 157 additions and 25 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ Choosing "Exit" will prompt you to save a replay. Warning: replays saved like th

# Credits (May 27th 2022 and after)
- Development: [32th System](https://www.youtube.com/channel/UChyVpooBi31k3xPbWYsoq3w), [muter3000](https://github.com/muter3000), [zero318](https://github.com/zero318), [Lmocinemod](https://github.com/Lmocinemod), [Cao Minh](https://github.com/hoangcaominh), [raviddog](https://github.com/raviddog)
- Chinese translations: [CrestedPeak9](https://twitter.com/CrestedPeak9), DeepL
- Chinese translations: [CrestedPeak9](https://twitter.com/CrestedPeak9), maksim71_doll, DeepL
- Japanese translations: [Yu-miya](https://www.twitch.tv/toho_yumiya), CyrusVorazan, DeepL
- Transferring all reports from the [old bugtracker](https://github.com/ack7139/thprac/issues) to [here](https://github.com/touhouworldcup/thprac/issues): [toimine](https://www.youtube.com/channel/UCtxu8Rg0Vh8mX6iENenetuA)
- Chinese README translations: [TNT569](https://github.com/TNT569)
Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Thprac 会自动将您输入的选项保存到 replay 中,播放 replay 时,

# 鸣谢 (2022年5月27日及之后)
- 开发: [32th System](https://www.youtube.com/channel/UChyVpooBi31k3xPbWYsoq3w), [muter3000](https://github.com/muter3000), [zero318](https://github.com/zero318), [Lmocinemod](https://github.com/Lmocinemod), [Cao Minh](https://github.com/hoangcaominh), [raviddog](https://github.com/raviddog)
- 中文翻译: [CrestedPeak9](https://twitter.com/CrestedPeak9), DeepL
- 中文翻译: [CrestedPeak9](https://twitter.com/CrestedPeak9), maksim71_doll, DeepL
- 日语翻译: [Yu-miya](https://www.twitch.tv/toho_yumiya), CyrusVorazan, DeepL
- 将所有report从 [旧的bugtracker](https://github.com/ack7139/thprac/issues) 移到 [此处](https://github.com/touhouworldcup/thprac/issues): [toimine](https://www.youtube.com/channel/UCtxu8Rg0Vh8mX6iENenetuA)
- 中文README翻译:[TNT569](https://github.com/TNT569) (翻译可能存在不足,敬请改正)
Expand Down
13 changes: 13 additions & 0 deletions thprac/src/thprac/thprac_games_def.json
Original file line number Diff line number Diff line change
Expand Up @@ -2999,6 +2999,7 @@
"TH09_PLAYER_2": [ "P2", "Player 2", "プレイヤー2" ],
"TH09_P1": [ "P1", "P1", "P1" ],
"TH09_P2": [ "P2", "P2", "P2" ],
"TH09_BOTH": [ "Both", "Both", "Both" ],
"TH09_P1_FORMAT_INT": [ "P1: %d", "P1: %d", "P1: %d" ],
"TH09_P2_FORMAT_INT": [ "P2: %d", "P2: %d", "P2: %d" ],
"TH09_P1_FORMAT_FLOAT": [ "P1: %.3f", "P1: %.3f", "P1: %.3f" ],
Expand Down Expand Up @@ -9131,5 +9132,17 @@
"TH185_SPELL_27_2": [ "叶技「Super Green Spiral」(超绿色螺旋)", "Leaf Skill \"Super Green Spiral\"" , "葉技「スーパーグリーンスパイラル」" ],
"TH185_SPELL_27_3": [ "「黑市的万华镜」", "\"Black Market Kaleidoscope\"" , "「ブラックマーケットの万華鏡」" ]
}
},
"th19": {
"namespace": "TH19",

"glossary": {
"TH19_C_RANK_P1": [ "C3/C4 Rank (P1)", "C3/C4 Rank (P1)", "C3/C4ランク(P1)" ],
"TH19_C_RANK_P2": [ "C3/C4 Rank (P2)", "C3/C4 Rank (P2)", "C3/C4ランク(P2)" ],

"TH19_BARRIER": [ "", "Barrier", "バリア" ],
"TH19_RANK_FORMAT": [ "Rank: %d", "Rank: %d", "ランク: %d" ],
"TH19_SHOW_ENEMY_HP": [ "显示小怪HP", "Show Enemy HP", "敵のHPを表示する" ]
}
}
}
90 changes: 89 additions & 1 deletion 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][898]
const char* th_glossary_str[3][904]
{
{
"",
Expand Down Expand Up @@ -87,6 +87,7 @@ const char* th_glossary_str[3][898]
"TH09.5 东方文花帖 ~ Shoot the Bullet.",
"AI难度",
"C4 Rank",
"Both",
"Charge Gauge",
"AI下回蓄力攻击",
"清零血条",
Expand Down Expand Up @@ -515,6 +516,11 @@ const char* th_glossary_str[3][898]
"...并写入replay中",
"牙冷却",
"0CD",
"盾",
"C3/C4 Rank (P1)",
"C3/C4 Rank (P2)",
"Rank: %d",
"显示敌人HP",
"TH19 东方兽王园 〜 Unfinished Dream of All Living Ghost.",
"中止",
"以管理员身份启动thprac",
Expand Down Expand Up @@ -987,6 +993,7 @@ const char* th_glossary_str[3][898]
"TH09.5 Shoot the Bullet",
"AI Difficulty",
"Boss Rank",
"Both",
"Charge Gauge",
"AI next charge attack",
"Instant death",
Expand Down Expand Up @@ -1415,6 +1422,11 @@ const char* th_glossary_str[3][898]
"...and write into the replay",
"Fang CD",
"0CD",
"Barrier",
"C3/C4 Rank (P1)",
"C3/C4 Rank (P2)",
"Rank: %d",
"Show Enemy HP",
"TH19 Unfinished Dream of All Living Ghost",
"Abort",
"Launch thprac with admin rights",
Expand Down Expand Up @@ -1887,6 +1899,7 @@ const char* th_glossary_str[3][898]
"TH09.5 東方文花帖 ~ Shoot the Bullet.",
"AI難易度",
"ボスランク",
"Both",
"チャージゲージ",
"AI次回チャージ攻撃",
"即死",
Expand Down Expand Up @@ -2315,6 +2328,11 @@ const char* th_glossary_str[3][898]
"...そしてリプレイに書き込みます ",
"牙CD",
"0CD",
"バリア",
"C3/C4ランク(P1)",
"C3/C4ランク(P2)",
"ランク: %d",
"敵のHPを表示する",
"TH19 東方獣王園 〜 Unfinished Dream of All Living Ghost.",
"中止",
"管理者権限でthpracを起動する",
Expand Down Expand Up @@ -19966,6 +19984,76 @@ const th_sections_t th_sections_cbt[1][2][1]

}

namespace TH19 {

const char* th_sections_str[3][4][1]
{
{
{
"",
},
{
"",
},
{
"",
},
{
"",
},
},
{
{
"",
},
{
"",
},
{
"",
},
{
"",
},
},
{
{
"",
},
{
"",
},
{
"",
},
{
"",
},
},
};

const uint8_t th_sections_bgm[1]
{
0,
};

const th_sections_t th_sections_cba[1][1][2]
{
{
{ },
},
};

const th_sections_t th_sections_cbt[1][2][1]
{
{
{ },
{ },
},
};

}

const wchar_t __thprac_loc_range_zh[3143] {
0x0020, 0x00FF,
0x2014, 0x2014,
Expand Down
25 changes: 24 additions & 1 deletion thprac/src/thprac/thprac_locale_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ enum th_glossary_t
TH095_TITLE,
TH09_AI_POWER,
TH09_BOSS_RANK,
TH09_BOTH,
TH09_CHARGE_GAUGE,
TH09_CPU_CHARGE,
TH09_INSTANT_DEATH,
Expand Down Expand Up @@ -515,6 +516,11 @@ enum th_glossary_t
TH18_UNCAP_OVERWRITE,
TH18_VAMPIRE_CD,
TH18_ZERO_CD,
TH19_BARRIER,
TH19_C_RANK_P1,
TH19_C_RANK_P2,
TH19_RANK_FORMAT,
TH19_SHOW_ENEMY_HP,
TH19_TITLE,
THPRAC_ABORT,
THPRAC_ADMIN_RIGHTS,
Expand Down Expand Up @@ -910,7 +916,7 @@ enum th_glossary_t
TH_WARP,
};

extern const char* th_glossary_str[3][898];
extern const char* th_glossary_str[3][904];

extern const th_glossary_t TH_TYPE_SELECT[13];

Expand Down Expand Up @@ -2404,6 +2410,23 @@ extern const th_sections_t th_sections_cbt[1][2][1];

}

namespace TH19 {

enum th_sections_t : uint8_t
{
A0000ERROR,
};

extern const char* th_sections_str[3][4][1];

extern const uint8_t th_sections_bgm[1];

extern const th_sections_t th_sections_cba[1][1][2];

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_en[35];
Expand Down
50 changes: 29 additions & 21 deletions thprac/src/thprac/thprac_th19.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -221,28 +221,30 @@ namespace TH19 {
return;
}

// BIG TODO AT THE END: translation support

ImGui::TextUnformatted("Invincible");
ImGui::TextUnformatted(S(TH_MUTEKI));
ImGui::Checkbox("P1##invincible_p1", &p1_invincible);
ImGui::SameLine();
ImGui::Checkbox("P2##invincible_p2", &p2_invincible);

ImGui::TextUnformatted("Lives");
ImGui::TextUnformatted(S(TH_LIFE));

if (ImGui::SliderInt("P1##lives_p1", &globals.side[0].lives, 1, globals.side[0].max_lives)) {
Gui__UpdateHearts(gui + 0x10);
}
ImGui::SameLine();
ImGui::Checkbox("Lock##lives_lock_p1", &p1_lives_lock);
ImGui::PushID((int)&p1_lives_lock);
ImGui::Checkbox(S(TH09_LOCK), &p1_lives_lock);
ImGui::PopID();

if(ImGui::SliderInt("P2##lives_p2", &globals.side[1].lives, 1, globals.side[1].max_lives)) {
Gui__UpdateHearts(gui + 0x7C);
}
ImGui::SameLine();
ImGui::Checkbox("Lock##lives_lock_p2", &p2_lives_lock);

ImGui::TextUnformatted("Instant death");
ImGui::PushID((int)&p2_lives_lock);
ImGui::Checkbox(S(TH09_LOCK), &p2_lives_lock);
ImGui::PopID();

ImGui::TextUnformatted(S(TH09_INSTANT_DEATH));
if (ImGui::Button("P1##instant_death_p1")) {
globals.side[0].lives = 0;
*(int*)(p1 + 0x10) = 4;
Expand All @@ -253,14 +255,14 @@ namespace TH19 {
*(int*)(p2 + 0x10) = 4;
}
ImGui::SameLine();
if (ImGui::Button("Both##instant_death_both")) {
if (ImGui::Button(S(TH09_BOTH))) {
globals.side[0].lives = 0;
globals.side[1].lives = 0;
*(int*)(p1 + 0x10) = 4;
*(int*)(p2 + 0x10) = 4;
}

ImGui::TextUnformatted("Charge Gauge");
ImGui::TextUnformatted(S(TH09_CHARGE_GAUGE));

auto chargegauge = [](GlobalsSide& side, bool& lock, const char* format, int& gauge_store) {
float bsize = ImGui::GetFrameHeight();
Expand Down Expand Up @@ -310,7 +312,7 @@ namespace TH19 {
if (ImGui::IsItemHovered()) {
ImGui::BeginTooltip();
ImGui::PushTextWrapPos(ImGui::GetFontSize() * 35.0f);
ImGui::TextUnformatted("Lock");
ImGui::TextUnformatted(S(TH09_LOCK));
ImGui::PopTextWrapPos();
ImGui::EndTooltip();
}
Expand All @@ -331,7 +333,9 @@ namespace TH19 {
c3_level_stored = _c3_level - 1;
side.c3_level = c3_level_stored;
ImGui::SameLine();
ImGui::Checkbox("Lock##c3_level_lock", &c3_level_lock);
ImGui::PushID((int)&c3_level_lock);
ImGui::Checkbox(S(TH09_LOCK), &c3_level_lock);
ImGui::PopID();

if (!c4_level_lock) {
c4_level_stored = side.c4_level;
Expand All @@ -341,18 +345,20 @@ namespace TH19 {
c4_level_stored = _c4_level - 1;
side.c4_level = c4_level_stored;
ImGui::SameLine();
ImGui::Checkbox("Lock##c4_level_lock", &c4_level_lock);
ImGui::PushID((int)&c4_level_lock);
ImGui::Checkbox(S(TH09_LOCK), &c4_level_lock);
ImGui::PopID();

ImGui::PopID();
};

ImGui::TextUnformatted("C3/C4 Level (P1)");
ImGui::TextUnformatted(S(TH19_C_RANK_P1));
c3c4(globals.side[0], p1_c3_level_stored, p1_c4_level_stored, p1_c3_level_lock, p1_c4_level_lock);

ImGui::TextUnformatted("C3/C4 Level (P2)");
ImGui::TextUnformatted(S(TH19_C_RANK_P2));
c3c4(globals.side[1], p2_c3_level_stored, p2_c4_level_stored, p2_c3_level_lock, p2_c4_level_lock);

ImGui::TextUnformatted("CPU Next Charge");
ImGui::TextUnformatted(S(TH09_CPU_CHARGE));

auto cpu_next_charge = [](uintptr_t addr, const char* label, bool& lock) {
if (!GetMemContent(addr)) {
Expand All @@ -372,7 +378,7 @@ namespace TH19 {
cpu_next_charge(RVA(P1_CPU_PTR), "P1", p1_cpu_next_charge_lock);
cpu_next_charge(RVA(P2_CPU_PTR), "P2", p2_cpu_next_charge_lock);

ImGui::TextUnformatted("Barrier");
ImGui::TextUnformatted(S(TH19_BARRIER));

auto _barrier = [](PlayerBarrier* barrier, const char* label) {
bool barrier_bool = false;
Expand Down Expand Up @@ -408,17 +414,19 @@ namespace TH19 {
ImGui::SameLine();
_barrier((PlayerBarrier*)(p2 + 0x18), "P2##p2_barrier");

ImGui::TextUnformatted("Misc.");
ImGui::TextUnformatted(S(TH09_MISC));

if (!rank_lock) {
rank_stored = globals.difficulty;
}
ImGui::SliderInt("##rank", &rank_stored, 0, 7, "Rank: %d");
ImGui::SliderInt("##rank", &rank_stored, 0, 7, S(TH19_RANK_FORMAT));
ImGui::SameLine();
ImGui::Checkbox("Lock##rank_lock", &rank_lock);
ImGui::PushID((int)&rank_lock);
ImGui::Checkbox(S(TH09_LOCK), &rank_lock);
ImGui::PopID();
globals.difficulty = rank_stored;

if (ImGui::Checkbox("Show enemy HP##hp_show", &hp_show)) {
if (ImGui::Checkbox(S(TH19_SHOW_ENEMY_HP), &hp_show)) {
if (hp_show) {
th19_enemy_tick.Enable();
} else {
Expand Down

0 comments on commit c49a23e

Please sign in to comment.