Match fopMsgM_messageGet and fopMsgM_passwordGet

This commit is contained in:
LagoLunatic
2026-04-30 02:56:31 -04:00
parent 8fb16fa696
commit c56b902ed1
4 changed files with 36 additions and 14 deletions
+4
View File
@@ -168,6 +168,7 @@ public:
void getString(char*, u32);
void getString(char*, char*, char*, char*, u32, f32*, f32*, int*);
void getRubyString(char*, char*, char*, char*, char*, char*, f32*, f32*, int*);
#if VERSION >= VERSION_USA
void tag_len_kaisen_game(int*, f32*, int*, int*, int*);
void tag_len_rupee(int*, f32*, int*, int*, int*);
void tag_len_num_input(int*, f32*, int*, int*, int*);
@@ -230,6 +231,7 @@ public:
void tag_input_pendant();
void tag_input_hane();
void tag_input_kenshi();
#endif
public:
/* 0x004 */ JUTFont* font[2];
@@ -336,7 +338,9 @@ void fopMsgM_Delete(void* process);
fopMsg_prm_class* fopMsgM_GetAppend(void* msg);
void fopMsgM_destroyExpHeap(JKRExpHeap*);
f32 fopMsgM_valueIncrease(int param_0, int param_1, u8 param_2);
#if VERSION >= VERSION_USA
bool fopMsgM_hyrule_language_check(u32 msgNo);
#endif
s32 fopMsgM_setStageLayer(void*);
fpc_ProcID fopMsgM_messageSet(u32 i_msgNo, fopAc_ac_c* i_actorP);
fpc_ProcID fopMsgM_messageSet(u32 param_0, cXyz*);
+1 -1
View File
@@ -159,7 +159,7 @@ BOOL daNpc_kam_c::callDemoStartCheck() {
mDoMtx_stack_c::multVec(&l_call_local_kyori, &line_end_pos);
mDoMtx_stack_c::YrotS(angleY);
mDoMtx_stack_c::multVec(&l_call_local_kyori, &line_start_pos);
mDoMtx_stack_c::XrotM(-0x1555);
mDoMtx_stack_c::XrotM(angleX);
mDoMtx_stack_c::multVec(&l_call_local_kyori, &descend_start_pos);
line_end_pos += hyoi_pear_pos;
+14
View File
@@ -39,7 +39,9 @@ J2DPicture* maskPane;
f32 talkPosX;
f32 talkPosY;
s16 textOffsetY;
#if VERSION >= VERSION_USA
bool dMsg_font_flag;
#endif
JKRHeap* agb_work_area;
static dDlst_2DMSG_c message;
dDlst_2Dtact_c capture;
@@ -637,6 +639,7 @@ void dMsg_screenDataSetTact(sub_msg_class* i_Msg) {
/* 8020DAC0-8020DC78 .text dMsg_screenDataSet__FP13sub_msg_class */
void dMsg_screenDataSet(sub_msg_class* i_Msg) {
sScreen2 = NULL;
#if VERSION >= VERSION_USA
if (fopMsgM_hyrule_language_check(i_Msg->mMsgNo)) {
textFont = mDoExt_getRubyFont();
JUT_ASSERT(1162, textFont != NULL);
@@ -647,6 +650,12 @@ void dMsg_screenDataSet(sub_msg_class* i_Msg) {
dMsg_font_flag = 0;
}
rubyFont = textFont;
#else
textFont = mDoExt_getMesgFont();
JUT_ASSERT(1157, textFont != NULL);
textFont = mDoExt_getRubyFont();
JUT_ASSERT(1159, textFont != NULL);
#endif
for (s32 i = 0; i < 3; i++) {
numberPane[i] = new J2DTextBox("rock_24_20_4i_usa.bfn", "0");
}
@@ -3026,11 +3035,16 @@ static BOOL dMsg_Delete(sub_msg_class* i_Msg) {
if (sScreen2 != NULL) {
delete (J2DScreen*)sScreen2;
}
#if VERSION >= VERSION_USA
if (dMsg_font_flag != 0) {
mDoExt_removeRubyFont();
} else {
mDoExt_removeMesgFont();
}
#else
mDoExt_removeMesgFont();
mDoExt_removeRubyFont();
#endif
for (s32 i = 0; i < 8; i++) {
delete (J2DPicture*)button_icon[i];
delete (J2DPicture*)button_kage[i];
+17 -13
View File
@@ -175,6 +175,7 @@ void MyPicture::drawFullSet2(f32 x, f32 y, f32 width, f32 height, J2DBinding bin
}
}
#if VERSION >= VERSION_USA
/* 8002AD4C-8002AE28 .text fopMsgM_hyrule_language_check__FUl */
bool fopMsgM_hyrule_language_check(u32 msgNo) {
if(dComIfGs_getClearCount() != 0) {
@@ -204,6 +205,7 @@ bool fopMsgM_hyrule_language_check(u32 msgNo) {
return false;
}
#endif
/* 8002AE28-8002AED4 .text fopMsgM_setStageLayer__FPv */
s32 fopMsgM_setStageLayer(void* proc) {
@@ -574,7 +576,6 @@ u32 fopMsgM_tactMessageSet() {
/* 8002BB78-8002BDBC .text fopMsgM_messageGet__FPcUl */
char* fopMsgM_messageGet(char* dst, u32 msgNo) {
/* Nonmatching - regalloc */
fopMsgM_itemMsgGet_c msgGet;
msgGet.mMsgIdx = 0;
msgGet.mMsgNo = 0;
@@ -583,17 +584,17 @@ char* fopMsgM_messageGet(char* dst, u32 msgNo) {
mesg_header* head_p = msgGet.getMesgHeader(msgNo);
JUT_ASSERT(VERSION_SELECT(0x690, 0x690, 0x6BD, 0x6BD), head_p);
const char* src = (char*)msgGet.getMessage(head_p);
const char* src = msgGet.getMessage(head_p);
const char* cursor = src;
char* dstPtr = dst;
char dstBuf[20];
char current;
while(current = *cursor, current != '\0') {
if((u32)current == '\x1A') {
s32 current;
while(current = *cursor, *cursor != '\0') {
if((u8)*cursor == 0x1A) {
u32 next_as_int = *(u32*)(++cursor);
if ((next_as_int & 0xFFFFFF) == 0x1E) {
*dstPtr = '\x1A';
*dstPtr = 0x1A;
dstPtr++;
}
else if ((next_as_int & 0xFFFFFF) == 0) {
@@ -660,7 +661,6 @@ char* fopMsgM_messageGet(char* dst, u32 msgNo) {
/* 8002BE04-8002C02C .text fopMsgM_passwordGet__FPcUl */
char* fopMsgM_passwordGet(char* dst, u32 msgNo) {
/* Nonmatching - regalloc */
fopMsgM_itemMsgGet_c msgGet;
msgGet.mMsgIdx = 0;
msgGet.mMsgNo = 0;
@@ -669,14 +669,14 @@ char* fopMsgM_passwordGet(char* dst, u32 msgNo) {
mesg_header* head_p = msgGet.getMesgHeader(msgNo);
JUT_ASSERT(VERSION_SELECT(0x6F6, 0x6F6, 0x735, 0x739), head_p);
const char* src = (char*)msgGet.getMessage(head_p);
const char* src = msgGet.getMessage(head_p);
const char* cursor = src;
char* dstPtr = dst;
char dstBuf[20];
char current;
while(current = *cursor, current != '\0') {
if((u32)current == '\x1A') {
s32 current;
while(current = *cursor, *cursor != '\0') {
if((u8)*cursor == 0x1A) {
u32 next_as_int = *(u32*)(++cursor);
if ((next_as_int & 0xFFFFFF) == 0) {
#if VERSION > VERSION_JPN
@@ -2412,6 +2412,7 @@ void fopMsgM_int_to_char(char* dst, int num, bool param_3) {
}
}
#if VERSION >= VERSION_USA
/* 80035170-800351E8 .text fopMsgM_int_to_char2__FPci */
void fopMsgM_int_to_char2(char* dst, int num) {
char buf[2];
@@ -2421,6 +2422,7 @@ void fopMsgM_int_to_char2(char* dst, int num) {
buf[0] = num % 10 + '0';
strcat(dst, buf);
}
#endif
/* 800351E8-80035408 .text getString__21fopMsgM_msgDataProc_cFPcUl */
void fopMsgM_msgDataProc_c::getString(char* dst, u32 msgNo) {
@@ -2628,6 +2630,7 @@ void fopMsgM_msgDataProc_c::getRubyString(char* param_1, char* param_2, char* pa
strcat(param_4, param_6);
}
#if VERSION >= VERSION_USA
/* 80035D28-80035E40 .text tag_len_kaisen_game__21fopMsgM_msgDataProc_cFPiPfPiPiPi */
void fopMsgM_msgDataProc_c::tag_len_kaisen_game(int* param_1, f32* param_2, int* param_3, int* param_4, int* param_5) {
char buf[12];
@@ -3372,7 +3375,7 @@ void fopMsgM_msgDataProc_c::tag_len_get_pendant(int* param_1, f32* param_2, int*
char buf[28];
int num = dComIfGs_getBeastNum(7);
int num = (u8)dComIfGs_getBeastNum(7);
fopMsgM_int_to_char(buf, num, false);
#if VERSION == VERSION_PAL
@@ -5319,7 +5322,7 @@ void fopMsgM_msgDataProc_c::tag_get_pendant() {
/* Nonmatching */
char buf[20];
int num = dComIfGs_getBeastNum(7);
int num = (u8)dComIfGs_getBeastNum(7);
fopMsgM_int_to_char(buf, num, false);
char* p1 = buf;
@@ -6521,6 +6524,7 @@ void fopMsgM_msgDataProc_c::tag_input_kenshi() {
field_0x118 += field_0x3C[field_0x118 + 1];
}
#endif
/* 8003BA00-8003BA40 .text fopMsgM_centerPosCalc__F17fopMsgM_f2d_class17fopMsgM_f2d_class */
fopMsgM_f2d_class fopMsgM_centerPosCalc(fopMsgM_f2d_class param_1, fopMsgM_f2d_class param_2) {