diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index b4e4c83d..4fa8689f 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -448,6 +448,7 @@ d/lyt/msg_window/d_lyt_msg_window.cpp: d/lyt/msg_window/d_lyt_msg_window_select_btn.cpp: .text start:0x8011C8D0 end:0x80120A18 .ctors start:0x804DB73C end:0x804DB740 + .rodata start:0x804E7468 end:0x804E7540 .data start:0x8051C300 end:0x8051CB10 .bss start:0x805AE670 end:0x805AE930 @@ -457,18 +458,38 @@ d/lyt/msg_window/d_lyt_msg_window_base.cpp: d/lyt/msg_window/d_lyt_msg_window_talk.cpp: .text start:0x80121070 end:0x801223C8 .ctors start:0x804DB740 end:0x804DB744 + .rodata start:0x804E7540 end:0x804E7560 + .data start:0x8051CC98 end:0x8051CFC0 + .sdata start:0x805725A0 end:0x805725B0 + .sdata2 start:0x80579E68 end:0x80579E80 + .bss start:0x805AE930 end:0x805AEA70 d/lyt/msg_window/d_lyt_msg_window_link.cpp: .text start:0x801223D0 end:0x80123738 .ctors start:0x804DB744 end:0x804DB748 + .rodata start:0x804E7560 end:0x804E7580 + .data start:0x8051CFC0 end:0x8051D2D8 + .sdata start:0x805725B0 end:0x805725C0 + .sdata2 start:0x80579E80 end:0x80579E98 + .bss start:0x805AEA70 end:0x805AEBB0 d/lyt/msg_window/d_lyt_msg_window_get.cpp: .text start:0x80123740 end:0x80124678 .ctors start:0x804DB748 end:0x804DB74C + .rodata start:0x804E7580 end:0x804E7598 + .data start:0x8051D2D8 end:0x8051D578 + .sdata start:0x805725C0 end:0x805725D0 + .sdata2 start:0x80579E98 end:0x80579EA8 + .bss start:0x805AEBB0 end:0x805AECB0 d/lyt/msg_window/d_lyt_msg_window_sword.cpp: .text start:0x80124680 end:0x80125BA8 .ctors start:0x804DB74C end:0x804DB750 + .rodata start:0x804E7598 end:0x804E75C0 + .data start:0x8051D578 end:0x8051D8A0 + .sdata start:0x805725D0 end:0x805725E0 + .sdata2 start:0x80579EA8 end:0x80579EC0 + .bss start:0x805AECB0 end:0x805AEDF0 d/lyt/msg_window/d_lyt_msg_window_wood.cpp: .text start:0x80125BB0 end:0x801267F8 @@ -491,10 +512,20 @@ d/lyt/msg_window/d_lyt_msg_window_stone.cpp: d/lyt/msg_window/d_lyt_msg_window_demo.cpp: .text start:0x80127480 end:0x801281F8 .ctors start:0x804DB758 end:0x804DB75C + .rodata start:0x804E75F0 end:0x804E7600 + .data start:0x8051DD90 end:0x8051E008 + .sdata start:0x80572608 end:0x80572618 + .sdata2 start:0x80579ED0 end:0x80579EE0 + .bss start:0x805AEFF0 end:0x805AF0F0 d/lyt/msg_window/d_lyt_simple_window.cpp: .text start:0x80128200 end:0x8012B948 .ctors start:0x804DB75C end:0x804DB760 + .rodata start:0x804E7600 end:0x804E7668 + .data start:0x8051E008 end:0x8051E548 + .sdata start:0x80572618 end:0x80572638 + .sdata2 start:0x80579EE0 end:0x80579EF8 + .bss start:0x805AF0F0 end:0x805AF1F0 d/lyt/d_lyt_auto_caption.cpp: .text start:0x8012B950 end:0x8012C568 diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index f153acc7..6a0a648b 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -6659,7 +6659,7 @@ setNumber__25dLytCommonIconItemPart1_cFl = .text:0x80111DF0; // type:function si setNumberColor__25dLytCommonIconItemPart1_cFUc = .text:0x80111E80; // type:function size:0xB8 setOn__25dLytCommonIconItemPart1_cFv = .text:0x80111F40; // type:function size:0x2C setOff__25dLytCommonIconItemPart1_cFv = .text:0x80111F70; // type:function size:0x2C -startDecide__25dLytCommonIconItemPart1_cFv = .text:0x80111FA0; // type:function size:0x60 +startConfirm__25dLytCommonIconItemPart1_cFv = .text:0x80111FA0; // type:function size:0x60 isDoneDeciding__25dLytCommonIconItemPart1_cCFv = .text:0x80112000; // type:function size:0x8 isCursorOver__25dLytCommonIconItemPart1_cCFv = .text:0x80112010; // type:function size:0x7C setVisible__25dLytCommonIconItemPart1_cFb = .text:0x80112090; // type:function size:0x34 @@ -6681,7 +6681,7 @@ setNumber__25dLytCommonIconItemPart2_cFl = .text:0x80112AC0; // type:function si setNumberColor__25dLytCommonIconItemPart2_cFUc = .text:0x80112B50; // type:function size:0xB8 setOn__25dLytCommonIconItemPart2_cFv = .text:0x80112C10; // type:function size:0x2C setOff__25dLytCommonIconItemPart2_cFv = .text:0x80112C40; // type:function size:0x2C -startDecide__25dLytCommonIconItemPart2_cFv = .text:0x80112C70; // type:function size:0x60 +startConfirm__25dLytCommonIconItemPart2_cFv = .text:0x80112C70; // type:function size:0x60 isDoneDeciding__25dLytCommonIconItemPart2_cCFv = .text:0x80112CD0; // type:function size:0x8 isCursorOver__25dLytCommonIconItemPart2_cCFv = .text:0x80112CE0; // type:function size:0x7C setVisible__25dLytCommonIconItemPart2_cFb = .text:0x80112D60; // type:function size:0x34 @@ -6724,7 +6724,7 @@ setNumber__20dLytCommonIconItem_cFl = .text:0x80113760; // type:function size:0x setNumberColor__20dLytCommonIconItem_cFUc = .text:0x80113790; // type:function size:0x2C setOn__20dLytCommonIconItem_cFv = .text:0x801137C0; // type:function size:0x2C setOff__20dLytCommonIconItem_cFv = .text:0x801137F0; // type:function size:0x2C -startDecide__20dLytCommonIconItem_cFv = .text:0x80113820; // type:function size:0x2C +startConfirm__20dLytCommonIconItem_cFv = .text:0x80113820; // type:function size:0x2C isDoneDeciding__20dLytCommonIconItem_cCFv = .text:0x80113850; // type:function size:0x68 isCursorOver__20dLytCommonIconItem_cCFv = .text:0x801138C0; // type:function size:0x88 setVisible__20dLytCommonIconItem_cFb = .text:0x80113950; // type:function size:0x3C @@ -6757,21 +6757,21 @@ __dt__30sFState_c<17dLytAutoExplain_c>Fv = .text:0x801155A0; // type:function si __dt__33sFStateFct_c<17dLytAutoExplain_c>Fv = .text:0x80115600; // type:function size:0x6C __dt__86sStateMgr_c<17dLytAutoExplain_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80115670; // type:function size:0xA0 __dt__56sFStateMgr_c<17dLytAutoExplain_c,20sStateMethodUsr_FI_c>Fv = .text:0x80115710; // type:function size:0xA4 -vt_0x30__20dLytMsgWindowSubtypeFv = .text:0x801157C0; // type:function size:0x8 +getTextBox__20dLytMsgWindowSubtypeFv = .text:0x801157C0; // type:function size:0x8 finalizeState_Invisible__15dLytMsgWindow_cFv = .text:0x801157D0; // type:function size:0x4 initializeState_In__15dLytMsgWindow_cFv = .text:0x801157E0; // type:function size:0x12C executeState_In__15dLytMsgWindow_cFv = .text:0x80115910; // type:function size:0x60 finalizeState_In__15dLytMsgWindow_cFv = .text:0x80115970; // type:function size:0x4 initializeState_OutputText__15dLytMsgWindow_cFv = .text:0x80115980; // type:function size:0x18 executeState_OutputText__15dLytMsgWindow_cFv = .text:0x801159A0; // type:function size:0x2A0 -vt_0x34__20dLytMsgWindowSubtypeFv = .text:0x80115C40; // type:function size:0x8 +startConfirm__20dLytMsgWindowSubtypeFv = .text:0x80115C40; // type:function size:0x8 finalizeState_OutputText__15dLytMsgWindow_cFv = .text:0x80115C50; // type:function size:0x4 initializeState_WaitKeyChangePage0__15dLytMsgWindow_cFv = .text:0x80115C60; // type:function size:0x30 executeState_WaitKeyChangePage0__15dLytMsgWindow_cFv = .text:0x80115C90; // type:function size:0x140 finalizeState_WaitKeyChangePage0__15dLytMsgWindow_cFv = .text:0x80115DD0; // type:function size:0x4 initializeState_WaitKeyChangePage1__15dLytMsgWindow_cFv = .text:0x80115DE0; // type:function size:0x4 executeState_WaitKeyChangePage1__15dLytMsgWindow_cFv = .text:0x80115DF0; // type:function size:0xB4 -vt_0x38__20dLytMsgWindowSubtypeFb = .text:0x80115EB0; // type:function size:0x8 +startDecide__20dLytMsgWindowSubtypeFb = .text:0x80115EB0; // type:function size:0x8 finalizeState_WaitKeyChangePage1__15dLytMsgWindow_cFv = .text:0x80115EC0; // type:function size:0x4 initializeState_WaitKeyMsgEnd0__15dLytMsgWindow_cFv = .text:0x80115ED0; // type:function size:0x40 executeState_WaitKeyMsgEnd0__15dLytMsgWindow_cFv = .text:0x80115F10; // type:function size:0x258 @@ -6781,7 +6781,7 @@ executeState_WaitKeyMsgEnd1__15dLytMsgWindow_cFv = .text:0x80116190; // type:fun finalizeState_WaitKeyMsgEnd1__15dLytMsgWindow_cFv = .text:0x80116370; // type:function size:0x4 initializeState_WaitKeyMsgEnd2__15dLytMsgWindow_cFv = .text:0x80116380; // type:function size:0x4 executeState_WaitKeyMsgEnd2__15dLytMsgWindow_cFv = .text:0x80116390; // type:function size:0x60 -vt_0x3C__20dLytMsgWindowSubtypeCFv = .text:0x801163F0; // type:function size:0x8 +isDoneDecide__20dLytMsgWindowSubtypeCFv = .text:0x801163F0; // type:function size:0x8 finalizeState_WaitKeyMsgEnd2__15dLytMsgWindow_cFv = .text:0x80116400; // type:function size:0x4 initializeState_WaitKeySelectQuestion__15dLytMsgWindow_cFv = .text:0x80116410; // type:function size:0xD0 executeState_WaitKeySelectQuestion__15dLytMsgWindow_cFv = .text:0x801164E0; // type:function size:0x15C @@ -6844,43 +6844,43 @@ __dt__33sFState_c<20dLytMsgWindowStone_c>Fv = .text:0x80117D30; // type:function __dt__36sFStateFct_c<20dLytMsgWindowStone_c>Fv = .text:0x80117D90; // type:function size:0x6C __dt__89sStateMgr_c<20dLytMsgWindowStone_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80117E00; // type:function size:0xA0 __dt__59sFStateMgr_c<20dLytMsgWindowStone_c,20sStateMethodUsr_FI_c>Fv = .text:0x80117EA0; // type:function size:0xA4 -LytMsgWindowSword__ctor = .text:0x80117F50; // type:function size:0x1F0 -fn_80118140 = .text:0x80118140; // type:function size:0x58 -fn_801181A0 = .text:0x801181A0; // type:function size:0x6C -fn_80118210 = .text:0x80118210; // type:function size:0xA0 -fn_801182B0 = .text:0x801182B0; // type:function size:0xA4 -fn_80118360 = .text:0x80118360; // type:function size:0x70 -LytMsgWindowSword__setSubtype = .text:0x801183D0; // type:function size:0x8 -LytLinkWindow__ctor = .text:0x801183E0; // type:function size:0x1FC +__ct__20dLytMsgWindowSword_cFv = .text:0x80117F50; // type:function size:0x1F0 +__dt__33sFState_c<20dLytMsgWindowSword_c>Fv = .text:0x80118140; // type:function size:0x58 +__dt__36sFStateFct_c<20dLytMsgWindowSword_c>Fv = .text:0x801181A0; // type:function size:0x6C +__dt__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80118210; // type:function size:0xA0 +__dt__59sFStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c>Fv = .text:0x801182B0; // type:function size:0xA4 +__dt__13dLytTextSwordFv = .text:0x80118360; // type:function size:0x70 +setSwordType__20dLytMsgWindowSword_cFQ213dLytTextSword10ESwordType = .text:0x801183D0; // type:function size:0x8 +__ct__19dLytMsgWindowLink_cFv = .text:0x801183E0; // type:function size:0x1FC fn_801185E0 = .text:0x801185E0; // type:function size:0x58 fn_80118640 = .text:0x80118640; // type:function size:0x6C fn_801186B0 = .text:0x801186B0; // type:function size:0xA0 fn_80118750 = .text:0x80118750; // type:function size:0xA4 fn_80118800 = .text:0x80118800; // type:function size:0x70 fn_80118870 = .text:0x80118870; // type:function size:0x40 -fn_801188B0 = .text:0x801188B0; // type:function size:0x1FC +__ct__18dLytMsgWindowGet_cFv = .text:0x801188B0; // type:function size:0x1FC fn_80118AB0 = .text:0x80118AB0; // type:function size:0x58 fn_80118B10 = .text:0x80118B10; // type:function size:0x6C fn_80118B80 = .text:0x80118B80; // type:function size:0xA0 fn_80118C20 = .text:0x80118C20; // type:function size:0xA4 -LytMsgWindowDemo__ctor = .text:0x80118CD0; // type:function size:0x1B0 +__ct__19dLytMsgWindowDemo_cFv = .text:0x80118CD0; // type:function size:0x1B0 fn_80118E80 = .text:0x80118E80; // type:function size:0x58 fn_80118EE0 = .text:0x80118EE0; // type:function size:0x6C fn_80118F50 = .text:0x80118F50; // type:function size:0xA0 fn_80118FF0 = .text:0x80118FF0; // type:function size:0xA4 -LytMsgWindowTalk__ctor = .text:0x801190A0; // type:function size:0x1FC +__ct__19dLytMsgWindowTalk_cFv = .text:0x801190A0; // type:function size:0x1FC fn_801192A0 = .text:0x801192A0; // type:function size:0x58 fn_80119300 = .text:0x80119300; // type:function size:0x6C fn_80119370 = .text:0x80119370; // type:function size:0xA0 fn_80119410 = .text:0x80119410; // type:function size:0xA4 removeSubMsgManagers__15dLytMsgWindow_cFv = .text:0x801194C0; // type:function size:0x40C -LytMsgWindowTalk__dtor = .text:0x801198D0; // type:function size:0x198 -fn_80119A70 = .text:0x80119A70; // type:function size:0x198 -LytMsgWindowSword__dtor = .text:0x80119C10; // type:function size:0x198 +__dt__19dLytMsgWindowTalk_cFv = .text:0x801198D0; // type:function size:0x198 +__dt__19dLytMsgWindowLink_cFv = .text:0x80119A70; // type:function size:0x198 +__dt__20dLytMsgWindowSword_cFv = .text:0x80119C10; // type:function size:0x198 __dt__19dLytMsgWindowWood_cFv = .text:0x80119DB0; // type:function size:0x170 __dt__20dLytMsgWindowStone_cFv = .text:0x80119F20; // type:function size:0x170 -fn_8011A090 = .text:0x8011A090; // type:function size:0x198 -fn_8011A230 = .text:0x8011A230; // type:function size:0x158 +__dt__18dLytMsgWindowGet_cFv = .text:0x8011A090; // type:function size:0x198 +__dt__19dLytMsgWindowDemo_cFv = .text:0x8011A230; // type:function size:0x158 __dt__17dLytAutoExplain_cFv = .text:0x8011A390; // type:function size:0x118 __dt__17dLytAutoCaption_cFv = .text:0x8011A4B0; // type:function size:0x118 fn_8011A5D0__15dLytMsgWindow_cCFv = .text:0x8011A5D0; // type:function size:0x1AC @@ -6890,7 +6890,7 @@ fn_8011A7A0 = .text:0x8011A7A0; // type:function size:0x10 fn_8011A7B0 = .text:0x8011A7B0; // type:function size:0x10 changeState__89sStateMgr_c<20dLytMsgWindowStone_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x8011A7C0; // type:function size:0x10 changeState__88sStateMgr_c<19dLytMsgWindowWood_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x8011A7D0; // type:function size:0x10 -fn_8011A7E0 = .text:0x8011A7E0; // type:function size:0x10 +changeState__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x8011A7E0; // type:function size:0x10 fn_8011A7F0 = .text:0x8011A7F0; // type:function size:0x10 fn_8011A800 = .text:0x8011A800; // type:function size:0x10 build__33sFStateFct_c<17dLytAutoCaption_c>FRC12sStateIDIf_c = .text:0x8011A810; // type:function size:0x60 @@ -6905,8 +6905,8 @@ build__36sFStateFct_c<20dLytMsgWindowStone_c>FRC12sStateIDIf_c = .text:0x8011A9D dispose__36sFStateFct_c<20dLytMsgWindowStone_c>FRP10sStateIf_c = .text:0x8011AA30; // type:function size:0xC build__35sFStateFct_c<19dLytMsgWindowWood_c>FRC12sStateIDIf_c = .text:0x8011AA40; // type:function size:0x60 dispose__35sFStateFct_c<19dLytMsgWindowWood_c>FRP10sStateIf_c = .text:0x8011AAA0; // type:function size:0xC -fn_8011AAB0 = .text:0x8011AAB0; // type:function size:0x60 -fn_8011AB10 = .text:0x8011AB10; // type:function size:0xC +build__36sFStateFct_c<20dLytMsgWindowSword_c>FRC12sStateIDIf_c = .text:0x8011AAB0; // type:function size:0x60 +dispose__36sFStateFct_c<20dLytMsgWindowSword_c>FRP10sStateIf_c = .text:0x8011AB10; // type:function size:0xC fn_8011AB20 = .text:0x8011AB20; // type:function size:0x60 fn_8011AB80 = .text:0x8011AB80; // type:function size:0xC fn_8011AB90 = .text:0x8011AB90; // type:function size:0x60 @@ -6929,9 +6929,9 @@ finalize__33sFState_c<20dLytMsgWindowStone_c>Fv = .text:0x8011ADC0; // type:func initialize__32sFState_c<19dLytMsgWindowWood_c>Fv = .text:0x8011ADE0; // type:function size:0x1C execute__32sFState_c<19dLytMsgWindowWood_c>Fv = .text:0x8011AE00; // type:function size:0x1C finalize__32sFState_c<19dLytMsgWindowWood_c>Fv = .text:0x8011AE20; // type:function size:0x1C -fn_8011AE40 = .text:0x8011AE40; // type:function size:0x1C -fn_8011AE60 = .text:0x8011AE60; // type:function size:0x1C -fn_8011AE80 = .text:0x8011AE80; // type:function size:0x1C +initialize__33sFState_c<20dLytMsgWindowSword_c>Fv = .text:0x8011AE40; // type:function size:0x1C +execute__33sFState_c<20dLytMsgWindowSword_c>Fv = .text:0x8011AE60; // type:function size:0x1C +finalize__33sFState_c<20dLytMsgWindowSword_c>Fv = .text:0x8011AE80; // type:function size:0x1C fn_8011AEA0 = .text:0x8011AEA0; // type:function size:0x1C fn_8011AEC0 = .text:0x8011AEC0; // type:function size:0x1C fn_8011AEE0 = .text:0x8011AEE0; // type:function size:0x1C @@ -6986,14 +6986,14 @@ getState__88sStateMgr_c<19dLytMsgWindowWood_c,20sStateMethodUsr_FI_c,12sFStateFc getNewStateID__88sStateMgr_c<19dLytMsgWindowWood_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8011B230; // type:function size:0x10 getStateID__88sStateMgr_c<19dLytMsgWindowWood_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8011B240; // type:function size:0x10 getOldStateID__88sStateMgr_c<19dLytMsgWindowWood_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8011B250; // type:function size:0x10 -fn_8011B260 = .text:0x8011B260; // type:function size:0x10 -fn_8011B270 = .text:0x8011B270; // type:function size:0x10 -fn_8011B280 = .text:0x8011B280; // type:function size:0x10 -fn_8011B290 = .text:0x8011B290; // type:function size:0x10 -fn_8011B2A0 = .text:0x8011B2A0; // type:function size:0x10 -fn_8011B2B0 = .text:0x8011B2B0; // type:function size:0x10 -fn_8011B2C0 = .text:0x8011B2C0; // type:function size:0x10 -fn_8011B2D0 = .text:0x8011B2D0; // type:function size:0x10 +initializeState__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8011B260; // type:function size:0x10 +executeState__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8011B270; // type:function size:0x10 +finalizeState__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8011B280; // type:function size:0x10 +refreshState__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8011B290; // type:function size:0x10 +getState__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8011B2A0; // type:function size:0x10 +getNewStateID__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8011B2B0; // type:function size:0x10 +getStateID__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8011B2C0; // type:function size:0x10 +getOldStateID__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8011B2D0; // type:function size:0x10 fn_8011B2E0 = .text:0x8011B2E0; // type:function size:0x10 fn_8011B2F0 = .text:0x8011B2F0; // type:function size:0x10 fn_8011B300 = .text:0x8011B300; // type:function size:0x10 @@ -7019,9 +7019,9 @@ fn_8011B4D0 = .text:0x8011B4D0; // type:function size:0x30 fn_8011B500 = .text:0x8011B500; // type:function size:0x30 fn_8011B530 = .text:0x8011B530; // type:function size:0x30 fn_8011B560 = .text:0x8011B560; // type:function size:0x30 -fn_8011B590 = .text:0x8011B590; // type:function size:0x30 -fn_8011B5C0 = .text:0x8011B5C0; // type:function size:0x30 -fn_8011B5F0 = .text:0x8011B5F0; // type:function size:0x30 +finalizeState__35sFStateID_c<20dLytMsgWindowSword_c>CFR20dLytMsgWindowSword_c = .text:0x8011B590; // type:function size:0x30 +executeState__35sFStateID_c<20dLytMsgWindowSword_c>CFR20dLytMsgWindowSword_c = .text:0x8011B5C0; // type:function size:0x30 +initializeState__35sFStateID_c<20dLytMsgWindowSword_c>CFR20dLytMsgWindowSword_c = .text:0x8011B5F0; // type:function size:0x30 finalizeState__34sFStateID_c<19dLytMsgWindowWood_c>CFR19dLytMsgWindowWood_c = .text:0x8011B620; // type:function size:0x30 executeState__34sFStateID_c<19dLytMsgWindowWood_c>CFR19dLytMsgWindowWood_c = .text:0x8011B650; // type:function size:0x30 initializeState__34sFStateID_c<19dLytMsgWindowWood_c>CFR19dLytMsgWindowWood_c = .text:0x8011B680; // type:function size:0x30 @@ -7123,10 +7123,10 @@ fn_80120A60 = .text:0x80120A60; // type:function size:0x8 fn_80120A70 = .text:0x80120A70; // type:function size:0x4 fn_80120A80 = .text:0x80120A80; // type:function size:0x8 fn_80120A90 = .text:0x80120A90; // type:function size:0x8 -fn_80120AA0 = .text:0x80120AA0; // type:function size:0x188 -fn_80120C30 = .text:0x80120C30; // type:function size:0x28 -fn_80120C60 = .text:0x80120C60; // type:function size:0x14C -fn_80120DB0 = .text:0x80120DB0; // type:function size:0xC +build__13dLytTextSwordFPQ23d2d10ResAccIf_cQ213dLytTextSword10ESwordType = .text:0x80120AA0; // type:function size:0x188 +remove__13dLytTextSwordFv = .text:0x80120C30; // type:function size:0x28 +draw__13dLytTextSwordFPCwScRC7mVec3_cf = .text:0x80120C60; // type:function size:0x14C +fn_80120DB0__13dLytTextSwordCFv = .text:0x80120DB0; // type:function size:0xC fn_80120DC0 = .text:0x80120DC0; // type:function size:0x104 fn_80120ED0 = .text:0x80120ED0; // type:function size:0x28 fn_80120F00 = .text:0x80120F00; // type:function size:0x14C @@ -7222,37 +7222,37 @@ fn_80124240 = .text:0x80124240; // type:function size:0x8 LytMsgWindowGet__initStates = .text:0x80124250; // type:function size:0x338 LytMsgWindowGet__dtor = .text:0x80124590; // type:function size:0x58 fn_801245F0 = .text:0x801245F0; // type:function size:0x88 -fn_80124680 = .text:0x80124680; // type:function size:0x3A4 -fn_80124A30 = .text:0x80124A30; // type:function size:0xE0 -LytMsgWindowSword__stateInvisibleEnter = .text:0x80124B10; // type:function size:0x8 -LytMsgWindowSword__stateInvisibleUpdate = .text:0x80124B20; // type:function size:0x28 -LytMsgWindowSword__stateInvisibleLeave = .text:0x80124B50; // type:function size:0x4 -LytMsgWindowSword__stateInEnter = .text:0x80124B60; // type:function size:0xF0 -LytMsgWindowSword__stateInUpdate = .text:0x80124C50; // type:function size:0x194 -LytMsgWindowSword__stateInLeave = .text:0x80124DF0; // type:function size:0x4 -LytMsgWindowSword__stateWaitEnter = .text:0x80124E00; // type:function size:0x10 -LytMsgWindowSword__stateWaitUpdate = .text:0x80124E10; // type:function size:0x2C -LytMsgWindowSword__stateWaitLeave = .text:0x80124E40; // type:function size:0x4 -LytMsgWindowSword__stateVisibleEnter = .text:0x80124E50; // type:function size:0x12C -fn_80124F80 = .text:0x80124F80; // type:function size:0x8 -LytMsgWindowSword__stateVisibleUpdate = .text:0x80124F90; // type:function size:0x28 -LytMsgWindowSword__stateVisibleLeave = .text:0x80124FC0; // type:function size:0x4 -LytMsgWindowSword__stateOutEnter = .text:0x80124FD0; // type:function size:0x60 -LytMsgWindowSword__stateOutUpdate = .text:0x80125030; // type:function size:0x180 -LytMsgWindowSword__stateOutLeave = .text:0x801251B0; // type:function size:0x4 -fn_801251C0 = .text:0x801251C0; // type:function size:0xC4 -fn_80125290 = .text:0x80125290; // type:function size:0x158 -fn_801253F0 = .text:0x801253F0; // type:function size:0x14 -LytMsgWindowSword__checkIsOpenComplete = .text:0x80125410; // type:function size:0x9C -fn_801254B0 = .text:0x801254B0; // type:function size:0xC -LytMsgWindowSword__checkIsNotInOutState = .text:0x801254C0; // type:function size:0x4C -LytMsgWindowSword__setTextToDisplay = .text:0x80125510; // type:function size:0x174 -fn_80125690 = .text:0x80125690; // type:function size:0x8 -fn_801256A0 = .text:0x801256A0; // type:function size:0x8 -fn_801256B0 = .text:0x801256B0; // type:function size:0x8 -LytMsgWindowSword__initStates = .text:0x801256C0; // type:function size:0x3F4 -LytMsgWindowSword__dtor2 = .text:0x80125AC0; // type:function size:0x58 -fn_80125B20 = .text:0x80125B20; // type:function size:0x88 +build__20dLytMsgWindowSword_cFPQ23d2d10ResAccIf_cPQ23d2d10ResAccIf_cP15dTagProcessor_c = .text:0x80124680; // type:function size:0x3A4 +remove__20dLytMsgWindowSword_cFv = .text:0x80124A30; // type:function size:0xE0 +initializeState_Invisible__20dLytMsgWindowSword_cFv = .text:0x80124B10; // type:function size:0x8 +executeState_Invisible__20dLytMsgWindowSword_cFv = .text:0x80124B20; // type:function size:0x28 +finalizeState_Invisible__20dLytMsgWindowSword_cFv = .text:0x80124B50; // type:function size:0x4 +initializeState_In__20dLytMsgWindowSword_cFv = .text:0x80124B60; // type:function size:0xF0 +executeState_In__20dLytMsgWindowSword_cFv = .text:0x80124C50; // type:function size:0x194 +finalizeState_In__20dLytMsgWindowSword_cFv = .text:0x80124DF0; // type:function size:0x4 +initializeState_Wait__20dLytMsgWindowSword_cFv = .text:0x80124E00; // type:function size:0x10 +executeState_Wait__20dLytMsgWindowSword_cFv = .text:0x80124E10; // type:function size:0x2C +finalizeState_Wait__20dLytMsgWindowSword_cFv = .text:0x80124E40; // type:function size:0x4 +initializeState_Visible__20dLytMsgWindowSword_cFv = .text:0x80124E50; // type:function size:0x12C +getTextBox__20dLytMsgWindowSword_cFv = .text:0x80124F80; // type:function size:0x8 +executeState_Visible__20dLytMsgWindowSword_cFv = .text:0x80124F90; // type:function size:0x28 +finalizeState_Visible__20dLytMsgWindowSword_cFv = .text:0x80124FC0; // type:function size:0x4 +initializeState_Out__20dLytMsgWindowSword_cFv = .text:0x80124FD0; // type:function size:0x60 +executeState_Out__20dLytMsgWindowSword_cFv = .text:0x80125030; // type:function size:0x180 +finalizeState_Out__20dLytMsgWindowSword_cFv = .text:0x801251B0; // type:function size:0x4 +execute__20dLytMsgWindowSword_cFv = .text:0x801251C0; // type:function size:0xC4 +draw__20dLytMsgWindowSword_cFv = .text:0x80125290; // type:function size:0x158 +open__20dLytMsgWindowSword_cFP12dAcObjBase_cUl = .text:0x801253F0; // type:function size:0x14 +isDoneOpening__20dLytMsgWindowSword_cCFv = .text:0x80125410; // type:function size:0x9C +close__20dLytMsgWindowSword_cFv = .text:0x801254B0; // type:function size:0xC +isDoneClosing__20dLytMsgWindowSword_cCFv = .text:0x801254C0; // type:function size:0x4C +setText__20dLytMsgWindowSword_cFPCw = .text:0x80125510; // type:function size:0x174 +isDoneDecide__20dLytMsgWindowSword_cCFv = .text:0x80125690; // type:function size:0x8 +startDecide__20dLytMsgWindowSword_cFb = .text:0x801256A0; // type:function size:0x8 +startConfirm__20dLytMsgWindowSword_cFv = .text:0x801256B0; // type:function size:0x8 +__sinit_\d_lyt_msg_window_sword_cpp = .text:0x801256C0; // type:function size:0x3F4 scope:local +__dt__35sFStateID_c<20dLytMsgWindowSword_c>Fv = .text:0x80125AC0; // type:function size:0x58 +isSameName__35sFStateID_c<20dLytMsgWindowSword_c>CFPCc = .text:0x80125B20; // type:function size:0x88 build__19dLytMsgWindowWood_cFPQ23d2d10ResAccIf_cPQ23d2d10ResAccIf_cP15dTagProcessor_c = .text:0x80125BB0; // type:function size:0x278 remove__19dLytMsgWindowWood_cFv = .text:0x80125E30; // type:function size:0xD8 initializeState_Invisible__19dLytMsgWindowWood_cFv = .text:0x80125F10; // type:function size:0x8 @@ -7274,10 +7274,10 @@ isDoneOpening__19dLytMsgWindowWood_cCFv = .text:0x80126260; // type:function siz close__19dLytMsgWindowWood_cFv = .text:0x801262B0; // type:function size:0xC isDoneClosing__19dLytMsgWindowWood_cCFv = .text:0x801262C0; // type:function size:0x4C setText__19dLytMsgWindowWood_cFPCw = .text:0x80126310; // type:function size:0x7C -vt_0x3C__19dLytMsgWindowWood_cCFv = .text:0x80126390; // type:function size:0x8 -vt_0x38__19dLytMsgWindowWood_cFb = .text:0x801263A0; // type:function size:0x8 -vt_0x34__19dLytMsgWindowWood_cFv = .text:0x801263B0; // type:function size:0x8 -vt_0x30__19dLytMsgWindowWood_cFv = .text:0x801263C0; // type:function size:0x8 +isDoneDecide__19dLytMsgWindowWood_cCFv = .text:0x80126390; // type:function size:0x8 +startDecide__19dLytMsgWindowWood_cFb = .text:0x801263A0; // type:function size:0x8 +startConfirm__19dLytMsgWindowWood_cFv = .text:0x801263B0; // type:function size:0x8 +getTextBox__19dLytMsgWindowWood_cFv = .text:0x801263C0; // type:function size:0x8 __sinit_\d_lyt_msg_window_wood_cpp = .text:0x801263D0; // type:function size:0x338 scope:local __dt__34sFStateID_c<19dLytMsgWindowWood_c>Fv = .text:0x80126710; // type:function size:0x58 isSameName__34sFStateID_c<19dLytMsgWindowWood_c>CFPCc = .text:0x80126770; // type:function size:0x88 @@ -7302,10 +7302,10 @@ isDoneOpening__20dLytMsgWindowStone_cCFv = .text:0x80126EC0; // type:function si close__20dLytMsgWindowStone_cFv = .text:0x80126F10; // type:function size:0xC isDoneClosing__20dLytMsgWindowStone_cCFv = .text:0x80126F20; // type:function size:0x4C setText__20dLytMsgWindowStone_cFPCw = .text:0x80126F70; // type:function size:0xA0 -vt_0x3C__20dLytMsgWindowStone_cCFv = .text:0x80127010; // type:function size:0x8 -vt_0x38__20dLytMsgWindowStone_cFb = .text:0x80127020; // type:function size:0x8 -vt_0x34__20dLytMsgWindowStone_cFv = .text:0x80127030; // type:function size:0x8 -vt_0x30__20dLytMsgWindowStone_cFv = .text:0x80127040; // type:function size:0x8 +isDoneDecide__20dLytMsgWindowStone_cCFv = .text:0x80127010; // type:function size:0x8 +startDecide__20dLytMsgWindowStone_cFb = .text:0x80127020; // type:function size:0x8 +startConfirm__20dLytMsgWindowStone_cFv = .text:0x80127030; // type:function size:0x8 +getTextBox__20dLytMsgWindowStone_cFv = .text:0x80127040; // type:function size:0x8 __sinit_\d_lyt_msg_window_stone_cpp = .text:0x80127050; // type:function size:0x338 scope:local __dt__35sFStateID_c<20dLytMsgWindowStone_c>Fv = .text:0x80127390; // type:function size:0x58 isSameName__35sFStateID_c<20dLytMsgWindowStone_c>CFPCc = .text:0x801273F0; // type:function size:0x88 @@ -7443,7 +7443,7 @@ close__17dLytAutoCaption_cFv = .text:0x8012BF60; // type:function size:0xC isDoneClosing__17dLytAutoCaption_cCFv = .text:0x8012BF70; // type:function size:0x4C setText__17dLytAutoCaption_cFPCw = .text:0x8012BFC0; // type:function size:0x64 checkSomethingMeter__17dLytAutoCaption_cFv = .text:0x8012C030; // type:function size:0xF4 -vt_0x30__17dLytAutoCaption_cFv = .text:0x8012C130; // type:function size:0x8 +getTextBox__17dLytAutoCaption_cFv = .text:0x8012C130; // type:function size:0x8 __sinit_\d_lyt_auto_caption_cpp = .text:0x8012C140; // type:function size:0x338 __dt__32sFStateID_c<17dLytAutoCaption_c>Fv = .text:0x8012C480; // type:function size:0x58 isSameName__32sFStateID_c<17dLytAutoCaption_c>CFPCc = .text:0x8012C4E0; // type:function size:0x88 @@ -7469,7 +7469,7 @@ close__17dLytAutoExplain_cFv = .text:0x8012CB70; // type:function size:0xC isDoneClosing__17dLytAutoExplain_cCFv = .text:0x8012CB80; // type:function size:0x4C setText__17dLytAutoExplain_cFPCw = .text:0x8012CBD0; // type:function size:0x7C checkSomethingMeter__17dLytAutoExplain_cFv = .text:0x8012CC50; // type:function size:0xF4 -vt_0x30__17dLytAutoExplain_cFv = .text:0x8012CD50; // type:function size:0x8 +getTextBox__17dLytAutoExplain_cFv = .text:0x8012CD50; // type:function size:0x8 __sinit_\d_lyt_auto_explain_cpp = .text:0x8012CD60; // type:function size:0x338 __dt__32sFStateID_c<17dLytAutoExplain_c>Fv = .text:0x8012D0A0; // type:function size:0x58 isSameName__32sFStateID_c<17dLytAutoExplain_c>CFPCc = .text:0x8012D100; // type:function size:0x88 @@ -32082,10 +32082,10 @@ __vt__58sFStateMgr_c<19dLytMsgWindowWood_c,20sStateMethodUsr_FI_c> = .data:0x805 __vt__88sStateMgr_c<19dLytMsgWindowWood_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x8051BA98; // type:object size:0x30 __vt__35sFStateFct_c<19dLytMsgWindowWood_c> = .data:0x8051BAC8; // type:object size:0x18 __vt__32sFState_c<19dLytMsgWindowWood_c> = .data:0x8051BAE0; // type:object size:0x18 -lbl_8051BAF8 = .data:0x8051BAF8; // type:object size:0x30 -lbl_8051BB28 = .data:0x8051BB28; // type:object size:0x30 -lbl_8051BB58 = .data:0x8051BB58; // type:object size:0x18 -lbl_8051BB70 = .data:0x8051BB70; // type:object size:0x18 +__vt__59sFStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c> = .data:0x8051BAF8; // type:object size:0x30 +__vt__89sStateMgr_c<20dLytMsgWindowSword_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x8051BB28; // type:object size:0x30 +__vt__36sFStateFct_c<20dLytMsgWindowSword_c> = .data:0x8051BB58; // type:object size:0x18 +__vt__33sFState_c<20dLytMsgWindowSword_c> = .data:0x8051BB70; // type:object size:0x18 lbl_8051BB88 = .data:0x8051BB88; // type:object size:0x30 lbl_8051BBB8 = .data:0x8051BBB8; // type:object size:0x30 lbl_8051BBE8 = .data:0x8051BBE8; // type:object size:0x18 @@ -32096,7 +32096,7 @@ lbl_8051BC78 = .data:0x8051BC78; // type:object size:0x18 lbl_8051BC90 = .data:0x8051BC90; // type:object size:0x18 lbl_8051BCA8 = .data:0x8051BCA8; // type:object size:0xC lbl_8051BCB4 = .data:0x8051BCB4; // type:object size:0xC -lbl_8051BCC0 = .data:0x8051BCC0; // type:object size:0x60C +__vt__13dLytTextSword = .data:0x8051BCC0; // type:object size:0xC __vt__30sFStateID_c<15dLytMsgWindow_c> = .data:0x8051C2CC; // type:object size:0x34 lbl_8051C300 = .data:0x8051C300; // type:object size:0xC lbl_8051C30C = .data:0x8051C30C; // type:object size:0xC data:string @@ -32232,8 +32232,8 @@ lbl_8051D674 = .data:0x8051D674; // type:object size:0x10 lbl_8051D684 = .data:0x8051D684; // type:object size:0x10 lbl_8051D694 = .data:0x8051D694; // type:object size:0xC lbl_8051D6A0 = .data:0x8051D6A0; // type:object size:0x18 -LytMsgWindowSword__vtable = .data:0x8051D6B8; // type:object size:0x1B4 -lbl_8051D86C = .data:0x8051D86C; // type:object size:0x34 +__vt__20dLytMsgWindowSword_c = .data:0x8051D6B8; // type:object size:0x44 +__vt__35sFStateID_c<20dLytMsgWindowSword_c> = .data:0x8051D86C; // type:object size:0x34 lbl_8051D8A0 = .data:0x8051D8A0; // type:object size:0x19 data:string lbl_8051D8BC = .data:0x8051D8BC; // type:object size:0xB data:string lbl_8051D8C8 = .data:0x8051D8C8; // type:object size:0x1B data:string diff --git a/include/d/d_textunk.h b/include/d/d_textunk.h index c2ceddf5..d3f7240e 100644 --- a/include/d/d_textunk.h +++ b/include/d/d_textunk.h @@ -125,6 +125,10 @@ public: field_0x104 = str; } + s16 getField_0x7AE() const { + return field_0x7AE; + } + bool getField_0x7B4() const { return field_0x7B4; } diff --git a/include/d/lyt/d2d.h b/include/d/lyt/d2d.h index 7f79abcf..ce23507e 100644 --- a/include/d/lyt/d2d.h +++ b/include/d/lyt/d2d.h @@ -270,6 +270,10 @@ struct AnmGroupBase_c { syncAnmFrame(); } + inline f32 getRatio() const { + return mpFrameCtrl->getRatio(); + } + inline void setBackwardsRatio(f32 ratio) { mpFrameCtrl->setBackwardsRatio(ratio); syncAnmFrame(); diff --git a/include/d/lyt/d_lyt_auto_caption.h b/include/d/lyt/d_lyt_auto_caption.h index f66462f7..1a2bbfcd 100644 --- a/include/d/lyt/d_lyt_auto_caption.h +++ b/include/d/lyt/d_lyt_auto_caption.h @@ -22,7 +22,7 @@ public: /* vt 0x24 */ virtual void close() override; /* vt 0x28 */ virtual bool isDoneClosing() const override; /* vt 0x2C */ virtual bool setText(const wchar_t *text) override; - /* vt 0x30 */ virtual dTextBox_c *vt_0x30() override { + /* vt 0x30 */ virtual dTextBox_c *getTextBox() override { return mpTextboxes[0]; } diff --git a/include/d/lyt/d_lyt_auto_explain.h b/include/d/lyt/d_lyt_auto_explain.h index 1f6edf93..538bd2be 100644 --- a/include/d/lyt/d_lyt_auto_explain.h +++ b/include/d/lyt/d_lyt_auto_explain.h @@ -22,7 +22,7 @@ public: /* vt 0x24 */ virtual void close() override; /* vt 0x28 */ virtual bool isDoneClosing() const override; /* vt 0x2C */ virtual bool setText(const wchar_t *text) override; - /* vt 0x30 */ virtual dTextBox_c *vt_0x30() override { + /* vt 0x30 */ virtual dTextBox_c *getTextBox() override { return mpTextboxes[0]; } diff --git a/include/d/lyt/d_lyt_common_icon_item.h b/include/d/lyt/d_lyt_common_icon_item.h index 7e5712c7..66be9d60 100644 --- a/include/d/lyt/d_lyt_common_icon_item.h +++ b/include/d/lyt/d_lyt_common_icon_item.h @@ -56,7 +56,7 @@ public: void setNumberColor(u8 color); void setOn(); void setOff(); - void startDecide(); + void startConfirm(); bool isDoneDeciding() const; private: @@ -129,7 +129,7 @@ public: void setNumberColor(u8 color); void setOn(); void setOff(); - void startDecide(); + void startConfirm(); bool isDoneDeciding() const; void setShieldOnOff(bool onOff); @@ -264,7 +264,7 @@ public: /** The "decide" animation in the scrap shop makes the selected item flash for a short time before showing the upgrade screen */ - void startDecide(); + void startConfirm(); bool isDoneDeciding() const; void setShieldOnOff(bool onOff); diff --git a/include/d/lyt/msg_window/d_lyt_msg_window.h b/include/d/lyt/msg_window/d_lyt_msg_window.h index c764ce53..2ee9b484 100644 --- a/include/d/lyt/msg_window/d_lyt_msg_window.h +++ b/include/d/lyt/msg_window/d_lyt_msg_window.h @@ -10,8 +10,13 @@ #include "s/s_State.hpp" #include "sized_string.h" +class dLytMsgWindowTalk_c; +class dLytMsgWindowLink_c; +class dLytMsgWindowGet_c; +class dLytMsgWindowSword_c; class dLytMsgWindowWood_c; class dLytMsgWindowStone_c; +class dLytMsgWindowDemo_c; class dLytAutoExplain_c; class dLytAutoCaption_c; @@ -69,13 +74,13 @@ private: /* 0x724 */ dTagProcessor_c *mpTagProcessor; /* 0x728 */ dLytMsgWindowSubtype *mpCurrentSubtype; - /* 0x72C */ dLytMsgWindowSubtype *mpWindowTalk; - /* 0x730 */ dLytMsgWindowSubtype *mpWindowLink; - /* 0x734 */ dLytMsgWindowSubtype *mpWindowSword; + /* 0x72C */ dLytMsgWindowTalk_c *mpWindowTalk; + /* 0x730 */ dLytMsgWindowLink_c *mpWindowLink; + /* 0x734 */ dLytMsgWindowSword_c *mpWindowSword; /* 0x738 */ dLytMsgWindowWood_c *mpWindowWood; /* 0x73C */ dLytMsgWindowStone_c *mpWindowStone; - /* 0x740 */ dLytMsgWindowSubtype *mpWindowGet; - /* 0x744 */ dLytMsgWindowSubtype *mpWindowDemo; + /* 0x740 */ dLytMsgWindowGet_c *mpWindowGet; + /* 0x744 */ dLytMsgWindowDemo_c *mpWindowDemo; /* 0x748 */ dLytAutoExplain_c *mpAutoExplain; /* 0x74C */ dLytAutoCaption_c *mpAutoCaption; diff --git a/include/d/lyt/msg_window/d_lyt_msg_window_common.h b/include/d/lyt/msg_window/d_lyt_msg_window_common.h index 718fbdaa..d3ea5db9 100644 --- a/include/d/lyt/msg_window/d_lyt_msg_window_common.h +++ b/include/d/lyt/msg_window/d_lyt_msg_window_common.h @@ -6,6 +6,8 @@ #include "d/d_tag_processor.h" #include "d/lyt/d2d.h" #include "m/m2d.h" +#include "m/m_vec.h" +#include "nw4r/lyt/lyt_pane.h" class dLytMsgWindowSubtype : public m2d::Base_c { public: @@ -19,19 +21,44 @@ public: /* vt 0x24 */ virtual void close(); /* vt 0x28 */ virtual bool isDoneClosing() const; /* vt 0x2C */ virtual bool setText(const wchar_t *text); - /* vt 0x30 */ virtual dTextBox_c *vt_0x30() { + /* vt 0x30 */ virtual dTextBox_c *getTextBox() { return nullptr; } - /* vt 0x34 */ virtual bool vt_0x34() { + /* vt 0x34 */ virtual bool startConfirm() { return true; } - /* vt 0x38 */ virtual bool vt_0x38(bool b) { + /* vt 0x38 */ virtual bool startDecide(bool b) { return true; } - /* vt 0x3C */ virtual bool vt_0x3C() const { + /* vt 0x3C */ virtual bool isDoneDecide() const { return true; } /* vt 0x40 */ virtual bool vt_0x40() const; }; +class dLytTextSword { +public: + enum ESwordType { + FI, + GHIRAHIM, + LASTBOSS, + }; + + dLytTextSword() {} + /* vt at 0x00 */ + virtual ~dLytTextSword() {} + + bool build(d2d::ResAccIf_c *pResAcc, ESwordType type); + bool remove(); + void draw(const wchar_t *str, s8, const mVec3_c&, f32); + f32 fn_80120DB0() const; + +private: + /* 0x04 */ d2d::LytBase_c mLyt; + /* 0x90 */ d2d::AnmGroup_c mAnm; + /* 0xD4 */ dTextBox_c *mpTexts[3]; + /* 0xE0 */ nw4r::lyt::Pane *mpPane; + /* 0xE4 */ ESwordType mType; +}; + #endif diff --git a/include/d/lyt/msg_window/d_lyt_msg_window_demo.h b/include/d/lyt/msg_window/d_lyt_msg_window_demo.h new file mode 100644 index 00000000..2c3beb6d --- /dev/null +++ b/include/d/lyt/msg_window/d_lyt_msg_window_demo.h @@ -0,0 +1,48 @@ +#ifndef D_LYT_MSG_WINDOW_DEMO_H +#define D_LYT_MSG_WINDOW_DEMO_H + +#include "d/d_tag_processor.h" +#include "d/lyt/d2d.h" +#include "d/lyt/d_lyt_common_a_btn.h" +#include "d/lyt/d_textbox.h" +#include "d/lyt/msg_window/d_lyt_msg_window_common.h" +#include "nw4r/lyt/lyt_types.h" +#include "s/s_State.hpp" + +class dLytMsgWindowDemo_c : public dLytMsgWindowSubtype { +public: + dLytMsgWindowDemo_c() : mStateMgr(*this) {} + /* vt 0x08 */ virtual ~dLytMsgWindowDemo_c() {} + /* vt 0x0C */ virtual void draw() override; + /* vt 0x10 */ virtual bool + build(d2d::ResAccIf_c *resAcc1, d2d::ResAccIf_c *resAcc, dTagProcessor_c *tagProcessor) override; + /* vt 0x14 */ virtual bool remove() override; + /* vt 0x18 */ virtual bool execute() override; + /* vt 0x1C */ virtual void open(dAcObjBase_c *obj, u32 param) override; + /* vt 0x20 */ virtual bool isDoneOpening() const override; + /* vt 0x24 */ virtual void close() override; + /* vt 0x28 */ virtual bool isDoneClosing() const override; + /* vt 0x2C */ virtual bool setText(const wchar_t *text) override; + /* vt 0x30 */ virtual dTextBox_c *getTextBox() override { + return nullptr; + } + /* vt 0x34 */ virtual bool startConfirm() override { + return true; + } + /* vt 0x38 */ virtual bool startDecide(bool b) override { + return true; + } + /* vt 0x3C */ virtual bool isDoneDecide() const override { + return true; + } + + STATE_FUNC_DECLARE(dLytMsgWindowDemo_c, Invisible); + STATE_FUNC_DECLARE(dLytMsgWindowDemo_c, In); + STATE_FUNC_DECLARE(dLytMsgWindowDemo_c, Visible); + STATE_FUNC_DECLARE(dLytMsgWindowDemo_c, Out); + +private: + /* 0x010 */ UI_STATE_MGR_DECLARE(dLytMsgWindowDemo_c); +}; + +#endif diff --git a/include/d/lyt/msg_window/d_lyt_msg_window_get.h b/include/d/lyt/msg_window/d_lyt_msg_window_get.h new file mode 100644 index 00000000..0f36ac58 --- /dev/null +++ b/include/d/lyt/msg_window/d_lyt_msg_window_get.h @@ -0,0 +1,46 @@ +#ifndef D_LYT_MSG_WINDOW_GET_H +#define D_LYT_MSG_WINDOW_GET_H + +#include "d/d_tag_processor.h" +#include "d/lyt/d2d.h" +#include "d/lyt/d_textbox.h" +#include "d/lyt/msg_window/d_lyt_msg_window_common.h" +#include "s/s_State.hpp" + +class dLytMsgWindowGet_c : public dLytMsgWindowSubtype { +public: + dLytMsgWindowGet_c() : mStateMgr(*this) {} + /* vt 0x08 */ virtual ~dLytMsgWindowGet_c() {} + /* vt 0x0C */ virtual void draw() override; + /* vt 0x10 */ virtual bool + build(d2d::ResAccIf_c *resAcc1, d2d::ResAccIf_c *resAcc, dTagProcessor_c *tagProcessor) override; + /* vt 0x14 */ virtual bool remove() override; + /* vt 0x18 */ virtual bool execute() override; + /* vt 0x1C */ virtual void open(dAcObjBase_c *obj, u32 param) override; + /* vt 0x20 */ virtual bool isDoneOpening() const override; + /* vt 0x24 */ virtual void close() override; + /* vt 0x28 */ virtual bool isDoneClosing() const override; + /* vt 0x2C */ virtual bool setText(const wchar_t *text) override; + /* vt 0x30 */ virtual dTextBox_c *getTextBox() override { + return nullptr; + } + /* vt 0x34 */ virtual bool startConfirm() override { + return true; + } + /* vt 0x38 */ virtual bool startDecide(bool b) override { + return true; + } + /* vt 0x3C */ virtual bool isDoneDecide() const override { + return true; + } + + STATE_FUNC_DECLARE(dLytMsgWindowGet_c, Invisible); + STATE_FUNC_DECLARE(dLytMsgWindowGet_c, In); + STATE_FUNC_DECLARE(dLytMsgWindowGet_c, Visible); + STATE_FUNC_DECLARE(dLytMsgWindowGet_c, Out); + +private: + /* 0x010 */ UI_STATE_MGR_DECLARE(dLytMsgWindowGet_c); +}; + +#endif diff --git a/include/d/lyt/msg_window/d_lyt_msg_window_link.h b/include/d/lyt/msg_window/d_lyt_msg_window_link.h new file mode 100644 index 00000000..35f3e7d7 --- /dev/null +++ b/include/d/lyt/msg_window/d_lyt_msg_window_link.h @@ -0,0 +1,46 @@ +#ifndef D_LYT_MSG_WINDOW_LINK_H +#define D_LYT_MSG_WINDOW_LINK_H + +#include "d/d_tag_processor.h" +#include "d/lyt/d2d.h" +#include "d/lyt/d_textbox.h" +#include "d/lyt/msg_window/d_lyt_msg_window_common.h" +#include "s/s_State.hpp" + +class dLytMsgWindowLink_c : public dLytMsgWindowSubtype { +public: + dLytMsgWindowLink_c() : mStateMgr(*this) {} + /* vt 0x08 */ virtual ~dLytMsgWindowLink_c() {} + /* vt 0x0C */ virtual void draw() override; + /* vt 0x10 */ virtual bool + build(d2d::ResAccIf_c *resAcc1, d2d::ResAccIf_c *resAcc, dTagProcessor_c *tagProcessor) override; + /* vt 0x14 */ virtual bool remove() override; + /* vt 0x18 */ virtual bool execute() override; + /* vt 0x1C */ virtual void open(dAcObjBase_c *obj, u32 param) override; + /* vt 0x20 */ virtual bool isDoneOpening() const override; + /* vt 0x24 */ virtual void close() override; + /* vt 0x28 */ virtual bool isDoneClosing() const override; + /* vt 0x2C */ virtual bool setText(const wchar_t *text) override; + /* vt 0x30 */ virtual dTextBox_c *getTextBox() override { + return nullptr; + } + /* vt 0x34 */ virtual bool startConfirm() override { + return true; + } + /* vt 0x38 */ virtual bool startDecide(bool b) override { + return true; + } + /* vt 0x3C */ virtual bool isDoneDecide() const override { + return true; + } + + STATE_FUNC_DECLARE(dLytMsgWindowLink_c, Invisible); + STATE_FUNC_DECLARE(dLytMsgWindowLink_c, In); + STATE_FUNC_DECLARE(dLytMsgWindowLink_c, Visible); + STATE_FUNC_DECLARE(dLytMsgWindowLink_c, Out); + +private: + /* 0x010 */ UI_STATE_MGR_DECLARE(dLytMsgWindowLink_c); +}; + +#endif diff --git a/include/d/lyt/msg_window/d_lyt_msg_window_stone.h b/include/d/lyt/msg_window/d_lyt_msg_window_stone.h index 6a533581..cc98a9d3 100644 --- a/include/d/lyt/msg_window/d_lyt_msg_window_stone.h +++ b/include/d/lyt/msg_window/d_lyt_msg_window_stone.h @@ -23,16 +23,16 @@ public: /* vt 0x24 */ virtual void close() override; /* vt 0x28 */ virtual bool isDoneClosing() const override; /* vt 0x2C */ virtual bool setText(const wchar_t *text) override; - /* vt 0x30 */ virtual dTextBox_c *vt_0x30() override { + /* vt 0x30 */ virtual dTextBox_c *getTextBox() override { return mpTextboxes[0]; } - /* vt 0x34 */ virtual bool vt_0x34() override { + /* vt 0x34 */ virtual bool startConfirm() override { return mBtn.requestIn(); } - /* vt 0x38 */ virtual bool vt_0x38(bool b) override { + /* vt 0x38 */ virtual bool startDecide(bool b) override { return mBtn.requestOut(b); } - /* vt 0x3C */ virtual bool vt_0x3C() const override { + /* vt 0x3C */ virtual bool isDoneDecide() const override { return mBtn.isDoneOut(); } diff --git a/include/d/lyt/msg_window/d_lyt_msg_window_sword.h b/include/d/lyt/msg_window/d_lyt_msg_window_sword.h new file mode 100644 index 00000000..81518c9c --- /dev/null +++ b/include/d/lyt/msg_window/d_lyt_msg_window_sword.h @@ -0,0 +1,92 @@ +#ifndef D_LYT_MSG_WINDOW_SWORD_H +#define D_LYT_MSG_WINDOW_SWORD_H + +#include "d/a/obj/d_a_obj_base.h" +#include "d/d_tag_processor.h" +#include "d/lyt/d2d.h" +#include "d/lyt/d_lyt_common_a_btn.h" +#include "d/lyt/d_textbox.h" +#include "d/lyt/msg_window/d_lyt_msg_window_common.h" +#include "m/m_vec.h" +#include "s/s_State.hpp" + +struct dLytMsgWindowSwordLetterDataMaybe { + /* 0x00 */ f32 posX; + /* 0x04 */ f32 posY; + /* 0x08 */ f32 field_0x08; + /* 0x0C */ s16 field_0x0C; + /* 0x0E */ wchar_t character; + /* 0x10 */ s8 displayTimerMaybe; +}; + +class dLytMsgWindowSword_c : public dLytMsgWindowSubtype { +public: + dLytMsgWindowSword_c() : mStateMgr(*this) {} + /* vt 0x08 */ virtual ~dLytMsgWindowSword_c() {} + /* vt 0x0C */ virtual void draw() override; + /* vt 0x10 */ virtual bool + build(d2d::ResAccIf_c *resAcc1, d2d::ResAccIf_c *resAcc, dTagProcessor_c *tagProcessor) override; + /* vt 0x14 */ virtual bool remove() override; + /* vt 0x18 */ virtual bool execute() override; + /* vt 0x1C */ virtual void open(dAcObjBase_c *obj, u32 param) override; + /* vt 0x20 */ virtual bool isDoneOpening() const override; + /* vt 0x24 */ virtual void close() override; + /* vt 0x28 */ virtual bool isDoneClosing() const override; + /* vt 0x2C */ virtual bool setText(const wchar_t *text) override; + /* vt 0x30 */ virtual dTextBox_c *getTextBox() override { + return mpTextboxes[0]; + } + /* vt 0x34 */ virtual bool startConfirm() override { + return mBtn.requestIn(); + } + /* vt 0x38 */ virtual bool startDecide(bool b) override { + return mBtn.requestOut(b); + } + /* vt 0x3C */ virtual bool isDoneDecide() const override { + return mBtn.isDoneOut(); + } + + STATE_FUNC_DECLARE(dLytMsgWindowSword_c, Invisible); + STATE_FUNC_DECLARE(dLytMsgWindowSword_c, In); + STATE_FUNC_DECLARE(dLytMsgWindowSword_c, Wait); + STATE_FUNC_DECLARE(dLytMsgWindowSword_c, Visible); + STATE_FUNC_DECLARE(dLytMsgWindowSword_c, Out); + + void setSwordType(dLytTextSword::ESwordType type) { + mSwordType = type; + } + +private: + /* 0x0010 */ UI_STATE_MGR_DECLARE(dLytMsgWindowSword_c); + /* 0x004C */ d2d::SubPaneList mSubpaneList; + /* 0x005C */ d2d::SubPaneListNode mNodes[1]; + /* 0x0068 */ d2d::ResAccIf_c mResAcc; + /* 0x03D8 */ d2d::LytBase_c mLyt; + /* 0x0468 */ d2d::AnmGroup_c mAnm[5]; + /* 0x05A8 */ dTextBox_c *mpTextboxes[2]; + /* 0x05B0 */ nw4r::lyt::Pane *mpPanes[3]; + /* 0x05BC */ dTagProcessor_c *mpTagProcessor; + /* 0x05C0 */ mVec3_c mTranslationOrig; + /* 0x05CC */ mVec3_c mTranslationTo; + /* 0x05D8 */ mVec3_c mTranslationFrom; + + /* 0x05E4 */ f32 field_0x05E4; + /* 0x05E8 */ f32 field_0x05E8; + + /* 0x05EC */ dAcObjBase_c *mpActor; + /* 0x05F0 */ s32 mParam; + + /* 0x05F4 */ s32 field_0x5F4; + + /* 0x05F8 */ dLytCommonABtn_c mBtn; + + /* 0x07A8 */ dLytMsgWindowSwordLetterDataMaybe mCharacterData[1023]; + /* 0x5794 */ wchar_t mTextBuf[1023]; + + /* 0x5F94 */ dLytTextSword mSwordText; + /* 0x607C */ dLytTextSword::ESwordType mSwordType; + /* 0x6080 */ bool mShouldBeOpen; + /* 0x6081 */ bool mHasDrawnThisTick; +}; + +#endif diff --git a/include/d/lyt/msg_window/d_lyt_msg_window_talk.h b/include/d/lyt/msg_window/d_lyt_msg_window_talk.h new file mode 100644 index 00000000..05bc5095 --- /dev/null +++ b/include/d/lyt/msg_window/d_lyt_msg_window_talk.h @@ -0,0 +1,46 @@ +#ifndef D_LYT_MSG_WINDOW_TALK_H +#define D_LYT_MSG_WINDOW_TALK_H + +#include "d/d_tag_processor.h" +#include "d/lyt/d2d.h" +#include "d/lyt/d_textbox.h" +#include "d/lyt/msg_window/d_lyt_msg_window_common.h" +#include "s/s_State.hpp" + +class dLytMsgWindowTalk_c : public dLytMsgWindowSubtype { +public: + dLytMsgWindowTalk_c() : mStateMgr(*this) {} + /* vt 0x08 */ virtual ~dLytMsgWindowTalk_c() {} + /* vt 0x0C */ virtual void draw() override; + /* vt 0x10 */ virtual bool + build(d2d::ResAccIf_c *resAcc1, d2d::ResAccIf_c *resAcc, dTagProcessor_c *tagProcessor) override; + /* vt 0x14 */ virtual bool remove() override; + /* vt 0x18 */ virtual bool execute() override; + /* vt 0x1C */ virtual void open(dAcObjBase_c *obj, u32 param) override; + /* vt 0x20 */ virtual bool isDoneOpening() const override; + /* vt 0x24 */ virtual void close() override; + /* vt 0x28 */ virtual bool isDoneClosing() const override; + /* vt 0x2C */ virtual bool setText(const wchar_t *text) override; + /* vt 0x30 */ virtual dTextBox_c *getTextBox() override { + return nullptr; + } + /* vt 0x34 */ virtual bool startConfirm() override { + return true; + } + /* vt 0x38 */ virtual bool startDecide(bool b) override { + return true; + } + /* vt 0x3C */ virtual bool isDoneDecide() const override { + return true; + } + + STATE_FUNC_DECLARE(dLytMsgWindowTalk_c, Invisible); + STATE_FUNC_DECLARE(dLytMsgWindowTalk_c, In); + STATE_FUNC_DECLARE(dLytMsgWindowTalk_c, Visible); + STATE_FUNC_DECLARE(dLytMsgWindowTalk_c, Out); + +private: + /* 0x010 */ UI_STATE_MGR_DECLARE(dLytMsgWindowTalk_c); +}; + +#endif diff --git a/include/d/lyt/msg_window/d_lyt_msg_window_wood.h b/include/d/lyt/msg_window/d_lyt_msg_window_wood.h index 9404283b..45f43937 100644 --- a/include/d/lyt/msg_window/d_lyt_msg_window_wood.h +++ b/include/d/lyt/msg_window/d_lyt_msg_window_wood.h @@ -24,16 +24,16 @@ public: /* vt 0x24 */ virtual void close() override; /* vt 0x28 */ virtual bool isDoneClosing() const override; /* vt 0x2C */ virtual bool setText(const wchar_t *text) override; - /* vt 0x30 */ virtual dTextBox_c *vt_0x30() override { + /* vt 0x30 */ virtual dTextBox_c *getTextBox() override { return mpTextboxes[0]; } - /* vt 0x34 */ virtual bool vt_0x34() override { + /* vt 0x34 */ virtual bool startConfirm() override { return mBtn.requestIn(); } - /* vt 0x38 */ virtual bool vt_0x38(bool b) override { + /* vt 0x38 */ virtual bool startDecide(bool b) override { return mBtn.requestOut(b); } - /* vt 0x3C */ virtual bool vt_0x3C() const override { + /* vt 0x3C */ virtual bool isDoneDecide() const override { return mBtn.isDoneOut(); } diff --git a/include/m/m2d.h b/include/m/m2d.h index cf0936e1..639df15f 100644 --- a/include/m/m2d.h +++ b/include/m/m2d.h @@ -94,6 +94,11 @@ public: setFrame(actualEnd * ratio); } + inline f32 getRatio() const { + f32 actualEnd = mEndFrame - 1.0f; + return mCurrFrame / actualEnd; + } + inline void setBackwardsRatio(f32 ratio) { f32 actualEnd = mEndFrame - 1.0f; setFrame(actualEnd - (ratio * actualEnd)); diff --git a/src/d/lyt/d_lyt_common_icon_item.cpp b/src/d/lyt/d_lyt_common_icon_item.cpp index 55403846..db365882 100644 --- a/src/d/lyt/d_lyt_common_icon_item.cpp +++ b/src/d/lyt/d_lyt_common_icon_item.cpp @@ -212,7 +212,7 @@ void dLytCommonIconItemPart1_c::setOff() { } } -void dLytCommonIconItemPart1_c::startDecide() { +void dLytCommonIconItemPart1_c::startConfirm() { mAnm[ITEM_PART_1_ANIM_DECIDE].setForwardOnce(); mAnm[ITEM_PART_1_ANIM_DECIDE].setToStart(); mAnm[ITEM_PART_1_ANIM_DECIDE].setAnimEnable(true); @@ -545,7 +545,7 @@ void dLytCommonIconItemPart2_c::setOff() { } } -void dLytCommonIconItemPart2_c::startDecide() { +void dLytCommonIconItemPart2_c::startConfirm() { mAnm[ITEM_PART_2_ANIM_DECIDE].setForwardOnce(); mAnm[ITEM_PART_2_ANIM_DECIDE].setToStart(); mAnm[ITEM_PART_2_ANIM_DECIDE].setAnimEnable(true); @@ -849,10 +849,10 @@ void dLytCommonIconItem_c::setOff() { } } -void dLytCommonIconItem_c::startDecide() { +void dLytCommonIconItem_c::startConfirm() { switch (mPart) { - case 0: mPart1.startDecide(); break; - case 1: mPart2.startDecide(); break; + case 0: mPart1.startConfirm(); break; + case 1: mPart2.startConfirm(); break; case 2: break; } } diff --git a/src/d/lyt/msg_window/d_lyt_msg_window.cpp b/src/d/lyt/msg_window/d_lyt_msg_window.cpp index e5caefaa..0f15501f 100644 --- a/src/d/lyt/msg_window/d_lyt_msg_window.cpp +++ b/src/d/lyt/msg_window/d_lyt_msg_window.cpp @@ -13,6 +13,13 @@ // clang-format off // vtable order +#include "d/lyt/msg_window/d_lyt_msg_window_common.h" +#include "d/lyt/msg_window/d_lyt_msg_window_demo.h" +#include "d/lyt/msg_window/d_lyt_msg_window_get.h" +#include "d/lyt/msg_window/d_lyt_msg_window_link.h" +#include "d/lyt/msg_window/d_lyt_msg_window_sword.h" +#include "d/lyt/msg_window/d_lyt_msg_window_talk.h" + #include "d/lyt/msg_window/d_lyt_msg_window_wood.h" #include "d/lyt/msg_window/d_lyt_msg_window_stone.h" #include "d/lyt/d_lyt_auto_explain.h" @@ -28,6 +35,7 @@ #include "toBeSorted/global_fi_context.h" #include "toBeSorted/music_mgrs.h" #include "toBeSorted/small_sound_mgr.h" + #include class MsgWindowUnkLocalClass { @@ -184,7 +192,7 @@ void dLytMsgWindow_c::executeState_Invisible() { } mpCurrentSubtype->setPriority(0x8A); - dTextBox_c *box = mpCurrentSubtype->vt_0x30(); + dTextBox_c *box = mpCurrentSubtype->getTextBox(); mpMsgWindowUnk->fn_800B2130(mNameCopy, box, nullptr, true); mpMsgWindowUnk->textAdvancingRelated(true, true); mShowAutoMessage = false; @@ -196,13 +204,13 @@ void dLytMsgWindow_c::executeState_Invisible() { mSpecialFiMenuValue = 7; if (mpTagProcessor->getMsgWindowSubtype() == 6) { mpCurrentSubtype = mpWindowWood; - dTextBox_c *box = mpCurrentSubtype->vt_0x30(); + dTextBox_c *box = mpCurrentSubtype->getTextBox(); mpMsgWindowUnk->fn_800B2130(mNameCopy, box, nullptr, true); mpMsgWindowUnk->textAdvancingRelated(true, true); setTextToDisplay(mpMsgWindowUnk->getProcessedText()); } else if (mpTagProcessor->getMsgWindowSubtype() == 7) { mpCurrentSubtype = mpWindowStone; - dTextBox_c *box = mpCurrentSubtype->vt_0x30(); + dTextBox_c *box = mpCurrentSubtype->getTextBox(); mpMsgWindowUnk->fn_800B2130(mNameCopy, box, nullptr, true); mpMsgWindowUnk->textAdvancingRelated(true, true); setTextToDisplay(mpMsgWindowUnk->getProcessedText()); @@ -218,7 +226,7 @@ void dLytMsgWindow_c::executeState_Invisible() { // TODO } else if (mpTagProcessor->getMsgWindowSubtype() == 30) { mpCurrentSubtype = mpWindowDemo; - dTextBox_c *box = mpCurrentSubtype->vt_0x30(); + dTextBox_c *box = mpCurrentSubtype->getTextBox(); mpMsgWindowUnk->fn_800B2130(mNameCopy, box, field_0x828, true); mpMsgWindowUnk->textAdvancingRelated(true, true); setTextToDisplay(mpMsgWindowUnk->getProcessedText()); @@ -229,7 +237,7 @@ void dLytMsgWindow_c::executeState_Invisible() { // TODO } mpCurrentSubtype->setPriority(0x8A); - dTextBox_c *box = mpCurrentSubtype->vt_0x30(); + dTextBox_c *box = mpCurrentSubtype->getTextBox(); mpMsgWindowUnk->fn_800B2130(mNameCopy, box, field_0x828, true); setTextToDisplay(mpMsgWindowUnk->getProcessedText()); mStateMgr.changeState(StateID_In); @@ -307,14 +315,14 @@ void dLytMsgWindow_c::executeState_OutputText() { mStateMgr.changeState(StateID_WaitKeyMsgEnd0); } else if (mpTagProcessor->getField_0x90E() != 0) { mStateMgr.changeState(StateID_WaitKeyMsgEnd0); - } else if (mpCurrentSubtype->vt_0x34()) { + } else if (mpCurrentSubtype->startConfirm()) { field_0x817 = 1; mStateMgr.changeState(StateID_WaitKeyMsgEnd0); } } else if (field_0x81D != 0) { if (field_0x811 != 0) { mStateMgr.changeState(StateID_WaitKeyChangePage0); - } else if (mpCurrentSubtype->vt_0x34()) { + } else if (mpCurrentSubtype->startConfirm()) { field_0x817 = 1; mStateMgr.changeState(StateID_WaitKeyChangePage0); } @@ -369,7 +377,7 @@ void dLytMsgWindow_c::finalizeState_WaitKeyChangePage0() {} void dLytMsgWindow_c::initializeState_WaitKeyChangePage1() {} void dLytMsgWindow_c::executeState_WaitKeyChangePage1() { - if (mpCurrentSubtype->vt_0x38(false)) { + if (mpCurrentSubtype->startDecide(false)) { field_0x817 = 0; mpMsgWindowUnk->fn_800B2AA0(); if (mpTagProcessor->getMsgWindowSubtype() >= 6 && mpTagProcessor->getMsgWindowSubtype() < 8) { @@ -416,7 +424,7 @@ void dLytMsgWindow_c::executeState_WaitKeyMsgEnd0() { } else if (field_0x810 != 0) { if (dMessage_c::isValidTextLabel(mName)) { mNameCopy = mName; - dTextBox_c *box = mpCurrentSubtype->vt_0x30(); + dTextBox_c *box = mpCurrentSubtype->getTextBox(); mpMsgWindowUnk->fn_800B2130(mNameCopy, box, field_0x828, true); setTextToDisplay(mpMsgWindowUnk->getProcessedText()); field_0x818 = 1; @@ -436,12 +444,12 @@ void dLytMsgWindow_c::finalizeState_WaitKeyMsgEnd0() {} void dLytMsgWindow_c::initializeState_WaitKeyMsgEnd1() {} void dLytMsgWindow_c::executeState_WaitKeyMsgEnd1() { - if (mpCurrentSubtype->vt_0x38(false)) { + if (mpCurrentSubtype->startDecide(false)) { if (field_0x810 != 0) { field_0x817 = 0; if (dMessage_c::isValidTextLabel(mName)) { mNameCopy = mName; - mpMsgWindowUnk->fn_800B2130(mNameCopy, mpCurrentSubtype->vt_0x30(), field_0x828, true); + mpMsgWindowUnk->fn_800B2130(mNameCopy, mpCurrentSubtype->getTextBox(), field_0x828, true); setTextToDisplay(mpMsgWindowUnk->getProcessedText()); field_0x818 = 1; mStateMgr.changeState(StateID_OutputText); @@ -464,7 +472,7 @@ void dLytMsgWindow_c::finalizeState_WaitKeyMsgEnd1() {} void dLytMsgWindow_c::initializeState_WaitKeyMsgEnd2() {} void dLytMsgWindow_c::executeState_WaitKeyMsgEnd2() { - if (mpCurrentSubtype->vt_0x3C()) { + if (mpCurrentSubtype->isDoneDecide()) { mStateMgr.changeState(StateID_Out); } } @@ -560,7 +568,7 @@ void dLytMsgWindow_c::initializeState_Out() { mpCurrentSubtype->close(); } void dLytMsgWindow_c::executeState_Out() { - if (mpCurrentSubtype->isDoneClosing() && (field_0x817 == 0 || mpCurrentSubtype->vt_0x3C())) { + if (mpCurrentSubtype->isDoneClosing() && (field_0x817 == 0 || mpCurrentSubtype->isDoneDecide())) { removeSubMsgManagers(); mStateMgr.changeState(StateID_Invisible); } @@ -749,33 +757,39 @@ void dLytMsgWindow_c::createSubMsgManager(u8 type) { mpWindowStone->build(&mResAcc1, &mResAcc2, mpTagProcessor); break; case 2: - // TODO Sword + mpWindowSword = new dLytMsgWindowSword_c(); + mpWindowSword->setSwordType(dLytTextSword::FI); + mpWindowSword->build(&mResAcc1, &mResAcc2, mpTagProcessor); break; case 3: - // TODO Sword + mpWindowSword = new dLytMsgWindowSword_c(); + mpWindowSword->setSwordType(dLytTextSword::GHIRAHIM); + mpWindowSword->build(&mResAcc1, &mResAcc2, mpTagProcessor); break; case 4: - // TODO Sword - break; - case 5: - // TODO Get - mpWindowGet = new dLytMsgWindowWood_c(); - mpWindowGet->build(&mResAcc1, &mResAcc2, mpTagProcessor); + mpWindowSword = new dLytMsgWindowSword_c(); + mpWindowSword->setSwordType(dLytTextSword::LASTBOSS); + mpWindowSword->build(&mResAcc1, &mResAcc2, mpTagProcessor); break; case 9: // TODO Link - mpWindowLink = new dLytMsgWindowWood_c(); + mpWindowLink = new dLytMsgWindowLink_c(); mpWindowLink->build(&mResAcc1, &mResAcc2, mpTagProcessor); break; + case 5: + // TODO Get + mpWindowGet = new dLytMsgWindowGet_c(); + mpWindowGet->build(&mResAcc1, &mResAcc2, mpTagProcessor); + break; case 30: // TODO Demo - mpWindowDemo = new dLytMsgWindowWood_c(); + mpWindowDemo = new dLytMsgWindowDemo_c(); mpWindowDemo->build(&mResAcc1, &mResAcc2, mpTagProcessor); break; default: // TODO talk - mpWindowDemo = new dLytMsgWindowWood_c(); - mpWindowDemo->build(&mResAcc1, &mResAcc2, mpTagProcessor); + mpWindowTalk = new dLytMsgWindowTalk_c(); + mpWindowTalk->build(&mResAcc1, &mResAcc2, mpTagProcessor); break; } } diff --git a/src/d/lyt/msg_window/d_lyt_msg_window_sword.cpp b/src/d/lyt/msg_window/d_lyt_msg_window_sword.cpp new file mode 100644 index 00000000..74674e9d --- /dev/null +++ b/src/d/lyt/msg_window/d_lyt_msg_window_sword.cpp @@ -0,0 +1,346 @@ +#include "d/lyt/msg_window/d_lyt_msg_window_sword.h" + +#include "common.h" +#include "d/d_tag_processor.h" +#include "d/d_textunk.h" +#include "d/lyt/d2d.h" +#include "d/lyt/d_textbox.h" +#include "m/m_vec.h" +#include "nw4r/lyt/lyt_group.h" +#include "nw4r/lyt/lyt_pane.h" +#include "nw4r/lyt/lyt_types.h" +#include "nw4r/math/math_types.h" +#include "s/s_State.hpp" + +STATE_DEFINE(dLytMsgWindowSword_c, Invisible); +STATE_DEFINE(dLytMsgWindowSword_c, In); +STATE_DEFINE(dLytMsgWindowSword_c, Wait); +STATE_DEFINE(dLytMsgWindowSword_c, Visible); +STATE_DEFINE(dLytMsgWindowSword_c, Out); + +static const d2d::LytBrlanMapping brlanMap[] = { + { "messageWindow_01_in.brlan", "G_inOut_00"}, + { "messageWindow_01_out.brlan", "G_inOut_00"}, + { "messageWindow_01_loop.brlan", "G_loop_00"}, + { "messageWindow_01_color.brlan", "G_color_00"}, + {"messageWindow_01_position.brlan", "G_position_00"}, +}; + +#define SWORD_ANIM_IN 0 +#define SWORD_ANIM_OUT 1 +#define SWORD_ANIM_LOOP 2 +#define SWORD_ANIM_COLOR 3 +#define SWORD_ANIM_POSITION 4 + +#define SWORD_NUM_ANIMS 5 + +#define TRANSLATE_ORIGINAL 0 +#define TRANSLATE_TO 1 +#define TRANSLATE_FROM 2 + +static const char *sPanes[] = { + "N_aBtn_00", + "N_inOut_00", + "N_position_00", +}; + +static const char *sTextBoxes[] = { + "T_message_00", + "T_messageS_00", +}; + +static const char *sGroupName = "G_ref_00"; + +bool dLytMsgWindowSword_c::build(d2d::ResAccIf_c *resAcc1, d2d::ResAccIf_c *resAcc, dTagProcessor_c *tagProcessor) { + mLyt.setResAcc(resAcc); + mLyt.build("messageWindow_01.brlyt", nullptr); + mLyt.setPriority(0x8A); + + for (int i = 0; i < SWORD_NUM_ANIMS; i++) { + mAnm[i].init(brlanMap[i].mFile, resAcc, mLyt.getLayout(), brlanMap[i].mName); + mAnm[i].bind(false); + mAnm[i].setAnimEnable(false); + } + + mAnm[SWORD_ANIM_LOOP].setAnimEnable(true); + mAnm[SWORD_ANIM_OUT].setAnimEnable(true); + mAnm[SWORD_ANIM_OUT].setToEnd(); + mLyt.calc(); + mAnm[SWORD_ANIM_OUT].setAnimEnable(false); + + for (int i = 0; i < 3; i++) { + mpPanes[i] = mLyt.findPane(sPanes[i]); + } + + for (int i = 0; i < 2; i++) { + mpTextboxes[i] = mLyt.getTextBox(sTextBoxes[i]); + mpTextboxes[i]->SetTextPositionH(0); + mpTextboxes[i]->SetTextPositionV(0); + } + + mpTextboxes[1]->set0x1F6(1); + + for (int i = 0; i < 1; i++) { + mNodes[i].mpLytPane = &mBtn; + mBtn.build(resAcc); + mSubpaneList.PushBack(&mNodes[i]); + } + + if (mLyt.getLayout()->GetGroupContainer() != nullptr) { + nw4r::lyt::Group *g = mLyt.getLayout()->GetGroupContainer()->FindGroupByName(sGroupName); + if (g != nullptr) { + d2d::dSubPane::linkMeters(g, &mSubpaneList); + } + } + + mSwordText.build(resAcc, mSwordType); + + for (int i = 0; i < 1023; i++) { + mCharacterData[i].posX = 0.0f; + mCharacterData[i].posY = 0.0f; + mCharacterData[i].field_0x08 = dTagProcessor_c::fn_800B8040(0, 0); + mCharacterData[i].character = L'\0'; + mCharacterData[i].field_0x0C = 1023; + mCharacterData[i].displayTimerMaybe = -1; + + mTextBuf[i] = L'\0'; + } + + mAnm[SWORD_ANIM_COLOR].setAnimEnable(true); + mAnm[SWORD_ANIM_COLOR].setFrame(mSwordType); + + mpPanes[1]->SetVisible(true); + mLyt.calc(); + mpPanes[1]->SetVisible(false); + + mAnm[SWORD_ANIM_COLOR].setAnimEnable(false); + + mpTagProcessor = tagProcessor; + + mTranslationOrig.copyFrom(mpPanes[2]->GetTranslate()); + mTranslationTo.copyFrom(mpPanes[2]->GetTranslate()); + mTranslationFrom.copyFrom(mpPanes[2]->GetTranslate()); + + mParam = 0; + field_0x05E8 = 0.0f; + field_0x05E4 = 0.0f; + field_0x5F4 = 0; + + mHasDrawnThisTick = false; + + mStateMgr.changeState(StateID_Invisible); + return true; +} + +bool dLytMsgWindowSword_c::remove() { + mSwordText.remove(); + + 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++) { + mNodes[i].mpLytPane->remove(); + } + mBtn.remove(); + for (int i = 0; i < SWORD_NUM_ANIMS; i++) { + mAnm[i].remove(); + } + return true; +} + +void dLytMsgWindowSword_c::initializeState_Invisible() { + mBtn.resetToInvisble(); +} +void dLytMsgWindowSword_c::executeState_Invisible() { + if (mShouldBeOpen) { + mStateMgr.changeState(StateID_In); + } +} +void dLytMsgWindowSword_c::finalizeState_Invisible() {} + +void dLytMsgWindowSword_c::initializeState_In() { + mAnm[SWORD_ANIM_POSITION].setFrame(mParam); + mAnm[SWORD_ANIM_POSITION].setAnimEnable(true); + mLyt.calc(); + mAnm[SWORD_ANIM_POSITION].setAnimEnable(false); + + mTranslationTo = mTranslationOrig; + mTranslationTo.y = mpPanes[2]->GetTranslate().y; + mTranslationFrom = mTranslationTo; + + mAnm[SWORD_ANIM_IN].setAnimEnable(true); + mAnm[SWORD_ANIM_IN].setFrame(0.0f); + + mpPanes[2]->SetTranslate(mTranslationFrom); +} +void dLytMsgWindowSword_c::executeState_In() { + if (mTranslationFrom != mTranslationTo) { + mVec3_c v; + if (mAnm[SWORD_ANIM_IN].isEndReached()) { + v = mTranslationTo; + } else { + f32 ratio = mAnm[SWORD_ANIM_IN].getRatio(); + if (ratio > 1.0f) { + ratio = 1.0f; + } + v = mTranslationFrom + (mTranslationTo - mTranslationFrom) * ratio; + } + mpPanes[2]->SetTranslate(v); + } + + if (mAnm[SWORD_ANIM_IN].isEndReached()) { + mAnm[SWORD_ANIM_IN].setAnimEnable(false); + mStateMgr.changeState(StateID_Wait); + } +} +void dLytMsgWindowSword_c::finalizeState_In() {} + +void dLytMsgWindowSword_c::initializeState_Wait() { + field_0x5F4 = UnkTextThing::getInstance()->getField_0x7AE(); +} +void dLytMsgWindowSword_c::executeState_Wait() { + if (--field_0x5F4 > 0) { + return; + } + mStateMgr.changeState(StateID_Visible); +} +void dLytMsgWindowSword_c::finalizeState_Wait() {} + +void dLytMsgWindowSword_c::initializeState_Visible() { + nw4r::lyt::Size size = getTextBox()->GetSize(); + nw4r::lyt::Size fontSize = getTextBox()->GetFontSize(); // unused + nw4r::math::MTX34 transform = getTextBox()->GetGlobalMtx(); + + field_0x05E4 = transform._03 - size.width / 2; + field_0x05E8 = transform._13 + size.height / 2; + + getTextBox()->GetTextDrawRect(); // unused +} +void dLytMsgWindowSword_c::executeState_Visible() { + if (!mShouldBeOpen) { + mStateMgr.changeState(StateID_Out); + } +} +void dLytMsgWindowSword_c::finalizeState_Visible() {} + +void dLytMsgWindowSword_c::initializeState_Out() { + mTranslationFrom = mTranslationTo; + mAnm[SWORD_ANIM_OUT].setAnimEnable(true); + mAnm[SWORD_ANIM_OUT].setFrame(0.0f); +} +void dLytMsgWindowSword_c::executeState_Out() { + if (mTranslationFrom != mTranslationTo) { + mVec3_c v; + if (mAnm[SWORD_ANIM_OUT].isEndReached()) { + v = mTranslationFrom; + } else { + // TODO floats + v = mpPanes[2]->GetTranslate(); + v += (mTranslationTo - v) / 2.0f; + } + mpPanes[2]->SetTranslate(v); + } + + if (mAnm[SWORD_ANIM_OUT].isEndReached()) { + mAnm[SWORD_ANIM_OUT].setAnimEnable(false); + mStateMgr.changeState(StateID_Visible); + } +} +void dLytMsgWindowSword_c::finalizeState_Out() {} + +bool dLytMsgWindowSword_c::execute() { + mStateMgr.executeState(); + + for (int i = 0; i < SWORD_NUM_ANIMS; i++) { + if (mAnm[i].isEnabled()) { + mAnm[i].play(); + } + } + + mLyt.calc(); + mNodes[0].mpLytPane->execute(); + mHasDrawnThisTick = false; + return true; +} + +extern "C" f32 lbl_805751A4; + +void dLytMsgWindowSword_c::draw() { + mLyt.draw(); + + for (int i = 0; i < 1023; i++) { + if (mCharacterData[i].displayTimerMaybe >= 0) { + if (!mHasDrawnThisTick) { + mCharacterData[i].displayTimerMaybe += 1; + } + wchar_t str[2]; + // FPR regswaps + f32 x = field_0x05E4 + mCharacterData[i].posX; + x /= lbl_805751A4; + f32 y = field_0x05E8 + mCharacterData[i].posY; + + str[0] = mCharacterData[i].character; + str[1] = 0; + + nw4r::math::VEC3 v(x, y, 0.0f); + mSwordText.draw(str, mCharacterData[i].displayTimerMaybe, v, mCharacterData[i].field_0x08); + if (mCharacterData[i].displayTimerMaybe >= mSwordText.fn_80120DB0()) { + mCharacterData[i].displayTimerMaybe = -1; + } + } + } + + if (!mHasDrawnThisTick) { + mHasDrawnThisTick = true; + } +} + +void dLytMsgWindowSword_c::open(dAcObjBase_c *obj, u32 param) { + mpActor = obj; + mParam = param; + mShouldBeOpen = true; +} + +bool dLytMsgWindowSword_c::isDoneOpening() const { + if (*mStateMgr.getStateID() == StateID_In || *mStateMgr.getStateID() == StateID_Wait) { + return false; + } + return true; +} + +void dLytMsgWindowSword_c::close() { + mShouldBeOpen = false; +} + +bool dLytMsgWindowSword_c::isDoneClosing() const { + return !(*mStateMgr.getStateID() == StateID_Out); +} + +bool dLytMsgWindowSword_c::setText(const wchar_t *text) { + int foundIdx = 1023; + for (int i = 0; i < 1023; i++) { + if (mCharacterData[i].displayTimerMaybe >= 0 && foundIdx > mCharacterData[i].field_0x0C) { + foundIdx = mCharacterData[i].field_0x0C; + } + } + + // How is text bounds-checked here???? + for (int i = 0; i < 1023; i++) { + if (i < foundIdx) { + mTextBuf[i] = text[i]; + } else { + mTextBuf[i] = L' '; + } + } + + mpTextboxes[0]->SetTagProcessor(mpTagProcessor); + mpTextboxes[1]->SetTagProcessor(mpTagProcessor); + mpTextboxes[0]->setTextWithTextProcessor(mTextBuf, mpTagProcessor, 0); + mpTextboxes[1]->setTextWithTextProcessor(mTextBuf, mpTagProcessor, 0); + return foundIdx == 1023; +}