mirror of
https://github.com/zeldaret/tww.git
synced 2026-06-13 13:46:33 -04:00
Add some dCom inlines from TP debug
This commit is contained in:
@@ -445,6 +445,15 @@ public:
|
||||
inline void setHeapLockFlag(u8 flag) { mHeapLockFlag = flag; }
|
||||
inline void offHeapLockFlag() { mHeapLockFlag = 0; }
|
||||
|
||||
// These inlines aren't present in WW JP debug maps, but are present in TP debug.
|
||||
inline u8 getNowVibration() { return mNowVibration; }
|
||||
inline void setNowVibration(u8 vibration) { mNowVibration = vibration; }
|
||||
|
||||
// Inline name is fake (not present in JP debug maps), but was guessed based on the similar
|
||||
// dSv_player_config_c::getPalLanguage() const inline in TP debug.
|
||||
inline u8 getPalLanguage() { return mPalLanguage; }
|
||||
inline void setPalLanguage(u8 lang) { mPalLanguage = lang; }
|
||||
|
||||
void setMsgArchive(JKRArchive * pArc) { mpMsgArchive = pArc; }
|
||||
void setDmsgArchive(JKRArchive * pArc) { mpDmsgArchive = pArc; }
|
||||
void setTmsgArchive(JKRArchive * pArc) { mpTmsgArchive = pArc; }
|
||||
@@ -532,6 +541,9 @@ public:
|
||||
|
||||
void setInputPassword(const char* password) { strcpy(mInputPassword, password); }
|
||||
|
||||
u8 getDirection() { return mDirection; }
|
||||
void setDirection(u8 direction) { mDirection = direction; }
|
||||
|
||||
/* 0x0000 */ dBgS mBgS;
|
||||
/* 0x1404 */ dCcS mCcS;
|
||||
/* 0x3DF8 */ dADM mADM;
|
||||
@@ -624,8 +636,8 @@ public:
|
||||
/* 0x491E */ s16 mAuctionRupee;
|
||||
/* 0x4920 */ s16 mAuctionGauge;
|
||||
/* 0x4922 */ s16 mItemTimer;
|
||||
/* 0x4924 */ s16 mCurrHP;
|
||||
/* 0x4926 */ s16 mRupyCountDisplay;
|
||||
/* 0x4924 */ s16 mItemNowLife;
|
||||
/* 0x4926 */ s16 mItemNowRupee;
|
||||
/* 0x4928 */ u8 field_0x4928;
|
||||
/* 0x4929 */ u8 field_0x4929;
|
||||
/* 0x492A */ u8 mMesgStatus;
|
||||
@@ -645,7 +657,7 @@ public:
|
||||
/* 0x493E */ u8 mItemNo;
|
||||
/* 0x493F */ u8 field_0x493f;
|
||||
/* 0x4940 */ u8 field_0x4940;
|
||||
/* 0x4941 */ u8 field_0x4941;
|
||||
/* 0x4941 */ u8 mDirection;
|
||||
/* 0x4942 */ u8 mButtonMode;
|
||||
/* 0x4943 */ u8 field_0x4943;
|
||||
/* 0x4944 */ u8 field_0x4944;
|
||||
@@ -674,9 +686,9 @@ public:
|
||||
/* 0x4960 */ u8 mPictureFormat;
|
||||
/* 0x4961 */ u8 field_0x4961;
|
||||
/* 0x4962 */ u8 mHeapLockFlag;
|
||||
/* 0x4963 */ u8 field_0x4963;
|
||||
/* 0x4963 */ u8 mNowVibration;
|
||||
#if VERSION != VERSION_JPN
|
||||
/* 0x4964 */ u8 mGameLanguage;
|
||||
/* 0x4964 */ u8 mPalLanguage;
|
||||
#endif
|
||||
/* 0x4965 */ u8 field_0x4965;
|
||||
/* 0x4966 */ char mInputPassword[0x11];
|
||||
@@ -2507,6 +2519,27 @@ inline void dComIfGp_offHeapLockFlag() {
|
||||
g_dComIfG_gameInfo.play.offHeapLockFlag();
|
||||
}
|
||||
|
||||
// Inline name from TP debug.
|
||||
inline u8 dComIfGp_getNowVibration() {
|
||||
return g_dComIfG_gameInfo.play.getNowVibration();
|
||||
}
|
||||
|
||||
// Inline name from TP debug.
|
||||
inline void dComIfGp_setNowVibration(u8 vibration) {
|
||||
g_dComIfG_gameInfo.play.setNowVibration(vibration);
|
||||
}
|
||||
|
||||
// Inline name is fake (not present in JP debug maps), but was guessed based on the similar
|
||||
// dComIfGs_getPalLanguage inline in TP debug.
|
||||
inline u8 dComIfGp_getPalLanguage() {
|
||||
return g_dComIfG_gameInfo.play.getPalLanguage();
|
||||
}
|
||||
|
||||
// Inline name is fake (not present in JP debug maps).
|
||||
inline void dComIfGp_setPalLanguage(u8 lang) {
|
||||
g_dComIfG_gameInfo.play.setPalLanguage(lang);
|
||||
}
|
||||
|
||||
inline void dComIfGp_2dShowOn() {
|
||||
g_dComIfG_gameInfo.play.show2dOn();
|
||||
}
|
||||
@@ -2591,6 +2624,14 @@ inline void dComIfGp_setInputPassword(const char* password) {
|
||||
g_dComIfG_gameInfo.play.setInputPassword(password);
|
||||
}
|
||||
|
||||
inline u8 dComIfGp_getAdvanceDirection() {
|
||||
return g_dComIfG_gameInfo.play.getDirection();
|
||||
}
|
||||
|
||||
inline void dComIfGp_setAdvanceDirection(u8 direction) {
|
||||
return g_dComIfG_gameInfo.play.setDirection(direction);
|
||||
}
|
||||
|
||||
/**
|
||||
* === EVENT ===
|
||||
*/
|
||||
|
||||
@@ -375,7 +375,7 @@ int daAgb_c::uploadSelect() {
|
||||
char path[28];
|
||||
char pathNum[4];
|
||||
strcpy(path, "/res/Gba/client_");
|
||||
sprintf(pathNum, "%d", g_dComIfG_gameInfo.play.mGameLanguage);
|
||||
sprintf(pathNum, "%d", dComIfGp_getPalLanguage());
|
||||
strcat(path, pathNum);
|
||||
strcat(path, ".bin");
|
||||
l_gbaCommand = mDoDvdThd_toMainRam_c::create(path, 0, dMsg_getAgbWorkArea());
|
||||
@@ -451,7 +451,7 @@ int daAgb_c::uploadMessageLoad() {
|
||||
char path[28];
|
||||
char pathNum[4];
|
||||
strcpy(path, "/res/Gba/msg_LZ");
|
||||
sprintf(pathNum, "%d", g_dComIfG_gameInfo.play.mGameLanguage);
|
||||
sprintf(pathNum, "%d", dComIfGp_getPalLanguage());
|
||||
strcat(path, pathNum);
|
||||
strcat(path, ".bin");
|
||||
l_gbaCommand = mDoDvdThd_toMainRam_c::create(path, 0, NULL);
|
||||
|
||||
@@ -2310,7 +2310,7 @@ BOOL daPy_lk_c::commonProcInit(daPy_PROC proc) {
|
||||
swimOutAfter(0);
|
||||
}
|
||||
|
||||
g_dComIfG_gameInfo.play.field_0x4941 = 0; // is this dComIfGp_setAdvanceDirection__FUc?
|
||||
dComIfGp_setAdvanceDirection(0);
|
||||
|
||||
setBgCheckParam();
|
||||
|
||||
|
||||
@@ -96,8 +96,8 @@ void dComIfG_play_c::itemInit() {
|
||||
mAuctionRupee = 0;
|
||||
mAuctionGauge = 0;
|
||||
mItemTimer = 0;
|
||||
mCurrHP = 0;
|
||||
mRupyCountDisplay = 0;
|
||||
mItemNowLife = 0;
|
||||
mItemNowRupee = 0;
|
||||
field_0x4928 = 0;
|
||||
field_0x4929 = 0;
|
||||
mMesgStatus = 0;
|
||||
@@ -121,7 +121,7 @@ void dComIfG_play_c::itemInit() {
|
||||
mItemNo = 0;
|
||||
field_0x493f = 0;
|
||||
field_0x4940 = 0;
|
||||
field_0x4941 = 0;
|
||||
mDirection = 0;
|
||||
mButtonMode = 0;
|
||||
|
||||
if (dComIfGs_checkGetItem(dItem_TELESCOPE_e)) {
|
||||
@@ -168,7 +168,7 @@ void dComIfG_play_c::itemInit() {
|
||||
field_0x4978 = 0;
|
||||
m2dShow = 0;
|
||||
field_0x497a = 0;
|
||||
field_0x4963 = dComIfGs_getOptVibration();
|
||||
mNowVibration = dComIfGs_getOptVibration();
|
||||
daArrow_c::setKeepType(daArrow_c::TYPE_NORMAL);
|
||||
mMesgCameraTagInfo = 0;
|
||||
field_0x4984 = 0;
|
||||
|
||||
@@ -168,7 +168,7 @@ s32 dPn_c::_create() {
|
||||
JUT_ASSERT(VERSION_SELECT(175, 201, 201), dComIfGp_getNowStageNum() < dPn_stage_max_e);
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
u32 lang = g_dComIfG_gameInfo.play.mGameLanguage;
|
||||
u32 lang = dComIfGp_getPalLanguage();
|
||||
char buf[32];
|
||||
sprintf(buf, "/res/placename/PN%d/pn_%02d_%d.bti", lang, dComIfGp_getNowStageNum() + 1, lang);
|
||||
dvd = mDoDvdThd_toMainRam_c::create(buf, 0, mpHeap);
|
||||
|
||||
+9
-9
@@ -663,13 +663,13 @@ s32 phase_1(dScnLogo_c* i_this) {
|
||||
if (g_mDoMemCd_control.field_0x165B >= 5) {
|
||||
g_mDoMemCd_control.field_0x165B = 0;
|
||||
}
|
||||
g_dComIfG_gameInfo.play.mGameLanguage = g_mDoMemCd_control.field_0x165B;
|
||||
dComIfGp_setPalLanguage(g_mDoMemCd_control.field_0x165B);
|
||||
} else {
|
||||
u8 language = OSGetLanguage();
|
||||
if (language >= 5) {
|
||||
language = 0;
|
||||
}
|
||||
g_dComIfG_gameInfo.play.mGameLanguage = language;
|
||||
dComIfGp_setPalLanguage(language);
|
||||
g_mDoMemCd_control.field_0x165B = language;
|
||||
}
|
||||
#endif
|
||||
@@ -771,7 +771,7 @@ s32 phase_2(dScnLogo_c* i_this) {
|
||||
#endif
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", choice[g_dComIfG_gameInfo.play.mGameLanguage]);
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", choice[dComIfGp_getPalLanguage()]);
|
||||
#else
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", LOGO_BTI_PROGRESSIVE_CHOICE);
|
||||
#endif
|
||||
@@ -781,7 +781,7 @@ s32 phase_2(dScnLogo_c* i_this) {
|
||||
i_this->progchoiceImg->setAlpha(0x00);
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", yes[g_dComIfG_gameInfo.play.mGameLanguage]);
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", yes[dComIfGp_getPalLanguage()]);
|
||||
#else
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", LOGO_BTI_PROGRESSIVE_YES);
|
||||
#endif
|
||||
@@ -792,7 +792,7 @@ s32 phase_2(dScnLogo_c* i_this) {
|
||||
i_this->progyesImg->setAlpha(0x00);
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", no[g_dComIfG_gameInfo.play.mGameLanguage]);
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", no[dComIfGp_getPalLanguage()]);
|
||||
#else
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", LOGO_BTI_PROGRESSIVE_NO);
|
||||
#endif
|
||||
@@ -803,7 +803,7 @@ s32 phase_2(dScnLogo_c* i_this) {
|
||||
i_this->prognoImg->setAlpha(0x00);
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", prog[g_dComIfG_gameInfo.play.mGameLanguage]);
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", prog[dComIfGp_getPalLanguage()]);
|
||||
#else
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", LOGO_BTI_PROGRESSIVE_PRO);
|
||||
#endif
|
||||
@@ -813,7 +813,7 @@ s32 phase_2(dScnLogo_c* i_this) {
|
||||
i_this->progImg->setAlpha(0x00);
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", intr[g_dComIfG_gameInfo.play.mGameLanguage]);
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", intr[dComIfGp_getPalLanguage()]);
|
||||
#else
|
||||
timg = (ResTIMG *)dComIfG_getObjectRes("Logo", LOGO_BTI_PROGRESSIVE_INTER);
|
||||
#endif
|
||||
@@ -851,7 +851,7 @@ s32 phase_2(dScnLogo_c* i_this) {
|
||||
#if VERSION == VERSION_PAL
|
||||
delete g_dComIfG_gameInfo.play.field_0x4820;
|
||||
char buf[40];
|
||||
sprintf(buf, "/res/Msg/data%d/acticon.arc", g_dComIfG_gameInfo.play.mGameLanguage);
|
||||
sprintf(buf, "/res/Msg/data%d/acticon.arc", dComIfGp_getPalLanguage());
|
||||
l_actioniconCommand = aramMount(buf);
|
||||
#else
|
||||
l_actioniconCommand = aramMount("/res/Msg/acticon.arc");
|
||||
@@ -868,7 +868,7 @@ s32 phase_2(dScnLogo_c* i_this) {
|
||||
l_saveResCommand = aramMount("/res/Msg/saveres.arc");
|
||||
|
||||
#if VERSION == VERSION_PAL
|
||||
sprintf(buf, "/res/Msg/data%d/bmgres.arc", g_dComIfG_gameInfo.play.mGameLanguage);
|
||||
sprintf(buf, "/res/Msg/data%d/bmgres.arc", dComIfGp_getPalLanguage());
|
||||
l_msgDtCommand = onMemMount(buf);
|
||||
#else
|
||||
l_msgDtCommand = onMemMount("/res/Msg/bmgres.arc");
|
||||
|
||||
+3
-3
@@ -72,7 +72,7 @@ static BOOL dScnMenu_Draw(menu_of_scene_class* i_this) {
|
||||
JUTReport(200, 400, "曜日:%s", weekpat_str[l_weekpat]);
|
||||
#if VERSION != VERSION_JPN
|
||||
static const char* language[] = {"ENGLISH", "GERMAN", "FRENCH", "SPANISH", "ITALIAN"};
|
||||
JUTReport(40, 440, "%s", language[g_dComIfG_gameInfo.play.mGameLanguage]);
|
||||
JUTReport(40, 440, "%s", language[dComIfGp_getPalLanguage()]);
|
||||
#endif
|
||||
if (dComIfGs_isEventBit(0x2d01)) {
|
||||
JUTReport(400, 420, "3コン(A):デモ23 ON");
|
||||
@@ -176,7 +176,7 @@ static BOOL dScnMenu_Execute(menu_of_scene_class* i_this) {
|
||||
if (CPad_CHECK_TRIG_Z(3)) {
|
||||
if (++l_languageType > 4)
|
||||
l_languageType = 0;
|
||||
g_dComIfG_gameInfo.play.mGameLanguage = language[l_languageType];
|
||||
dComIfGp_setPalLanguage(language[l_languageType]);
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -298,7 +298,7 @@ static s32 dScnMenu_Create(scene_class* i_scn) {
|
||||
};
|
||||
menu_of_scene_class* i_this = (menu_of_scene_class *)i_scn;
|
||||
#if VERSION != VERSION_JPN
|
||||
l_languageType = g_dComIfG_gameInfo.play.mGameLanguage;
|
||||
l_languageType = dComIfGp_getPalLanguage();
|
||||
#endif
|
||||
return dComLbG_PhaseHandler(&i_this->mPhs, l_method, i_this);
|
||||
}
|
||||
|
||||
+1
-1
@@ -972,7 +972,7 @@ void dSv_player_config_c::init() {
|
||||
/* 8005BFA4-8005BFC8 .text checkVibration__19dSv_player_config_cFv */
|
||||
s32 dSv_player_config_c::checkVibration() {
|
||||
if (JUTGamePad::sRumbleSupported & 0x80000000)
|
||||
return g_dComIfG_gameInfo.play.field_0x4963;
|
||||
return dComIfGp_getNowVibration();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -63,13 +63,13 @@ void messageSet(u32 status) {
|
||||
/* Nonmatching - regswap on msg[0] for USA and PAL (JPN already matches) */
|
||||
#if VERSION == VERSION_PAL
|
||||
BMG_INF1* inf1;
|
||||
if (g_dComIfG_gameInfo.play.mGameLanguage == 1) {
|
||||
if (dComIfGp_getPalLanguage() == 1) {
|
||||
inf1 = (BMG_INF1*)&msg_data_ge[0x20];
|
||||
} else if (g_dComIfG_gameInfo.play.mGameLanguage == 2) {
|
||||
} else if (dComIfGp_getPalLanguage() == 2) {
|
||||
inf1 = (BMG_INF1*)&msg_data_fr[0x20];
|
||||
} else if (g_dComIfG_gameInfo.play.mGameLanguage == 3) {
|
||||
} else if (dComIfGp_getPalLanguage() == 3) {
|
||||
inf1 = (BMG_INF1*)&msg_data_sp[0x20];
|
||||
} else if (g_dComIfG_gameInfo.play.mGameLanguage == 4) {
|
||||
} else if (dComIfGp_getPalLanguage() == 4) {
|
||||
inf1 = (BMG_INF1*)&msg_data_it[0x20];
|
||||
} else {
|
||||
inf1 = (BMG_INF1*)&msg_data[0x20]; // English
|
||||
@@ -150,7 +150,7 @@ void messageSet(u32 status) {
|
||||
|
||||
ppane->draw(-12.0f, -24.0f, 665.0f, 530.0f, false, false, false);
|
||||
#if VERSION == VERSION_PAL
|
||||
if (g_dComIfG_gameInfo.play.mGameLanguage == 0) {
|
||||
if (dComIfGp_getPalLanguage() == 0) {
|
||||
spane->draw(x + 2.0f, y + 10.0f + 2.0f, 660.0f, HBIND_LEFT);
|
||||
tpane->draw(x, y + 10.0f, 660.0f, HBIND_LEFT);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user