Merge pull request #275 from robojumper/d_lyt_draw_mark

d_lyt_draw_mark OK
This commit is contained in:
robojumper
2025-11-28 11:49:41 +01:00
committed by GitHub
8 changed files with 843 additions and 128 deletions
+6
View File
@@ -475,6 +475,11 @@ d/lyt/d2d.cpp:
d/lyt/d_lyt_draw_mark.cpp:
.text start:0x800ACAC0 end:0x800AE958 align:16
.ctors start:0x804DB6CC end:0x804DB6D0
.rodata start:0x804E3850 end:0x804E39E0
.data start:0x80510088 end:0x80510780
.sdata start:0x805722B8 end:0x805722C0
.sdata2 start:0x805797B0 end:0x805797D0
.bss start:0x805A6140 end:0x805A6370
d/lyt/d_textbox.cpp:
.text start:0x800AE960 end:0x800B1628 align:16
@@ -549,6 +554,7 @@ toBeSorted/d_flow_mgr.cpp:
d/d_lyt_base.cpp:
.text start:0x800C4480 end:0x800C4690 align:16
.data start:0x80511B30 end:0x80511B80
toBeSorted/unk_npc_path_stuff_1.cpp:
.text start:0x800C4690 end:0x800C731C align:16
+166 -114
View File
@@ -3786,52 +3786,52 @@ pushToEnd__3d2dFPQ34nw4r3lyt4Pane = .text:0x800AC960; // type:function size:0x4C
init__Q23d2d9AnmGroupsFPQ23d2d10AnmGroup_cPCQ23d2d15LytBrlanMappingUlPQ23m2d10ResAccIf_cPQ23d2d8Layout_c = .text:0x800AC9B0; // type:function size:0x80
remove__Q23d2d9AnmGroupsFv = .text:0x800ACA30; // type:function size:0x64
draw__Q23d2d9LytBase_cFv = .text:0x800ACAA0; // type:function size:0x18 scope:weak
fn_800ACAC0 = .text:0x800ACAC0; // type:function size:0x5C
fn_800ACB20 = .text:0x800ACB20; // type:function size:0x40
__ct__18dLytDrawMark_HIO_cFv = .text:0x800ACAC0; // type:function size:0x5C
__dt__18dLytDrawMark_HIO_cFv = .text:0x800ACB20; // type:function size:0x40
build__14dLytDrawMark_cFi = .text:0x800ACB60; // type:function size:0x208
changeState__83sStateMgr_c<14dLytDrawMark_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x800ACD70; // type:function size:0x10
changeState__83sStateMgr_c<14dLytDrawMark_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x800ACD70; // type:function size:0x10 scope:weak
remove__14dLytDrawMark_cFv = .text:0x800ACD80; // type:function size:0x3C
execute__14dLytDrawMark_cFv = .text:0x800ACDC0; // type:function size:0xBC
executeState__83sStateMgr_c<14dLytDrawMark_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x800ACE80; // type:function size:0x10
executeState__83sStateMgr_c<14dLytDrawMark_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x800ACE80; // type:function size:0x10 scope:weak
draw__14dLytDrawMark_cFv = .text:0x800ACE90; // type:function size:0x28
fn_800ACEC0 = .text:0x800ACEC0; // type:function size:0x4
fn_800ACED0 = .text:0x800ACED0; // type:function size:0x4
fn_800ACEE0 = .text:0x800ACEE0; // type:function size:0x4
fn_800ACEF0 = .text:0x800ACEF0; // type:function size:0xAC
fn_800ACFA0 = .text:0x800ACFA0; // type:function size:0x60
fn_800AD000 = .text:0x800AD000; // type:function size:0x4
fn_800AD010 = .text:0x800AD010; // type:function size:0x80
fn_800AD090 = .text:0x800AD090; // type:function size:0x68
fn_800AD100 = .text:0x800AD100; // type:function size:0x4
fn_800AD110 = .text:0x800AD110; // type:function size:0xA8
fn_800AD1C0 = .text:0x800AD1C0; // type:function size:0xBC
fn_800AD280 = .text:0x800AD280; // type:function size:0x4
fn_800AD290 = .text:0x800AD290; // type:function size:0x50
fn_800AD2E0 = .text:0x800AD2E0; // type:function size:0x8C
fn_800AD370 = .text:0x800AD370; // type:function size:0x4
fn_800AD380 = .text:0x800AD380; // type:function size:0xE8
fn_800AD470 = .text:0x800AD470; // type:function size:0x12C
fn_800AD5A0 = .text:0x800AD5A0; // type:function size:0x4
fn_800AD5B0 = .text:0x800AD5B0; // type:function size:0x60
fn_800AD610 = .text:0x800AD610; // type:function size:0x9C
fn_800AD6B0 = .text:0x800AD6B0; // type:function size:0x4
fn_800AD6C0 = .text:0x800AD6C0; // type:function size:0xA4
fn_800AD770 = .text:0x800AD770; // type:function size:0x80
fn_800AD7F0 = .text:0x800AD7F0; // type:function size:0x4
fn_800AD800 = .text:0x800AD800; // type:function size:0x3B8
fn_800ADBC0 = .text:0x800ADBC0; // type:function size:0x50
fn_800ADC10 = .text:0x800ADC10; // type:function size:0x38
fn_800ADC50 = .text:0x800ADC50; // type:function size:0x144
fn_800ADDA0 = .text:0x800ADDA0; // type:function size:0x13C
fn_800ADEE0 = .text:0x800ADEE0; // type:function size:0x13C
fn_800AE020 = .text:0x800AE020; // type:function size:0x13C
fn_800AE160 = .text:0x800AE160; // type:function size:0x28
fn_800AE190 = .text:0x800AE190; // type:function size:0x30
fn_800AE1C0 = .text:0x800AE1C0; // type:function size:0x30
fn_800AE1F0 = .text:0x800AE1F0; // type:function size:0x30
LytDrawMark__initStates = .text:0x800AE220; // type:function size:0x644
LytDrawMark__dtor = .text:0x800AE870; // type:function size:0x58
fn_800AE8D0 = .text:0x800AE8D0; // type:function size:0x88
initializeState_Wait__14dLytDrawMark_cFv = .text:0x800ACEC0; // type:function size:0x4
executeState_Wait__14dLytDrawMark_cFv = .text:0x800ACED0; // type:function size:0x4
finalizeState_Wait__14dLytDrawMark_cFv = .text:0x800ACEE0; // type:function size:0x4
initializeState_In__14dLytDrawMark_cFv = .text:0x800ACEF0; // type:function size:0xAC
executeState_In__14dLytDrawMark_cFv = .text:0x800ACFA0; // type:function size:0x60
finalizeState_In__14dLytDrawMark_cFv = .text:0x800AD000; // type:function size:0x4
initializeState_RingIn__14dLytDrawMark_cFv = .text:0x800AD010; // type:function size:0x80
executeState_RingIn__14dLytDrawMark_cFv = .text:0x800AD090; // type:function size:0x68
finalizeState_RingIn__14dLytDrawMark_cFv = .text:0x800AD100; // type:function size:0x4
initializeState_MoveWait__14dLytDrawMark_cFv = .text:0x800AD110; // type:function size:0xA8
executeState_MoveWait__14dLytDrawMark_cFv = .text:0x800AD1C0; // type:function size:0xBC
finalizeState_MoveWait__14dLytDrawMark_cFv = .text:0x800AD280; // type:function size:0x4
initializeState_MoveDraw__14dLytDrawMark_cFv = .text:0x800AD290; // type:function size:0x50
executeState_MoveDraw__14dLytDrawMark_cFv = .text:0x800AD2E0; // type:function size:0x8C
finalizeState_MoveDraw__14dLytDrawMark_cFv = .text:0x800AD370; // type:function size:0x4
initializeState_MoveFix__14dLytDrawMark_cFv = .text:0x800AD380; // type:function size:0xE8
executeState_MoveFix__14dLytDrawMark_cFv = .text:0x800AD470; // type:function size:0x12C
finalizeState_MoveFix__14dLytDrawMark_cFv = .text:0x800AD5A0; // type:function size:0x4
initializeState_MoveEnd__14dLytDrawMark_cFv = .text:0x800AD5B0; // type:function size:0x60
executeState_MoveEnd__14dLytDrawMark_cFv = .text:0x800AD610; // type:function size:0x9C
finalizeState_MoveEnd__14dLytDrawMark_cFv = .text:0x800AD6B0; // type:function size:0x4
initializeState_Complete__14dLytDrawMark_cFv = .text:0x800AD6C0; // type:function size:0xA4
executeState_Complete__14dLytDrawMark_cFv = .text:0x800AD770; // type:function size:0x80
finalizeState_Complete__14dLytDrawMark_cFv = .text:0x800AD7F0; // type:function size:0x4
detectSwordSwing__14dLytDrawMark_cFv = .text:0x800AD800; // type:function size:0x3B8
convertScreenPosToDpdPos__14dLytDrawMark_cCFP7mVec2_cP7mVec2_c = .text:0x800ADBC0; // type:function size:0x50
fn_800ADC10__14dLytDrawMark_cCF7mVec2_c = .text:0x800ADC10; // type:function size:0x38
loadPanePos__14dLytDrawMark_cFv = .text:0x800ADC50; // type:function size:0x144
buildVariant01__14dLytDrawMark_cFv = .text:0x800ADDA0; // type:function size:0x13C
buildVariant02__14dLytDrawMark_cFv = .text:0x800ADEE0; // type:function size:0x13C
buildVariant03__14dLytDrawMark_cFv = .text:0x800AE020; // type:function size:0x13C
getNumLines__14dLytDrawMark_cCFv = .text:0x800AE160; // type:function size:0x28
finalizeState__29sFStateID_c<14dLytDrawMark_c>CFR14dLytDrawMark_c = .text:0x800AE190; // type:function size:0x30 scope:weak
executeState__29sFStateID_c<14dLytDrawMark_c>CFR14dLytDrawMark_c = .text:0x800AE1C0; // type:function size:0x30 scope:weak
initializeState__29sFStateID_c<14dLytDrawMark_c>CFR14dLytDrawMark_c = .text:0x800AE1F0; // type:function size:0x30 scope:weak
__sinit_\d_lyt_draw_mark_cpp = .text:0x800AE220; // type:function size:0x644 scope:local
__dt__29sFStateID_c<14dLytDrawMark_c>Fv = .text:0x800AE870; // type:function size:0x58 scope:weak
isSameName__29sFStateID_c<14dLytDrawMark_c>CFPCc = .text:0x800AE8D0; // type:function size:0x88 scope:weak
__ct__10dTextBox_cFPCQ44nw4r3lyt3res7TextBoxRCQ34nw4r3lyt11ResBlockSet = .text:0x800AE960; // type:function size:0xE0
GetColor__FRC11_GXColorS10 = .text:0x800AEA40; // type:function size:0xB4
GetMyTextDrawRect__10dTextBox_cCFPQ34nw4r2ut17TextWriterBase<w>Pb = .text:0x800AEB00; // type:function size:0x178
@@ -28213,10 +28213,10 @@ lbl_804E36EC = .rodata:0x804E36EC; // type:object size:0xC data:4byte
lbl_804E36F8 = .rodata:0x804E36F8; // type:object size:0x20 data:4byte
AcSalbageObj__DEFINITIONS = .rodata:0x804E3718; // type:object size:0x100
lbl_804E3818 = .rodata:0x804E3818; // type:object size:0x38
lbl_804E3850 = .rodata:0x804E3850; // type:object size:0x10
lbl_804E3860 = .rodata:0x804E3860; // type:object size:0x80 data:4byte
lbl_804E38E0 = .rodata:0x804E38E0; // type:object size:0x80 data:4byte
lbl_804E3960 = .rodata:0x804E3960; // type:object size:0x80 data:4byte
@LOCAL@initializeState_Complete__14dLytDrawMark_cFv@sFlags = .rodata:0x804E3850; // type:object size:0xC scope:local
brlanMapVariant01 = .rodata:0x804E3860; // type:object size:0x80 scope:local data:4byte
brlanMapVariant02 = .rodata:0x804E38E0; // type:object size:0x80 scope:local data:4byte
brlanMapVariant03 = .rodata:0x804E3960; // type:object size:0x80 scope:local data:4byte
sReplacementSequences = .rodata:0x804E39E0; // type:object size:0x10 scope:local data:2byte
sUpperCaseChars = .rodata:0x804E39F0; // type:object size:0x240 scope:local data:2byte
sMsgWindowFlags = .rodata:0x804E3C30; // type:object size:0x1004 scope:local
@@ -31055,55 +31055,97 @@ __vt__7dPath_c = .data:0x8050FFB8; // type:object size:0x10
__vt__Q23d2d9LytBase_c = .data:0x80510010; // type:object size:0x1C
__vt__Q23d2d7Multi_c = .data:0x8051002C; // type:object size:0x1C
__vt__Q23d2d8Layout_c = .data:0x80510048; // type:object size:0x40
lbl_80510088 = .data:0x80510088; // type:object size:0x15 data:string
lbl_805100A0 = .data:0x805100A0; // type:object size:0xB data:string
lbl_805100AC = .data:0x805100AC; // type:object size:0x19 data:string
lbl_805100C8 = .data:0x805100C8; // type:object size:0xB data:string
lbl_805100D4 = .data:0x805100D4; // type:object size:0x1F data:string
lbl_805100F4 = .data:0x805100F4; // type:object size:0xE data:string
lbl_80510104 = .data:0x80510104; // type:object size:0xE data:string
lbl_80510114 = .data:0x80510114; // type:object size:0xE data:string
lbl_80510124 = .data:0x80510124; // type:object size:0x1B data:string
lbl_80510140 = .data:0x80510140; // type:object size:0xD data:string
lbl_80510150 = .data:0x80510150; // type:object size:0x1A data:string
lbl_8051016C = .data:0x8051016C; // type:object size:0xD data:string
lbl_8051017C = .data:0x8051017C; // type:object size:0xD data:string
lbl_8051018C = .data:0x8051018C; // type:object size:0xD data:string
lbl_8051019C = .data:0x8051019C; // type:object size:0x1B data:string
lbl_805101B8 = .data:0x805101B8; // type:object size:0xE data:string
lbl_805101C8 = .data:0x805101C8; // type:object size:0xB data:string
lbl_805101D4 = .data:0x805101D4; // type:object size:0xB data:string
lbl_805101E0 = .data:0x805101E0; // type:object size:0xB data:string
lbl_805101EC = .data:0x805101EC; // type:object size:0x9 data:string
lbl_805101F8 = .data:0x805101F8; // type:object size:0x9 data:string
lbl_80510204 = .data:0x80510204; // type:object size:0x9 data:string
lbl_80510210 = .data:0x80510210; // type:object size:0x64
lbl_80510274 = .data:0x80510274; // type:object size:0x15 data:string
lbl_8051028C = .data:0x8051028C; // type:object size:0x19 data:string
lbl_805102A8 = .data:0x805102A8; // type:object size:0x1F data:string
lbl_805102C8 = .data:0x805102C8; // type:object size:0xE data:string
lbl_805102D8 = .data:0x805102D8; // type:object size:0x1B data:string
lbl_805102F4 = .data:0x805102F4; // type:object size:0x1A data:string
lbl_80510310 = .data:0x80510310; // type:object size:0xD data:string
lbl_80510320 = .data:0x80510320; // type:object size:0x1B data:string
lbl_8051033C = .data:0x8051033C; // type:object size:0xB data:string
lbl_80510348 = .data:0x80510348; // type:object size:0xB data:string
lbl_80510354 = .data:0x80510354; // type:object size:0xB data:string
lbl_80510360 = .data:0x80510360; // type:object size:0x60
lbl_805103C0 = .data:0x805103C0; // type:object size:0x15 data:string
lbl_805103D8 = .data:0x805103D8; // type:object size:0x19 data:string
lbl_805103F4 = .data:0x805103F4; // type:object size:0x1F data:string
lbl_80510414 = .data:0x80510414; // type:object size:0xE data:string
lbl_80510424 = .data:0x80510424; // type:object size:0xE data:string
lbl_80510434 = .data:0x80510434; // type:object size:0x1B data:string
lbl_80510450 = .data:0x80510450; // type:object size:0x1A data:string
lbl_8051046C = .data:0x8051046C; // type:object size:0xD data:string
lbl_8051047C = .data:0x8051047C; // type:object size:0xD data:string
lbl_8051048C = .data:0x8051048C; // type:object size:0x1B data:string
lbl_805104A8 = .data:0x805104A8; // type:object size:0x9 data:string
lbl_805104B4 = .data:0x805104B4; // type:object size:0x60
lbl_80510514 = .data:0x80510514; // type:object size:0x238
lbl_8051074C = .data:0x8051074C; // type:object size:0x34
@31004 = .data:0x80510088; // type:object size:0x15 scope:local data:string
...data.0 = .data:0x80510088; // type:label scope:local
@31005 = .data:0x805100A0; // type:object size:0xB scope:local data:string
@31006 = .data:0x805100AC; // type:object size:0x19 scope:local data:string
@31007 = .data:0x805100C8; // type:object size:0xB scope:local data:string
@31008 = .data:0x805100D4; // type:object size:0x1F scope:local data:string
@31009 = .data:0x805100F4; // type:object size:0xE scope:local data:string
@31010 = .data:0x80510104; // type:object size:0xE scope:local data:string
@31011 = .data:0x80510114; // type:object size:0xE scope:local data:string
@31013 = .data:0x80510124; // type:object size:0x1B scope:local data:string
@31014 = .data:0x80510140; // type:object size:0xD scope:local data:string
@31015 = .data:0x80510150; // type:object size:0x1A scope:local data:string
@31016 = .data:0x8051016C; // type:object size:0xD scope:local data:string
@31017 = .data:0x8051017C; // type:object size:0xD scope:local data:string
@31018 = .data:0x8051018C; // type:object size:0xD scope:local data:string
@31019 = .data:0x8051019C; // type:object size:0x1B scope:local data:string
@31020 = .data:0x805101B8; // type:object size:0xE scope:local data:string
@31021 = .data:0x805101C8; // type:object size:0xB scope:local data:string
@31022 = .data:0x805101D4; // type:object size:0xB scope:local data:string
@31023 = .data:0x805101E0; // type:object size:0xB scope:local data:string
@31024 = .data:0x805101EC; // type:object size:0x9 scope:local data:string
@31025 = .data:0x805101F8; // type:object size:0x9 scope:local data:string
@31026 = .data:0x80510204; // type:object size:0x9 scope:local data:string
@31027 = .data:0x80510210; // type:object size:0xD scope:local data:string
sPaneNamesVariant01 = .data:0x80510220; // type:object size:0x34 scope:local
@36395 = .data:0x80510254; // type:object size:0xC scope:local data:string
@36397 = .data:0x80510260; // type:object size:0x12 scope:local data:string
@31051 = .data:0x80510274; // type:object size:0x15 scope:local data:string
@31052 = .data:0x8051028C; // type:object size:0x19 scope:local data:string
@31053 = .data:0x805102A8; // type:object size:0x1F scope:local data:string
@31054 = .data:0x805102C8; // type:object size:0xE scope:local data:string
@31055 = .data:0x805102D8; // type:object size:0x1B scope:local data:string
@31056 = .data:0x805102F4; // type:object size:0x1A scope:local data:string
@31057 = .data:0x80510310; // type:object size:0xD scope:local data:string
@31058 = .data:0x80510320; // type:object size:0x1B scope:local data:string
@31059 = .data:0x8051033C; // type:object size:0xB scope:local data:string
@31060 = .data:0x80510348; // type:object size:0xB scope:local data:string
@31061 = .data:0x80510354; // type:object size:0xB scope:local data:string
@31062 = .data:0x80510360; // type:object size:0x9 scope:local data:string
sPaneNamesVariant02 = .data:0x8051036C; // type:object size:0x34 scope:local
@36422 = .data:0x805103A0; // type:object size:0xC scope:local data:string
@36423 = .data:0x805103AC; // type:object size:0x12 scope:local data:string
@31086 = .data:0x805103C0; // type:object size:0x15 scope:local data:string
@31087 = .data:0x805103D8; // type:object size:0x19 scope:local data:string
@31088 = .data:0x805103F4; // type:object size:0x1F scope:local data:string
@31089 = .data:0x80510414; // type:object size:0xE scope:local data:string
@31090 = .data:0x80510424; // type:object size:0xE scope:local data:string
@31091 = .data:0x80510434; // type:object size:0x1B scope:local data:string
@31092 = .data:0x80510450; // type:object size:0x1A scope:local data:string
@31093 = .data:0x8051046C; // type:object size:0xD scope:local data:string
@31094 = .data:0x8051047C; // type:object size:0xD scope:local data:string
@31095 = .data:0x8051048C; // type:object size:0x1B scope:local data:string
@31096 = .data:0x805104A8; // type:object size:0x9 scope:local data:string
@31097 = .data:0x805104B4; // type:object size:0x9 scope:local data:string
sPaneNamesVariant03 = .data:0x805104C0; // type:object size:0x34 scope:local
@36448 = .data:0x805104F4; // type:object size:0xC scope:local data:string
@36449 = .data:0x80510500; // type:object size:0x12 scope:local data:string
__vt__18dLytDrawMark_HIO_c = .data:0x80510514; // type:object size:0xC
@36466 = .data:0x80510520; // type:object size:0xC scope:local
@36467 = .data:0x8051052C; // type:object size:0xC scope:local
@36468 = .data:0x80510538; // type:object size:0xC scope:local
@36469 = .data:0x80510544; // type:object size:0xC scope:local
@36470 = .data:0x80510550; // type:object size:0xC scope:local
@36471 = .data:0x8051055C; // type:object size:0xC scope:local
@36472 = .data:0x80510568; // type:object size:0xC scope:local
@36473 = .data:0x80510574; // type:object size:0xC scope:local
@36474 = .data:0x80510580; // type:object size:0xC scope:local
@36475 = .data:0x8051058C; // type:object size:0xC scope:local
@36476 = .data:0x80510598; // type:object size:0xC scope:local
@36477 = .data:0x805105A4; // type:object size:0xC scope:local
@36478 = .data:0x805105B0; // type:object size:0xC scope:local
@36479 = .data:0x805105BC; // type:object size:0xC scope:local
@36480 = .data:0x805105C8; // type:object size:0xC scope:local
@36481 = .data:0x805105D4; // type:object size:0xC scope:local
@36482 = .data:0x805105E0; // type:object size:0xC scope:local
@36483 = .data:0x805105EC; // type:object size:0xC scope:local
@36484 = .data:0x805105F8; // type:object size:0xC scope:local
@36485 = .data:0x80510604; // type:object size:0xC scope:local
@36486 = .data:0x80510610; // type:object size:0xC scope:local
@36487 = .data:0x8051061C; // type:object size:0xC scope:local
@36488 = .data:0x80510628; // type:object size:0xC scope:local
@36489 = .data:0x80510634; // type:object size:0xC scope:local
@36491 = .data:0x80510640; // type:object size:0x1D scope:local data:string
@36492 = .data:0x80510660; // type:object size:0x1B scope:local data:string
@36493 = .data:0x8051067C; // type:object size:0x1F scope:local data:string
@36494 = .data:0x8051069C; // type:object size:0x21 scope:local data:string
@36495 = .data:0x805106C0; // type:object size:0x21 scope:local data:string
@36496 = .data:0x805106E8; // type:object size:0x20 scope:local data:string
@36497 = .data:0x80510708; // type:object size:0x20 scope:local data:string
@36498 = .data:0x80510728; // type:object size:0x21 scope:local data:string
__vt__29sFStateID_c<14dLytDrawMark_c> = .data:0x8051074C; // type:object size:0x34 scope:weak
@20500 = .data:0x80510780; // type:object size:0xA scope:local data:string
@20902 = .data:0x8051078C; // type:object size:0xA scope:local data:string
__vt__10dTextBox_c = .data:0x80510798; // type:object size:0x84
@@ -40108,8 +40150,8 @@ lbl_80572280 = .sdata:0x80572280; // type:object size:0x5 data:string
@11335 = .sdata:0x805722A8; // type:object size:0x6 scope:local data:string
@9520 = .sdata:0x805722B0; // type:object size:0x4 scope:local data:string
sRef__3d2d = .sdata:0x805722B4; // type:object size:0x4 data:4byte
lbl_805722B8 = .sdata:0x805722B8; // type:object size:0x4
lbl_805722BC = .sdata:0x805722BC; // type:object size:0x4
@31012 = .sdata:0x805722B8; // type:object size:0x1 scope:local
@36396 = .sdata:0x805722BC; // type:object size:0x1 scope:local
@20123 = .sdata:0x805722C0; // type:object size:0x4 scope:local data:wstring
@20499 = .sdata:0x805722C4; // type:object size:0x6 scope:local data:string
@20501 = .sdata:0x805722CC; // type:object size:0x5 scope:local data:string
@@ -45128,14 +45170,14 @@ lbl_80579780 = .sdata2:0x80579780; // type:object size:0x4 align:4 data:float
@10947 = .sdata2:0x805797A0; // type:object size:0x4 scope:local align:4 data:float
@11232 = .sdata2:0x805797A4; // type:object size:0x4 scope:local align:4 data:float
@11623 = .sdata2:0x805797A8; // type:object size:0x4 scope:local align:4 data:float
lbl_805797B0 = .sdata2:0x805797B0; // type:object size:0x4 align:4 data:float
lbl_805797B4 = .sdata2:0x805797B4; // type:object size:0x4 align:4 data:float
lbl_805797B8 = .sdata2:0x805797B8; // type:object size:0x4 align:4 data:float
lbl_805797BC = .sdata2:0x805797BC; // type:object size:0x4 align:4 data:float
lbl_805797C0 = .sdata2:0x805797C0; // type:object size:0x4 align:4 data:float
lbl_805797C4 = .sdata2:0x805797C4; // type:object size:0x4 align:4 data:float
lbl_805797C8 = .sdata2:0x805797C8; // type:object size:0x4 align:4 data:float
lbl_805797CC = .sdata2:0x805797CC; // type:object size:0x4 align:4 data:float
@35963 = .sdata2:0x805797B0; // type:object size:0x4 scope:local align:4 data:float
@35964 = .sdata2:0x805797B4; // type:object size:0x4 scope:local align:4 data:float
@35965 = .sdata2:0x805797B8; // type:object size:0x4 scope:local align:4 data:float
@35966 = .sdata2:0x805797BC; // type:object size:0x4 scope:local align:4 data:float
@36022 = .sdata2:0x805797C0; // type:object size:0x4 scope:local align:4 data:float
@36121 = .sdata2:0x805797C4; // type:object size:0x4 scope:local align:4 data:float
@36327 = .sdata2:0x805797C8; // type:object size:0x4 scope:local align:4 data:float
@36338 = .sdata2:0x805797CC; // type:object size:0x4 scope:local align:4 data:float
@19900 = .sdata2:0x805797D0; // type:object size:0x4 scope:local align:4 data:float
@19989 = .sdata2:0x805797D4; // type:object size:0x4 scope:local align:4 data:float
@20255 = .sdata2:0x805797D8; // type:object size:0x8 scope:local align:8 data:double
@@ -51117,15 +51159,25 @@ lbl_805A6088 = .bss:0x805A6088; // type:object size:0x10
lbl_805A6098 = .bss:0x805A6098; // type:object size:0x10
lbl_805A60A8 = .bss:0x805A60A8; // type:object size:0xC
lbl_805A60B4 = .bss:0x805A60B4; // type:object size:0x8C align:4 data:float
lbl_805A6140 = .bss:0x805A6140; // type:object size:0x10
lbl_805A6150 = .bss:0x805A6150; // type:object size:0x30
LytDrawMark__STATE_WAIT = .bss:0x805A6180; // type:object size:0x40 data:4byte
LytDrawMark__STATE_IN = .bss:0x805A61C0; // type:object size:0x40 data:4byte
LytDrawMark__STATE_RING_IN = .bss:0x805A6200; // type:object size:0x40 data:4byte
LytDrawMark__STATE_MOVE_WAIT = .bss:0x805A6240; // type:object size:0x40 data:4byte
LytDrawMark__STATE_MOVE_DRAW = .bss:0x805A6280; // type:object size:0x40 data:4byte
LytDrawMark__STATE_MOVE_FIX = .bss:0x805A62C0; // type:object size:0x80 data:4byte
lbl_805A6340 = .bss:0x805A6340; // type:object size:0x30 data:4byte
@30667 = .bss:0x805A6140; // type:object size:0xC scope:local
...bss.0 = .bss:0x805A6140; // type:label scope:local
sHio = .bss:0x805A6150; // type:object size:0x20 scope:local
@30682 = .bss:0x805A6170; // type:object size:0xC scope:local
StateID_Wait__14dLytDrawMark_c = .bss:0x805A6180; // type:object size:0x30 data:4byte
@30686 = .bss:0x805A61B0; // type:object size:0xC scope:local
StateID_In__14dLytDrawMark_c = .bss:0x805A61C0; // type:object size:0x30 data:4byte
@30690 = .bss:0x805A61F0; // type:object size:0xC scope:local
StateID_RingIn__14dLytDrawMark_c = .bss:0x805A6200; // type:object size:0x30 data:4byte
@30694 = .bss:0x805A6230; // type:object size:0xC scope:local
StateID_MoveWait__14dLytDrawMark_c = .bss:0x805A6240; // type:object size:0x30 data:4byte
@30698 = .bss:0x805A6270; // type:object size:0xC scope:local
StateID_MoveDraw__14dLytDrawMark_c = .bss:0x805A6280; // type:object size:0x30 data:4byte
@30702 = .bss:0x805A62B0; // type:object size:0xC scope:local
StateID_MoveFix__14dLytDrawMark_c = .bss:0x805A62C0; // type:object size:0x30 data:4byte
@30706 = .bss:0x805A62F0; // type:object size:0xC scope:local
StateID_MoveEnd__14dLytDrawMark_c = .bss:0x805A6300; // type:object size:0x30 scope:global
@30710 = .bss:0x805A6330; // type:object size:0xC scope:local
StateID_Complete__14dLytDrawMark_c = .bss:0x805A6340; // type:object size:0x30 data:4byte
@LOCAL@setTextWithGlobalTextProcessorV__10dTextBox_cFPCwPvP16__va_list_struct@destBuffer = .bss:0x805A6370; // type:object size:0x400 scope:local
@LOCAL@setTextWithTextProcessorV__10dTextBox_cFPCwP15dTagProcessor_cPvP16__va_list_struct@destBuffer = .bss:0x805A6770; // type:object size:0x400 scope:local
@LOCAL@calcTextLines__10dTextBox_cFPCwP15dTagProcessor_c@destBuffer = .bss:0x805A6B70; // type:object size:0x400 scope:local
+1 -1
View File
@@ -492,7 +492,7 @@ config.libs = [
Object(NonMatching, "toBeSorted/d_path.cpp"),
Object(NonMatching, "toBeSorted/d_area.cpp"),
Object(Matching, "d/lyt/d2d.cpp"),
Object(NonMatching, "d/lyt/d_lyt_draw_mark.cpp"),
Object(Matching, "d/lyt/d_lyt_draw_mark.cpp"),
Object(Matching, "d/lyt/d_textbox.cpp"),
Object(Matching, "d/lyt/d_window.cpp"),
Object(Matching, "d/d_lyt_hio.cpp"),
+5
View File
@@ -94,6 +94,11 @@ public:
return mPauseDemoDisp;
}
void setDrawMarkRelated(UNKWORD p1, UNKWORD p2) {
field_0x15C54 = p1;
field_0x15C58 = p2;
}
STATE_FUNC_DECLARE(dLytControlGame_c, Normal);
STATE_FUNC_DECLARE(dLytControlGame_c, Pause_SetRes);
STATE_FUNC_DECLARE(dLytControlGame_c, Pause_SyncRes);
+64 -12
View File
@@ -1,10 +1,13 @@
#ifndef D_LYT_DRAW_MARK_H
#define D_LYT_DRAW_MARK_H
#include "common.h"
#include "d/lyt/d2d.h"
#include "m/m_vec.h"
#include "nw4r/lyt/lyt_pane.h"
#include "s/s_State.hpp"
/** 2D UI - Handles drawing the shape for re-sealing the Imprisoned One */
class dLytDrawMark_c {
public:
dLytDrawMark_c() : mStateMgr(*this) {}
@@ -19,30 +22,79 @@ public:
return field_0x940;
}
void setField_0x941(u8 v) {
field_0x941 = v;
void setForceComplete(bool v) {
mForceComplete = v;
}
private:
enum Variant_e {
VAR_IMP_1,
VAR_IMP_2,
VAR_IMP_3,
};
void buildVariant01();
void buildVariant02();
void buildVariant03();
void convertScreenPosToDpdPos(mVec2_c *pOutDpd, mVec2_c *screenPos) const;
void fn_800ADC10(mVec2_c screenPos) const;
s32 getNumLines() const;
void loadPanePos();
void detectSwordSwing();
STATE_FUNC_DECLARE(dLytDrawMark_c, Wait);
STATE_FUNC_DECLARE(dLytDrawMark_c, In);
STATE_FUNC_DECLARE(dLytDrawMark_c, RingIn);
STATE_FUNC_DECLARE(dLytDrawMark_c, MoveWait);
STATE_FUNC_DECLARE(dLytDrawMark_c, MoveDraw);
STATE_FUNC_DECLARE(dLytDrawMark_c, MoveFix);
STATE_FUNC_DECLARE(dLytDrawMark_c, MoveEnd); // Unused?
STATE_FUNC_DECLARE(dLytDrawMark_c, Complete);
/* 0x000 */ UI_STATE_MGR_DECLARE(dLytDrawMark_c);
/* 0x018 */ d2d::LytBase_c mLyt;
/* 0x03C */ d2d::LytBase_c mLyt;
/* 0x0CC */ d2d::AnmGroup_c mAnm[16];
/* 0x4CC */ u8 _0x4CC[0x504 - 0x4CC];
/* 0x4CC */ nw4r::lyt::Pane *mpPanes[13];
/* 0x500 */ nw4r::lyt::Pane *field_0x500;
/* 0x504 */ d2d::ResAccIf_c mResAcc;
/* 0x874 */ u8 _0x874[0x88C - 0x874];
/* 0x874 */ mVec2_c field_0x874;
/* 0x87C */ mVec2_c mDpdPosLastFrame;
/* 0x884 */ mVec2_c mDpdPosScreen;
/* 0x88C */ mVec2_c field_0x88C[6];
/* 0x8BC */ mVec2_c field_0x8BC[6];
/* 0x88C */ mVec2_c mStartPositions[6];
/* 0x8BC */ mVec2_c mEndPositions[6];
/* 0x8EC */ u8 _0x8EC[0x940 - 0x8EC];
/* 0x8EC */ s32 mLineLoopIndex;
/* 0x940 */ u8 field_0x940;
/* 0x941 */ u8 field_0x941;
/* 0x8F0 */ s32 mVariant;
/* 0x8F4 */ s32 mSavedLineLoopIndex;
/* 0x8F8 */ s32 field_0x8F8;
/* 0x8FC */ s32 mLineFixIndex;
/* 0x900 */ s32 field_0x900;
/* 0x904 */ s32 mDpdPosInitTimer;
/* 0x908 */ s32 mSampleTimer;
/* 0x942 */ u8 _0x942[0x958 - 0x942];
/* 0x90C */ u8 _0x90C[0x910 - 0x90C];
/* 0x910 */ f32 field_0x910;
/* 0x914 */ f32 field_0x914;
/* 0x918 */ f32 field_0x918[10];
/* 0x940 */ bool field_0x940;
/* 0x941 */ bool mForceComplete;
/* 0x942 */ bool mLastLine;
/* 0x943 */ bool mNeedEnableLineLoop;
/* 0x944 */ u8 field_0x944;
/* 0x945 */ bool mAnmCtrlInUse[16];
/* 0x955 */ bool field_0x955;
/* 0x956 */ bool field_0x956;
/* 0x957 */ bool field_0x957;
};
#endif
+4
View File
@@ -310,6 +310,10 @@ public:
return cM::atan2s(x, y);
}
s16 ang2() const {
return cM::atan2s(y, x);
}
mVec2_c operator*(f32 f) const {
return mVec2_c(x * f, y * f);
}
+1 -1
View File
@@ -360,7 +360,7 @@ int dLytControlGame_c::execute() {
if (mpDrawMark != nullptr) {
if (field_0x15C54 == 0) {
mpDrawMark->setField_0x941(1);
mpDrawMark->setForceComplete(true);
}
mpDrawMark->execute();
if (mpDrawMark->getField_0x940() != 0) {
+596
View File
@@ -0,0 +1,596 @@
#include "d/lyt/d_lyt_draw_mark.h"
#include "common.h"
#include "d/d_gfx.h"
#include "d/d_pad.h"
#include "d/d_rumble.h"
#include "d/d_sc_game.h"
#include "d/flag/storyflag_manager.h"
#include "d/lyt/d_lyt_control_game.h"
#include "d/lyt/d_lyt_do_button.h"
#include "d/snd/d_snd_bgm_mgr.h"
#include "d/snd/d_snd_small_effect_mgr.h"
#include "d/snd/d_snd_wzsound.h"
#include "m/m_angle.h"
#include "m/m_pad.h"
#include "m/m_vec.h"
#include "nw4r/math/math_types.h"
#include "toBeSorted/arc_managers/layout_arc_manager.h"
class dLytDrawMark_HIO_c {
public:
dLytDrawMark_HIO_c();
virtual ~dLytDrawMark_HIO_c();
/* 0x04 */ f32 field_0x04;
/* 0x08 */ f32 field_0x08;
/* 0x0C */ f32 field_0x0C;
/* 0x10 */ f32 field_0x10;
/* 0x14 */ s16 field_0x14;
/* 0x16 */ u16 field_0x16;
/* 0x18 */ u16 field_0x18;
/* 0x1A */ s16 field_0x1A;
/* 0x1C */ s16 field_0x1C;
/* 0x1E */ u8 field_0x1E;
};
static dLytDrawMark_HIO_c sHio;
dLytDrawMark_HIO_c::dLytDrawMark_HIO_c() {
field_0x14 = 10;
field_0x04 = 620.0f;
field_0x08 = 800.0f;
field_0x0C = 35.0f;
field_0x10 = 30.0f;
field_0x16 = 5;
field_0x1A = 10923;
field_0x18 = 9000;
field_0x1C = 10;
field_0x1E = 0;
}
dLytDrawMark_HIO_c::~dLytDrawMark_HIO_c() {}
STATE_DEFINE(dLytDrawMark_c, Wait);
STATE_DEFINE(dLytDrawMark_c, In);
STATE_DEFINE(dLytDrawMark_c, RingIn);
STATE_DEFINE(dLytDrawMark_c, MoveWait);
STATE_DEFINE(dLytDrawMark_c, MoveDraw);
STATE_DEFINE(dLytDrawMark_c, MoveFix);
STATE_DEFINE(dLytDrawMark_c, MoveEnd);
STATE_DEFINE(dLytDrawMark_c, Complete);
#define DRAW_MARK_ANIM_IN 0
#define DRAW_MARK_ANIM_RING_IN 1
#define DRAW_MARK_ANIM_DRAW_LINE_LOOP_OFFSET 2
#define DRAW_MARK_ANIM_BASE_LOOP 8
#define DRAW_MARK_ANIM_LINE_FIX_OFFSET 9
#define DRAW_MARK_ANIM_COMPLETE 15
#define DRAW_MARK_NUM_ANIMS 16
#define DRAW_MARK_PANE_START_OFFSET 0
#define DRAW_MARK_PANE_END_OFFSET 6
#define DRAW_MARK_PANE_RING_ALL 12
#define DRAW_MARK_NUM_PANES 13
bool dLytDrawMark_c::build(UNKWORD) {
// enums cause deoptimization here...
mVariant = dScGame_c::currentSpawnInfo.layer == 3 ? /* VAR_IMP_2*/ 1 : dScGame_c::currentSpawnInfo.layer == 4 ? /* VAR_IMP_3 */ 2 : /* VAR_IMP_1 */ 0;
if (mVariant == VAR_IMP_2) {
buildVariant02();
} else if (mVariant == VAR_IMP_3) {
buildVariant03();
} else {
buildVariant01();
}
field_0x500 = mpPanes[0];
mLastLine = false;
mNeedEnableLineLoop = false;
field_0x940 = false;
mForceComplete = false;
mSavedLineLoopIndex = -1;
field_0x8F8 = -1;
mLineFixIndex = 0;
field_0x944 = 0;
field_0x900 = 0;
mDpdPosInitTimer = 1;
mSampleTimer = 0;
mLineLoopIndex = 0;
field_0x874.x = field_0x874.y = 0.0f;
mDpdPosLastFrame.x = mDpdPosLastFrame.y = 0.0f;
field_0x910 = 0.0f;
field_0x914 = 0.0f;
for (int i = 0; i < 10; i++) {
field_0x918[i] = 0.0f;
}
field_0x955 = 0;
field_0x956 = 0;
field_0x957 = 0;
for (int i = 0; i < 6; i++) {
mStartPositions[i].x = mStartPositions[i].y = 0.0f;
mEndPositions[i].x = mEndPositions[i].y = 0.0f;
}
mAnm[DRAW_MARK_ANIM_IN].setFrame(0.0f);
mAnm[DRAW_MARK_ANIM_IN].setAnimEnable(true);
mAnm[DRAW_MARK_ANIM_RING_IN].setFrame(0.0f);
mAnm[DRAW_MARK_ANIM_RING_IN].setAnimEnable(true);
mLyt.calc();
mAnm[DRAW_MARK_ANIM_IN].setAnimEnable(false);
mAnm[DRAW_MARK_ANIM_RING_IN].setAnimEnable(false);
mStateMgr.changeState(StateID_In);
return true;
}
bool dLytDrawMark_c::remove() {
dPad::ex_c::getInstance()->setField_0x70();
mResAcc.detach();
return true;
}
bool dLytDrawMark_c::execute() {
dPad::ex_c::fn_80059220();
mStateMgr.executeState();
for (int i = 0; i < DRAW_MARK_NUM_ANIMS; i++) {
if (mAnmCtrlInUse[i]) {
if (mAnm[i].isEnabled()) {
mAnm[i].play();
}
}
}
mLyt.calc();
return true;
}
bool dLytDrawMark_c::draw() {
mLyt.addToDrawList();
return true;
}
void dLytDrawMark_c::initializeState_Wait() {}
void dLytDrawMark_c::executeState_Wait() {}
void dLytDrawMark_c::finalizeState_Wait() {}
void dLytDrawMark_c::initializeState_In() {
mAnm[DRAW_MARK_ANIM_IN].setForwardOnce();
mAnm[DRAW_MARK_ANIM_IN].setToStart();
mAnm[DRAW_MARK_ANIM_IN].setAnimEnable(true);
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SEAL_APPEAR);
if (mVariant == VAR_IMP_2) {
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SEAL_LINE_APPEAR_2);
} else if (mVariant == VAR_IMP_3) {
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SEAL_LINE_APPEAR_3);
} else {
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SEAL_LINE_APPEAR_1);
}
}
void dLytDrawMark_c::executeState_In() {
if (mAnm[DRAW_MARK_ANIM_IN].isStop2()) {
mAnm[DRAW_MARK_ANIM_IN].setAnimEnable(false);
mStateMgr.changeState(StateID_RingIn);
}
}
void dLytDrawMark_c::finalizeState_In() {}
void dLytDrawMark_c::initializeState_RingIn() {
mAnm[DRAW_MARK_ANIM_RING_IN].setForwardOnce();
mAnm[DRAW_MARK_ANIM_RING_IN].setToStart();
mAnm[DRAW_MARK_ANIM_RING_IN].setAnimEnable(true);
mAnm[DRAW_MARK_ANIM_BASE_LOOP].setAnimEnable(true);
mAnm[DRAW_MARK_ANIM_BASE_LOOP].setFrame(0.0f);
}
void dLytDrawMark_c::executeState_RingIn() {
if (mAnm[DRAW_MARK_ANIM_RING_IN].isStop2()) {
mAnm[DRAW_MARK_ANIM_RING_IN].setAnimEnable(false);
mNeedEnableLineLoop = true;
mStateMgr.changeState(StateID_MoveWait);
}
}
void dLytDrawMark_c::finalizeState_RingIn() {}
void dLytDrawMark_c::initializeState_MoveWait() {
loadPanePos();
if (mNeedEnableLineLoop) {
mAnm[mLineLoopIndex + DRAW_MARK_ANIM_DRAW_LINE_LOOP_OFFSET].setAnimEnable(true);
mNeedEnableLineLoop = false;
}
field_0x874 = mStartPositions[mLineLoopIndex];
// unused
mVec2_c _ = mEndPositions[mLineLoopIndex] - mStartPositions[mLineLoopIndex];
if (mSavedLineLoopIndex == -1) {
mSavedLineLoopIndex = mLineLoopIndex;
}
}
void dLytDrawMark_c::executeState_MoveWait() {
if (mAnm[mLineLoopIndex + DRAW_MARK_ANIM_DRAW_LINE_LOOP_OFFSET].getFrame() == 1.0f) {
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SEAL_LINE_BLINK);
}
dPad::ex_c::getInstance()->setField_0x70(sHio.field_0x18);
fn_800ADC10(mVec2_c(0.0f, 0.0f));
mDpdPosScreen.x = mDpdPosScreen.y = 0.0f;
mDpdPosLastFrame.set(0.0f, 0.0f);
mStateMgr.changeState(StateID_MoveDraw);
}
void dLytDrawMark_c::finalizeState_MoveWait() {}
void dLytDrawMark_c::initializeState_MoveDraw() {
mDpdPosInitTimer = 1;
field_0x900 = 0;
field_0x914 = 0.0f;
for (int i = 0; i < 10; i++) {
field_0x918[i] = 0.0f;
}
field_0x955 = 0;
field_0x956 = 0;
field_0x957 = 0;
}
void dLytDrawMark_c::executeState_MoveDraw() {
if (mAnm[mLineLoopIndex + DRAW_MARK_ANIM_DRAW_LINE_LOOP_OFFSET].getFrame() == 1.0f) {
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SEAL_LINE_BLINK);
}
if (mForceComplete) {
mStateMgr.changeState(StateID_Complete);
} else {
detectSwordSwing();
}
}
void dLytDrawMark_c::finalizeState_MoveDraw() {}
void dLytDrawMark_c::initializeState_MoveFix() {
mAnm[mLineLoopIndex + DRAW_MARK_ANIM_DRAW_LINE_LOOP_OFFSET].setFrame(0.0f);
mLyt.calc();
mAnm[mLineLoopIndex + DRAW_MARK_ANIM_DRAW_LINE_LOOP_OFFSET].setAnimEnable(false);
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SEAL_LINE);
dRumble_c::start(dRumble_c::sRumblePreset4, dRumble_c::FLAG_SLOT0);
mAnm[mLineFixIndex + DRAW_MARK_ANIM_LINE_FIX_OFFSET].setAnimEnable(true);
mAnm[mLineFixIndex + DRAW_MARK_ANIM_LINE_FIX_OFFSET].setFrame(0.0f);
}
void dLytDrawMark_c::executeState_MoveFix() {
if (mAnm[mLineFixIndex + DRAW_MARK_ANIM_LINE_FIX_OFFSET].isEndReached()) {
mAnm[mLineFixIndex + DRAW_MARK_ANIM_LINE_FIX_OFFSET].setAnimEnable(false);
mLineFixIndex++;
if (mLineLoopIndex >= getNumLines() - 1) {
mLineLoopIndex = 0;
mLastLine = true;
} else {
mLineLoopIndex++;
}
mNeedEnableLineLoop = true;
if (mSavedLineLoopIndex < getNumLines()) {
if (mLastLine) {
dLytControlGame_c::getInstance()->setDrawMarkRelated(0, 0);
mStateMgr.changeState(StateID_Complete);
} else {
mSavedLineLoopIndex = -1;
mStateMgr.changeState(StateID_MoveWait);
}
}
}
}
void dLytDrawMark_c::finalizeState_MoveFix() {}
void dLytDrawMark_c::initializeState_MoveEnd() {
if (mLineLoopIndex >= getNumLines() - 1) {
mLineLoopIndex = 0;
mLastLine = true;
} else {
mLineLoopIndex++;
}
mNeedEnableLineLoop = true;
}
void dLytDrawMark_c::executeState_MoveEnd() {
if (mSavedLineLoopIndex < getNumLines()) {
if (mLastLine) {
dLytControlGame_c::getInstance()->setDrawMarkRelated(0, 0);
mStateMgr.changeState(StateID_Complete);
} else {
mSavedLineLoopIndex = -1;
mStateMgr.changeState(StateID_MoveWait);
}
}
}
void dLytDrawMark_c::finalizeState_MoveEnd() {}
void dLytDrawMark_c::initializeState_Complete() {
static const s32 sFlags[] = {
STORYFLAG_IMPRISONED_1_DEFEATED,
STORYFLAG_IMPRISONED_2_DEFEATED,
STORYFLAG_IMPRISONED_3_DEFEATED,
};
mAnm[DRAW_MARK_ANIM_COMPLETE].setForwardOnce();
mAnm[DRAW_MARK_ANIM_COMPLETE].setToStart();
mAnm[DRAW_MARK_ANIM_COMPLETE].setAnimEnable(true);
StoryflagManager::sInstance->setFlag(sFlags[mVariant]);
dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SEAL_COMPLETE);
dSndBgmMgr_c::GetInstance()->stopAllBgm(30);
}
void dLytDrawMark_c::executeState_Complete() {
if (mAnm[DRAW_MARK_ANIM_COMPLETE].isEndReached()) {
mAnm[DRAW_MARK_ANIM_COMPLETE].setAnimEnable(false);
field_0x940 = true;
mStateMgr.changeState(StateID_Wait);
}
}
void dLytDrawMark_c::finalizeState_Complete() {}
void dLytDrawMark_c::detectSwordSwing() {
dPad::ex_c::getInstance()->setField_0x70(sHio.field_0x18);
mDpdPosScreen = dPad::getDpdPosScreen();
if (mDpdPosInitTimer > 0) {
mDpdPosLastFrame = mDpdPosScreen;
mDpdPosInitTimer--;
}
if (mSampleTimer > 0) {
mSampleTimer--;
mDpdPosLastFrame = mDpdPosScreen;
} else {
mVec2_c swingDir(mDpdPosScreen.x - mDpdPosLastFrame.x, mDpdPosScreen.y - mDpdPosLastFrame.y);
mAng swingAngle = swingDir.ang2();
mVec2_c lineDir = mEndPositions[mLineLoopIndex] - mStartPositions[mLineLoopIndex];
mAng lineAngle = lineDir.ang2();
mVec2_c v(swingDir);
v.y *= dGfx_c::getScreenAspectF();
f32 swingMag = v.length();
mAng ang2 = mAng::abs(lineAngle - swingAngle);
if (field_0x910 >= sHio.field_0x08) {
if (swingMag < sHio.field_0x10) {
field_0x914 = 0.0f;
} else {
field_0x914 += swingMag;
bool isSwingInRightDirection = false;
if (ang2 <= sHio.field_0x1A) {
isSwingInRightDirection = true;
}
field_0x955 = field_0x956;
field_0x956 = field_0x957;
field_0x957 = isSwingInRightDirection;
if (field_0x914 >= sHio.field_0x04) {
if (field_0x955 && field_0x956 && field_0x957) {
field_0x910 = sHio.field_0x08 / 2.0f;
}
mStateMgr.changeState(StateID_MoveFix);
return;
}
}
} else {
if (ang2 <= sHio.field_0x1A) {
field_0x900++;
field_0x914 += swingMag;
if (field_0x900 > sHio.field_0x14) {
field_0x900 = sHio.field_0x14;
field_0x914 -= field_0x918[0];
for (int i = 0; i < 9; i++) {
field_0x918[i] = field_0x918[i + 1];
}
field_0x918[9] = swingMag;
} else {
s32 idx = field_0x900 - 1;
field_0x918[idx] = swingMag;
}
if (field_0x914 >= sHio.field_0x04) {
field_0x910 = 0.0f;
mStateMgr.changeState(StateID_MoveFix);
return;
}
} else {
if (swingMag >= sHio.field_0x0C) {
field_0x910 += swingMag - sHio.field_0x0C;
if (field_0x910 >= sHio.field_0x08) {
mSampleTimer = sHio.field_0x1C;
}
}
field_0x900 = 0;
field_0x914 = 0.0f;
for (int i = 0; i < 10; i++) {
field_0x918[i] = 0.0f;
}
}
}
fn_800ADC10(mVec2_c(0.0f, 0.0f));
mDpdPosScreen.x = mDpdPosScreen.y = 0.0f;
mDpdPosLastFrame.set(0.0f, 0.0f);
dLytDobutton_c::setActionTextStuff(dLytDobutton_c::ICON_2, dLytDobutton_c::ACT_DO_70, true);
}
}
// Copied from SelectBtnHelper
void dLytDrawMark_c::convertScreenPosToDpdPos(mVec2_c *pOutDpd, mVec2_c *screenPos) const {
pOutDpd->x = (screenPos->x - dGfx_c::getWidth4x3LeftF()) / (dGfx_c::getWidth4x3F() * 0.5f) - 1.0f;
pOutDpd->y = (screenPos->y - dGfx_c::getCurrentScreenTopF()) / (dGfx_c::getCurrentScreenHeightF() * -0.5f) - 1.0f;
}
// Copied from SelectBtnHelper
void dLytDrawMark_c::fn_800ADC10(mVec2_c screenPos) const {
mVec2_c dpdPos;
convertScreenPosToDpdPos(&dpdPos, &screenPos);
dPad::ex_c::getInstance()->fn_80056580(mPad::getCurrentCoreID(), dpdPos);
}
void dLytDrawMark_c::loadPanePos() {
for (int i = 0; i < getNumLines(); i++) {
nw4r::math::MTX34 mtx1 = mpPanes[i + DRAW_MARK_PANE_START_OFFSET]->GetGlobalMtx();
mStartPositions[i].set(mtx1._03, mtx1._13);
nw4r::math::MTX34 mtx2 = mpPanes[i + DRAW_MARK_PANE_END_OFFSET]->GetGlobalMtx();
mEndPositions[i].set(mtx2._03, mtx2._13);
}
}
static const d2d::LytBrlanMapping brlanMapVariant01[] = {
{ "drawMark_01_in.brlan", "G_inOut_00"},
{ "drawMark_01_ringIn.brlan", "G_inOut_01"},
{"drawMark_01_drawLineLoop.brlan", "G_triangle_00"},
{"drawMark_01_drawLineLoop.brlan", "G_triangle_01"},
{"drawMark_01_drawLineLoop.brlan", "G_triangle_02"},
{ "", ""},
{ "", ""},
{ "", ""},
{ "drawMark_01_baseLoop.brlan", "G_baseAll_00"},
{ "drawMark_01_LineFix.brlan", "G_lineFix_00"},
{ "drawMark_01_LineFix.brlan", "G_lineFix_01"},
{ "drawMark_01_LineFix.brlan", "G_lineFix_02"},
{ "", ""},
{ "", ""},
{ "", ""},
{ "drawMark_01_complete.brlan", "G_complete_00"},
};
static const char *sPaneNamesVariant01[] = {
"N_start_03", "N_start_04", "N_start_05", nullptr, nullptr, nullptr, "N_end_01",
"N_end_02", "N_end_03", nullptr, nullptr, nullptr, "N_ringAll_00",
};
void dLytDrawMark_c::buildVariant01() {
void *data = LayoutArcManager::GetInstance()->getLoadedData("DrawMark_01");
mResAcc.attach(data, "");
mLyt.setResAcc(&mResAcc);
mLyt.build("drawMark_01.brlyt", nullptr);
for (int i = 0; i < DRAW_MARK_NUM_ANIMS; i++) {
if (brlanMapVariant01[i].mFile[0] == '\0') {
mAnmCtrlInUse[i] = false;
} else {
mAnmCtrlInUse[i] = true;
mAnm[i].init(brlanMapVariant01[i].mFile, &mResAcc, mLyt.getLayout(), brlanMapVariant01[i].mName);
mAnm[i].bind(false);
mAnm[i].setAnimEnable(false);
}
}
for (int i = 0; i < DRAW_MARK_NUM_PANES; i++) {
if (sPaneNamesVariant01[i] != nullptr) {
mpPanes[i] = mLyt.findPane(sPaneNamesVariant01[i]);
} else {
mpPanes[i] = nullptr;
}
}
}
static const d2d::LytBrlanMapping brlanMapVariant02[] = {
{ "drawMark_02_in.brlan", "G_inOut_00"},
{ "drawMark_02_ringIn.brlan", "G_inOut_01"},
{"drawMark_02_drawLineLoop.brlan", "G_triangle_00"},
{"drawMark_02_drawLineLoop.brlan", "G_triangle_01"},
{"drawMark_02_drawLineLoop.brlan", "G_triangle_02"},
{"drawMark_02_drawLineLoop.brlan", "G_triangle_03"},
{ "", ""},
{ "", ""},
{ "drawMark_02_baseLoop.brlan", "G_baseAll_00"},
{ "drawMark_02_LineFix.brlan", "G_lineFix_00"},
{ "drawMark_02_LineFix.brlan", "G_lineFix_01"},
{ "drawMark_02_LineFix.brlan", "G_lineFix_02"},
{ "drawMark_02_LineFix.brlan", "G_lineFix_03"},
{ "", ""},
{ "", ""},
{ "drawMark_02_complete.brlan", "G_complete_00"},
};
static const char *sPaneNamesVariant02[] = {
"N_start_00", "N_start_01", "N_start_02", "N_start_03", nullptr, nullptr, "N_end_01",
"N_end_02", "N_end_03", "N_end_04", nullptr, nullptr, "N_ringAll_00",
};
void dLytDrawMark_c::buildVariant02() {
void *data = LayoutArcManager::GetInstance()->getLoadedData("DrawMark_02");
mResAcc.attach(data, "");
mLyt.setResAcc(&mResAcc);
mLyt.build("drawMark_02.brlyt", nullptr);
for (int i = 0; i < DRAW_MARK_NUM_ANIMS; i++) {
if (brlanMapVariant02[i].mFile[0] == '\0') {
mAnmCtrlInUse[i] = false;
} else {
mAnmCtrlInUse[i] = true;
mAnm[i].init(brlanMapVariant02[i].mFile, &mResAcc, mLyt.getLayout(), brlanMapVariant02[i].mName);
mAnm[i].bind(false);
mAnm[i].setAnimEnable(false);
}
}
for (int i = 0; i < DRAW_MARK_NUM_PANES; i++) {
if (sPaneNamesVariant02[i] != nullptr) {
mpPanes[i] = mLyt.findPane(sPaneNamesVariant02[i]);
} else {
mpPanes[i] = nullptr;
}
}
}
static const d2d::LytBrlanMapping brlanMapVariant03[] = {
{ "drawMark_03_in.brlan", "G_inOut_00"},
{ "drawMark_03_ringIn.brlan", "G_inOut_01"},
{"drawMark_03_drawLineLoop.brlan", "G_triangle_00"},
{"drawMark_03_drawLineLoop.brlan", "G_triangle_01"},
{"drawMark_03_drawLineLoop.brlan", "G_triangle_02"},
{"drawMark_03_drawLineLoop.brlan", "G_triangle_03"},
{"drawMark_03_drawLineLoop.brlan", "G_triangle_04"},
{"drawMark_03_drawLineLoop.brlan", "G_triangle_05"},
{ "drawMark_03_baseLoop.brlan", "G_baseAll_00"},
{ "drawMark_03_LineFix.brlan", "G_lineFix_00"},
{ "drawMark_03_LineFix.brlan", "G_lineFix_01"},
{ "drawMark_03_LineFix.brlan", "G_lineFix_02"},
{ "drawMark_03_LineFix.brlan", "G_lineFix_03"},
{ "drawMark_03_LineFix.brlan", "G_lineFix_04"},
{ "drawMark_03_LineFix.brlan", "G_lineFix_05"},
{ "drawMark_03_complete.brlan", "G_complete_00"},
};
static const char *sPaneNamesVariant03[] = {
"N_start_00", "N_start_01", "N_start_02", "N_start_03", "N_start_04", "N_start_05", "N_end_01",
"N_end_02", "N_end_03", "N_end_04", "N_end_05", "N_end_06", "N_ringAll_00",
};
void dLytDrawMark_c::buildVariant03() {
void *data = LayoutArcManager::GetInstance()->getLoadedData("DrawMark_03");
mResAcc.attach(data, "");
mLyt.setResAcc(&mResAcc);
mLyt.build("drawMark_03.brlyt", nullptr);
for (int i = 0; i < DRAW_MARK_NUM_ANIMS; i++) {
if (brlanMapVariant03[i].mFile[0] == '\0') {
mAnmCtrlInUse[i] = false;
} else {
mAnmCtrlInUse[i] = true;
mAnm[i].init(brlanMapVariant03[i].mFile, &mResAcc, mLyt.getLayout(), brlanMapVariant03[i].mName);
mAnm[i].bind(false);
mAnm[i].setAnimEnable(false);
}
}
for (int i = 0; i < DRAW_MARK_NUM_PANES; i++) {
if (sPaneNamesVariant03[i] != nullptr) {
mpPanes[i] = mLyt.findPane(sPaneNamesVariant03[i]);
} else {
mpPanes[i] = nullptr;
}
}
}
s32 dLytDrawMark_c::getNumLines() const {
if (mVariant == VAR_IMP_2) {
return 4;
} else if (mVariant == VAR_IMP_3) {
return 6;
} else {
return 3;
}
}