summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/JSystem/J2DGraph/J2DPane.h2
-rw-r--r--include/JSystem/J2DGraph/J2DTextBox.h6
-rw-r--r--include/JSystem/JKernel/JKRArchive.h4
-rw-r--r--include/d/d_drawlist.h11
-rw-r--r--include/d/d_kankyo.h1
-rw-r--r--include/d/d_message.h68
-rw-r--r--include/d/d_meter.h45
-rw-r--r--include/f_op/f_op_msg_mng.h128
-rw-r--r--include/m_Do/m_Do_controller_pad.h10
-rw-r--r--src/d/d_drawlist.cpp4
-rw-r--r--src/d/d_menu_option.cpp28
-rw-r--r--src/d/d_message.cpp1190
-rw-r--r--src/d/d_meter.cpp121
-rw-r--r--src/d/d_msg.cpp174
-rw-r--r--src/f_op/f_op_msg_mng.cpp708
15 files changed, 1839 insertions, 661 deletions
diff --git a/include/JSystem/J2DGraph/J2DPane.h b/include/JSystem/J2DGraph/J2DPane.h
index 19b3a3a4..5bd81613 100644
--- a/include/JSystem/J2DGraph/J2DPane.h
+++ b/include/JSystem/J2DGraph/J2DPane.h
@@ -89,7 +89,7 @@ public:
void hide() { mVisible = false; }
bool isVisible() { return mVisible; }
- void getBounds() {}
+ const JGeometry::TBox2<f32>& getBounds() { return mBounds; }
const JGeometry::TBox2<f32>& getGlbBounds() { return mGlobalBounds; }
f32 getRotate() const { return mRotation; }
void place(const JGeometry::TBox2<f32>&) {}
diff --git a/include/JSystem/J2DGraph/J2DTextBox.h b/include/JSystem/J2DGraph/J2DTextBox.h
index 6e70e765..5a663fa2 100644
--- a/include/JSystem/J2DGraph/J2DTextBox.h
+++ b/include/JSystem/J2DGraph/J2DTextBox.h
@@ -66,8 +66,10 @@ public:
char* getStringPtr() const;
s32 setString(const char*, ...);
- // TODO
- void setFontColor(JUtility::TColor, JUtility::TColor) {}
+ void setFontColor(JUtility::TColor i_charColor, JUtility::TColor i_GradientColor) {
+ mCharColor = i_charColor;
+ mGradColor = i_GradientColor;
+ }
virtual ~J2DTextBox();
virtual bool setConnectParent(bool);
diff --git a/include/JSystem/JKernel/JKRArchive.h b/include/JSystem/JKernel/JKRArchive.h
index 169b9a1c..53f149cd 100644
--- a/include/JSystem/JKernel/JKRArchive.h
+++ b/include/JSystem/JKernel/JKRArchive.h
@@ -236,4 +236,8 @@ inline u32 JKRReadIdResource(void* buffer, u32 bufferSize, u16 id, JKRArchive* a
return JKRReadResource(buffer, bufferSize, id, arc);
}
+inline u32 JKRReadTypeResource(void* buffer, u32 bufferSize, u32 tag, const char* name, JKRArchive* arc) {
+ return JKRArchive::readTypeResource(buffer, bufferSize, tag, name, arc);
+}
+
#endif
diff --git a/include/d/d_drawlist.h b/include/d/d_drawlist.h
index 2ecf5589..6ab8c6c9 100644
--- a/include/d/d_drawlist.h
+++ b/include/d/d_drawlist.h
@@ -149,9 +149,10 @@ public:
void setScale(f32, f32);
void setScroll(int, s16, s16);
virtual void draw();
- void setAlpha(u8) {}
- void setBlackColor(GXColor& c) { mC0 = c; }
- void setWhiteColor(GXColor& c) { mC1 = c; }
+
+ void setAlpha(u8 i_alpha) { mBlack.a = i_alpha; }
+ void setBlackColor(GXColor& c) { mBlack = c; }
+ void setWhiteColor(GXColor& c) { mWhite = c; }
public:
struct TexEntry {
@@ -169,8 +170,8 @@ public:
/* 0x0A */ s16 mY1;
/* 0x0C */ f32 mScaleX;
/* 0x10 */ f32 mScaleY;
- /* 0x14 */ GXColor mC0;
- /* 0x18 */ GXColor mC1;
+ /* 0x14 */ GXColor mBlack;
+ /* 0x18 */ GXColor mWhite;
/* 0x1C */ TexEntry mTex[2];
};
diff --git a/include/d/d_kankyo.h b/include/d/d_kankyo.h
index 913cbf2b..d8666cd3 100644
--- a/include/d/d_kankyo.h
+++ b/include/d/d_kankyo.h
@@ -467,5 +467,6 @@ void dKy_contrast_flg_set(u8);
u8 dKy_contrast_flg_get();
BOOL dKyr_player_overhead_bg_chk();
void dKy_usonami_set(f32 param_0);
+GXColorS10* dKy_Get_DifCol();
#endif /* D_KANKYO_D_KANKYO_H */
diff --git a/include/d/d_message.h b/include/d/d_message.h
index 6105e3a8..6b5971c1 100644
--- a/include/d/d_message.h
+++ b/include/d/d_message.h
@@ -1,21 +1,81 @@
#ifndef D_MESSAGE_H
#define D_MESSAGE_H
-#include "dolphin/types.h"
+#include "f_op/f_op_msg_mng.h"
+#include "d/d_drawlist.h"
class sub_msg2_class;
-class dDlst_2DMSG2_c {
+class dDlst_2DMSG2_c : public dDlst_base_c {
public:
- void setActorP(sub_msg2_class*) {}
+ virtual ~dDlst_2DMSG2_c() {}
+
+ void setActorP(sub_msg2_class* i_actorp) { actorP = i_actorp; }
void draw();
void outFontDraw();
+
+ /* 0x4 */ sub_msg2_class* actorP;
};
-class dDlst_2DCopy_c {
+class dDlst_2DCopy_c : public dDlst_base_c {
public:
+ virtual ~dDlst_2DCopy_c() {}
void draw();
+
+ /* 0x4 */ u8 field_0x4[0x8 - 0x4];
+ /* 0x8 */ void* copyTex;
+};
+
+struct sub_msg2_class {
+ /* 0x000 */ msg_class msg;
+ /* 0x0FC */ u8 field_0x0FC[0x100 - 0x0FC];
+ /* 0x100 */ JKRExpHeap* Heap;
+ /* 0x104 */ JMSMesgEntry_c mesgEntry;
+ /* 0x11C */ fopMsgM_msgDataProc_c msgDataProc[3];
+ /* 0x8FC */ fopMsgM_msgGet_c msgGet;
+ /* 0x90C */ mesg_header* head_p;
+ /* 0x910 */ fopMsgM_pane_class text_pane[3];
+ /* 0x9B8 */ fopMsgM_pane_class textSdw_pane[3];
+ /* 0xA60 */ fopMsgM_pane_class ruby_pane[3];
+ /* 0xB08 */ fopMsgM_pane_class rubySdw_pane[3];
+ /* 0xBB0 */ fopMsgM_pane_class field_0xbb0;
+ /* 0xBE8 */ fopMsgM_pane_class field_0xbe8;
+ /* 0xC20 */ fopMsgM_pane_class field_0xc20;
+ /* 0xC58 */ fopMsgM_pane_class field_0xc58;
+ /* 0xC90 */ fopMsgM_pane_class field_0xc90;
+ /* 0xCC8 */ fopMsgM_pane_class field_0xcc8;
+ /* 0xD00 */ fopMsgM_pane_class field_0xd00[3];
+ /* 0xDA8 */ fopMsgM_pane_class field_0xda8[3];
+ /* 0xE50 */ JUTFont* mx;
+ /* 0xE54 */ JUTFont* rx;
+ /* 0xE58 */ ResTIMG* Tex[2];
+ /* 0xE60 */ char* message;
+ /* 0xE64 */ char* output_text[3];
+ /* 0xE70 */ char* output_ruby[3];
+ /* 0xE7C */ char* output_textSdw[3];
+ /* 0xE88 */ char* output_rubySdw[3];
+ /* 0xE94 */ f32 field_0xe94;
+ /* 0xE98 */ int field_0xe98;
+ /* 0xE9C */ u8 field_0xe9c;
+ /* 0xE9D */ u8 field_0xe9d;
+ /* 0xE9E */ u8 field_0xe9e;
+ /* 0xEA0 */ u32 mesgNumber;
+ /* 0xEA4 */ u16 colorNo;
+ /* 0xEA8 */ f32 field_0xea8;
+ /* 0xEAC */ f32 field_0xeac;
+ /* 0xEB0 */ int field_0xeb0;
+ /* 0xEB4 */ int field_0xeb4;
+ /* 0xEB8 */ int field_0xeb8;
+ /* 0xEBC */ int field_0xebc;
+ /* 0xEC0 */ u8 field_0xec0;
+ /* 0xEC4 */ int field_0xec4;
+ /* 0xEC8 */ int field_0xec8;
+ /* 0xECC */ int field_0xecc[3];
+ /* 0xED8 */ u8 field_0xED8[0xEDD - 0xED8];
+ /* 0xEDD */ u8 field_0xedd;
+ /* 0xEDE */ u8 field_0xede;
+ /* 0xEDF */ u8 field_0xedf[4][3];
};
#endif /* D_MESSAGE_H */
diff --git a/include/d/d_meter.h b/include/d/d_meter.h
index b9affa4e..8bb14863 100644
--- a/include/d/d_meter.h
+++ b/include/d/d_meter.h
@@ -386,42 +386,15 @@ public:
void genMessage(JORMContext* ctx);
/* 0x04 */ s8 mNo;
- /* 0x05 */ u8 field_0x5;
- /* 0x06 */ u8 field_0x6;
- /* 0x07 */ u8 field_0x7;
- /* 0x08 */ u8 field_0x8;
- /* 0x09 */ u8 field_0x9;
- /* 0x0A */ u8 field_0xa;
- /* 0x0B */ u8 field_0xb;
- /* 0x0C */ u8 field_0xc;
- /* 0x0D */ u8 field_0xd;
- /* 0x0E */ u8 field_0xe;
- /* 0x0F */ u8 field_0xf;
- /* 0x10 */ u8 field_0x10;
- /* 0x11 */ u8 field_0x11;
- /* 0x12 */ u8 field_0x12;
- /* 0x13 */ u8 field_0x13;
- /* 0x14 */ u8 field_0x14;
- /* 0x15 */ u8 field_0x15;
- /* 0x16 */ u8 field_0x16;
- /* 0x17 */ u8 field_0x17;
- /* 0x18 */ u8 field_0x18;
- /* 0x19 */ u8 field_0x19;
- /* 0x1A */ u8 field_0x1a;
- /* 0x1B */ u8 field_0x1b;
- /* 0x1C */ u8 field_0x1c;
- /* 0x1D */ u8 field_0x1d;
- /* 0x1E */ u8 field_0x1e;
- /* 0x1F */ u8 field_0x1f;
- /* 0x20 */ u8 field_0x20;
- /* 0x21 */ u8 field_0x21;
- /* 0x22 */ u8 field_0x22;
- /* 0x23 */ u8 field_0x23;
- /* 0x24 */ u8 field_0x24;
- /* 0x25 */ u8 field_0x25;
- /* 0x26 */ u8 field_0x26;
- /* 0x27 */ u8 field_0x27;
- /* 0x28 */ u8 field_0x28;
+ /* 0x05 */ GXColor field_0x5;
+ /* 0x09 */ GXColor field_0x9;
+ /* 0x0D */ GXColor field_0xd;
+ /* 0x11 */ GXColor field_0x11;
+ /* 0x15 */ GXColor field_0x15;
+ /* 0x19 */ GXColor field_0x19;
+ /* 0x1D */ GXColor field_0x1d;
+ /* 0x21 */ GXColor field_0x21;
+ /* 0x25 */ GXColor field_0x25;
/* 0x29 */ u8 field_0x29;
/* 0x2A */ u8 field_0x2a;
/* 0x2B */ u8 field_0x2b;
diff --git a/include/f_op/f_op_msg_mng.h b/include/f_op/f_op_msg_mng.h
index 8e0b0491..2965cea1 100644
--- a/include/f_op/f_op_msg_mng.h
+++ b/include/f_op/f_op_msg_mng.h
@@ -97,6 +97,10 @@ public:
JMSMesgEntry_c getMesgEntry(mesg_header*);
const char* getMessage(mesg_header*);
+ u32 getMesgNumber() {
+ return (mGroupID << 8) | mResMsgNo;
+ }
+
public:
/* 0x04 */ u32 mMsgIdx;
/* 0x08 */ u16 mGroupID;
@@ -150,7 +154,7 @@ public:
void dataInit();
f32 charLength(int, int, bool);
f32 rubyLength(int, bool);
- void stringLength();
+ u32 stringLength();
void stringShift();
void iconSelect(int, u8);
void iconIdxRefresh();
@@ -237,14 +241,14 @@ public:
#endif
void getIconColor(int) {}
- void getIconNum(int) {}
- void getIconPosX(int) {}
- void getIconPosY(int) {}
+ u8 getIconNum(int i_no) { return field_0x281[i_no]; }
+ int getIconPosX(int i_no) { return field_0x168[i_no]; }
+ int getIconPosY(int i_no) { return field_0x1A4[i_no]; }
void getIconScale(int) {}
- void setCharSpace(int) {}
- void setRubyCharSpace(int) {}
- void setLineSpace(int) {}
+ void setCharSpace(int i_space) { charSpace = i_space; }
+ void setRubyCharSpace(int i_space) { rubyCharSpace = i_space; }
+ void setLineSpace(int i_space) { lineSpace = i_space; }
void setOutMessage(char* param_0, char* param_1, char* param_2, char* param_3) {
field_0x60 = param_0;
@@ -258,63 +262,77 @@ public:
}
void setSelectMessage(char*, char*, char*, char*) {}
- void setMesgEntry(JMSMesgEntry_c*) {}
+ void setMesgEntry(JMSMesgEntry_c* i_entry) { mesgEntry = i_entry; }
void dec_keyWaitTimer() {}
void dec_waitTimer() {}
- void getCharAlpha() {}
- void getGradAlpha() {}
- void getLineCount() {}
- void getMesgStatus() {}
- void getNowCursorPos() {}
- void getRCharAlpha() {}
- void getRGradAlpha() {}
+ u8 getCharAlpha() { return field_0x293; } // ?
+ u8 getGradAlpha() { return field_0x292; } // ?
+ int getLineCount() { return lineCount; }
+ u8 getMesgStatus() { return mesgStatus; }
+ f32 getNowCursorPos() { return field_0x20; }
+ u8 getRCharAlpha() { return field_0x291; } // ?
+ u8 getRGradAlpha() { return field_0x290; } // ?
void getSelectFlag() {}
void getSelectLength() {}
void getStringColor() {}
void get_waitTimer() {}
- void resetNowLine() {}
+ void resetNowLine() { nowLine = 0; }
void selectArrow(J2DPicture*) {}
void setActorPosition(cXyz*) {}
- void setAimLine(int) {}
+ void setAimLine(int i_line) { aimLine = i_line; }
void setAutoSendFlagOff() {}
- void setBmgData(char*) {}
- void setCenterLineWidth(int) {}
- void setCharAlpha(u8, u8, u8, u8) {}
- void setCount(int) {}
- void setFont(JUTFont*) {}
- void setFontSize(int) {}
+ void setBmgData(char* i_data) { bmgData = i_data; }
+ void setCenterLineWidth(int i_width) { centerLineWidth = i_width; }
+
+ void setCharAlpha(u8 param_0, u8 param_1, u8 param_2, u8 param_3) {
+ field_0x290 = param_0;
+ field_0x291 = param_1;
+ field_0x292 = param_2;
+ field_0x293 = param_3;
+ }
+
+ void setCount(int i_count) { count = i_count; }
+ void setFont(JUTFont* i_font) { font[0] = i_font; }
+ void setFontSize(int i_size) { fontSize = i_size; }
void setHandSendFlagOff() {}
- void setLineCount(int) {}
- void setLineWidth(int) {}
- void setRubyFont(JUTFont*) {}
- void setRubyFontSize(int) {}
+ void setLineCount(int i_count) { lineCount = i_count; }
+ void setLineWidth(int i_width) { lineWidth = i_width; }
+ void setRubyFont(JUTFont* i_font) { font[1] = i_font; }
+ void setRubyFontSize(int i_size) { rubyFontSize = i_size; }
void setSelectFlagOff() {}
void setSelectNum(u8) {}
- void setSendSpeed(int) {}
- void setSpaceFlagOff() {}
+ void setSendSpeed(int i_speed) { sendSpeed = i_speed; }
+ void setSpaceFlagOff() { spaceFlag = 0; }
void setSpaceFlagOn() {}
- void setSpaceTimer(int) {}
+ void setSpaceTimer(int i_timer) { spaceTimer = i_timer; }
void setStringColor(u32) {}
void set_waitTimer(int) {}
void set_waitTimerZero() {}
- void shortCut() {}
+ void shortCut() {
+ field_0x299 = 1;
+ }
+
+ // fake, replace with real inline once it's figured out
+ u32 get_0x220(int i) {
+ return field_0x220[i];
+ }
public:
/* 0x004 */ JUTFont* font[2];
- /* 0x00C */ JMSMesgEntry_c* field_0x0C;
+ /* 0x00C */ JMSMesgEntry_c* mesgEntry;
/* 0x010 */ u32 field_0x10;
/* 0x014 */ f32 field_0x14;
/* 0x018 */ f32 field_0x18;
/* 0x01C */ f32 field_0x1C;
- /* 0x020 */ f32 field_0x20;
+ /* 0x020 */ f32 field_0x20; // NowCursorPos?
/* 0x024 */ f32 field_0x24;
/* 0x028 */ f32 field_0x28;
/* 0x02C */ u32 field_0x2C;
/* 0x030 */ u32 field_0x30;
/* 0x034 */ u32 field_0x34;
/* 0x038 */ u32 field_0x38;
- /* 0x03C */ const char* field_0x3C;
+ /* 0x03C */ const char* bmgData;
/* 0x040 */ char* field_0x40;
/* 0x044 */ char* field_0x44;
/* 0x048 */ char* field_0x48;
@@ -330,28 +348,28 @@ public:
/* 0x0E8 */ s32 field_0xE8[4];
/* 0x0F8 */ s32 field_0xF8[4];
/* 0x108 */ s32 field_0x108[4];
- /* 0x118 */ u32 field_0x118;
- /* 0x11C */ s32 field_0x11C;
- /* 0x120 */ s32 field_0x120;
- /* 0x124 */ s32 field_0x124;
- /* 0x128 */ s32 field_0x128;
- /* 0x12C */ u32 field_0x12C;
- /* 0x130 */ s32 field_0x130;
+ /* 0x118 */ int count;
+ /* 0x11C */ int charSpace;
+ /* 0x120 */ int lineSpace;
+ /* 0x124 */ int rubyCharSpace;
+ /* 0x128 */ int lineWidth;
+ /* 0x12C */ int centerLineWidth;
+ /* 0x130 */ int lineCount;
/* 0x134 */ u32 field_0x134;
- /* 0x138 */ u32 field_0x138;
- /* 0x13C */ u32 field_0x13C;
+ /* 0x138 */ int nowLine;
+ /* 0x13C */ int aimLine;
/* 0x140 */ u32 field_0x140;
- /* 0x144 */ s32 field_0x144;
+ /* 0x144 */ int fontSize;
/* 0x148 */ u32 field_0x148;
- /* 0x14C */ s32 field_0x14C;
+ /* 0x14C */ int rubyFontSize;
/* 0x150 */ int field_0x150;
/* 0x154 */ u32 field_0x154;
/* 0x158 */ u32 field_0x158;
- /* 0x15C */ u32 field_0x15C;
- /* 0x160 */ u32 field_0x160;
- /* 0x164 */ int field_0x164;
- /* 0x168 */ s32 field_0x168[0xF];
- /* 0x1A4 */ u32 field_0x1A4[0xF];
+ /* 0x15C */ int spaceTimer;
+ /* 0x160 */ int sendSpeed;
+ /* 0x164 */ int field_0x164; // keyWaitTimer?
+ /* 0x168 */ int field_0x168[0xF]; // IconPosX
+ /* 0x1A4 */ int field_0x1A4[0xF]; // IconPosY
/* 0x1A4 */ u32 field_0x1E0[0xF];
/* 0x21C */ int field_0x21C;
/* 0x21C */ u32 field_0x220[0xF];
@@ -363,7 +381,7 @@ public:
/* 0x270 */ f32 field_0x270;
/* 0x274 */ f32 field_0x274;
/* 0x278 */ f32 field_0x278;
- /* 0x27C */ u8 field_0x27C;
+ /* 0x27C */ u8 mesgStatus;
/* 0x27D */ u8 field_0x27D;
/* 0x27E */ u8 field_0x27E;
/* 0x27F */ u8 field_0x27F;
@@ -373,17 +391,17 @@ public:
/* 0x291 */ u8 field_0x291;
/* 0x292 */ u8 field_0x292;
/* 0x293 */ u8 field_0x293;
- /* 0x294 */ u8 field_0x294;
+ /* 0x294 */ u8 selectFlag;
/* 0x295 */ u8 field_0x295;
#if VERSION > VERSION_DEMO
/* 0x296 */ u8 field_0x296;
#endif
- /* 0x297 */ u8 field_0x297;
- /* 0x298 */ u8 field_0x298;
+ /* 0x297 */ u8 autoSendFlag;
+ /* 0x298 */ u8 handSendFlag;
/* 0x299 */ u8 field_0x299;
/* 0x29A */ u8 field_0x29A;
/* 0x29B */ u8 field_0x29B;
- /* 0x29C */ u8 field_0x29C;
+ /* 0x29C */ u8 spaceFlag;
/* 0x29D */ u8 field_0x29D;
};
diff --git a/include/m_Do/m_Do_controller_pad.h b/include/m_Do/m_Do_controller_pad.h
index bf5ef949..bc8c9ada 100644
--- a/include/m_Do/m_Do_controller_pad.h
+++ b/include/m_Do/m_Do_controller_pad.h
@@ -33,6 +33,16 @@ extern interface_of_controller_pad g_mDoCPd_cpadInfo[4];
#define CPad_CHECK_TRIG_RIGHT(padNo) (g_mDoCPd_cpadInfo[padNo].mButtonTrig.right)
#define CPad_CHECK_TRIG_LEFT(padNo) (g_mDoCPd_cpadInfo[padNo].mButtonTrig.left)
+#define CPad_GET_STICK_POS_X(padNo) (g_mDoCPd_cpadInfo[padNo].mMainStickPosX)
+#define CPad_GET_STICK_POS_Y(padNo) (g_mDoCPd_cpadInfo[padNo].mMainStickPosY)
+#define CPad_GET_STICK_VALUE(padNo) (g_mDoCPd_cpadInfo[padNo].mMainStickValue)
+#define CPad_GET_STICK_ANGLE(padNo) (g_mDoCPd_cpadInfo[padNo].mMainStickAngle)
+
+#define CPad_GET_SUBSTICK_POS_X(padNo) (g_mDoCPd_cpadInfo[padNo].mCStickPosX)
+#define CPad_GET_SUBSTICK_POS_Y(padNo) (g_mDoCPd_cpadInfo[padNo].mCStickPosY)
+#define CPad_GET_SUBSTICK_VALUE(padNo) (g_mDoCPd_cpadInfo[padNo].mCStickValue)
+#define CPad_GET_SUBSTICK_ANGLE(padNo) (g_mDoCPd_cpadInfo[padNo].mCStickAngle)
+
int mDoCPd_Create();
int mDoCPd_Read();
diff --git a/src/d/d_drawlist.cpp b/src/d/d_drawlist.cpp
index 44f82250..6f8a0ed0 100644
--- a/src/d/d_drawlist.cpp
+++ b/src/d/d_drawlist.cpp
@@ -533,8 +533,8 @@ void dDlst_2Dm_c::draw() {
GXLoadTlut(&mTex[1].mTlutObj, GXGetTexObjTlut(&mTex[1].mTexObj));
GXSetNumChans(0);
- GXSetTevColor(GX_TEVREG0, mC0);
- GXSetTevColor(GX_TEVREG1, mC1);
+ GXSetTevColor(GX_TEVREG0, mBlack);
+ GXSetTevColor(GX_TEVREG1, mWhite);
GXSetNumTexGens(2);
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);
diff --git a/src/d/d_menu_option.cpp b/src/d/d_menu_option.cpp
index f98ffc4c..19cf9eb8 100644
--- a/src/d/d_menu_option.cpp
+++ b/src/d/d_menu_option.cpp
@@ -665,29 +665,29 @@ void dMenu_Option_c::noteSet() {
msg_entry = msgGet.getMesgEntry(head_p);
msgDataProc.dataInit();
- msgDataProc.field_0x3C = mesg;
+ msgDataProc.bmgData = mesg;
msgDataProc.setOutMessage(mD38, mD3C, mD40, mD44);
msgDataProc.font[0] = mD2C;
msgDataProc.font[1] = mD30;
- msgDataProc.field_0x11C = ((J2DTextBox*)m740[0].pane)->getCharSpace();
- msgDataProc.field_0x124 = ((J2DTextBox*)m740[1].pane)->getCharSpace();
- msgDataProc.field_0x120 = ((J2DTextBox*)m740[0].pane)->getLineSpace();
- msgDataProc.field_0x0C = &msg_entry;
- msgDataProc.field_0x144 = f31;
- msgDataProc.field_0x14C = f30;
- msgDataProc.field_0x128 = 0x1D0;
- msgDataProc.field_0x12C = 0x1D0;
- msgDataProc.field_0x160 = 2;
- msgDataProc.field_0x15C = 0;
+ msgDataProc.charSpace = ((J2DTextBox*)m740[0].pane)->getCharSpace();
+ msgDataProc.rubyCharSpace = ((J2DTextBox*)m740[1].pane)->getCharSpace();
+ msgDataProc.lineSpace = ((J2DTextBox*)m740[0].pane)->getLineSpace();
+ msgDataProc.mesgEntry = &msg_entry;
+ msgDataProc.fontSize = f31;
+ msgDataProc.rubyFontSize = f30;
+ msgDataProc.lineWidth = 0x1D0;
+ msgDataProc.centerLineWidth = 0x1D0;
+ msgDataProc.sendSpeed = 2;
+ msgDataProc.spaceTimer = 0;
msgDataProc.field_0x299 = 1;
- msgDataProc.field_0x29C = 0;
+ msgDataProc.spaceFlag = 0;
msgDataProc.stringLength();
msgDataProc.stringShift();
msgDataProc.iconIdxRefresh();
- s16 r26 = msgDataProc.field_0x130;
- msgDataProc.field_0x130 = 0;
+ s16 r26 = msgDataProc.lineCount;
+ msgDataProc.lineCount = 0;
msgDataProc.stringSet();
f32 f30_2 = (m740[0].pane->getHeight() - f31 - (f32)r26 * ((J2DTextBox*)m740[0].pane)->getLineSpace()) / 2.0f;
((J2DTextBox*)m740[0].pane)->shiftSet(0.0f, f30_2);
diff --git a/src/d/d_message.cpp b/src/d/d_message.cpp
index 923f3d4f..827966ed 100644
--- a/src/d/d_message.cpp
+++ b/src/d/d_message.cpp
@@ -1,228 +1,1238 @@
-//
-// Generated by dtk
-// Translation Unit: d_message.cpp
-//
-
#include "d/dolzel.h" // IWYU pragma: keep
#include "d/d_message.h"
+#include "d/d_meter.h"
+#include "d/d_kankyo.h"
+#include "d/d_s_play.h"
#include "f_op/f_op_msg.h"
+#include "JSystem/J2DGraph/J2DTextBox.h"
+#include "JSystem/J2DGraph/J2DOrthoGraph.h"
+#include "JSystem/JKernel/JKRExpHeap.h"
+#include "m_Do/m_Do_controller_pad.h"
+#include "stdio.h"
+
+void dMsg2_messageDataInit(sub_msg2_class* i_Msg, int);
+void dMsg2_textPosition(sub_msg2_class* i_Msg, u8 i_index);
+void dMsg2_yose_select(sub_msg2_class* i_Msg, u8 i_index);
+void dMsg2_setCharAlpha(sub_msg2_class* i_Msg, u8 i_index);
+u8 dMsg2_aimBrightness();
+
+static int dMsg2_popSpeed;
+static J2DScreen* sScreen2[3];
+static J2DPicture* bbutton_icon[8][3];
+static J2DPicture* bbutton_kage[8][3];
+static s16 bbuttonTimer[8][3];
+static dDlst_2DMSG2_c message;
+static dDlst_2Dm_c board;
+static dDlst_2DCopy_c capture;
+
+static u8 dMsg2_tex_i4_color[] = {
+ 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x02, 0x02, 0x02, 0x03, 0x04, 0x06, 0x07, 0x09, 0x0b, 0x0d, 0x0f, 0x12, 0x16, 0x1c, 0x22, 0x2a, 0x32, 0x39,
+ 0x41, 0x4b, 0x54, 0x5e, 0x67, 0x72, 0x7c, 0x87, 0x8f, 0x98, 0xa2, 0xac, 0xb3, 0xbb, 0xc2, 0xca, 0xd0, 0xd8, 0xdd, 0xe1, 0xe7, 0xea, 0xee, 0xf1,
+ 0xf3, 0xf5, 0xf7, 0xf9, 0xfb, 0xfe, 0xfd, 0xfd, 0xfd, 0xfd, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfd, 0xfd, 0xfd,
+ 0xfd, 0xfb, 0xfb, 0xf9, 0xf7, 0xf5, 0xf3, 0xf1, 0xee, 0xea, 0xe7, 0xe1, 0xdd, 0xd8, 0xd0, 0xc9, 0xc2, 0xbc, 0xb3, 0xab, 0xa2, 0x99, 0x8f, 0x87,
+ 0x7c, 0x72, 0x68, 0x5e, 0x54, 0x4a, 0x41, 0x3a, 0x32, 0x2a, 0x22, 0x1d, 0x15, 0x12, 0x0f, 0x0d, 0x0b, 0x09, 0x07, 0x05, 0x04, 0x04, 0x03, 0x02,
+};
/* 801E73B4-801E74F4 .text dMsg2_value_init__FP14sub_msg2_classUc */
-void dMsg2_value_init(sub_msg2_class*, u8) {
- /* Nonmatching */
+// NONMATCHING - weird stuff with color OR'ing
+void dMsg2_value_init(sub_msg2_class* i_Msg, u8 i_index) {
+ static const u32 colorTable[] = {
+ 0x00000000,
+ 0xB4000000,
+ 0x82828200,
+ 0x0000AA00,
+ 0xF0F01E00,
+ 0x82FFFF00,
+ 0x6400FF00,
+ 0x50505000,
+ 0xFFB40000,
+ };
+
+ char text_buf[32];
+ char textSdw_buf[32];
+ char ruby_buf[32];
+ char rubySdw_buf[32];
+
+ const u32 color = colorTable[i_Msg->colorNo];
+ int i = i_index;
+
+ int temp_r5 = i_Msg->msgDataProc[i].getRGradAlpha();
+ int temp_r6 = i_Msg->msgDataProc[i].getRCharAlpha();
+ int var_r30 = i_Msg->msgDataProc[i].getGradAlpha();
+ int var_r29 = i_Msg->msgDataProc[i].getCharAlpha();
+
+ u32 temp_a = color | temp_r5;
+ u32 temp_b = color | temp_r6;
+ u32 temp_c = color | var_r30;
+ u32 temp_d = color | var_r29;
+
+ sprintf(text_buf, "\x1b""CC[%08x]\x1bGC[%08x]", temp_a, temp_b);
+ sprintf(ruby_buf, "\x1b""CC[%08x]\x1bGC[%08x]", temp_c, temp_d);
+ sprintf(textSdw_buf, "\x1b""CC[%08x]\x1bGC[%08x]", temp_r5, temp_r6);
+ sprintf(rubySdw_buf, "\x1b""CC[%08x]\x1bGC[%08x]", var_r30, var_r29);
+
+ JKRHeap* heap = mDoExt_setCurrentHeap(i_Msg->Heap);
+
+ strcpy(i_Msg->output_text[i], text_buf);
+ strcpy(i_Msg->output_ruby[i], ruby_buf);
+ strcpy(i_Msg->output_textSdw[i], textSdw_buf);
+ strcpy(i_Msg->output_rubySdw[i], rubySdw_buf);
+
+ mDoExt_setCurrentHeap(heap);
}
/* 801E74F4-801E75A8 .text dMsg2_setString__FP14sub_msg2_classUc */
-void dMsg2_setString(sub_msg2_class*, u8) {
- /* Nonmatching */
+void dMsg2_setString(sub_msg2_class* i_Msg, u8 i_index) {
+ JKRHeap* heap = mDoExt_setCurrentHeap(i_Msg->Heap);
+
+ ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->setString(i_Msg->output_text[i_index]);
+ ((J2DTextBox*)i_Msg->ruby_pane[i_index].pane)->setString(i_Msg->output_ruby[i_index]);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i_index].pane)->setString(i_Msg->output_textSdw[i_index]);
+ ((J2DTextBox*)i_Msg->rubySdw_pane[i_index].pane)->setString(i_Msg->output_rubySdw[i_index]);
+
+ mDoExt_setCurrentHeap(heap);
}
/* 801E75A8-801E75CC .text dMsg2_messagePaneShow__FP14sub_msg2_classUc */
-void dMsg2_messagePaneShow(sub_msg2_class*, u8) {
- /* Nonmatching */
+void dMsg2_messagePaneShow(sub_msg2_class* i_Msg, u8 i_index) {
+ i_Msg->text_pane[i_index].pane->show();
+ i_Msg->ruby_pane[i_index].pane->show();
}
/* 801E75CC-801E75F0 .text dMsg2_messagePaneHide__FP14sub_msg2_classUc */
-void dMsg2_messagePaneHide(sub_msg2_class*, u8) {
- /* Nonmatching */
+void dMsg2_messagePaneHide(sub_msg2_class* i_Msg, u8 i_index) {
+ i_Msg->text_pane[i_index].pane->hide();
+ i_Msg->ruby_pane[i_index].pane->hide();
}
/* 801E75F0-801E76DC .text dMsg2_outFontHide__FP14sub_msg2_classUc */
-void dMsg2_outFontHide(sub_msg2_class*, u8) {
- /* Nonmatching */
+void dMsg2_outFontHide(sub_msg2_class* i_Msg, u8 i_index) {
+ JKRHeap* heap = mDoExt_setCurrentHeap(i_Msg->Heap);
+
+ for (int i = 0; i < 8; i++) {
+ bbutton_icon[i][i_index]->hide();
+ bbutton_kage[i][i_index]->hide();
+
+ bbutton_icon[i][i_index]->rotate(0.0f);
+ bbutton_kage[i][i_index]->rotate(0.0f);
+
+ bbuttonTimer[i][i_index] = -1;
+ }
+
+ mDoExt_setCurrentHeap(heap);
}
/* 801E76DC-801E7714 .text dMsg2_arrowUpShow__FP14sub_msg2_class */
-void dMsg2_arrowUpShow(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_arrowUpShow(sub_msg2_class* i_Msg) {
+ fopMsgM_setInitAlpha(&i_Msg->field_0xbb0);
+ fopMsgM_setInitAlpha(&i_Msg->field_0xbe8);
}
/* 801E7714-801E774C .text dMsg2_arrowUpHide__FP14sub_msg2_class */
-void dMsg2_arrowUpHide(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_arrowUpHide(sub_msg2_class* i_Msg) {
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xbb0);
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xbe8);
}
/* 801E774C-801E7784 .text dMsg2_arrowDownShow__FP14sub_msg2_class */
-void dMsg2_arrowDownShow(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_arrowDownShow(sub_msg2_class* i_Msg) {
+ fopMsgM_setInitAlpha(&i_Msg->field_0xc20);
+ fopMsgM_setInitAlpha(&i_Msg->field_0xc58);
}
/* 801E7784-801E77BC .text dMsg2_arrowDownHide__FP14sub_msg2_class */
-void dMsg2_arrowDownHide(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_arrowDownHide(sub_msg2_class* i_Msg) {
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xc20);
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xc58);
}
/* 801E77BC-801E77F4 .text dMsg2_dotShow__FP14sub_msg2_class */
-void dMsg2_dotShow(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_dotShow(sub_msg2_class* i_Msg) {
+ fopMsgM_setInitAlpha(&i_Msg->field_0xc90);
+ fopMsgM_setInitAlpha(&i_Msg->field_0xcc8);
}
/* 801E77F4-801E782C .text dMsg2_dotHide__FP14sub_msg2_class */
-void dMsg2_dotHide(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_dotHide(sub_msg2_class* i_Msg) {
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xc90);
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xcc8);
}
/* 801E782C-801E79B4 .text dMsg2_multiTexInit__FP14sub_msg2_class */
-void dMsg2_multiTexInit(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_multiTexInit(sub_msg2_class* i_Msg) {
+ JKRReadTypeResource(i_Msg->Tex[0], 0x11800, 'TIMG', "hukidashi_0212.bti", dComIfGp_getMsgArchive());
+#if VERSION <= VERSION_JPN
+ DCFlushRangeNoSync(i_Msg->Tex[0], 0x11800);
+#else
+ DCStoreRangeNoSync(i_Msg->Tex[0], 0x11800);
+#endif
+
+ if (i_Msg->mesgEntry.mTextboxType == 6) {
+ JKRReadTypeResource(i_Msg->Tex[1], 0x11800, 'TIMG', "hukidashi_06.bti", dComIfGp_getMsgArchive());
+#if VERSION <= VERSION_JPN
+ DCFlushRangeNoSync(i_Msg->Tex[1], 0x11800);
+#else
+ DCStoreRangeNoSync(i_Msg->Tex[1], 0x11800);
+#endif
+ board.init(i_Msg->Tex[0], i_Msg->Tex[1], 1.0f, 1.0f);
+ } else if (i_Msg->mesgEntry.mTextboxType == 7) {
+ JKRReadTypeResource(i_Msg->Tex[1], 0x11800, 'TIMG', "hukidashi_07.bti", dComIfGp_getMsgArchive());
+#if VERSION <= VERSION_JPN
+ DCFlushRangeNoSync(i_Msg->Tex[1], 0x11800);
+#else
+ DCStoreRangeNoSync(i_Msg->Tex[1], 0x11800);
+#endif
+ board.init(i_Msg->Tex[0], i_Msg->Tex[1], 1.0f, 1.0f);
+ } else {
+ JKRReadTypeResource(i_Msg->Tex[1], 0x11800, 'TIMG', "hukidashi_02.bti", dComIfGp_getMsgArchive());
+#if VERSION <= VERSION_JPN
+ DCFlushRangeNoSync(i_Msg->Tex[1], 0x11800);
+#else
+ DCStoreRangeNoSync(i_Msg->Tex[1], 0x11800);
+#endif
+ board.init(i_Msg->Tex[0], i_Msg->Tex[1], 1.0f, 1.0f);
+ }
}
/* 801E79B4-801E7A74 .text dMsg2_fontdataInit__FP14sub_msg2_class */
-void dMsg2_fontdataInit(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_fontdataInit(sub_msg2_class* i_Msg) {
+ i_Msg->mx = mDoExt_getMesgFont();
+ JUT_ASSERT(VERSION_SELECT(555, 555, 555, 555), i_Msg->mx != NULL);
+
+ i_Msg->rx = mDoExt_getRubyFont();
+ JUT_ASSERT(VERSION_SELECT(557, 557, 558, 558), i_Msg->rx != NULL);
}
/* 801E7A74-801E7AB8 .text dMsg2_screenDataSet__FP14sub_msg2_classUc */
-void dMsg2_screenDataSet(sub_msg2_class*, u8) {
- /* Nonmatching */
+void dMsg2_screenDataSet(sub_msg2_class* i_Msg, u8 i_index) {
+ dMsg2_value_init(i_Msg, i_index);
+ dMsg2_setString(i_Msg, i_index);
}
/* 801E7AB8-801E8154 .text dMsg2_screenDataInit__FP14sub_msg2_classUc */
-void dMsg2_screenDataInit(sub_msg2_class*, u8) {
- /* Nonmatching */
+// NONMATCHING - some reg alloc
+void dMsg2_screenDataInit(sub_msg2_class* i_Msg, u8 i_index) {
+ fopMsgM_setPaneData(&i_Msg->text_pane[i_index], sScreen2[i_index]->search('tx23'));
+ fopMsgM_setPaneData(&i_Msg->ruby_pane[i_index], sScreen2[i_index]->search('tx29'));
+ fopMsgM_setPaneData(&i_Msg->textSdw_pane[i_index], sScreen2[i_index]->search('tx20'));
+ fopMsgM_setPaneData(&i_Msg->rubySdw_pane[i_index], sScreen2[i_index]->search('tx26'));
+
+ i_Msg->textSdw_pane[i_index].pane->hide();
+ i_Msg->rubySdw_pane[i_index].pane->hide();
+
+#if VERSION >= VERSION_USA
+ i_Msg->text_pane[i_index].mSizeOrig.y += 10.0f;
+ i_Msg->text_pane[i_index].mSize.y = i_Msg->text_pane[i_index].mSizeOrig.y;
+ fopMsgM_cposMove(&i_Msg->text_pane[i_index]);
+
+ i_Msg->textSdw_pane[i_index].mSizeOrig.y += 10.0f;
+ i_Msg->textSdw_pane[i_index].mSize.y = i_Msg->textSdw_pane[i_index].mSizeOrig.y;
+ fopMsgM_cposMove(&i_Msg->textSdw_pane[i_index]);
+#endif
+
+ fopMsgM_setPaneData(&i_Msg->field_0xd00[i_index], sScreen2[i_index]->search('ms22'));
+ fopMsgM_setPaneData(&i_Msg->field_0xda8[i_index], sScreen2[i_index]->search('ms20'));
+
+ sScreen2[i_index]->search('tx24')->hide();
+ sScreen2[i_index]->search('tx30')->hide();
+ sScreen2[i_index]->search('tx21')->hide();
+ sScreen2[i_index]->search('tx27')->hide();
+
+ ((J2DPicture*)i_Msg->field_0xd00[i_index].pane)->setWhite(0);
+ ((J2DPicture*)i_Msg->field_0xda8[i_index].pane)->setWhite(0);
+
+ if (i_index == 0) {
+ fopMsgM_setPaneData(&i_Msg->field_0xbb0, sScreen2[i_index]->search('yz21'));
+ fopMsgM_setPaneData(&i_Msg->field_0xc20, sScreen2[i_index]->search('yz20'));
+ fopMsgM_setPaneData(&i_Msg->field_0xc90, sScreen2[i_index]->search('dt20'));
+ fopMsgM_setPaneData(&i_Msg->field_0xbe8, sScreen2[i_index]->search('yz23'));
+ fopMsgM_setPaneData(&i_Msg->field_0xc58, sScreen2[i_index]->search('yz22'));
+ fopMsgM_setPaneData(&i_Msg->field_0xcc8, sScreen2[i_index]->search('dt21'));
+
+ ((J2DPicture*)i_Msg->field_0xbe8.pane)->setWhite(0x000000FF);
+ ((J2DPicture*)i_Msg->field_0xc58.pane)->setWhite(0x000000FF);
+ ((J2DPicture*)i_Msg->field_0xcc8.pane)->setWhite(0x000000FF);
+ } else {
+ sScreen2[i_index]->search('yz21')->hide();
+ sScreen2[i_index]->search('yz20')->hide();
+ sScreen2[i_index]->search('dt20')->hide();
+ sScreen2[i_index]->search('yz23')->hide();
+ sScreen2[i_index]->search('yz22')->hide();
+ sScreen2[i_index]->search('dt21')->hide();
+ }
+
+ ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->setFont(i_Msg->mx);
+ ((J2DTextBox*)i_Msg->ruby_pane[i_index].pane)->setFont(i_Msg->rx);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i_index].pane)->setFont(i_Msg->mx);
+ ((J2DTextBox*)i_Msg->rubySdw_pane[i_index].pane)->setFont(i_Msg->rx);
+
+ f32 var_f31;
+ J2DTextBox::TFontSize size;
+#if VERSION <= VERSION_JPN
+ if (!g_msgDHIO.field_0x08) {
+ size.mSizeX = (int)g_messageHIO.field_0x32;
+ size.mSizeY = (int)g_messageHIO.field_0x32;
+
+ J2DTextBox::TFontSize size2;
+ size2.mSizeX = g_msgHIO.field_0x68;
+ size2.mSizeY = g_msgHIO.field_0x68;
+
+ ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->setFontSize(size);
+ ((J2DTextBox*)i_Msg->ruby_pane[i_index].pane)->setFontSize(size2);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i_index].pane)->setFontSize(size);
+ ((J2DTextBox*)i_Msg->rubySdw_pane[i_index].pane)->setFontSize(size2);
+ } else {
+ size.mSizeX = g_msgHIO.field_0x70;
+ size.mSizeY = g_msgHIO.field_0x70;
+
+ ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->setFontSize(size);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i_index].pane)->setFontSize(size);
+ }
+#else
+ size.mSizeX = g_msgHIO.field_0x70;
+ size.mSizeY = g_msgHIO.field_0x70;
+
+ ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->setFontSize(size);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i_index].pane)->setFontSize(size);
+#endif
+
+ ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->setCharSpace(0.0f);
+ ((J2DTextBox*)i_Msg->ruby_pane[i_index].pane)->setCharSpace(0.0f);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i_index].pane)->setCharSpace(0.0f);
+ ((J2DTextBox*)i_Msg->rubySdw_pane[i_index].pane)->setCharSpace(0.0f);
+
+#if VERSION <= VERSION_JPN
+ if (!g_msgDHIO.field_0x08) {
+ ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->setLineSpace(42.0f);
+ ((J2DTextBox*)i_Msg->ruby_pane[i_index].pane)->setLineSpace(42.0f);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i_index].pane)->setLineSpace(42.0f);
+ ((J2DTextBox*)i_Msg->rubySdw_pane[i_index].pane)->setLineSpace(42.0f);
+ } else {
+ ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->setLineSpace(g_msgHIO.field_0x5e);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i_index].pane)->setLineSpace(g_msgHIO.field_0x5e);
+ }
+#else
+ ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->setLineSpace(g_msgHIO.field_0x5e);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i_index].pane)->setLineSpace(g_msgHIO.field_0x5e);
+#endif
+
+ i_Msg->field_0xeb4 = size.mSizeX;
+ i_Msg->field_0xeb8 = var_f31;
}
/* 801E8154-801E8260 .text dMsg2_ScreenDataValueInit__FP14sub_msg2_class */
-void dMsg2_ScreenDataValueInit(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_ScreenDataValueInit(sub_msg2_class* i_Msg) {
+ J2DPane* pane = i_Msg->text_pane[0].pane;
+ i_Msg->field_0xeb0 = ((J2DTextBox*)pane)->getLineSpace() / 2;
+ i_Msg->field_0xe94 = pane->getHeight() + g_messageHIO.field_0x3c;
+
+ fopMsgM_paneTrans(&i_Msg->text_pane[0], 0.0f, 0.0f);
+ fopMsgM_paneTrans(&i_Msg->text_pane[1], 0.0f, i_Msg->field_0xe94);
+ fopMsgM_paneTrans(&i_Msg->text_pane[2], 0.0f, -i_Msg->field_0xe94);
+
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xbb0);
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xbe8);
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xc20);
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xc58);
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xc90);
+ fopMsgM_setNowAlphaZero(&i_Msg->field_0xcc8);
+
+ for (int i = 0; i < 3; i++) {
+ dMsg2_messageDataInit(i_Msg, i);
+ }
}
/* 801E8260-801E82B8 .text dMsg2_stickInfoInit__FP14sub_msg2_class */
-void dMsg2_stickInfoInit(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_stickInfoInit(sub_msg2_class* i_Msg) {
+ if (CPad_GET_STICK_POS_Y(0) > 0.7f || CPad_GET_STICK_POS_Y(3) > 0.7f) {
+ i_Msg->field_0xedd = 1;
+ } else if (CPad_GET_STICK_POS_Y(0) < 0.7f || CPad_GET_STICK_POS_Y(3) < 0.7f) {
+ i_Msg->field_0xedd = 2;
+ } else {
+ i_Msg->field_0xedd = 0;
+ }
}
/* 801E82B8-801E833C .text dMsg2_stickInfoCheck__FP14sub_msg2_class */
-void dMsg2_stickInfoCheck(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_stickInfoCheck(sub_msg2_class* i_Msg) {
+ if (i_Msg->field_0xedd == 1) {
+ if (CPad_GET_STICK_POS_Y(0) <= 0.0f || CPad_GET_STICK_POS_Y(3) <= 0.0f) {
+ i_Msg->field_0xedd = 0;
+ }
+ } else if (i_Msg->field_0xedd == 2) {
+ if (CPad_GET_STICK_POS_Y(0) >= 0.0f || CPad_GET_STICK_POS_Y(3) >= 0.0f) {
+ i_Msg->field_0xedd = 0;
+ }
+ }
}
/* 801E833C-801E84E8 .text dMsg2_multiTexDraw__FP14sub_msg2_classssss */
-void dMsg2_multiTexDraw(sub_msg2_class*, s16, s16, s16, s16) {
- /* Nonmatching */
+void dMsg2_multiTexDraw(sub_msg2_class* i_Msg, s16 param_1, s16 param_2, s16 param_3, s16 param_4) {
+ f32 var_f31 = (i_Msg->field_0xeac * g_messageHIO.field_0x5b) / 255.0f;
+
+ board.setPos(param_1, param_2, param_1 + param_3, param_2 + param_4);
+
+ if (i_Msg->mesgEntry.mTextboxType == 7) {
+ board.setBlackColor((GXColor){0xFF, 0xFF, 0xFF, 0xFF});
+ board.setWhiteColor((GXColor){0x00, 0x00, 0x00, 0x00});
+ } else {
+ board.setBlackColor((GXColor){0xF0, 0xF0, 0xF0, 0xDC});
+ board.setWhiteColor((GXColor){0x78, 0x78, 0x8C, 0x00});
+ }
+
+ board.setAlpha(var_f31);
+ board.setScroll(0, 0, 0);
+ board.setScroll(1, 0, i_Msg->field_0xec8);
+ dComIfGd_set2DOpa(&board);
}
/* 801E84E8-801E8668 .text dMsg2_messageOut__FP14sub_msg2_classUci */
-void dMsg2_messageOut(sub_msg2_class*, u8, int) {
- /* Nonmatching */
+void dMsg2_messageOut(sub_msg2_class* i_Msg, u8 i_index, int i_aimLine) {
+ i_Msg->field_0xecc[i_index] = 0;
+ dMsg2_messagePaneShow(i_Msg, i_index);
+ dMsg2_messageDataInit(i_Msg, i_index);
+
+ i_Msg->msgDataProc[i_index].setCount(0);
+ i_Msg->msgDataProc[i_index].resetNowLine();
+ i_Msg->msgDataProc[i_index].setAimLine(i_aimLine);
+ dMsg2_yose_select(i_Msg, i_index);
+ i_Msg->msgDataProc[i_index].shortCut();
+ dMsg2_setCharAlpha(i_Msg, i_index);
+ i_Msg->msgDataProc[i_index].stringSet();
+
+ for (int i = 0; i < 8; i++) {
+ u8 var_r30 = i_Msg->msgDataProc[i_index].getIconNum(i);
+ u32 var_r29 = i_Msg->msgDataProc[i_index].get_0x220(i);
+
+ if (var_r30 != 0xFF && bbuttonTimer[i][i_index] == -1) {
+ JKRHeap* heap = mDoExt_setCurrentHeap(i_Msg->Heap);
+
+ if ((var_r30 == 10 || var_r30 == 11 || var_r30 == 12 || var_r30 == 13 || var_r30 == 0x15 || var_r30 == 0x17) && var_r29 == 0) {
+ var_r29 = -1;
+ }
+
+ fopMsgM_outFontSet(bbutton_icon[i][i_index], bbutton_kage[i][i_index], &bbuttonTimer[i][i_index], var_r29, var_r30);
+
+ mDoExt_setCurrentHeap(heap);
+ }
+ }
+
+ dMsg2_setString(i_Msg, i_index);
}
/* 801E8668-801E86E8 .text dMsg2_yose_select__FP14sub_msg2_classUc */
-void dMsg2_yose_select(sub_msg2_class*, u8) {
- /* Nonmatching */
+void dMsg2_yose_select(sub_msg2_class* i_Msg, u8 i_index) {
+ i_Msg->msgDataProc[i_index].count = i_Msg->msgDataProc[i_index].stringLength();
+ i_Msg->field_0xecc[i_index] = i_Msg->msgDataProc[i_index].lineCount;
+ i_Msg->msgDataProc[i_index].lineCount = 0;
+ i_Msg->msgDataProc[i_index].stringShift();
+ dMsg2_textPosition(i_Msg, i_index);
}
/* 801E86E8-801E8798 .text dMsg2_textPosition__FP14sub_msg2_classUc */
-void dMsg2_textPosition(sub_msg2_class*, u8) {
- /* Nonmatching */
+// NONMATCHING - small reg alloc
+void dMsg2_textPosition(sub_msg2_class* i_Msg, u8 i_index) {
+ int temp_r0 = i_Msg->field_0xeb0 * (3 - i_Msg->field_0xecc[i_index]);
+ ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->shiftSet(0.0f, temp_r0);
+ ((J2DTextBox*)i_Msg->ruby_pane[i_index].pane)->shiftSet(0.0f, temp_r0);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i_index].pane)->shiftSet(0.0f, temp_r0);
+ ((J2DTextBox*)i_Msg->rubySdw_pane[i_index].pane)->shiftSet(0.0f, temp_r0);
}
/* 801E8798-801E880C .text dMsg2_rubySet__FP14sub_msg2_class */
-void dMsg2_rubySet(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_rubySet(sub_msg2_class* i_Msg) {
+ if (i_Msg->msg.mStatus == 5 || i_Msg->msg.mStatus == 6 || i_Msg->msg.mStatus == 7 || i_Msg->msg.mStatus == 10) {
+ for (int i = 0; i < 3; i++) {
+ if (!g_messageHIO.field_0x4b) {
+ i_Msg->ruby_pane[i].pane->hide();
+ } else {
+ i_Msg->ruby_pane[i].pane->show();
+ }
+ }
+ }
}
/* 801E880C-801E8994 .text dMsg2_arrowMove__FP14sub_msg2_class */
-void dMsg2_arrowMove(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_arrowMove(sub_msg2_class* i_Msg) {
+ i_Msg->field_0xebc++;
+ if (i_Msg->field_0xebc > 12) {
+ i_Msg->field_0xebc -= 12;
+ }
+
+ i_Msg->field_0xc20.pane->move(i_Msg->field_0xc20.mPosTopLeftOrig.x, (i_Msg->field_0xc20.mPosTopLeftOrig.y - 3.0f) - abs(6 - i_Msg->field_0xebc));
+ i_Msg->field_0xc58.pane->move(i_Msg->field_0xc20.mPosTopLeftOrig.x, (i_Msg->field_0xc20.mPosTopLeftOrig.y - 3.0f) - abs(6 - i_Msg->field_0xebc));
+ i_Msg->field_0xbb0.pane->move(i_Msg->field_0xbb0.mPosTopLeftOrig.x, (i_Msg->field_0xbb0.mPosTopLeftOrig.y - 3.0f) + abs(6 - i_Msg->field_0xebc));
+ i_Msg->field_0xbe8.pane->move(i_Msg->field_0xbb0.mPosTopLeftOrig.x, (i_Msg->field_0xbb0.mPosTopLeftOrig.y - 3.0f) + abs(6 - i_Msg->field_0xebc));
}
/* 801E8994-801E8A70 .text dMsg2_aimAlphaSqare__FP14sub_msg2_classii */
-void dMsg2_aimAlphaSqare(sub_msg2_class*, int, int) {
- /* Nonmatching */
+// NONMATCHING - float reg alloc
+void dMsg2_aimAlphaSqare(sub_msg2_class* i_Msg, int param_0, int param_1) {
+ if (param_1 < 0) {
+ param_1 = 0;
+ } else if (param_1 > param_0) {
+ param_1 = param_0;
+ }
+
+ i_Msg->field_0xea8 = 255.0f - (255.0f - dMsg2_aimBrightness()) * (((f32)param_1 * (f32)param_1) / ((f32)param_0 * (f32)param_0));
}
/* 801E8A70-801E8B90 .text dMsg2_aimAlphaSqrt__FP14sub_msg2_classii */
-void dMsg2_aimAlphaSqrt(sub_msg2_class*, int, int) {
- /* Nonmatching */
+void dMsg2_aimAlphaSqrt(sub_msg2_class* i_Msg, int param_0, int param_1) {
+ if (param_1 < 0) {
+ param_1 = 0;
+ } else if (param_1 > param_0) {
+ param_1 = param_0;
+ }
+
+ i_Msg->field_0xea8 = 255.0f - (255.0f - dMsg2_aimBrightness()) * std::sqrtf((f32)param_1 / (f32)param_0);
}
/* 801E8B90-801E8C2C .text dMsg2_kankyoBrightness__Fv */
-void dMsg2_kankyoBrightness() {
- /* Nonmatching */
+u8 dMsg2_kankyoBrightness() {
+ GXColorS10* difcol = dKy_Get_DifCol();
+ return (difcol->r * 0.299f) + (difcol->g * 0.587f) + (difcol->b * 0.114f);
}
/* 801E8C2C-801E8C78 .text dMsg2_aimBrightness__Fv */
-void dMsg2_aimBrightness() {
- /* Nonmatching */
+// NONMATCHING
+u8 dMsg2_aimBrightness() {
+ u32 brightness = dMsg2_kankyoBrightness();
+ return g_messageHIO.field_0x29 <= brightness ? 0xFF : 0xFF - (brightness - g_messageHIO.field_0x29);
}
/* 801E8C78-801E9054 .text dMsg2_setCharAlpha__FP14sub_msg2_classUc */
-void dMsg2_setCharAlpha(sub_msg2_class*, u8) {
- /* Nonmatching */
+// NONMATCHING - some float issues
+void dMsg2_setCharAlpha(sub_msg2_class* i_Msg, u8 i_index) {
+ int temp_r6 = ((J2DTextBox*)i_Msg->text_pane[0].pane)->getLineSpace();
+ f32 temp_f1 = i_Msg->field_0xd00[0].mPosTopLeftOrig.y - i_Msg->field_0xda8[0].mPosTopLeftOrig.y;
+
+ int var_r31 = i_index;
+ f32 temp_f2 = temp_f1 + i_Msg->text_pane[var_r31].mPosTopLeft.y + (i_Msg->field_0xeb0 * (2 - i_Msg->field_0xecc[i_index]));
+
+ int temp_r27 = (temp_r6 * i_Msg->field_0xecc[i_index]);
+ int var_r26 = (int)temp_f2 + temp_r27;
+ int var_r30 = (int)(temp_f2 - g_messageHIO.field_0x38);
+ int var_r29 = var_r30 + temp_r27;
+
+ if (var_r26 < 58) {
+ int temp_r3 = var_r26 + i_Msg->mx->getHeight();
+ if (var_r26 >= 0) {
+ i_Msg->field_0xedf[0][var_r31] = dMsg2_tex_i4_color[var_r26];
+ } else {
+ i_Msg->field_0xedf[0][var_r31] = 0;
+ }
+
+ if (temp_r3 >= 0) {
+ i_Msg->field_0xedf[1][var_r31] = dMsg2_tex_i4_color[temp_r3];
+ } else {
+ i_Msg->field_0xedf[1][var_r31] = 0;
+ }
+ } else if (temp_r27 > 187) {
+ int temp_r3 = temp_r27 + i_Msg->mx->getHeight();
+ if (temp_r27 <= 239) {
+ i_Msg->field_0xedf[0][var_r31] = dMsg2_tex_i4_color[temp_r27];
+ } else {
+ i_Msg->field_0xedf[0][var_r31] = 0;
+ }
+
+ if (temp_r3 <= 239) {
+ i_Msg->field_0xedf[1][var_r31] = dMsg2_tex_i4_color[temp_r3];
+ } else {
+ i_Msg->field_0xedf[1][var_r31] = 0;
+ }
+ } else {
+ i_Msg->field_0xedf[0][var_r31] = 0xFF;
+ i_Msg->field_0xedf[1][var_r31] = 0xFF;
+ }
+
+ if (var_r29 < 58) {
+ int temp_r3 = var_r29 + i_Msg->rx->getHeight();
+ if (var_r29 >= 0) {
+ i_Msg->field_0xedf[2][var_r31] = dMsg2_tex_i4_color[var_r29];
+ } else {
+ i_Msg->field_0xedf[2][var_r31] = 0;
+ }
+
+ if (temp_r3 >= 0) {
+ i_Msg->field_0xedf[3][var_r31] = dMsg2_tex_i4_color[temp_r3];
+ } else {
+ i_Msg->field_0xedf[3][var_r31] = 0;
+ }
+ } else if (var_r30 > 187) {
+ int temp_r3 = var_r30 + i_Msg->rx->getHeight();
+ if (var_r30 <= 239) {
+ i_Msg->field_0xedf[2][var_r31] = dMsg2_tex_i4_color[var_r30];
+ } else {
+ i_Msg->field_0xedf[2][var_r31] = 0;
+ }
+
+ if (temp_r3 <= 239) {
+ i_Msg->field_0xedf[3][var_r31] = dMsg2_tex_i4_color[temp_r3];
+ } else {
+ i_Msg->field_0xedf[3][var_r31] = 0;
+ }
+ } else {
+ i_Msg->field_0xedf[2][var_r31] = 0xFF;
+ i_Msg->field_0xedf[3][var_r31] = 0xFF;
+ }
+
+ if (i_Msg->field_0xedf[0][var_r31] > (u8)i_Msg->field_0xeac) {
+ i_Msg->field_0xedf[0][var_r31] = i_Msg->field_0xeac;
+ }
+
+ if (i_Msg->field_0xedf[1][var_r31] > (u8)i_Msg->field_0xeac) {
+ i_Msg->field_0xedf[1][var_r31] = i_Msg->field_0xeac;
+ }
+
+ if (i_Msg->field_0xedf[2][var_r31] > (u8)i_Msg->field_0xeac) {
+ i_Msg->field_0xedf[2][var_r31] = i_Msg->field_0xeac;
+ }
+
+ if (i_Msg->field_0xedf[3][var_r31] > (u8)i_Msg->field_0xeac) {
+ i_Msg->field_0xedf[3][var_r31] = i_Msg->field_0xeac;
+ }
+
+ i_Msg->msgDataProc[var_r31].setCharAlpha(i_Msg->field_0xedf[0][var_r31],
+ i_Msg->field_0xedf[1][var_r31],
+ i_Msg->field_0xedf[2][var_r31],
+ i_Msg->field_0xedf[3][var_r31]);
}
/* 801E9054-801E9108 .text dMsg2_messageShow__FP14sub_msg2_class */
-void dMsg2_messageShow(sub_msg2_class*) {
- /* Nonmatching */
+void dMsg2_messageShow(sub_msg2_class* i_Msg) {
+ for (u8 i = 0; i < 3; i++) {
+ dMsg2_screenDataSet(i_Msg, i);
+ }
+
+ if (i_Msg->field_0xec4 > 0) {
+ dMsg2_messageOut(i_Msg, i_Msg->field_0xe9c, i_Msg->field_0xec4 - i_Msg->mesgEntry.field_0x16);
+ }
+
+ dMsg2_messageOut(i_Msg, i_Msg->field_0xe9d, i_Msg->field_0xec4);
+
+ if (i_Msg->msgDataProc[i_Msg->field_0xe9d].getMesgStatus() == 7) {
+ dMsg2_messageOut(i_Msg, i_Msg->field_0xe9e, i_Msg->field_0xec4 + i_Msg->mesgEntry.field_0x16);
+ }
}
/* 801E9108-801E9254 .text dMsg2_messageDataInit__FP14sub_msg2_classi */
-void dMsg2_messageDataInit(sub_msg2_class*, int) {
- /* Nonmatching */
+void dMsg2_messageDataInit(sub_msg2_class* i_Msg, int i_index) {
+ f32 char_space = ((J2DTextBox*)i_Msg->text_pane[i_index].pane)->getCharSpace();
+ f32 ruby_space = ((J2DTextBox*)i_Msg->ruby_pane[i_index].pane)->getCharSpace();
+
+ i_Msg->msgDataProc[i_index].dataInit();
+ i_Msg->msgDataProc[i_index].setBmgData(i_Msg->message);
+
+ JKRHeap* heap = mDoExt_setCurrentHeap(i_Msg->Heap);
+ i_Msg->msgDataProc[i_index].setOutMessage(i_Msg->output_text[i_index], i_Msg->output_ruby[i_index], i_Msg->output_textSdw[i_index], i_Msg->output_rubySdw[i_index]);
+ mDoExt_setCurrentHeap(heap);
+
+ i_Msg->msgDataProc[i_index].setFont(i_Msg->mx);
+ i_Msg->msgDataProc[i_index].setRubyFont(i_Msg->rx);
+ i_Msg->msgDataProc[i_index].setCharSpace(char_space);
+ i_Msg->msgDataProc[i_index].setRubyCharSpace(ruby_space);
+ i_Msg->msgDataProc[i_index].setLineSpace(((J2DTextBox*)i_Msg->text_pane[i_index].pane)->getLineSpace());
+ i_Msg->msgDataProc[i_index].setMesgEntry(&i_Msg->mesgEntry);
+ i_Msg->msgDataProc[i_index].setFontSize(i_Msg->field_0xeb4);
+ i_Msg->msgDataProc[i_index].setRubyFontSize(i_Msg->field_0xeb8);
+ i_Msg->msgDataProc[i_index].setLineWidth(503);
+ i_Msg->msgDataProc[i_index].setCenterLineWidth(486);
+ i_Msg->msgDataProc[i_index].setSpaceFlagOff();
}
/* 801E9254-801E93B4 .text dMsg2_stopProc__FP14sub_msg2_class */
-void dMsg2_stopProc(sub_msg2_class*) {
- /* Nonmatching */
+// NONMATCHING - instruction order, missing inline?
+int dMsg2_stopProc(sub_msg2_class* i_Msg) {
+ if (i_Msg->field_0xedd == 0) {
+ if (CPad_GET_STICK_POS_Y(0) > 0.7f || CPad_GET_STICK_POS_Y(3) > 0.7f) {
+ if (i_Msg->field_0xec4 != 0) {
+ i_Msg->field_0xedd = 1;
+ dMsg2_screenDataSet(i_Msg, i_Msg->field_0xe9e);
+ i_Msg->field_0xec0 = 3;
+ i_Msg->field_0xec4 -= i_Msg->mesgEntry.field_0x16;
+ i_Msg->msg.mStatus = 5;
+ mDoAud_seStart(JA_SE_SCROLL_1, NULL);
+ }
+ } else if (CPad_CHECK_TRIG_A(0) || CPad_GET_STICK_POS_Y(0) < -0.7f || CPad_GET_STICK_POS_Y(3) < -0.7f) {
+ i_Msg->field_0xedd = 2;
+ dMsg2_screenDataSet(i_Msg, i_Msg->field_0xe9c);
+ i_Msg->field_0xec0 = 1;
+ i_Msg->field_0xec4 += i_Msg->mesgEntry.field_0x16;
+ i_Msg->msg.mStatus = 5;
+ mDoAud_seStart(JA_SE_SCROLL_1, NULL);
+ } else {
+ dMeter_Info.field_0x0 = 1;
+ }
+ } else {
+ dMsg2_stickInfoCheck(i_Msg);
+ }
+
+ return 1;
}
/* 801E93B4-801E94F0 .text dMsg2_closewaitProc__FP14sub_msg2_class */
-void dMsg2_closewaitProc(sub_msg2_class*) {
- /* Nonmatching */
+// NONMATCHING - instruction order, missing inline?
+int dMsg2_closewaitProc(sub_msg2_class* i_Msg) {
+ if (i_Msg->field_0xedd == 0) {
+ if (CPad_GET_STICK_POS_Y(0) > 0.7f || CPad_GET_STICK_POS_Y(3) > 0.7f) {
+ if (i_Msg->field_0xec4 != 0) {
+ i_Msg->field_0xedd = 1;
+ dMsg2_screenDataSet(i_Msg, i_Msg->field_0xe9e);
+ i_Msg->field_0xec0 = 3;
+ i_Msg->field_0xec4 -= i_Msg->mesgEntry.field_0x16;
+ i_Msg->msg.mStatus = 5;
+ mDoAud_seStart(JA_SE_SCROLL_1, NULL);
+ }
+ } else if (CPad_CHECK_TRIG_A(0) || CPad_GET_STICK_POS_Y(0) < -0.7f || CPad_GET_STICK_POS_Y(3) < -0.7f) {
+ i_Msg->field_0xedd = 2;
+ mDoAud_seStart(JA_SE_TALK_WIN_CLOSE, NULL);
+ i_Msg->msg.mStatus = 16;
+ } else {
+ dMeter_Info.field_0x0 = 4;
+ }
+ } else {
+ dMsg2_stickInfoCheck(i_Msg);
+ }
+
+ return 1;
}
/* 801E94F0-801E9660 .text dMsg2_openProc__FP14sub_msg2_class */
-void dMsg2_openProc(sub_msg2_class*) {
- /* Nonmatching */
+int dMsg2_openProc(sub_msg2_class* i_Msg) {
+ if (i_Msg->field_0xe98 == 0) {
+ dMsg2_messageOut(i_Msg, i_Msg->field_0xe9d, i_Msg->field_0xec4);
+ if (i_Msg->msgDataProc[i_Msg->field_0xe9d].getMesgStatus() == 7) {
+ dMsg2_messageOut(i_Msg, i_Msg->field_0xe9e, i_Msg->field_0xec4 + i_Msg->mesgEntry.field_0x16);
+ }
+ } else if (i_Msg->field_0xe98 == dMsg2_popSpeed) {
+ i_Msg->msg.mStatus = i_Msg->msgDataProc[i_Msg->field_0xe9d].getMesgStatus();
+ }
+
+ i_Msg->field_0xeac = fopMsgM_valueIncrease(dMsg2_popSpeed, i_Msg->field_0xe98, 0) * 255.0f;
+ if (i_Msg->field_0xe98 != 0) {
+ dMsg2_messageShow(i_Msg);
+ }
+
+ if (i_Msg->msgDataProc[i_Msg->field_0xe9d].getMesgStatus() == 7) {
+ i_Msg->field_0xc20.mNowAlpha = i_Msg->field_0xeac;
+ i_Msg->field_0xc58.mNowAlpha = i_Msg->field_0xeac;
+ } else {
+ i_Msg->field_0xc90.mNowAlpha = i_Msg->field_0xeac;
+ i_Msg->field_0xcc8.mNowAlpha = i_Msg->field_0xeac;
+ }
+
+ dMsg2_aimAlphaSqrt(i_Msg, dMsg2_popSpeed, i_Msg->field_0xe98);
+ dComIfG_setBrightness(i_Msg->field_0xea8);
+ i_Msg->field_0xe98++;
+ return 1;
}
/* 801E9660-801E97EC .text dMsg2_closeProc__FP14sub_msg2_class */
-void dMsg2_closeProc(sub_msg2_class*) {
- /* Nonmatching */
+int dMsg2_closeProc(sub_msg2_class* i_Msg) {
+ if (i_Msg->field_0xe98 == 0) {
+ for (u8 i = 0; i < 3; i++) {
+ dMsg2_messagePaneHide(i_Msg, i);
+ dMsg2_outFontHide(i_Msg, i);
+ }
+
+ JKRFileLoader::removeResource(i_Msg->head_p, NULL);
+ i_Msg->msg.mStatus = 0x12;
+ }
+
+ i_Msg->field_0xe98--;
+ if (i_Msg->field_0xe98 < 0) {
+ i_Msg->field_0xe98 = 0;
+ }
+
+ i_Msg->field_0xeac = fopMsgM_valueIncrease(dMsg2_popSpeed, i_Msg->field_0xe98, 0) * 255.0f;
+
+ if (i_Msg->field_0xbb0.mNowAlpha != 0) {
+ i_Msg->field_0xbb0.mNowAlpha = i_Msg->field_0xeac;
+ i_Msg->field_0xbe8.mNowAlpha = i_Msg->field_0xeac;
+ }
+
+ if (i_Msg->field_0xc20.mNowAlpha != 0) {
+ i_Msg->field_0xc20.mNowAlpha = i_Msg->field_0xeac;
+ i_Msg->field_0xc58.mNowAlpha = i_Msg->field_0xeac;
+ }
+
+ if (i_Msg->field_0xc90.mNowAlpha != 0) {
+ i_Msg->field_0xc90.mNowAlpha = i_Msg->field_0xeac;
+ i_Msg->field_0xcc8.mNowAlpha = i_Msg->field_0xeac;
+ }
+
+ dMsg2_aimAlphaSqare(i_Msg, dMsg2_popSpeed, i_Msg->field_0xe98);
+ dComIfG_setBrightness(i_Msg->field_0xea8);
+ return 1;
}
/* 801E97EC-801E9C44 .text dMsg2_outwaitProc__FP14sub_msg2_class */
-void dMsg2_outwaitProc(sub_msg2_class*) {
- /* Nonmatching */
+// NONMATCHING - small load order issue
+int dMsg2_outwaitProc(sub_msg2_class* i_Msg) {
+ if (i_Msg->field_0xec0 == 1 || i_Msg->field_0xec0 == 2) {
+ i_Msg->field_0xec8 += 12;
+ } else if (i_Msg->field_0xec0 == 3 || i_Msg->field_0xec0 == 4) {
+ i_Msg->field_0xec8 -= 12;
+ }
+
+ if (i_Msg->field_0xec8 > 1020) {
+ i_Msg->field_0xec8 -= 2040;
+ } else if (i_Msg->field_0xec8 < -1020) {
+ i_Msg->field_0xec8 += 2040;
+ }
+
+ if (i_Msg->field_0xec0 == 1) {
+ int temp_r4 = i_Msg->field_0xe9c;
+
+ for (int i = 0; i < 3; i++) {
+ i_Msg->text_pane[i].mPosTopLeft.y -= 12.0f;
+ }
+
+ i_Msg->field_0xede -= 85;
+
+ if (i_Msg->text_pane[temp_r4].mPosTopLeft.y < -i_Msg->field_0xe94) {
+ i_Msg->field_0xec0 = 2;
+
+ u8 temp_r3 = i_Msg->field_0xe9d;
+ i_Msg->field_0xe9d = i_Msg->field_0xe9e;
+ i_Msg->field_0xe9e = i_Msg->field_0xe9c;
+ i_Msg->field_0xe9c = temp_r3;
+
+ if (i_Msg->msgDataProc[i_Msg->field_0xe9d].getMesgStatus() == 7) {
+ dMsg2_messageOut(i_Msg, i_Msg->field_0xe9e, i_Msg->field_0xec4 + i_Msg->mesgEntry.field_0x16);
+ } else {
+ dMsg2_messagePaneHide(i_Msg, i_Msg->field_0xe9e);
+ dMsg2_outFontHide(i_Msg, i_Msg->field_0xe9e);
+ }
+
+ i_Msg->field_0xede = 0;
+ dMsg2_arrowUpHide(i_Msg);
+ dMsg2_arrowDownHide(i_Msg);
+ dMsg2_dotHide(i_Msg);
+ }
+ } else if (i_Msg->field_0xec0 == 3) {
+ int temp_r4 = i_Msg->field_0xe9e;
+
+ for (int i = 0; i < 3; i++) {
+ i_Msg->text_pane[i].mPosTopLeft.y += 12.0f;
+ }
+
+ i_Msg->field_0xede -= 127;
+
+ if (i_Msg->text_pane[temp_r4].mPosTopLeft.y > i_Msg->field_0xd00[0].mSizeOrig.y) {
+ i_Msg->field_0xec0 = 4;
+
+ u8 temp_r3 = i_Msg->field_0xe9d;
+ i_Msg->field_0xe9d = i_Msg->field_0xe9c;
+ i_Msg->field_0xe9c = i_Msg->field_0xe9e;
+ i_Msg->field_0xe9e = temp_r3;
+
+ if (i_Msg->field_0xec4 > 0) {
+ dMsg2_messageOut(i_Msg, i_Msg->field_0xe9c, i_Msg->field_0xec4 - i_Msg->mesgEntry.field_0x16);
+ } else {
+ dMsg2_messagePaneHide(i_Msg, i_Msg->field_0xe9c);
+ dMsg2_outFontHide(i_Msg, i_Msg->field_0xe9c);
+ }
+
+ i_Msg->field_0xede = 0;
+ dMsg2_arrowUpHide(i_Msg);
+ dMsg2_arrowDownHide(i_Msg);
+ dMsg2_dotHide(i_Msg);
+ }
+ } else if (i_Msg->field_0xec0 == 2) {
+ for (int i = 0; i < 3; i++) {
+ i_Msg->text_pane[i].mPosTopLeft.y -= 12.0f;
+ }
+
+ i_Msg->field_0xede += 43;
+
+ if (i_Msg->text_pane[i_Msg->field_0xe9d].mPosTopLeft.y <= i_Msg->text_pane[0].mPosTopLeftOrig.y) {
+ i_Msg->text_pane[i_Msg->field_0xe9c].mPosTopLeft.y = i_Msg->text_pane[0].mPosTopLeftOrig.y - i_Msg->field_0xe94;
+ i_Msg->text_pane[i_Msg->field_0xe9d].mPosTopLeft.y = i_Msg->text_pane[0].mPosTopLeftOrig.y;
+ i_Msg->text_pane[i_Msg->field_0xe9e].mPosTopLeft.y = i_Msg->text_pane[0].mPosTopLeftOrig.y + i_Msg->field_0xe94;
+
+ i_Msg->field_0xec0 = 0;
+
+ if (i_Msg->msgDataProc[i_Msg->field_0xe9d].getMesgStatus() == 7) {
+ i_Msg->msg.mStatus = 7;
+ dMsg2_arrowDownShow(i_Msg);
+ } else {
+ i_Msg->msg.mStatus = 14;
+ dMsg2_dotShow(i_Msg);
+ }
+
+ i_Msg->field_0xede = 0xFF;
+
+ if (i_Msg->field_0xec4 != 0) {
+ dMsg2_arrowUpShow(i_Msg);
+ }
+ }
+
+ dMsg2_messageShow(i_Msg);
+ } else if (i_Msg->field_0xec0 == 4) {
+ for (int i = 0; i < 3; i++) {
+ i_Msg->text_pane[i].mPosTopLeft.y += 12.0f;
+ }
+
+ i_Msg->field_0xede += 37;
+
+ if (i_Msg->text_pane[i_Msg->field_0xe9d].mPosTopLeftOrig.y >= i_Msg->text_pane[0].mPosTopLeft.y) {
+ i_Msg->text_pane[i_Msg->field_0xe9c].mPosTopLeft.y = i_Msg->text_pane[0].mPosTopLeftOrig.y - i_Msg->field_0xe94;
+ i_Msg->text_pane[i_Msg->field_0xe9d].mPosTopLeft.y = i_Msg->text_pane[0].mPosTopLeftOrig.y;
+ i_Msg->text_pane[i_Msg->field_0xe9e].mPosTopLeft.y = i_Msg->text_pane[0].mPosTopLeftOrig.y + i_Msg->field_0xe94;
+
+ i_Msg->field_0xec0 = 0;
+ i_Msg->msg.mStatus = 7;
+ i_Msg->field_0xede = 0xFF;
+ dMsg2_arrowDownShow(i_Msg);
+
+ if (i_Msg->field_0xec4 != 0) {
+ dMsg2_arrowUpShow(i_Msg);
+ }
+ }
+
+ dMsg2_messageShow(i_Msg);
+ } else {
+ dMsg2_messageShow(i_Msg);
+ }
+
+ return 1;
}
/* 801E9C44-801E9CDC .text draw__14dDlst_2DMSG2_cFv */
void dDlst_2DMSG2_c::draw() {
- /* Nonmatching */
+ J2DOrthoGraph* graf = dComIfGp_getCurrentGrafPort();
+ graf->setPort();
+
+ for (int i = 0; i < 3; i++) {
+ sScreen2[2 - i]->setScissor(true);
+ sScreen2[2 - i]->draw(0.0f, 0.0f, graf);
+ }
+
+ outFontDraw();
}
/* 801E9CDC-801E9FC4 .text outFontDraw__14dDlst_2DMSG2_cFv */
+// NONMATCHING - a lot wrong here
void dDlst_2DMSG2_c::outFontDraw() {
- /* Nonmatching */
+ J2DPane* ppane = ((sub_msg2_class*)actorP)->field_0xd00[0].pane;
+ f32 var_f31 = ppane->getGlbBounds().i.y;
+ f32 var_f30 = ppane->getGlbBounds().f.y;
+
+ for (int i = 0; i < 3; i++) {
+ for (int j = 0; j < 8; j++) {
+ sub_msg2_class* msg = (sub_msg2_class*)actorP;
+ u8 iconNum = msg->msgDataProc[i].field_0x281[j];
+ fopMsgM_msgDataProc_c* dataProc = msg->msgDataProc;
+ int temp_r6 = dataProc->field_0x168[i];
+ int temp_r4 = dataProc->field_0x1A4[i];
+ int var_r22 = dataProc->field_0x1E0[i];
+
+ if (iconNum != 0xFF) {
+ J2DTextBox* pJVar3 = (J2DTextBox*)msg->text_pane[i].pane;
+ int sp10 = (f32)temp_r6 + pJVar3->getGlbBounds().i.x;
+
+ if (var_r22 > msg->field_0xeb4) {
+ if (msg->field_0xecc[i] > 1) {
+ temp_r4 = ((msg->field_0xeb0 * (3 - temp_r4)) + pJVar3->getGlbBounds().i.y);
+ } else {
+ temp_r4 = (msg->field_0xeb0 + pJVar3->getGlbBounds().i.y);
+ }
+ } else {
+ temp_r4 = ((msg->field_0xeb0 * (3 - msg->field_0xecc[i])) + pJVar3->getGlbBounds().i.y);
+ }
+
+ u8 sp20 = msg->field_0xeac;
+ JKRHeap* heap = mDoExt_setCurrentHeap(msg->Heap);
+
+ if ((f32)temp_r4 > var_f31 && (f32)temp_r4 < var_f30 - (f32)var_r22) {
+ fopMsgM_outFontDraw(bbutton_icon[j][i], bbutton_kage[j][i], sp10, temp_r4, var_r22, &bbuttonTimer[j][i], sp20, iconNum);
+ }
+
+ mDoExt_setCurrentHeap(heap);
+ }
+ }
+ }
}
/* 801E9FC4-801EA0C8 .text draw__14dDlst_2DCopy_cFv */
+// NONMATCHING
void dDlst_2DCopy_c::draw() {
- /* Nonmatching */
+ J2DOrthoGraph* graf = dComIfGp_getCurrentGrafPort();
+ graf->setPort();
+
+ f32 left = -9.0f;
+ f32 top = -21.0f;
+ f32 width = 383.04376f;
+ f32 height = 78.600006f;
+
+ GXSetScissor((int)left, (int)top, (int)width, (int)height);
+ sScreen2[0]->draw(0.0f, 0.0f, graf);
+ GXSetTexCopySrc((int)left, (int)top, (int)width, (int)height);
+ GXSetTexCopyDst((int)width, (int)height, GX_TF_RGB565, GX_FALSE);
+ GXCopyTex(copyTex, REG1_S(6) == 0 ? GX_TRUE : GX_FALSE);
}
/* 801EA0C8-801EA224 .text dMsg2_Draw__FP14sub_msg2_class */
-static BOOL dMsg2_Draw(sub_msg2_class*) {
- /* Nonmatching */
+static BOOL dMsg2_Draw(sub_msg2_class* i_Msg) {
+ int sp8 = (int)(i_Msg->field_0xda8[0].mPosTopLeftOrig.x + 288.0f) - 288;
+ int sp10 = (int)(i_Msg->field_0xda8[0].mPosTopLeftOrig.y + 120.0f) - 120;
+
+ for (int i = 0; i < 3; i++) {
+ i_Msg->text_pane[i].mNowAlpha = i_Msg->field_0xeac;
+ i_Msg->ruby_pane[i].mNowAlpha = i_Msg->field_0xeac;
+ i_Msg->textSdw_pane[i].mNowAlpha = i_Msg->field_0xeac;
+ i_Msg->rubySdw_pane[i].mNowAlpha = i_Msg->field_0xeac;
+
+ fopMsgM_setAlpha(&i_Msg->text_pane[i]);
+ fopMsgM_setAlpha(&i_Msg->ruby_pane[i]);
+ fopMsgM_setAlpha(&i_Msg->textSdw_pane[i]);
+ fopMsgM_setAlpha(&i_Msg->rubySdw_pane[i]);
+ }
+
+ fopMsgM_setAlpha(&i_Msg->field_0xbb0);
+ fopMsgM_setAlpha(&i_Msg->field_0xbe8);
+ fopMsgM_setAlpha(&i_Msg->field_0xc20);
+ fopMsgM_setAlpha(&i_Msg->field_0xc58);
+ fopMsgM_setAlpha(&i_Msg->field_0xc90);
+ fopMsgM_setAlpha(&i_Msg->field_0xcc8);
+
+ dMsg2_multiTexDraw(i_Msg, sp8, sp10, 576, 240);
+
+ dComIfGd_set2DOpa(&message);
+ return TRUE;
}
/* 801EA224-801EA7C4 .text dMsg2_Execute__FP14sub_msg2_class */
-static BOOL dMsg2_Execute(sub_msg2_class*) {
- /* Nonmatching */
+// NONMATCHING - some float issues
+static BOOL dMsg2_Execute(sub_msg2_class* i_Msg) {
+ if (i_Msg->msg.mStatus == fopMsgStts_BOX_OPENING_e) {
+ dMsg2_openProc(i_Msg);
+ } else if (i_Msg->msg.mStatus == 5) {
+ dMsg2_outwaitProc(i_Msg);
+ } else if (i_Msg->msg.mStatus == fopMsgStts_STOP_e) {
+ dMsg2_stopProc(i_Msg);
+ } else if (i_Msg->msg.mStatus == fopMsgStts_MSG_DISPLAYED_e) {
+ dMsg2_closewaitProc(i_Msg);
+ } else if (i_Msg->msg.mStatus == fopMsgStts_MSG_ENDS_e) {
+ dMsg2_closeProc(i_Msg);
+ } else if (i_Msg->msg.mStatus == fopMsgStts_MSG_DESTROYED_e) {
+ fopMsgM_Delete(i_Msg);
+ }
+
+ dMsg2_arrowMove(i_Msg);
+
+ int temp_r4 = 0;
+ if (dComIfGs_getOptRuby()) {
+ temp_r4 = -4;
+ }
+
+ for (int i = 0; i < 3; i++) {
+ int sp64 = i_Msg->text_pane[i].mPosTopLeft.x + g_messageHIO.field_0x58;
+ int sp74 = i_Msg->text_pane[i].mPosTopLeft.y + temp_r4;
+ i_Msg->text_pane[i].pane->move(sp64, sp74);
+ i_Msg->ruby_pane[i].pane->move(sp64, sp74 - g_messageHIO.field_0x38);
+
+ int var_r21 = sp64 + 2;
+ int var_r22 = sp74 + 2;
+
+ i_Msg->textSdw_pane[i].pane->move(var_r21, var_r22);
+ i_Msg->rubySdw_pane[i].pane->move(var_r21, var_r22 - g_messageHIO.field_0x38);
+ }
+
+ dMsg2_rubySet(i_Msg);
+
+ for (int i = 0; i < 3; i++) {
+ // fakematch casting? making the members JUtility::TColor breaks the HIO constructor
+ ((J2DTextBox*)i_Msg->text_pane[i].pane)->setFontColor(*(JUtility::TColor*)&g_messageHIO.field_0x5, *(JUtility::TColor*)&g_messageHIO.field_0x5);
+ ((J2DTextBox*)i_Msg->ruby_pane[i].pane)->setFontColor(*(JUtility::TColor*)&g_messageHIO.field_0x1d, *(JUtility::TColor*)&g_messageHIO.field_0x1d);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i].pane)->setFontColor(*(JUtility::TColor*)&g_messageHIO.field_0x11, *(JUtility::TColor*)&g_messageHIO.field_0x11);
+ ((J2DTextBox*)i_Msg->rubySdw_pane[i].pane)->setFontColor(*(JUtility::TColor*)&g_messageHIO.field_0x11, *(JUtility::TColor*)&g_messageHIO.field_0x11);
+
+ ((J2DTextBox*)i_Msg->text_pane[i].pane)->setWhite(*(JUtility::TColor*)&g_messageHIO.field_0x9);
+ ((J2DTextBox*)i_Msg->ruby_pane[i].pane)->setWhite(*(JUtility::TColor*)&g_messageHIO.field_0x21);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i].pane)->setWhite(*(JUtility::TColor*)&g_messageHIO.field_0x15);
+ ((J2DTextBox*)i_Msg->rubySdw_pane[i].pane)->setWhite(*(JUtility::TColor*)&g_messageHIO.field_0x15);
+
+ ((J2DTextBox*)i_Msg->text_pane[i].pane)->setBlack(*(JUtility::TColor*)&g_messageHIO.field_0xd);
+ ((J2DTextBox*)i_Msg->ruby_pane[i].pane)->setBlack(*(JUtility::TColor*)&g_messageHIO.field_0x25);
+ ((J2DTextBox*)i_Msg->textSdw_pane[i].pane)->setBlack(*(JUtility::TColor*)&g_messageHIO.field_0x19);
+ ((J2DTextBox*)i_Msg->rubySdw_pane[i].pane)->setBlack(*(JUtility::TColor*)&g_messageHIO.field_0x19);
+ }
+
+ for (int i = 0; i < 3; i++) {
+ if (dComIfGs_getOptRuby()) {
+ i_Msg->ruby_pane[i].pane->hide();
+ i_Msg->rubySdw_pane[i].pane->hide();
+ } else {
+ if (i_Msg->ruby_pane[1].pane->isVisible()) {
+ i_Msg->ruby_pane[i].pane->show();
+ }
+
+ if (i_Msg->rubySdw_pane[i].pane->isVisible()) {
+ i_Msg->rubySdw_pane[i].pane->show();
+ }
+ }
+ }
+
+ dComIfGp_setMesgStatus(i_Msg->msg.mStatus);
+ return TRUE;
}
/* 801EA7C4-801EA7CC .text dMsg2_IsDelete__FP14sub_msg2_class */
-static BOOL dMsg2_IsDelete(sub_msg2_class*) {
- /* Nonmatching */
+static BOOL dMsg2_IsDelete(sub_msg2_class* i_Msg) {
+ return TRUE;
}
/* 801EA7CC-801EA97C .text dMsg2_Delete__FP14sub_msg2_class */
-static BOOL dMsg2_Delete(sub_msg2_class*) {
- /* Nonmatching */
+static BOOL dMsg2_Delete(sub_msg2_class* i_Msg) {
+ dComIfGp_setMesgStatus(0);
+ dComIfG_setBrightness(0xFF);
+
+ JKRHeap* heap = mDoExt_setCurrentHeap(i_Msg->Heap);
+
+ for (int i = 0; i < 3; i++) {
+ delete sScreen2[i];
+ }
+
+ i_Msg->Heap->free(i_Msg->Tex[0]);
+ i_Msg->Heap->free(i_Msg->Tex[1]);
+ mDoExt_removeMesgFont();
+ mDoExt_removeRubyFont();
+
+ for (int i = 0; i < 3; i++) {
+ for (int j = 0; j < 8; j++) {
+ delete bbutton_icon[j][i];
+ delete bbutton_kage[j][i];
+ }
+
+ i_Msg->Heap->free(i_Msg->output_text[i]);
+ i_Msg->Heap->free(i_Msg->output_ruby[i]);
+ i_Msg->Heap->free(i_Msg->output_textSdw[i]);
+ i_Msg->Heap->free(i_Msg->output_rubySdw[i]);
+ }
+
+ dComIfGp_getMsgArchive()->removeResourceAll();
+ i_Msg->Heap->freeAll();
+ dComIfGp_setHeapLockFlag(0);
+ mDoExt_setCurrentHeap(heap);
+ return TRUE;
}
/* 801EA97C-801EAFC0 .text dMsg2_Create__FP9msg_class */
-static cPhs_State dMsg2_Create(msg_class*) {
- /* Nonmatching */
+static cPhs_State dMsg2_Create(msg_class* i_this) {
+ sub_msg2_class* i_Msg = (sub_msg2_class*)i_this;
+
+ if (dComIfGp_isHeapLockFlag() != 0 && dComIfGp_isHeapLockFlag() != 8) {
+ return cPhs_INIT_e;
+ }
+
+ i_Msg->Heap = dComIfGp_getExpHeap2D();
+ dComIfGp_setHeapLockFlag(8);
+ JKRHeap* heap = mDoExt_setCurrentHeap(i_Msg->Heap);
+
+ for (u8 i = 0; i < 3; i++) {
+ sScreen2[i] = new J2DScreen();
+ sScreen2[i]->set("hukidashi_02.blo", dComIfGp_getMsgArchive());
+ }
+
+ i_Msg->Tex[0] = (ResTIMG*)i_Msg->Heap->alloc(0x11800, 0x20);
+ JUT_ASSERT(VERSION_SELECT(2225, 2239, 2274, 2276), i_Msg->Tex[0] != NULL);
+
+ i_Msg->Tex[1] = (ResTIMG*)i_Msg->Heap->alloc(0x11800, 0x20);
+ JUT_ASSERT(VERSION_SELECT(2227, 2241, 2276, 2278), i_Msg->Tex[1] != NULL);
+
+ dMsg2_fontdataInit(i_Msg);
+
+ for (u8 i = 0; i < 3; i++) {
+ for (int j = 0; j < 8; j++) {
+ bbutton_icon[j][i] = new J2DPicture("font_07_02.bti");
+ bbutton_kage[j][i] = new J2DPicture("font_07_02.bti");
+ fopMsgM_blendInit(bbutton_icon[j][i], "font_00.bti");
+ fopMsgM_blendInit(bbutton_kage[j][i], "font_00.bti");
+
+ bbutton_icon[j][i]->hide();
+ bbutton_kage[j][i]->hide();
+ bbutton_icon[j][i]->setAlpha(0);
+ bbutton_kage[j][i]->setAlpha(0);
+
+ bbuttonTimer[j][i] = -1;
+ }
+ }
+
+ for (u8 i = 0; i < 3; i++) {
+ i_Msg->output_text[i] = (char*)i_Msg->Heap->alloc(1001, 4);
+ JUT_ASSERT(VERSION_SELECT(2250, 2264, 2299, 2301), i_Msg->output_text[i] != NULL);
+
+ i_Msg->output_ruby[i] = (char*)i_Msg->Heap->alloc(1001, 4);
+ JUT_ASSERT(VERSION_SELECT(2253, 2267, 2302, 2304), i_Msg->output_ruby[i] != NULL);
+
+ i_Msg->output_textSdw[i] = (char*)i_Msg->Heap->alloc(1001, 4);
+ JUT_ASSERT(VERSION_SELECT(2256, 2270, 2305, 2307), i_Msg->output_textSdw[i] != NULL);
+
+ i_Msg->output_rubySdw[i] = (char*)i_Msg->Heap->alloc(1001, 4);
+ JUT_ASSERT(VERSION_SELECT(2259, 2273, 2308, 2310), i_Msg->output_rubySdw[i] != NULL);
+ }
+
+ mDoExt_setCurrentHeap(heap);
+
+ if (i_this->mMsgNo == 0x33A && dComIfGs_isEventBit(0x2D80)) {
+ i_this->mMsgNo = 0x33B;
+ }
+
+ i_Msg->head_p = i_Msg->msgGet.getMesgHeader(i_this->mMsgNo);
+ JUT_ASSERT(VERSION_SELECT(2275, 2289, 2324, 2326), i_Msg->head_p);
+
+ i_Msg->message = (char*)i_Msg->msgGet.getMessage(i_Msg->head_p);
+ i_Msg->mesgEntry = i_Msg->msgGet.getMesgEntry(i_Msg->head_p);
+ i_Msg->mesgNumber = i_Msg->msgGet.getMesgNumber();
+ i_this->mStatus = 2;
+
+ dMsg2_multiTexInit(i_Msg);
+
+ for (u8 i = 0; i < 3; i++) {
+ dMsg2_screenDataInit(i_Msg, i);
+ dMsg2_screenDataSet(i_Msg, i);
+ dMsg2_messagePaneHide(i_Msg, i);
+ }
+
+ dMsg2_ScreenDataValueInit(i_Msg);
+ dMsg2_stickInfoInit(i_Msg);
+ i_Msg->field_0xec0 = 0;
+ i_Msg->field_0xe9c = 2;
+ i_Msg->field_0xe9d = 0;
+ i_Msg->field_0xe9e = 1;
+
+ dMsg2_popSpeed = g_messageHIO.field_0x3b;
+ message.setActorP(i_Msg);
+ dComIfGp_setMesgStatus(i_this->mStatus);
+ return cPhs_COMPLEATE_e;
}
+
+static msg_method_class l_dMsg2_Method = {
+ (process_method_func)dMsg2_Create,
+ (process_method_func)dMsg2_Delete,
+ (process_method_func)dMsg2_Execute,
+ (process_method_func)dMsg2_IsDelete,
+ (process_method_func)dMsg2_Draw,
+};
+
+msg_process_profile_definition g_profile_MSG2 = {
+ /* Layer ID */ fpcLy_CURRENT_e,
+ /* List ID */ 12,
+ /* List Prio */ fpcPi_CURRENT_e,
+ /* Proc Name */ fpcNm_MSG2_e,
+ /* Proc SubMtd */ &g_fpcLf_Method.base,
+ /* Size */ sizeof(sub_msg2_class),
+ /* Size Other */ 0,
+ /* Parameters */ 0,
+ /* Leaf SubMtd */ &g_fopMsg_Method,
+ /* Draw Prio */ fpcDwPi_MSG2_e,
+ /* Msg SubMtd */ &l_dMsg2_Method,
+};
diff --git a/src/d/d_meter.cpp b/src/d/d_meter.cpp
index 50f9e627..daf41de9 100644
--- a/src/d/d_meter.cpp
+++ b/src/d/d_meter.cpp
@@ -459,42 +459,51 @@ dMeter_msg_HIO_c::dMeter_msg_HIO_c() {
/* 801EF75C-801EF924 .text __ct__20dMeter_message_HIO_cFv */
dMeter_message_HIO_c::dMeter_message_HIO_c() {
- field_0x5 = 0;
- field_0x6 = 0;
- field_0x7 = 0;
- field_0x8 = 0xff;
- field_0x9 = 0xff;
- field_0xa = 0xff;
- field_0xb = 0xff;
- field_0xc = 0xff;
- field_0xd = 0xff;
- field_0xe = 0xff;
- field_0xf = 0xff;
- field_0x10 = 0;
- field_0x11 = 0xff;
- field_0x12 = 0xff;
- field_0x13 = 0xff;
- field_0x14 = 0xff;
- field_0x15 = 0xff;
- field_0x16 = 0xff;
- field_0x17 = 0xff;
- field_0x18 = 0xff;
- field_0x19 = 0xff;
- field_0x1a = 0xff;
- field_0x1b = 0xff;
- field_0x1c = 0;
- field_0x1d = 0;
- field_0x1e = 0;
- field_0x1f = 0;
- field_0x20 = 0xff;
- field_0x21 = 0xff;
- field_0x22 = 0xff;
- field_0x23 = 0xff;
- field_0x24 = 0xff;
- field_0x25 = 0xff;
- field_0x26 = 0xff;
- field_0x27 = 0xff;
- field_0x28 = 0;
+ field_0x5.r = 0;
+ field_0x5.g = 0;
+ field_0x5.b = 0;
+ field_0x5.a = 0xff;
+
+ field_0x9.r = 0xff;
+ field_0x9.g = 0xff;
+ field_0x9.b = 0xff;
+ field_0x9.a = 0xff;
+
+ field_0xd.r = 0xff;
+ field_0xd.g = 0xff;
+ field_0xd.b = 0xff;
+ field_0xd.a = 0;
+
+ field_0x11.r = 0xff;
+ field_0x11.g = 0xff;
+ field_0x11.b = 0xff;
+ field_0x11.a = 0xff;
+
+ field_0x15.r = 0xff;
+ field_0x15.g = 0xff;
+ field_0x15.b = 0xff;
+ field_0x15.a = 0xff;
+
+ field_0x19.r = 0xff;
+ field_0x19.g = 0xff;
+ field_0x19.b = 0xff;
+ field_0x19.a = 0;
+
+ field_0x1d.r = 0;
+ field_0x1d.g = 0;
+ field_0x1d.b = 0;
+ field_0x1d.a = 0xff;
+
+ field_0x21.r = 0xff;
+ field_0x21.g = 0xff;
+ field_0x21.b = 0xff;
+ field_0x21.a = 0xff;
+
+ field_0x25.r = 0xff;
+ field_0x25.g = 0xff;
+ field_0x25.b = 0xff;
+ field_0x25.a = 0;
+
field_0x29 = 0x80;
field_0x2a = 0xff;
field_0x2b = 0xff;
@@ -5783,15 +5792,15 @@ void dMeter_clockMultiMove(sub_meter_class* i_Meter) {
fVar2 = i_Meter->field_0x1868[i].mPosCenter.y;
clock[i].setPos(sVar4, sVar5, sVar4 + i_Meter->field_0x1830.mSizeOrig.x, sVar5 + i_Meter->field_0x1830.mSizeOrig.y);
GXColor color1 = {0xFF, 0XFF, 0XFF, 0XFF};
- clock[i].mC0.r = color1.r;
- clock[i].mC0.g = color1.g;
- clock[i].mC0.b = color1.b;
- clock[i].mC0.a = color1.a;
+ clock[i].mBlack.r = color1.r;
+ clock[i].mBlack.g = color1.g;
+ clock[i].mBlack.b = color1.b;
+ clock[i].mBlack.a = color1.a;
GXColor color2 = {0x00, 0x00, 0XFF, 0x00};
- clock[i].mC1.r = color2.r;
- clock[i].mC1.g = color2.g;
- clock[i].mC1.b = color2.b;
- clock[i].mC1.a = color2.a;
+ clock[i].mWhite.r = color2.r;
+ clock[i].mWhite.g = color2.g;
+ clock[i].mWhite.b = color2.b;
+ clock[i].mWhite.a = color2.a;
clock[i].setScroll(0, 0, 0);
clock[i].setScroll(1, fVar1, fVar2);
clock[i].setScale((100.0f * (1.0f / scaleX[i]) / g_meterHIO.field_0x78[i]), (100.0f * (1.0f / scaleY[i])) / g_meterHIO.field_0x78[i]);
@@ -6215,7 +6224,7 @@ void dMeter_swimPaneHide(sub_meter_class* i_Meter) {
fopMsgM_setNowAlphaZero(&i_Meter->field_0x2d30);
fopMsgM_setNowAlphaZero(&i_Meter->field_0x2da0);
fopMsgM_setNowAlphaZero(&i_Meter->field_0x2dd8);
- tekari.mC0.a = 0;
+ tekari.mBlack.a = 0;
}
/* 80200630-802006AC .text dMeter_swimPaneTransY__FP15sub_meter_classf */
@@ -6607,17 +6616,17 @@ void dMeter_swimTekariScroll(sub_meter_class* i_Meter) {
}
tekari.setPos(temp_r29, temp_r28, temp_r27, temp_r26);
GXColor color1 = {0xFF, 0xFF, 0xFF, 0XFF};
- tekari.mC0.r = color1.r;
- tekari.mC0.g = color1.g;
- tekari.mC0.b = color1.b;
- tekari.mC0.a = color1.a;
+ tekari.mBlack.r = color1.r;
+ tekari.mBlack.g = color1.g;
+ tekari.mBlack.b = color1.b;
+ tekari.mBlack.a = color1.a;
GXColor color2 = {0xFF, 0xFF, 0xFF, 0X00};
- tekari.mC1.r = color2.r;
- tekari.mC1.g = color2.g;
- tekari.mC1.b = color2.b;
- tekari.mC1.a = color2.a;
+ tekari.mWhite.r = color2.r;
+ tekari.mWhite.g = color2.g;
+ tekari.mWhite.b = color2.b;
+ tekari.mWhite.a = color2.a;
tekari.setScroll(0, 0, 0);
- tekari.mC0.a = 0xFF;
+ tekari.mBlack.a = 0xFF;
tekari.setScroll(1, var_r30, var_r30);
}
@@ -7164,11 +7173,11 @@ static BOOL dMeter_Draw(sub_meter_class* i_Meter) {
fopMsgM_setAlpha(&i_Meter->field_0x1948);
if (i_Meter->field_0x1830.pane->isVisible() && i_Meter->field_0x3020 == 7) {
for (s32 i = 0; i < 3; i++) {
- clock[i].mC0.a = i_Meter->field_0x1830.mNowAlpha;
+ clock[i].mBlack.a = i_Meter->field_0x1830.mNowAlpha;
}
} else {
for (s32 i = 0; i < 3; i++) {
- clock[i].mC0.a = 0;
+ clock[i].mBlack.a = 0;
}
}
fopMsgM_setAlpha(&i_Meter->field_0x1980);
diff --git a/src/d/d_msg.cpp b/src/d/d_msg.cpp
index 611bc181..f5e97e64 100644
--- a/src/d/d_msg.cpp
+++ b/src/d/d_msg.cpp
@@ -762,7 +762,7 @@ void dMsg_ScreenDataValueInitTalk(sub_msg_class* i_Msg) {
i_Msg->mMsgDataProc.dataInit();
i_Msg->mMsgDataProc.field_0x25C = i_Msg->m1164;
i_Msg->mMsgDataProc.field_0x10 = (int)&i_Msg->mPos;
- i_Msg->mMsgDataProc.field_0x3C = (char*)i_Msg->mpMesgStr;
+ i_Msg->mMsgDataProc.bmgData = (char*)i_Msg->mpMesgStr;
pcVar8 = i_Msg->output_rubSdw;
pcVar7 = i_Msg->output_textSdw;
pcVar5 = i_Msg->output_rub;
@@ -784,20 +784,20 @@ void dMsg_ScreenDataValueInitTalk(sub_msg_class* i_Msg) {
i_Msg->mMsgDataProc.field_0x50[3] = pcVar4;
i_Msg->mMsgDataProc.font[0] = textFont;
i_Msg->mMsgDataProc.font[1] = rubyFont;
- i_Msg->mMsgDataProc.field_0x11C = iVar1;
- i_Msg->mMsgDataProc.field_0x124 = iVar2;
- i_Msg->mMsgDataProc.field_0x120 = (int)((J2DTextBox*)i_Msg->m0544[0].pane)->getLineSpace();
- i_Msg->mMsgDataProc.field_0x0C = &i_Msg->mMesgEntry;
- i_Msg->mMsgDataProc.field_0x144 = i_Msg->m110C;
- i_Msg->mMsgDataProc.field_0x14C = i_Msg->m1110;
- i_Msg->mMsgDataProc.field_0x128 = 0x1f7;
- i_Msg->mMsgDataProc.field_0x12C = 0x1e6;
- i_Msg->mMsgDataProc.field_0x160 = g_msgHIO.field_0x82;
- i_Msg->mMsgDataProc.field_0x15C = 2;
+ i_Msg->mMsgDataProc.charSpace = iVar1;
+ i_Msg->mMsgDataProc.rubyCharSpace = iVar2;
+ i_Msg->mMsgDataProc.lineSpace = (int)((J2DTextBox*)i_Msg->m0544[0].pane)->getLineSpace();
+ i_Msg->mMsgDataProc.mesgEntry = &i_Msg->mMesgEntry;
+ i_Msg->mMsgDataProc.fontSize = i_Msg->m110C;
+ i_Msg->mMsgDataProc.rubyFontSize = i_Msg->m1110;
+ i_Msg->mMsgDataProc.lineWidth = 0x1f7;
+ i_Msg->mMsgDataProc.centerLineWidth = 0x1e6;
+ i_Msg->mMsgDataProc.sendSpeed = g_msgHIO.field_0x82;
+ i_Msg->mMsgDataProc.spaceTimer = 2;
if (g_msgHIO.field_0x83 != 0) {
- i_Msg->mMsgDataProc.field_0x29C = 1;
+ i_Msg->mMsgDataProc.spaceFlag = 1;
} else {
- i_Msg->mMsgDataProc.field_0x29C = 0;
+ i_Msg->mMsgDataProc.spaceFlag = 0;
}
i_Msg->m10D0 = (i_Msg->m10D8) - i_Msg->m049C.mPosCenter.x;
i_Msg->m10D4 = (i_Msg->m10DC) - i_Msg->m049C.mPosCenter.y;
@@ -854,7 +854,7 @@ void dMsg_ScreenDataValueInitItem(sub_msg_class* i_Msg) {
fopMsgM_cposMove(&i_Msg->m049C);
i_Msg->mMsgDataProc.dataInit();
i_Msg->mMsgDataProc.field_0x10 = (int)&i_Msg->mPos;
- i_Msg->mMsgDataProc.field_0x3C = (char*)i_Msg->mpMesgStr;
+ i_Msg->mMsgDataProc.bmgData = (char*)i_Msg->mpMesgStr;
pcVar8 = i_Msg->output_rubSdw;
pcVar7 = i_Msg->output_textSdw;
pcVar6 = i_Msg->output_rub;
@@ -876,24 +876,24 @@ void dMsg_ScreenDataValueInitItem(sub_msg_class* i_Msg) {
i_Msg->mMsgDataProc.field_0x50[3] = pcVar5;
i_Msg->mMsgDataProc.font[0] = textFont;
i_Msg->mMsgDataProc.font[1] = rubyFont;
- i_Msg->mMsgDataProc.field_0x11C = (int)fVar3;
- i_Msg->mMsgDataProc.field_0x124 = (int)fVar4;
- i_Msg->mMsgDataProc.field_0x0C = &i_Msg->mMesgEntry;
- i_Msg->mMsgDataProc.field_0x144 = i_Msg->m110C;
- i_Msg->mMsgDataProc.field_0x14C = i_Msg->m1110;
+ i_Msg->mMsgDataProc.charSpace = (int)fVar3;
+ i_Msg->mMsgDataProc.rubyCharSpace = (int)fVar4;
+ i_Msg->mMsgDataProc.mesgEntry = &i_Msg->mMesgEntry;
+ i_Msg->mMsgDataProc.fontSize = i_Msg->m110C;
+ i_Msg->mMsgDataProc.rubyFontSize = i_Msg->m1110;
if ((i_Msg->mMesgEntry.mTextboxType == 9) && (i_Msg->m0624[8].mUserArea == 0)) {
- i_Msg->mMsgDataProc.field_0x128 = 0x1a3;
- i_Msg->mMsgDataProc.field_0x12C = 0x192;
+ i_Msg->mMsgDataProc.lineWidth = 0x1a3;
+ i_Msg->mMsgDataProc.centerLineWidth = 0x192;
} else {
- i_Msg->mMsgDataProc.field_0x128 = 0x1f7;
- i_Msg->mMsgDataProc.field_0x12C = 0x1e6;
+ i_Msg->mMsgDataProc.lineWidth = 0x1f7;
+ i_Msg->mMsgDataProc.centerLineWidth = 0x1e6;
}
- i_Msg->mMsgDataProc.field_0x160 = g_msgHIO.field_0x82;
- i_Msg->mMsgDataProc.field_0x15C = 2;
+ i_Msg->mMsgDataProc.sendSpeed = g_msgHIO.field_0x82;
+ i_Msg->mMsgDataProc.spaceTimer = 2;
if (g_msgHIO.field_0x83 != 0) {
- i_Msg->mMsgDataProc.field_0x29C = 1;
+ i_Msg->mMsgDataProc.spaceFlag = 1;
} else {
- i_Msg->mMsgDataProc.field_0x29C = 0;
+ i_Msg->mMsgDataProc.spaceFlag = 0;
}
i_Msg->m10D0 = (i_Msg->m10D8) - i_Msg->m049C.mPosCenter.x;
i_Msg->m10D4 = (i_Msg->m10DC) - i_Msg->m049C.mPosCenter.y;
@@ -937,7 +937,7 @@ void dMsg_ScreenDataValueInitTact(sub_msg_class* i_Msg) {
fopMsgM_cposMove(&i_Msg->m049C);
i_Msg->mMsgDataProc.dataInit();
i_Msg->mMsgDataProc.field_0x10 = (int)&i_Msg->mPos;
- i_Msg->mMsgDataProc.field_0x3C = (char*)i_Msg->mpMesgStr;
+ i_Msg->mMsgDataProc.bmgData = (char*)i_Msg->mpMesgStr;
pcVar6 = i_Msg->output_rubSdw;
pcVar5 = i_Msg->output_textSdw;
pcVar4 = i_Msg->output_rub;
@@ -959,24 +959,24 @@ void dMsg_ScreenDataValueInitTact(sub_msg_class* i_Msg) {
i_Msg->mMsgDataProc.field_0x50[3] = pcVar3;
i_Msg->mMsgDataProc.font[0] = textFont;
i_Msg->mMsgDataProc.font[1] = rubyFont;
- i_Msg->mMsgDataProc.field_0x11C = (int)dVar7;
- i_Msg->mMsgDataProc.field_0x124 = (int)dVar8;
- i_Msg->mMsgDataProc.field_0x0C = &i_Msg->mMesgEntry;
- i_Msg->mMsgDataProc.field_0x144 = i_Msg->m110C;
- i_Msg->mMsgDataProc.field_0x14C = i_Msg->m1110;
+ i_Msg->mMsgDataProc.charSpace = (int)dVar7;
+ i_Msg->mMsgDataProc.rubyCharSpace = (int)dVar8;
+ i_Msg->mMsgDataProc.mesgEntry = &i_Msg->mMesgEntry;
+ i_Msg->mMsgDataProc.fontSize = i_Msg->m110C;
+ i_Msg->mMsgDataProc.rubyFontSize = i_Msg->m1110;
if ((i_Msg->mMesgEntry.mTextboxType == 9) && (i_Msg->m0624[8].mUserArea == 0)) {
- i_Msg->mMsgDataProc.field_0x128 = 0x1a3;
- i_Msg->mMsgDataProc.field_0x12C = 0x192;
+ i_Msg->mMsgDataProc.lineWidth = 0x1a3;
+ i_Msg->mMsgDataProc.centerLineWidth = 0x192;
} else {
- i_Msg->mMsgDataProc.field_0x128 = 0x1f7;
- i_Msg->mMsgDataProc.field_0x12C = 0x1e6;
+ i_Msg->mMsgDataProc.lineWidth = 0x1f7;
+ i_Msg->mMsgDataProc.centerLineWidth = 0x1e6;
}
- i_Msg->mMsgDataProc.field_0x160 = g_msgHIO.field_0x82;
- i_Msg->mMsgDataProc.field_0x15C = 2;
+ i_Msg->mMsgDataProc.sendSpeed = g_msgHIO.field_0x82;
+ i_Msg->mMsgDataProc.spaceTimer = 2;
if (g_msgHIO.field_0x83 != 0) {
- i_Msg->mMsgDataProc.field_0x29C = 1;
+ i_Msg->mMsgDataProc.spaceFlag = 1;
} else {
- i_Msg->mMsgDataProc.field_0x29C = 0;
+ i_Msg->mMsgDataProc.spaceFlag = 0;
}
i_Msg->m10D0 = (i_Msg->m10D8) - i_Msg->m049C.mPosCenter.x;
i_Msg->m10D4 = (i_Msg->m10DC) - i_Msg->m049C.mPosCenter.y;
@@ -1000,7 +1000,7 @@ void dMsg_ScreenDataValueInitDemo(sub_msg_class* i_Msg) {
f32 tmp = 0.5f;
i_Msg->m1104 = (((J2DTextBox*)i_Msg->m0544[0].pane)->mLineSpace * tmp);
i_Msg->mMsgDataProc.dataInit();
- i_Msg->mMsgDataProc.field_0x3C = (char*)i_Msg->mpMesgStr;
+ i_Msg->mMsgDataProc.bmgData = (char*)i_Msg->mpMesgStr;
pcVar5 = i_Msg->output_rubSdw;
pcVar4 = i_Msg->output_textSdw;
pcVar2 = i_Msg->output_rub;
@@ -1022,19 +1022,19 @@ void dMsg_ScreenDataValueInitDemo(sub_msg_class* i_Msg) {
i_Msg->mMsgDataProc.field_0x50[3] = pcVar1;
i_Msg->mMsgDataProc.font[0] = textFont;
i_Msg->mMsgDataProc.font[1] = rubyFont;
- i_Msg->mMsgDataProc.field_0x11C = dVar6;
- i_Msg->mMsgDataProc.field_0x124 = dVar7;
- i_Msg->mMsgDataProc.field_0x0C = &i_Msg->mMesgEntry;
- i_Msg->mMsgDataProc.field_0x144 = i_Msg->m110C;
- i_Msg->mMsgDataProc.field_0x14C = i_Msg->m1110;
- i_Msg->mMsgDataProc.field_0x128 = 0x1f7;
- i_Msg->mMsgDataProc.field_0x12C = 0x1e6;
- i_Msg->mMsgDataProc.field_0x160 = g_msgHIO.field_0x82;
- i_Msg->mMsgDataProc.field_0x15C = 2;
+ i_Msg->mMsgDataProc.charSpace = dVar6;
+ i_Msg->mMsgDataProc.rubyCharSpace = dVar7;
+ i_Msg->mMsgDataProc.mesgEntry = &i_Msg->mMesgEntry;
+ i_Msg->mMsgDataProc.fontSize = i_Msg->m110C;
+ i_Msg->mMsgDataProc.rubyFontSize = i_Msg->m1110;
+ i_Msg->mMsgDataProc.lineWidth = 0x1f7;
+ i_Msg->mMsgDataProc.centerLineWidth = 0x1e6;
+ i_Msg->mMsgDataProc.sendSpeed = g_msgHIO.field_0x82;
+ i_Msg->mMsgDataProc.spaceTimer = 2;
if (g_msgHIO.field_0x83 != 0) {
- i_Msg->mMsgDataProc.field_0x29C = 1;
+ i_Msg->mMsgDataProc.spaceFlag = 1;
} else {
- i_Msg->mMsgDataProc.field_0x29C = 0;
+ i_Msg->mMsgDataProc.spaceFlag = 0;
}
}
@@ -1081,8 +1081,8 @@ void dMsg_setString(sub_msg_class* i_Msg) {
/* 8020EDE0-8020EE38 .text dMsg_yose_select__FP13sub_msg_class */
void dMsg_yose_select(sub_msg_class* i_Msg) {
i_Msg->mMsgDataProc.stringLength();
- i_Msg->m1108 = i_Msg->mMsgDataProc.field_0x130;
- i_Msg->mMsgDataProc.field_0x130 = 0;
+ i_Msg->m1108 = i_Msg->mMsgDataProc.lineCount;
+ i_Msg->mMsgDataProc.lineCount = 0;
i_Msg->mMsgDataProc.stringShift();
i_Msg->mMsgDataProc.iconIdxRefresh();
dMsg_textPosition(i_Msg);
@@ -1950,11 +1950,11 @@ s32 dMsg_stopProc(sub_msg_class* i_Msg) {
u8 bVar1;
u32 uVar2;
- if (i_Msg->mMsgDataProc.field_0x297 != 0) {
+ if (i_Msg->mMsgDataProc.autoSendFlag != 0) {
uVar2 = (int)i_Msg->mMsgDataProc.field_0x158 > 0 ? i_Msg->mMsgDataProc.field_0x158 - 1 : 0;
i_Msg->mMsgDataProc.field_0x158 = uVar2;
if (uVar2 == 0) {
- i_Msg->mMsgDataProc.field_0x297 = 0;
+ i_Msg->mMsgDataProc.autoSendFlag = 0;
#if VERSION > VERSION_DEMO
i_Msg->mMsgDataProc.field_0x296 = 0;
#endif
@@ -2003,7 +2003,7 @@ s32 dMsg_stopProc(sub_msg_class* i_Msg) {
{
i_Msg->mMsgDataProc.field_0x299 = 1;
}
- if (((i_Msg->mMsgDataProc.field_0x297 == 0) && (i_Msg->mMsgDataProc.field_0x298 == 0)) && ((s32)i_Msg->mMsgDataProc.field_0x158 != 0)) {
+ if (((i_Msg->mMsgDataProc.autoSendFlag == 0) && (i_Msg->mMsgDataProc.handSendFlag == 0)) && ((s32)i_Msg->mMsgDataProc.field_0x158 != 0)) {
i_Msg->mMsgDataProc.field_0x158 = 0;
#if VERSION > VERSION_DEMO
i_Msg->mMsgDataProc.field_0x296 = 0;
@@ -2330,11 +2330,11 @@ s32 dMsg_continueProc(sub_msg_class* i_Msg) {
iVar1 = (int)((J2DTextBox*)i_Msg->m0544[0].pane)->getCharSpace();
iVar2 = (int)((J2DTextBox*)i_Msg->m0544[1].pane)->getCharSpace();
- if (((((CPad_CHECK_TRIG_A(0)) || (CPad_CHECK_TRIG_B(0))) || (i_Msg->mMsgDataProc.field_0x294 != 0)) ||
+ if (((((CPad_CHECK_TRIG_A(0)) || (CPad_CHECK_TRIG_B(0))) || (i_Msg->mMsgDataProc.selectFlag != 0)) ||
(fopMsgM_checkMessageSend() || (i_Msg->mMsgNo == 0x5ac && (dComIfGp_checkMesgCancelButton())))) &&
(!dComIfGp_checkMesgBgm()))
{
- i_Msg->mMsgDataProc.field_0x294 = 0;
+ i_Msg->mMsgDataProc.selectFlag = 0;
i_Msg->m1100 = 0;
JKRFileLoader::removeResource(i_Msg->head_p, NULL);
if ((i_Msg->mMesgEntry.mTextboxType != 5) && (i_Msg->mMesgEntry.mTextboxType != 0xe)) {
@@ -2359,7 +2359,7 @@ s32 dMsg_continueProc(sub_msg_class* i_Msg) {
dMsg_value_init(i_Msg);
i_Msg->mMsgDataProc.dataInit();
i_Msg->mMsgDataProc.field_0x25C = i_Msg->m1164;
- i_Msg->mMsgDataProc.field_0x3C = (char*)i_Msg->mpMesgStr;
+ i_Msg->mMsgDataProc.bmgData = (char*)i_Msg->mpMesgStr;
pcVar13 = i_Msg->output_rubSdw;
pcVar12 = i_Msg->output_textSdw;
pcVar10 = i_Msg->output_rub;
@@ -2381,24 +2381,24 @@ s32 dMsg_continueProc(sub_msg_class* i_Msg) {
i_Msg->mMsgDataProc.field_0x50[3] = pcVar10;
i_Msg->mMsgDataProc.font[0] = textFont;
i_Msg->mMsgDataProc.font[1] = rubyFont;
- i_Msg->mMsgDataProc.field_0x11C = iVar1;
- i_Msg->mMsgDataProc.field_0x124 = iVar2;
- i_Msg->mMsgDataProc.field_0x0C = &i_Msg->mMesgEntry;
- i_Msg->mMsgDataProc.field_0x144 = i_Msg->m110C;
- i_Msg->mMsgDataProc.field_0x14C = i_Msg->m1110;
+ i_Msg->mMsgDataProc.charSpace = iVar1;
+ i_Msg->mMsgDataProc.rubyCharSpace = iVar2;
+ i_Msg->mMsgDataProc.mesgEntry = &i_Msg->mMesgEntry;
+ i_Msg->mMsgDataProc.fontSize = i_Msg->m110C;
+ i_Msg->mMsgDataProc.rubyFontSize = i_Msg->m1110;
if ((i_Msg->mMesgEntry.mTextboxType == 9) && (i_Msg->m0624[8].mUserArea == 0)) {
- i_Msg->mMsgDataProc.field_0x128 = 0x1a3;
- i_Msg->mMsgDataProc.field_0x12C = 0x192;
+ i_Msg->mMsgDataProc.lineWidth = 0x1a3;
+ i_Msg->mMsgDataProc.centerLineWidth = 0x192;
} else {
- i_Msg->mMsgDataProc.field_0x128 = 0x1f7;
- i_Msg->mMsgDataProc.field_0x12C = 0x1e6;
+ i_Msg->mMsgDataProc.lineWidth = 0x1f7;
+ i_Msg->mMsgDataProc.centerLineWidth = 0x1e6;
}
- i_Msg->mMsgDataProc.field_0x160 = g_msgHIO.field_0x82;
- i_Msg->mMsgDataProc.field_0x15C = 2;
+ i_Msg->mMsgDataProc.sendSpeed = g_msgHIO.field_0x82;
+ i_Msg->mMsgDataProc.spaceTimer = 2;
if (g_msgHIO.field_0x83 != 0) {
- i_Msg->mMsgDataProc.field_0x29C = 1;
+ i_Msg->mMsgDataProc.spaceFlag = 1;
} else {
- i_Msg->mMsgDataProc.field_0x29C = 0;
+ i_Msg->mMsgDataProc.spaceFlag = 0;
}
dMsg_yose_select(i_Msg);
if (i_Msg->mMesgEntry.mInitialSound != 0) {
@@ -2468,7 +2468,7 @@ s32 dMsg_continueProc(sub_msg_class* i_Msg) {
{
i_Msg->mMsgDataProc.field_0x299 = 1;
}
- if (((i_Msg->mMsgDataProc.field_0x297 == 0) && (i_Msg->mMsgDataProc.field_0x298 == 0)) && ((s32)i_Msg->mMsgDataProc.field_0x158 != 0)) {
+ if (((i_Msg->mMsgDataProc.autoSendFlag == 0) && (i_Msg->mMsgDataProc.handSendFlag == 0)) && ((s32)i_Msg->mMsgDataProc.field_0x158 != 0)) {
i_Msg->mMsgDataProc.field_0x158 = 0;
#if VERSION > VERSION_DEMO
i_Msg->mMsgDataProc.field_0x296 = 0;
@@ -2490,11 +2490,11 @@ s32 dMsg_closewaitProc(sub_msg_class* i_Msg) {
u8 bVar1;
u32 uVar3;
- if (i_Msg->mMsgDataProc.field_0x297 != 0) {
+ if (i_Msg->mMsgDataProc.autoSendFlag != 0) {
uVar3 = (int)i_Msg->mMsgDataProc.field_0x158 > 0 ? i_Msg->mMsgDataProc.field_0x158 - 1 : 0;
i_Msg->mMsgDataProc.field_0x158 = uVar3;
if ((uVar3 == 0) || (fopMsgM_checkMessageSend())) {
- i_Msg->mMsgDataProc.field_0x297 = 0;
+ i_Msg->mMsgDataProc.autoSendFlag = 0;
#if VERSION > VERSION_DEMO
i_Msg->mMsgDataProc.field_0x296 = 0;
#endif
@@ -2505,12 +2505,12 @@ s32 dMsg_closewaitProc(sub_msg_class* i_Msg) {
dComIfGp_setMesgSendButton(i_Msg->m116A);
}
} else {
- if (i_Msg->mMsgDataProc.field_0x298 != 0) {
+ if (i_Msg->mMsgDataProc.handSendFlag != 0) {
uVar3 = (int)i_Msg->mMsgDataProc.field_0x158 > 0 ? i_Msg->mMsgDataProc.field_0x158 - 1 : 0;
i_Msg->mMsgDataProc.field_0x158 = uVar3;
if (uVar3 != 0) {
if ((((CPad_CHECK_TRIG_A(0)) || (CPad_CHECK_TRIG_B(0))) || (fopMsgM_checkMessageSend())) && (!dComIfGp_checkMesgBgm())) {
- i_Msg->mMsgDataProc.field_0x298 = 0;
+ i_Msg->mMsgDataProc.handSendFlag = 0;
i_Msg->mStatus = fopMsgStts_BOX_CLOSING_e;
bVar1 = i_Msg->mMesgEntry.mTextboxType;
if ((bVar1 != 5) && (bVar1 != 0xe)) {
@@ -2528,7 +2528,7 @@ s32 dMsg_closewaitProc(sub_msg_class* i_Msg) {
dMeter_Info.field_0x0 = 4;
}
} else {
- i_Msg->mMsgDataProc.field_0x298 = 0;
+ i_Msg->mMsgDataProc.handSendFlag = 0;
i_Msg->mStatus = fopMsgStts_BOX_CLOSING_e;
bVar1 = i_Msg->mMesgEntry.mTextboxType;
if ((bVar1 != 5) && (bVar1 != 0xe)) {
@@ -2546,11 +2546,11 @@ s32 dMsg_closewaitProc(sub_msg_class* i_Msg) {
/* 80213830-80213960 .text dMsg_finishProc__FP13sub_msg_class */
s32 dMsg_finishProc(sub_msg_class* i_Msg) {
- if ((((((CPad_CHECK_TRIG_A(0)) || (CPad_CHECK_TRIG_B(0))) || (i_Msg->mMsgDataProc.field_0x294 != 0)) || (fopMsgM_checkMessageSend())) ||
+ if ((((((CPad_CHECK_TRIG_A(0)) || (CPad_CHECK_TRIG_B(0))) || (i_Msg->mMsgDataProc.selectFlag != 0)) || (fopMsgM_checkMessageSend())) ||
(i_Msg->mMsgNo == 0x5ac && (dComIfGp_checkMesgCancelButton()))) &&
(!dComIfGp_checkMesgBgm()))
{
- i_Msg->mMsgDataProc.field_0x294 = 0;
+ i_Msg->mMsgDataProc.selectFlag = 0;
i_Msg->mStatus = fopMsgStts_BOX_CLOSING_e;
if ((i_Msg->mMesgEntry.mTextboxType != 5) && (i_Msg->mMesgEntry.mTextboxType != 0xe)) {
fopMsgM_setNowAlphaZero(&i_Msg->m050C);
@@ -2748,7 +2748,7 @@ s32 dMsg_initProc(sub_msg_class* i_Msg) {
/* 802140CC-8021411C .text dMsg_tactProc__FP13sub_msg_class */
s32 dMsg_tactProc(sub_msg_class* i_Msg) {
if (fopMsgM_checkMessageSend()) {
- i_Msg->mMsgDataProc.field_0x297 = 1;
+ i_Msg->mMsgDataProc.autoSendFlag = 1;
i_Msg->mMsgDataProc.field_0x158 = 30;
i_Msg->mStatus = fopMsgStts_CLOSE_WAIT_e;
}
@@ -2773,7 +2773,7 @@ s32 dMsg_outnowProc(sub_msg_class* i_Msg) {
if (i_Msg->mMesgEntry.mDrawType == 0) {
if (((CPad_CHECK_TRIG_A(0)) || (CPad_CHECK_TRIG_B(0))) && (!dComIfGp_checkMesgBgm())) {
i_Msg->mMsgDataProc.field_0x299 = 1;
- if ((i_Msg->mMsgDataProc.field_0x297 == 0 && (i_Msg->mMsgDataProc.field_0x298 == 0)) && ((s32)i_Msg->mMsgDataProc.field_0x158 != 0)) {
+ if ((i_Msg->mMsgDataProc.autoSendFlag == 0 && (i_Msg->mMsgDataProc.handSendFlag == 0)) && ((s32)i_Msg->mMsgDataProc.field_0x158 != 0)) {
i_Msg->mMsgDataProc.field_0x158 = 0;
#if VERSION > VERSION_DEMO
i_Msg->mMsgDataProc.field_0x296 = 0;
@@ -2788,12 +2788,12 @@ s32 dMsg_outnowProc(sub_msg_class* i_Msg) {
) {
i_Msg->mMsgDataProc.field_0x299 = 1;
}
- if (((i_Msg->mMsgDataProc.field_0x297 == 0) && (i_Msg->mMsgDataProc.field_0x298 == 0)) && ((int)i_Msg->mMsgDataProc.field_0x158 != 0)) {
+ if (((i_Msg->mMsgDataProc.autoSendFlag == 0) && (i_Msg->mMsgDataProc.handSendFlag == 0)) && ((int)i_Msg->mMsgDataProc.field_0x158 != 0)) {
i_Msg->mMsgDataProc.field_0x158 = (int)i_Msg->mMsgDataProc.field_0x158 > 0 ? i_Msg->mMsgDataProc.field_0x158 - 1 : 0;
} else {
i_Msg->mMsgDataProc.stringSet();
i_Msg->m1164 = i_Msg->mMsgDataProc.field_0x25C;
- i_Msg->mStatus = (u16)i_Msg->mMsgDataProc.field_0x27C;
+ i_Msg->mStatus = (u16)i_Msg->mMsgDataProc.mesgStatus;
for (s32 i = 0; i < 8; i++) {
cVar4 = i_Msg->mMsgDataProc.field_0x281[i];
iVar3 = i_Msg->mMsgDataProc.field_0x220[i];
@@ -2808,7 +2808,7 @@ s32 dMsg_outnowProc(sub_msg_class* i_Msg) {
uVar2 = i_Msg->mStatus;
if (uVar2 == 7) {
i_Msg->m1100 = 0;
- } else if ((uVar2 == 10) && (i_Msg->mMsgDataProc.field_0x297 == 0)) {
+ } else if ((uVar2 == 10) && (i_Msg->mMsgDataProc.autoSendFlag == 0)) {
i_Msg->m1100 = 0;
}
}
diff --git a/src/f_op/f_op_msg_mng.cpp b/src/f_op/f_op_msg_mng.cpp
index 5e87f6eb..0a7d752c 100644
--- a/src/f_op/f_op_msg_mng.cpp
+++ b/src/f_op/f_op_msg_mng.cpp
@@ -125,6 +125,24 @@ static struct {
/* 0x3B */ {dItemNo_SHOP_GURU_STATUE_e, "beast_12.bti"},
};
+u16 zfont[][2] = {
+ 0x8340, 0x84a4, 0x8341, 0x84a5, 0x8342, 0x84a6, 0x8343, 0x84a7, 0x8344, 0x84a8, 0x8345, 0x84a9, 0x8346,
+ 0x84aa, 0x8347, 0x84ab, 0x8348, 0x84ac, 0x8349, 0x84ad, 0x834a, 0x84ae, 0x834b, 0x84af, 0x834c, 0x84b0,
+ 0x834d, 0x84b1, 0x834e, 0x84b2, 0x834f, 0x84b3, 0x8350, 0x84b4, 0x8351, 0x84b5, 0x8352, 0x84b6, 0x8353,
+ 0x84b7, 0x8354, 0x84b8, 0x8355, 0x84b9, 0x8356, 0x84ba, 0x8357, 0x84bb, 0x8358, 0x84bc, 0x8359, 0x84bd,
+ 0x835a, 0x84be, 0x835b, 0x8740, 0x835c, 0x8741, 0x835d, 0x8742, 0x835e, 0x8743, 0x835f, 0x8744, 0x8360,
+ 0x8745, 0x8361, 0x8746, 0x8362, 0x8747, 0x8363, 0x8748, 0x8364, 0x8749, 0x8365, 0x874a, 0x8366, 0x874b,
+ 0x8367, 0x874c, 0x8368, 0x874d, 0x8369, 0x874e, 0x836a, 0x874f, 0x836b, 0x8750, 0x836c, 0x8751, 0x836d,
+ 0x8752, 0x836e, 0x8753, 0x836f, 0x8754, 0x8370, 0x8755, 0x8371, 0x8756, 0x8372, 0x8757, 0x8373, 0x8758,
+ 0x8374, 0x8759, 0x8375, 0x875a, 0x8376, 0x875b, 0x8377, 0x875c, 0x8378, 0x875d, 0x8379, 0x875f, 0x837a,
+ 0x8760, 0x837b, 0x8761, 0x837c, 0x8762, 0x837d, 0x8763, 0x837e, 0x8764, 0x8380, 0x8765, 0x8381, 0x8766,
+ 0x8382, 0x8767, 0x8383, 0x8768, 0x8384, 0x8769, 0x8385, 0x876a, 0x8386, 0x876b, 0x8387, 0x876c, 0x8388,
+ 0x876d, 0x8389, 0x876e, 0x838a, 0x876f, 0x838b, 0x8770, 0x838c, 0x8771, 0x838d, 0x8772, 0x838e, 0x8773,
+ 0x838f, 0x8774, 0x8390, 0x8775, 0x8391, 0x877e, 0x8392, 0x8780, 0x8393, 0x8781, 0x824f, 0x8782, 0x8250,
+ 0x8783, 0x8251, 0x8784, 0x8252, 0x8785, 0x8253, 0x8786, 0x8254, 0x8787, 0x8255, 0x8788, 0x8256, 0x8789,
+ 0x8257, 0x878a, 0x8258, 0x878b, 0x8141, 0x878c, 0x815b, 0x878d, 0x8175, 0x878e, 0x8176, 0x878f,
+};
+
struct fopMsgM_pane_alpha_class;
@@ -731,10 +749,42 @@ char* fopMsgM_passwordGet(char* dst, u32 msgNo) {
return dst;
}
+static f32 dummyfloat0(int _) {
+ switch (_) {
+ case 0: return 0.0f;
+ case 1: return 0.5f;
+ }
+}
+
+static f64 dummyfloat1(int _) {
+ switch (_) {
+ case 0: return 4503601774854144.0;
+ case 1: return 0.5;
+ case 2: return 3.0;
+ }
+}
+
+static f32 dummyfloat2(int _) {
+ switch (_) {
+ case 0: return 2.0f;
+ }
+}
+
+struct fopMsgM_unk_struct {
+ u16 _0;
+ u16 _2;
+ u16 _4;
+ u16 _6;
+ u16 _8;
+ u16 _A;
+ s16 _C;
+ u16 _E;
+ u8 _10;
+};
+
/* 8002C02C-8002C568 .text fopMsgM_selectMessageGet__FP7J2DPaneP7J2DPanePcPcPcPcUl */
-void fopMsgM_selectMessageGet(J2DPane* param_1, J2DPane* param_2, char* param_3, char* param_4, char* param_5, char* param_6, u32 param_7) {
- /* Nonmatching */
- fopMsgM_msgDataProc_c temp;
+fopMsgM_unk_struct fopMsgM_selectMessageGet(J2DPane* param_1, J2DPane* param_2, char* param_3, char* param_4, char* param_5, char* param_6, u32 param_7) {
+ fopMsgM_msgDataProc_c msgData;
fopMsgM_itemMsgGet_c msgGet;
strcpy(param_3, "\x1B""CC[000000FF]\x1B""GM[0]");
@@ -744,43 +794,84 @@ void fopMsgM_selectMessageGet(J2DPane* param_1, J2DPane* param_2, char* param_3,
J2DTextBox::TFontSize size;
J2DTextBox::TFontSize size2;
- ((J2DTextBox*)param_1)->getFontSize(size);
- ((J2DTextBox*)param_2)->getFontSize(size2);
+ ((J2DTextBox*)param_2)->getFontSize(size);
+ ((J2DTextBox*)param_1)->getFontSize(size2);
mesg_header* head_p = msgGet.getMesgHeader(param_7);
- JUT_ASSERT(0x79B, head_p);
+ JUT_ASSERT(1947, head_p);
- const char* src = (char*)msgGet.getMessage(head_p);
+ char* src = (char*)msgGet.getMessage(head_p);
+ fopMsgM_unk_struct sp40;
JMSMesgEntry_c entry;
entry = msgGet.getMesgEntry(head_p);
- temp.dataInit();
- temp.font[0] = ((J2DTextBox*)param_1)->getFont();
- temp.font[1] = ((J2DTextBox*)param_2)->getFont();
- temp.field_0x11C = ((J2DTextBox*)param_1)->getCharSpace();
- temp.field_0x124 = ((J2DTextBox*)param_2)->getCharSpace();
- temp.field_0x120 = ((J2DTextBox*)param_2)->getLineSpace();
- temp.field_0x0C = &entry;
- temp.field_0x144 = size.mSizeX;
- temp.field_0x14C = size2.mSizeX;
- temp.field_0x128 = param_2->getWidth();
- temp.field_0x160 = 2;
- temp.field_0x15C = 0;
- temp.field_0x299 = 1;
- temp.field_0x29C = 0;
- temp.stringLength();
- temp.stringShift();
- temp.iconIdxRefresh();
- temp.field_0x130 = 0;
-
- f32 fVar2 = (2 - temp.field_0x130) * ((J2DTextBox*)param_2)->getLineSpace() * 0.5f;
- ((J2DTextBox*) param_3)->field_0xd8 = 0.0f;
- ((J2DTextBox*) param_3)->field_0xdc = fVar2;
- ((J2DTextBox*) param_2)->field_0xd8 = 0.0f;
- ((J2DTextBox*) param_2)->field_0xdc = fVar2;
-
- temp.stringSet();
+
+ msgData.dataInit();
+ msgData.setBmgData(src);
+ msgData.setOutMessage(param_3, param_4, param_5, param_6);
+ msgData.setFont(((J2DTextBox*)param_1)->getFont());
+ msgData.setRubyFont(((J2DTextBox*)param_2)->getFont());
+ msgData.setCharSpace(((J2DTextBox*)param_1)->getCharSpace());
+ msgData.setRubyCharSpace(((J2DTextBox*)param_2)->getCharSpace());
+ msgData.setLineSpace(((J2DTextBox*)param_1)->getLineSpace());
+ msgData.setMesgEntry(&entry);
+ msgData.setFontSize(size2.mSizeX);
+ msgData.setRubyFontSize(size.mSizeX);
+ msgData.setLineWidth(param_1->getWidth());
+ msgData.setCenterLineWidth(param_1->getWidth());
+ msgData.setSendSpeed(2);
+ msgData.setSpaceTimer(0);
+ msgData.shortCut();
+ msgData.setSpaceFlagOff();
+ msgData.stringLength();
+ msgData.stringShift();
+ msgData.iconIdxRefresh();
+
+ s16 temp_r3 = msgData.getLineCount();
+ msgData.setLineCount(0);
+
+ int temp_r30_2 = 2 - temp_r3;
+ f32 fVar2 = temp_r30_2 * (((J2DTextBox*)param_1)->getLineSpace() / 2);
+ ((J2DTextBox*)param_2)->shiftSet(0.0f, fVar2);
+ ((J2DTextBox*)param_1)->shiftSet(0.0f, fVar2);
+
+ msgData.stringSet();
((J2DTextBox*)param_1)->setString(param_3);
- ((J2DTextBox*)param_1)->setString(param_4);
+ ((J2DTextBox*)param_2)->setString(param_4);
+
+ int temp_r5 = ((J2DTextBox*)param_1)->getLineSpace() / 2;
+ s16 temp_r6 = ((J2DTextBox*)param_1)->getBounds().i.x;
+ s16 temp_r3_3 = ((J2DTextBox*)param_1)->getBounds().i.y;
+
+ u8 var_r7 = false;
+ for (int i = 0; i < 15; i++) {
+ u8 temp_r9 = msgData.getIconNum(i);
+ if (temp_r9 != 0xFF) {
+ if (temp_r9 == 0x14) {
+ if (!var_r7) {
+ sp40._0 = temp_r6 + msgData.getIconPosX(i);
+ sp40._4 = temp_r3_3 + (temp_r5 * (temp_r30_2 + (msgData.getIconPosY(i) * 2)));
+ var_r7 = true;
+ } else {
+ sp40._2 = sp40._8 = temp_r6 + msgData.getIconPosX(i);
+ sp40._6 = sp40._C = temp_r3_3 + (temp_r5 * (temp_r30_2 + (msgData.getIconPosY(i) * 2)));
+ }
+ } else if (temp_r9 == 0x15) {
+ sp40._10 = var_r7;
+ if (!var_r7) {
+ sp40._0 = temp_r6 + msgData.getIconPosX(i);
+ sp40._4 = temp_r3_3 + (temp_r5 * (temp_r30_2 + (msgData.getIconPosY(i) * 2)));
+ var_r7 = true;
+ } else {
+ sp40._2 = sp40._8 = temp_r6 + msgData.getIconPosX(i);
+ sp40._6 = sp40._C = temp_r3_3 + (temp_r5 * (temp_r30_2 + (msgData.getIconPosY(i) * 2)));
+ }
+ }
+ }
+ }
+
+ sp40._A = temp_r6 + msgData.getNowCursorPos();
+ sp40._E = sp40._C;
+ return sp40;
}
/* 8002C568-8002C574 .text fopMsgM_demoMsgFlagOn__Fv */
@@ -1473,9 +1564,8 @@ const char* fopMsgM_msgGet_c::getMessage(mesg_header* msg) {
mMsgIdx = i;
if (mMsgNo == info->mEntries[i].mMsgNo) {
- JMSMesgEntry_c* entry = &info->mEntries[mMsgIdx];
- ret = &data[entry->mDataOffs];
- mResMsgNo = entry->mMsgNo;
+ ret = &data[info->mEntries[mMsgIdx].mDataOffs];
+ mResMsgNo = info->mEntries[mMsgIdx].mMsgNo;
break;
}
}
@@ -1570,25 +1660,25 @@ fopMsgM_msgDataProc_c::fopMsgM_msgDataProc_c() {
field_0x30 = 0;
field_0x34 = 0;
field_0x38 = 0;
- field_0x118 = 0;
- field_0x11C = 0;
- field_0x124 = 0;
- field_0x120 = 0;
- field_0x128 = 0;
- field_0x12C = 0;
- field_0x130 = 0;
+ count = 0;
+ charSpace = 0;
+ rubyCharSpace = 0;
+ lineSpace = 0;
+ lineWidth = 0;
+ centerLineWidth = 0;
+ lineCount = 0;
field_0x134 = 0;
- field_0x138 = 0;
- field_0x13C = 0;
+ nowLine = 0;
+ aimLine = 0;
field_0x140 = 0;
- field_0x144 = 0;
+ fontSize = 0;
field_0x148 = 0;
- field_0x14C = 0;
+ rubyFontSize = 0;
field_0x150 = 0;
field_0x154 = 0;
field_0x158 = 0;
- field_0x15C = 1;
- field_0x160 = 1;
+ spaceTimer = 1;
+ sendSpeed = 1;
field_0x164 = 0;
field_0x25C = -1;
field_0x29D = 0;
@@ -1603,7 +1693,7 @@ fopMsgM_msgDataProc_c::fopMsgM_msgDataProc_c() {
field_0x292 = 0;
field_0x291 = 0;
field_0x290 = 0;
- field_0x27C = 6;
+ mesgStatus = 6;
field_0x27D = 0;
field_0x27E = 0;
field_0x27F = 0;
@@ -1620,11 +1710,11 @@ fopMsgM_msgDataProc_c::fopMsgM_msgDataProc_c() {
field_0x10 = 0;
field_0x299 = 0;
field_0x29A = 0;
- field_0x294 = 0;
+ selectFlag = 0;
field_0x29B = 0;
- field_0x297 = 0;
- field_0x298 = 0;
- field_0x29C = 0;
+ autoSendFlag = 0;
+ handSendFlag = 0;
+ spaceFlag = 0;
field_0x295 = 0;
#if VERSION > VERSION_DEMO
field_0x296 = 0;
@@ -1656,25 +1746,25 @@ void fopMsgM_msgDataProc_c::dataInit() {
field_0x30 = 0;
field_0x34 = 0;
field_0x38 = 0;
- field_0x118 = 0;
- field_0x11C = 0;
- field_0x124 = 0;
- field_0x120 = 0;
- field_0x128 = 0;
- field_0x12C = 0;
- field_0x130 = 0;
+ count = 0;
+ charSpace = 0;
+ rubyCharSpace = 0;
+ lineSpace = 0;
+ lineWidth = 0;
+ centerLineWidth = 0;
+ lineCount = 0;
field_0x134 = 0;
- field_0x138 = 0;
- field_0x13C = 0;
+ nowLine = 0;
+ aimLine = 0;
field_0x140 = 0;
- field_0x144 = 0;
+ fontSize = 0;
field_0x148 = 0;
- field_0x14C = 0;
+ rubyFontSize = 0;
field_0x150 = 0;
field_0x154 = 0;
field_0x158 = 0;
- field_0x15C = 1;
- field_0x160 = 1;
+ spaceTimer = 1;
+ sendSpeed = 1;
field_0x164 = 0;
field_0x29D = 0;
field_0x260 = 0;
@@ -1688,7 +1778,7 @@ void fopMsgM_msgDataProc_c::dataInit() {
field_0x292 = 0;
field_0x291 = 0;
field_0x290 = 0;
- field_0x27C = 6;
+ mesgStatus = 6;
field_0x27D = 0;
field_0x27E = 0;
field_0x27F = 0;
@@ -1702,11 +1792,11 @@ void fopMsgM_msgDataProc_c::dataInit() {
}
field_0x299 = 0;
field_0x29A = 0;
- field_0x294 = 0;
+ selectFlag = 0;
field_0x29B = 0;
- field_0x297 = 0;
- field_0x298 = 0;
- field_0x29C = 0;
+ autoSendFlag = 0;
+ handSendFlag = 0;
+ spaceFlag = 0;
field_0x295 = 0;
#if VERSION > VERSION_DEMO
field_0x296 = 0;
@@ -1723,7 +1813,7 @@ f32 fopMsgM_msgDataProc_c::charLength(int scale, int charNo, bool mode) {
if (mode) {
return charWidth * cellWidth;
} else {
- return field_0x11C + (charWidth * cellWidth);
+ return charSpace + (charWidth * cellWidth);
}
}
@@ -1733,16 +1823,16 @@ f32 fopMsgM_msgDataProc_c::rubyLength(int param_1, bool param_2) {
font[1]->getWidthEntry(param_1, &width);
s32 advance = width.field_0x1;
f32 width2 = font[1]->getCellWidth();
- f32 temp = ((s32)field_0x14C / width2);
+ f32 temp = ((s32)rubyFontSize / width2);
if(param_2) {
return advance * temp;
}
- return (s32)field_0x124 + advance * temp;
+ return (s32)rubyCharSpace + advance * temp;
}
/* 8002EB4C-80031064 .text stringLength__21fopMsgM_msgDataProc_cFv */
-void fopMsgM_msgDataProc_c::stringLength() {
+u32 fopMsgM_msgDataProc_c::stringLength() {
/* Nonmatching */
}
@@ -1756,7 +1846,7 @@ void fopMsgM_msgDataProc_c::iconSelect(int param_1, u8 param_2) {
if(field_0x280 < 0xF) {
field_0x281[field_0x280] = param_2;
field_0x168[field_0x280] = field_0x20;
- field_0x1A4[field_0x280] = field_0x130;
+ field_0x1A4[field_0x280] = lineCount;
field_0x1E0[field_0x280] = param_1;
field_0x220[field_0x280] = field_0x25C;
field_0x280++;
@@ -1765,12 +1855,12 @@ void fopMsgM_msgDataProc_c::iconSelect(int param_1, u8 param_2) {
if(param_2 != 0x16) {
field_0x150++;
field_0x14 += param_1;
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
char buf[16];
sprintf(buf, "\x1B""CR[%d]", param_1);
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
}
@@ -2057,9 +2147,9 @@ void fopMsgM_msgDataProc_c::stringSet() {
field_0x64 = field_0x44;
field_0x68 = field_0x48;
field_0x6C = field_0x4C;
- field_0x27C = 6;
+ mesgStatus = 6;
- if(field_0x3C[field_0x118] == '\0') {
+ if(bmgData[count] == '\0') {
if(field_0x27E != 0) {
field_0x27E = 0;
field_0x60[field_0x2C] = '\0';
@@ -2074,8 +2164,8 @@ void fopMsgM_msgDataProc_c::stringSet() {
strcat(field_0x64, field_0x70);
strcat(field_0x6C, field_0x70);
}
- if(field_0x27C != 8 && field_0x27C != 9 && field_0x27C != 0x14 && field_0x27C != 0x15) {
- if(field_0x0C->mTextboxType != 2 && field_0x0C->mTextboxType != 6 && field_0x0C->mTextboxType != 7 && field_0x0C->mTextboxType != 0xB && field_0x0C->mTextboxType != 5 && field_0x0C->mTextboxType != 0xD && field_0x0C->mTextboxType != 9) {
+ if(mesgStatus != 8 && mesgStatus != 9 && mesgStatus != 0x14 && mesgStatus != 0x15) {
+ if(mesgEntry->mTextboxType != 2 && mesgEntry->mTextboxType != 6 && mesgEntry->mTextboxType != 7 && mesgEntry->mTextboxType != 0xB && mesgEntry->mTextboxType != 5 && mesgEntry->mTextboxType != 0xD && mesgEntry->mTextboxType != 9) {
if(dComIfGp_roomControl_getStayNo()) {
mDoAud_messageSePlay(0, 0, dComIfGp_getReverb(dComIfGp_roomControl_getStayNo()));
}
@@ -2085,20 +2175,20 @@ void fopMsgM_msgDataProc_c::stringSet() {
}
if(fopMsgM_nextMsgFlagCheck()) {
- if(field_0x0C->mNextMsgNo != 0) {
- fopMsgM_messageSet(field_0x0C->mNextMsgNo);
- field_0x27C = 0xF;
+ if(mesgEntry->mNextMsgNo != 0) {
+ fopMsgM_messageSet(mesgEntry->mNextMsgNo);
+ mesgStatus = 0xF;
}
else {
- field_0x27C = 0x10;
+ mesgStatus = 0x10;
}
}
else {
if(getAutoSendFlag() || getHandSendFlag()) {
- field_0x27C = 0xA;
+ mesgStatus = 0xA;
}
else {
- field_0x27C = 0xE;
+ mesgStatus = 0xE;
}
}
}
@@ -2108,8 +2198,8 @@ void fopMsgM_msgDataProc_c::stringSet() {
while(true) {
while(true) {
- if(field_0x3C[field_0x118] == '\0') {
- if(field_0x299 == 0 && field_0x29A == 0 && field_0x297 == 0 && field_0x298 == 0 && field_0x294) {
+ if(bmgData[count] == '\0') {
+ if(field_0x299 == 0 && field_0x29A == 0 && autoSendFlag == 0 && handSendFlag == 0 && selectFlag) {
return;
}
@@ -2128,11 +2218,11 @@ void fopMsgM_msgDataProc_c::stringSet() {
strcat(field_0x6C, field_0x70);
}
- if(field_0x27C == 8 || field_0x27C == 9 || field_0x27C == 0x14 || field_0x27C == 0x15) {
+ if(mesgStatus == 8 || mesgStatus == 9 || mesgStatus == 0x14 || mesgStatus == 0x15) {
return;
}
- if(field_0x0C->mTextboxType != 2 && field_0x0C->mTextboxType != 6 && field_0x0C->mTextboxType != 7 && field_0x0C->mTextboxType != 0xB && field_0x0C->mTextboxType != 5 && field_0x0C->mTextboxType != 0xD && field_0x0C->mTextboxType != 9) {
+ if(mesgEntry->mTextboxType != 2 && mesgEntry->mTextboxType != 6 && mesgEntry->mTextboxType != 7 && mesgEntry->mTextboxType != 0xB && mesgEntry->mTextboxType != 5 && mesgEntry->mTextboxType != 0xD && mesgEntry->mTextboxType != 9) {
if(dComIfGp_roomControl_getStayNo()) {
mDoAud_messageSePlay(0, 0, dComIfGp_getReverb(dComIfGp_roomControl_getStayNo()));
}
@@ -2142,20 +2232,20 @@ void fopMsgM_msgDataProc_c::stringSet() {
}
if(fopMsgM_nextMsgFlagCheck()) {
- if(field_0x0C->mNextMsgNo != 0) {
- fopMsgM_messageSet(field_0x0C->mNextMsgNo);
- field_0x27C = 0xF;
+ if(mesgEntry->mNextMsgNo != 0) {
+ fopMsgM_messageSet(mesgEntry->mNextMsgNo);
+ mesgStatus = 0xF;
}
else {
- field_0x27C = 0x10;
+ mesgStatus = 0x10;
}
}
else {
if(getAutoSendFlag() || getHandSendFlag()) {
- field_0x27C = 0xA;
+ mesgStatus = 0xA;
}
else {
- field_0x27C = 0xE;
+ mesgStatus = 0xE;
}
}
}
@@ -2175,11 +2265,11 @@ void fopMsgM_msgDataProc_c::stringSet() {
strcat(field_0x6C, field_0x70);
}
- u32 origOffset = field_0x118;
- const char* temp = &field_0x3C[origOffset];
+ u32 origOffset = count;
+ const char* temp = &bmgData[origOffset];
if(*temp != 0x1A) break;
if(temp[2] == 0xFF && temp[3] == 0 && temp[4] == 0) {
- if(field_0x0C->mMsgNo == 0x42 || field_0x0C->mMsgNo == 0x43 || field_0x0C->mMsgNo == 0x44 || field_0x0C->mMsgNo == 0x45 || field_0x0C->mMsgNo == 0x46 || field_0x0C->mMsgNo == 0x47 || field_0x0C->mMsgNo == 0x48 || field_0x0C->mMsgNo == 0x49 || field_0x0C->mMsgNo == 0x4A || field_0x0C->mMsgNo == 0x4B) {
+ if(mesgEntry->mMsgNo == 0x42 || mesgEntry->mMsgNo == 0x43 || mesgEntry->mMsgNo == 0x44 || mesgEntry->mMsgNo == 0x45 || mesgEntry->mMsgNo == 0x46 || mesgEntry->mMsgNo == 0x47 || mesgEntry->mMsgNo == 0x48 || mesgEntry->mMsgNo == 0x49 || mesgEntry->mMsgNo == 0x4A || mesgEntry->mMsgNo == 0x4B) {
static const u32 colorTable[9] = {
0x000000FF,
0xB40000FF,
@@ -2198,7 +2288,7 @@ void fopMsgM_msgDataProc_c::stringSet() {
}
else {
if(temp[5] > -1 && temp[5] < 9) {
- if(field_0x0C->mTextboxType == 2 || field_0x0C->mTextboxType == 6 || field_0x0C->mTextboxType == 7) {
+ if(mesgEntry->mTextboxType == 2 || mesgEntry->mTextboxType == 6 || mesgEntry->mTextboxType == 7) {
static const u32 colorTable[9] = {
0x00000000,
0xB4000000,
@@ -2210,7 +2300,7 @@ void fopMsgM_msgDataProc_c::stringSet() {
0x50505000,
0xFFB40000,
};
- field_0x25C = colorTable[field_0x0C->mTextboxType];
+ field_0x25C = colorTable[mesgEntry->mTextboxType];
char buf[16];
sprintf(buf, "\x1B""CC[%08x]\x1B""GC[%08x]", field_0x25C | field_0x290, field_0x25C | field_0x291);
strcat(field_0x60, buf);
@@ -2241,12 +2331,12 @@ void fopMsgM_msgDataProc_c::stringSet() {
}
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
else if(temp[2] == 0xFF && temp[3] == 0 && temp[4] == 1) {
f32 temp2 = *(u16*)(&temp[5]);
u32 temp3 = field_0x148;
- field_0x148 = field_0x144 * temp2 * 0.1f + 0.5f;
+ field_0x148 = fontSize * temp2 * 0.1f + 0.5f;
if(field_0x134 == 0) {
fopMsgM_setFontsizeCenter(field_0x60, field_0x68, field_0x64, field_0x6C, temp3, field_0x148);
if(temp2 * 0.1f > 1.0f && field_0x29D == 0) {
@@ -2265,10 +2355,10 @@ void fopMsgM_msgDataProc_c::stringSet() {
strcat(field_0x68, buf);
field_0x29D = 1;
}
- fopMsgM_setFontsizeCenter2(field_0x60, field_0x68, field_0x64, field_0x6C, temp3, field_0x148, field_0x144, field_0x120);
+ fopMsgM_setFontsizeCenter2(field_0x60, field_0x68, field_0x64, field_0x6C, temp3, field_0x148, fontSize, lineSpace);
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
else if(temp[2] == 0xFF && temp[3] == 0 && temp[4] == 2) {
if(temp[1] != 5) {
@@ -2276,15 +2366,15 @@ void fopMsgM_msgDataProc_c::stringSet() {
field_0x18 = 0.0f;
field_0x1C = 0.0f;
field_0x28 = field_0x20;
- field_0x154 = field_0x3C[field_0x118 + 5];
- field_0x118 += 6;
- while(field_0x118 < origOffset + temp[2]) {
+ field_0x154 = bmgData[count + 5];
+ count += 6;
+ while(count < origOffset + temp[2]) {
char buf[3];
- buf[0] = field_0x3C[field_0x118];
- buf[1] = field_0x3C[field_0x118 + 1];
+ buf[0] = bmgData[count];
+ buf[1] = bmgData[count + 1];
buf[2] = '\0';
strcat(field_0x70, buf);
- u16 temp2 = *(u16*)(&field_0x3C[field_0x118]);
+ u16 temp2 = *(u16*)(&bmgData[count]);
if(field_0x29B == 0) {
field_0x18 = rubyLength(temp2, true);
field_0x29B = 1;
@@ -2293,7 +2383,7 @@ void fopMsgM_msgDataProc_c::stringSet() {
field_0x18 += rubyLength(temp2, false);
}
- field_0x118 += 2;
+ count += 2;
}
}
}
@@ -2305,12 +2395,12 @@ void fopMsgM_msgDataProc_c::stringSet() {
dComIfGs_getPalLanguage() == 1 &&
#endif
(
- field_0x0C->mMsgNo == 0x33B ||
- field_0x0C->mMsgNo == 0xC8B ||
- field_0x0C->mMsgNo == 0x1D21 ||
- field_0x0C->mMsgNo == 0x31D7 ||
- field_0x0C->mMsgNo == 0x37DD ||
- field_0x0C->mMsgNo == 0x37DE
+ mesgEntry->mMsgNo == 0x33B ||
+ mesgEntry->mMsgNo == 0xC8B ||
+ mesgEntry->mMsgNo == 0x1D21 ||
+ mesgEntry->mMsgNo == 0x31D7 ||
+ mesgEntry->mMsgNo == 0x37DD ||
+ mesgEntry->mMsgNo == 0x37DE
)
) {
s32 bufLen = strlen(buf);
@@ -2350,28 +2440,28 @@ void fopMsgM_msgDataProc_c::stringSet() {
field_0x150 += 1;
}
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
else if(temp[2] == 0 && temp[3] == 0 && temp[4] == 1) {
field_0x29A = 1;
- field_0x118 = field_0x3C[field_0x118 + 1];
+ count = bmgData[count + 1];
}
else if(temp[2] == 0 && temp[3] == 0 && temp[4] == 2) {
field_0x29A = 0;
- field_0x118 = field_0x3C[field_0x118 + 1];
+ count = bmgData[count + 1];
}
else if(temp[2] == 0 && temp[3] == 0 && temp[4] == 3) {
field_0x158 = temp[5] << 8;
- field_0x158 |= field_0x3C[field_0x118 + 6];
+ field_0x158 |= bmgData[count + 6];
setAutoSendFlagOn();
- field_0x118 = field_0x3C[field_0x118 + 1];
+ count = bmgData[count + 1];
}
sprintf(field_0x60, "\x1B""CL[%d]", 0.5f);
@@ -2404,42 +2494,42 @@ void fopMsgM_msgDataProc_c::stringSet() {
strcat(field_0x64, "\n");
strcat(field_0x68, "\n");
strcat(field_0x6C, "\n");
- field_0x118++;
- field_0x130++;
+ count++;
+ lineCount++;
if(field_0x29D) {
- field_0x130++;
+ lineCount++;
field_0x29D = 0;
}
}
/* 80034F5C-80034F68 .text setSelectFlagYokoOn__21fopMsgM_msgDataProc_cFv */
void fopMsgM_msgDataProc_c::setSelectFlagYokoOn() {
- field_0x294 = 2;
+ selectFlag = 2;
}
/* 80034F68-80034F74 .text setSelectFlagOn__21fopMsgM_msgDataProc_cFv */
void fopMsgM_msgDataProc_c::setSelectFlagOn() {
- field_0x294 = 1;
+ selectFlag = 1;
}
/* 80034F74-80034F80 .text setHandSendFlagOn__21fopMsgM_msgDataProc_cFv */
void fopMsgM_msgDataProc_c::setHandSendFlagOn() {
- field_0x298 = 1;
+ handSendFlag = 1;
}
/* 80034F80-80034F8C .text setAutoSendFlagOn__21fopMsgM_msgDataProc_cFv */
void fopMsgM_msgDataProc_c::setAutoSendFlagOn() {
- field_0x297 = 1;
+ autoSendFlag = 1;
}
/* 80034F8C-80034F94 .text getHandSendFlag__21fopMsgM_msgDataProc_cFv */
u8 fopMsgM_msgDataProc_c::getHandSendFlag() {
- return field_0x298;
+ return handSendFlag;
}
/* 80034F94-80034F9C .text getAutoSendFlag__21fopMsgM_msgDataProc_cFv */
u8 fopMsgM_msgDataProc_c::getAutoSendFlag() {
- return field_0x297;
+ return autoSendFlag;
}
/* 80034FE0-80034FF4 .text fopMsgM_itemNumIdx__FUc */
@@ -2688,11 +2778,11 @@ void fopMsgM_msgDataProc_c::getRubyString(char* param_1, char* param_2, char* pa
strcat(param_1, param_5);
strcat(param_2, param_5);
- if(field_0x294 != 1) {
- *param_7 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ *param_7 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- *param_7 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ *param_7 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
f32 temp3 = 0.0f;
@@ -2824,8 +2914,8 @@ void fopMsgM_msgDataProc_c::tag_len_rupee(int* param_1, f32* param_2, int* param
void fopMsgM_msgDataProc_c::tag_len_num_input(int* param_1, f32* param_2, int* param_3, int* param_4, int* param_5) {
char buf[12];
- if(*param_5 != field_0x130) {
- field_0x130 = *param_5;
+ if(*param_5 != lineCount) {
+ lineCount = *param_5;
}
#if VERSION == VERSION_PAL
@@ -3049,7 +3139,7 @@ void fopMsgM_msgDataProc_c::tag_len_letter(int* param_1, f32* param_2, int* para
#if VERSION == VERSION_PAL
if (dComIfGs_getPalLanguage() == 1) {
- if (field_0x0C->mMsgNo == 0xCEB) {
+ if (mesgEntry->mMsgNo == 0xCEB) {
if (num != 1) {
strcat(buf, " Briefe");
} else {
@@ -4154,8 +4244,8 @@ void fopMsgM_msgDataProc_c::tag_len_terry_rupee(int* param_1, f32* param_2, int*
void fopMsgM_msgDataProc_c::tag_len_input_bokobaba(int* param_1, f32* param_2, int* param_3, int* param_4, int* param_5) {
char buf[28];
- if(*param_5 != field_0x130) {
- field_0x130 = *param_5;
+ if(*param_5 != lineCount) {
+ lineCount = *param_5;
}
#if VERSION == VERSION_PAL
@@ -4199,8 +4289,8 @@ void fopMsgM_msgDataProc_c::tag_len_input_bokobaba(int* param_1, f32* param_2, i
void fopMsgM_msgDataProc_c::tag_len_input_dokuro(int* param_1, f32* param_2, int* param_3, int* param_4, int* param_5) {
char buf[28];
- if(*param_5 != field_0x130) {
- field_0x130 = *param_5;
+ if(*param_5 != lineCount) {
+ lineCount = *param_5;
}
#if VERSION == VERSION_PAL
@@ -4244,8 +4334,8 @@ void fopMsgM_msgDataProc_c::tag_len_input_dokuro(int* param_1, f32* param_2, int
void fopMsgM_msgDataProc_c::tag_len_input_chuchu(int* param_1, f32* param_2, int* param_3, int* param_4, int* param_5) {
char buf[28];
- if(*param_5 != field_0x130) {
- field_0x130 = *param_5;
+ if(*param_5 != lineCount) {
+ lineCount = *param_5;
}
#if VERSION == VERSION_PAL
@@ -4289,8 +4379,8 @@ void fopMsgM_msgDataProc_c::tag_len_input_chuchu(int* param_1, f32* param_2, int
void fopMsgM_msgDataProc_c::tag_len_input_pendant(int* param_1, f32* param_2, int* param_3, int* param_4, int* param_5) {
char buf[28];
- if(*param_5 != field_0x130) {
- field_0x130 = *param_5;
+ if(*param_5 != lineCount) {
+ lineCount = *param_5;
}
#if VERSION == VERSION_PAL
@@ -4334,8 +4424,8 @@ void fopMsgM_msgDataProc_c::tag_len_input_pendant(int* param_1, f32* param_2, in
void fopMsgM_msgDataProc_c::tag_len_input_hane(int* param_1, f32* param_2, int* param_3, int* param_4, int* param_5) {
char buf[28];
- if(*param_5 != field_0x130) {
- field_0x130 = *param_5;
+ if(*param_5 != lineCount) {
+ lineCount = *param_5;
}
#if VERSION == VERSION_PAL
@@ -4379,8 +4469,8 @@ void fopMsgM_msgDataProc_c::tag_len_input_hane(int* param_1, f32* param_2, int*
void fopMsgM_msgDataProc_c::tag_len_input_kenshi(int* param_1, f32* param_2, int* param_3, int* param_4, int* param_5) {
char buf[28];
- if(*param_5 != field_0x130) {
- field_0x130 = *param_5;
+ if(*param_5 != lineCount) {
+ lineCount = *param_5;
}
#if VERSION == VERSION_PAL
@@ -4444,11 +4534,11 @@ void fopMsgM_msgDataProc_c::tag_kaisen_game() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
dComIfGs_getEventReg(dSv_event_flag_c::UNK_BEFF);
@@ -4474,7 +4564,7 @@ void fopMsgM_msgDataProc_c::tag_kaisen_game() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80038178-80038330 .text tag_rupee__21fopMsgM_msgDataProc_cFv */
@@ -4534,14 +4624,14 @@ void fopMsgM_msgDataProc_c::tag_rupee() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80038330-80038538 .text tag_num_input__21fopMsgM_msgDataProc_cFv */
@@ -4549,10 +4639,10 @@ void fopMsgM_msgDataProc_c::tag_num_input() {
char buf[8];
char buf2[16];
- int temp = (field_0x148 + field_0x11C) * 3;
- field_0x294 = 3;
+ int temp = (field_0x148 + charSpace) * 3;
+ selectFlag = 3;
iconSelect(field_0x148, 0x16);
- field_0x27C = 0x15;
+ mesgStatus = 0x15;
sprintf(buf2, "\x1B""CR[%d]", temp);
strcat(field_0x60, buf2);
strcat(field_0x68, buf2);
@@ -4592,14 +4682,14 @@ void fopMsgM_msgDataProc_c::tag_num_input() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80038538-8003872C .text tag_sword_game__21fopMsgM_msgDataProc_cFv */
@@ -4626,11 +4716,11 @@ void fopMsgM_msgDataProc_c::tag_sword_game() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
char buf2[12];
@@ -4669,7 +4759,7 @@ void fopMsgM_msgDataProc_c::tag_sword_game() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003872C-800388AC .text tag_letter_game__21fopMsgM_msgDataProc_cFv */
@@ -4696,14 +4786,14 @@ void fopMsgM_msgDataProc_c::tag_letter_game() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 800388AC-80038A40 .text tag_letter_game_max__21fopMsgM_msgDataProc_cFv */
@@ -4730,14 +4820,14 @@ void fopMsgM_msgDataProc_c::tag_letter_game_max() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80038A40-80038BC0 .text tag_fish__21fopMsgM_msgDataProc_cFv */
@@ -4764,14 +4854,14 @@ void fopMsgM_msgDataProc_c::tag_fish() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80038BC0-80038D7C .text tag_fish_rupee__21fopMsgM_msgDataProc_cFv */
@@ -4831,14 +4921,14 @@ void fopMsgM_msgDataProc_c::tag_fish_rupee() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80038D7C-80038F70 .text tag_letter__21fopMsgM_msgDataProc_cFv */
@@ -4865,18 +4955,18 @@ void fopMsgM_msgDataProc_c::tag_letter() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
char buf2[12];
#if VERSION == VERSION_PAL
if (dComIfGs_getPalLanguage() == 1) {
- if (field_0x0C->mMsgNo == 0xCEB) {
+ if (mesgEntry->mMsgNo == 0xCEB) {
if (num != 1) {
strcpy(buf2, " Briefe");
} else {
@@ -4920,7 +5010,7 @@ void fopMsgM_msgDataProc_c::tag_letter() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80038F70-8003912C .text tag_rescue__21fopMsgM_msgDataProc_cFv */
@@ -4947,11 +5037,11 @@ void fopMsgM_msgDataProc_c::tag_rescue() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -4978,7 +5068,7 @@ void fopMsgM_msgDataProc_c::tag_rescue() {
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, "", "", &field_0x20, &field_0x24, &field_0x150);
#endif
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003912C-800394B4 .text tag_forest_timer__21fopMsgM_msgDataProc_cFv */
@@ -5005,11 +5095,11 @@ void fopMsgM_msgDataProc_c::tag_forest_timer() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
strcpy(buf2, ":");
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
@@ -5038,15 +5128,15 @@ void fopMsgM_msgDataProc_c::tag_forest_timer() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, "", "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 800394B4-8003966C .text tag_birdman__21fopMsgM_msgDataProc_cFv */
@@ -5110,14 +5200,14 @@ void fopMsgM_msgDataProc_c::tag_birdman() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003966C-80039834 .text tag_point__21fopMsgM_msgDataProc_cFv */
@@ -5185,14 +5275,14 @@ void fopMsgM_msgDataProc_c::tag_point() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80039834-80039A28 .text tag_get_pendant__21fopMsgM_msgDataProc_cFv */
@@ -5219,11 +5309,11 @@ void fopMsgM_msgDataProc_c::tag_get_pendant() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -5272,7 +5362,7 @@ void fopMsgM_msgDataProc_c::tag_get_pendant() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80039A28-80039C2C .text tag_rev_pendant__21fopMsgM_msgDataProc_cFv */
@@ -5299,11 +5389,11 @@ void fopMsgM_msgDataProc_c::tag_rev_pendant() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -5352,7 +5442,7 @@ void fopMsgM_msgDataProc_c::tag_rev_pendant() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80039C2C-80039FA0 .text tag_pig_timer__21fopMsgM_msgDataProc_cFv */
@@ -5379,11 +5469,11 @@ void fopMsgM_msgDataProc_c::tag_pig_timer() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
strcpy(buf2, ":");
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
@@ -5412,15 +5502,15 @@ void fopMsgM_msgDataProc_c::tag_pig_timer() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, "", "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 80039FA0-8003A194 .text tag_get_bomb__21fopMsgM_msgDataProc_cFv */
@@ -5447,11 +5537,11 @@ void fopMsgM_msgDataProc_c::tag_get_bomb() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
char buf2[12];
@@ -5486,7 +5576,7 @@ void fopMsgM_msgDataProc_c::tag_get_bomb() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003A194-8003A388 .text tag_get_arrow__21fopMsgM_msgDataProc_cFv */
@@ -5513,11 +5603,11 @@ void fopMsgM_msgDataProc_c::tag_get_arrow() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
char buf2[12];
@@ -5552,7 +5642,7 @@ void fopMsgM_msgDataProc_c::tag_get_arrow() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003A388-8003A574 .text tag_stock_bokobaba__21fopMsgM_msgDataProc_cFv */
@@ -5579,11 +5669,11 @@ void fopMsgM_msgDataProc_c::tag_stock_bokobaba() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -5625,7 +5715,7 @@ void fopMsgM_msgDataProc_c::tag_stock_bokobaba() {
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
#endif
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003A574-8003A760 .text tag_stock_dokuro__21fopMsgM_msgDataProc_cFv */
@@ -5652,11 +5742,11 @@ void fopMsgM_msgDataProc_c::tag_stock_dokuro() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -5701,7 +5791,7 @@ void fopMsgM_msgDataProc_c::tag_stock_dokuro() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003A760-8003A914 .text tag_stock_chuchu__21fopMsgM_msgDataProc_cFv */
@@ -5728,11 +5818,11 @@ void fopMsgM_msgDataProc_c::tag_stock_chuchu() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -5766,7 +5856,7 @@ void fopMsgM_msgDataProc_c::tag_stock_chuchu() {
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, "", "", &field_0x20, &field_0x24, &field_0x150);
#endif
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003A914-8003AB00 .text tag_stock_pendant__21fopMsgM_msgDataProc_cFv */
@@ -5793,11 +5883,11 @@ void fopMsgM_msgDataProc_c::tag_stock_pendant() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -5842,7 +5932,7 @@ void fopMsgM_msgDataProc_c::tag_stock_pendant() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003AB00-8003ACEC .text tag_stock_hane__21fopMsgM_msgDataProc_cFv */
@@ -5869,11 +5959,11 @@ void fopMsgM_msgDataProc_c::tag_stock_hane() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -5918,7 +6008,7 @@ void fopMsgM_msgDataProc_c::tag_stock_hane() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003ACEC-8003AED8 .text tag_stock_kenshi__21fopMsgM_msgDataProc_cFv */
@@ -5945,11 +6035,11 @@ void fopMsgM_msgDataProc_c::tag_stock_kenshi() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
char buf2[12];
@@ -5988,7 +6078,7 @@ void fopMsgM_msgDataProc_c::tag_stock_kenshi() {
#endif
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, buf2, "", &field_0x20, &field_0x24, &field_0x150);
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003AED8-8003B088 .text tag_terry_rupee__21fopMsgM_msgDataProc_cFv */
@@ -6048,14 +6138,14 @@ void fopMsgM_msgDataProc_c::tag_terry_rupee() {
strcat(field_0x60, buf);
strcat(field_0x68, buf);
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003B088-8003B21C .text tag_input_bokobaba__21fopMsgM_msgDataProc_cFv */
@@ -6063,21 +6153,21 @@ void fopMsgM_msgDataProc_c::tag_input_bokobaba() {
/* Nonmatching */
char buf[16];
- int temp = (field_0x148 + field_0x11C) * 2;
- field_0x294 = 3;
+ int temp = (field_0x148 + charSpace) * 2;
+ selectFlag = 3;
iconSelect(field_0x148, 0x16);
- field_0x27C = 0x15;
+ mesgStatus = 0x15;
sprintf(buf, "\x1B""CR[%d]", temp);
strcat(field_0x60, buf);
strcat(field_0x68, buf);
field_0x14 = temp;
field_0x150 += 2;
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -6100,7 +6190,7 @@ void fopMsgM_msgDataProc_c::tag_input_bokobaba() {
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, text, "", &field_0x20, &field_0x24, &field_0x150);
#endif
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003B21C-8003B3B0 .text tag_input_dokuro__21fopMsgM_msgDataProc_cFv */
@@ -6108,21 +6198,21 @@ void fopMsgM_msgDataProc_c::tag_input_dokuro() {
/* Nonmatching */
char buf[16];
- int temp = (field_0x148 + field_0x11C) * 2;
- field_0x294 = 3;
+ int temp = (field_0x148 + charSpace) * 2;
+ selectFlag = 3;
iconSelect(field_0x148, 0x16);
- field_0x27C = 0x15;
+ mesgStatus = 0x15;
sprintf(buf, "\x1B""CR[%d]", temp);
strcat(field_0x60, buf);
strcat(field_0x68, buf);
field_0x14 = temp;
field_0x150 += 2;
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -6145,7 +6235,7 @@ void fopMsgM_msgDataProc_c::tag_input_dokuro() {
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, text, "", &field_0x20, &field_0x24, &field_0x150);
#endif
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003B3B0-8003B544 .text tag_input_chuchu__21fopMsgM_msgDataProc_cFv */
@@ -6153,21 +6243,21 @@ void fopMsgM_msgDataProc_c::tag_input_chuchu() {
/* Nonmatching */
char buf[16];
- int temp = (field_0x148 + field_0x11C) * 2;
- field_0x294 = 3;
+ int temp = (field_0x148 + charSpace) * 2;
+ selectFlag = 3;
iconSelect(field_0x148, 0x16);
- field_0x27C = 0x15;
+ mesgStatus = 0x15;
sprintf(buf, "\x1B""CR[%d]", temp);
strcat(field_0x60, buf);
strcat(field_0x68, buf);
field_0x14 = temp;
field_0x150 += 2;
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -6189,7 +6279,7 @@ void fopMsgM_msgDataProc_c::tag_input_chuchu() {
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, "", "", &field_0x20, &field_0x24, &field_0x150);
#endif
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003B544-8003B6D8 .text tag_input_pendant__21fopMsgM_msgDataProc_cFv */
@@ -6197,21 +6287,21 @@ void fopMsgM_msgDataProc_c::tag_input_pendant() {
/* Nonmatching */
char buf[16];
- int temp = (field_0x148 + field_0x11C) * 2;
- field_0x294 = 3;
+ int temp = (field_0x148 + charSpace) * 2;
+ selectFlag = 3;
iconSelect(field_0x148, 0x16);
- field_0x27C = 0x15;
+ mesgStatus = 0x15;
sprintf(buf, "\x1B""CR[%d]", temp);
strcat(field_0x60, buf);
strcat(field_0x68, buf);
field_0x14 = temp;
field_0x150 += 2;
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -6234,7 +6324,7 @@ void fopMsgM_msgDataProc_c::tag_input_pendant() {
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, text, "", &field_0x20, &field_0x24, &field_0x150);
#endif
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003B6D8-8003B86C .text tag_input_hane__21fopMsgM_msgDataProc_cFv */
@@ -6242,21 +6332,21 @@ void fopMsgM_msgDataProc_c::tag_input_hane() {
/* Nonmatching */
char buf[16];
- int temp = (field_0x148 + field_0x11C) * 2;
- field_0x294 = 3;
+ int temp = (field_0x148 + charSpace) * 2;
+ selectFlag = 3;
iconSelect(field_0x148, 0x16);
- field_0x27C = 0x15;
+ mesgStatus = 0x15;
sprintf(buf, "\x1B""CR[%d]", temp);
strcat(field_0x60, buf);
strcat(field_0x68, buf);
field_0x14 = temp;
field_0x150 += 2;
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -6279,7 +6369,7 @@ void fopMsgM_msgDataProc_c::tag_input_hane() {
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, text, "", &field_0x20, &field_0x24, &field_0x150);
#endif
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
/* 8003B86C-8003BA00 .text tag_input_kenshi__21fopMsgM_msgDataProc_cFv */
@@ -6287,21 +6377,21 @@ void fopMsgM_msgDataProc_c::tag_input_kenshi() {
/* Nonmatching */
char buf[16];
- int temp = (field_0x148 + field_0x11C) * 2;
- field_0x294 = 3;
+ int temp = (field_0x148 + charSpace) * 2;
+ selectFlag = 3;
iconSelect(field_0x148, 0x16);
- field_0x27C = 0x15;
+ mesgStatus = 0x15;
sprintf(buf, "\x1B""CR[%d]", temp);
strcat(field_0x60, buf);
strcat(field_0x68, buf);
field_0x14 = temp;
field_0x150 += 2;
- if(field_0x294 != 1) {
- field_0x20 = field_0xF8[field_0x130] + field_0x14 + 0.5f;
+ if(selectFlag != 1) {
+ field_0x20 = field_0xF8[lineCount] + field_0x14 + 0.5f;
}
else {
- field_0x20 = field_0x108[field_0x130] + field_0x14 + 0.5f;
+ field_0x20 = field_0x108[lineCount] + field_0x14 + 0.5f;
}
#if VERSION == VERSION_PAL
@@ -6324,7 +6414,7 @@ void fopMsgM_msgDataProc_c::tag_input_kenshi() {
getRubyString(field_0x60, field_0x68, field_0x64, field_0x6C, text, "", &field_0x20, &field_0x24, &field_0x150);
#endif
- field_0x118 += field_0x3C[field_0x118 + 1];
+ count += bmgData[count + 1];
}
#endif