mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-26 14:56:52 -04:00
convert jpn ui/text changes to runtime checks
This commit is contained in:
+102
-45
@@ -29,6 +29,8 @@
|
||||
|
||||
#include <cstdio>
|
||||
|
||||
#include "dusk/version.hpp"
|
||||
|
||||
#if TARGET_PC
|
||||
#include "dusk/frame_interpolation.h"
|
||||
#include "dusk/game_clock.h"
|
||||
@@ -341,7 +343,16 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
|
||||
}
|
||||
mpString = JKR_NEW dMsgString_c();
|
||||
for (i = 0; i < 5; i++) {
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
#if TARGET_PC
|
||||
J2DTextBox* fxy_TextBox;
|
||||
if (dusk::version::isRegionJpn()) {
|
||||
fxy_TextBox = (J2DTextBox*)mpScreen->search(xy_text[i]);
|
||||
mpScreen->search(fxy_text[i])->hide();
|
||||
} else {
|
||||
fxy_TextBox = (J2DTextBox*)mpScreen->search(fxy_text[i]);
|
||||
mpScreen->search(xy_text[i])->hide();
|
||||
}
|
||||
#elif VERSION == VERSION_GCN_JPN
|
||||
J2DTextBox* fxy_TextBox = (J2DTextBox*)mpScreen->search(xy_text[i]);
|
||||
mpScreen->search(fxy_text[i])->hide();
|
||||
#else
|
||||
@@ -353,75 +364,77 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
|
||||
field_0x580[0] = mpString->getString(0x380, fxy_TextBox, NULL, NULL, NULL, 0);
|
||||
}
|
||||
for (i = 0; i < 5; i++) {
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
#if TARGET_PC
|
||||
#if TARGET_PC
|
||||
J2DTextBox* fc_TextBox;
|
||||
if (dusk::getSettings().game.swapDirectSelect) {
|
||||
fc_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
|
||||
mpScreen->search(fc_text1[i])->hide();
|
||||
if (dusk::version::isRegionJpn()) {
|
||||
if (dusk::getSettings().game.swapDirectSelect) {
|
||||
fc_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
|
||||
mpScreen->search(fc_text1[i])->hide();
|
||||
} else {
|
||||
fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
|
||||
mpScreen->search(fc_text[i])->hide();
|
||||
}
|
||||
} else {
|
||||
fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
|
||||
mpScreen->search(fc_text[i])->hide();
|
||||
if (dusk::getSettings().game.swapDirectSelect) {
|
||||
fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]);
|
||||
mpScreen->search(c_text1[i])->hide();
|
||||
} else {
|
||||
fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]);
|
||||
mpScreen->search(c_text[i])->hide();
|
||||
}
|
||||
}
|
||||
#else
|
||||
#elif VERSION == VERSION_GCN_JPN
|
||||
J2DTextBox* fc_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
|
||||
mpScreen->search(fc_text[i])->hide();
|
||||
#endif
|
||||
#else
|
||||
#if TARGET_PC
|
||||
J2DTextBox* fc_TextBox;
|
||||
if (dusk::getSettings().game.swapDirectSelect) {
|
||||
fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]);
|
||||
mpScreen->search(c_text1[i])->hide();
|
||||
} else {
|
||||
fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]);
|
||||
mpScreen->search(c_text[i])->hide();
|
||||
}
|
||||
#else
|
||||
J2DTextBox* fc_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]);
|
||||
mpScreen->search(c_text[i])->hide();
|
||||
#endif
|
||||
#endif
|
||||
fc_TextBox->setFont(mDoExt_getMesgFont());
|
||||
fc_TextBox->setString(0x40, "");
|
||||
field_0x580[1] = mpString->getString(0x37F, fc_TextBox, NULL, NULL, NULL, 0);
|
||||
}
|
||||
for (i = 0; i < 5; i++) {
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
#if TARGET_PC
|
||||
#if TARGET_PC
|
||||
J2DTextBox* fc1_TextBox;
|
||||
if (dusk::getSettings().game.swapDirectSelect) {
|
||||
fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
|
||||
mpScreen->search(fc_text[i])->hide();
|
||||
if (dusk::version::isRegionJpn()) {
|
||||
if (dusk::getSettings().game.swapDirectSelect) {
|
||||
fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text[i]);
|
||||
mpScreen->search(fc_text[i])->hide();
|
||||
} else {
|
||||
fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
|
||||
mpScreen->search(fc_text1[i])->hide();
|
||||
}
|
||||
} else {
|
||||
fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
|
||||
mpScreen->search(fc_text1[i])->hide();
|
||||
if (dusk::getSettings().game.swapDirectSelect) {
|
||||
fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]);
|
||||
mpScreen->search(c_text[i])->hide();
|
||||
} else {
|
||||
fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]);
|
||||
mpScreen->search(c_text1[i])->hide();
|
||||
}
|
||||
}
|
||||
#else
|
||||
#elif VERSION == VERSION_GCN_JPN
|
||||
J2DTextBox* fc1_TextBox = (J2DTextBox*)mpScreen->search(c_text1[i]);
|
||||
mpScreen->search(fc_text1[i])->hide();
|
||||
#endif
|
||||
#else
|
||||
#if TARGET_PC
|
||||
J2DTextBox* fc1_TextBox;
|
||||
if (dusk::getSettings().game.swapDirectSelect) {
|
||||
fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text[i]);
|
||||
mpScreen->search(c_text[i])->hide();
|
||||
} else {
|
||||
fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]);
|
||||
mpScreen->search(c_text1[i])->hide();
|
||||
}
|
||||
#else
|
||||
J2DTextBox* fc1_TextBox = (J2DTextBox*)mpScreen->search(fc_text1[i]);
|
||||
mpScreen->search(c_text1[i])->hide();
|
||||
#endif
|
||||
#endif
|
||||
fc1_TextBox->setFont(mDoExt_getMesgFont());
|
||||
fc1_TextBox->setString(0x40, "");
|
||||
field_0x580[2] = mpString->getString(0x4CD, fc1_TextBox, NULL, NULL, NULL, 0);
|
||||
}
|
||||
for (int i = 0; i < 5; i++) {
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
#if TARGET_PC
|
||||
if (dusk::version::isRegionJpn()) {
|
||||
mpComboOffString[i] = (J2DTextBox*)mpScreen->search(t_on[i]);
|
||||
mpScreen->search(ft_on[i])->hide();
|
||||
} else {
|
||||
mpComboOffString[i] = (J2DTextBox*)mpScreen->search(ft_on[i]);
|
||||
mpScreen->search(t_on[i])->hide();
|
||||
}
|
||||
#elif VERSION == VERSION_GCN_JPN
|
||||
mpComboOffString[i] = (J2DTextBox*)mpScreen->search(t_on[i]);
|
||||
mpScreen->search(ft_on[i])->hide();
|
||||
#else
|
||||
@@ -433,7 +446,15 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
|
||||
mpString->getString(0x4D2, mpComboOffString[i], NULL, NULL, NULL, 0);
|
||||
}
|
||||
for (int i = 0; i < 5; i++) {
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
#if TARGET_PC
|
||||
if (dusk::version::isRegionJpn()) {
|
||||
mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(t_off[i]);
|
||||
mpScreen->search(ft_off[i])->hide();
|
||||
} else {
|
||||
mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(ft_off[i]);
|
||||
mpScreen->search(t_off[i])->hide();
|
||||
}
|
||||
#elif VERSION == VERSION_GCN_JPN
|
||||
mpBowArrowComboString[i] = (J2DTextBox*)mpScreen->search(t_off[i]);
|
||||
mpScreen->search(ft_off[i])->hide();
|
||||
#else
|
||||
@@ -464,7 +485,31 @@ dMenu_Ring_c::dMenu_Ring_c(JKRExpHeap* i_heap, STControl* i_stick, CSTControl* i
|
||||
mpNameParent = JKR_NEW CPaneMgr(mpCenterScreen, MULTI_CHAR('label_n'), 1, NULL);
|
||||
mpCircle = JKR_NEW CPaneMgr(mpCenterScreen, MULTI_CHAR('circle_n'), 2, NULL);
|
||||
J2DTextBox* textBox[4];
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
#if TARGET_PC
|
||||
if (dusk::version::isRegionJpn()) {
|
||||
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04'));
|
||||
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05'));
|
||||
textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n06'));
|
||||
textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n07'));
|
||||
J2DPane* pane = mpCenterScreen->search(MULTI_CHAR('fitem_n1'));
|
||||
pane->mVisible = false;
|
||||
pane = mpCenterScreen->search(MULTI_CHAR('fitem_n2'));
|
||||
pane->mVisible = false;
|
||||
pane = mpCenterScreen->search(MULTI_CHAR('fitem_n3'));
|
||||
pane->mVisible = false;
|
||||
pane = mpCenterScreen->search(MULTI_CHAR('fitem_n4'));
|
||||
pane->mVisible = false;
|
||||
} else {
|
||||
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n1'));
|
||||
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n2'));
|
||||
textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n3'));
|
||||
textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n4'));
|
||||
mpCenterScreen->search(MULTI_CHAR('item_n04'));
|
||||
mpCenterScreen->search(MULTI_CHAR('item_n05'));
|
||||
mpCenterScreen->search(MULTI_CHAR('item_n06'));
|
||||
mpCenterScreen->search(MULTI_CHAR('item_n07'));
|
||||
}
|
||||
#elif VERSION == VERSION_GCN_JPN
|
||||
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04'));
|
||||
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05'));
|
||||
textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n06'));
|
||||
@@ -1246,7 +1291,19 @@ void dMenu_Ring_c::setScale() {
|
||||
|
||||
void dMenu_Ring_c::setNameString(u32 i_stringID) {
|
||||
J2DTextBox* textBox[4];
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
#if TARGET_PC
|
||||
if (dusk::version::isRegionJpn()) {
|
||||
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04'));
|
||||
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05'));
|
||||
textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n06'));
|
||||
textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n07'));
|
||||
} else {
|
||||
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n1'));
|
||||
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n2'));
|
||||
textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n3'));
|
||||
textBox[3] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('fitem_n4'));
|
||||
}
|
||||
#elif VERSION == VERSION_GCN_JPN
|
||||
textBox[0] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n04'));
|
||||
textBox[1] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n05'));
|
||||
textBox[2] = (J2DTextBox*)mpCenterScreen->search(MULTI_CHAR('item_n06'));
|
||||
|
||||
Reference in New Issue
Block a user