Copy OptRuby inline name from TWW debug

This commit is contained in:
LagoLunatic 2025-12-24 16:43:46 -05:00
parent 091069cf49
commit 5f30b34297
13 changed files with 58 additions and 60 deletions

View File

@ -1462,27 +1462,63 @@ inline u8 dComIfGs_getSelectItemIndex(int i_no) {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getSelectItemIndex(i_no);
}
//TODO: actual name is unknown
inline u8 dComIfGs_getOptUnk0() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getUnk0();
// Ruby inline names are from TWW debug.
inline u8 dComIfGs_getOptRuby() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getRuby();
}
inline void dComIfGs_setOptRuby(u8 i_ruby) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setRuby(i_ruby);
}
inline u8 dComIfGs_getOptVibration() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getVibration();
}
inline void dComIfGs_setOptVibration(u8 i_status) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setVibration(i_status);
}
inline u8 dComIfGs_getOptAttentionType() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getAttentionType();
}
inline void dComIfGs_setOptAttentionType(u8 i_attentionType) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setAttentionType(i_attentionType);
}
inline u8 dComIfGs_getOptCameraControl() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getCameraControl();
}
inline void dComIfGs_setOptCameraControl(u8 i_cameraControl) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setCameraControl(i_cameraControl);
}
inline u8 dComIfGs_getOptSound() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getSound();
}
inline void dComIfGs_setOptSound(u8 i_mode) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(i_mode);
}
inline void dComIfGs_setOptCalValue(s8 i_calValue) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setCalValue(i_calValue);
}
inline void dComIfGs_setOptCalibrateDist(u16 i_calibrateDist) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setCalibrateDist(i_calibrateDist);
}
inline u8 dComIfGs_getOptPointer() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getPointer();
}
inline void dComIfGs_setOptPointer(u8 i_pointer) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setPointer(i_pointer);
}
inline BOOL dComIfGs_isTbox(int i_no) {
return g_dComIfG_gameInfo.info.getMemory().getBit().isTbox(i_no);
}
@ -2034,35 +2070,6 @@ inline void dComIfGs_setLastWarpAcceptStage(s8 param_0) {
g_dComIfG_gameInfo.info.getPlayer().getPlayerLastMarkInfo().setWarpAcceptStage(param_0);
}
//TODO: actual name is unknown
inline void dComIfGs_setOptUnk0(u8 i_unk0) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setUnk0(i_unk0);
}
inline void dComIfGs_setOptSound(u8 i_mode) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setSound(i_mode);
}
inline void dComIfGs_setOptVibration(u8 i_status) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setVibration(i_status);
}
inline void dComIfGs_setOptAttentionType(u8 i_attentionType) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setAttentionType(i_attentionType);
}
inline void dComIfGs_setOptCameraControl(u8 i_cameraControl) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setCameraControl(i_cameraControl);
}
inline void dComIfGs_setOptPointer(u8 i_pointer) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setPointer(i_pointer);
}
inline u8 dComIfGs_getOptPointer() {
return g_dComIfG_gameInfo.info.getPlayer().getConfig().getPointer();
}
inline u8 dComIfGs_getNewFile() {
return g_dComIfG_gameInfo.info.getNewFile();
}
@ -2091,14 +2098,6 @@ inline u8 dComIfGs_getWalletSize() {
return g_dComIfG_gameInfo.info.getPlayer().getPlayerStatusA().getWalletSize();
}
inline void dComIfGs_setOptCalValue(s8 i_calValue) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setCalValue(i_calValue);
}
inline void dComIfGs_setOptCalibrateDist(u16 i_calibrateDist) {
g_dComIfG_gameInfo.info.getPlayer().getConfig().setCalibrateDist(i_calibrateDist);
}
inline u16 dComIfGs_getFishNum(u8 param_0) {
return g_dComIfG_gameInfo.info.getPlayer().getFishingInfo().getFishCount(param_0);
}

View File

@ -506,10 +506,9 @@ public:
void setVibration(u8 i_status);
u8 getPalLanguage() const;
//TODO: placeholder name, actual name is not known
u8 getUnk0() { return unk0; }
void setUnk0(u8 i_unk0) { unk0 = i_unk0; }
// Ruby inline names are from TWW debug.
u8 getRuby() { return mRuby; }
void setRuby(u8 i_ruby) { mRuby = i_ruby; }
u8 getAttentionType() { return mAttentionType; }
void setAttentionType(u8 i_mAttentionType) { mAttentionType = i_mAttentionType; }
u16 getCalibrateDist() { return mCalibrateDist; }
@ -532,7 +531,7 @@ public:
};
private:
/* 0x0 */ u8 unk0;
/* 0x0 */ u8 mRuby;
/* 0x1 */ u8 mSoundMode;
/* 0x2 */ u8 mAttentionType; // Lock-On Type; 0 : hold, 1 : switch
/* 0x3 */ u8 mVibration; // Rumble status

View File

@ -981,7 +981,7 @@ void dMenu_Letter_c::screenSetLetter() {
dPaneClass_showNullPane(mpLetterScreen[0]);
#if VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptUnk0() == 0) {
if (dComIfGs_getOptRuby() == 0) {
field_0x2ec[0] = new CPaneMgr(mpLetterScreen[0], 't3f_s', 0, NULL);
field_0x2ec[1] = new CPaneMgr(mpLetterScreen[0], 'mg_3flin', 0, NULL);
field_0x2f4[0] = new CPaneMgr(mpLetterScreen[0], 'mg_3f_s', 0, NULL);

View File

@ -1128,9 +1128,9 @@ void dMenu_Option_c::confirm_close_move() {
dComIfGs_setOptAttentionType(field_0x3e4);
#if VERSION == VERSION_GCN_JPN
if (field_0x3e5_JPN == 0) {
dComIfGs_setOptUnk0(1);
dComIfGs_setOptRuby(1);
} else {
dComIfGs_setOptUnk0(0);
dComIfGs_setOptRuby(0);
}
#endif
if (isRumbleSupported()) {
@ -2144,7 +2144,7 @@ void dMenu_Option_c::paneResize(u64 i_tag) {
void dMenu_Option_c::initialize() {
field_0x3e4 = dComIfGs_getOptAttentionType();
#if VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptUnk0() == 0) {
if (dComIfGs_getOptRuby() == 0) {
field_0x3e5_JPN = 1;
} else {
field_0x3e5_JPN = 0;

View File

@ -1444,7 +1444,7 @@ void dMeterButton_c::screenInitText() {
JUT_ASSERT(2499, mpTmRoot_c != NULL);
#if VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptUnk0() == 0) {
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = new CPaneMgr(mpTextScreen, 'mg_3flin', 0, NULL);
mpTm_c[1] = new CPaneMgr(mpTextScreen, 't3f_s', 0, NULL);

View File

@ -108,7 +108,7 @@ dMsgScrn3Select_c::dMsgScrn3Select_c() {
}
#if VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptUnk0() == 0) {
if (dComIfGs_getOptRuby() == 0) {
mpTmSel_c[0] = new CPaneMgr(mpScreen, 'a_tf', 0, NULL);
mpTmSel_c[1] = new CPaneMgr(mpScreen, 'b_tf', 0, NULL);
@ -911,7 +911,7 @@ void dMsgScrn3Select_c::selectTrans() {
f32 sp68[3];
for (int i = 0; i < 3; i++) {
#if VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptUnk0() == 0 && (field_0x112 & (u8)(1 << i)) != 0) {
if (dComIfGs_getOptRuby() == 0 && (field_0x112 & (u8)(1 << i)) != 0) {
sp68[i] = 0.0f;
} else {
f32 temp = mpTmSel_c[i]->getInitPosY();

View File

@ -90,7 +90,7 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_
#if VERSION == VERSION_GCN_JPN
field_0x50 = 0.0f;
if (dComIfGs_getOptUnk0() == 0) {
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL);
mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3f_s', 0, NULL);

View File

@ -198,7 +198,7 @@ dMsgScrnItem_c::dMsgScrnItem_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) {
mpPmP_c->scale(g_MsgObject_HIO_c.mBoxItemScaleX, g_MsgObject_HIO_c.mBoxItemScaleY);
#if VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptUnk0() == 0) {
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL);
JUT_ASSERT(407, mpTm_c[0] != NULL);

View File

@ -46,7 +46,7 @@ dMsgScrnJimaku_c::dMsgScrnJimaku_c(u8 param_0, JKRExpHeap* i_heap) {
mpPmP_c->paneTrans(0.0f, field_0xcc);
#if VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptUnk0() == 0) {
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = new CPaneMgr(mpScreen, 'mg_3flin', 0, NULL);
mpTm_c[1] = new CPaneMgr(mpScreen, 't3f_s', 0, NULL);

View File

@ -58,7 +58,7 @@ dMsgScrnKanban_c::dMsgScrnKanban_c(JKRExpHeap* param_0) {
#if VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptUnk0() != 0) {
if (dComIfGs_getOptRuby() != 0) {
static u64 const t_tag[3] = {'mg_3line', 't3_w', 't3_s'};
for (int i = 0; i < 3; i++) {
mpTm_c[i] = new CPaneMgr(mpScreen, t_tag[i], 0, NULL);

View File

@ -106,7 +106,7 @@ dMsgScrnTalk_c::dMsgScrnTalk_c(u8 param_1, u8 param_2, JKRExpHeap* param_3) {
mpPmP_c->scale(g_MsgObject_HIO_c.mBoxTalkScaleX, g_MsgObject_HIO_c.mBoxTalkScaleY);
#if VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptUnk0() == 0) {
if (dComIfGs_getOptRuby() == 0) {
mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL);
mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3f_s', 0, NULL);

View File

@ -58,7 +58,7 @@ dMsgScrnTree_c::dMsgScrnTree_c(JUTFont* param_0, JKRExpHeap* param_1) {
mpScreen->search('white_m')->setAnimation(field_0xd4);
#if VERSION == VERSION_GCN_JPN
if (dComIfGs_getOptUnk0() != 0) {
if (dComIfGs_getOptRuby() != 0) {
for (int i = 0; i < 3; i++) {
static u64 const t_tag[3] = {'mg_3line', 't3_w', 't3_s'};

View File

@ -973,9 +973,9 @@ void dSv_player_info_c::init() {
void dSv_player_config_c::init() {
#if VERSION == VERSION_GCN_JPN
unk0 = 0;
mRuby = 0;
#else
unk0 = 1;
mRuby = 1;
#endif
#if PLATFORM_GCN