summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrobojumper <robojumper@gmail.com>2025-08-03 15:51:20 +0200
committerrobojumper <robojumper@gmail.com>2025-09-13 10:13:11 +0200
commit402586bf5248a703934bd3cbcdc37c5285ec2fe3 (patch)
tree30ed6a0873c359204d32c15348b7ccad18700126
parentb4200519b168b970b3afdccf357d1ef42001b52a (diff)
d_lyt_common_title OK
-rw-r--r--config/SOUE01/symbols.txt224
-rw-r--r--configure.py2
-rw-r--r--include/d/lyt/d_lyt_common_title.h63
-rw-r--r--include/d/lyt/d_lyt_control_game.h7
-rw-r--r--include/sized_string.h4
-rw-r--r--src/REL/d/d_s_boot.cpp6
-rw-r--r--src/d/lyt/d_lyt_common_title.cpp525
7 files changed, 732 insertions, 99 deletions
diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt
index 125ddcb9..ed6077a8 100644
--- a/config/SOUE01/symbols.txt
+++ b/config/SOUE01/symbols.txt
@@ -8957,11 +8957,11 @@ fn_80162230 = .text:0x80162230; // type:function size:0x58
fn_80162290 = .text:0x80162290; // type:function size:0xEC
fn_80162380 = .text:0x80162380; // type:function size:0x10
fn_80162390 = .text:0x80162390; // type:function size:0x98
-fn_80162430 = .text:0x80162430; // type:function size:0x104
-fn_80162540 = .text:0x80162540; // type:function size:0xA4
-fn_801625F0 = .text:0x801625F0; // type:function size:0xA0
-fn_80162690 = .text:0x80162690; // type:function size:0x6C
-fn_80162700 = .text:0x80162700; // type:function size:0x58
+__dt__17dLytCommonTitle_cFv = .text:0x80162430; // type:function size:0x104
+__dt__56sFStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c>Fv = .text:0x80162540; // type:function size:0xA4
+__dt__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x801625F0; // type:function size:0xA0
+__dt__33sFStateFct_c<17dLytCommonTitle_c>Fv = .text:0x80162690; // type:function size:0x6C
+__dt__30sFState_c<17dLytCommonTitle_c>Fv = .text:0x80162700; // type:function size:0x58
fn_80162760 = .text:0x80162760; // type:function size:0xC4
fn_80162830 = .text:0x80162830; // type:function size:0x10
fn_80162840 = .text:0x80162840; // type:function size:0x10
@@ -9249,58 +9249,58 @@ initializeState__32sFStateID_c<17dLytCommonArrow_c>CFR17dLytCommonArrow_c = .tex
__sinit_\d_lyt_common_arrow_cpp = .text:0x801691C0; // type:function size:0x338 scope:local
__dt__32sFStateID_c<17dLytCommonArrow_c>Fv = .text:0x80169500; // type:function size:0x58 scope:weak
isSameName__32sFStateID_c<17dLytCommonArrow_c>CFPCc = .text:0x80169560; // type:function size:0x88 scope:weak
-fn_801695F0 = .text:0x801695F0; // type:function size:0x110
-fn_80169700 = .text:0x80169700; // type:function size:0xF4
-fn_80169800 = .text:0x80169800; // type:function size:0x10
-fn_80169810 = .text:0x80169810; // type:function size:0x6C
-fn_80169880 = .text:0x80169880; // type:function size:0xC4
-fn_80169950 = .text:0x80169950; // type:function size:0x10
-fn_80169960 = .text:0x80169960; // type:function size:0x10
-fn_80169970 = .text:0x80169970; // type:function size:0x34
-fn_801699B0 = .text:0x801699B0; // type:function size:0x1B4
-fn_80169B70 = .text:0x80169B70; // type:function size:0x60
-fn_80169BD0 = .text:0x80169BD0; // type:function size:0x60
-fn_80169C30 = .text:0x80169C30; // type:function size:0x60
-fn_80169C90 = .text:0x80169C90; // type:function size:0x18
-LytCommonTitle__stateNoneEnter = .text:0x80169CB0; // type:function size:0xA8
-LytCommonTitle__stateNoneUpdate = .text:0x80169D60; // type:function size:0x28
-LytCommonTitle__stateNoneLeave = .text:0x80169D90; // type:function size:0x44
-LytCommonTitle__stateInEnter = .text:0x80169DE0; // type:function size:0xD8
-LytCommonTitle__stateInUpdate = .text:0x80169EC0; // type:function size:0x128
-LytCommonTitle__stateInLeave = .text:0x80169FF0; // type:function size:0x64
-LytCommonTitle__stateWaitEnter = .text:0x8016A060; // type:function size:0x10
-LytCommonTitle__stateWaitUpdate = .text:0x8016A070; // type:function size:0x170
-LytCommonTitle__stateWaitLeave = .text:0x8016A1E0; // type:function size:0xC
-LytCommonTitle__stateOutEnter = .text:0x8016A1F0; // type:function size:0x10
-LytCommonTitle__stateOutUpdate = .text:0x8016A200; // type:function size:0xA8
-LytCommonTitle__stateOutLeave = .text:0x8016A2B0; // type:function size:0x4
-LytCommonTitle__stateChangeEnter = .text:0x8016A2C0; // type:function size:0x74
-LytCommonTitle__stateChangeUpdate = .text:0x8016A340; // type:function size:0x1D8
-LytCommonTitle__stateChangeLeave = .text:0x8016A520; // type:function size:0x48
-fn_8016A570 = .text:0x8016A570; // type:function size:0x50
-fn_8016A5C0 = .text:0x8016A5C0; // type:function size:0x10
-fn_8016A5D0 = .text:0x8016A5D0; // type:function size:0x64
-fn_8016A640 = .text:0x8016A640; // type:function size:0x54
-fn_8016A6A0 = .text:0x8016A6A0; // type:function size:0x98
-fn_8016A740 = .text:0x8016A740; // type:function size:0x1E0
-fn_8016A920 = .text:0x8016A920; // type:function size:0x2D4
-fn_8016AC00 = .text:0x8016AC00; // type:function size:0x60
-fn_8016AC60 = .text:0x8016AC60; // type:function size:0xC
-fn_8016AC70 = .text:0x8016AC70; // type:function size:0x1C
-fn_8016AC90 = .text:0x8016AC90; // type:function size:0x1C
-fn_8016ACB0 = .text:0x8016ACB0; // type:function size:0x1C
-fn_8016ACD0 = .text:0x8016ACD0; // type:function size:0x10
-fn_8016ACE0 = .text:0x8016ACE0; // type:function size:0x10
-fn_8016ACF0 = .text:0x8016ACF0; // type:function size:0x10
-fn_8016AD00 = .text:0x8016AD00; // type:function size:0x10
-fn_8016AD10 = .text:0x8016AD10; // type:function size:0x10
-fn_8016AD20 = .text:0x8016AD20; // type:function size:0x10
-fn_8016AD30 = .text:0x8016AD30; // type:function size:0x30
-fn_8016AD60 = .text:0x8016AD60; // type:function size:0x30
-fn_8016AD90 = .text:0x8016AD90; // type:function size:0x30
-LytCommonTitle__initStates = .text:0x8016ADC0; // type:function size:0x3F4
-LytCommonTitle__state_dtor = .text:0x8016B1C0; // type:function size:0x58
-fn_8016B220 = .text:0x8016B220; // type:function size:0x88
+__ct__17dLytCommonTitle_cFv = .text:0x801695F0; // type:function size:0x110
+build__17dLytCommonTitle_cFv = .text:0x80169700; // type:function size:0xF4
+changeState__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x80169800; // type:function size:0x10 scope:weak
+remove__17dLytCommonTitle_cFv = .text:0x80169810; // type:function size:0x6C
+execute__17dLytCommonTitle_cFv = .text:0x80169880; // type:function size:0xC4
+executeState__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80169950; // type:function size:0x10 scope:weak
+getStateID__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x80169960; // type:function size:0x10 scope:weak
+draw__17dLytCommonTitle_cFv = .text:0x80169970; // type:function size:0x34
+set__17dLytCommonTitle_cFlPCcPCc = .text:0x801699B0; // type:function size:0x1B4
+setSubTitle__17dLytCommonTitle_cFl = .text:0x80169B70; // type:function size:0x60
+setSysTitle__17dLytCommonTitle_cFl = .text:0x80169BD0; // type:function size:0x60
+setSysCaption__17dLytCommonTitle_cFl = .text:0x80169C30; // type:function size:0x60
+gotoStateNone__17dLytCommonTitle_cFv = .text:0x80169C90; // type:function size:0x18
+initializeState_None__17dLytCommonTitle_cFv = .text:0x80169CB0; // type:function size:0xA8
+executeState_None__17dLytCommonTitle_cFv = .text:0x80169D60; // type:function size:0x28
+finalizeState_None__17dLytCommonTitle_cFv = .text:0x80169D90; // type:function size:0x44
+initializeState_In__17dLytCommonTitle_cFv = .text:0x80169DE0; // type:function size:0xD8
+executeState_In__17dLytCommonTitle_cFv = .text:0x80169EC0; // type:function size:0x128
+finalizeState_In__17dLytCommonTitle_cFv = .text:0x80169FF0; // type:function size:0x64
+initializeState_Wait__17dLytCommonTitle_cFv = .text:0x8016A060; // type:function size:0x10
+executeState_Wait__17dLytCommonTitle_cFv = .text:0x8016A070; // type:function size:0x170
+finalizeState_Wait__17dLytCommonTitle_cFv = .text:0x8016A1E0; // type:function size:0xC
+initializeState_Out__17dLytCommonTitle_cFv = .text:0x8016A1F0; // type:function size:0x10
+executeState_Out__17dLytCommonTitle_cFv = .text:0x8016A200; // type:function size:0xA8
+finalizeState_Out__17dLytCommonTitle_cFv = .text:0x8016A2B0; // type:function size:0x4
+initializeState_Change__17dLytCommonTitle_cFv = .text:0x8016A2C0; // type:function size:0x74
+executeState_Change__17dLytCommonTitle_cFv = .text:0x8016A340; // type:function size:0x1D8
+finalizeState_Change__17dLytCommonTitle_cFv = .text:0x8016A520; // type:function size:0x48
+startAnim__17dLytCommonTitle_cFi = .text:0x8016A570; // type:function size:0x50
+stopAnim__17dLytCommonTitle_cFi = .text:0x8016A5C0; // type:function size:0x10
+playBackwards__17dLytCommonTitle_cFRQ23d2d10AnmGroup_c = .text:0x8016A5D0; // type:function size:0x64
+applyText__17dLytCommonTitle_cFv = .text:0x8016A640; // type:function size:0x54
+applyTextChange__17dLytCommonTitle_cFl = .text:0x8016A6A0; // type:function size:0x98
+applyTitle__17dLytCommonTitle_cFl = .text:0x8016A740; // type:function size:0x1E0
+applyCaption__17dLytCommonTitle_cFl = .text:0x8016A920; // type:function size:0x2D4
+build__33sFStateFct_c<17dLytCommonTitle_c>FRC12sStateIDIf_c = .text:0x8016AC00; // type:function size:0x60 scope:weak
+dispose__33sFStateFct_c<17dLytCommonTitle_c>FRP10sStateIf_c = .text:0x8016AC60; // type:function size:0xC scope:weak
+initialize__30sFState_c<17dLytCommonTitle_c>Fv = .text:0x8016AC70; // type:function size:0x1C scope:weak
+execute__30sFState_c<17dLytCommonTitle_c>Fv = .text:0x8016AC90; // type:function size:0x1C scope:weak
+finalize__30sFState_c<17dLytCommonTitle_c>Fv = .text:0x8016ACB0; // type:function size:0x1C scope:weak
+initializeState__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8016ACD0; // type:function size:0x10 scope:weak
+finalizeState__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8016ACE0; // type:function size:0x10 scope:weak
+refreshState__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8016ACF0; // type:function size:0x10 scope:weak
+getState__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8016AD00; // type:function size:0x10 scope:weak
+getNewStateID__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8016AD10; // type:function size:0x10 scope:weak
+getOldStateID__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8016AD20; // type:function size:0x10 scope:weak
+finalizeState__32sFStateID_c<17dLytCommonTitle_c>CFR17dLytCommonTitle_c = .text:0x8016AD30; // type:function size:0x30 scope:weak
+executeState__32sFStateID_c<17dLytCommonTitle_c>CFR17dLytCommonTitle_c = .text:0x8016AD60; // type:function size:0x30 scope:weak
+initializeState__32sFStateID_c<17dLytCommonTitle_c>CFR17dLytCommonTitle_c = .text:0x8016AD90; // type:function size:0x30 scope:weak
+__sinit_\d_lyt_common_title_cpp = .text:0x8016ADC0; // type:function size:0x3F4 scope:local
+__dt__32sFStateID_c<17dLytCommonTitle_c>Fv = .text:0x8016B1C0; // type:function size:0x58 scope:weak
+isSameName__32sFStateID_c<17dLytCommonTitle_c>CFPCc = .text:0x8016B220; // type:function size:0x88 scope:weak
build__17dLytCursorStick_cFv = .text:0x8016B2B0; // type:function size:0x28
remove__17dLytCursorStick_cFv = .text:0x8016B2E0; // type:function size:0x38
execute__17dLytCursorStick_cFv = .text:0x8016B320; // type:function size:0x30
@@ -28366,7 +28366,7 @@ WALLET_ITEM_IDS = .rodata:0x804E8CF8; // type:object size:0x10
lbl_804E8D08 = .rodata:0x804E8D08; // type:object size:0x10
lbl_804E8D18 = .rodata:0x804E8D18; // type:object size:0x10
brlanMap = .rodata:0x804E8D28; // type:object size:0x48 scope:local data:4byte
-lbl_804E8D70 = .rodata:0x804E8D70; // type:object size:0x40 data:4byte
+brlanMap = .rodata:0x804E8D70; // type:object size:0x40 scope:local data:4byte
ITEM_TO_MODEL_INDEX = .rodata:0x804E8DB0; // type:object size:0x400
@8849 = .rodata:0x804E91B0; // type:object size:0x20 scope:local data:4byte
MODEL_ID_TO_PUT_ITEM_MODEL_IDX = .rodata:0x804E91D0; // type:object size:0xA8
@@ -34672,31 +34672,62 @@ __vt__30sFState_c<17dLytCommonArrow_c> = .data:0x80527460; // type:object size:0
@8410 = .data:0x80527588; // type:object size:0x20 scope:local data:string
@8411 = .data:0x805275A8; // type:object size:0x1F scope:local data:string
__vt__32sFStateID_c<17dLytCommonArrow_c> = .data:0x805275C8; // type:object size:0x34 scope:weak
-lbl_80527600 = .data:0x80527600; // type:object size:0x18 data:string
-lbl_80527618 = .data:0x80527618; // type:object size:0xC
-lbl_80527624 = .data:0x80527624; // type:object size:0x1C
-lbl_80527640 = .data:0x80527640; // type:object size:0x1C
-lbl_8052765C = .data:0x8052765C; // type:object size:0xC
-lbl_80527668 = .data:0x80527668; // type:object size:0x28
-lbl_80527690 = .data:0x80527690; // type:object size:0x10 data:string
-lbl_805276A0 = .data:0x805276A0; // type:object size:0x1C data:string
-lbl_805276BC = .data:0x805276BC; // type:object size:0x10
-lbl_805276CC = .data:0x805276CC; // type:object size:0x24
-lbl_805276F0 = .data:0x805276F0; // type:object size:0x20 data:string
-lbl_80527710 = .data:0x80527710; // type:object size:0x1C
-lbl_8052772C = .data:0x8052772C; // type:object size:0xC
-lbl_80527738 = .data:0x80527738; // type:object size:0xC
-lbl_80527744 = .data:0x80527744; // type:object size:0x18
-lbl_8052775C = .data:0x8052775C; // type:object size:0x10
-lbl_8052776C = .data:0x8052776C; // type:object size:0x10
-lbl_8052777C = .data:0x8052777C; // type:object size:0x14
-lbl_80527790 = .data:0x80527790; // type:object size:0xB4
-LytCommonTitle__vtable = .data:0x80527844; // type:object size:0xC
-lbl_80527850 = .data:0x80527850; // type:object size:0x30
-lbl_80527880 = .data:0x80527880; // type:object size:0x30
-lbl_805278B0 = .data:0x805278B0; // type:object size:0x18
-lbl_805278C8 = .data:0x805278C8; // type:object size:0x19C
-lbl_80527A64 = .data:0x80527A64; // type:object size:0x34
+@12144 = .data:0x80527600; // type:object size:0x18 scope:local data:string
+...data.0 = .data:0x80527600; // type:label scope:local
+@12145 = .data:0x80527618; // type:object size:0xB scope:local data:string
+@12146 = .data:0x80527624; // type:object size:0x19 scope:local data:string
+@12147 = .data:0x80527640; // type:object size:0x1A scope:local data:string
+@12148 = .data:0x8052765C; // type:object size:0xA scope:local data:string
+@12149 = .data:0x80527668; // type:object size:0x21 scope:local data:string
+@12150 = .data:0x80527690; // type:object size:0x10 scope:local data:string
+@12151 = .data:0x805276A0; // type:object size:0x1C scope:local data:string
+@12152 = .data:0x805276BC; // type:object size:0xF scope:local data:string
+@12153 = .data:0x805276CC; // type:object size:0x1D scope:local data:string
+@12154 = .data:0x805276F0; // type:object size:0x20 scope:local data:string
+@12155 = .data:0x80527710; // type:object size:0x1B scope:local data:string
+@12156 = .data:0x8052772C; // type:object size:0xB scope:local data:string
+@13196 = .data:0x80527738; // type:object size:0x9 scope:local data:string
+@13198 = .data:0x80527744; // type:object size:0x15 scope:local data:string
+@13238 = .data:0x8052775C; // type:object size:0xF scope:local data:string
+@13248 = .data:0x8052776C; // type:object size:0xF scope:local data:string
+@13254 = .data:0x8052777C; // type:object size:0x11 scope:local data:string
+@13265 = .data:0x80527790; // type:object size:0xA scope:local data:string
+@13424 = .data:0x8052779C; // type:object size:0xF scope:local data:string
+@13425 = .data:0x805277B0; // type:object size:0x10 scope:local data:string
+@13426 = .data:0x805277C0; // type:object size:0xF scope:local data:string
+@13427 = .data:0x805277D0; // type:object size:0x10 scope:local data:string
+@13452 = .data:0x805277E0; // type:object size:0x10 scope:local data:string
+@13453 = .data:0x805277F0; // type:object size:0x11 scope:local data:string
+@13454 = .data:0x80527808; // type:object size:0x10 scope:local data:string
+@13455 = .data:0x80527818; // type:object size:0x11 scope:local data:string
+@13456 = .data:0x8052782C; // type:object size:0x9 scope:local data:string
+@13457 = .data:0x80527838; // type:object size:0x9 scope:local data:string
+__vt__17dLytCommonTitle_c = .data:0x80527844; // type:object size:0xC scope:weak
+__vt__56sFStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c> = .data:0x80527850; // type:object size:0x30 scope:weak
+__vt__86sStateMgr_c<17dLytCommonTitle_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x80527880; // type:object size:0x30 scope:weak
+__vt__33sFStateFct_c<17dLytCommonTitle_c> = .data:0x805278B0; // type:object size:0x14 scope:weak
+__vt__30sFState_c<17dLytCommonTitle_c> = .data:0x805278C8; // type:object size:0x18 scope:weak
+@13509 = .data:0x8052790C; // type:object size:0xC scope:local
+@13510 = .data:0x80527918; // type:object size:0xC scope:local
+@13511 = .data:0x80527924; // type:object size:0xC scope:local
+@13512 = .data:0x80527930; // type:object size:0xC scope:local
+@13513 = .data:0x8052793C; // type:object size:0xC scope:local
+@13514 = .data:0x80527948; // type:object size:0xC scope:local
+@13515 = .data:0x80527954; // type:object size:0xC scope:local
+@13516 = .data:0x80527960; // type:object size:0xC scope:local
+@13517 = .data:0x8052796C; // type:object size:0xC scope:local
+@13518 = .data:0x80527978; // type:object size:0xC scope:local
+@13519 = .data:0x80527984; // type:object size:0xC scope:local
+@13520 = .data:0x80527990; // type:object size:0xC scope:local
+@13521 = .data:0x8052799C; // type:object size:0xC scope:local
+@13522 = .data:0x805279A8; // type:object size:0xC scope:local
+@13523 = .data:0x805279B4; // type:object size:0xC scope:local
+@13525 = .data:0x805279C0; // type:object size:0x20 scope:local data:string
+@13526 = .data:0x805279E0; // type:object size:0x1E scope:local data:string
+@13527 = .data:0x80527A00; // type:object size:0x20 scope:local data:string
+@13528 = .data:0x80527A20; // type:object size:0x1F scope:local data:string
+@13529 = .data:0x80527A40; // type:object size:0x22 scope:local data:string
+__vt__32sFStateID_c<17dLytCommonTitle_c> = .data:0x80527A64; // type:object size:0x34 scope:weak
@11234 = .data:0x80527A98; // type:object size:0x1A scope:local data:string
...data.0 = .data:0x80527A98; // type:label scope:local
@11235 = .data:0x80527AB4; // type:object size:0xA scope:local data:string
@@ -39873,8 +39904,8 @@ lbl_805729C4 = .sdata:0x805729C4; // type:object size:0x4
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
-lbl_805729D8 = .sdata:0x805729D8; // type:object size:0x4
-lbl_805729DC = .sdata:0x805729DC; // type:object size:0x4
+@13197 = .sdata:0x805729D8; // type:object size:0x1 scope:local
+@13428 = .sdata:0x805729DC; // type:object size:0x2 scope:local
@11237 = .sdata:0x805729E0; // type:object size:0x8 scope:local data:string
@11238 = .sdata:0x805729E8; // type:object size:0x8 scope:local data:string
@11239 = .sdata:0x805729F0; // type:object size:0x8 scope:local data:string
@@ -45149,9 +45180,9 @@ TABLET_ITEM_IDS = .sdata2:0x8057A170; // type:object size:0x8
TRIFORCE_PIECE_ITEM_IDS = .sdata2:0x8057A178; // type:object size:0x8 data:wstring
@8160 = .sdata2:0x8057A180; // type:object size:0x4 scope:local align:4 data:float
@8161 = .sdata2:0x8057A184; // type:object size:0x4 scope:local align:4 data:float
-lbl_8057A188 = .sdata2:0x8057A188; // type:object size:0x4 align:4 data:float
-lbl_8057A18C = .sdata2:0x8057A18C; // type:object size:0x4 align:4 data:float
-lbl_8057A190 = .sdata2:0x8057A190; // type:object size:0x4 align:4 data:float
+@13176 = .sdata2:0x8057A188; // type:object size:0x4 scope:local align:4 data:float
+@13177 = .sdata2:0x8057A18C; // type:object size:0x4 scope:local align:4 data:float
+@13458 = .sdata2:0x8057A190; // type:object size:0x4 scope:local align:4 data:float
brlanMap = .sdata2:0x8057A198; // type:object size:0x8 scope:local data:4byte
@11660 = .sdata2:0x8057A1A0; // type:object size:0x4 scope:local align:4 data:float
@11740 = .sdata2:0x8057A1A4; // type:object size:0x4 scope:local align:4 data:float
@@ -51441,12 +51472,17 @@ StateID_In__17dLytCommonArrow_c = .bss:0x805B1D00; // type:object size:0x30 data
StateID_Wait__17dLytCommonArrow_c = .bss:0x805B1D40; // type:object size:0x30 data:4byte
@7260 = .bss:0x805B1D70; // type:object size:0xC scope:local
StateID_Out__17dLytCommonArrow_c = .bss:0x805B1D80; // type:object size:0x30 data:4byte
-lbl_805B1DB0 = .bss:0x805B1DB0; // type:object size:0x10
-LytCommonTitle__STATE_NONE = .bss:0x805B1DC0; // type:object size:0x40 data:4byte
-LytCommonTitle__STATE_IN = .bss:0x805B1E00; // type:object size:0x40 data:4byte
-LytCommonTitle__STATE_WAIT = .bss:0x805B1E40; // type:object size:0x40 data:4byte
-LytCommonTitle__STATE_OUT = .bss:0x805B1E80; // type:object size:0x40 data:4byte
-LytCommonTitle__STATE_CHANGE = .bss:0x805B1EC0; // type:object size:0x30 data:4byte
+@12127 = .bss:0x805B1DB0; // type:object size:0xC scope:local
+...bss.0 = .bss:0x805B1DB0; // type:label scope:local
+StateID_None__17dLytCommonTitle_c = .bss:0x805B1DC0; // type:object size:0x30 data:4byte
+@12131 = .bss:0x805B1DF0; // type:object size:0xC scope:local
+StateID_In__17dLytCommonTitle_c = .bss:0x805B1E00; // type:object size:0x30 data:4byte
+@12135 = .bss:0x805B1E30; // type:object size:0xC scope:local
+StateID_Wait__17dLytCommonTitle_c = .bss:0x805B1E40; // type:object size:0x30 data:4byte
+@12139 = .bss:0x805B1E70; // type:object size:0xC scope:local
+StateID_Out__17dLytCommonTitle_c = .bss:0x805B1E80; // type:object size:0x30 data:4byte
+@12143 = .bss:0x805B1EB0; // type:object size:0xC scope:local
+StateID_Change__17dLytCommonTitle_c = .bss:0x805B1EC0; // type:object size:0x30 data:4byte
@11229 = .bss:0x805B1EF0; // type:object size:0xC scope:local
...bss.0 = .bss:0x805B1EF0; // type:label scope:local
StateID_Off__17dLytCursorStick_c = .bss:0x805B1F00; // type:object size:0x30 data:4byte
diff --git a/configure.py b/configure.py
index fb558d74..985e446c 100644
--- a/configure.py
+++ b/configure.py
@@ -553,7 +553,7 @@ config.libs = [
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"),
- Object(NonMatching, "d/lyt/d_lyt_common_title.cpp"),
+ Object(Matching, "d/lyt/d_lyt_common_title.cpp"),
Object(Matching, "d/lyt/d_lyt_cursor_stick.cpp"),
Object(Matching, "toBeSorted/fi_context.cpp"),
Object(NonMatching, "toBeSorted/item_mdl_name.cpp"),
diff --git a/include/d/lyt/d_lyt_common_title.h b/include/d/lyt/d_lyt_common_title.h
new file mode 100644
index 00000000..9b2261fd
--- /dev/null
+++ b/include/d/lyt/d_lyt_common_title.h
@@ -0,0 +1,63 @@
+#ifndef D_LYT_COMMON_TITLE_H
+#define D_LYT_COMMON_TITLE_H
+
+#include "common.h"
+#include "d/lyt/d2d.h"
+#include "s/s_State.hpp"
+#include "sized_string.h"
+
+class dLytCommonTitle_c {
+public:
+ dLytCommonTitle_c();
+ virtual ~dLytCommonTitle_c() {}
+
+ bool build();
+ bool remove();
+ bool execute();
+ bool draw();
+
+ bool set(s32 arg, const char *title, const char *caption);
+ const char *setSubTitle(s32 msgIdx);
+ const char *setSysTitle(s32 msgIdx);
+ const char *setSysCaption(s32 msgIdx);
+
+private:
+ void gotoStateNone();
+ void startAnim(int idx);
+ void stopAnim(int idx);
+ void playBackwards(d2d::AnmGroup_c &anm);
+
+ void applyText();
+ void applyTextChange(s32 arg);
+
+ void applyTitle(s32 arg);
+ void applyCaption(s32 arg);
+
+ d2d::AnmGroup_c &getAnm(int idx) {
+ return mAnm[idx];
+ }
+
+ STATE_FUNC_DECLARE(dLytCommonTitle_c, None);
+ STATE_FUNC_DECLARE(dLytCommonTitle_c, In);
+ STATE_FUNC_DECLARE(dLytCommonTitle_c, Wait);
+ STATE_FUNC_DECLARE(dLytCommonTitle_c, Out);
+ STATE_FUNC_DECLARE(dLytCommonTitle_c, Change);
+
+ /* 0x004 */ UI_STATE_MGR_DECLARE(dLytCommonTitle_c);
+ /* 0x040 */ d2d::LytBase_c mLyt;
+ /* 0x0D0 */ d2d::ResAccIf_c mResAcc;
+ /* 0x440 */ d2d::AnmGroup_c mAnm[8];
+ /* 0x640 */ SizedString<0x20> mTitle;
+ /* 0x660 */ SizedString<0x20> mCaption;
+
+ /* 0x680 */ UNKWORD field_0x680;
+ /* 0x680 */ UNKWORD field_0x684;
+ /* 0x688 */ s32 mStep;
+ /* 0x68C */ bool mChangeRequest;
+ /* 0x68D */ bool field_0x68D;
+ /* 0x68E */ bool mVisible;
+ /* 0x68F */ bool field_0x68F;
+ /* 0x690 */ bool field_0x690;
+};
+
+#endif
diff --git a/include/d/lyt/d_lyt_control_game.h b/include/d/lyt/d_lyt_control_game.h
index 1c43e800..31858c3e 100644
--- a/include/d/lyt/d_lyt_control_game.h
+++ b/include/d/lyt/d_lyt_control_game.h
@@ -21,6 +21,10 @@ public:
return sInstance;
}
+ bool getField_0x15C67() const {
+ return field_0x15C67;
+ }
+
STATE_FUNC_DECLARE(dLytControlGame_c, Normal);
STATE_FUNC_DECLARE(dLytControlGame_c, Pause_SetRes);
STATE_FUNC_DECLARE(dLytControlGame_c, Pause_SyncRes);
@@ -37,7 +41,8 @@ public:
private:
/* 0x00068 */ UI_STATE_MGR_DECLARE(dLytControlGame_c);
-
+ /* 0x000A4 */ u8 _0x000A4[0x15C67 - 0x000A4];
+ /* 0x15C67 */ bool field_0x15C67;
static dLytControlGame_c *sInstance;
};
diff --git a/include/sized_string.h b/include/sized_string.h
index 44e26ebe..3d67e74a 100644
--- a/include/sized_string.h
+++ b/include/sized_string.h
@@ -37,6 +37,10 @@ struct SizedString {
return mChars;
}
+ void empty() {
+ mChars[0] = '\0';
+ }
+
void operator=(const char *src) {
if (src != mChars) {
mChars[0] = '\0';
diff --git a/src/REL/d/d_s_boot.cpp b/src/REL/d/d_s_boot.cpp
index 0fcb4d24..c72c7fc2 100644
--- a/src/REL/d/d_s_boot.cpp
+++ b/src/REL/d/d_s_boot.cpp
@@ -327,9 +327,9 @@ void dScBoot_c::drawCallback() {
dScBoot_c::strap_c::strap_c() {
SizedString<8> str;
u8 langNum = getUsedLanguageNTSCNum();
- mArcName.mChars[0] = '\0';
- mLytFileName.mChars[0] = '\0';
- mAnimFileName.mChars[0] = '\0';
+ mArcName.empty();
+ mLytFileName.empty();
+ mAnimFileName.empty();
if (langNum == 3) {
str = "F";
} else if (langNum == 4) {
diff --git a/src/d/lyt/d_lyt_common_title.cpp b/src/d/lyt/d_lyt_common_title.cpp
new file mode 100644
index 00000000..d24eb52d
--- /dev/null
+++ b/src/d/lyt/d_lyt_common_title.cpp
@@ -0,0 +1,525 @@
+#include "d/lyt/d_lyt_common_title.h"
+
+#include "common.h"
+#include "d/d_message.h"
+#include "d/lyt/d2d.h"
+#include "d/lyt/d_lyt_control_game.h"
+#include "d/lyt/d_textbox.h"
+#include "d/lyt/d_window.h"
+#include "toBeSorted/arc_managers/layout_arc_manager.h"
+
+#include <cstring>
+
+STATE_DEFINE(dLytCommonTitle_c, None);
+STATE_DEFINE(dLytCommonTitle_c, In);
+STATE_DEFINE(dLytCommonTitle_c, Wait);
+STATE_DEFINE(dLytCommonTitle_c, Out);
+STATE_DEFINE(dLytCommonTitle_c, Change);
+
+static const d2d::LytBrlanMapping brlanMap[] = {
+ { "commonTitle_00_in.brlan", "G_inOut_00"},
+ { "commonTitle_00_out.brlan", "G_inOut_00"},
+ { "commonTitle_00_loop.brlan", "G_loop_00"},
+ {"commonTitle_00_titleChange.brlan", "G_titleInOut_00"},
+ { "commonTitle_00_textIn.brlan", "G_textInOut_00"},
+ { "commonTitle_00_textOut.brlan", "G_textInOut_00"},
+ { "commonTitle_00_textChange.brlan", "G_textInOut_00"},
+ { "commonTitle_00_input.brlan", "G_input_00"},
+};
+
+#define COMMON_TITLE_ANIM_IN 0
+#define COMMON_TITLE_ANIM_OUT 1
+#define COMMON_TITLE_ANIM_LOOP 2
+#define COMMON_TITLE_ANIM_TITLE_CHANGE 3
+#define COMMON_TITLE_ANIM_TEXT_IN 4
+#define COMMON_TITLE_ANIM_TEXT_OUT 5
+#define COMMON_TITLE_ANIM_TEXT_CHANGE 6
+#define COMMON_TITLE_ANIM_INPUT 7
+
+#define COMMON_TITLE_NUM_ANIMS 8
+
+dLytCommonTitle_c::dLytCommonTitle_c() : mStateMgr(*this) {}
+
+bool dLytCommonTitle_c::build() {
+ void *data = LayoutArcManager::GetInstance()->getLoadedData("DoButton");
+ mResAcc.attach(data, "");
+ mLyt.build("commonTitle_00.brlyt", &mResAcc);
+ mLyt.setPriority(0x86);
+
+ for (int i = 0; i < COMMON_TITLE_NUM_ANIMS; i++) {
+ mAnm[i].init(brlanMap[i].mFile, &mResAcc, mLyt.getLayout(), brlanMap[i].mName);
+ }
+
+ mStateMgr.changeState(StateID_None);
+ field_0x680 = 0;
+ field_0x690 = true;
+ return true;
+}
+
+bool dLytCommonTitle_c::remove() {
+ mLyt.unbindAnims();
+ for (int i = 0; i < COMMON_TITLE_NUM_ANIMS; i++) {
+ mAnm[i].remove();
+ }
+ mResAcc.detach();
+ return true;
+}
+
+bool dLytCommonTitle_c::execute() {
+ mStateMgr.executeState();
+ if (!(mStateMgr.getStateID()->isEqual(StateID_None))) {
+ mAnm[COMMON_TITLE_ANIM_LOOP].play();
+ if (field_0x690 == true) {
+ playBackwards(mAnm[COMMON_TITLE_ANIM_INPUT]);
+ } else {
+ mAnm[COMMON_TITLE_ANIM_INPUT].play();
+ }
+ }
+ mLyt.calc();
+ return true;
+}
+
+bool dLytCommonTitle_c::draw() {
+ if (mVisible == true) {
+ mLyt.addToDrawList();
+ }
+ return true;
+}
+
+bool dLytCommonTitle_c::set(s32 arg, const char *title, const char *caption) {
+ if (!(mStateMgr.getStateID()->isEqual(StateID_Wait)) && !(mStateMgr.getStateID()->isEqual(StateID_None))) {
+ return false;
+ }
+
+ field_0x684 = arg;
+
+ if (title != nullptr) {
+ mTitle = title;
+ } else {
+ mTitle.empty();
+ }
+
+ if (caption != nullptr) {
+ mCaption = caption;
+ } else {
+ mCaption.empty();
+ }
+
+ mChangeRequest = true;
+ return true;
+}
+
+const char *dLytCommonTitle_c::setSubTitle(s32 msgIdx) {
+ const char *ret = nullptr;
+ mCaption.empty();
+ if (msgIdx != 0 && msgIdx <= 2) {
+ // "Gear", "Collection"
+ mCaption.sprintf("SUB_TITLE_%02d", msgIdx);
+ ret = mCaption;
+ }
+ return ret;
+}
+
+const char *dLytCommonTitle_c::setSysTitle(s32 msgIdx) {
+ const char *ret = nullptr;
+ mTitle.empty();
+ if (msgIdx != 0 && msgIdx <= 2) {
+ // "Quest Logs", "Your Name"
+ mTitle.sprintf("SYS_TITLE_%02d", msgIdx);
+ ret = mTitle;
+ }
+ return ret;
+}
+
+const char *dLytCommonTitle_c::setSysCaption(s32 msgIdx) {
+ const char *ret = nullptr;
+ mCaption.empty();
+ if (msgIdx != 0 && msgIdx <= 5) {
+ // "Select a file.", ...
+ mCaption.sprintf("SYS_CAPTION_%02d", msgIdx);
+ ret = mCaption;
+ }
+ return ret;
+}
+
+void dLytCommonTitle_c::gotoStateNone() {
+ mStateMgr.changeState(StateID_None);
+}
+
+void dLytCommonTitle_c::initializeState_None() {
+ mLyt.unbindAnims();
+ mChangeRequest = false;
+ field_0x68D = false;
+ mVisible = false;
+ field_0x684 = 0;
+ mStep = 0;
+ mTitle.empty();
+ mCaption.empty();
+ field_0x68F = 0;
+ if (dLytControlGame_c::getInstance()->getField_0x15C67()) {
+ mLyt.findPane("N_next_01")->SetVisible(false);
+ } else {
+ mLyt.findPane("N_next_01")->SetVisible(true);
+ }
+}
+void dLytCommonTitle_c::executeState_None() {
+ if (mChangeRequest == true) {
+ mStateMgr.changeState(StateID_In);
+ }
+}
+void dLytCommonTitle_c::finalizeState_None() {
+ mChangeRequest = false;
+ startAnim(COMMON_TITLE_ANIM_LOOP);
+ startAnim(COMMON_TITLE_ANIM_INPUT);
+}
+
+void dLytCommonTitle_c::initializeState_In() {
+ mStep = 0;
+ startAnim(COMMON_TITLE_ANIM_IN);
+ startAnim(COMMON_TITLE_ANIM_TITLE_CHANGE);
+ if (field_0x680 == 0) {
+ mLyt.setPriority(0x80);
+ startAnim(COMMON_TITLE_ANIM_TEXT_IN);
+ } else {
+ startAnim(COMMON_TITLE_ANIM_TEXT_CHANGE);
+ getAnm(COMMON_TITLE_ANIM_TEXT_CHANGE).setToEnd();
+ startAnim(COMMON_TITLE_ANIM_TEXT_OUT);
+ getAnm(COMMON_TITLE_ANIM_TEXT_OUT).setToEnd();
+ }
+ mVisible = true;
+ applyText();
+}
+void dLytCommonTitle_c::executeState_In() {
+ switch (mStep) {
+ case 0: {
+ d2d::AnmGroup_c &anm = mAnm[COMMON_TITLE_ANIM_IN];
+ if (anm.isEndReached() == true) {
+ if (field_0x680 == 0) {
+ mStep = 1;
+ } else {
+ mStep = 10;
+ field_0x68D = true;
+ }
+ } else {
+ anm.play();
+ }
+ break;
+ }
+ case 1: {
+ d2d::AnmGroup_c &anm = mAnm[COMMON_TITLE_ANIM_TEXT_IN];
+ if (anm.isEndReached() == true) {
+ mStep = 10;
+ field_0x68D = true;
+ }
+ anm.play();
+ break;
+ }
+ case 10: {
+ field_0x68D = false;
+ mStateMgr.changeState(StateID_Wait);
+ break;
+ }
+ }
+}
+void dLytCommonTitle_c::finalizeState_In() {
+ stopAnim(COMMON_TITLE_ANIM_TITLE_CHANGE);
+ stopAnim(COMMON_TITLE_ANIM_IN);
+ if (field_0x680 == 0) {
+ stopAnim(COMMON_TITLE_ANIM_TEXT_IN);
+ } else {
+ stopAnim(COMMON_TITLE_ANIM_TEXT_CHANGE);
+ }
+}
+
+void dLytCommonTitle_c::initializeState_Wait() {
+ mStep = 0;
+ field_0x68F = false;
+}
+void dLytCommonTitle_c::executeState_Wait() {
+ if (field_0x680 == 1) {
+ if (std::strlen(mCaption) != 0) {
+ field_0x68F = true;
+ mAnm[COMMON_TITLE_ANIM_TEXT_OUT].setFrame(0.0f);
+ } else {
+ mAnm[COMMON_TITLE_ANIM_TEXT_OUT].play();
+ if (field_0x68F == true && mAnm[COMMON_TITLE_ANIM_TEXT_OUT].isEndReached() == true) {
+ applyCaption(0);
+ field_0x68F = false;
+ }
+ }
+ }
+
+ if (mChangeRequest == true) {
+ if (field_0x684 == 3) {
+ mStateMgr.changeState(StateID_Out);
+ } else if (field_0x680 == 0) {
+ mStateMgr.changeState(StateID_Change);
+ } else if (field_0x684 == 1) {
+ mStateMgr.changeState(StateID_Change);
+ } else {
+ mChangeRequest = false;
+ if (std::strlen(mCaption) != 0) {
+ applyCaption(0);
+ }
+ }
+ }
+}
+void dLytCommonTitle_c::finalizeState_Wait() {
+ mChangeRequest = false;
+}
+
+void dLytCommonTitle_c::initializeState_Out() {
+ mStep = 0;
+ startAnim(COMMON_TITLE_ANIM_OUT);
+}
+void dLytCommonTitle_c::executeState_Out() {
+ d2d::AnmGroup_c &anm = mAnm[COMMON_TITLE_ANIM_OUT];
+ switch (mStep) {
+ case 0: {
+ if (anm.isEndReached() == true) {
+ mStep = 1;
+ field_0x68D = true;
+ }
+ break;
+ }
+ case 1: {
+ mStateMgr.changeState(StateID_None);
+ return;
+ }
+ }
+ anm.play();
+}
+void dLytCommonTitle_c::finalizeState_Out() {}
+
+void dLytCommonTitle_c::initializeState_Change() {
+ applyTextChange(0);
+ if (field_0x684 == 1) {
+ startAnim(COMMON_TITLE_ANIM_TITLE_CHANGE);
+ }
+
+ if (field_0x680 == 0) {
+ mStep = 0;
+ startAnim(COMMON_TITLE_ANIM_TEXT_CHANGE);
+ } else {
+ mStep = 10;
+ }
+}
+void dLytCommonTitle_c::executeState_Change() {
+ switch (mStep) {
+ case 0: {
+ d2d::AnmGroup_c &anm = mAnm[COMMON_TITLE_ANIM_TEXT_CHANGE];
+ if (anm.isEndReached() == true) {
+ mStep++;
+ }
+ anm.play();
+ if (field_0x684 == 1) {
+ getAnm(COMMON_TITLE_ANIM_TITLE_CHANGE).play();
+ }
+ break;
+ }
+ case 1: {
+ applyTextChange(1);
+ getAnm(COMMON_TITLE_ANIM_TEXT_CHANGE).setFrame(0.0f);
+ if (field_0x684 == 1) {
+ getAnm(COMMON_TITLE_ANIM_TITLE_CHANGE).setFrame(0.0f);
+ }
+ field_0x68D = true;
+ mStep++;
+ // fall-through
+ }
+ case 2: {
+ mStateMgr.changeState(StateID_Wait);
+ break;
+ }
+ case 10: {
+ d2d::AnmGroup_c &anm = mAnm[COMMON_TITLE_ANIM_TITLE_CHANGE];
+ if (anm.isEndReached() == true) {
+ mStep++;
+ }
+ anm.play();
+ break;
+ }
+ case 11: {
+ applyTextChange(1);
+ mAnm[COMMON_TITLE_ANIM_TITLE_CHANGE].setFrame(0.0f);
+ mAnm[COMMON_TITLE_ANIM_TEXT_OUT].setToEnd();
+ mStep = 2;
+ field_0x68D = true;
+ break;
+ }
+ }
+}
+void dLytCommonTitle_c::finalizeState_Change() {
+ stopAnim(COMMON_TITLE_ANIM_TEXT_CHANGE);
+ if (field_0x684 == 1) {
+ stopAnim(COMMON_TITLE_ANIM_TITLE_CHANGE);
+ }
+}
+
+void dLytCommonTitle_c::startAnim(int idx) {
+ d2d::AnmGroup_c &anm = mAnm[idx];
+ anm.bind(false);
+ anm.setFrame(0.0f);
+}
+
+void dLytCommonTitle_c::stopAnim(int idx) {
+ d2d::AnmGroup_c &anm = mAnm[idx];
+ anm.unbind();
+}
+
+void dLytCommonTitle_c::playBackwards(d2d::AnmGroup_c &anm) {
+ f32 frame = anm.getFrame();
+ if (frame) {
+ frame -= 1.0f;
+ if (frame <= 0.0f) {
+ frame = 0.0f;
+ }
+ anm.setFrame(frame);
+ }
+}
+
+void dLytCommonTitle_c::applyText() {
+ if (field_0x684 == 2) {
+ applyCaption(0);
+ } else {
+ applyTitle(0);
+ applyCaption(0);
+ }
+}
+
+void dLytCommonTitle_c::applyTextChange(s32 arg) {
+ switch (arg) {
+ case 0: {
+ if (field_0x684 == 2) {
+ applyCaption(1);
+ } else {
+ applyTitle(1);
+ applyCaption(1);
+ }
+ break;
+ }
+ case 1: {
+ if (field_0x684 == 2) {
+ applyCaption(2);
+ } else {
+ applyTitle(2);
+ applyCaption(2);
+ }
+ break;
+ }
+ }
+}
+
+void dLytCommonTitle_c::applyTitle(s32 arg) {
+ dTextBox_c *mainTitle0 = mLyt.getTextBox("T_mainTitle_00");
+ dTextBox_c *mainTitleS0 = mLyt.getTextBox("T_mainTitleS_00");
+ dTextBox_c *mainTitle1 = mLyt.getTextBox("T_mainTitle_01");
+ dTextBox_c *mainTitleS1 = mLyt.getTextBox("T_mainTitleS_01");
+
+ switch (arg) {
+ case 0: {
+ if (std::strlen(mTitle) != 0) {
+ const wchar_t *text = dMessage_c::getTextMessageByLabel(mTitle, true, nullptr, 0);
+ mainTitle0->setTextWithGlobalTextProcessor(text);
+ mainTitleS0->setTextWithGlobalTextProcessor(text);
+ mainTitle1->setTextWithGlobalTextProcessor(text);
+ mainTitleS1->setTextWithGlobalTextProcessor(text);
+ } else {
+ mainTitle0->setTextWithGlobalTextProcessor(L"");
+ mainTitleS0->setTextWithGlobalTextProcessor(L"");
+ mainTitle1->setTextWithGlobalTextProcessor(L"");
+ mainTitleS1->setTextWithGlobalTextProcessor(L"");
+ }
+ // @bug missing break, ends up doing duplicate work
+ // break;
+ }
+ case 1: {
+ if (std::strlen(mTitle) != 0) {
+ const wchar_t *text = dMessage_c::getTextMessageByLabel(mTitle, true, nullptr, 0);
+ mainTitle0->setTextWithGlobalTextProcessor(text);
+ mainTitleS0->setTextWithGlobalTextProcessor(text);
+ } else {
+ mainTitle0->setTextWithGlobalTextProcessor(L"");
+ mainTitleS0->setTextWithGlobalTextProcessor(L"");
+ }
+ break;
+ }
+ case 2: {
+ if (std::strlen(mTitle) != 0) {
+ const wchar_t *text = dMessage_c::getTextMessageByLabel(mTitle, true, nullptr, 0);
+ mainTitle1->setTextWithGlobalTextProcessor(text);
+ mainTitleS1->setTextWithGlobalTextProcessor(text);
+ } else {
+ mainTitle1->setTextWithGlobalTextProcessor(L"");
+ mainTitleS1->setTextWithGlobalTextProcessor(L"");
+ }
+ break;
+ }
+ }
+}
+
+void dLytCommonTitle_c::applyCaption(s32 arg) {
+ dTextBox_c *mainTitle0 = mLyt.getTextBox("T_changeText_00");
+ dTextBox_c *mainTitleS0 = mLyt.getTextBox("T_changeTextS_00");
+ dTextBox_c *mainTitle1 = mLyt.getTextBox("T_changeText_01");
+ dTextBox_c *mainTitleS1 = mLyt.getTextBox("T_changeTextS_01");
+ dWindow_c *window0 = mLyt.getWindow("W_bgP_00");
+ dWindow_c *window1 = mLyt.getWindow("W_bgP_01");
+
+ switch (arg) {
+ case 0: {
+ if (std::strlen(mCaption) != 0) {
+ const wchar_t *text = dMessage_c::getTextMessageByLabel(mCaption, true, nullptr, 0);
+ mainTitle0->setTextWithGlobalTextProcessor(text);
+ mainTitleS0->setTextWithGlobalTextProcessor(text);
+ mainTitle1->setTextWithGlobalTextProcessor(text);
+ mainTitleS1->setTextWithGlobalTextProcessor(text);
+ if (field_0x680 == 0) {
+ window0->SetVisible(false);
+ window1->SetVisible(true);
+ } else {
+ window0->SetVisible(true);
+ window1->SetVisible(false);
+ }
+ } else {
+ mainTitle0->setTextWithGlobalTextProcessor(L"");
+ mainTitleS0->setTextWithGlobalTextProcessor(L"");
+ mainTitle1->setTextWithGlobalTextProcessor(L"");
+ mainTitleS1->setTextWithGlobalTextProcessor(L"");
+ window0->SetVisible(false);
+ window1->SetVisible(false);
+ }
+
+ break;
+ }
+ case 1: {
+ if (std::strlen(mCaption) != 0) {
+ const wchar_t *text = dMessage_c::getTextMessageByLabel(mCaption, true, nullptr, 0);
+ mainTitle1->setTextWithGlobalTextProcessor(text);
+ mainTitleS1->setTextWithGlobalTextProcessor(text);
+ window0->SetVisible(true);
+ } else {
+ mainTitle1->setTextWithGlobalTextProcessor(L"");
+ mainTitleS1->setTextWithGlobalTextProcessor(L"");
+ window0->SetVisible(false);
+ }
+ break;
+ }
+ case 2: {
+ if (std::strlen(mCaption) != 0) {
+ window1->SetVisible(true);
+ const wchar_t *text = dMessage_c::getTextMessageByLabel(mCaption, true, nullptr, 0);
+ mainTitle0->setTextWithGlobalTextProcessor(text);
+ mainTitleS0->setTextWithGlobalTextProcessor(text);
+ } else {
+ window1->SetVisible(false);
+ mainTitle0->setTextWithGlobalTextProcessor(L"");
+ mainTitleS0->setTextWithGlobalTextProcessor(L"");
+ }
+ break;
+ }
+ }
+
+ window0->UpdateSize(mLyt.getSizeBoxInWindow("W_bgP_00"), 32.0f);
+ window1->UpdateSize(mLyt.getSizeBoxInWindow("W_bgP_01"), 32.0f);
+}