mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-03 10:01:08 -04:00
general cleanup, d_menu_quit / d_a_obj_testcube mostly done, d_msg_scrn_explain debug (#3065)
* typedef for cPhs_Step * make sdk includes consistent * d_menu_quit / d_msg_scrn_explain debug * d_a_obj_testcube mostly done * d_debug_pad mostly done * jstudio tool library headers * some JStudioCameraEditor headers * d_jcam_editor mostly done * try fixing some shield regressions * d_bg_parts mostly done * fix merge errors * debug fix
This commit is contained in:
+170
-97
@@ -31,44 +31,64 @@ static dMsgScrnExplain_c::ProcFunc move_process[] = {
|
||||
&dMsgScrnExplain_c::move_select_proc, &dMsgScrnExplain_c::close_proc,
|
||||
};
|
||||
|
||||
dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_2, u8 param_3) {
|
||||
dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool i_isUseBackTex, u8 param_3) {
|
||||
mpStick = i_stick;
|
||||
field_0x54 = 0;
|
||||
mOpenMsgId = 0;
|
||||
field_0x5c = 0;
|
||||
field_0x64 = 0;
|
||||
mSelCursor = 0;
|
||||
field_0x62 = 0xff;
|
||||
field_0x63 = 0;
|
||||
mStatus = 0;
|
||||
mStatus = STATUS_WAIT_e;
|
||||
field_0x5a = 0;
|
||||
mForceSelect = 0;
|
||||
field_0x58 = 1;
|
||||
field_0x58 = true;
|
||||
field_0x66 = param_1;
|
||||
mKeyWaitTimer = 0;
|
||||
field_0x67 = param_3;
|
||||
|
||||
mpString_c = new dMsgString_c();
|
||||
JUT_ASSERT(79, mpString_c != NULL);
|
||||
|
||||
mpOutFont = new COutFont_c(0);
|
||||
JUT_ASSERT(83, mpOutFont != NULL);
|
||||
mpOutFont->createPane();
|
||||
|
||||
mpScreen = new J2DScreen();
|
||||
mpScreen->setPriority("zelda_message_window_new.blo", 0x20000, dComIfGp_getMsgArchive(1));
|
||||
JUT_ASSERT(88, mpScreen != NULL);
|
||||
|
||||
#if PLATFORM_GCN
|
||||
#define MSG_WINDOW_BLO_FILENAME "zelda_message_window_new.blo"
|
||||
#else
|
||||
#define MSG_WINDOW_BLO_FILENAME "zelda_message_window_new_revo.blo"
|
||||
#endif
|
||||
|
||||
bool fg = mpScreen->setPriority(MSG_WINDOW_BLO_FILENAME, 0x20000, dComIfGp_getMsgArchive(1));
|
||||
JUT_ASSERT(98, fg != false);
|
||||
dPaneClass_showNullPane(mpScreen);
|
||||
|
||||
mpTxScreen = new J2DScreen();
|
||||
JUT_ASSERT(102, mpTxScreen != NULL);
|
||||
field_0x48 = 608.0f;
|
||||
|
||||
if (param_1 == 1 || param_1 == 3) {
|
||||
mpTxScreen->setPriority("zelda_message_window_text_save_road.blo", 0x20000,
|
||||
dComIfGp_getMsgCommonArchive());
|
||||
#if PLATFORM_GCN
|
||||
#define MSG_WINDOW_TXT_SAVEROAD_BLO_FILENAME "zelda_message_window_text_save_road.blo"
|
||||
#else
|
||||
#define MSG_WINDOW_TXT_SAVEROAD_BLO_FILENAME "zelda_message_window_save_road_text_revo.blo"
|
||||
#endif
|
||||
fg = mpTxScreen->setPriority(MSG_WINDOW_TXT_SAVEROAD_BLO_FILENAME, 0x20000, dComIfGp_getMsgCommonArchive());
|
||||
JUT_ASSERT(119, fg != false);
|
||||
dPaneClass_showNullPane(mpTxScreen);
|
||||
|
||||
mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3line', 0, NULL);
|
||||
mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3_s', 0, NULL);
|
||||
JUT_ASSERT(124, mpTm_c[0] != NULL);
|
||||
|
||||
field_0x10[0] = NULL;
|
||||
field_0x10[1] = NULL;
|
||||
mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3_s', 0, NULL);
|
||||
JUT_ASSERT(127, mpTm_c[1] != NULL);
|
||||
|
||||
mpTmr_c[0] = NULL;
|
||||
mpTmr_c[1] = NULL;
|
||||
|
||||
mpTxScreen->search('n_3line')->show();
|
||||
mpTxScreen->search('n_3fline')->hide();
|
||||
@@ -81,8 +101,9 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_
|
||||
#endif
|
||||
field_0x4c = 0.0f;
|
||||
} else {
|
||||
mpTxScreen->setPriority("zelda_message_window_text.blo", 0x20000,
|
||||
dComIfGp_getMsgCommonArchive());
|
||||
fg = mpTxScreen->setPriority("zelda_message_window_text.blo", 0x20000,
|
||||
dComIfGp_getMsgCommonArchive());
|
||||
JUT_ASSERT(153, fg != false);
|
||||
dPaneClass_showNullPane(mpTxScreen);
|
||||
|
||||
mpScreen->search('n_all')->scale(g_MsgObject_HIO_c.mBoxTalkScaleX,
|
||||
@@ -94,8 +115,8 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_
|
||||
mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3flin', 0, NULL);
|
||||
mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3f_s', 0, NULL);
|
||||
|
||||
field_0x10[0] = new CPaneMgr(mpTxScreen, 'mg_3f', 0, NULL);
|
||||
field_0x10[1] = new CPaneMgr(mpTxScreen, 'mg_3f_s', 0, NULL);
|
||||
mpTmr_c[0] = new CPaneMgr(mpTxScreen, 'mg_3f', 0, NULL);
|
||||
mpTmr_c[1] = new CPaneMgr(mpTxScreen, 'mg_3f_s', 0, NULL);
|
||||
|
||||
mpTxScreen->search('n_3line')->hide();
|
||||
mpTxScreen->search('n_3fline')->show();
|
||||
@@ -104,8 +125,8 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_
|
||||
mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_3line', 0, NULL);
|
||||
mpTm_c[1] = new CPaneMgr(mpTxScreen, 't3_s', 0, NULL);
|
||||
|
||||
field_0x10[0] = NULL;
|
||||
field_0x10[1] = NULL;
|
||||
mpTmr_c[0] = NULL;
|
||||
mpTmr_c[1] = NULL;
|
||||
|
||||
mpTxScreen->search('n_3line')->show();
|
||||
mpTxScreen->search('n_3fline')->hide();
|
||||
@@ -115,10 +136,13 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_
|
||||
field_0x50 = -10.0f;
|
||||
|
||||
mpTm_c[0] = new CPaneMgr(mpTxScreen, 'mg_e4lin', 0, NULL);
|
||||
mpTm_c[1] = new CPaneMgr(mpTxScreen, 't4_s', 0, NULL);
|
||||
JUT_ASSERT(162, mpTm_c[0] != NULL);
|
||||
|
||||
field_0x10[0] = NULL;
|
||||
field_0x10[1] = NULL;
|
||||
mpTm_c[1] = new CPaneMgr(mpTxScreen, 't4_s', 0, NULL);
|
||||
JUT_ASSERT(165, mpTm_c[1] != NULL);
|
||||
|
||||
mpTmr_c[0] = NULL;
|
||||
mpTmr_c[1] = NULL;
|
||||
|
||||
mpTxScreen->search('n_3line')->hide();
|
||||
mpTxScreen->search('n_3fline')->hide();
|
||||
@@ -142,14 +166,14 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_
|
||||
#endif
|
||||
((J2DTextBox*)mpTm_c[i]->getPanePtr())->setLineSpace(lineSpace);
|
||||
|
||||
if (field_0x10[i] != NULL) {
|
||||
((J2DTextBox*)field_0x10[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
|
||||
if (mpTmr_c[i] != NULL) {
|
||||
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setFont(mDoExt_getMesgFont());
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
((J2DTextBox*)field_0x10[i]->getPanePtr())->setString(0x210, "");
|
||||
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x210, "");
|
||||
#else
|
||||
((J2DTextBox*)field_0x10[i]->getPanePtr())->setString(0x200, "");
|
||||
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setString(0x200, "");
|
||||
#endif
|
||||
((J2DTextBox*)field_0x10[i]->getPanePtr())->setLineSpace(lineSpace);
|
||||
((J2DTextBox*)mpTmr_c[i]->getPanePtr())->setLineSpace(lineSpace);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,15 +182,24 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_
|
||||
g_MsgObject_HIO_c.mTextPosY + mpScreen->search('mg_null')->getBounds().i.y);
|
||||
|
||||
mpArw_c = new CPaneMgr(mpScreen, 'set_ya_n', 0, NULL);
|
||||
mpMg_c[0] = new CPaneMgr(mpScreen, 'mg_null', 0, NULL);
|
||||
mpMg_c[1] = new CPaneMgr(mpTxScreen, 'mg_null', 0, NULL);
|
||||
mpRoot_c[0] = new CPaneMgr(mpScreen, 'ROOT', 2, NULL);
|
||||
mpRoot_c[1] = new CPaneMgr(mpTxScreen, 'ROOT', 2, NULL);
|
||||
JUT_ASSERT(241, mpArw_c != NULL);
|
||||
|
||||
if (param_2 == true) {
|
||||
ResTIMG* texResource =
|
||||
(ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', "tt_block8x8.bti");
|
||||
mpMg_c[0] = new CPaneMgr(mpScreen, 'mg_null', 0, NULL);
|
||||
JUT_ASSERT(244, mpMg_c[0] != NULL);
|
||||
|
||||
mpMg_c[1] = new CPaneMgr(mpTxScreen, 'mg_null', 0, NULL);
|
||||
JUT_ASSERT(247, mpMg_c[1] != NULL);
|
||||
|
||||
mpRoot_c[0] = new CPaneMgr(mpScreen, 'ROOT', 2, NULL);
|
||||
JUT_ASSERT(250, mpRoot_c[0] != NULL);
|
||||
|
||||
mpRoot_c[1] = new CPaneMgr(mpTxScreen, 'ROOT', 2, NULL);
|
||||
JUT_ASSERT(253, mpRoot_c[1] != NULL);
|
||||
|
||||
if (i_isUseBackTex == true) {
|
||||
ResTIMG* texResource = (ResTIMG*)dComIfGp_getMain2DArchive()->getResource('TIMG', "tt_block8x8.bti");
|
||||
mpBackTex = new J2DPicture(texResource);
|
||||
JUT_ASSERT(259, mpBackTex != NULL);
|
||||
mpBackTex->setBlackWhite(JUtility::TColor(0, 0, 0, 0),
|
||||
JUtility::TColor(0, 0, 0, 0xff));
|
||||
mpBackTex->setAlpha(0);
|
||||
@@ -175,17 +208,19 @@ dMsgScrnExplain_c::dMsgScrnExplain_c(STControl* i_stick, u8 param_1, bool param_
|
||||
}
|
||||
|
||||
mpArrow_c = new dMsgScrnArrow_c();
|
||||
JUT_ASSERT(269, mpArrow_c != NULL);
|
||||
|
||||
if (i_stick != NULL) {
|
||||
mpSelect_c = new dMsgScrn3Select_c();
|
||||
JUT_ASSERT(274, mpSelect_c != NULL);
|
||||
} else {
|
||||
mpSelect_c = NULL;
|
||||
}
|
||||
|
||||
Vec vtxCenter = mpArw_c->getGlobalVtxCenter(mpArw_c->mPane, false, 0);
|
||||
Vec vtxCenter = mpArw_c->getGlobalVtxCenter(false, 0);
|
||||
mpArrow_c->setPos(vtxCenter.x, vtxCenter.y);
|
||||
|
||||
Vec vtxCenter2 = mpMg_c[0]->getGlobalVtxCenter(mpMg_c[0]->mPane, false, 0);
|
||||
Vec vtxCenter2 = mpMg_c[0]->getGlobalVtxCenter(false, 0);
|
||||
mpMg_c[1]->translate(vtxCenter2.x + field_0x50, vtxCenter2.y);
|
||||
}
|
||||
|
||||
@@ -209,9 +244,9 @@ dMsgScrnExplain_c::~dMsgScrnExplain_c() {
|
||||
delete mpTm_c[i];
|
||||
mpTm_c[i] = NULL;
|
||||
|
||||
if (field_0x10[i] != NULL) {
|
||||
delete field_0x10[i];
|
||||
field_0x10[i] = NULL;
|
||||
if (mpTmr_c[i] != NULL) {
|
||||
delete mpTmr_c[i];
|
||||
mpTmr_c[i] = NULL;
|
||||
}
|
||||
|
||||
delete mpMg_c[i];
|
||||
@@ -265,7 +300,7 @@ void dMsgScrnExplain_c::move() {
|
||||
}
|
||||
|
||||
void dMsgScrnExplain_c::draw(J2DOrthoGraph* i_graf) {
|
||||
if (mStatus == 0 || mStatus == 1) {
|
||||
if (mStatus == STATUS_WAIT_e || mStatus == STATUS_OPEN_REQ_e) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -282,9 +317,9 @@ void dMsgScrnExplain_c::draw(J2DOrthoGraph* i_graf) {
|
||||
|
||||
mpTxScreen->draw(0.0f, 0.0f, (J2DGrafContext*)i_graf);
|
||||
#if VERSION == VERSION_GCN_JPN
|
||||
mpString_c->getString(field_0x54, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 12);
|
||||
mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 12);
|
||||
#else
|
||||
mpString_c->getString(field_0x54, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 8);
|
||||
mpString_c->getString(mOpenMsgId, (J2DTextBox*)mpTm_c[0]->getPanePtr(), NULL, NULL, NULL, 8);
|
||||
#endif
|
||||
mpString_c->drawOutFont((J2DTextBox*)mpTm_c[0]->getPanePtr(), -1.0f);
|
||||
|
||||
@@ -313,26 +348,26 @@ void dMsgScrnExplain_c::wait_proc() {}
|
||||
void dMsgScrnExplain_c::open_request_init() {}
|
||||
|
||||
void dMsgScrnExplain_c::open_request_proc() {
|
||||
J2DTextBox* uVar1;
|
||||
J2DTextBox* uVar6 = NULL;
|
||||
J2DTextBox* tbox = NULL;
|
||||
J2DTextBox* rubyTbox = NULL;
|
||||
|
||||
uVar1 = (J2DTextBox*)mpTm_c[0]->getPanePtr();
|
||||
if (field_0x10[0] != NULL) {
|
||||
uVar6 = (J2DTextBox*)field_0x10[0]->getPanePtr();
|
||||
tbox = (J2DTextBox*)mpTm_c[0]->getPanePtr();
|
||||
if (mpTmr_c[0] != NULL) {
|
||||
rubyTbox = (J2DTextBox*)mpTmr_c[0]->getPanePtr();
|
||||
}
|
||||
|
||||
char acStack_220[STR_BUF_LEN];
|
||||
char acStack_420[STR_BUF_LEN];
|
||||
char acStack_620[STR_BUF_LEN];
|
||||
char text[STR_BUF_LEN];
|
||||
char ruby[STR_BUF_LEN];
|
||||
char textShadow[STR_BUF_LEN];
|
||||
|
||||
if (dMsgObject_getString(field_0x54, uVar1, uVar6, mDoExt_getMesgFont(), mpOutFont, acStack_220,
|
||||
acStack_420, acStack_620, &field_0x5c) != 0)
|
||||
{
|
||||
strcpy(((J2DTextBox*)mpTm_c[0]->getPanePtr())->getStringPtr(), acStack_220);
|
||||
strcpy(((J2DTextBox*)mpTm_c[1]->getPanePtr())->getStringPtr(), acStack_620);
|
||||
bool rt = dMsgObject_getString(mOpenMsgId, tbox, rubyTbox, mDoExt_getMesgFont(), mpOutFont, text,
|
||||
ruby, textShadow, &field_0x5c);
|
||||
if (rt) {
|
||||
strcpy(((J2DTextBox*)mpTm_c[0]->getPanePtr())->getStringPtr(), text);
|
||||
strcpy(((J2DTextBox*)mpTm_c[1]->getPanePtr())->getStringPtr(), textShadow);
|
||||
for (int i = 0; i < 2; i++) {
|
||||
if (field_0x10[i] != NULL) {
|
||||
strcpy(((J2DTextBox*)field_0x10[i]->getPanePtr())->getStringPtr(), acStack_420);
|
||||
if (mpTmr_c[i] != NULL) {
|
||||
strcpy(((J2DTextBox*)mpTmr_c[i]->getPanePtr())->getStringPtr(), ruby);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -340,7 +375,7 @@ void dMsgScrnExplain_c::open_request_proc() {
|
||||
Z2GetSpeechMgr2()->setTextCount(0);
|
||||
}
|
||||
|
||||
mStatus = 2;
|
||||
mStatus = STATUS_OPEN_e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -350,7 +385,7 @@ void dMsgScrnExplain_c::open_init() {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
mpRoot_c[i]->setAlphaRate(0.0f);
|
||||
}
|
||||
mDoAud_seStart(Z2SE_SY_EXP_WIN_OPEN, 0, 0, 0);
|
||||
mDoAud_seStart(Z2SE_SY_EXP_WIN_OPEN, NULL, 0, 0);
|
||||
}
|
||||
|
||||
void dMsgScrnExplain_c::open_proc() {
|
||||
@@ -358,9 +393,9 @@ void dMsgScrnExplain_c::open_proc() {
|
||||
if (field_0x5a >= 5) {
|
||||
field_0x5a = 5;
|
||||
if (field_0x64 == 1 || field_0x64 == 2) {
|
||||
mStatus = 4;
|
||||
mStatus = STATUS_MOVE_SELECT_e;
|
||||
} else {
|
||||
mStatus = 3;
|
||||
mStatus = STATUS_MOVE_e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -385,14 +420,14 @@ void dMsgScrnExplain_c::move_proc() {
|
||||
}
|
||||
|
||||
if (mDoCPd_c::getTrigA(PAD_1) ||
|
||||
((field_0x58 != 0x0 &&
|
||||
((field_0x58 &&
|
||||
(mDoCPd_c::getTrigB(PAD_1) || mDoCPd_c::getTrigZ(PAD_1) || mDoCPd_c::getTrigX(PAD_1) ||
|
||||
mDoCPd_c::getTrigY(PAD_1) || mDoCPd_c::getTrigStart(PAD_1) ||
|
||||
mDoCPd_c::getTrigR(PAD_1) || mDoCPd_c::getTrigL(PAD_1) || mForceSelect))))
|
||||
{
|
||||
mStatus = 5;
|
||||
mStatus = STATUS_CLOSE_e;
|
||||
dMeter2Info_set2DVibrationM();
|
||||
mDoAud_seStart(Z2SE_SY_EXP_WIN_CLOSE, 0, 0, 0);
|
||||
mDoAud_seStart(Z2SE_SY_EXP_WIN_CLOSE, NULL, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -402,6 +437,10 @@ void dMsgScrnExplain_c::move_select_init() {
|
||||
char string_buf_yes[20];
|
||||
char string_buf_no[20];
|
||||
|
||||
f32 var_f31 = 0.0f;
|
||||
f32 yes_str_len = 0.0f;
|
||||
f32 no_str_len = 0.0f;
|
||||
|
||||
msg_buf_yes[0] = 0;
|
||||
msg_buf_no[0] = 0;
|
||||
string_buf_yes[0] = 0;
|
||||
@@ -415,36 +454,38 @@ void dMsgScrnExplain_c::move_select_init() {
|
||||
dMeter2Info_getString(0x520, msg_buf_no, NULL); // "NO"
|
||||
}
|
||||
|
||||
f32 yes_str_len = dMeter2Info_getStringLength(mDoExt_getMesgFont(), mpSelect_c->getFontSize(),
|
||||
mpSelect_c->getCharSpace(), msg_buf_yes);
|
||||
f32 no_str_len = dMeter2Info_getStringLength(mDoExt_getMesgFont(), mpSelect_c->getFontSize(),
|
||||
mpSelect_c->getCharSpace(), msg_buf_no);
|
||||
f32 dVar13;
|
||||
yes_str_len = dMeter2Info_getStringLength(mDoExt_getMesgFont(), mpSelect_c->getFontSize(),
|
||||
mpSelect_c->getCharSpace(), msg_buf_yes);
|
||||
no_str_len = dMeter2Info_getStringLength(mDoExt_getMesgFont(), mpSelect_c->getFontSize(),
|
||||
mpSelect_c->getCharSpace(), msg_buf_no);
|
||||
|
||||
if (yes_str_len < no_str_len) {
|
||||
dVar13 = no_str_len;
|
||||
var_f31 = no_str_len;
|
||||
} else {
|
||||
dVar13 = yes_str_len;
|
||||
var_f31 = yes_str_len;
|
||||
}
|
||||
|
||||
f32 tbox_width = mpSelect_c->getTextBoxWidth();
|
||||
if (dVar13 < tbox_width) {
|
||||
dVar13 = mpSelect_c->getTextBoxWidth();
|
||||
if (var_f31 < mpSelect_c->getTextBoxWidth()) {
|
||||
var_f31 = mpSelect_c->getTextBoxWidth();
|
||||
}
|
||||
|
||||
f32 var_f28 = 0.5f * (var_f31 - yes_str_len);
|
||||
f32 var_f27 = 0.5f * (var_f31 - no_str_len);
|
||||
|
||||
snprintf(string_buf_yes, 20,
|
||||
"\x1B"
|
||||
"CR[%d]",
|
||||
(int)(0.5f * (dVar13 - yes_str_len)));
|
||||
(int)var_f28);
|
||||
strcat(string_buf_yes, msg_buf_yes);
|
||||
snprintf(string_buf_no, 20,
|
||||
"\x1B"
|
||||
"CR[%d]",
|
||||
(int)(0.5f * (dVar13 - no_str_len)));
|
||||
(int)var_f27);
|
||||
strcat(string_buf_no, msg_buf_no);
|
||||
|
||||
mpSelect_c->setString("", string_buf_yes, string_buf_no);
|
||||
mpSelect_c->setRubyString("", "", "");
|
||||
mpSelect_c->selAnimeInit(2, mSelCursor + 1, 0, dVar13, 0);
|
||||
mpSelect_c->selAnimeInit(2, mSelCursor + 1, 0, var_f31, 0);
|
||||
mpArrow_c->arwAnimeInit();
|
||||
}
|
||||
|
||||
@@ -468,7 +509,7 @@ void dMsgScrnExplain_c::move_select_proc() {
|
||||
mDoAud_seStart(Z2SE_SY_TALK_CURSOR_OK, NULL, 0, 0);
|
||||
}
|
||||
|
||||
mStatus = 5;
|
||||
mStatus = STATUS_CLOSE_e;
|
||||
mDoAud_seStart(Z2SE_SY_EXP_WIN_CLOSE, NULL, 0, 0);
|
||||
} else if (field_0x58 && (checkTriggerB() || mForceSelect)) {
|
||||
if (field_0x64 == 2) {
|
||||
@@ -482,7 +523,7 @@ void dMsgScrnExplain_c::move_select_proc() {
|
||||
}
|
||||
}
|
||||
|
||||
mStatus = 5;
|
||||
mStatus = STATUS_CLOSE_e;
|
||||
mDoAud_seStart(Z2SE_SY_EXP_WIN_CLOSE, NULL, 0, 0);
|
||||
} else if (mpSelect_c->isSelect() && mpStick->checkUpTrigger()) {
|
||||
if (mSelCursor == 1) {
|
||||
@@ -490,14 +531,28 @@ void dMsgScrnExplain_c::move_select_proc() {
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
}
|
||||
} else if (mpSelect_c->isSelect() && mpStick->checkDownTrigger() && mSelCursor == 0) {
|
||||
mSelCursor = 1;
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
} else if (mpSelect_c->isSelect() && mpStick->checkDownTrigger()) {
|
||||
if (mSelCursor == 0) {
|
||||
mSelCursor = 1;
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 0, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
}
|
||||
}
|
||||
#if !PLATFORM_GCN
|
||||
else if (mpSelect_c->getDPDPoint() != 0xFF) {
|
||||
if (mSelCursor != mpSelect_c->getDPDPoint() && field_0x62 != mpSelect_c->getDPDPoint()) {
|
||||
mSelCursor = mpSelect_c->getDPDPoint();
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SY_MENU_CURSOR_COMMON, NULL, 1, 0, 1.0f, 1.0f, -1.0f,
|
||||
-1.0f, 0);
|
||||
dMeter2Info_set2DVibration();
|
||||
}
|
||||
}
|
||||
|
||||
field_0x62 = mpSelect_c->getDPDPoint();
|
||||
#endif
|
||||
}
|
||||
|
||||
if (mStatus == 4) {
|
||||
if (mStatus == STATUS_MOVE_SELECT_e) {
|
||||
mpSelect_c->selAnimeMove(2, mSelCursor + 1, false);
|
||||
} else {
|
||||
mpSelect_c->selAnimeEnd();
|
||||
@@ -509,7 +564,7 @@ void dMsgScrnExplain_c::close_init() {
|
||||
}
|
||||
|
||||
void dMsgScrnExplain_c::close_proc() {
|
||||
bool iVar1;
|
||||
bool iVar1 = false;
|
||||
if (mpSelect_c != NULL) {
|
||||
iVar1 = mpSelect_c->selAnimeEnd();
|
||||
} else {
|
||||
@@ -520,7 +575,7 @@ void dMsgScrnExplain_c::close_proc() {
|
||||
if (field_0x5a <= 0) {
|
||||
field_0x5a = 0;
|
||||
if (iVar1) {
|
||||
mStatus = 0;
|
||||
mStatus = STATUS_WAIT_e;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -534,21 +589,21 @@ void dMsgScrnExplain_c::close_proc() {
|
||||
}
|
||||
}
|
||||
|
||||
bool dMsgScrnExplain_c::openExplain(u32 param_0, u8 param_1, u8 param_2, u8 param_3, bool param_4) {
|
||||
bool dMsgScrnExplain_c::openExplain(u32 i_msgId, u8 param_1, u8 i_cursorSel, u8 param_3, bool param_4) {
|
||||
bool rv = false;
|
||||
|
||||
if (g_MsgObject_HIO_c.mSaveSeqMsgDebug) {
|
||||
param_0 = g_MsgObject_HIO_c.mSaveSeqMsgIndex;
|
||||
i_msgId = g_MsgObject_HIO_c.mSaveSeqMsgIndex;
|
||||
}
|
||||
|
||||
if (mStatus == 0) {
|
||||
field_0x54 = param_0;
|
||||
if (mStatus == STATUS_WAIT_e) {
|
||||
mOpenMsgId = i_msgId;
|
||||
field_0x64 = param_1;
|
||||
mSelCursor = param_2;
|
||||
mSelCursor = i_cursorSel;
|
||||
field_0x63 = param_3;
|
||||
mForceSelect = 0;
|
||||
field_0x58 = param_4;
|
||||
mStatus = 1;
|
||||
mStatus = STATUS_OPEN_REQ_e;
|
||||
open_request_init();
|
||||
rv = true;
|
||||
}
|
||||
@@ -557,21 +612,39 @@ bool dMsgScrnExplain_c::openExplain(u32 param_0, u8 param_1, u8 param_2, u8 para
|
||||
}
|
||||
|
||||
f32 dMsgScrnExplain_c::getAlphaRatio() {
|
||||
f32 ratio;
|
||||
f32 var_f30;
|
||||
f32 var_f29;
|
||||
switch (mStatus) {
|
||||
case 2:
|
||||
case 5:
|
||||
return 1.0f - (field_0x5a / 5.0f);
|
||||
case 0:
|
||||
return 1.0f;
|
||||
case STATUS_OPEN_e:
|
||||
case STATUS_CLOSE_e:
|
||||
var_f29 = field_0x5a;
|
||||
var_f30 = 5.0f;
|
||||
ratio = 1.0f - (var_f29 / var_f30);
|
||||
break;
|
||||
case STATUS_WAIT_e:
|
||||
ratio = 1.0f;
|
||||
break;
|
||||
default:
|
||||
return 0.0f;
|
||||
ratio = 0.0f;
|
||||
break;
|
||||
}
|
||||
|
||||
return ratio;
|
||||
}
|
||||
|
||||
bool dMsgScrnExplain_c::checkTriggerA() {
|
||||
return mDoCPd_c::getTrigA(PAD_1);
|
||||
if (mDoCPd_c::getTrigA(PAD_1)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool dMsgScrnExplain_c::checkTriggerB() {
|
||||
return mDoCPd_c::getTrigB(PAD_1);
|
||||
if (mDoCPd_c::getTrigB(PAD_1)) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user