diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index d9d60419..8981092a 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -9004,58 +9004,58 @@ initializeState__30sFStateID_c<15dLytPauseInfo_c>CFR15dLytPauseInfo_c = .text:0x __sinit_\d_lyt_pause_info_cpp = .text:0x80163140; // type:function size:0x338 scope:local __dt__30sFStateID_c<15dLytPauseInfo_c>Fv = .text:0x80163480; // type:function size:0x58 scope:weak isSameName__30sFStateID_c<15dLytPauseInfo_c>CFPCc = .text:0x801634E0; // type:function size:0x88 scope:weak -LytPauseText__ctor = .text:0x80163570; // type:function size:0x17C -fn_801636F0 = .text:0x801636F0; // type:function size:0xA4 -fn_801637A0 = .text:0x801637A0; // type:function size:0xA0 -fn_80163840 = .text:0x80163840; // type:function size:0x6C -fn_801638B0 = .text:0x801638B0; // type:function size:0x58 -fn_80163910 = .text:0x80163910; // type:function size:0x150 -fn_80163A60 = .text:0x80163A60; // type:function size:0x10 -fn_80163A70 = .text:0x80163A70; // type:function size:0xD4 -fn_80163B50 = .text:0x80163B50; // type:function size:0x68 -fn_80163BC0 = .text:0x80163BC0; // type:function size:0x10 -fn_80163BD0 = .text:0x80163BD0; // type:function size:0x34 -fn_80163C10 = .text:0x80163C10; // type:function size:0xC -fn_80163C20 = .text:0x80163C20; // type:function size:0xC -LytPauseText__stateNoneEnter = .text:0x80163C30; // type:function size:0x58 -LytPauseText__stateNoneUpdate = .text:0x80163C90; // type:function size:0x30 -LytPauseText__stateNoneLeave = .text:0x80163CC0; // type:function size:0x4 -LytPauseText__stateInEnter = .text:0x80163CD0; // type:function size:0x54 -LytPauseText__stateInUpdate = .text:0x80163D30; // type:function size:0xAC -LytPauseText__stateInLeave = .text:0x80163DE0; // type:function size:0x4 -LytPauseText__stateWaitEnter = .text:0x80163DF0; // type:function size:0xC -LytPauseText__stateWaitUpdate = .text:0x80163E00; // type:function size:0x88 -LytPauseText__stateWaitLeave = .text:0x80163E90; // type:function size:0x4 -LytPauseText__stateOutEnter = .text:0x80163EA0; // type:function size:0x44 -LytPauseText__stateOutUpdate = .text:0x80163EF0; // type:function size:0xE8 -LytPauseText__stateOutLeave = .text:0x80163FE0; // type:function size:0x4 -fn_80163FF0 = .text:0x80163FF0; // type:function size:0x50 -fn_80164040 = .text:0x80164040; // type:function size:0x10 -LytPauseText__setupPauseMenuTextMaybe = .text:0x80164050; // type:function size:0x168 +__ct__15dLytPauseText_cFv = .text:0x80163570; // type:function size:0x17C +__dt__54sFStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c>Fv = .text:0x801636F0; // type:function size:0xA4 scope:weak +__dt__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801637A0; // type:function size:0xA0 scope:weak +__dt__31sFStateFct_c<15dLytPauseText_c>Fv = .text:0x80163840; // type:function size:0x6C scope:weak +__dt__28sFState_c<15dLytPauseText_c>Fv = .text:0x801638B0; // type:function size:0x58 scope:weak +build__15dLytPauseText_cFv = .text:0x80163910; // type:function size:0x150 +changeState__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x80163A60; // type:function size:0x10 scope:weak +remove__15dLytPauseText_cFv = .text:0x80163A70; // type:function size:0xD4 +execute__15dLytPauseText_cFv = .text:0x80163B50; // type:function size:0x68 +executeState__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80163BC0; // type:function size:0x10 scope:weak +draw__15dLytPauseText_cFv = .text:0x80163BD0; // type:function size:0x34 +requestIn__15dLytPauseText_cFv = .text:0x80163C10; // type:function size:0xC +requestOut__15dLytPauseText_cFv = .text:0x80163C20; // type:function size:0xC +initializeState_None__15dLytPauseText_cFv = .text:0x80163C30; // type:function size:0x58 +executeState_None__15dLytPauseText_cFv = .text:0x80163C90; // type:function size:0x30 +finalizeState_None__15dLytPauseText_cFv = .text:0x80163CC0; // type:function size:0x4 +initializeState_In__15dLytPauseText_cFv = .text:0x80163CD0; // type:function size:0x54 +executeState_In__15dLytPauseText_cFv = .text:0x80163D30; // type:function size:0xAC +finalizeState_In__15dLytPauseText_cFv = .text:0x80163DE0; // type:function size:0x4 +initializeState_Wait__15dLytPauseText_cFv = .text:0x80163DF0; // type:function size:0xC +executeState_Wait__15dLytPauseText_cFv = .text:0x80163E00; // type:function size:0x88 +finalizeState_Wait__15dLytPauseText_cFv = .text:0x80163E90; // type:function size:0x4 +initializeState_Out__15dLytPauseText_cFv = .text:0x80163EA0; // type:function size:0x44 +executeState_Out__15dLytPauseText_cFv = .text:0x80163EF0; // type:function size:0xE8 +finalizeState_Out__15dLytPauseText_cFv = .text:0x80163FE0; // type:function size:0x4 +startAnim__15dLytPauseText_cFi = .text:0x80163FF0; // type:function size:0x50 +stopAnim__15dLytPauseText_cFi = .text:0x80164040; // type:function size:0x10 +updateText__15dLytPauseText_cFv = .text:0x80164050; // type:function size:0x168 getCurrentPauseLabel__15dLytPauseText_cFR15SizedString<32> = .text:0x801641C0; // type:function size:0x14C -fn_80164310 = .text:0x80164310; // type:function size:0xC8 -lytPauseDisplayShowItemCaption = .text:0x801643E0; // type:function size:0x394 -fn_80164780 = .text:0x80164780; // type:function size:0x54 -fn_801647E0 = .text:0x801647E0; // type:function size:0x50 -fn_80164830 = .text:0x80164830; // type:function size:0x15C -fn_80164990 = .text:0x80164990; // type:function size:0x60 -fn_801649F0 = .text:0x801649F0; // type:function size:0xC -fn_80164A00 = .text:0x80164A00; // type:function size:0x1C -fn_80164A20 = .text:0x80164A20; // type:function size:0x1C -fn_80164A40 = .text:0x80164A40; // type:function size:0x1C -fn_80164A60 = .text:0x80164A60; // type:function size:0x10 -fn_80164A70 = .text:0x80164A70; // type:function size:0x10 -fn_80164A80 = .text:0x80164A80; // type:function size:0x10 -fn_80164A90 = .text:0x80164A90; // type:function size:0x10 -fn_80164AA0 = .text:0x80164AA0; // type:function size:0x10 -fn_80164AB0 = .text:0x80164AB0; // type:function size:0x10 -fn_80164AC0 = .text:0x80164AC0; // type:function size:0x10 -fn_80164AD0 = .text:0x80164AD0; // type:function size:0x30 -fn_80164B00 = .text:0x80164B00; // type:function size:0x30 -fn_80164B30 = .text:0x80164B30; // type:function size:0x30 -LytPauseText__initStates = .text:0x80164B60; // type:function size:0x338 -LytPauseText__state_dtor = .text:0x80164EA0; // type:function size:0x58 -fn_80164F00 = .text:0x80164F00; // type:function size:0x88 +getCurrentPausePopupName__15dLytPauseText_cFv = .text:0x80164310; // type:function size:0xC8 +getCurrentPausePopupCaption__15dLytPauseText_cFv = .text:0x801643E0; // type:function size:0x394 +calcTextLines__15dLytPauseText_cFP10dTextBox_cPCw = .text:0x80164780; // type:function size:0x54 +isCurrentItemWallet__15dLytPauseText_cCFv = .text:0x801647E0; // type:function size:0x50 +__dt__15dLytPauseText_cFv = .text:0x80164830; // type:function size:0x15C scope:weak +build__31sFStateFct_c<15dLytPauseText_c>FRC12sStateIDIf_c = .text:0x80164990; // type:function size:0x60 scope:weak +dispose__31sFStateFct_c<15dLytPauseText_c>FRP10sStateIf_c = .text:0x801649F0; // type:function size:0xC scope:weak +initialize__28sFState_c<15dLytPauseText_c>Fv = .text:0x80164A00; // type:function size:0x1C scope:weak +execute__28sFState_c<15dLytPauseText_c>Fv = .text:0x80164A20; // type:function size:0x1C scope:weak +finalize__28sFState_c<15dLytPauseText_c>Fv = .text:0x80164A40; // type:function size:0x1C scope:weak +initializeState__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80164A60; // type:function size:0x10 scope:weak +finalizeState__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80164A70; // type:function size:0x10 scope:weak +refreshState__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80164A80; // type:function size:0x10 scope:weak +getState__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80164A90; // type:function size:0x10 scope:weak +getNewStateID__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80164AA0; // type:function size:0x10 scope:weak +getStateID__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80164AB0; // type:function size:0x10 scope:weak +getOldStateID__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80164AC0; // type:function size:0x10 scope:weak +finalizeState__30sFStateID_c<15dLytPauseText_c>CFR15dLytPauseText_c = .text:0x80164AD0; // type:function size:0x30 scope:weak +executeState__30sFStateID_c<15dLytPauseText_c>CFR15dLytPauseText_c = .text:0x80164B00; // type:function size:0x30 scope:weak +initializeState__30sFStateID_c<15dLytPauseText_c>CFR15dLytPauseText_c = .text:0x80164B30; // type:function size:0x30 scope:weak +__sinit_\d_lyt_pause_text_cpp = .text:0x80164B60; // type:function size:0x338 scope:local +__dt__30sFStateID_c<15dLytPauseText_c>Fv = .text:0x80164EA0; // type:function size:0x58 scope:weak +isSameName__30sFStateID_c<15dLytPauseText_c>CFPCc = .text:0x80164F00; // type:function size:0x88 scope:weak __ct__19dLytSaveMsgWindow_cFv = .text:0x80164F90; // type:function size:0x204 __ct__29dLytMsgWindowSelectBtnParts_cFv = .text:0x801651A0; // type:function size:0x8C scope:weak build__19dLytSaveMsgWindow_cFb = .text:0x80165230; // type:function size:0x168 @@ -9167,12 +9167,12 @@ fn_80167820 = .text:0x80167820; // type:function size:0x34 getLytIndexForDowsingIndex__Fl = .text:0x80167860; // type:function size:0x5C getItemLabel__FlR15SizedString<32> = .text:0x801678C0; // type:function size:0x2C fn_801678F0 = .text:0x801678F0; // type:function size:0x2C -fn_80167920 = .text:0x80167920; // type:function size:0x24 -fn_80167950 = .text:0x80167950; // type:function size:0x2C -fn_80167980 = .text:0x80167980; // type:function size:0x54 -fn_801679E0 = .text:0x801679E0; // type:function size:0x54 -fn_80167A40 = .text:0x80167A40; // type:function size:0x40 -fn_80167A80 = .text:0x80167A80; // type:function size:0x5C +getDowsingLabel__FlR15SizedString<32> = .text:0x80167920; // type:function size:0x24 +getPauseCategoryLabel__FlR15SizedString<32> = .text:0x80167950; // type:function size:0x2C +getItemText__Fl = .text:0x80167980; // type:function size:0x54 +getCaptionItemText__Fl = .text:0x801679E0; // type:function size:0x54 +getDowsingText__Fl = .text:0x80167A40; // type:function size:0x40 +getPauseCategoryText__Fl = .text:0x80167A80; // type:function size:0x5C getCurrentWalletType = .text:0x80167AE0; // type:function size:0x88 getCurrentWalletItemId = .text:0x80167B70; // type:function size:0x30 fn_80167BA0 = .text:0x80167BA0; // type:function size:0x8 @@ -13588,7 +13588,7 @@ getAdditionalPouchSlotCounter = .text:0x80252330; // type:function size:0x8 addToAdditionalAdventurePouchCounter = .text:0x80252340; // type:function size:0xC AcItem__getNumOfRemainingHeartPiecesForHeart = .text:0x80252350; // type:function size:0x8 addToHeartPieceCounter = .text:0x80252360; // type:function size:0xC -getHeartContainerHealthCount = .text:0x80252370; // type:function size:0x8 +getHeartContainerHealthCount__9dAcItem_cFv = .text:0x80252370; // type:function size:0x8 addToHeartPieceCounter2 = .text:0x80252380; // type:function size:0xC getFaronGrasshopperCount = .text:0x80252390; // type:function size:0x8 increaseFaronGrasshopperCounter = .text:0x802523A0; // type:function size:0xC @@ -28353,7 +28353,7 @@ lbl_804E8AE0 = .rodata:0x804E8AE0; // type:object size:0x20 lbl_804E8B00 = .rodata:0x804E8B00; // type:object size:0x10 lbl_804E8B10 = .rodata:0x804E8B10; // type:object size:0x20 brlanMap = .rodata:0x804E8B30; // type:object size:0x18 scope:local data:4byte -lbl_804E8B48 = .rodata:0x804E8B48; // type:object size:0x18 data:4byte +brlanMap = .rodata:0x804E8B48; // type:object size:0x18 scope:local data:4byte brlanMap = .rodata:0x804E8B60; // type:object size:0x48 scope:local data:4byte @LOCAL@updateSaveText__19dLytSaveMsgWindow_cFv@sInts = .rodata:0x804E8BA8; // type:object size:0x10 scope:local lbl_804E8BB8 = .rodata:0x804E8BB8; // type:object size:0x60 data:byte @@ -34576,21 +34576,60 @@ __vt__28sFState_c<15dLytPauseInfo_c> = .data:0x80526710; // type:object size:0x1 @18526 = .data:0x8052680C; // type:object size:0x1E scope:local data:string @18527 = .data:0x8052682C; // type:object size:0x1D scope:local data:string __vt__30sFStateID_c<15dLytPauseInfo_c> = .data:0x8052684C; // type:object size:0x34 scope:weak -lbl_80526880 = .data:0x80526880; // type:object size:0x18 -lbl_80526898 = .data:0x80526898; // type:object size:0xC -lbl_805268A4 = .data:0x805268A4; // type:object size:0x18 -lbl_805268BC = .data:0x805268BC; // type:object size:0xC -lbl_805268C8 = .data:0x805268C8; // type:object size:0x18 -lbl_805268E0 = .data:0x805268E0; // type:object size:0x68 -lbl_80526948 = .data:0x80526948; // type:object size:0x10 -lbl_80526958 = .data:0x80526958; // type:object size:0x10 -lbl_80526968 = .data:0x80526968; // type:object size:0x148 -lbl_80526AB0 = .data:0x80526AB0; // type:object size:0x10 -lbl_80526AC0 = .data:0x80526AC0; // type:object size:0x30 -lbl_80526AF0 = .data:0x80526AF0; // type:object size:0x30 -lbl_80526B20 = .data:0x80526B20; // type:object size:0x18 -lbl_80526B38 = .data:0x80526B38; // type:object size:0x1A0 -lbl_80526CD8 = .data:0x80526CD8; // type:object size:0x38 +@22271 = .data:0x80526880; // type:object size:0x15 scope:local data:string +...data.0 = .data:0x80526880; // type:label scope:local +@22272 = .data:0x80526898; // type:object size:0xB scope:local data:string +@22273 = .data:0x805268A4; // type:object size:0x17 scope:local data:string +@22274 = .data:0x805268BC; // type:object size:0xA scope:local data:string +@22275 = .data:0x805268C8; // type:object size:0x16 scope:local data:string +@22276 = .data:0x805268E0; // type:object size:0x9 scope:local data:string +@23697 = .data:0x805268EC; // type:object size:0x12 scope:local data:string +@23698 = .data:0x80526900; // type:object size:0x9 scope:local data:string +@23700 = .data:0x8052690C; // type:object size:0xA scope:local data:string +@23844 = .data:0x80526918; // type:object size:0xB scope:local data:string +@23845 = .data:0x80526924; // type:object size:0xA scope:local data:string +@23846 = .data:0x80526930; // type:object size:0xB scope:local data:string +@23847 = .data:0x8052693C; // type:object size:0xA scope:local +@23898 = .data:0x80526948; // type:object size:0xF scope:local data:string +@23899 = .data:0x80526958; // type:object size:0xE scope:local data:string +@23932 = .data:0x80526968; // type:object size:0xE scope:local data:string +@23992 = .data:0x80526978; // type:object size:0x14 scope:local data:string +@23993 = .data:0x8052698C; // type:object size:0x17 scope:local data:string +@23994 = .data:0x805269A4; // type:object size:0x14 scope:local data:string +@23995 = .data:0x805269B8; // type:object size:0x17 scope:local data:string +@23996 = .data:0x805269D0; // type:object size:0x14 scope:local data:string +@23997 = .data:0x805269E4; // type:object size:0x15 scope:local data:string +@23998 = .data:0x805269FC; // type:object size:0x11 scope:local data:string +@23999 = .data:0x80526A10; // type:object size:0x14 scope:local data:string +@24000 = .data:0x80526A24; // type:object size:0x14 scope:local data:string +@24001 = .data:0x80526A38; // type:object size:0x14 scope:local data:string +@24002 = .data:0x80526A4C; // type:object size:0x12 scope:local data:string +@24003 = .data:0x80526A60; // type:object size:0x14 scope:local data:string +@24004 = .data:0x80526A74; // type:object size:0x14 scope:local data:string +@24005 = .data:0x80526A88; // type:object size:0x14 scope:local data:string +@24006 = .data:0x80526A9C; // type:object size:0x14 scope:local data:string +__vt__15dLytPauseText_c = .data:0x80526AB0; // type:object size:0xC scope:weak +__vt__54sFStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c> = .data:0x80526AC0; // type:object size:0x30 scope:weak +__vt__84sStateMgr_c<15dLytPauseText_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x80526AF0; // type:object size:0x30 scope:weak +__vt__31sFStateFct_c<15dLytPauseText_c> = .data:0x80526B20; // type:object size:0x14 scope:weak +__vt__28sFState_c<15dLytPauseText_c> = .data:0x80526B38; // type:object size:0x18 scope:weak +@24115 = .data:0x80526BCC; // type:object size:0xC scope:local +@24116 = .data:0x80526BD8; // type:object size:0xC scope:local +@24117 = .data:0x80526BE4; // type:object size:0xC scope:local +@24118 = .data:0x80526BF0; // type:object size:0xC scope:local +@24119 = .data:0x80526BFC; // type:object size:0xC scope:local +@24120 = .data:0x80526C08; // type:object size:0xC scope:local +@24121 = .data:0x80526C14; // type:object size:0xC scope:local +@24122 = .data:0x80526C20; // type:object size:0xC scope:local +@24123 = .data:0x80526C2C; // type:object size:0xC scope:local +@24124 = .data:0x80526C38; // type:object size:0xC scope:local +@24125 = .data:0x80526C44; // type:object size:0xC scope:local +@24126 = .data:0x80526C50; // type:object size:0xC scope:local +@24128 = .data:0x80526C5C; // type:object size:0x1E scope:local data:string +@24129 = .data:0x80526C7C; // type:object size:0x1C scope:local data:string +@24130 = .data:0x80526C98; // type:object size:0x1E scope:local data:string +@24131 = .data:0x80526CB8; // type:object size:0x1D scope:local data:string +__vt__30sFStateID_c<15dLytPauseText_c> = .data:0x80526CD8; // type:object size:0x34 scope:weak @8387 = .data:0x80526D10; // type:object size:0x11 scope:local data:string ...data.0 = .data:0x80526D10; // type:label scope:local @8388 = .data:0x80526D24; // type:object size:0xB scope:local data:string @@ -39916,8 +39955,8 @@ lbl_805729A0 = .sdata:0x805729A0; // type:object size:0x8 data:4byte lbl_805729A8 = .sdata:0x805729A8; // type:object size:0x8 data:wstring lbl_805729B0 = .sdata:0x805729B0; // type:object size:0x4 data:4byte lbl_805729B4 = .sdata:0x805729B4; // type:object size:0xC -lbl_805729C0 = .sdata:0x805729C0; // type:object size:0x4 data:4byte -lbl_805729C4 = .sdata:0x805729C4; // type:object size:0x4 +sGroupName = .sdata:0x805729C0; // type:object size:0x4 scope:local data:4byte +@23699 = .sdata:0x805729C4; // type:object size:0x1 scope:local sGroupName = .sdata:0x805729C8; // type:object size:0x4 scope:local data:4byte @10137 = .sdata:0x805729CC; // type:object size:0x1 scope:local @8185 = .sdata:0x805729D0; // type:object size:0x1 scope:local @@ -45176,8 +45215,8 @@ lbl_8057A0E8 = .sdata2:0x8057A0E8; // type:object size:0x4 align:4 data:float lbl_8057A0F0 = .sdata2:0x8057A0F0; // type:object size:0x8 @18239 = .sdata2:0x8057A0F8; // type:object size:0x4 scope:local align:4 data:float @18240 = .sdata2:0x8057A0FC; // type:object size:0x4 scope:local align:4 data:float -lbl_8057A100 = .sdata2:0x8057A100; // type:object size:0x4 align:4 data:float -lbl_8057A104 = .sdata2:0x8057A104; // type:object size:0x4 align:4 data:float +@23584 = .sdata2:0x8057A100; // type:object size:0x4 scope:local align:4 data:float +@23585 = .sdata2:0x8057A104; // type:object size:0x4 scope:local align:4 data:float @9991 = .sdata2:0x8057A108; // type:object size:0x4 scope:local align:4 data:float @9992 = .sdata2:0x8057A10C; // type:object size:0x4 scope:local align:4 data:float @10252 = .sdata2:0x8057A110; // type:object size:0x8 scope:local align:8 data:double @@ -51470,11 +51509,15 @@ StateID_In__15dLytPauseInfo_c = .bss:0x805B1A00; // type:object size:0x30 data:4 StateID_Wait__15dLytPauseInfo_c = .bss:0x805B1A40; // type:object size:0x30 data:4byte @17533 = .bss:0x805B1A70; // type:object size:0xC scope:local StateID_Out__15dLytPauseInfo_c = .bss:0x805B1A80; // type:object size:0x30 data:4byte -lbl_805B1AB0 = .bss:0x805B1AB0; // type:object size:0x10 -LytPauseText__STATE_NONE = .bss:0x805B1AC0; // type:object size:0x40 data:4byte -LytPauseText__STATE_IN = .bss:0x805B1B00; // type:object size:0x40 data:4byte -LytPauseText__STATE_WAIT = .bss:0x805B1B40; // type:object size:0x40 data:4byte -LytPauseText__STATE_OUT = .bss:0x805B1B80; // type:object size:0x30 data:4byte +@22258 = .bss:0x805B1AB0; // type:object size:0xC scope:local +...bss.0 = .bss:0x805B1AB0; // type:label scope:local +StateID_None__15dLytPauseText_c = .bss:0x805B1AC0; // type:object size:0x30 data:4byte +@22262 = .bss:0x805B1AF0; // type:object size:0xC scope:local +StateID_In__15dLytPauseText_c = .bss:0x805B1B00; // type:object size:0x30 data:4byte +@22266 = .bss:0x805B1B30; // type:object size:0xC scope:local +StateID_Wait__15dLytPauseText_c = .bss:0x805B1B40; // type:object size:0x30 data:4byte +@22270 = .bss:0x805B1B70; // type:object size:0xC scope:local +StateID_Out__15dLytPauseText_c = .bss:0x805B1B80; // type:object size:0x30 data:4byte @8339 = .bss:0x805B1BB0; // type:object size:0xC scope:local ...bss.0 = .bss:0x805B1BB0; // type:label scope:local StateID_Init__19dLytSaveMsgWindow_c = .bss:0x805B1BC0; // type:object size:0x30 data:4byte diff --git a/configure.py b/configure.py index cc098464..9a526a07 100644 --- a/configure.py +++ b/configure.py @@ -549,7 +549,7 @@ config.libs = [ Object(NonMatching, "d/lyt/d_lyt_pause_disp_00.cpp"), Object(NonMatching, "d/lyt/d_lyt_pause_disp_01.cpp"), Object(Matching, "d/lyt/d_lyt_pause_info.cpp"), - Object(NonMatching, "d/lyt/d_lyt_pause_text.cpp"), + Object(Matching, "d/lyt/d_lyt_pause_text.cpp"), Object(Matching, "d/lyt/d_lyt_save_msg_window.cpp"), Object(NonMatching, "d/lyt/d_lyt_util_items.cpp"), Object(Matching, "d/lyt/d_lyt_common_arrow.cpp"), diff --git a/include/d/a/d_a_item.h b/include/d/a/d_a_item.h index 25bdf8f5..3341db31 100644 --- a/include/d/a/d_a_item.h +++ b/include/d/a/d_a_item.h @@ -69,6 +69,8 @@ public: static s32 getRupeeCounter(); static u32 getCurrentWalletCapacity(); + static u32 getHeartContainerHealthCount(); + static u32 getKeyPieceCount(); static u32 getSmallKeyCount(); diff --git a/include/d/lyt/d_lyt_common_title.h b/include/d/lyt/d_lyt_common_title.h index 3e7c5105..9d74f6bf 100644 --- a/include/d/lyt/d_lyt_common_title.h +++ b/include/d/lyt/d_lyt_common_title.h @@ -6,6 +6,11 @@ #include "s/s_State.hpp" #include "sized_string.h" +/** + * 2D UI - Common - Title + * + * Used on title screen and pause menu. + */ class dLytCommonTitle_c { public: dLytCommonTitle_c(); diff --git a/include/d/lyt/d_lyt_pause.h b/include/d/lyt/d_lyt_pause.h index 7e248b41..5aeda5ab 100644 --- a/include/d/lyt/d_lyt_pause.h +++ b/include/d/lyt/d_lyt_pause.h @@ -22,18 +22,49 @@ public: return field_0x083B; } + bool getField_0x0841() const { + return field_0x0841; + } + + enum SelectionType_e { + SELECT_DOWSING = 2, + SELECT_ITEM = 6, + SELECT_CATEGORY = 7, + SELECT_FIRE = 8, + SELECT_RING = 9, + }; + + SelectionType_e getCurrentSelectionType() const { + return mCurrentSelectionType; + } + + s32 getCurrentSelectionId() const { + return mCurrentSelectionId; + } + private: static dLytPauseMgr_c *sInstance; /* 0x0000 */ u8 _0x0000[0x00C8 - 0x0000]; + /* 0x00C8 */ d2d::ResAccIf_c mResAcc1; + /* 0x0438 */ u8 _0x0438[0x0814 - 0x0438]; /* 0x0814 */ EGG::CpuTexture *mpBgTexture; + /* 0x0818 */ SelectionType_e mCurrentSelectionType; - /* 0x0818 */ u8 _0x0818[0x083B - 0x0818]; + /* 0x081C */ u8 _0x081C[0x082C - 0x081C]; + + /* 0x082C */ u16 mCurrentSelectionId; + + /* 0x0830 */ u8 _0x0830[0x083B - 0x082E]; /* 0x083B */ bool field_0x083B; + + /* 0x083D */ u8 _0x083D[0x0841 - 0x083C]; + + /* 0x0841 */ bool field_0x0841; }; #endif diff --git a/include/d/lyt/d_lyt_pause_back.h b/include/d/lyt/d_lyt_pause_back.h index 9085f6f0..641c7dcb 100644 --- a/include/d/lyt/d_lyt_pause_back.h +++ b/include/d/lyt/d_lyt_pause_back.h @@ -4,6 +4,7 @@ #include "d/lyt/d2d.h" #include "s/s_State.hpp" +/** 2D UI - Pause menu - Background */ class dLytPauseBack_c { public: dLytPauseBack_c(); diff --git a/include/d/lyt/d_lyt_pause_info.h b/include/d/lyt/d_lyt_pause_info.h index a07f11a8..5212768a 100644 --- a/include/d/lyt/d_lyt_pause_info.h +++ b/include/d/lyt/d_lyt_pause_info.h @@ -6,6 +6,7 @@ class dLytCommonTitle_c; +/** 2D UI - Pause menu - title and button help */ class dLytPauseInfo_c { public: dLytPauseInfo_c(); diff --git a/include/d/lyt/d_lyt_pause_text.h b/include/d/lyt/d_lyt_pause_text.h index 296f6932..a7f96bf2 100644 --- a/include/d/lyt/d_lyt_pause_text.h +++ b/include/d/lyt/d_lyt_pause_text.h @@ -1,13 +1,57 @@ #ifndef D_LYT_PAUSE_TEXT_H #define D_LYT_PAUSE_TEXT_H +#include "common.h" +#include "d/lyt/d2d.h" +#include "d/lyt/d_lyt_common_a_btn.h" +#include "s/s_State.hpp" #include "sized_string.h" +/** 2D UI - Pause menu - item info popup */ class dLytPauseText_c { public: static const char *getCurrentPauseLabel(SizedString<32> &buf); + static const wchar_t *getCurrentPausePopupName(); + static const wchar_t *getCurrentPausePopupCaption(); + + dLytPauseText_c(); + virtual ~dLytPauseText_c() {} + + bool build(); + bool remove(); + bool execute(); + bool draw(); + + void requestIn(); + void requestOut(); private: + void startAnim(int idx); + void stopAnim(int idx); + void updateText(); + + bool isCurrentItemWallet() const; + void calcTextLines(dTextBox_c *textBox, const wchar_t *text); + + STATE_FUNC_DECLARE(dLytPauseText_c, None); + STATE_FUNC_DECLARE(dLytPauseText_c, In); + STATE_FUNC_DECLARE(dLytPauseText_c, Wait); + STATE_FUNC_DECLARE(dLytPauseText_c, Out); + + /* 0x004 */ UI_STATE_MGR_DECLARE(dLytPauseText_c); + /* 0x040 */ d2d::LytBase_c mLyt; + /* 0x0D0 */ d2d::AnmGroup_c mAnm[3]; + /* 0x190 */ d2d::ResAccIf_c mResAcc; + /* 0x500 */ dLytCommonABtn_c mABtn; + /* 0x6B0 */ d2d::SubPaneList mSubpaneList; + /* 0x6BC */ d2d::SubPaneListNode mSubpanes[1]; + /* 0x6CC */ UNKWORD mStep; + /* 0x6D0 */ f32 mLineSpace; + /* 0x6D4 */ u8 mNumTextLines; + /* 0x6D5 */ bool mInRequest; + /* 0x6D6 */ bool mOutRequest; + /* 0x6D7 */ bool field_0x6D7; + /* 0x6D8 */ bool field_0x6D8; }; #endif diff --git a/include/d/lyt/d_lyt_util_items.h b/include/d/lyt/d_lyt_util_items.h index 2a2c048b..657ff83d 100644 --- a/include/d/lyt/d_lyt_util_items.h +++ b/include/d/lyt/d_lyt_util_items.h @@ -6,6 +6,14 @@ #include "toBeSorted/dowsing_target.h" void getItemLabel(s32 itemId, SizedString<32> &buf); +void getCaptionItemLabel(s32 itemId, SizedString<32> &buf); +void getDowsingLabel(s32 itemId, SizedString<32> &buf); +void getPauseCategoryLabel(s32 itemId, SizedString<32> &buf); + +const wchar_t *getItemText(s32 itemId); +const wchar_t *getCaptionItemText(s32 itemId); +const wchar_t *getDowsingText(s32 itemId); +const wchar_t *getPauseCategoryText(s32 itemId); bool isPouchBocoburinLocked(); diff --git a/src/d/lyt/d_lyt_common_title.cpp b/src/d/lyt/d_lyt_common_title.cpp index 97ca263b..dd1453c0 100644 --- a/src/d/lyt/d_lyt_common_title.cpp +++ b/src/d/lyt/d_lyt_common_title.cpp @@ -237,7 +237,7 @@ void dLytCommonTitle_c::initializeState_Wait() { } void dLytCommonTitle_c::executeState_Wait() { if (field_0x680 == 1) { - if (std::strlen(mCaption) != 0) { + if (mCaption.len() != 0) { field_0x68F = true; mAnm[COMMON_TITLE_ANIM_TEXT_OUT].setFrame(0.0f); } else { @@ -258,7 +258,7 @@ void dLytCommonTitle_c::executeState_Wait() { mStateMgr.changeState(StateID_Change); } else { mChangeRequest = false; - if (std::strlen(mCaption) != 0) { + if (mCaption.len() != 0) { applyCaption(0); } } @@ -418,7 +418,7 @@ void dLytCommonTitle_c::applyTitle(s32 arg) { switch (arg) { case 0: { - if (std::strlen(mTitle) != 0) { + if (mTitle.len() != 0) { const wchar_t *text = dMessage_c::getTextMessageByLabel(mTitle, true, nullptr, 0); mainTitle0->setTextWithGlobalTextProcessor(text); mainTitleS0->setTextWithGlobalTextProcessor(text); @@ -434,7 +434,7 @@ void dLytCommonTitle_c::applyTitle(s32 arg) { // break; } case 1: { - if (std::strlen(mTitle) != 0) { + if (mTitle.len() != 0) { const wchar_t *text = dMessage_c::getTextMessageByLabel(mTitle, true, nullptr, 0); mainTitle0->setTextWithGlobalTextProcessor(text); mainTitleS0->setTextWithGlobalTextProcessor(text); @@ -445,7 +445,7 @@ void dLytCommonTitle_c::applyTitle(s32 arg) { break; } case 2: { - if (std::strlen(mTitle) != 0) { + if (mTitle.len() != 0) { const wchar_t *text = dMessage_c::getTextMessageByLabel(mTitle, true, nullptr, 0); mainTitle1->setTextWithGlobalTextProcessor(text); mainTitleS1->setTextWithGlobalTextProcessor(text); @@ -468,7 +468,7 @@ void dLytCommonTitle_c::applyCaption(s32 arg) { switch (arg) { case 0: { - if (std::strlen(mCaption) != 0) { + if (mCaption.len() != 0) { const wchar_t *text = dMessage_c::getTextMessageByLabel(mCaption, true, nullptr, 0); mainTitle0->setTextWithGlobalTextProcessor(text); mainTitleS0->setTextWithGlobalTextProcessor(text); @@ -493,7 +493,7 @@ void dLytCommonTitle_c::applyCaption(s32 arg) { break; } case 1: { - if (std::strlen(mCaption) != 0) { + if (mCaption.len() != 0) { const wchar_t *text = dMessage_c::getTextMessageByLabel(mCaption, true, nullptr, 0); mainTitle1->setTextWithGlobalTextProcessor(text); mainTitleS1->setTextWithGlobalTextProcessor(text); diff --git a/src/d/lyt/d_lyt_pause_info.cpp b/src/d/lyt/d_lyt_pause_info.cpp index 97e294ac..4500d9fc 100644 --- a/src/d/lyt/d_lyt_pause_info.cpp +++ b/src/d/lyt/d_lyt_pause_info.cpp @@ -10,9 +10,6 @@ #include "d/lyt/d_lyt_util_items.h" #include "sized_string.h" -#include - - STATE_DEFINE(dLytPauseInfo_c, None); STATE_DEFINE(dLytPauseInfo_c, In); STATE_DEFINE(dLytPauseInfo_c, Wait); @@ -153,7 +150,7 @@ void dLytPauseInfo_c::initializeState_In() { getItemLabel(dLytControlGame_c::getInstance()->getItemForPauseDemo(), label); } - if (std::strlen(label) != 0) { + if (label.len() != 0) { const char *msgLabel = mpTitle->setSubTitle(msgIdx); mpTitle->set(dLytCommonTitle_c::SET_00, msgLabel, label); } else { diff --git a/src/d/lyt/d_lyt_pause_text.cpp b/src/d/lyt/d_lyt_pause_text.cpp new file mode 100644 index 00000000..7550e801 --- /dev/null +++ b/src/d/lyt/d_lyt_pause_text.cpp @@ -0,0 +1,454 @@ +#include "d/lyt/d_lyt_pause_text.h" + +#include "common.h" +#include "d/a/d_a_item.h" +#include "d/a/d_a_itembase.h" +#include "d/d_message.h" +#include "d/flag/itemflag_manager.h" +#include "d/flag/storyflag_manager.h" +#include "d/lyt/d2d.h" +#include "d/lyt/d_lyt_pause.h" +#include "d/lyt/d_lyt_util_items.h" +#include "d/lyt/d_textbox.h" +#include "nw4r/lyt/lyt_group.h" +#include "sized_string.h" +#include "toBeSorted/arc_managers/layout_arc_manager.h" + +STATE_DEFINE(dLytPauseText_c, None); +STATE_DEFINE(dLytPauseText_c, In); +STATE_DEFINE(dLytPauseText_c, Wait); +STATE_DEFINE(dLytPauseText_c, Out); + +static const d2d::LytBrlanMapping brlanMap[] = { + { "iconText_00_in.brlan", "G_inOut_00"}, + {"iconText_00_loop.brlan", "G_loop_00"}, + { "iconText_00_out.brlan", "G_inOut_00"}, +}; + +#define PAUSE_TEXT_ANIM_IN 0 +#define PAUSE_TEXT_ANIM_LOOP 1 +#define PAUSE_TEXT_ANIM_OUT 2 + +#define PAUSE_TEXT_NUM_ANIMS 3 + +static const char *sGroupName = "G_ref_00"; + +dLytPauseText_c::dLytPauseText_c() : mStateMgr(*this) {} + +bool dLytPauseText_c::build() { + d2d::ResAccIf_c *resAcc = dLytPauseMgr_c::GetInstance()->getResAcc1(); + mLyt.setResAcc(resAcc); + mLyt.build("iconText_00.brlyt", nullptr); + mLyt.setPriority(0x86); + + for (int i = 0; i < PAUSE_TEXT_NUM_ANIMS; i++) { + mAnm[i].init(brlanMap[i].mFile, resAcc, mLyt.getLayout(), brlanMap[i].mName); + } + + void *data = LayoutArcManager::GetInstance()->getLoadedData("System2D"); + mResAcc.attach(data, ""); + + mSubpanes[0].mpLytPane = &mABtn; + for (int i = 0; i < 1; i++) { + mSubpanes[i].mpLytPane->build(&mResAcc); + mSubpaneList.PushBack(&mSubpanes[i]); + } + + if (mLyt.getLayout()->GetGroupContainer() != nullptr) { + nw4r::lyt::Group *g = mLyt.getLayout()->GetGroupContainer()->FindGroupByName(sGroupName); + if (g != nullptr) { + d2d::dSubPane::linkMeters(g, &mSubpaneList); + } + } + + mLineSpace = mLyt.getTextBox("T_text_00")->GetLineSpace(); + mStateMgr.changeState(StateID_None); + + return true; +} + +bool dLytPauseText_c::remove() { + mLyt.unbindAnims(); + + for (d2d::SubPaneList::Iterator it = mSubpaneList.GetBeginIter(); it != mSubpaneList.GetEndIter(); ++it) { + d2d::dSubPane *subPane = it->mpLytPane; + if (subPane != nullptr) { + nw4r::lyt::Pane *parent = subPane->getPane()->GetParent(); + parent->RemoveChild(subPane->getPane()); + } + } + + for (int i = 0; i < 1; i++) { + mSubpanes[i].mpLytPane->remove(); + } + for (int i = 0; i < PAUSE_TEXT_NUM_ANIMS; i++) { + mAnm[i].remove(); + } + + mResAcc.detach(); + + return true; +} + +bool dLytPauseText_c::execute() { + mStateMgr.executeState(); + for (int i = 0; i < 1; i++) { + mSubpanes[i].mpLytPane->execute(); + } + mLyt.calc(); + return true; +} + +bool dLytPauseText_c::draw() { + if (field_0x6D8 == true) { + mLyt.addToDrawList(); + } + return true; +} + +void dLytPauseText_c::requestIn() { + mInRequest = true; +} + +void dLytPauseText_c::requestOut() { + mOutRequest = true; +} + +void dLytPauseText_c::initializeState_None() { + mLyt.unbindAnims(); + field_0x6D7 = false; + mInRequest = false; + mOutRequest = false; + field_0x6D8 = false; + mStep = 0; + mABtn.resetToInvisble(); + updateText(); +} +void dLytPauseText_c::executeState_None() { + if (mInRequest == true) { + mInRequest = false; + mStateMgr.changeState(StateID_In); + } +} +void dLytPauseText_c::finalizeState_None() {} + +void dLytPauseText_c::initializeState_In() { + updateText(); + startAnim(PAUSE_TEXT_ANIM_IN); + startAnim(PAUSE_TEXT_ANIM_LOOP); + mABtn.requestIn(); + field_0x6D8 = true; +} +void dLytPauseText_c::executeState_In() { + d2d::AnmGroup_c &anm = mAnm[PAUSE_TEXT_ANIM_IN]; + if (anm.isEndReached() == true) { + mStateMgr.changeState(StateID_Wait); + mAnm[PAUSE_TEXT_ANIM_LOOP].play(); + } else { + anm.play(); + mAnm[PAUSE_TEXT_ANIM_LOOP].play(); + } +} +void dLytPauseText_c::finalizeState_In() {} + +void dLytPauseText_c::initializeState_Wait() { + field_0x6D7 = true; +} +void dLytPauseText_c::executeState_Wait() { + mAnm[PAUSE_TEXT_ANIM_LOOP].play(); + field_0x6D7 = false; + if (mOutRequest == true && mABtn.requestOut(false)) { + mOutRequest = false; + mStateMgr.changeState(StateID_Out); + } +} +void dLytPauseText_c::finalizeState_Wait() {} + +void dLytPauseText_c::initializeState_Out() { + stopAnim(PAUSE_TEXT_ANIM_IN); + startAnim(PAUSE_TEXT_ANIM_OUT); + mStep = 0; +} +void dLytPauseText_c::executeState_Out() { + d2d::AnmGroup_c &anm = mAnm[PAUSE_TEXT_ANIM_OUT]; + switch (mStep) { + case 0: { + if (mABtn.isDoneOut()) { + mStep = 1; + } + return; + } + case 1: { + if (anm.isEndReached() == true) { + mStep = 2; + field_0x6D7 = true; + } + break; + } + case 2: { + mStateMgr.changeState(StateID_None); + return; + } + } + anm.play(); + mAnm[PAUSE_TEXT_ANIM_LOOP].play(); +} +void dLytPauseText_c::finalizeState_Out() {} + +void dLytPauseText_c::startAnim(int idx) { + d2d::AnmGroup_c &anm = mAnm[idx]; + anm.bind(false); + anm.setFrame(0.0f); +} + +void dLytPauseText_c::stopAnim(int idx) { + d2d::AnmGroup_c &anm = mAnm[idx]; + anm.unbind(); +} + +void dLytPauseText_c::updateText() { +// "planned implementation" +#define TODO_TEXT (L"実装予定") + dTextBox_c *text0 = mLyt.getTextBox("T_text_00"); + dTextBox_c *text0S = mLyt.getTextBox("T_textS_00"); + dTextBox_c *name0 = mLyt.getTextBox("T_name_00"); + dTextBox_c *name0S = mLyt.getTextBox("T_nameS_00"); + + const wchar_t *text = getCurrentPausePopupName(); + if (text != nullptr) { + name0->setTextWithGlobalTextProcessor(text); + name0S->setTextWithGlobalTextProcessor(text); + } else { + name0->setTextWithGlobalTextProcessor(TODO_TEXT); + name0S->setTextWithGlobalTextProcessor(TODO_TEXT); + } + + if (isCurrentItemWallet() && dMessage_c::getGlobalTagProcessor() != nullptr) { + dMessage_c::getGlobalTagProcessor()->setNumericArg0(dAcItem_c::getCurrentWalletCapacity()); + } + + text = getCurrentPausePopupCaption(); + calcTextLines(text0, text); + if (text != nullptr) { + if (mNumTextLines == 1) { + text0->SetLineSpace(0.0f); + text0S->SetLineSpace(0.0f); + } else { + text0->SetLineSpace(mLineSpace); + text0S->SetLineSpace(mLineSpace); + } + text0->setTextWithGlobalTextProcessor(text); + text0S->setTextWithGlobalTextProcessor(text); + } else { + text0->setTextWithGlobalTextProcessor(TODO_TEXT); + text0S->setTextWithGlobalTextProcessor(TODO_TEXT); + } + +#undef TODO_TEXT +} + +const char *dLytPauseText_c::getCurrentPauseLabel(SizedString<32> &buf) { + // This is for the title - it's used by a different component (dLytPauseInfo_c) + const char *result = nullptr; + dLytPauseMgr_c::SelectionType_e selectionType = dLytPauseMgr_c::GetInstance()->getCurrentSelectionType(); + s32 id = dLytPauseMgr_c::GetInstance()->getCurrentSelectionId(); + + switch (selectionType) { + case dLytPauseMgr_c::SELECT_DOWSING: { + getDowsingLabel(id, buf); + if (buf.len() != 0) { + result = buf; + } + break; + } + case dLytPauseMgr_c::SELECT_CATEGORY: { + getPauseCategoryLabel(id, buf); + if (buf.len() != 0) { + result = buf; + } + break; + } + case dLytPauseMgr_c::SELECT_ITEM: { + switch (id) { + case ITEM_TRI_COURAGE: + case ITEM_TRI_POWER: + case ITEM_TRI_WISDOM: id = ITEM_COMPLETE_TRIFORCE; break; + } + getItemLabel(id, buf); + if (buf.len() != 0) { + result = buf; + } + break; + } + case dLytPauseMgr_c::SELECT_FIRE: { + buf.empty(); + buf.sprintf("NAME_FIRE_%03d", id); + result = buf; + break; + } + case dLytPauseMgr_c::SELECT_RING: { + buf.empty(); + buf.sprintf("SUB_RING_%02d", id); + result = buf; + break; + } + default: + getItemLabel(id, buf); + if (buf.len() != 0) { + result = buf; + } + break; + } + + return result; +} + +const wchar_t *dLytPauseText_c::getCurrentPausePopupName() { + dLytPauseMgr_c::SelectionType_e selectionType = dLytPauseMgr_c::GetInstance()->getCurrentSelectionType(); + s32 id = dLytPauseMgr_c::GetInstance()->getCurrentSelectionId(); + + switch (selectionType) { + case dLytPauseMgr_c::SELECT_DOWSING: return getDowsingText(id); + case dLytPauseMgr_c::SELECT_ITEM: + switch (id) { + case ITEM_TRI_COURAGE: + case ITEM_TRI_POWER: + case ITEM_TRI_WISDOM: return dMessage_c::getTextMessageByLabel("NAME_ITEM_005", true, nullptr, 0); + default: return getItemText(id); + } + case dLytPauseMgr_c::SELECT_CATEGORY: return getPauseCategoryText(id); + case dLytPauseMgr_c::SELECT_FIRE: { + SizedString<32> buf; + buf.sprintf("NAME_FIRE_%03d", id); + return dMessage_c::getTextMessageByLabel(buf, true, nullptr, 0); + } + default: return getItemText(id); + } +} + +const wchar_t *dLytPauseText_c::getCurrentPausePopupCaption() { + // TODO - bunch of unresolved IDs here + dLytPauseMgr_c::SelectionType_e selectionType = dLytPauseMgr_c::GetInstance()->getCurrentSelectionType(); + + if (dLytPauseMgr_c::GetInstance()->getField_0x0841()) { + // "It has been stolen by monsters! You've got to get it back." + return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_STOLEN", true, nullptr, 0); + } + + s32 id = dLytPauseMgr_c::GetInstance()->getCurrentSelectionId(); + + switch (selectionType) { + case dLytPauseMgr_c::SELECT_DOWSING: { + if (id == 12) { + if (ItemflagManager::sInstance->getFlagDirect(502) == 80) { + // "You've collected all the Gratitude Crystals. There are none left for your sword to react to." + return dMessage_c::getTextMessageByLabel("CAPTION_DOWSING_012_02", true, nullptr, 0); + } else { + // "Use your dowsing ability to detect the Gratitude Crystals that the demon Batreaux wants to see." + return dMessage_c::getTextMessageByLabel("CAPTION_DOWSING_012", true, nullptr, 0); + } + } else if (id == 14) { + if (StoryflagManager::sInstance->getCounterOrFlag(1087) == 27) { + // "You've activated all of the Goddess Cubes. There are none left for your sword to react to." + return dMessage_c::getTextMessageByLabel("CAPTION_DOWSING_014_02", true, nullptr, 0); + } else { + // "Use your dowsing ability to detect Goddess Cubes and their corresponding treasure chests in the + // sky above." + return dMessage_c::getTextMessageByLabel("CAPTION_DOWSING_014", true, nullptr, 0); + } + } else { + SizedString<32> buf; + buf.sprintf("CAPTION_DOWSING_%03d", id); + return dMessage_c::getTextMessageByLabel(buf, true, nullptr, 0); + } + } + case dLytPauseMgr_c::SELECT_ITEM: { + if (id == ITEM_TRI_COURAGE || id == ITEM_TRI_POWER || id == ITEM_TRI_WISDOM) { + if (id == ITEM_TRI_COURAGE) { + return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_005", true, nullptr, 0); + } else if (id == ITEM_TRI_POWER) { + return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_005_02", true, nullptr, 0); + } else { + return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_005_03", true, nullptr, 0); + } + } else if (id == ITEM_HEART_PIECE) { + if (dAcItem_c::getHeartContainerHealthCount() == 24) { + // "You've collected all the Pieces of Heart." + return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_094_02", true, nullptr, 0); + } else { + return getCaptionItemText(id); + } + } else { + return getCaptionItemText(id); + } + } + case dLytPauseMgr_c::SELECT_FIRE: { + SizedString<32> buf; + buf.sprintf("CAPTION_FIRE_%03d", id); + return dMessage_c::getTextMessageByLabel(buf, true, nullptr, 0); + } + default: { + if (id == ITEM_CAWLIN_LETTER) { + if (StoryflagManager::sInstance->getFlag(552) || StoryflagManager::sInstance->getFlag(555)) { + // "A heartfelt letter from Cawlin that you were able to somewhat successfully deliver..." + return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_158_02", true, nullptr, 0); + } else { + return getCaptionItemText(id); + } + } else if (id == ITEM_BEEDLE_INSECT_CAGE) { + if (StoryflagManager::sInstance->getFlag(477)) { + // "Formerly contained Beedle's beloved insect. You successfully returned it to its owner." + return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_159_02", true, nullptr, 0); + } else { + return getCaptionItemText(id); + } + } else if (id == ITEM_RATTLE) { + if (StoryflagManager::sInstance->getFlag(387)) { + // "This toy belongs to the baby of Bertie, who runs the Potion Shop. You've successfully returned it to its owner." + return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_160_02", true, nullptr, 0); + } else { + return getCaptionItemText(id); + } + } else if (id == ITEM_1_CRYSTAL) { + if (StoryflagManager::sInstance->getFlag(360)) { + // "Crystallized gratitude from the people of the land. This power of thankfulness turned Batreaux into a human." + return dMessage_c::getTextMessageByLabel("CAPTION_ITEM_048_02", true, nullptr, 0); + } else { + return getCaptionItemText(id); + } + } else { + return getCaptionItemText(id); + } + } + } +} + +void dLytPauseText_c::calcTextLines(dTextBox_c *textBox, const wchar_t *text) { + if (text != nullptr) { + mNumTextLines = textBox->calcTextLines(text, dMessage_c::getGlobalTagProcessor()); + } else { + mNumTextLines = 2; + } +} + +bool dLytPauseText_c::isCurrentItemWallet() const { + dLytPauseMgr_c::SelectionType_e selectionType = dLytPauseMgr_c::GetInstance()->getCurrentSelectionType(); + if (dLytPauseMgr_c::GetInstance()->getField_0x0841()) { + return false; + } + + s32 id = dLytPauseMgr_c::GetInstance()->getCurrentSelectionId(); + + if (selectionType != dLytPauseMgr_c::SELECT_ITEM) { + return false; + } + + switch (id) { + case ITEM_UNK_107: + case ITEM_MEDIUM_WALLET: + case ITEM_BIG_WALLET: + case ITEM_GIANT_WALLET: + case ITEM_TYCOON_WALLET: return true; + default: return false; + } +}