Link a lot of TUs for JP version (#2625)

This commit is contained in:
Max Roncace
2025-09-03 03:45:29 -04:00
committed by GitHub
parent 9c7ff1bd6c
commit c5a551246f
10 changed files with 523 additions and 478 deletions
+406 -406
View File
File diff suppressed because it is too large Load Diff
+4
View File
@@ -3292,6 +3292,10 @@ static int daMg_Fish_Execute(mg_fish_class* i_this) {
daPy_py_c* player = daPy_getPlayerActorClass();
#if VERSION == VERSION_GCN_JPN
lit_1008 = 0;
#endif
if (i_this->mSurfaceY != 0.0f) {
if ((g_Counter.mTimer + fopAcM_GetID(i_this) & 0xf) == 0) {
get_surface_y(i_this, &i_this->actor.current.pos);
+2
View File
@@ -127,6 +127,7 @@ dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) {
}
J2DTextBox::TFontSize font_size;
#if VERSION != VERSION_GCN_JPN
font_size.mSizeX = 17.0f;
font_size.mSizeY = 20.0f;
for (int i = 0; i < 5; i++) {
@@ -136,6 +137,7 @@ dMeter2Draw_c::dMeter2Draw_c(JKRExpHeap* mp_heap) {
static_cast<J2DTextBox*>(mpXYText[i][1]->getPanePtr())->setFontSize(font_size);
static_cast<J2DTextBox*>(mpXYText[i][2]->getPanePtr())->setFontSize(font_size);
}
#endif
init();
field_0xa8 = 0;
+34 -42
View File
@@ -126,51 +126,39 @@ dMeter_drawLetterHIO_c::dMeter_drawLetterHIO_c() {
mLetterTextFront.set(65, 55, 30, 255);
}
static f32 const fipaScale[6] = {0.98f, 1.0f, 1.0f, 1.0f, 0.95f, 1.1f};
static f32 const fipaPosX[6] = {1.3f, 6.6f, 0.0f, 3.96f, 4.0f, 27.5f};
static f32 const fipaPosY[6] = {-9.2f, -27.5f, -11.7f, -9.2f, -30.1f, -17.9f};
static f32 const finaScale[6] = {0.9f, 0.9f, 0.9f, 0.9f, 0.9f, 0.9f};
static f32 const finaPosX[6] = {-25.0f, -4.0f, 0.0f, 0.0f, 0.0f, -4.0f};
static f32 const finaPosY[6] = {-16.0f, -40.6, -24.0f, -11.7f, -37.9f, -13.0f};
static f32 const filiScale[6] = {0.65f, 0.65f, 0.65f, 0.65f, 0.65f, 0.65f};
static f32 const filiPosX[6] = {-28.0f, -8.0f, 9.2f, 9.2f, 9.2f, -8.0f};
static f32 const filiPosY[6] = {-6.6f, -14.0f, -14.4f, 24.9f, -11.7f, 24.9f};
static f32 const bboxScale[6] = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f};
static f32 const bboxPosX[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
static f32 const bboxPosY[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
static f32 const rboxScale[6] = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f};
static f32 const rboxPosX[6] = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
static f32 const rboxPosY[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
static f32 const finfoScale[6] = {0.87f, 0.87f, 0.88f, 0.87f, 0.87f, 0.87f};
static f32 const finfoPosX[6] = {-17.0f, 0.0f, -14.0f, 0.0f, -12.0f, -32.8f};
static f32 const finfoPosY[6] = {6.6f, 0.0f, 0.0f, 0.0f, 1.3f, 0.0f};
static f32 const fishnScale[6] = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f};
static f32 const fishnPosX[6] = {4.0f, -20.0f, 1.3f, 6.6f, 1.3f, 9.2f};
static f32 const fishnPosY[6] = {-72.1f, 129.6f, 0.0f, 6.6f, 32.8f, 11.7f};
/* 801FE730-801FE8DC 1F9070 01AC+00 1/1 0/0 0/0 .text __ct__23dMeter_drawFishingHIO_cFv
*/
dMeter_drawFishingHIO_c::dMeter_drawFishingHIO_c() {
static f32 const fipaScale[6] = {0.98f, 1.0f, 1.0f, 1.0f, 0.95f, 1.1f};
static f32 const fipaPosX[6] = {1.3f, 6.6f, 0.0f, 3.96f, 4.0f, 27.5f};
static f32 const fipaPosY[6] = {-9.2f, -27.5f, -11.7f, -9.2f, -30.1f, -17.9f};
static f32 const finaScale[6] = {0.9f, 0.9f, 0.9f, 0.9f, 0.9f, 0.9f};
static f32 const finaPosX[6] = {-25.0f, -4.0f, 0.0f, 0.0f, 0.0f, -4.0f};
static f32 const finaPosY[6] = {-16.0f, -40.6, -24.0f, -11.7f, -37.9f, -13.0f};
static f32 const filiScale[6] = {0.65f, 0.65f, 0.65f, 0.65f, 0.65f, 0.65f};
static f32 const filiPosX[6] = {-28.0f, -8.0f, 9.2f, 9.2f, 9.2f, -8.0f};
static f32 const filiPosY[6] = {-6.6f, -14.0f, -14.4f, 24.9f, -11.7f, 24.9f};
static f32 const bboxScale[6] = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f};
static f32 const bboxPosX[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
static f32 const bboxPosY[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
static f32 const rboxScale[6] = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f};
static f32 const rboxPosX[6] = {1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
static f32 const rboxPosY[6] = {0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f};
static f32 const finfoScale[6] = {0.87f, 0.87f, 0.88f, 0.87f, 0.87f, 0.87f};
#if VERSION == VERSION_GCN_JPN
static f32 const finfoPosX[6] = {-27.0f, 0.0f, -12.0f, 0.0f, -12.0f, -32.8f};
#else
static f32 const finfoPosX[6] = {-17.0f, 0.0f, -14.0f, 0.0f, -12.0f, -32.8f};
#endif
static f32 const finfoPosY[6] = {6.6f, 0.0f, 0.0f, 0.0f, 1.3f, 0.0f};
static f32 const fishnScale[6] = {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f};
#if VERSION == VERSION_GCN_JPN
static f32 const fishnPosX[6] = {12.0f, -20.0f, 1.3f, 6.6f, 14.0f, -6.6f};
#else
static f32 const fishnPosX[6] = {4.0f, -20.0f, 1.3f, 6.6f, 1.3f, 9.2f};
#endif
static f32 const fishnPosY[6] = {-72.1f, 129.6f, 0.0f, 6.6f, 32.8f, 11.7f};
mOpenFrames = 10;
mCloseFrames = 10;
mDebug = false;
@@ -884,7 +872,11 @@ dMeter_drawHIO_c::dMeter_drawHIO_c() {
field_0x2cc = 1001;
mButtonATextDebug = false;
#if VERSION == VERSION_GCN_JPN
mButtonATextSpacing = -2.0f;
#else
mButtonATextSpacing = 1.0f;
#endif
mButtonATextScale = 1.0f;
mButtonATextPosX = 0.0f;
mButtonATextPosY = 0.0f;
+26 -4
View File
@@ -17,6 +17,12 @@
#include "d/d_msg_string.h"
#include "d/d_pane_class.h"
#if VERSION == VERSION_GCN_JPN
#define STR_BUF_LEN 528
#else
#define STR_BUF_LEN 512
#endif
extern "C" extern dMsgObject_HIO_c g_MsgObject_HIO_c;
/* 80201328-80201370 1FBC68 0048+00 0/0 1/1 1/1 .text __ct__14dMeterButton_cFv */
@@ -256,12 +262,17 @@ void dMeterButton_c::draw() {
}
if (mMsgID != 0xFFFF) {
char tmp_buf[512];
char tmp_buf[STR_BUF_LEN];
strcpy(tmp_buf, static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr())->getStringPtr());
mpTextScreen->draw(0.0f, 0.0f, graf_ctx);
#if VERSION == VERSION_GCN_JPN
mpString_c->getString(mMsgID, static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr()), NULL, NULL,
NULL, 12);
#else
mpString_c->getString(mMsgID, static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr()), NULL, NULL,
NULL, 8);
#endif
mpString_c->drawOutFont(static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr()), -1.0f);
strcpy(static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr())->getStringPtr(), tmp_buf);
}
@@ -1194,8 +1205,13 @@ void dMeterButton_c::screenInitButton() {
field_0x4d9 = 0xFF;
for (int i = 0; i < 10; i++) {
#if VERSION == VERSION_GCN_JPN
mpTextBox[i] = (J2DTextBox*)mpButtonScreen->search(text_tag[i]);
mpButtonScreen->search(ftext_tag[i])->hide();
#else
mpTextBox[i] = (J2DTextBox*)mpButtonScreen->search(ftext_tag[i]);
mpButtonScreen->search(text_tag[i])->hide();
#endif
mpTextBox[i]->setFont(mDoExt_getMesgFont());
mpTextBox[i]->setString(32, "");
@@ -1468,9 +1484,15 @@ void dMeterButton_c::screenInitText() {
field_0x0ec[1] = NULL;
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
#if VERSION == VERSION_GCN_JPN
mpTextScreen->search('n_3line')->show();
mpTextScreen->search('n_3fline')->hide();
mpTextScreen->search('n_e4line')->hide();
#else
mpTextScreen->search('n_3line')->hide();
mpTextScreen->search('n_3fline')->hide();
mpTextScreen->search('n_e4line')->show();
#endif
OS_REPORT("[%s] %d\n", __FILE__, __LINE__);
f32 line_space = static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr())->getLineSpace();
@@ -1848,9 +1870,9 @@ void dMeterButton_c::updateText(u32 i_flags) {
tbox = static_cast<J2DTextBox*>(field_0x0ec[0]->getPanePtr());
}
char buf1[512];
char buf2[512];
char buf3[512];
char buf1[STR_BUF_LEN];
char buf2[STR_BUF_LEN];
char buf3[STR_BUF_LEN];
if (dMsgObject_getString(dMeter2Info_getFloatingMessageID(),
static_cast<J2DTextBox*>(mpTm_c[0]->getPanePtr()), tbox,
+7
View File
@@ -303,7 +303,9 @@ void COutFont_c::initialize() {
* drawFont__10COutFont_cFP10J2DTextBoxUcffffUlUc */
void COutFont_c::drawFont(J2DTextBox* i_textbox, u8 i_type, f32 i_posX, f32 i_posY, f32 i_sizeX,
f32 i_sizeY, u32 i_color, u8 i_alpha) {
#if VERSION != VERSION_GCN_JPN
i_posY += 1.0f;
#endif
for (int i = 0; i < 35; i++) {
if (mpOfs[i]->getType() == 0x47) {
mpOfs[i]->drawFont(i_textbox, i_type, i_posX, i_posY, i_sizeX, i_sizeY, i_color,
@@ -386,8 +388,13 @@ void COutFont_c::draw(J2DTextBox* i_textbox, f32 param_1, f32 param_2, f32 param
break;
case 5:
case 6: {
#if VERSION == VERSION_GCN_JPN
posY -= 2.0f;
sizeY -= 2.0f;
#else
posY += 1.0f;
sizeY -= 3.0f;
#endif
JUtility::TColor black = mpPane[type]->getBlack();
JUtility::TColor white = mpPane[type]->getWhite();
+2
View File
@@ -36,7 +36,9 @@ dMsgScrnBoss_c::dMsgScrnBoss_c() {
for (int i = 0; i < 7; i++) {
mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], 0, NULL);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getRubyFont());
#if VERSION != VERSION_GCN_JPN
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setCharSpace(1.0f);
#endif
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x100, "");
}
+14 -4
View File
@@ -13,6 +13,12 @@
#include "m_Do/m_Do_controller_pad.h"
#include "stdio.h"
#if VERSION == VERSION_GCN_JPN
#define STR_BUF_LEN 528
#else
#define STR_BUF_LEN 512
#endif
extern dMsgObject_HIO_c g_MsgObject_HIO_c;
static dMsgScrnExplain_c::ProcFunc init_process[] = {
@@ -241,11 +247,15 @@ void dMsgScrnExplain_c::draw(J2DOrthoGraph* i_graf) {
mpScreen->draw(0.0f, 0.0f, (J2DGrafContext*)i_graf);
}
char string_buf[512];
char string_buf[STR_BUF_LEN];
strcpy(string_buf, ((J2DTextBox*)mpTm_c[0]->getPanePtr())->getStringPtr());
mpTxScreen->draw(0.0f, 0.0f, (J2DGrafContext*)i_graf);
#if VERSION == VERSION_GCN_JPN
mpString_c->getString(field_0x54, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 12);
#else
mpString_c->getString(field_0x54, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 8);
#endif
mpString_c->drawOutFont((J2DTextBox*)mpTm_c[0]->getPanePtr(), -1.0f);
strcpy(((J2DTextBox*)mpTm_c[0]->getPanePtr())->getStringPtr(), string_buf);
@@ -285,9 +295,9 @@ void dMsgScrnExplain_c::open_request_proc() {
uVar6 = (J2DTextBox*)field_0x10[0]->getPanePtr();
}
char acStack_220[512];
char acStack_420[512];
char acStack_620[512];
char acStack_220[STR_BUF_LEN];
char acStack_420[STR_BUF_LEN];
char acStack_620[STR_BUF_LEN];
if (dMsgObject_getString(field_0x54, uVar1, uVar6, mDoExt_getMesgFont(), mpOutFont, acStack_220,
acStack_420, acStack_620, &field_0x5c) != 0)
+22 -22
View File
@@ -37,30 +37,23 @@ static dMsgScrnHowl_cFunc process[5] = {
&dMsgScrnHowl_c::guide_off_test_proc,
};
/* 803C10D0-803C10E8 01E1F0 0018+00 0/1 0/0 0/0 .data ylinen_tag$4210 */
static u64 ylinen_tag[3] = {
'ylinen00',
'ylinen02',
'ylinen04',
};
/* 803C10E8-803C1120 01E208 0038+00 0/1 0/0 0/0 .data tlinen_tag$4211 */
static u64 tlinen_tag[7] = {
'tlinen00', 'tlinen01', 'tlinen02', 'tlinen03', 'tlinen04', 'tlinen05', 'tlinen06',
};
/* 803C1120-803C1158 01E240 0038+00 0/0 0/0 0/0 .data tline_tag$4212 */
static u64 tline_tag[7] = {
'tline00', 'tline01', 'tline02', 'tline03', 'tlinen04', 'tline05', 'tline06',
};
/* 803C1158-803C1190 01E278 0038+00 0/0 0/0 0/0 .data tlines_tag$4213 */
static u64 tlines_tag[7] = {
'tlines00', 'tlines01', 'tlines02', 'tlines03', 'tlines04', 'tlines05', 'tlines06',
};
/* 8024096C-80241784 23B2AC 0E18+00 0/0 1/1 0/0 .text __ct__14dMsgScrnHowl_cFv */
dMsgScrnHowl_c::dMsgScrnHowl_c() {
static u64 ylinen_tag[3] = {
'ylinen00',
'ylinen02',
'ylinen04',
};
static u64 tlinen_tag[7] = {
'tlinen00', 'tlinen01', 'tlinen02', 'tlinen03', 'tlinen04', 'tlinen05', 'tlinen06',
};
static u64 tline_tag[7] = {
'tline00', 'tline01', 'tline02', 'tline03', 'tlinen04', 'tline05', 'tline06',
};
static u64 tlines_tag[7] = {
'tlines00', 'tlines01', 'tlines02', 'tlines03', 'tlines04', 'tlines05', 'tlines06',
};
init();
mpScreen = new J2DScreen();
JUT_ASSERT(61, mpScreen != 0);
@@ -82,10 +75,17 @@ dMsgScrnHowl_c::dMsgScrnHowl_c() {
JUT_ASSERT(96, mpButtonIcon[1] != 0);
mpButtonText[1] = new CPaneMgr(mpScreen, 'gr_txt_n', 2, NULL);
JUT_ASSERT(98, mpButtonText[1] != 0);
#if VERSION == VERSION_GCN_JPN
J2DTextBox* piStack_19c = (J2DTextBox*)mpScreen->search('g_l_info');
J2DTextBox* piStack_1a0 = (J2DTextBox*)mpScreen->search('g_r_info');
mpScreen->search('fgr_info')->hide();
mpScreen->search('fgl_info')->hide();
#else
J2DTextBox* piStack_19c = (J2DTextBox*)mpScreen->search('fgl_info');
J2DTextBox* piStack_1a0 = (J2DTextBox*)mpScreen->search('fgr_info');
mpScreen->search('g_l_info')->hide();
mpScreen->search('g_r_info')->hide();
#endif
piStack_19c->setString(0x40, "");
piStack_19c->setFont(mDoExt_getMesgFont());
dMeter2Info_getStringKanji(0x4d4, piStack_19c->getStringPtr(), NULL);
+6
View File
@@ -31,7 +31,11 @@ dMsgScrnPlace_c::dMsgScrnPlace_c() {
}
mpScreen = new J2DScreen();
#if VERSION == VERSION_GCN_JPN
mpScreen->setPriority("zelda_stage_title.blo", 0x20000, dComIfGp_getMsgArchive(4));
#else
mpScreen->setPriority("zelda_stage_title_foreign.blo", 0x20000, dComIfGp_getMsgArchive(4));
#endif
dPaneClass_showNullPane(mpScreen);
mpPmP_c = new CPaneMgr(mpScreen, 'n_all', 2, NULL);
@@ -53,7 +57,9 @@ dMsgScrnPlace_c::dMsgScrnPlace_c() {
mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], 0, NULL);
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setFont(mDoExt_getRubyFont());
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setString(0x80, "");
#if VERSION != VERSION_GCN_JPN
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setCharSpace(1.0f);
#endif
}
((J2DTextBox*)mpTm_c[0]->getPanePtr())->getFontSize(mFontSize);