diff options
Diffstat (limited to 'src/d/msg/d_msg_scrn_3select.cpp')
| -rw-r--r-- | src/d/msg/d_msg_scrn_3select.cpp | 1529 |
1 files changed, 862 insertions, 667 deletions
diff --git a/src/d/msg/d_msg_scrn_3select.cpp b/src/d/msg/d_msg_scrn_3select.cpp index 407a9cf919..6c74083982 100644 --- a/src/d/msg/d_msg_scrn_3select.cpp +++ b/src/d/msg/d_msg_scrn_3select.cpp @@ -1,790 +1,985 @@ -// -// Generated By: dol2asm -// Translation Unit: msg/scrn/d_msg_scrn_3select -// +/** + * d_msg_scrn_3select.cpp + * 3-way Select Message Screen + */ #include "d/msg/d_msg_scrn_3select.h" -#include "dol2asm.h" - -// -// Types: -// - -struct JKRArchive {}; - -struct dSelect_cursor_c { - /* 80194220 */ dSelect_cursor_c(u8, f32, JKRArchive*); - /* 801950F4 */ void setPos(f32, f32, J2DPane*, bool); - /* 801951B0 */ void setParam(f32, f32, f32, f32, f32); - /* 801952A0 */ void setAlphaRate(f32); -}; - -struct JKRFileLoader { - /* 802D4270 */ void getGlbResource(char const*, JKRFileLoader*); -}; - -struct JKRExpHeap {}; - -struct J2DTextBox { - /* 80300658 */ void getStringPtr() const; - /* 8030074C */ void setString(s16, char const*, ...); -}; - -struct J2DGrafContext {}; - -struct J2DScreen { - /* 802F8498 */ J2DScreen(); - /* 802F8648 */ void setPriority(char const*, u32, JKRArchive*); - /* 802F8ED4 */ void draw(f32, f32, J2DGrafContext const*); - /* 802F9690 */ void animation(); -}; - -struct J2DAnmLoaderDataBase { - /* 80308A6C */ void load(void const*); -}; +#include "JSystem/J2DGraph/J2DAnmLoader.h" +#include "JSystem/J2DGraph/J2DGrafContext.h" +#include "JSystem/J2DGraph/J2DScreen.h" +#include "JSystem/J2DGraph/J2DTextBox.h" +#include "cstring.h" +#include "d/com/d_com_inf_game.h" +#include "d/d_select_cursor.h" +#include "d/msg/d_msg_object.h" +#include "d/pane/d_pane_class.h" -struct J2DAnmColorKey { - /* 80239BE0 */ ~J2DAnmColorKey(); -}; - -struct CPaneMgrAlpha { - /* 802555C8 */ void show(); - /* 80255608 */ void hide(); -}; - -struct CPaneMgr { - /* 80253984 */ CPaneMgr(J2DScreen*, u64, u8, JKRExpHeap*); - /* 802542E8 */ void getGlobalPosX(); - /* 80254364 */ void getGlobalPosY(); - /* 802545B0 */ void paneTrans(f32, f32); - /* 80254638 */ void paneScale(f32, f32); - /* 80254EBC */ void getGlobalVtxCenter(J2DPane*, bool, s16); -}; - -// -// Forward References: -// - -extern "C" void __ct__17dMsgScrn3Select_cFv(); -extern "C" void __dt__17dMsgScrn3Select_cFv(); -extern "C" void __dt__14J2DAnmColorKeyFv(); -extern "C" void isSelect__17dMsgScrn3Select_cFv(); -extern "C" void setString__17dMsgScrn3Select_cFPcPcPc(); -extern "C" void setRubyString__17dMsgScrn3Select_cFPcPcPc(); -extern "C" void translate__17dMsgScrn3Select_cFff(); -extern "C" void draw__17dMsgScrn3Select_cFff(); -extern "C" void selAnimeInit__17dMsgScrn3Select_cFUcUcUcfUc(); -extern "C" void selAnimeMove__17dMsgScrn3Select_cFUcUcb(); -extern "C" void selAnimeEnd__17dMsgScrn3Select_cFv(); -extern "C" void getTextBoxWidth__17dMsgScrn3Select_cFv(); -extern "C" void getFontSize__17dMsgScrn3Select_cFv(); -extern "C" void getRubyFontSize__17dMsgScrn3Select_cFv(); -extern "C" void getCharSpace__17dMsgScrn3Select_cFv(); -extern "C" void getRubyCharSpace__17dMsgScrn3Select_cFv(); -extern "C" void getTextBoxGlobalPosX__17dMsgScrn3Select_cFi(); -extern "C" void getTextBoxGlobalPosY__17dMsgScrn3Select_cFi(); -extern "C" void open1Proc__17dMsgScrn3Select_cFv(); -extern "C" void open2Proc__17dMsgScrn3Select_cFv(); -extern "C" void waitProc__17dMsgScrn3Select_cFv(); -extern "C" void selectProc__17dMsgScrn3Select_cFv(); -extern "C" void changeProc__17dMsgScrn3Select_cFv(); -extern "C" void closeProc__17dMsgScrn3Select_cFv(); -extern "C" void selectScale__17dMsgScrn3Select_cFv(); -extern "C" void selectTrans__17dMsgScrn3Select_cFv(); -extern "C" void selectAnimeTransform__17dMsgScrn3Select_cFi(); -extern "C" void __sinit_d_msg_scrn_3select_cpp(); -extern "C" extern char const* const msg_scrn_d_msg_scrn_3select__stringBase0; - -// -// External References: -// - -extern "C" void mDoExt_getMesgFont__Fv(); -extern "C" void __ct__16dSelect_cursor_cFUcfP10JKRArchive(); -extern "C" void setPos__16dSelect_cursor_cFffP7J2DPaneb(); -extern "C" void setParam__16dSelect_cursor_cFfffff(); -extern "C" void setAlphaRate__16dSelect_cursor_cFf(); -extern "C" void __ct__8CPaneMgrFP9J2DScreenUxUcP10JKRExpHeap(); -extern "C" void getGlobalPosX__8CPaneMgrFv(); -extern "C" void getGlobalPosY__8CPaneMgrFv(); -extern "C" void paneTrans__8CPaneMgrFff(); -extern "C" void paneScale__8CPaneMgrFff(); -extern "C" void getGlobalVtxCenter__8CPaneMgrFP7J2DPanebs(); -extern "C" void dPaneClass_showNullPane__FP9J2DScreen(); -extern "C" void show__13CPaneMgrAlphaFv(); -extern "C" void hide__13CPaneMgrAlphaFv(); -extern "C" void* __nw__FUl(); extern "C" void __dl__FPv(); -extern "C" void getGlbResource__13JKRFileLoaderFPCcP13JKRFileLoader(); -extern "C" void getBounds__7J2DPaneFv(); -extern "C" void animationTransform__7J2DPaneFv(); -extern "C" void __ct__9J2DScreenFv(); -extern "C" void setPriority__9J2DScreenFPCcUlP10JKRArchive(); -extern "C" void draw__9J2DScreenFffPC14J2DGrafContext(); -extern "C" void animation__9J2DScreenFv(); -extern "C" void getStringPtr__10J2DTextBoxCFv(); -extern "C" void setString__10J2DTextBoxFsPCce(); -extern "C" void load__20J2DAnmLoaderDataBaseFPCv(); -extern "C" void __ptmf_scall(); -extern "C" void _savegpr_20(); -extern "C" void _savegpr_23(); -extern "C" void _savegpr_26(); -extern "C" void _savegpr_27(); -extern "C" void _savegpr_28(); -extern "C" void _savegpr_29(); -extern "C" void _restgpr_20(); -extern "C" void _restgpr_23(); -extern "C" void _restgpr_26(); -extern "C" void _restgpr_27(); -extern "C" void _restgpr_28(); -extern "C" void _restgpr_29(); extern "C" extern void* __vt__10J2DAnmBase[4]; extern "C" extern void* __vt__10JUTNameTab[3]; extern "C" extern void* __vt__14J2DAnmColorKey[5]; extern "C" extern void* __vt__11J2DAnmColor[5]; -extern "C" extern u8 g_dComIfG_gameInfo[122384]; -extern "C" extern u8 g_MsgObject_HIO_c[1040]; - -// -// Declarations: -// - -/* ############################################################################################## */ -/* 80399708-80399828 025D68 0120+00 1/1 0/0 0/0 .rodata tag_name$3763 */ -SECTION_RODATA static u8 const tag_name[288] = { - 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x5F, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x5F, 0x67, - 0x00, 0x00, 0x00, 0x00, 0x61, 0x5F, 0x67, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x61, 0x5F, 0x6D, - 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x30, 0x30, 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x30, 0x31, - 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x30, 0x32, 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x30, 0x33, - 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x30, 0x34, 0x73, 0x65, 0x6C, 0x5F, 0x70, 0x6F, 0x30, 0x30, - 0x00, 0x61, 0x5F, 0x6B, 0x61, 0x68, 0x65, 0x6E, 0x61, 0x5F, 0x63, 0x75, 0x72, 0x73, 0x6F, 0x72, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x5F, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x5F, 0x67, - 0x00, 0x00, 0x00, 0x00, 0x62, 0x5F, 0x67, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x5F, 0x6D, - 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x30, 0x37, 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x30, 0x36, - 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x30, 0x35, 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x30, 0x38, - 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x30, 0x39, 0x73, 0x65, 0x6C, 0x5F, 0x70, 0x6F, 0x30, 0x31, - 0x00, 0x62, 0x5F, 0x6B, 0x61, 0x68, 0x65, 0x6E, 0x62, 0x5F, 0x63, 0x75, 0x72, 0x73, 0x6F, 0x72, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5F, 0x6E, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5F, 0x67, - 0x00, 0x00, 0x00, 0x00, 0x63, 0x5F, 0x67, 0x72, 0x00, 0x00, 0x00, 0x00, 0x00, 0x63, 0x5F, 0x6D, - 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x31, 0x32, 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x31, 0x31, - 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x31, 0x30, 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x31, 0x33, - 0x77, 0x5F, 0x79, 0x65, 0x73, 0x5F, 0x31, 0x34, 0x73, 0x65, 0x6C, 0x5F, 0x70, 0x6F, 0x30, 0x32, - 0x00, 0x63, 0x5F, 0x6B, 0x61, 0x68, 0x65, 0x6E, 0x63, 0x5F, 0x63, 0x75, 0x72, 0x73, 0x6F, 0x72, -}; -COMPILER_STRIP_GATE(0x80399708, &tag_name); - -/* 80399840-80399840 025EA0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ -#pragma push -#pragma force_active on -SECTION_DEAD static char const* const stringBase_80399840 = "zelda_window_3menu.blo"; -SECTION_DEAD static char const* const stringBase_80399857 = "zelda_window_3menu.bck"; -SECTION_DEAD static char const* const stringBase_8039986E = "zelda_window_3menu.bpk"; -SECTION_DEAD static char const* const stringBase_80399885 = "zelda_window_3menu.btk"; -SECTION_DEAD static char const* const stringBase_8039989C = ""; -/* @stringBase0 padding */ -SECTION_DEAD static char const* const pad_8039989D = "\0\0"; -#pragma pop +extern "C" extern dMsgObject_HIO_c g_MsgObject_HIO_c; /* 803C0C00-803C0C0C 01DD20 000C+00 1/1 0/0 0/0 .data cNullVec__6Z2Calc */ -SECTION_DATA static u8 cNullVec__6Z2Calc[12] = { +static u8 cNullVec__6Z2Calc[12] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, }; -/* 803C0C0C-803C0C18 -00001 000C+00 0/1 0/0 0/0 .data @3754 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3754[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)open1Proc__17dMsgScrn3Select_cFv, +/* 803C0C54-803C0CA0 01DD74 0048+04 2/3 0/0 0/0 .data process */ +typedef void (dMsgScrn3Select_c::*processFn)(); +processFn process[] = { + &dMsgScrn3Select_c::open1Proc, &dMsgScrn3Select_c::open2Proc, &dMsgScrn3Select_c::waitProc, + &dMsgScrn3Select_c::selectProc, &dMsgScrn3Select_c::changeProc, &dMsgScrn3Select_c::closeProc, }; -#pragma pop -/* 803C0C18-803C0C24 -00001 000C+00 0/1 0/0 0/0 .data @3755 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3755[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)open2Proc__17dMsgScrn3Select_cFv, -}; -#pragma pop +/* 802390B4-802398CC 2339F4 0818+00 0/0 4/4 0/0 .text __ct__17dMsgScrn3Select_cFv */ +dMsgScrn3Select_c::dMsgScrn3Select_c() { + static u64 const tag_name[3][12] = { + // A + 'a_n', 'a_g', 'a_gr', 'a_m', 'w_yes_00', 'w_yes_01', 'w_yes_02', 'w_yes_03', 'w_yes_04', + 'sel_po00', 'a_kahen', 'a_cursor', + + // B + 'b_n', 'b_g', 'b_gr', 'b_m', 'w_yes_07', 'w_yes_06', 'w_yes_05', 'w_yes_08', 'w_yes_09', + 'sel_po01', 'b_kahen', 'b_cursor', + + // C + 'c_n', 'c_g', 'c_gr', 'c_m', 'w_yes_12', 'w_yes_11', 'w_yes_10', 'w_yes_13', 'w_yes_14', + 'sel_po02', 'c_kahen', 'c_cursor' + }; + + // tag_n and following data are unused so unsure how this data is properly setup + static u64 tag_n[] = {'a_t', 'b_t', 'c_t'}; + static u32 unkdata[9] = {0}; + + mpScreen = new J2DScreen(); + JUT_ASSERT(mpScreen != 0); + + bool fg = mpScreen->setPriority("zelda_window_3menu.blo", 0x20000, dComIfGp_getMsgArchive(0)); + JUT_ASSERT(fg != false); + dPaneClass_showNullPane(mpScreen); + + OSInitFastCast(); + + mpAnmBck = (J2DAnmTransform*)J2DAnmLoaderDataBase::load( + JKRGetNameResource("zelda_window_3menu.bck", dComIfGp_getMsgArchive(0))); + mBckFrame = 0.0f; + mBckFrame = 190.0f; + mOffsetX = 0.0f; + + mpAnmBpk = (J2DAnmColor*)J2DAnmLoaderDataBase::load( + JKRGetNameResource("zelda_window_3menu.bpk", dComIfGp_getMsgArchive(0))); + mpAnmBpk->searchUpdateMaterialID(mpScreen); + mBpkFrame = 0.0f; + + mpAnmBtk = (J2DAnmTextureSRTKey*)J2DAnmLoaderDataBase::load( + JKRGetNameResource("zelda_window_3menu.btk", dComIfGp_getMsgArchive(0))); + mpAnmBtk->searchUpdateMaterialID(mpScreen); + mBtkFrame = 0.0f; + + mpSelectCursor = new dSelect_cursor_c(0, 1.0f, NULL); + JUT_ASSERT(mpSelectCursor != 0); + mpSelectCursor->setAlphaRate(0.0f); + + mpParent = new CPaneMgr(mpScreen, 'abc_n', 0, NULL); + JUT_ASSERT(mpParent != 0); + + for (int i = 0; i < 3; i++) { + mCursorPos[i].x = 0.0f; + mCursorPos[i].y = 0.0f; + mCursorPos[i].z = 0.0f; + + mpSel_c[i] = new CPaneMgr(mpScreen, tag_name[i][0], 0, NULL); + JUT_ASSERT(mpSel_c[i] != 0); + mpSel_c[i]->hide(); + + mpSelCld_c[i] = new CPaneMgr(mpScreen, tag_name[i][1], 0, NULL); + JUT_ASSERT(mpSelCld_c[i] != 0); + mpSelCld_c[i]->getPanePtr()->setAnimation(mpAnmBtk); + + mpSelCldr_c[i] = new CPaneMgr(mpScreen, tag_name[i][2], 0, NULL); + JUT_ASSERT(mpSelCldr_c[i] != 0); + mpSelCldr_c[i]->getPanePtr()->setAnimation(mpAnmBtk); + + mpSelCldm_c[i] = new CPaneMgr(mpScreen, tag_name[i][3], 0, NULL); + JUT_ASSERT(mpSelCldm_c[i] != 0); + mpSelCldm_c[i]->getPanePtr()->setAnimation(mpAnmBpk); + + for (int j = 0; j < 5; j++) { + mpSelCldw_c[j][i] = new CPaneMgr(mpScreen, tag_name[i][4 + j], 0, NULL); + JUT_ASSERT(mpSelCldw_c[j][i] != 0); + } + + mpSelPo_c[i] = new CPaneMgr(mpScreen, tag_name[i][9], 0, NULL); + JUT_ASSERT(mpSelPo_c[i] != 0); + mpSelPo_c[i]->hide(); + + mpKahen_c[i] = new CPaneMgr(mpScreen, tag_name[i][10], 0, NULL); + JUT_ASSERT(mpKahen_c[i] != 0); + + mpCursor_c[i] = new CPaneMgr(mpScreen, tag_name[i][11], 0, NULL); + JUT_ASSERT(mpCursor_c[i] != 0); + mCursorPos[i] = mpCursor_c[i]->getGlobalVtxCenter(true, 0); + } + + mpTmSel_c[0] = new CPaneMgr(mpScreen, 'a_t_e', 0, NULL); + JUT_ASSERT(mpTmSel_c[0] != 0); + + mpTmSel_c[1] = new CPaneMgr(mpScreen, 'b_t_e', 0, NULL); + JUT_ASSERT(mpTmSel_c[1] != 0); + + mpTmSel_c[2] = new CPaneMgr(mpScreen, 'c_t_e', 0, NULL); + JUT_ASSERT(mpTmSel_c[2] != 0); + + for (int i = 0; i < 3; i++) { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setString(64, ""); + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setFont(mDoExt_getMesgFont()); + mpTmrSel_c[i] = NULL; + } + + mpScreen->search('a_t_e')->show(); + mpScreen->search('b_t_e')->show(); + mpScreen->search('c_t_e')->show(); + mpScreen->search('a_tf')->hide(); + mpScreen->search('b_tf')->hide(); + mpScreen->search('c_tf')->hide(); + mpScreen->search('a_tf_f')->hide(); + mpScreen->search('b_tf_f')->hide(); + mpScreen->search('c_tf_f')->hide(); + mpScreen->search('a_t')->hide(); + mpScreen->search('b_t')->hide(); + mpScreen->search('c_t')->hide(); + + mSelMsgCol = static_cast<J2DTextBox*>(mpTmSel_c[0]->getPanePtr())->getWhite(); + + mBaseWidth = 0.0f; + mWidth = 1.0f; + field_0x108 = 0; + mSelNo = 0; + mLastSelNo = 0; + field_0x110 = 0; + mSelNum = 0; + mSelWaitTimer = 0; + field_0x10c = 0; + field_0x112 = 0; + mProcess = PROC_MAX_e; + field_0x115 = 0xFF; + field_0x116 = 0xFF; + field_0x117 = 0; + + mSelMsgInactiveCol.set(0xFF, 0xFF, 0xFF, 0xFF); +} -/* 803C0C24-803C0C30 -00001 000C+00 0/1 0/0 0/0 .data @3756 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3756[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)waitProc__17dMsgScrn3Select_cFv, -}; -#pragma pop +/* 802398CC-80239BE0 23420C 0314+00 1/0 0/0 0/0 .text __dt__17dMsgScrn3Select_cFv */ +dMsgScrn3Select_c::~dMsgScrn3Select_c() { + delete mpScreen; + mpScreen = NULL; -/* 803C0C30-803C0C3C -00001 000C+00 0/1 0/0 0/0 .data @3757 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3757[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)selectProc__17dMsgScrn3Select_cFv, -}; -#pragma pop + delete mpAnmBck; + mpAnmBck = NULL; -/* 803C0C3C-803C0C48 -00001 000C+00 0/1 0/0 0/0 .data @3758 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3758[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)changeProc__17dMsgScrn3Select_cFv, -}; -#pragma pop + delete mpAnmBpk; + mpAnmBpk = NULL; -/* 803C0C48-803C0C54 -00001 000C+00 0/1 0/0 0/0 .data @3759 */ -#pragma push -#pragma force_active on -SECTION_DATA static void* lit_3759[3] = { - (void*)NULL, - (void*)0xFFFFFFFF, - (void*)closeProc__17dMsgScrn3Select_cFv, -}; -#pragma pop + delete mpAnmBtk; + mpAnmBtk = NULL; -/* 803C0C54-803C0CA0 01DD74 0048+04 2/3 0/0 0/0 .data process */ -SECTION_DATA static u8 process[72 + 4 /* padding */] = { - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - /* padding */ - 0x00, - 0x00, - 0x00, - 0x00, -}; + delete mpSelectCursor; + mpSelectCursor = NULL; -/* 803C0CA0-803C0CE8 01DDC0 0018+30 0/0 0/0 0/0 .data tag_n$4921 */ -#pragma push -#pragma force_active on -SECTION_DATA static u8 tag_n[24 + 48 /* padding */] = { - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x61, - 0x5F, - 0x74, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x62, - 0x5F, - 0x74, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x63, - 0x5F, - 0x74, - /* padding */ - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, - 0x00, -}; -#pragma pop + delete mpParent; + mpParent = NULL; -/* 803C0CE8-803C0CF8 01DE08 000C+04 2/2 0/0 0/0 .data __vt__17dMsgScrn3Select_c */ -SECTION_DATA extern void* __vt__17dMsgScrn3Select_c[3 + 1 /* padding */] = { - (void*)NULL /* RTTI */, - (void*)NULL, - (void*)__dt__17dMsgScrn3Select_cFv, - /* padding */ - NULL, -}; + for (int i = 0; i < 3; i++) { + delete mpSel_c[i]; + mpSel_c[i] = NULL; -/* 80454B58-80454B5C 003158 0004+00 8/8 0/0 0/0 .sdata2 @3909 */ -SECTION_SDATA2 static u8 lit_3909[4] = { - 0x00, - 0x00, - 0x00, - 0x00, -}; + delete mpSelCld_c[i]; + mpSelCld_c[i] = NULL; -/* 80454B5C-80454B60 00315C 0004+00 4/4 0/0 0/0 .sdata2 @3910 */ -SECTION_SDATA2 static f32 lit_3910 = 190.0f; + delete mpSelCldr_c[i]; + mpSelCldr_c[i] = NULL; -/* 80454B60-80454B64 003160 0004+00 10/10 0/0 0/0 .sdata2 @3911 */ -SECTION_SDATA2 static f32 lit_3911 = 1.0f; + delete mpSelCldm_c[i]; + mpSelCldm_c[i] = NULL; -/* 802390B4-802398CC 2339F4 0818+00 0/0 4/4 0/0 .text __ct__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm dMsgScrn3Select_c::dMsgScrn3Select_c() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/__ct__17dMsgScrn3Select_cFv.s" -} -#pragma pop + delete mpTmSel_c[i]; + mpTmSel_c[i] = NULL; -/* 802398CC-80239BE0 23420C 0314+00 1/0 0/0 0/0 .text __dt__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm dMsgScrn3Select_c::~dMsgScrn3Select_c() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/__dt__17dMsgScrn3Select_cFv.s" + delete mpKahen_c[i]; + mpKahen_c[i] = NULL; + + delete mpCursor_c[i]; + mpCursor_c[i] = NULL; + + if (mpTmrSel_c[i] != NULL) { + delete mpTmrSel_c[i]; + mpTmrSel_c[i] = NULL; + } + + for (int j = 0; j < 5; j++) { + delete mpSelCldw_c[j][i]; + mpSelCldw_c[j][i] = NULL; + } + + delete mpSelPo_c[i]; + mpSelPo_c[i] = NULL; + } } -#pragma pop /* 80239BE0-80239C64 234520 0084+00 0/0 1/0 0/0 .text __dt__14J2DAnmColorKeyFv */ #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm J2DAnmColorKey::~J2DAnmColorKey() { +// asm J2DAnmColorKey::~J2DAnmColorKey() { +extern "C" asm void __dt__14J2DAnmColorKeyFv() { nofralloc #include "asm/msg/scrn/d_msg_scrn_3select/__dt__14J2DAnmColorKeyFv.s" } #pragma pop /* 80239C64-80239C78 2345A4 0014+00 0/0 5/5 0/0 .text isSelect__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm bool dMsgScrn3Select_c::isSelect() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/isSelect__17dMsgScrn3Select_cFv.s" +bool dMsgScrn3Select_c::isSelect() { + return mProcess == PROC_SELECT_e ? TRUE : FALSE; } -#pragma pop /* 80239C78-80239D08 2345B8 0090+00 0/0 5/5 0/0 .text setString__17dMsgScrn3Select_cFPcPcPc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::setString(char* param_0, char* param_1, char* param_2) { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/setString__17dMsgScrn3Select_cFPcPcPc.s" +void dMsgScrn3Select_c::setString(char* mpText0, char* mpText1, char* mpText2) { + if (mpTmSel_c[0] != NULL) { + JUT_ASSERT(((J2DTextBox*)(mpTmSel_c[0]->getPanePtr()))->getStringAllocByte() > + std::strlen(mpText0)); + } + + if (mpTmSel_c[1] != NULL) { + JUT_ASSERT(((J2DTextBox*)(mpTmSel_c[1]->getPanePtr()))->getStringAllocByte() > + std::strlen(mpText1)); + } + + if (mpTmSel_c[2] != NULL) { + JUT_ASSERT(((J2DTextBox*)(mpTmSel_c[2]->getPanePtr()))->getStringAllocByte() > + std::strlen(mpText2)); + } + + if (mpTmSel_c[0] != NULL) { + std::strcpy(((J2DTextBox*)(mpTmSel_c[0]->getPanePtr()))->getStringPtr(), mpText0); + } + + if (mpTmSel_c[1] != NULL) { + std::strcpy(((J2DTextBox*)(mpTmSel_c[1]->getPanePtr()))->getStringPtr(), mpText1); + } + + if (mpTmSel_c[2] != NULL) { + std::strcpy(((J2DTextBox*)(mpTmSel_c[2]->getPanePtr()))->getStringPtr(), mpText2); + } } -#pragma pop /* 80239D08-80239D98 234648 0090+00 0/0 5/5 0/0 .text setRubyString__17dMsgScrn3Select_cFPcPcPc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::setRubyString(char* param_0, char* param_1, char* param_2) { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/setRubyString__17dMsgScrn3Select_cFPcPcPc.s" +void dMsgScrn3Select_c::setRubyString(char* pText0, char* pText1, char* pText2) { + if (mpTmrSel_c[0] != NULL) { + JUT_ASSERT(((J2DTextBox*)(mpTmrSel_c[0]->getPanePtr()))->getStringAllocByte() > + std::strlen(pText0)); + } + + if (mpTmrSel_c[1] != NULL) { + JUT_ASSERT(((J2DTextBox*)(mpTmrSel_c[1]->getPanePtr()))->getStringAllocByte() > + std::strlen(pText1)); + } + + if (mpTmrSel_c[2] != NULL) { + JUT_ASSERT(((J2DTextBox*)(mpTmrSel_c[2]->getPanePtr()))->getStringAllocByte() > + std::strlen(pText2)); + } + + if (mpTmrSel_c[0] != NULL) { + std::strcpy(((J2DTextBox*)(mpTmrSel_c[0]->getPanePtr()))->getStringPtr(), pText0); + } + + if (mpTmrSel_c[1] != NULL) { + std::strcpy(((J2DTextBox*)(mpTmrSel_c[1]->getPanePtr()))->getStringPtr(), pText1); + } + + if (mpTmrSel_c[2] != NULL) { + std::strcpy(((J2DTextBox*)(mpTmrSel_c[2]->getPanePtr()))->getStringPtr(), pText2); + } } -#pragma pop /* 80239D98-80239DD4 2346D8 003C+00 0/0 5/5 0/0 .text translate__17dMsgScrn3Select_cFff */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::translate(f32 param_0, f32 param_1) { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/translate__17dMsgScrn3Select_cFff.s" +void dMsgScrn3Select_c::translate(f32 i_x, f32 i_y) { + mpParent->translate(i_x, i_y); } -#pragma pop - -/* ############################################################################################## */ -/* 80454B64-80454B68 003164 0004+00 2/2 0/0 0/0 .sdata2 @4154 */ -SECTION_SDATA2 static f32 lit_4154 = 0.5f; - -/* 80454B68-80454B6C 003168 0004+00 1/1 0/0 0/0 .sdata2 @4155 */ -SECTION_SDATA2 static f32 lit_4155 = 3.0f; - -/* 80454B6C-80454B70 00316C 0004+00 1/1 0/0 0/0 .sdata2 @4156 */ -SECTION_SDATA2 static f32 lit_4156 = 9.0f / 10.0f; - -/* 80454B70-80454B74 003170 0004+00 1/1 0/0 0/0 .sdata2 @4157 */ -SECTION_SDATA2 static f32 lit_4157 = 7.0f / 10.0f; - -/* 80454B74-80454B78 003174 0004+00 1/1 0/0 0/0 .sdata2 @4158 */ -SECTION_SDATA2 static f32 lit_4158 = 1.0f / 20.0f; /* 80239DD4-8023A094 234714 02C0+00 0/0 5/5 0/0 .text draw__17dMsgScrn3Select_cFff */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::draw(f32 param_0, f32 param_1) { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/draw__17dMsgScrn3Select_cFff.s" +void dMsgScrn3Select_c::draw(f32 i_xPos, f32 i_yPos) { + J2DGrafContext* port = dComIfGp_getCurrentGrafPort(); + port->setup2D(); + + if (mSelMsgInactiveCol.r != g_MsgObject_HIO_c.mSelMsgInactiveCol.r || + mSelMsgInactiveCol.g != g_MsgObject_HIO_c.mSelMsgInactiveCol.g || + mSelMsgInactiveCol.b != g_MsgObject_HIO_c.mSelMsgInactiveCol.b) + { + mSelMsgInactiveCol.r = g_MsgObject_HIO_c.mSelMsgInactiveCol.r; + mSelMsgInactiveCol.g = g_MsgObject_HIO_c.mSelMsgInactiveCol.g; + mSelMsgInactiveCol.b = g_MsgObject_HIO_c.mSelMsgInactiveCol.b; + + for (int i = 0; i < 3; i++) { + if (i == mSelNo) { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setWhite(mSelMsgCol); + + if (mpTmrSel_c[i] != NULL) { + ((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setWhite(mSelMsgCol); + } + } else { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setWhite(mSelMsgInactiveCol); + + if (mpTmrSel_c[i] != NULL) { + ((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setWhite(mSelMsgInactiveCol); + } + } + } + } + + mpScreen->draw(i_xPos, i_yPos, port); + + if (field_0x110 != 0xFF && mSelNo != 0xFF && field_0x117 != 0) { + f32 var_f31 = (mWidth - 1.0f) * (mpCursor_c[mSelNo]->getInitCenterPosX() - + mpSelCldw_c[1][mSelNo]->getInitPosX()); + if (mWidth == 1.0f) { + var_f31 -= 3.0f; + } + + Vec center = mpCursor_c[mSelNo]->getGlobalVtxCenter(true, 0); + mpSelectCursor->setPos(mOffsetX + (mCursorPos[mSelNo].x + var_f31), center.y, + mpCursor_c[mSelNo]->getPanePtr(), true); + mpSelectCursor->setParam(0.9f, 0.7f, 0.05f, 0.5f, 0.5f); + mpSelectCursor->draw(); + } } -#pragma pop /* 8023A094-8023A398 2349D4 0304+00 0/0 5/5 0/0 .text selAnimeInit__17dMsgScrn3Select_cFUcUcUcfUc */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::selAnimeInit(u8 param_0, u8 param_1, u8 param_2, f32 param_3, - u8 param_4) { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/selAnimeInit__17dMsgScrn3Select_cFUcUcUcfUc.s" +void dMsgScrn3Select_c::selAnimeInit(u8 i_selNum, u8 i_selNo, u8 param_2, f32 i_width, u8 param_4) { + mSelNo = i_selNo; + field_0x110 = i_selNo; + mSelNum = i_selNum; + mLastSelNo = mSelNo; + field_0x114 = 0; + mSelWaitTimer = 0; + field_0x10c = 0; + field_0x112 = param_4; + + for (int i = 0; i < 3; i++) { + mpKahen_c[i]->paneScale(1.0f, 1.0f); + mpCursor_c[i]->paneScale(1.0f, 1.0f); + mpSelCldw_c[2][i]->paneScale(1.0f, 1.0f); + mpSelCldw_c[3][i]->paneScale(1.0f, 1.0f); + mpSelCld_c[i]->paneScale(1.0f, 1.0f); + mpSelCldr_c[i]->paneScale(1.0f, 1.0f); + mpSelCldm_c[i]->paneScale(1.0f, 1.0f); + mpTmSel_c[i]->paneScale(1.0f, 1.0f); + + if (mpTmrSel_c[i] != NULL) { + mpTmrSel_c[i]->paneScale(1.0f, 1.0f); + } + } + + mBaseWidth = i_width; + if (mBaseWidth > mpTmSel_c[0]->getInitSizeX()) { + mWidth = mBaseWidth / mpTmSel_c[0]->getInitSizeX(); + } else { + mWidth = 1.0f; + } + + switch (i_selNum) { + case 2: + mpSel_c[0]->hide(); + mpSel_c[1]->show(); + mpSel_c[2]->show(); + + if (param_2 == 1) { + mpParent->paneTrans(0.0f, mpSel_c[0]->getInitPosY() - mpSel_c[1]->getInitPosY()); + } else { + mpParent->paneTrans(0.0f, 0.0f); + } + break; + case 3: + mpSel_c[0]->show(); + mpSel_c[1]->show(); + mpSel_c[2]->show(); + mpParent->paneTrans(0.0f, 0.0f); + break; + } + + mBckFrame = 190.0f; + + for (int i = 0; i < 3; i++) { + selectAnimeTransform(i); + } + + selectScale(); + selectTrans(); + + for (int i = 0; i < 3; i++) { + if (i == mSelNo) { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setWhite(mSelMsgCol); + + if (mpTmrSel_c[i] != NULL) { + ((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setWhite(mSelMsgCol); + } + } else { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setWhite(mSelMsgInactiveCol); + + if (mpTmrSel_c[i] != NULL) { + ((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setWhite(mSelMsgInactiveCol); + } + } + } + + mProcess = PROC_OPEN1_e; } -#pragma pop - -/* ############################################################################################## */ -/* 80454B78-80454B80 003178 0008+00 2/2 0/0 0/0 .sdata2 @4345 */ -SECTION_SDATA2 static f64 lit_4345 = 4503601774854144.0 /* cast s32 to float */; /* 8023A398-8023A680 234CD8 02E8+00 0/0 5/5 0/0 .text selAnimeMove__17dMsgScrn3Select_cFUcUcb */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::selAnimeMove(u8 param_0, u8 param_1, bool param_2) { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/selAnimeMove__17dMsgScrn3Select_cFUcUcb.s" +BOOL dMsgScrn3Select_c::selAnimeMove(u8 i_selNum, u8 param_1, bool param_2) { + field_0x110 = param_1; + mSelNum = i_selNum; + field_0x114 = 0; + field_0x108 = param_2; + + (this->*process[mProcess])(); + + mBpkFrame++; + if (mBpkFrame >= mpAnmBpk->getFrameMax()) { + mBpkFrame -= mpAnmBpk->getFrameMax(); + } + mpAnmBpk->setFrame(mBpkFrame); + + mBtkFrame++; + if (mBtkFrame >= mpAnmBtk->getFrameMax()) { + mBtkFrame -= mpAnmBtk->getFrameMax(); + } + mpAnmBtk->setFrame(mBtkFrame); + + mpScreen->animation(); + + for (int i = 0; i < 3; i++) { + if (i == mSelNo) { + mpSelCld_c[i]->getPanePtr()->scale(1.0f, 1.0f); + mpSelCldr_c[i]->getPanePtr()->scale(1.0f, 1.0f); + } else { + mpSelCld_c[i]->getPanePtr()->scale(0.0f, 0.0f); + mpSelCldr_c[i]->getPanePtr()->scale(0.0f, 0.0f); + } + } + + selectTrans(); + + for (int i = 0; i < 3; i++) { + if (i == mSelNo) { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setWhite(mSelMsgCol); + + if (mpTmrSel_c[i] != NULL) { + ((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setWhite(mSelMsgCol); + } + } else { + ((J2DTextBox*)(mpTmSel_c[i]->getPanePtr()))->setWhite(mSelMsgInactiveCol); + + if (mpTmrSel_c[i] != NULL) { + ((J2DTextBox*)(mpTmrSel_c[i]->getPanePtr()))->setWhite(mSelMsgInactiveCol); + } + } + } + + return mProcess == PROC_SELECT_e; } -#pragma pop - -/* ############################################################################################## */ -/* 80454B80-80454B84 003180 0004+00 2/2 0/0 0/0 .sdata2 @4434 */ -SECTION_SDATA2 static f32 lit_4434 = 199.0f; /* 8023A680-8023A934 234FC0 02B4+00 0/0 9/9 0/0 .text selAnimeEnd__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm bool dMsgScrn3Select_c::selAnimeEnd() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/selAnimeEnd__17dMsgScrn3Select_cFv.s" +bool dMsgScrn3Select_c::selAnimeEnd() { + if (mProcess == PROC_MAX_e) { + return true; + } + + field_0x114 = 0; + + if (mProcess != PROC_CLOSE_e) { + mBckFrame = 199.0f; + + for (int i = 0; i < 3; i++) { + f32 scale_x = mpSel_c[i]->getPanePtr()->getScaleX(); + f32 scale_y = mpSel_c[i]->getPanePtr()->getScaleY(); + + selectAnimeTransform(i); + mpSel_c[i]->getPanePtr()->scale(scale_x, scale_y); + } + + mProcess = PROC_CLOSE_e; + field_0x117 = 0; + } + + (this->*process[mProcess])(); + + mBpkFrame++; + if (mBpkFrame >= mpAnmBpk->getFrameMax()) { + mBpkFrame -= mpAnmBpk->getFrameMax(); + } + mpAnmBpk->setFrame(mBpkFrame); + + mBtkFrame++; + if (mBtkFrame >= mpAnmBtk->getFrameMax()) { + mBtkFrame -= mpAnmBtk->getFrameMax(); + } + mpAnmBtk->setFrame(mBtkFrame); + + mpScreen->animation(); + + for (int i = 0; i < 3; i++) { + if (i == mSelNo) { + mpSelCld_c[i]->getPanePtr()->scale(1.0f, 1.0f); + mpSelCldr_c[i]->getPanePtr()->scale(1.0f, 1.0f); + } else { + mpSelCld_c[i]->getPanePtr()->scale(0.0f, 0.0f); + mpSelCldr_c[i]->getPanePtr()->scale(0.0f, 0.0f); + } + } + + selectTrans(); + return mProcess == PROC_MAX_e ? TRUE : FALSE; } -#pragma pop /* 8023A934-8023A94C 235274 0018+00 0/0 5/5 0/0 .text getTextBoxWidth__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm f32 dMsgScrn3Select_c::getTextBoxWidth() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/getTextBoxWidth__17dMsgScrn3Select_cFv.s" +f32 dMsgScrn3Select_c::getTextBoxWidth() { + return mpTmSel_c[0]->getSizeX(); } -#pragma pop /* 8023A94C-8023A95C 23528C 0010+00 0/0 5/5 0/0 .text getFontSize__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm f32 dMsgScrn3Select_c::getFontSize() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/getFontSize__17dMsgScrn3Select_cFv.s" +f32 dMsgScrn3Select_c::getFontSize() { + J2DTextBox::TFontSize font_size; + ((J2DTextBox*)mpTmSel_c[0]->getPanePtr())->getFontSize(font_size); + return font_size.mSizeX; } -#pragma pop /* 8023A95C-8023A97C 23529C 0020+00 0/0 2/2 0/0 .text getRubyFontSize__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::getRubyFontSize() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/getRubyFontSize__17dMsgScrn3Select_cFv.s" +f32 dMsgScrn3Select_c::getRubyFontSize() { + if (mpTmrSel_c[0] != NULL) { + J2DTextBox::TFontSize font_size; + ((J2DTextBox*)mpTmrSel_c[0]->getPanePtr())->getFontSize(font_size); + return font_size.mSizeX; + } + + return 0.0f; } -#pragma pop /* 8023A97C-8023A98C 2352BC 0010+00 0/0 5/5 0/0 .text getCharSpace__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm f32 dMsgScrn3Select_c::getCharSpace() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/getCharSpace__17dMsgScrn3Select_cFv.s" +f32 dMsgScrn3Select_c::getCharSpace() { + return ((J2DTextBox*)mpTmSel_c[0]->getPanePtr())->getCharSpace(); } -#pragma pop /* 8023A98C-8023A9AC 2352CC 0020+00 0/0 2/2 0/0 .text getRubyCharSpace__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::getRubyCharSpace() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/getRubyCharSpace__17dMsgScrn3Select_cFv.s" +f32 dMsgScrn3Select_c::getRubyCharSpace() { + if (mpTmrSel_c[0] != NULL) { + return ((J2DTextBox*)mpTmrSel_c[0]->getPanePtr())->getCharSpace(); + } + + return 0.0f; } -#pragma pop /* 8023A9AC-8023A9D8 2352EC 002C+00 0/0 2/2 0/0 .text getTextBoxGlobalPosX__17dMsgScrn3Select_cFi */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::getTextBoxGlobalPosX(int param_0) { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/getTextBoxGlobalPosX__17dMsgScrn3Select_cFi.s" +f32 dMsgScrn3Select_c::getTextBoxGlobalPosX(int i_sel) { + return mpTmSel_c[i_sel]->getGlobalPosX(); } -#pragma pop /* 8023A9D8-8023AA04 235318 002C+00 0/0 2/2 0/0 .text getTextBoxGlobalPosY__17dMsgScrn3Select_cFi */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::getTextBoxGlobalPosY(int param_0) { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/getTextBoxGlobalPosY__17dMsgScrn3Select_cFi.s" +f32 dMsgScrn3Select_c::getTextBoxGlobalPosY(int i_sel) { + return mpTmSel_c[i_sel]->getGlobalPosY(); } -#pragma pop - -/* ############################################################################################## */ -/* 80399828-80399834 025E88 000C+00 1/1 0/0 0/0 .rodata @4497 */ -SECTION_RODATA static u8 const lit_4497[12] = { - 0x43, 0x4C, 0x00, 0x00, 0x43, 0x98, 0x00, 0x00, 0x43, 0xCA, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80399828, &lit_4497); /* 8023AA04-8023AAF4 235344 00F0+00 1/0 0/0 0/0 .text open1Proc__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::open1Proc() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/open1Proc__17dMsgScrn3Select_cFv.s" -} -#pragma pop +void dMsgScrn3Select_c::open1Proc() { + f32 sel_anm_frame[3] = {204.0f, 304.0f, 404.0f}; -/* ############################################################################################## */ -/* 80399834-80399840 025E94 000C+00 1/1 0/0 0/0 .rodata @4520 */ -SECTION_RODATA static u8 const lit_4520[12] = { - 0x43, 0x4C, 0x00, 0x00, 0x43, 0x98, 0x00, 0x00, 0x43, 0xCA, 0x00, 0x00, -}; -COMPILER_STRIP_GATE(0x80399834, &lit_4520); + if (mSelNo != 0xFF) { + mBckFrame = sel_anm_frame[mSelNo]; -/* 8023AAF4-8023AC14 235434 0120+00 1/0 0/0 0/0 .text open2Proc__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::open2Proc() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/open2Proc__17dMsgScrn3Select_cFv.s" -} -#pragma pop + for (int i = 0; i < 3; i++) { + f32 x = mpSel_c[i]->getPosX(); + selectAnimeTransform(i); -/* 8023AC14-8023AC44 235554 0030+00 1/0 0/0 0/0 .text waitProc__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::waitProc() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/waitProc__17dMsgScrn3Select_cFv.s" + mpSel_c[i]->move(x, mpSel_c[i]->getPosY()); + } + } + + mBckFrame = 190.0f; + mProcess = PROC_OPEN2_e; } -#pragma pop -/* ############################################################################################## */ -/* 80454B84-80454B88 003184 0004+00 2/2 0/0 0/0 .sdata2 @4604 */ -SECTION_SDATA2 static f32 lit_4604 = 303.0f; +/* 8023AAF4-8023AC14 235434 0120+00 1/0 0/0 0/0 .text open2Proc__17dMsgScrn3Select_cFv */ +void dMsgScrn3Select_c::open2Proc() { + f32 sel_anm_frame[3] = {204.0f, 304.0f, 404.0f}; + + mBckFrame++; + mpSelectCursor->setAlphaRate(1.0f); -/* 80454B88-80454B8C 003188 0004+00 2/2 0/0 0/0 .sdata2 @4605 */ -SECTION_SDATA2 static f32 lit_4605 = 300.0f; + if (mBckFrame >= 199.0f) { + if (mSelNo != 0xFF) { + mBckFrame = sel_anm_frame[mSelNo]; + } -/* 80454B8C-80454B90 00318C 0004+00 2/2 0/0 0/0 .sdata2 @4606 */ -SECTION_SDATA2 static f32 lit_4606 = 403.0f; + field_0x117 = 1; + mProcess = PROC_WAIT_e; + } -/* 80454B90-80454B98 003190 0004+04 2/2 0/0 0/0 .sdata2 @4607 */ -SECTION_SDATA2 static f32 lit_4607[1 + 1 /* padding */] = { - 400.0f, - /* padding */ - 0.0f, -}; + for (int i = 0; i < 3; i++) { + f32 scale_x = mpSel_c[i]->getPanePtr()->getScaleX(); + f32 scale_y = mpSel_c[i]->getPanePtr()->getScaleY(); + + selectAnimeTransform(i); + mpSel_c[i]->getPanePtr()->scale(scale_x, scale_y); + } +} + +/* 8023AC14-8023AC44 235554 0030+00 1/0 0/0 0/0 .text waitProc__17dMsgScrn3Select_cFv */ +void dMsgScrn3Select_c::waitProc() { + mSelWaitTimer++; + + if (mSelWaitTimer > g_MsgObject_HIO_c.mSelWaitFrame) { + mProcess = PROC_SELECT_e; + } +} /* 8023AC44-8023AE68 235584 0224+00 1/0 0/0 0/0 .text selectProc__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::selectProc() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/selectProc__17dMsgScrn3Select_cFv.s" +void dMsgScrn3Select_c::selectProc() { + if (mSelNo != field_0x110) { + mLastSelNo = mSelNo; + mSelNo = field_0x110; + + switch (mLastSelNo) { + case 0: + if (mSelNo == 1) { + mBckFrame = 303.0f; + selectAnimeTransform(1); + + mBckFrame = 300.0f; + selectAnimeTransform(0); + } else if (mSelNo == 2) { + mBckFrame = 403.0f; + selectAnimeTransform(2); + + mBckFrame = 400.0f; + selectAnimeTransform(0); + } + break; + case 1: + if (mSelNo == 0) { + mBckFrame = 300.0f; + selectAnimeTransform(0); + + mBckFrame = 303.0f; + selectAnimeTransform(1); + } else if (mSelNo == 2) { + mBckFrame = 403.0f; + selectAnimeTransform(2); + + mBckFrame = 400.0f; + selectAnimeTransform(1); + } + break; + case 2: + if (mSelNo == 1) { + mBckFrame = 400.0f; + selectAnimeTransform(1); + + mBckFrame = 403.0f; + selectAnimeTransform(2); + } else if (mSelNo == 0) { + mBckFrame = 300.0f; + selectAnimeTransform(0); + + mBckFrame = 303.0f; + selectAnimeTransform(2); + } + break; + case 0xFF: + if (mSelNo == 0) { + mBckFrame = 300.0f; + } else if (mSelNo == 1) { + mBckFrame = 303.0f; + } else if (mSelNo == 2) { + mBckFrame = 403.0f; + } + + for (int i = 0; i < 3; i++) { + selectAnimeTransform(i); + } + break; + } + + if (mLastSelNo != 0xFF) { + field_0x10c = 0; + mProcess = PROC_CHANGE_e; + } else { + mProcess = PROC_SELECT_e; + } + } } -#pragma pop /* 8023AE68-8023B148 2357A8 02E0+00 1/0 0/0 0/0 .text changeProc__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::changeProc() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/changeProc__17dMsgScrn3Select_cFv.s" +void dMsgScrn3Select_c::changeProc() { + if (mSelNo == 0xFF) { + if (mLastSelNo == 0) { + mBckFrame = 303.0f; + selectAnimeTransform(0); + } else if (mLastSelNo == 1) { + mBckFrame = 300.0f; + selectAnimeTransform(1); + } else if (mLastSelNo == 2) { + mBckFrame = 400.0f; + selectAnimeTransform(2); + } + + mProcess = PROC_SELECT_e; + } else { + switch (mLastSelNo) { + case 0: + if (mSelNo == 1) { + if (field_0x108 != 0) { + mBckFrame = 303.0f; + } else { + mBckFrame++; + } + + selectAnimeTransform(0); + + if (mBckFrame >= 303.0f) { + mProcess = PROC_SELECT_e; + } + } else if (mSelNo == 2) { + if (field_0x108 != 0) { + mBckFrame = 403.0f; + } else { + mBckFrame++; + } + + selectAnimeTransform(0); + + if (mBckFrame >= 403.0f) { + mProcess = PROC_SELECT_e; + } + } + break; + case 1: + if (mSelNo == 0) { + if (field_0x108 != 0) { + mBckFrame = 300.0f; + } else { + mBckFrame--; + } + + selectAnimeTransform(1); + + if (mBckFrame <= 300.0f) { + mProcess = PROC_SELECT_e; + } + } else if (mSelNo == 2) { + if (field_0x108 != 0) { + mBckFrame = 403.0f; + } else { + mBckFrame++; + } + + selectAnimeTransform(1); + + if (mBckFrame >= 403.0f) { + mProcess = PROC_SELECT_e; + } + } + break; + case 2: + if (mSelNo == 1) { + if (field_0x108 != 0) { + mBckFrame = 400.0f; + } else { + mBckFrame--; + } + + selectAnimeTransform(2); + + if (mBckFrame <= 400.0f) { + mProcess = PROC_SELECT_e; + } + } else if (mSelNo == 0) { + if (field_0x108 != 0) { + mBckFrame = 300.0f; + } else { + mBckFrame--; + } + + selectAnimeTransform(2); + + if (mBckFrame <= 300.0f) { + mProcess = PROC_SELECT_e; + } + } + break; + } + } } -#pragma pop /* 8023B148-8023B228 235A88 00E0+00 1/0 0/0 0/0 .text closeProc__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::closeProc() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/closeProc__17dMsgScrn3Select_cFv.s" +void dMsgScrn3Select_c::closeProc() { + mpSelectCursor->setAlphaRate(0.0f); + mBckFrame--; + + for (int i = 0; i < 3; i++) { + f32 scale_x = mpSel_c[i]->getPanePtr()->getScaleX(); + f32 scale_y = mpSel_c[i]->getPanePtr()->getScaleY(); + + selectAnimeTransform(i); + mpSel_c[i]->getPanePtr()->scale(scale_x, scale_y); + } + + if (mBckFrame <= 190.0f) { + mProcess = PROC_MAX_e; + } } -#pragma pop /* 8023B228-8023B4AC 235B68 0284+00 1/1 0/0 0/0 .text selectScale__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::selectScale() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/selectScale__17dMsgScrn3Select_cFv.s" +void dMsgScrn3Select_c::selectScale() { + if (mWidth != 1.0f) { + for (int i = 0; i < 3; i++) { + f32 x; + f32 y; + + mpKahen_c[i]->paneScale(mWidth, 1.0f); + + x = (mWidth * mpCursor_c[i]->getSizeX()) / mpCursor_c[i]->getInitSizeX(); + y = mpCursor_c[i]->getSizeY() / mpCursor_c[i]->getInitSizeY(); + mpCursor_c[i]->paneScale(x, y); + + x = (mWidth * mpSelCldw_c[2][i]->getSizeX()) / mpSelCldw_c[2][i]->getInitSizeX(); + y = mpSelCldw_c[2][i]->getSizeY() / mpSelCldw_c[2][i]->getInitSizeY(); + mpSelCldw_c[2][i]->paneScale(x, y); + + f32 temp = (mWidth - 1.0f) * + (mpSelCldw_c[0][i]->getInitSizeX() + mpSelCldw_c[1][i]->getInitSizeX()); + x = ((mWidth * mpSelCldw_c[3][i]->getSizeX()) - temp) / + mpSelCldw_c[3][i]->getInitSizeX(); + y = mpSelCldw_c[3][i]->getSizeY() / mpSelCldw_c[3][i]->getInitSizeY(); + mpSelCldw_c[3][i]->paneScale(x, y); + + x = (mWidth * mpSelCld_c[i]->getSizeX()) / mpSelCld_c[i]->getInitSizeX(); + y = mpSelCld_c[i]->getSizeY() / mpSelCld_c[i]->getInitSizeY(); + mpSelCld_c[i]->paneScale(x, y); + + x = (mWidth * mpSelCldr_c[i]->getSizeX()) / mpSelCldr_c[i]->getInitSizeX(); + y = mpSelCldr_c[i]->getSizeY() / mpSelCldr_c[i]->getInitSizeY(); + mpSelCldr_c[i]->paneScale(x, y); + + x = (mWidth * mpSelCldm_c[i]->getSizeX()) / mpSelCldm_c[i]->getInitSizeX(); + y = mpSelCldm_c[i]->getSizeY() / mpSelCldm_c[i]->getInitSizeY(); + mpSelCldm_c[i]->paneScale(x, y); + + x = (mWidth * mpTmSel_c[i]->getSizeX()) / mpTmSel_c[i]->getInitSizeX(); + y = mpTmSel_c[i]->getSizeY() / mpTmSel_c[i]->getInitSizeY(); + mpTmSel_c[i]->paneScale(x, y); + + if (mpTmrSel_c[i] != NULL) { + x = (mWidth * mpTmrSel_c[i]->getSizeX()) / mpTmrSel_c[i]->getInitSizeX(); + y = mpTmrSel_c[i]->getSizeY() / mpTmrSel_c[i]->getInitSizeY(); + mpTmrSel_c[i]->paneScale(x, y); + } + } + } } -#pragma pop /* 8023B4AC-8023B870 235DEC 03C4+00 3/3 0/0 0/0 .text selectTrans__17dMsgScrn3Select_cFv */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::selectTrans() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/selectTrans__17dMsgScrn3Select_cFv.s" +void dMsgScrn3Select_c::selectTrans() { + J2DTextBox::TFontSize font_size; + ((J2DTextBox*)mpTmSel_c[0]->getPanePtr())->getFontSize(font_size); + f32 var_f31 = (mpTmSel_c[0]->getSizeY() - font_size.mSizeY) * 0.5f; + + f32 sp68[3]; + for (int i = 0; i < 3; i++) { + sp68[i] = 0.0f; + } + + if (mWidth == 1.0f) { + for (int i = 0; i < 3; i++) { + if (isAnimeUpdate(i)) { + mpTmSel_c[i]->paneTrans(0.0f, var_f31 + sp68[i]); + + if (mpTmrSel_c[i] != NULL) { + mpTmrSel_c[i]->paneTrans(0.0f, var_f31 + sp68[i]); + } + } + } + } else { + for (int i = 0; i < 3; i++) { + if (isAnimeUpdate(i)) { + f32 temp_f30 = (1.0f - mWidth) * mpKahen_c[i]->getInitSizeX(); + mpKahen_c[i]->paneTrans(0.5f * temp_f30, 0.0f); + + f32 temp_f28 = ((mWidth - 1.0f) * (mpCursor_c[i]->getInitCenterPosX() - + mpSelCldw_c[1][i]->getInitPosX())); + mpCursor_c[i]->paneTrans(temp_f28 - temp_f30, 0.0f); + + f32 temp_f28_2 = ((mWidth - 1.0f) * (mpSelCldw_c[2][i]->getInitPosX() - + mpSelCldw_c[1][i]->getInitPosX())); + temp_f28_2 = temp_f28_2; // probably fake, but fixes instruction order + mpSelCldw_c[0][i]->paneTrans(temp_f28_2 - temp_f30, 0.0f); + + f32 temp_f28_3 = ((mWidth - 1.0f) * (mpSelCldw_c[2][i]->getInitCenterPosX() - + mpSelCldw_c[1][i]->getInitPosX())); + mpSelCldw_c[2][i]->paneTrans(temp_f28_3 - temp_f30, 0.0f); + + f32 temp_f28_4 = + (((1.0f - mWidth) * (0.5f * mpSelCldw_c[3][i]->getInitSizeX())) + + ((mWidth - 1.0f) * mpSelCldw_c[1][i]->getInitSizeX())); + mpSelCldw_c[3][i]->paneTrans(temp_f28_4 - temp_f30, 0.0f); + + f32 temp_f28_5 = ((mWidth - 1.0f) * (mpSelCld_c[i]->getInitCenterPosX() - + mpSelCldw_c[1][i]->getInitPosX())); + mpSelCld_c[i]->paneTrans(temp_f28_5 - temp_f30, 0.0f); + + f32 temp_f28_6 = ((mWidth - 1.0f) * (mpSelCldm_c[i]->getInitCenterPosX() - + mpSelCldw_c[1][i]->getInitPosX())); + mpSelCldm_c[i]->paneTrans(temp_f28_6 - temp_f30, 0.0f); + + f32 temp_f28_7 = ((mWidth - 1.0f) * (mpTmSel_c[i]->getInitCenterPosX() - + mpSelCldw_c[1][i]->getInitPosX())); + mpTmSel_c[i]->paneTrans(temp_f28_7 - temp_f30, var_f31 + sp68[i]); + + if (mpTmrSel_c[i] != NULL) { + f32 temp_f28_8 = ((mWidth - 1.0f) * (mpTmrSel_c[i]->getInitCenterPosX() - + mpSelCldw_c[1][i]->getInitPosX())); + mpTmrSel_c[i]->paneTrans(temp_f28_8 - temp_f30, var_f31 + sp68[i]); + } + + f32 temp_f0 = mpSelCldw_c[0][i]->getPosX(); + temp_f0 -= mpSelCldw_c[0][i]->getInitPosX(); + mpSelPo_c[i]->paneTrans(temp_f0 - temp_f30, 0.0f); + + offAnimeUpdate(i); + } + } + } } -#pragma pop /* 8023B870-8023B914 2361B0 00A4+00 7/7 0/0 0/0 .text selectAnimeTransform__17dMsgScrn3Select_cFi */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void dMsgScrn3Select_c::selectAnimeTransform(int param_0) { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/selectAnimeTransform__17dMsgScrn3Select_cFi.s" -} -#pragma pop +void dMsgScrn3Select_c::selectAnimeTransform(int i_sel) { + mpAnmBck->setFrame(mBckFrame); + mpSel_c[i_sel]->getPanePtr()->setAnimation(mpAnmBck); + mpSel_c[i_sel]->getPanePtr()->animationTransform(); + mpSel_c[i_sel]->getPanePtr()->setAnimation((J2DAnmTransform*)NULL); -/* 8023B914-8023B9B4 236254 00A0+00 0/0 1/0 0/0 .text __sinit_d_msg_scrn_3select_cpp */ -#pragma push -#pragma optimization_level 0 -#pragma optimizewithasm off -asm void __sinit_d_msg_scrn_3select_cpp() { - nofralloc -#include "asm/msg/scrn/d_msg_scrn_3select/__sinit_d_msg_scrn_3select_cpp.s" + onAnimeUpdate(i_sel); } -#pragma pop - -#pragma push -#pragma force_active on -REGISTER_CTORS(0x8023B914, __sinit_d_msg_scrn_3select_cpp); -#pragma pop - -/* 80399840-80399840 025EA0 0000+00 0/0 0/0 0/0 .rodata @stringBase0 */ |
