From 37cfe931152b5e328147c99afe30a98e0055d1fb Mon Sep 17 00:00:00 2001 From: robojumper Date: Fri, 15 Nov 2024 09:34:44 +0100 Subject: [PATCH] Tbox wip --- config/SOUE01/splits.txt | 2 + config/SOUE01/symbols.txt | 154 ++++++++++++++++----------------- include/d/a/obj/d_a_obj_tbox.h | 82 ++++++++++++++++++ src/d/a/obj/d_a_obj_tbox.cpp | 81 +++++++++++++++++ 4 files changed, 242 insertions(+), 77 deletions(-) create mode 100644 include/d/a/obj/d_a_obj_tbox.h create mode 100644 src/d/a/obj/d_a_obj_tbox.cpp diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index 1f4b5e83..f826aa09 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -640,7 +640,9 @@ d/a/obj/d_a_obj_fairy.cpp: d/a/obj/d_a_obj_tbox.cpp: .text start:0x802685A0 end:0x8026F488 .ctors start:0x804DB83C end:0x804DB840 + .rodata start:0x804ED3B0 end:0x804EE548 .data start:0x80535270 end:0x80535A18 + .bss start:0x805B4FA8 end:0x805B5458 d/a/obj/d_a_obj_time_area.cpp: .text start:0x8026F490 end:0x80271888 diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index 428b2d63..8e658e75 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -14236,7 +14236,7 @@ initializeState__28sFStateID_c<13dAcObjFairy_c>CFR13dAcObjFairy_c = .text:0x8026 __sinit_\d_a_obj_fairy_cpp = .text:0x80267F40; // type:function size:0x56C scope:local __dt__28sFStateID_c<13dAcObjFairy_c>Fv = .text:0x802684B0; // type:function size:0x58 isSameName__28sFStateID_c<13dAcObjFairy_c>CFPCc = .text:0x80268510; // type:function size:0x88 -AcTbox__ctor = .text:0x802685A0; // type:function size:0x30 +dAcTbox_c_classInit__Fv = .text:0x802685A0; // type:function size:0x30 fn_802685D0 = .text:0x802685D0; // type:function size:0x68 fn_80268640 = .text:0x80268640; // type:function size:0x4 fn_80268650 = .text:0x80268650; // type:function size:0x8 @@ -14244,21 +14244,21 @@ fn_80268660 = .text:0x80268660; // type:function size:0x20 hasCollectedAllTears2 = .text:0x80268680; // type:function size:0x1C fn_802686A0 = .text:0x802686A0; // type:function size:0x50 fn_802686F0 = .text:0x802686F0; // type:function size:0x5C -AcTbox__ctorCont = .text:0x80268750; // type:function size:0x2EC -fn_80268A40 = .text:0x80268A40; // type:function size:0x98 -fn_80268AE0 = .text:0x80268AE0; // type:function size:0x58 -fn_80268B40 = .text:0x80268B40; // type:function size:0x6C -fn_80268BB0 = .text:0x80268BB0; // type:function size:0xA0 -fn_80268C50 = .text:0x80268C50; // type:function size:0xA4 -AcTbox__dtor = .text:0x80268D00; // type:function size:0x250 +__ct__9dAcTbox_cFv = .text:0x80268750; // type:function size:0x2EC +__dt__10dAcTboxCcDFv = .text:0x80268A40; // type:function size:0x98 +__dt__21sFState_c<9dAcTbox_c>Fv = .text:0x80268AE0; // type:function size:0x58 +__dt__24sFStateFct_c<9dAcTbox_c>Fv = .text:0x80268B40; // type:function size:0x6C +__dt__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x80268BB0; // type:function size:0xA0 +__dt__47sFStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c>Fv = .text:0x80268C50; // type:function size:0xA4 +__dt__9dAcTbox_cFv = .text:0x80268D00; // type:function size:0x250 AcTbox__initModels = .text:0x80268F50; // type:function size:0x54C AcTbox__init = .text:0x802694A0; // type:function size:0xA00 AcTbox__destroy = .text:0x80269EA0; // type:function size:0xB4 AcTbox__update = .text:0x80269F60; // type:function size:0x690 -fn_8026A5F0 = .text:0x8026A5F0; // type:function size:0x10 -fn_8026A600 = .text:0x8026A600; // type:function size:0x10 +getStateID__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8026A5F0; // type:function size:0x10 +executeState__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8026A600; // type:function size:0x10 AcTbox__updateInEvent = .text:0x8026A610; // type:function size:0x8F0 -fn_8026AF00 = .text:0x8026AF00; // type:function size:0x10 +changeState__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x8026AF00; // type:function size:0x10 AcTbox__draw = .text:0x8026AF10; // type:function size:0x1AC AcTbox__setActionState = .text:0x8026B0C0; // type:function size:0x224 AcTbox__isValidSubtype = .text:0x8026B2F0; // type:function size:0x20 @@ -14271,45 +14271,45 @@ getRotX_shift9_0x1 = .text:0x8026B360; // type:function size:0xC fn_8026B370 = .text:0x8026B370; // type:function size:0xC fn_8026B380 = .text:0x8026B380; // type:function size:0x3C fn_8026B3C0 = .text:0x8026B3C0; // type:function size:0x20 -AcTbox__stateDugOutEnter = .text:0x8026B3E0; // type:function size:0x11C -AcTbox__stateDugOutUpdate = .text:0x8026B500; // type:function size:0x3D8 -AcTbox__stateDugOutLeave = .text:0x8026B8E0; // type:function size:0x4 -AcTbox__stateWaitAppearEnter = .text:0x8026B8F0; // type:function size:0x7C -AcTbox__stateWaitAppearUpdate = .text:0x8026B970; // type:function size:0xB8 -AcTbox__stateWaitAppearLeave = .text:0x8026BA30; // type:function size:0x4 -AcTbox__stateDemoAppearEnter = .text:0x8026BA40; // type:function size:0xD0 -AcTbox__stateDemoAppearUpdate = .text:0x8026BB10; // type:function size:0x1F4 -AcTbox__stateDemoAppearLeave = .text:0x8026BD10; // type:function size:0x4 -AcTbox__stateWaitOpenEnter = .text:0x8026BD20; // type:function size:0x18C -AcTbox__stateWaitOpenUpdate = .text:0x8026BEB0; // type:function size:0x7C -AcTbox__stateWaitOpenLeave = .text:0x8026BF30; // type:function size:0x28 -AcTbox__stateGoddessWaitOffEnter = .text:0x8026BF60; // type:function size:0x84 -AcTbox__stateGoddessWaitOffUpdate = .text:0x8026BFF0; // type:function size:0x4 -AcTbox__stateGoddessWaitOffLeave = .text:0x8026C000; // type:function size:0x4 -AcTbox__stateGoddessWaitOnEnter = .text:0x8026C010; // type:function size:0x84 -AcTbox__stateGoddessWaitOnUpdate = .text:0x8026C0A0; // type:function size:0x60 -AcTbox__stateGoddessWaitOnLeave = .text:0x8026C100; // type:function size:0x3C -AcTbox__stateDeleteArchiveEnter = .text:0x8026C140; // type:function size:0x108 -AcTbox__stateDeleteArchiveUpdate = .text:0x8026C250; // type:function size:0xC8 -AcTbox__stateDeleteArchiveLeave = .text:0x8026C320; // type:function size:0x4 -AcTbox__stateLoadArchiveEnter = .text:0x8026C330; // type:function size:0x12C -AcTbox__stateLoadArchiveUpdate = .text:0x8026C460; // type:function size:0x58 -AcTbox__stateLoadArchiveLeave = .text:0x8026C4C0; // type:function size:0x4 -AcTbox__stateOpenEnter = .text:0x8026C4D0; // type:function size:0x258 -AcTbox__stateOpenUpdate = .text:0x8026C730; // type:function size:0x11C -AcTbox__stateOpenLeave = .text:0x8026C850; // type:function size:0x4 -AcTbox__statePresentItemEnter = .text:0x8026C860; // type:function size:0x98 -AcTbox__statePresentItemUpdate = .text:0x8026C900; // type:function size:0x19C -AcTbox__statePresentItemLeave = .text:0x8026CAA0; // type:function size:0x4 -AcTbox__stateCloseEnter = .text:0x8026CAB0; // type:function size:0xA8 -AcTbox__stateCloseUpdate = .text:0x8026CB60; // type:function size:0x26C -AcTbox__stateCloseLeave = .text:0x8026CDD0; // type:function size:0x4 -AcTbox__stateWaitEnter = .text:0x8026CDE0; // type:function size:0x17C -AcTbox__stateWaitUpdate = .text:0x8026CF60; // type:function size:0x9C -AcTbox__stateWaitLeave = .text:0x8026D000; // type:function size:0x4 -AcTbox__stateGoddessWaitEnter = .text:0x8026D010; // type:function size:0x70 -AcTbox__stateGoddessWaitUpdate = .text:0x8026D080; // type:function size:0x74 -AcTbox__stateGoddessWaitLeave = .text:0x8026D100; // type:function size:0x4 +initializeState_DugOut__9dAcTbox_cFv = .text:0x8026B3E0; // type:function size:0x11C +executeState_DugOut__9dAcTbox_cFv = .text:0x8026B500; // type:function size:0x3D8 +finalizeState_DugOut__9dAcTbox_cFv = .text:0x8026B8E0; // type:function size:0x4 +initializeState_WaitAppear__9dAcTbox_cFv = .text:0x8026B8F0; // type:function size:0x7C +executeState_WaitAppear__9dAcTbox_cFv = .text:0x8026B970; // type:function size:0xB8 +finalizeState_WaitAppear__9dAcTbox_cFv = .text:0x8026BA30; // type:function size:0x4 +initializeState_DemoAppear__9dAcTbox_cFv = .text:0x8026BA40; // type:function size:0xD0 +executeState_DemoAppear__9dAcTbox_cFv = .text:0x8026BB10; // type:function size:0x1F4 +finalizeState_DemoAppear__9dAcTbox_cFv = .text:0x8026BD10; // type:function size:0x4 +initializeState_WaitOpen__9dAcTbox_cFv = .text:0x8026BD20; // type:function size:0x18C +executeState_WaitOpen__9dAcTbox_cFv = .text:0x8026BEB0; // type:function size:0x7C +finalizeState_WaitOpen__9dAcTbox_cFv = .text:0x8026BF30; // type:function size:0x28 +initializeState_GoddessWaitOff__9dAcTbox_cFv = .text:0x8026BF60; // type:function size:0x84 +executeState_GoddessWaitOff__9dAcTbox_cFv = .text:0x8026BFF0; // type:function size:0x4 +finalizeState_GoddessWaitOff__9dAcTbox_cFv = .text:0x8026C000; // type:function size:0x4 +initializeState_GoddessWaitOn__9dAcTbox_cFv = .text:0x8026C010; // type:function size:0x84 +executeState_GoddessWaitOn__9dAcTbox_cFv = .text:0x8026C0A0; // type:function size:0x60 +finalizeState_GoddessWaitOn__9dAcTbox_cFv = .text:0x8026C100; // type:function size:0x3C +initializeState_DeleteArchive__9dAcTbox_cFv = .text:0x8026C140; // type:function size:0x108 +executeState_DeleteArchive__9dAcTbox_cFv = .text:0x8026C250; // type:function size:0xC8 +finalizeState_DeleteArchive__9dAcTbox_cFv = .text:0x8026C320; // type:function size:0x4 +initializeState_LoadArchive__9dAcTbox_cFv = .text:0x8026C330; // type:function size:0x12C +executeState_LoadArchive__9dAcTbox_cFv = .text:0x8026C460; // type:function size:0x58 +finalizeState_LoadArchive__9dAcTbox_cFv = .text:0x8026C4C0; // type:function size:0x4 +initializeState_Open__9dAcTbox_cFv = .text:0x8026C4D0; // type:function size:0x258 +executeState_Open__9dAcTbox_cFv = .text:0x8026C730; // type:function size:0x11C +finalizeState_Open__9dAcTbox_cFv = .text:0x8026C850; // type:function size:0x4 +initializeState_PresentItem__9dAcTbox_cFv = .text:0x8026C860; // type:function size:0x98 +executeState_PresentItem__9dAcTbox_cFv = .text:0x8026C900; // type:function size:0x19C +finalizeState_PresentItem__9dAcTbox_cFv = .text:0x8026CAA0; // type:function size:0x4 +initializeState_Close__9dAcTbox_cFv = .text:0x8026CAB0; // type:function size:0xA8 +executeState_Close__9dAcTbox_cFv = .text:0x8026CB60; // type:function size:0x26C +finalizeState_Close__9dAcTbox_cFv = .text:0x8026CDD0; // type:function size:0x4 +initializeState_Wait__9dAcTbox_cFv = .text:0x8026CDE0; // type:function size:0x17C +executeState_Wait__9dAcTbox_cFv = .text:0x8026CF60; // type:function size:0x9C +finalizeState_Wait__9dAcTbox_cFv = .text:0x8026D000; // type:function size:0x4 +initializeState_GoddessWait__9dAcTbox_cFv = .text:0x8026D010; // type:function size:0x70 +executeState_GoddessWait__9dAcTbox_cFv = .text:0x8026D080; // type:function size:0x74 +finalizeState_GoddessWait__9dAcTbox_cFv = .text:0x8026D100; // type:function size:0x4 fn_8026D110 = .text:0x8026D110; // type:function size:0x8 fn_8026D120 = .text:0x8026D120; // type:function size:0x8 fn_8026D130 = .text:0x8026D130; // type:function size:0x10 @@ -14350,25 +14350,25 @@ fn_8026DD70 = .text:0x8026DD70; // type:function size:0x2DC AcTbox__getInteractionTargetDef = .text:0x8026E050; // type:function size:0x40 fn_8026E090 = .text:0x8026E090; // type:function size:0x594 fn_8026E630 = .text:0x8026E630; // type:function size:0x10C -fn_8026E740 = .text:0x8026E740; // type:function size:0x60 -fn_8026E7A0 = .text:0x8026E7A0; // type:function size:0xC -fn_8026E7B0 = .text:0x8026E7B0; // type:function size:0x1C -fn_8026E7D0 = .text:0x8026E7D0; // type:function size:0x1C -fn_8026E7F0 = .text:0x8026E7F0; // type:function size:0x1C -fn_8026E810 = .text:0x8026E810; // type:function size:0x10 -fn_8026E820 = .text:0x8026E820; // type:function size:0x10 -fn_8026E830 = .text:0x8026E830; // type:function size:0x10 -fn_8026E840 = .text:0x8026E840; // type:function size:0x10 -fn_8026E850 = .text:0x8026E850; // type:function size:0x10 -fn_8026E860 = .text:0x8026E860; // type:function size:0x10 -fn_8026E870 = .text:0x8026E870; // type:function size:0x30 -fn_8026E8A0 = .text:0x8026E8A0; // type:function size:0x30 -fn_8026E8D0 = .text:0x8026E8D0; // type:function size:0x30 -AcTbox__initStatesAndThings = .text:0x8026E900; // type:function size:0xA7C -AcTbox__dtor2 = .text:0x8026F380; // type:function size:0x58 -fn_8026F3E0 = .text:0x8026F3E0; // type:function size:0x88 -fn_8026F470 = .text:0x8026F470; // type:function size:0x8 -fn_8026F480 = .text:0x8026F480; // type:function size:0x8 +build__24sFStateFct_c<9dAcTbox_c>FRC12sStateIDIf_c = .text:0x8026E740; // type:function size:0x60 +dispose__24sFStateFct_c<9dAcTbox_c>FRP10sStateIf_c = .text:0x8026E7A0; // type:function size:0xC +initialize__21sFState_c<9dAcTbox_c>Fv = .text:0x8026E7B0; // type:function size:0x1C +execute__21sFState_c<9dAcTbox_c>Fv = .text:0x8026E7D0; // type:function size:0x1C +finalize__21sFState_c<9dAcTbox_c>Fv = .text:0x8026E7F0; // type:function size:0x1C +initializeState__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8026E810; // type:function size:0x10 +finalizeState__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8026E820; // type:function size:0x10 +refreshState__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x8026E830; // type:function size:0x10 +getState__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8026E840; // type:function size:0x10 +getNewStateID__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8026E850; // type:function size:0x10 +getOldStateID__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x8026E860; // type:function size:0x10 +finalizeState__23sFStateID_c<9dAcTbox_c>CFR9dAcTbox_c = .text:0x8026E870; // type:function size:0x30 +executeState__23sFStateID_c<9dAcTbox_c>CFR9dAcTbox_c = .text:0x8026E8A0; // type:function size:0x30 +initializeState__23sFStateID_c<9dAcTbox_c>CFR9dAcTbox_c = .text:0x8026E8D0; // type:function size:0x30 +__sinit_\d_a_obj_tbox_cpp = .text:0x8026E900; // type:function size:0xA7C scope:local +__dt__23sFStateID_c<9dAcTbox_c>Fv = .text:0x8026F380; // type:function size:0x58 +isSameName__23sFStateID_c<9dAcTbox_c>CFPCc = .text:0x8026F3E0; // type:function size:0x88 +@316@__dt__10dAcTboxCcDFv = .text:0x8026F470; // type:function size:0x8 +@272@__dt__10dAcTboxCcDFv = .text:0x8026F480; // type:function size:0x8 AcTimeArea__ctor = .text:0x8026F490; // type:function size:0x1A8 fn_8026F640 = .text:0x8026F640; // type:function size:0x58 fn_8026F6A0 = .text:0x8026F6A0; // type:function size:0x6C @@ -34479,13 +34479,13 @@ lbl_805353A4 = .data:0x805353A4; // type:object size:0xE4 lbl_80535488 = .data:0x80535488; // type:object size:0xC lbl_80535494 = .data:0x80535494; // type:object size:0x14 lbl_805354A8 = .data:0x805354A8; // type:object size:0x18 -AcTbox__vtable = .data:0x805354C0; // type:object size:0x80 -lbl_80535540 = .data:0x80535540; // type:object size:0x30 -lbl_80535570 = .data:0x80535570; // type:object size:0x30 -lbl_805355A0 = .data:0x805355A0; // type:object size:0x18 -lbl_805355B8 = .data:0x805355B8; // type:object size:0x18 -lbl_805355D0 = .data:0x805355D0; // type:object size:0x410 -lbl_805359E0 = .data:0x805359E0; // type:object size:0x38 +__vt__9dAcTbox_c = .data:0x805354C0; // type:object size:0x80 +__vt__47sFStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c> = .data:0x80535540; // type:object size:0x30 +__vt__77sStateMgr_c<9dAcTbox_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x80535570; // type:object size:0x30 +__vt__24sFStateFct_c<9dAcTbox_c> = .data:0x805355A0; // type:object size:0x14 +__vt__21sFState_c<9dAcTbox_c> = .data:0x805355B8; // type:object size:0x18 +__vt__10dAcTboxCcD = .data:0x805355D0; // type:object size:0x7C +__vt__23sFStateID_c<9dAcTbox_c> = .data:0x805359E0; // type:object size:0x34 g_profile_TIME_AREA = .data:0x80535A18; // type:object size:0x10 lbl_80535A28 = .data:0x80535A28; // type:object size:0x68 lbl_80535A90 = .data:0x80535A90; // type:object size:0x20 @@ -40232,7 +40232,7 @@ lbl_805758F4 = .sbss:0x805758F4; // type:object size:0x1 data:byte lbl_805758F8 = .sbss:0x805758F8; // type:object size:0x8 data:byte lbl_80575900 = .sbss:0x80575900; // type:object size:0x8 data:byte @GUARD@draw__13dAcObjFairy_cFv@rot = .sbss:0x80575908; // type:object size:0x8 data:byte -TBOX_ACTOR_LIST = .sbss:0x80575910; // type:object size:0x8 data:4byte +sTboxActorList__9dAcTbox_c = .sbss:0x80575910; // type:object size:0x8 data:4byte CURRENT_OBTAINING_ITEM_OARC_NAME = .sbss:0x80575918; // type:object size:0x4 data:4byte lbl_8057591C = .sbss:0x8057591C; // type:object size:0x1 data:byte lbl_8057591D = .sbss:0x8057591D; // type:object size:0x1 data:byte diff --git a/include/d/a/obj/d_a_obj_tbox.h b/include/d/a/obj/d_a_obj_tbox.h new file mode 100644 index 00000000..f8e9dd10 --- /dev/null +++ b/include/d/a/obj/d_a_obj_tbox.h @@ -0,0 +1,82 @@ +#ifndef D_A_OBJ_TBOX_H +#define D_A_OBJ_TBOX_H + +#include "d/a/d_a_base.h" +#include "d/a/d_a_item.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_w.h" +#include "d/col/cc/d_cc_d.h" +#include "d/d_shadow.h" +#include "m/m3d/m_anmchr.h" +#include "m/m3d/m_anmmatclr.h" +#include "m/m3d/m_anmmdl.h" +#include "m/m3d/m_anmtexpat.h" +#include "m/m3d/m_anmtexsrt.h" +#include "m/m3d/m_smdl.h" +#include "s/s_State.hpp" +#include "toBeSorted/actor_event.h" +#include "toBeSorted/dowsing_target.h" +#include "toBeSorted/stage_render_stuff.h" + +class dAcTboxCcD : public dCcD_Unk { +public: + dAcTboxCcD() : mpList(nullptr), field_0x210(nullptr) {} + virtual ~dAcTboxCcD() { + if (mpList != nullptr) { + mpList->remove(&mNode); + mpList = nullptr; + } + } + cListNd_c mNode; + void *field_0x210; + cListMg_c *mpList; +}; + +class dAcTbox_c : public dAcObjBase_c { +public: + dAcTbox_c(); + virtual ~dAcTbox_c(); + + STATE_FUNC_DECLARE(dAcTbox_c, DugOut); + STATE_FUNC_DECLARE(dAcTbox_c, WaitAppear); + STATE_FUNC_DECLARE(dAcTbox_c, DemoAppear); + STATE_FUNC_DECLARE(dAcTbox_c, WaitOpen); + STATE_FUNC_DECLARE(dAcTbox_c, GoddessWaitOff); + STATE_FUNC_DECLARE(dAcTbox_c, GoddessWaitOn); + STATE_FUNC_DECLARE(dAcTbox_c, DeleteArchive); + STATE_FUNC_DECLARE(dAcTbox_c, LoadArchive); + STATE_FUNC_DECLARE(dAcTbox_c, Open); + STATE_FUNC_DECLARE(dAcTbox_c, PresentItem); + STATE_FUNC_DECLARE(dAcTbox_c, Close); + STATE_FUNC_DECLARE(dAcTbox_c, Wait); + STATE_FUNC_DECLARE(dAcTbox_c, GoddessWait); + +private: + /* 0x0330 */ m3d::mdlAnmChr mMdl1; + /* 0x0398 */ m3d::smdl_c mMdl2; + /* 0x03B4 */ m3d::anmMatClr_c mAnmMatClr1; + /* 0x03E0 */ m3d::anmMatClr_c mAnmMatClr2; + /* 0x040C */ m3d::anmChr_c mAnmChr; + /* 0x0444 */ m3d::anmTexSrt_c mAnmTexSrt1; + /* 0x0470 */ m3d::anmTexSrt_c mAnmTexSrt2; + /* 0x049C */ m3d::anmTexPat_c mAnmTextPat; + /* 0x04C8 */ dScnCallback_c mScnCallback; + /* 0x04D4 */ dShadowCircle_c mShadowCircle; + u8 f1[0x1C]; + /* 0x04F8 */ dBgW mBgWs[2]; + /* 0x0918 */ dAcTboxCcD mCcD1; + /* 0x0B30 */ dAcTboxCcD mCcD2; + u8 f2[0xC]; + /* 0x0D54 */ dCcD_Unk mCcD3; + /* 0x0F5C */ dCcD_Cyl mCcD4; + /* 0x10AC */ STATE_MGR_DECLARE(dAcTbox_c); + /* 0x10E8 */ fLiNdBa_c mTboxListNode; + /* 0x10F4 */ ActorEventRelated mEvent; + dAcRef_c mItemRef; + /* 0x1150 */ DowsingTarget mDowsingTarget1; + /* 0x1170 */ DowsingTarget mDowsingTarget2; + + static fLiMgBa_c sTboxActorList; +}; + +#endif diff --git a/src/d/a/obj/d_a_obj_tbox.cpp b/src/d/a/obj/d_a_obj_tbox.cpp new file mode 100644 index 00000000..52f092b9 --- /dev/null +++ b/src/d/a/obj/d_a_obj_tbox.cpp @@ -0,0 +1,81 @@ +#include "d/a/obj/d_a_obj_tbox.h" +#include "m/m_vec.h" +#include "toBeSorted/dowsing_target.h" + +SPECIAL_ACTOR_PROFILE(TBOX, dAcTbox_c, fProfile::TBOX, 0x018D, 0, 6); + +extern "C" mVec3_c vecs[] = { + mVec3_c(0.0f, 54.0f, 0.0f), + mVec3_c(0.0f, 34.0f, 0.0f), + mVec3_c(0.0f, 66.5f, 0.0f), + mVec3_c(0.0f, 49.0f, 0.0f) +}; + +extern "C" mVec3_c v1 = mVec3_c(0.0f, 0.0f, -2.0f); +extern "C" mVec3_c v2 = mVec3_c(1.0f, 1.0f, 0.8f); +extern "C" mVec3_c v3 = mVec3_c(1.0f, 1.0f, 1.0f); +extern "C" mVec3_c v4 = mVec3_c(0.0f, 0.0f, 88.0f); + +STATE_DEFINE(dAcTbox_c, DugOut); +STATE_DEFINE(dAcTbox_c, WaitAppear); +STATE_DEFINE(dAcTbox_c, DemoAppear); +STATE_DEFINE(dAcTbox_c, WaitOpen); +STATE_DEFINE(dAcTbox_c, GoddessWaitOff); +STATE_DEFINE(dAcTbox_c, GoddessWaitOn); +STATE_DEFINE(dAcTbox_c, DeleteArchive); +STATE_DEFINE(dAcTbox_c, LoadArchive); +STATE_DEFINE(dAcTbox_c, Open); +STATE_DEFINE(dAcTbox_c, PresentItem); +STATE_DEFINE(dAcTbox_c, Close); +STATE_DEFINE(dAcTbox_c, Wait); +STATE_DEFINE(dAcTbox_c, GoddessWait); + +fLiMgBa_c dAcTbox_c::sTboxActorList; + +dAcTbox_c::dAcTbox_c() : mStateMgr(*this, sStateID::null), mScnCallback(this), mEvent(*this, nullptr), mTboxListNode(this), mDowsingTarget1(this, DowsingTarget::SLOT_NONE), mDowsingTarget2(this, DowsingTarget::SLOT_NONE) { + sTboxActorList.append(&mTboxListNode); + unkByteTargetFiRelated = 2; +} +dAcTbox_c::~dAcTbox_c() { + sTboxActorList.remove(&mTboxListNode); +} + +void dAcTbox_c::initializeState_DugOut() {} +void dAcTbox_c::executeState_DugOut() {} +void dAcTbox_c::finalizeState_DugOut() {} +void dAcTbox_c::initializeState_WaitAppear() {} +void dAcTbox_c::executeState_WaitAppear() {} +void dAcTbox_c::finalizeState_WaitAppear() {} +void dAcTbox_c::initializeState_DemoAppear() {} +void dAcTbox_c::executeState_DemoAppear() {} +void dAcTbox_c::finalizeState_DemoAppear() {} +void dAcTbox_c::initializeState_WaitOpen() {} +void dAcTbox_c::executeState_WaitOpen() {} +void dAcTbox_c::finalizeState_WaitOpen() {} +void dAcTbox_c::initializeState_GoddessWaitOff() {} +void dAcTbox_c::executeState_GoddessWaitOff() {} +void dAcTbox_c::finalizeState_GoddessWaitOff() {} +void dAcTbox_c::initializeState_GoddessWaitOn() {} +void dAcTbox_c::executeState_GoddessWaitOn() {} +void dAcTbox_c::finalizeState_GoddessWaitOn() {} +void dAcTbox_c::initializeState_DeleteArchive() {} +void dAcTbox_c::executeState_DeleteArchive() {} +void dAcTbox_c::finalizeState_DeleteArchive() {} +void dAcTbox_c::initializeState_LoadArchive() {} +void dAcTbox_c::executeState_LoadArchive() {} +void dAcTbox_c::finalizeState_LoadArchive() {} +void dAcTbox_c::initializeState_Open() {} +void dAcTbox_c::executeState_Open() {} +void dAcTbox_c::finalizeState_Open() {} +void dAcTbox_c::initializeState_PresentItem() {} +void dAcTbox_c::executeState_PresentItem() {} +void dAcTbox_c::finalizeState_PresentItem() {} +void dAcTbox_c::initializeState_Close() {} +void dAcTbox_c::executeState_Close() {} +void dAcTbox_c::finalizeState_Close() {} +void dAcTbox_c::initializeState_Wait() {} +void dAcTbox_c::executeState_Wait() {} +void dAcTbox_c::finalizeState_Wait() {} +void dAcTbox_c::initializeState_GoddessWait() {} +void dAcTbox_c::executeState_GoddessWait() {} +void dAcTbox_c::finalizeState_GoddessWait() {}