diff --git a/config/SOUE01/rels/d_a_birdNP/symbols.txt b/config/SOUE01/rels/d_a_birdNP/symbols.txt index da10b192..1b9b48bb 100644 --- a/config/SOUE01/rels/d_a_birdNP/symbols.txt +++ b/config/SOUE01/rels/d_a_birdNP/symbols.txt @@ -91,7 +91,7 @@ fn_129_8390 = .text:0x00008390; // type:function size:0x374 fn_129_8710 = .text:0x00008710; // type:function size:0x29C fn_129_89B0 = .text:0x000089B0; // type:function size:0x3C4 fn_129_8D80 = .text:0x00008D80; // type:function size:0x4C -fn_129_8DD0 = .text:0x00008DD0; // type:function size:0xB8 +accelerateTowards__7dBird_cFR7mVec3_c = .text:0x00008DD0; // type:function size:0xB8 fn_129_8E90 = .text:0x00008E90; // type:function size:0x2B4 changesRot = .text:0x00009150; // type:function size:0x74 fn_129_91D0 = .text:0x000091D0; // type:function size:0x374 @@ -252,7 +252,7 @@ lbl_129_data_B50 = .data:0x00000B50; // type:object size:0xC data:string lbl_129_data_B5C = .data:0x00000B5C; // type:object size:0xC __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global lbl_129_bss_8 = .bss:0x00000008; // type:object size:0x14 data:4byte -LOFTWING_POINTER = .bss:0x0000001C; // type:object size:0x94 data:4byte +spInstance__7dBird_c = .bss:0x0000001C; // type:object size:0x94 data:4byte AcBird__STATE_MOVE = .bss:0x000000B0; // type:object size:0x40 data:4byte AcBird__STATE_HIDE = .bss:0x000000F0; // type:object size:0x40 data:4byte AcBird__STATE_RIDE_DEMO = .bss:0x00000130; // type:object size:0xC0 data:4byte diff --git a/config/SOUE01/rels/d_a_obj_F400_gate_leafNP/symbols.txt b/config/SOUE01/rels/d_a_obj_F400_gate_leafNP/symbols.txt index c599de77..43ff366b 100644 --- a/config/SOUE01/rels/d_a_obj_F400_gate_leafNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_F400_gate_leafNP/symbols.txt @@ -2,14 +2,14 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcOF400GateLeaf_c_classInit__Fv = .text:0x00000070; // type:function size:0x54 -fn_628_D0 = .text:0x000000D0; // type:function size:0x98 -AcOF400GateLeaf__init = .text:0x00000170; // type:function size:0xE4 -AcOF400GateLeaf__draw = .text:0x00000260; // type:function size:0x6C -AcOF400GateLeaf__getStoryflag = .text:0x000002D0; // type:function size:0xC +createHeap__18dAcOF400GateLeaf_cFv = .text:0x000000D0; // type:function size:0x98 +create__18dAcOF400GateLeaf_cFv = .text:0x00000170; // type:function size:0xE4 +draw__18dAcOF400GateLeaf_cFv = .text:0x00000260; // type:function size:0x6C +getStoryflag__18dAcOF400GateLeaf_cFv = .text:0x000002D0; // type:function size:0xC __dt__18dAcOF400GateLeaf_cFv = .text:0x000002E0; // type:function size:0x68 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global g_profile_OBJ_F400_GATE_LEAF = .data:0x00000000; // type:object size:0x10 -lbl_628_section4_10 = .data:0x00000010; // type:object size:0x10 -lbl_628_section4_20 = .data:0x00000020; // type:object size:0x20 data:string -lbl_628_section4_40 = .data:0x00000040; // type:object size:0x80 +lbl_628_section4_10 = .data:0x00000010; // type:object size:0x10 scope:local +lbl_628_section4_20 = .data:0x00000020; // type:object size:0x20 scope:local data:string +__vt__18dAcOF400GateLeaf_c = .data:0x00000040; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_F400_gate_sealNP/symbols.txt b/config/SOUE01/rels/d_a_obj_F400_gate_sealNP/symbols.txt index 280a5ff0..9d91a142 100644 --- a/config/SOUE01/rels/d_a_obj_F400_gate_sealNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_F400_gate_sealNP/symbols.txt @@ -2,16 +2,16 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcOF400GateSeal_c_classInit__Fv = .text:0x00000070; // type:function size:0x98 -AcOF400GateSeal__initModels = .text:0x00000110; // type:function size:0x11C -fn_629_230 = .text:0x00000230; // type:function size:0x8 -AcOF400GateSeal__init = .text:0x00000240; // type:function size:0x1A4 -fn_629_3F0 = .text:0x000003F0; // type:function size:0xD8 -AcOF400GateSeal__draw = .text:0x000004D0; // type:function size:0x28 +createHeap__18dAcOF400GateSeal_cFv = .text:0x00000110; // type:function size:0x11C +actorCreate__18dAcOF400GateSeal_cFv = .text:0x00000230; // type:function size:0x8 +actorPostCreate__18dAcOF400GateSeal_cFv = .text:0x00000240; // type:function size:0x1A4 +actorExecute__18dAcOF400GateSeal_cFv = .text:0x000003F0; // type:function size:0xD8 +draw__18dAcOF400GateSeal_cFv = .text:0x000004D0; // type:function size:0x28 __dt__18dAcOF400GateSeal_cFv = .text:0x00000500; // type:function size:0x84 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_629_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float +lbl_629_rodata_0 = .rodata:0x00000000; // type:object size:0x4 scope:local data:float g_profile_OBJ_F400_GATE_SEAL = .data:0x00000000; // type:object size:0x10 -lbl_629_data_10 = .data:0x00000010; // type:object size:0x10 -lbl_629_data_20 = .data:0x00000020; // type:object size:0x20 data:string -AcOF400GateSeal__vtable = .data:0x00000040; // type:object size:0x80 +lbl_629_data_10 = .data:0x00000010; // type:object size:0x10 scope:local +lbl_629_data_20 = .data:0x00000020; // type:object size:0x20 scope:local data:string +__vt__18dAcOF400GateSeal_c = .data:0x00000040; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_bird_spNP/symbols.txt b/config/SOUE01/rels/d_a_obj_bird_spNP/symbols.txt index a33ec37a..ebe00b78 100644 --- a/config/SOUE01/rels/d_a_obj_bird_spNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_bird_spNP/symbols.txt @@ -2,15 +2,15 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcObjBirdSp_c_classInit__Fv = .text:0x00000070; // type:function size:0x54 -fn_241_D0 = .text:0x000000D0; // type:function size:0x8 -AcObjBirdSp__init = .text:0x000000E0; // type:function size:0xC4 -AcObjBirdSp__update = .text:0x000001B0; // type:function size:0x230 -fn_241_3E0 = .text:0x000003E0; // type:function size:0x8 +createHeap__14dAcObjBirdSp_cFv = .text:0x000000D0; // type:function size:0x8 +create__14dAcObjBirdSp_cFv = .text:0x000000E0; // type:function size:0xC4 +actorExecute__14dAcObjBirdSp_cFv = .text:0x000001B0; // type:function size:0x230 +draw__14dAcObjBirdSp_cFv = .text:0x000003E0; // type:function size:0x8 __dt__14dAcObjBirdSp_cFv = .text:0x000003F0; // type:function size:0x68 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_241_rodata_0 = .rodata:0x00000000; // type:object size:0x18 data:float -AcObjBirdSp__colliderInit = .data:0x00000000; // type:object size:0x30 +lbl_241_rodata_0 = .rodata:0x00000000; // type:object size:0x18 scope:local data:float +sCcSrc__14dAcObjBirdSp_c = .data:0x00000000; // type:object size:0x30 g_profile_OBJ_BIRD_SP_UP = .data:0x00000030; // type:object size:0x10 -lbl_241_data_40 = .data:0x00000040; // type:object size:0x20 -AcObjBirdSp__vtable = .data:0x00000060; // type:object size:0x80 +@14827 = .data:0x00000040; // type:object size:0x20 scope:local +__vt__14dAcObjBirdSp_c = .data:0x00000060; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_bird_statueNP/symbols.txt b/config/SOUE01/rels/d_a_obj_bird_statueNP/symbols.txt index 939963f1..5bcbbcd7 100644 --- a/config/SOUE01/rels/d_a_obj_bird_statueNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_bird_statueNP/symbols.txt @@ -9,6 +9,6 @@ __dt__16dAcOBirdStatue_cFv = .text:0x00000250; // type:function size:0x68 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global g_profile_OBJ_BIRD_STATUE = .data:0x00000000; // type:object size:0x10 -lbl_627_section4_10 = .data:0x00000010; // type:object size:0xC -lbl_627_section4_1C = .data:0x0000001C; // type:object size:0x24 -lbl_627_section4_40 = .data:0x00000040; // type:object size:0x80 +lbl_627_section4_10 = .data:0x00000010; // type:object size:0xC scope:local +lbl_627_section4_1C = .data:0x0000001C; // type:object size:0x24 scope:local +__vt__16dAcOBirdStatue_c = .data:0x00000040; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_bladeNP/symbols.txt b/config/SOUE01/rels/d_a_obj_bladeNP/symbols.txt index 206eda9b..63c0caf2 100644 --- a/config/SOUE01/rels/d_a_obj_bladeNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_bladeNP/symbols.txt @@ -2,18 +2,18 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcOblade_c_classInit__Fv = .text:0x00000070; // type:function size:0x90 -fn_382_100 = .text:0x00000100; // type:function size:0x98 -fn_382_1A0 = .text:0x000001A0; // type:function size:0xC4 -fn_382_270 = .text:0x00000270; // type:function size:0x8 -fn_382_280 = .text:0x00000280; // type:function size:0x30 -fn_382_2B0 = .text:0x000002B0; // type:function size:0x28 +createHeap__11dAcOblade_cFv = .text:0x00000100; // type:function size:0x98 +create__11dAcOblade_cFv = .text:0x000001A0; // type:function size:0xC4 +doDelete__11dAcOblade_cFv = .text:0x00000270; // type:function size:0x8 +actorExecute__11dAcOblade_cFv = .text:0x00000280; // type:function size:0x30 +draw__11dAcOblade_cFv = .text:0x000002B0; // type:function size:0x28 __dt__11dAcOblade_cFv = .text:0x000002E0; // type:function size:0x68 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_382_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float -lbl_382_rodata_4 = .rodata:0x00000004; // type:object size:0x4 align:4 data:float +lbl_382_rodata_0 = .rodata:0x00000000; // type:object size:0x4 scope:local data:float +lbl_382_rodata_4 = .rodata:0x00000004; // type:object size:0x4 scope:local align:4 data:float g_profile_OBJ_BLADE = .data:0x00000000; // type:object size:0x10 -lbl_382_data_10 = .data:0x00000010; // type:object size:0x10 data:string -lbl_382_data_20 = .data:0x00000020; // type:object size:0x10 -lbl_382_data_30 = .data:0x00000030; // type:object size:0x20 -lbl_382_data_50 = .data:0x00000050; // type:object size:0x80 +lbl_382_data_10 = .data:0x00000010; // type:object size:0x10 scope:local data:string +lbl_382_data_20 = .data:0x00000020; // type:object size:0x10 scope:local +lbl_382_data_30 = .data:0x00000030; // type:object size:0x20 scope:local +__vt__11dAcOblade_c = .data:0x00000050; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_distant_shipNP/symbols.txt b/config/SOUE01/rels/d_a_obj_distant_shipNP/symbols.txt index 6461e3b5..0db61b3a 100644 --- a/config/SOUE01/rels/d_a_obj_distant_shipNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_distant_shipNP/symbols.txt @@ -2,20 +2,20 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcOdistantShip_c_classInit__Fv = .text:0x00000070; // type:function size:0x5C -AcOdistantShip__initModels = .text:0x000000D0; // type:function size:0x90 -AcOdistantShip__init = .text:0x00000160; // type:function size:0x100 -fn_616_260 = .text:0x00000260; // type:function size:0x8 -fn_616_270 = .text:0x00000270; // type:function size:0x8 -AcOdistantShip__draw = .text:0x00000280; // type:function size:0x34 -AcOdistantShip__getModelName = .text:0x000002C0; // type:function size:0x38 +createHeap__17dAcOdistantShip_cFv = .text:0x000000D0; // type:function size:0x90 +create__17dAcOdistantShip_cFv = .text:0x00000160; // type:function size:0x100 +doDelete__17dAcOdistantShip_cFv = .text:0x00000260; // type:function size:0x8 +actorExecute__17dAcOdistantShip_cFv = .text:0x00000270; // type:function size:0x8 +draw__17dAcOdistantShip_cFv = .text:0x00000280; // type:function size:0x34 +getModelName__17dAcOdistantShip_cFv = .text:0x000002C0; // type:function size:0x38 __dt__17dAcOdistantShip_cFv = .text:0x00000300; // type:function size:0x68 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_616_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float -lbl_616_rodata_4 = .rodata:0x00000004; // type:object size:0x4 align:4 data:float +lbl_616_rodata_0 = .rodata:0x00000000; // type:object size:0x4 scope:local data:float +lbl_616_rodata_4 = .rodata:0x00000004; // type:object size:0x4 scope:local align:4 data:float g_profile_OBJ_DIS_SHIP = .data:0x00000000; // type:object size:0x10 -lbl_616_data_10 = .data:0x00000010; // type:object size:0x10 data:string -lbl_616_data_20 = .data:0x00000020; // type:object size:0x20 -lbl_616_data_40 = .data:0x00000040; // type:object size:0x10 -lbl_616_data_50 = .data:0x00000050; // type:object size:0x18 -AcOdistantShip__vtable = .data:0x00000068; // type:object size:0x80 +lbl_616_data_10 = .data:0x00000010; // type:object size:0x10 scope:local data:string +lbl_616_data_20 = .data:0x00000020; // type:object size:0x20 scope:local +lbl_616_data_40 = .data:0x00000040; // type:object size:0x10 scope:local +lbl_616_data_50 = .data:0x00000050; // type:object size:0x18 scope:local +__vt__17dAcOdistantShip_c = .data:0x00000068; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_doorNP/symbols.txt b/config/SOUE01/rels/d_a_obj_doorNP/symbols.txt index 6b8d3406..9070c836 100644 --- a/config/SOUE01/rels/d_a_obj_doorNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_doorNP/symbols.txt @@ -20,7 +20,7 @@ fn_572_1250 = .text:0x00001250; // type:function size:0x16C4 fn_572_2920 = .text:0x00002920; // type:function size:0x1C AcODoor__update = .text:0x00002940; // type:function size:0x808 fn_572_3150 = .text:0x00003150; // type:function size:0x98 -AcODoor__isLocked = .text:0x000031F0; // type:function size:0x158 +isLocked__10dAcOdoor_cFv = .text:0x000031F0; // type:function size:0x158 fn_572_3350 = .text:0x00003350; // type:function size:0x84 fn_572_33E0 = .text:0x000033E0; // type:function size:0xC fn_572_33F0 = .text:0x000033F0; // type:function size:0x78 diff --git a/config/SOUE01/rels/d_a_obj_girahim_footNP/symbols.txt b/config/SOUE01/rels/d_a_obj_girahim_footNP/symbols.txt index e1c14531..3366d7c3 100644 --- a/config/SOUE01/rels/d_a_obj_girahim_footNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_girahim_footNP/symbols.txt @@ -4,22 +4,21 @@ _unresolved = .text:0x00000060; // type:function size:0x4 scope:global __register_global_object = .text:0x00000070; // type:function size:0x1C scope:global __destroy_global_chain = .text:0x00000090; // type:function size:0x54 scope:global dAcOgirahimFoot_c_classInit__Fv = .text:0x000000F0; // type:function size:0xD0 -fn_425_1C0 = .text:0x000001C0; // type:function size:0x58 +__dt__15dShadowCircle_cFv = .text:0x000001C0; // type:function size:0x58 __dt__30sFState_c<17dAcOgirahimFoot_c>Fv = .text:0x00000220; // type:function size:0x58 __dt__33sFStateFct_c<17dAcOgirahimFoot_c>Fv = .text:0x00000280; // type:function size:0x6C __dt__86sStateMgr_c<17dAcOgirahimFoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000002F0; // type:function size:0xA0 __dt__56sFStateMgr_c<17dAcOgirahimFoot_c,20sStateMethodUsr_FI_c>Fv = .text:0x00000390; // type:function size:0xA4 -fn_425_440 = .text:0x00000440; // type:function size:0x80 -fn_425_4C0 = .text:0x000004C0; // type:function size:0xE8 +createHeap__17dAcOgirahimFoot_cFv = .text:0x00000440; // type:function size:0x80 +create__17dAcOgirahimFoot_cFv = .text:0x000004C0; // type:function size:0xE8 changeState__86sStateMgr_c<17dAcOgirahimFoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x000005B0; // type:function size:0x10 -fn_425_5C0 = .text:0x000005C0; // type:function size:0x8 -fn_425_5D0 = .text:0x000005D0; // type:function size:0x30 +doDelete__17dAcOgirahimFoot_cFv = .text:0x000005C0; // type:function size:0x8 +actorExecute__17dAcOgirahimFoot_cFv = .text:0x000005D0; // type:function size:0x30 executeState__86sStateMgr_c<17dAcOgirahimFoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000600; // type:function size:0x10 -fn_425_610 = .text:0x00000610; // type:function size:0xF4 +draw__17dAcOgirahimFoot_cFv = .text:0x00000610; // type:function size:0xF4 getStateID__86sStateMgr_c<17dAcOgirahimFoot_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000710; // type:function size:0x10 initializeState_Wait__17dAcOgirahimFoot_cFv = .text:0x00000720; // type:function size:0xC -executeState_Wait__17dAcOgirahimFoot_cFv = .text:0x00000730; // type:function size:0x24 -fn_425_754 = .text:0x00000754; // type:function size:0x4 +executeState_Wait__17dAcOgirahimFoot_cFv = .text:0x00000730; // type:function size:0x28 finalizeState_Wait__17dAcOgirahimFoot_cFv = .text:0x00000760; // type:function size:0x4 initializeState_Appear__17dAcOgirahimFoot_cFv = .text:0x00000770; // type:function size:0xC executeState_Appear__17dAcOgirahimFoot_cFv = .text:0x00000780; // type:function size:0x68 @@ -47,15 +46,15 @@ _dtors = .dtors:0x00000000; // type:label scope:global __destroy_global_chain_reference = .dtors:0x00000000; // type:object size:0x4 scope:global lbl_425_rodata_0 = .rodata:0x00000000; // type:object size:0x18 data:float g_profile_OBJ_GIRAHIM_FOOT = .data:0x00000000; // type:object size:0x10 data:4byte -lbl_425_data_10 = .data:0x00000010; // type:object size:0x10 -lbl_425_data_20 = .data:0x00000020; // type:object size:0x20 -lbl_425_data_40 = .data:0x00000040; // type:object size:0x80 -lbl_425_data_C0 = .data:0x000000C0; // type:object size:0x30 -lbl_425_data_F0 = .data:0x000000F0; // type:object size:0x30 -lbl_425_data_120 = .data:0x00000120; // type:object size:0x18 -lbl_425_data_138 = .data:0x00000138; // type:object size:0x18 -lbl_425_data_150 = .data:0x00000150; // type:object size:0x9C -lbl_425_data_1EC = .data:0x000001EC; // type:object size:0x34 +lbl_425_data_10 = .data:0x00000010; // type:object size:0x10 scope:local +lbl_425_data_20 = .data:0x00000020; // type:object size:0x20 scope:local +__vt__17dAcOgirahimFoot_c = .data:0x00000040; // type:object size:0x80 +lbl_425_data_C0 = .data:0x000000C0; // type:object size:0x30 scope:local +lbl_425_data_F0 = .data:0x000000F0; // type:object size:0x30 scope:local +lbl_425_data_120 = .data:0x00000120; // type:object size:0x18 scope:local +lbl_425_data_138 = .data:0x00000138; // type:object size:0x18 scope:local +lbl_425_data_150 = .data:0x00000150; // type:object size:0x9C scope:local +lbl_425_data_1EC = .data:0x000001EC; // type:object size:0x34 scope:local __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global lbl_425_bss_8 = .bss:0x00000008; // type:object size:0x10 data:4byte lbl_425_bss_18 = .bss:0x00000018; // type:object size:0x40 data:4byte diff --git a/config/SOUE01/rels/d_a_obj_impa_doorNP/symbols.txt b/config/SOUE01/rels/d_a_obj_impa_doorNP/symbols.txt index 2cf360f1..15fe40ab 100644 --- a/config/SOUE01/rels/d_a_obj_impa_doorNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_impa_doorNP/symbols.txt @@ -8,13 +8,13 @@ __dt__27sFState_c<14dAcOimpaDoor_c>Fv = .text:0x000001B0; // type:function size: __dt__30sFStateFct_c<14dAcOimpaDoor_c>Fv = .text:0x00000210; // type:function size:0x6C __dt__83sStateMgr_c<14dAcOimpaDoor_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000280; // type:function size:0xA0 __dt__53sFStateMgr_c<14dAcOimpaDoor_c,20sStateMethodUsr_FI_c>Fv = .text:0x00000320; // type:function size:0xA4 -fn_421_3D0 = .text:0x000003D0; // type:function size:0x88 -fn_421_460 = .text:0x00000460; // type:function size:0xE8 +createHeap__14dAcOimpaDoor_cFv = .text:0x000003D0; // type:function size:0x88 +create__14dAcOimpaDoor_cFv = .text:0x00000460; // type:function size:0xE8 changeState__83sStateMgr_c<14dAcOimpaDoor_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x00000550; // type:function size:0x10 -fn_421_560 = .text:0x00000560; // type:function size:0x8 -fn_421_570 = .text:0x00000570; // type:function size:0x30 +doDelete__14dAcOimpaDoor_cFv = .text:0x00000560; // type:function size:0x8 +actorExecute__14dAcOimpaDoor_cFv = .text:0x00000570; // type:function size:0x30 executeState__83sStateMgr_c<14dAcOimpaDoor_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x000005A0; // type:function size:0x10 -fn_421_5B0 = .text:0x000005B0; // type:function size:0x28 +draw__14dAcOimpaDoor_cFv = .text:0x000005B0; // type:function size:0x28 initializeState_Wait__14dAcOimpaDoor_cFv = .text:0x000005E0; // type:function size:0x4 executeState_Wait__14dAcOimpaDoor_cFv = .text:0x000005F0; // type:function size:0x4 finalizeState_Wait__14dAcOimpaDoor_cFv = .text:0x00000600; // type:function size:0x4 @@ -40,17 +40,17 @@ isSameName__29sFStateID_c<14dAcOimpaDoor_c>CFPCc = .text:0x00000A20; // type:fun _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global __destroy_global_chain_reference = .dtors:0x00000000; // type:object size:0x4 scope:global -lbl_421_rodata_0 = .rodata:0x00000000; // type:object size:0x18 data:float +lbl_421_rodata_0 = .rodata:0x00000000; // type:object size:0x18 scope:local data:float g_profile_OBJ_IMPA_DOOR = .data:0x00000000; // type:object size:0x10 data:4byte -lbl_421_data_10 = .data:0x00000010; // type:object size:0x8 -lbl_421_data_18 = .data:0x00000018; // type:object size:0x10 data:string -lbl_421_data_28 = .data:0x00000028; // type:object size:0x20 -lbl_421_data_48 = .data:0x00000048; // type:object size:0x80 -lbl_421_data_C8 = .data:0x000000C8; // type:object size:0x30 -lbl_421_data_F8 = .data:0x000000F8; // type:object size:0x30 -lbl_421_data_128 = .data:0x00000128; // type:object size:0x18 -lbl_421_data_140 = .data:0x00000140; // type:object size:0x5C -lbl_421_data_19C = .data:0x0000019C; // type:object size:0x34 +lbl_421_data_10 = .data:0x00000010; // type:object size:0x8 scope:local +lbl_421_data_18 = .data:0x00000018; // type:object size:0x10 scope:local data:string +lbl_421_data_28 = .data:0x00000028; // type:object size:0x20 scope:local +__vt__14dAcOimpaDoor_c = .data:0x00000048; // type:object size:0x80 +__vt__53sFStateMgr_c<14dAcOimpaDoor_c,20sStateMethodUsr_FI_c> = .data:0x000000C8; // type:object size:0x30 +__vt__83sStateMgr_c<14dAcOimpaDoor_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c> = .data:0x000000F8; // type:object size:0x30 +__vt__30sFStateFct_c<14dAcOimpaDoor_c> = .data:0x00000128; // type:object size:0x18 +__vt__27sFState_c<14dAcOimpaDoor_c> = .data:0x00000140; // type:object size:0x5C +__vt__29sFStateID_c<14dAcOimpaDoor_c> = .data:0x0000019C; // type:object size:0x34 __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global -lbl_421_bss_8 = .bss:0x00000008; // type:object size:0x10 -lbl_421_bss_18 = .bss:0x00000018; // type:object size:0x30 data:4byte +lbl_421_bss_8 = .bss:0x00000008; // type:object size:0x10 scope:local +lbl_421_bss_18 = .bss:0x00000018; // type:object size:0x30 scope:local data:4byte diff --git a/config/SOUE01/rels/d_a_obj_island_LODNP/symbols.txt b/config/SOUE01/rels/d_a_obj_island_LODNP/symbols.txt index f3922533..cc8aa40b 100644 --- a/config/SOUE01/rels/d_a_obj_island_LODNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_island_LODNP/symbols.txt @@ -2,22 +2,22 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcOislandLOD_c_classInit__Fv = .text:0x00000070; // type:function size:0x5C -fn_426_D0 = .text:0x000000D0; // type:function size:0xAC -fn_426_180 = .text:0x00000180; // type:function size:0xB0 -fn_426_230 = .text:0x00000230; // type:function size:0x8 -fn_426_240 = .text:0x00000240; // type:function size:0x8 -fn_426_250 = .text:0x00000250; // type:function size:0x78 +createHeap__15dAcOislandLOD_cFv = .text:0x000000D0; // type:function size:0xAC +create__15dAcOislandLOD_cFv = .text:0x00000180; // type:function size:0xB0 +doDelete__15dAcOislandLOD_cFv = .text:0x00000230; // type:function size:0x8 +actorExecute__15dAcOislandLOD_cFv = .text:0x00000240; // type:function size:0x8 +draw__15dAcOislandLOD_cFv = .text:0x00000250; // type:function size:0x78 __dt__15dAcOislandLOD_cFv = .text:0x000002D0; // type:function size:0x68 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -dAcOislandLOD__resFilenames = .rodata:0x00000000; // type:object size:0x14 -dAcOislandLOD__resMdlNames = .rodata:0x00000014; // type:object size:0x14 -dAcOislandLOD__cullingDist = .rodata:0x00000028; // type:object size:0x4 align:4 data:float -lbl_426_data_0 = .data:0x00000000; // type:object size:0x8 data:string -lbl_426_data_8 = .data:0x00000008; // type:object size:0x8 data:string -lbl_426_data_10 = .data:0x00000010; // type:object size:0x8 data:string -lbl_426_data_18 = .data:0x00000018; // type:object size:0x8 data:string -lbl_426_data_20 = .data:0x00000020; // type:object size:0x8 data:string +resFilenames__15dAcOislandLOD_c = .rodata:0x00000000; // type:object size:0x14 +resMdlNames__15dAcOislandLOD_c = .rodata:0x00000014; // type:object size:0x14 +dAcOislandLOD__cullingDist = .rodata:0x00000028; // type:object size:0x4 scope:local align:4 data:float +lbl_426_data_0 = .data:0x00000000; // type:object size:0x8 scope:local data:string +lbl_426_data_8 = .data:0x00000008; // type:object size:0x8 scope:local data:string +lbl_426_data_10 = .data:0x00000010; // type:object size:0x8 scope:local data:string +lbl_426_data_18 = .data:0x00000018; // type:object size:0x8 scope:local data:string +lbl_426_data_20 = .data:0x00000020; // type:object size:0x8 scope:local data:string g_profile_OBJ_ISLAND_LOD = .data:0x00000028; // type:object size:0x10 -lbl_426_data_38 = .data:0x00000038; // type:object size:0x20 -lbl_426_data_58 = .data:0x00000058; // type:object size:0x80 +lbl_426_data_38 = .data:0x00000038; // type:object size:0x20 scope:local +__vt__15dAcOislandLOD_c = .data:0x00000058; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_mappartsNP/symbols.txt b/config/SOUE01/rels/d_a_obj_mappartsNP/symbols.txt index 6b1fbce5..02fddafc 100644 --- a/config/SOUE01/rels/d_a_obj_mappartsNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_mappartsNP/symbols.txt @@ -2,9 +2,9 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcOMapparts_c_classInit__Fv = .text:0x00000070; // type:function size:0x4C -AcOMapparts__init = .text:0x000000C0; // type:function size:0x8 +create__14dAcOMapparts_cFv = .text:0x000000C0; // type:function size:0x8 __dt__14dAcOMapparts_cFv = .text:0x000000D0; // type:function size:0x58 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global g_profile_OBJ_MAPPARTS = .data:0x00000000; // type:object size:0x10 -lbl_633_section4_10 = .data:0x00000010; // type:object size:0x80 +__vt__14dAcOMapparts_c = .data:0x00000010; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_mole_coverNP/symbols.txt b/config/SOUE01/rels/d_a_obj_mole_coverNP/symbols.txt index 5cf2e2ab..471f13ea 100644 --- a/config/SOUE01/rels/d_a_obj_mole_coverNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_mole_coverNP/symbols.txt @@ -2,15 +2,15 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcOmoleCover_c_classInit__Fv = .text:0x00000070; // type:function size:0x64 -AcOmoleCover__initModels = .text:0x000000E0; // type:function size:0x110 -AcOmoleCover__init = .text:0x000001F0; // type:function size:0xD0 -fn_424_2C0 = .text:0x000002C0; // type:function size:0x8 -fn_424_2D0 = .text:0x000002D0; // type:function size:0x8 -AcOmoleCover__draw = .text:0x000002E0; // type:function size:0x28 +createHeap__15dAcOmoleCover_cFv = .text:0x000000E0; // type:function size:0x110 +create__15dAcOmoleCover_cFv = .text:0x000001F0; // type:function size:0xD0 +doDelete__15dAcOmoleCover_cFv = .text:0x000002C0; // type:function size:0x8 +actorExecute__15dAcOmoleCover_cFv = .text:0x000002D0; // type:function size:0x8 +draw__15dAcOmoleCover_cFv = .text:0x000002E0; // type:function size:0x28 __dt__15dAcOmoleCover_cFv = .text:0x00000310; // type:function size:0x74 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_424_rodata_0 = .rodata:0x00000000; // type:object size:0x1C data:float +lbl_424_rodata_0 = .rodata:0x00000000; // type:object size:0x1C scope:local data:float g_profile_OBJ_MOLE_COVER = .data:0x00000000; // type:object size:0x6C -lbl_424_data_6C = .data:0x0000006C; // type:object size:0x24 -AcOmoleCover__vtable = .data:0x00000090; // type:object size:0x80 +lbl_424_data_6C = .data:0x0000006C; // type:object size:0x24 scope:local +__vt__15dAcOmoleCover_c = .data:0x00000090; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_puzzle_islandNP/symbols.txt b/config/SOUE01/rels/d_a_obj_puzzle_islandNP/symbols.txt index 6e30c79a..72446a71 100644 --- a/config/SOUE01/rels/d_a_obj_puzzle_islandNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_puzzle_islandNP/symbols.txt @@ -2,16 +2,16 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcOpuzzleIsland_c_classInit__Fv = .text:0x00000070; // type:function size:0x64 -AcOpuzzleIsland__bgInteractFunc = .text:0x000000E0; // type:function size:0x7C -AcOpuzzleIsland__initModels = .text:0x00000160; // type:function size:0x10C -AcOpuzzleIsland__init = .text:0x00000270; // type:function size:0xD4 -fn_369_350 = .text:0x00000350; // type:function size:0x8 -AcOpuzzleIsland__update = .text:0x00000360; // type:function size:0x28 -fn_369_390 = .text:0x00000390; // type:function size:0x28 +rideCallback__18dAcOpuzzleIsland_cFP4dBgWP12dAcObjBase_cP12dAcObjBase_c = .text:0x000000E0; // type:function size:0x7C +createHeap__18dAcOpuzzleIsland_cFv = .text:0x00000160; // type:function size:0x10C +create__18dAcOpuzzleIsland_cFv = .text:0x00000270; // type:function size:0xD4 +doDelete__18dAcOpuzzleIsland_cFv = .text:0x00000350; // type:function size:0x8 +actorExecute__18dAcOpuzzleIsland_cFv = .text:0x00000360; // type:function size:0x28 +draw__18dAcOpuzzleIsland_cFv = .text:0x00000390; // type:function size:0x28 __dt__18dAcOpuzzleIsland_cFv = .text:0x000003C0; // type:function size:0x74 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_369_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float +lbl_369_rodata_0 = .rodata:0x00000000; // type:object size:0x4 scope:local data:float g_profile_OBJ_PUZZLE_ISLAND = .data:0x00000000; // type:object size:0x38 -lbl_369_data_38 = .data:0x00000038; // type:object size:0x20 data:string -AcOpuzzleIsland__vtable = .data:0x00000058; // type:object size:0x80 +lbl_369_data_38 = .data:0x00000038; // type:object size:0x20 scope:local data:string +__vt__18dAcOpuzzleIsland_c = .data:0x00000058; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_rail_postNP/symbols.txt b/config/SOUE01/rels/d_a_obj_rail_postNP/symbols.txt index 818a49f1..faa7396e 100644 --- a/config/SOUE01/rels/d_a_obj_rail_postNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_rail_postNP/symbols.txt @@ -4,15 +4,15 @@ _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcORailPost_classInit__Fv = .text:0x00000070; // type:function size:0x30 __ct__12dAcORailPostFv = .text:0x000000A0; // type:function size:0x4C __dt__12dAcORailPostFv = .text:0x000000F0; // type:function size:0x74 -AcORailPost__initModels = .text:0x00000170; // type:function size:0x118 -AcORailPost__init = .text:0x00000290; // type:function size:0xA4 -AcORailPost__destroy = .text:0x00000340; // type:function size:0x38 -fn_524_380 = .text:0x00000380; // type:function size:0x8 -AcORailPost__draw = .text:0x00000390; // type:function size:0x34 +createHeap__12dAcORailPostFv = .text:0x00000170; // type:function size:0x118 +create__12dAcORailPostFv = .text:0x00000290; // type:function size:0xA4 +doDelete__12dAcORailPostFv = .text:0x00000340; // type:function size:0x38 +actorExecute__12dAcORailPostFv = .text:0x00000380; // type:function size:0x8 +draw__12dAcORailPostFv = .text:0x00000390; // type:function size:0x34 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_524_rodata_0 = .rodata:0x00000000; // type:object size:0x4 data:float +@15367 = .rodata:0x00000000; // type:object size:0x4 scope:local data:float g_profile_OBJ_RAIL_POST = .data:0x00000000; // type:object size:0x10 -lbl_524_data_10 = .data:0x00000010; // type:object size:0xC -lbl_524_data_1C = .data:0x0000001C; // type:object size:0x1C -AcORailPost__vtable = .data:0x00000038; // type:object size:0x80 +@15350 = .data:0x00000010; // type:object size:0xC scope:local +@15366 = .data:0x0000001C; // type:object size:0x1C scope:local +__vt__12dAcORailPost = .data:0x00000038; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_rope_baseNP/symbols.txt b/config/SOUE01/rels/d_a_obj_rope_baseNP/symbols.txt index d9db9810..ec2cd910 100644 --- a/config/SOUE01/rels/d_a_obj_rope_baseNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_rope_baseNP/symbols.txt @@ -2,15 +2,15 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcOropeBase_c_classInit__Fv = .text:0x00000070; // type:function size:0x5C -fn_431_D0 = .text:0x000000D0; // type:function size:0xD0 -fn_431_1A0 = .text:0x000001A0; // type:function size:0xBC -fn_431_260 = .text:0x00000260; // type:function size:0x8 -fn_431_270 = .text:0x00000270; // type:function size:0x28 -fn_431_2A0 = .text:0x000002A0; // type:function size:0x28 +createHeap__14dAcOropeBase_cFv = .text:0x000000D0; // type:function size:0xD0 +create__14dAcOropeBase_cFv = .text:0x000001A0; // type:function size:0xBC +doDelete__14dAcOropeBase_cFv = .text:0x00000260; // type:function size:0x8 +actorExecute__14dAcOropeBase_cFv = .text:0x00000270; // type:function size:0x28 +draw__14dAcOropeBase_cFv = .text:0x000002A0; // type:function size:0x28 __dt__14dAcOropeBase_cFv = .text:0x000002D0; // type:function size:0x68 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_431_rodata_0 = .rodata:0x00000000; // type:object size:0x18 data:float +lbl_431_rodata_0 = .rodata:0x00000000; // type:object size:0x18 scope:local data:float g_profile_OBJ_ROPE_BASE = .data:0x00000000; // type:object size:0x38 -lbl_431_data_38 = .data:0x00000038; // type:object size:0x20 -lbl_431_data_58 = .data:0x00000058; // type:object size:0x80 +lbl_431_data_38 = .data:0x00000038; // type:object size:0x20 scope:local +__vt__14dAcOropeBase_c = .data:0x00000058; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_a_obj_stream_lavaNP/symbols.txt b/config/SOUE01/rels/d_a_obj_stream_lavaNP/symbols.txt index 4e73ce44..f84ccac6 100644 --- a/config/SOUE01/rels/d_a_obj_stream_lavaNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_stream_lavaNP/symbols.txt @@ -8,14 +8,14 @@ __dt__29sFState_c<16dAcOstreamLava_c>Fv = .text:0x00000230; // type:function siz __dt__32sFStateFct_c<16dAcOstreamLava_c>Fv = .text:0x00000290; // type:function size:0x6C __dt__85sStateMgr_c<16dAcOstreamLava_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000300; // type:function size:0xA0 __dt__55sFStateMgr_c<16dAcOstreamLava_c,20sStateMethodUsr_FI_c>Fv = .text:0x000003A0; // type:function size:0xA4 -fn_405_450 = .text:0x00000450; // type:function size:0x40 -AcOstreamLava__initModels = .text:0x00000490; // type:function size:0x200 -AcOstreamLava__init = .text:0x00000690; // type:function size:0x1A4 +__dt__14dScnCallback_cFv = .text:0x00000450; // type:function size:0x40 +createHeap__16dAcOstreamLava_cFv = .text:0x00000490; // type:function size:0x200 +create__16dAcOstreamLava_cFv = .text:0x00000690; // type:function size:0x1A4 changeState__85sStateMgr_c<16dAcOstreamLava_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>FRC12sStateIDIf_c = .text:0x00000840; // type:function size:0x10 -AcOstreamLava__destroy = .text:0x00000850; // type:function size:0x40 -AcOstreamLava__update = .text:0x00000890; // type:function size:0x94 +doDelete__16dAcOstreamLava_cFv = .text:0x00000850; // type:function size:0x40 +actorExecute__16dAcOstreamLava_cFv = .text:0x00000890; // type:function size:0x94 executeState__85sStateMgr_c<16dAcOstreamLava_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>Fv = .text:0x00000930; // type:function size:0x10 -AcOstreamLava__draw = .text:0x00000940; // type:function size:0x34 +draw__16dAcOstreamLava_cFv = .text:0x00000940; // type:function size:0x34 initializeState_Wait__16dAcOstreamLava_cFv = .text:0x00000980; // type:function size:0x54 executeState_Wait__16dAcOstreamLava_cFv = .text:0x000009E0; // type:function size:0x88 finalizeState_Wait__16dAcOstreamLava_cFv = .text:0x00000A70; // type:function size:0x7C @@ -24,11 +24,11 @@ executeState_Stream__16dAcOstreamLava_cFv = .text:0x00000B50; // type:function s finalizeState_Stream__16dAcOstreamLava_cFv = .text:0x00000BE0; // type:function size:0x4 __dt__16dAcOstreamLava_cFv = .text:0x00000BF0; // type:function size:0xFC getStateID__85sStateMgr_c<16dAcOstreamLava_c,20sStateMethodUsr_FI_c,12sFStateFct_c,13sStateIDChk_c>CFv = .text:0x00000CF0; // type:function size:0x10 -fn_405_D00 = .text:0x00000D00; // type:function size:0x4 -fn_405_D10 = .text:0x00000D10; // type:function size:0x4 -fn_405_D20 = .text:0x00000D20; // type:function size:0x4 -fn_405_D30 = .text:0x00000D30; // type:function size:0x4 -fn_405_D40 = .text:0x00000D40; // type:function size:0x4 +ExecCallback_DRAW_XLU__Q34nw4r3g3d15IScnObjCallbackFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x00000D00; // type:function size:0x4 +ExecCallback_DRAW_OPA__Q34nw4r3g3d15IScnObjCallbackFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x00000D10; // type:function size:0x4 +ExecCallback_CALC_MAT__Q34nw4r3g3d15IScnObjCallbackFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x00000D20; // type:function size:0x4 +ExecCallback_CALC_WORLD__Q34nw4r3g3d15IScnObjCallbackFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x00000D30; // type:function size:0x4 +ExecCallback_CALC_VIEW__Q34nw4r3g3d15IScnObjCallbackFQ44nw4r3g3d6ScnObj6TimingPQ34nw4r3g3d6ScnObjUlPv = .text:0x00000D40; // type:function size:0x4 build__32sFStateFct_c<16dAcOstreamLava_c>FRC12sStateIDIf_c = .text:0x00000D50; // type:function size:0x60 dispose__32sFStateFct_c<16dAcOstreamLava_c>FRP10sStateIf_c = .text:0x00000DB0; // type:function size:0xC initialize__29sFState_c<16dAcOstreamLava_c>Fv = .text:0x00000DC0; // type:function size:0x1C @@ -49,32 +49,37 @@ isSameName__31sFStateID_c<16dAcOstreamLava_c>CFPCc = .text:0x00001130; // type:f _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global __destroy_global_chain_reference = .dtors:0x00000000; // type:object size:0x4 scope:global -lbl_405_rodata_0 = .rodata:0x00000000; // type:object size:0x68 -lbl_405_rodata_68 = .rodata:0x00000068; // type:object size:0x4 align:4 data:float -lbl_405_data_0 = .data:0x00000000; // type:object size:0xC data:4byte -lbl_405_data_C = .data:0x0000000C; // type:object size:0x10 -lbl_405_data_1C = .data:0x0000001C; // type:object size:0x10 -lbl_405_data_2C = .data:0x0000002C; // type:object size:0x14 +lbl_405_rodata_00 = .rodata:0x00000000; // type:object size:0x4 data:float +lbl_405_rodata_04 = .rodata:0x00000004; // type:object size:0x14 scope:local +lbl_405_rodata_18 = .rodata:0x00000018; // type:object size:0x14 scope:local +lbl_405_rodata_2C = .rodata:0x0000002C; // type:object size:0x14 scope:local +lbl_405_rodata_40 = .rodata:0x00000040; // type:object size:0x14 scope:local +lbl_405_rodata_54 = .rodata:0x00000054; // type:object size:0x14 scope:local +lbl_405_rodata_68 = .rodata:0x00000068; // type:object size:0x4 scope:local align:4 data:float +lbl_405_data_00 = .data:0x00000000; // type:object size:0xC data:string +lbl_405_data_0C = .data:0x0000000C; // type:object size:0x10 data:string +lbl_405_data_1C = .data:0x0000001C; // type:object size:0x10 data:string +lbl_405_data_2C = .data:0x0000002C; // type:object size:0x14 data:string lbl_405_data_40 = .data:0x00000040; // type:object size:0x10 data:string lbl_405_data_50 = .data:0x00000050; // type:object size:0x10 data:string lbl_405_data_60 = .data:0x00000060; // type:object size:0x10 data:string -lbl_405_data_70 = .data:0x00000070; // type:object size:0x18 -lbl_405_data_88 = .data:0x00000088; // type:object size:0x18 +lbl_405_data_70 = .data:0x00000070; // type:object size:0x18 data:string +lbl_405_data_88 = .data:0x00000088; // type:object size:0x18 data:string lbl_405_data_A0 = .data:0x000000A0; // type:object size:0x18 data:string lbl_405_data_B8 = .data:0x000000B8; // type:object size:0x18 data:string lbl_405_data_D0 = .data:0x000000D0; // type:object size:0x18 data:string -lbl_405_data_E8 = .data:0x000000E8; // type:object size:0x18 -lbl_405_data_100 = .data:0x00000100; // type:object size:0x18 +lbl_405_data_E8 = .data:0x000000E8; // type:object size:0x18 data:string +lbl_405_data_100 = .data:0x00000100; // type:object size:0x18 data:string lbl_405_data_118 = .data:0x00000118; // type:object size:0x18 data:string lbl_405_data_130 = .data:0x00000130; // type:object size:0x18 data:string lbl_405_data_148 = .data:0x00000148; // type:object size:0x18 data:string g_profile_OBJ_STREAM_LAVA = .data:0x00000160; // type:object size:0x10 -lbl_405_data_170 = .data:0x00000170; // type:object size:0x8 -lbl_405_data_178 = .data:0x00000178; // type:object size:0x20 -lbl_405_data_198 = .data:0x00000198; // type:object size:0x4 data:4byte -lbl_405_data_19C = .data:0x0000019C; // type:object size:0x4 data:4byte -lbl_405_data_1A0 = .data:0x000001A0; // type:object size:0x8 -AcOstreamLava__vtable = .data:0x000001A8; // type:object size:0x80 +lbl_405_data_170 = .data:0x00000170; // type:object size:0x8 data:string +lbl_405_data_178 = .data:0x00000178; // type:object size:0x20 data:string +lbl_405_data_198 = .data:0x00000198; // type:object size:0x4 data:int +lbl_405_data_19C = .data:0x0000019C; // type:object size:0x4 data:int +lbl_405_data_1A0 = .data:0x000001A0; // type:object size:0x8 data:string +__vt__16dAcOstreamLava_c = .data:0x000001A8; // type:object size:0x80 lbl_405_data_228 = .data:0x00000228; // type:object size:0x30 lbl_405_data_258 = .data:0x00000258; // type:object size:0x30 lbl_405_data_288 = .data:0x00000288; // type:object size:0x18 @@ -82,5 +87,5 @@ lbl_405_data_2A0 = .data:0x000002A0; // type:object size:0xC4 lbl_405_data_364 = .data:0x00000364; // type:object size:0x34 __global_destructor_chain = .bss:0x00000000; // type:object size:0x4 scope:global lbl_405_bss_8 = .bss:0x00000008; // type:object size:0x10 data:4byte -AcOstreamLava__STATE_WAIT = .bss:0x00000018; // type:object size:0x40 data:4byte -AcOstreamLava__STATE_STREAM = .bss:0x00000058; // type:object size:0x30 data:4byte +StateID_Wait__16dAcOstreamLava_c = .bss:0x00000018; // type:object size:0x40 data:4byte +StateID_Stream__16dAcOstreamLava_c = .bss:0x00000058; // type:object size:0x30 data:4byte diff --git a/config/SOUE01/rels/d_a_obj_tarzan_poleNP/symbols.txt b/config/SOUE01/rels/d_a_obj_tarzan_poleNP/symbols.txt index 11aba61c..b7c6167b 100644 --- a/config/SOUE01/rels/d_a_obj_tarzan_poleNP/symbols.txt +++ b/config/SOUE01/rels/d_a_obj_tarzan_poleNP/symbols.txt @@ -2,17 +2,17 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global _epilog = .text:0x00000030; // type:function size:0x2C scope:global _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dAcOTarzanPole_c_classInit__Fv = .text:0x00000070; // type:function size:0x6C -AcOTarzanPole__initModels = .text:0x000000E0; // type:function size:0xCC -AcOTarzanPole__init = .text:0x000001B0; // type:function size:0x16C -fn_288_320 = .text:0x00000320; // type:function size:0x8 -AcOTarzanPole__update = .text:0x00000330; // type:function size:0x224 -AcOTarzanPole__draw = .text:0x00000560; // type:function size:0x28 +createHeap__16dAcOTarzanPole_cFv = .text:0x000000E0; // type:function size:0xCC +create__16dAcOTarzanPole_cFv = .text:0x000001B0; // type:function size:0x16C +doDelete__16dAcOTarzanPole_cFv = .text:0x00000320; // type:function size:0x8 +actorExecute__16dAcOTarzanPole_cFv = .text:0x00000330; // type:function size:0x224 +draw__16dAcOTarzanPole_cFv = .text:0x00000560; // type:function size:0x28 __dt__16dAcOTarzanPole_cFv = .text:0x00000590; // type:function size:0x80 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global -lbl_288_rodata_0 = .rodata:0x00000000; // type:object size:0x4C data:float +lbl_288_rodata_0 = .rodata:0x00000000; // type:object size:0x4C scope:local data:float g_profile_OBJ_TARZAN_POLE = .data:0x00000000; // type:object size:0x10 -lbl_288_data_10 = .data:0x00000010; // type:object size:0x30 -lbl_288_data_40 = .data:0x00000040; // type:object size:0x8 data:string -lbl_288_data_48 = .data:0x00000048; // type:object size:0x20 -AcOTarzanPole__vtable = .data:0x00000068; // type:object size:0x80 +sCcSrc__16dAcOTarzanPole_c = .data:0x00000010; // type:object size:0x30 +@23333 = .data:0x00000040; // type:object size:0x8 scope:local data:string +@23358 = .data:0x00000048; // type:object size:0x20 scope:local +__vt__16dAcOTarzanPole_c = .data:0x00000068; // type:object size:0x80 diff --git a/config/SOUE01/rels/d_t_shutter_fence_forbiddanceNP/symbols.txt b/config/SOUE01/rels/d_t_shutter_fence_forbiddanceNP/symbols.txt index 77e4f804..ae45b113 100644 --- a/config/SOUE01/rels/d_t_shutter_fence_forbiddanceNP/symbols.txt +++ b/config/SOUE01/rels/d_t_shutter_fence_forbiddanceNP/symbols.txt @@ -4,10 +4,10 @@ _unresolved = .text:0x00000060; // type:function size:0x4 scope:global dTgShutterFenceForbiddance_c_classInit__Fv = .text:0x00000070; // type:function size:0x30 __ct__28dTgShutterFenceForbiddance_cFv = .text:0x000000A0; // type:function size:0x50 __dt__28dTgShutterFenceForbiddance_cFv = .text:0x000000F0; // type:function size:0x7C -TgShutterFenceForbiddance__init = .text:0x00000170; // type:function size:0x20 -fn_631_190 = .text:0x00000190; // type:function size:0x60 +create__28dTgShutterFenceForbiddance_cFv = .text:0x00000170; // type:function size:0x20 +actorExecute__28dTgShutterFenceForbiddance_cFv = .text:0x00000190; // type:function size:0x60 _ctors = .ctors:0x00000000; // type:label scope:global _dtors = .dtors:0x00000000; // type:label scope:global g_profile_TAG_SHUTTER_FENCE_FORBIDDANCE = .data:0x00000000; // type:object size:0x10 -lbl_631_section4_10 = .data:0x00000010; // type:object size:0x74 +__vt__28dTgShutterFenceForbiddance_c = .data:0x00000010; // type:object size:0x74 TgShutterFenceForbiddance__FIRST_PTR = .bss:0x00000008; // type:object size:0x4 data:4byte diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index ed79ad30..e66d16a4 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -98,9 +98,10 @@ toBeSorted/d_unk_mdl_stuff_2.cpp: .ctors start:0x804DB658 end:0x804DB65C .sbss start:0x80575058 end:0x80575068 -toBeSorted/blur_and_palette_manager.cpp: +d/d_light_env.cpp: .text start:0x800221A0 end:0x800268AC align:16 .ctors start:0x804DB65C end:0x804DB660 + .data start:0x80500E80 end:0x80500E98 .sbss start:0x80575068 end:0x80575070 .sdata2 start:0x80576BA0 end:0x80576C18 .bss start:0x8058F210 end:0x80594FA0 @@ -360,8 +361,10 @@ toBeSorted/arc_managers/layout_arc_manager.cpp: toBeSorted/arc_managers/layout_arc_control.cpp: .text start:0x8006A2E0 end:0x8006A544 align:16 -toBeSorted/base_tables.cpp: +toBeSorted/actor_info.cpp: .text start:0x8006A550 end:0x8006A8C8 align:16 + .rodata start:0x804E0FA8 end:0x804E3418 + .sdata2 start:0x805779F8 end:0x80579210 toBeSorted/unk_vec_math.cpp: .text start:0x8006A8D0 end:0x8006B3A4 align:16 @@ -2346,67 +2349,152 @@ toBeSorted/col/cc/misc_unks.cpp: .text start:0x803598D0 end:0x80359D20 align:16 .sbss start:0x80575D28 end:0x80575D30 -d/snd/d_snd.cpp: +d/snd/d_snd_mgr.cpp: .text start:0x80359D20 end:0x8035A558 align:16 + .data start:0x805485D0 end:0x80548678 + .sbss start:0x80575D30 end:0x80575D38 d/snd/d_snd_actor.cpp: - .text start:0x8035A560 end:0x8035BB78 align:16 + .text start:0x8035A560 end:0x8035A898 align:16 + .data start:0x80548678 end:0x805486A0 -d/snd/d_snd_engine.cpp: +d/snd/d_snd_3d_actor.cpp: + .text start:0x8035A8A0 end:0x8035BB78 align:16 + .data start:0x805486A0 end:0x80548710 + .sdata2 start:0x8057D2C0 end:0x8057D308 + +d/snd/d_snd_3d_engine.cpp: .text start:0x8035BB80 end:0x8035C3F0 align:16 + .data start:0x80548710 end:0x80548730 + .sdata2 start:0x8057D308 end:0x8057D368 -d/snd/d_snd_unk_component_1.cpp: +d/snd/d_snd_sound.cpp: .text start:0x8035C3F0 end:0x8035DA88 align:16 + .data start:0x80548730 end:0x80548758 + .sdata2 start:0x8057D368 end:0x8057D380 -d/snd/mgr/d_snd_mgr_bgm.cpp: - .text start:0x8035DA90 end:0x8035F010 align:16 +d/snd/d_snd_player_mgr.cpp: + .text start:0x8035DA90 end:0x8035F04C align:16 + .data start:0x80548758 end:0x805487A0 + .sbss start:0x80575D38 end:0x80575D40 + .sdata2 start:0x8057D380 end:0x8057D390 -d/snd/mgr/d_snd_mgr_unk1.cpp: - .text start:0x8035F010 end:0x80360C28 align:16 +d/snd/d_snd_control_player_mgr.cpp: + .text start:0x8035F050 end:0x80360C28 align:16 .ctors start:0x804DB914 end:0x804DB918 + .data start:0x805487A0 end:0x805487D0 + .sbss start:0x80575D40 end:0x80575D58 + .sdata2 start:0x8057D390 end:0x8057D3B8 -d/snd/mgr/d_snd_mgr_unk3.cpp: +d/snd/d_snd_3d_manager.cpp: .text start:0x80360C30 end:0x8036145C align:16 + .data start:0x805487D0 end:0x805487E0 + .sbss start:0x80575D58 end:0x80575D60 + .sdata2 start:0x8057D3B8 end:0x8057D3F8 -d/snd/mgr/d_snd_mgr_enemy.cpp: +d/snd/d_snd_stage_mgr.cpp: .text start:0x80361460 end:0x8036642C align:16 .ctors start:0x804DB918 end:0x804DB91C d/snd/d_snd_unk_component_2.cpp: - .text start:0x80366430 end:0x8037D800 align:16 + .text start:0x80366430 end:0x8036A3A4 align:16 -d/snd/mgr/d_snd_mgr_effect.cpp: +d/snd/d_snd_area_sound_effect_mgr.cpp: + .text start:0x8036A3B0 end:0x8036B8D0 align:16 + .data start:0x80548B38 end:0x80548B48 + .sbss start:0x80575D78 end:0x80575D80 + .sdata2 start:0x8057D8B0 end:0x8057D8E8 + +d/snd/d_snd_area_sound.cpp: + .text start:0x8036B8D0 end:0x8036C090 align:16 + .data start:0x80548B48 end:0x80548B78 + .sdata2 start:0x8057D8E8 end:0x8057D920 + +d/snd/d_snd_control_sound.cpp: + .text start:0x8036C090 end:0x8036C444 align:16 + .data start:0x80548B78 end:0x80548C38 + .sdata2 start:0x8057D920 end:0x8057D938 + +d/snd/d_snd_control_player.cpp: + .text start:0x8036C450 end:0x8036C6A8 align:16 + .data start:0x80548C38 end:0x80548CC8 + .sdata2 start:0x8057D938 end:0x8057D940 + +d/snd/d_snd_bgm_mgr.cpp: + .text start:0x8036C6B0 end:0x803739CC align:16 + .sbss start:0x80575D80 end:0x80575D88 + .sdata2 start:0x8057D940 end:0x8057D970 + +d/snd/d_snd_bgm_sound_callbacks.cpp: + .text start:0x803739D0 end:0x80378ECC align:16 + .sdata2 start:0x8057D970 end:0x8057DA50 + +d/snd/d_snd_bgm_sound_boss_callbacks.cpp: + .text start:0x80378ED0 end:0x80379D20 align:16 + .sdata2 start:0x8057DA50 end:0x8057DA58 + +d/snd/d_snd_bgm_sound.cpp: + .text start:0x80379D20 end:0x8037BA68 align:16 + .sbss start:0x80575D88 end:0x80575D90 + +d/snd/d_snd_unk_15.cpp: + .text start:0x8037BA70 end:0x8037D800 align:16 + +d/snd/d_snd_small_effect_mgr.cpp: .text start:0x8037D800 end:0x8037F8B4 align:16 + .data start:0x805491B8 end:0x805491D0 + .sbss start:0x80575D98 end:0x80575DA0 + .sdata2 start:0x8057DA80 end:0x8057DAD0 -d/snd/mgr/d_snd_mgr_unk_5.cpp: - .text start:0x8037F8C0 end:0x803864C8 align:16 +d/snd/d_snd_harp_mgr.cpp: + .text start:0x8037F8C0 end:0x80382150 align:16 + .data start:0x805491D0 end:0x805491E0 + .sbss start:0x80575DA0 end:0x80575DA8 + .sdata2 start:0x8057DAD0 end:0x8057DB48 + +d/snd/d_snd_anim_sound.cpp: + .text start:0x80382150 end:0x8038240C align:16 + .sdata2 start:0x8057DB50 end:0x8057DB68 + +d/snd/d_snd_source_mgr.cpp: + .text start:0x80382410 end:0x803864C8 align:16 .ctors start:0x804DB91C end:0x804DB920 + .sdata start:0x80574310 end:0x805743D0 + .sbss start:0x80575DA8 end:0x80575DB0 + .sdata2 start:0x8057DB68 end:0x8057DBC0 -d/snd/mgr/d_snd_mgr_unk_6.cpp: - .text start:0x803864D0 end:0x8038C408 align:16 +d/snd/d_snd_source_group.cpp: + .text start:0x803864D0 end:0x803889BC align:16 + .data start:0x8054A680 end:0x8054A7D0 + .sdata start:0x805743D0 end:0x80574708 + .sdata2 start:0x8057DBC0 end:0x8057DCB0 + +d/snd/d_snd_source.cpp: + .text start:0x803889C0 end:0x8038C408 align:16 .ctors start:0x804DB920 end:0x804DB924 + .data start:0x8054A7D0 end:0x8054AAE8 -d/snd/mgr/d_snd_mgr_unk_7.cpp: +d/snd/d_snd_mgr_unk_7.cpp: .text start:0x8038C410 end:0x8038EBF0 align:16 .ctors start:0x804DB924 end:0x804DB928 -d/snd/mgr/d_snd_mgr_unk_8.cpp: +d/snd/d_snd_mgr_unk_8.cpp: .text start:0x8038EBF0 end:0x8038FF18 align:16 .ctors start:0x804DB928 end:0x804DB92C -d/snd/mgr/d_snd_mgr_unk_9.cpp: +d/snd/d_snd_mgr_unk_9.cpp: .text start:0x8038FF20 end:0x80390A18 align:16 .ctors start:0x804DB92C end:0x804DB930 -d/snd/mgr/d_snd_mgr_unk_10.cpp: +d/snd/d_snd_mgr_unk_10.cpp: .text start:0x80390A20 end:0x80393DF4 align:16 .ctors start:0x804DB930 end:0x804DB934 -d/snd/mgr/d_snd_mgr_unk_11.cpp: +d/snd/d_snd_mgr_unk_11.cpp: .text start:0x80393E00 end:0x8039A848 align:16 .ctors start:0x804DB934 end:0x804DB938 -d/snd/mgr/d_snd_mgr_unk_12.cpp: +d/snd/d_snd_calc_pitch.cpp: .text start:0x8039A850 end:0x8039A960 align:16 RVL_SDK/kpr/KPR.c: @@ -2866,6 +2954,9 @@ nw4r/g3d/g3d_scnmdl.cpp: .rodata start:0x804F7B48 end:0x804F7B58 .data start:0x8056DA70 end:0x8056DAB8 +nw4r/g3d/g3d_scnmdl1mat1shp.cpp: + .rodata start:0x804F7B58 end:0x804F7B70 + nw4r/g3d/g3d_calcmaterial.cpp: .text start:0x8045FDB0 end:0x8045FFE4 align:16 @@ -2893,48 +2984,77 @@ nw4r/g3d/g3d_calcvtx.cpp: .sdata2 start:0x8057EEF0 end:0x8057EEF8 nw4r/snd/snd_AnimSound.cpp: - .text start:0x80461700 end:0x804630D4 align:16 + .text start:0x80461700 end:0x80462F18 align:16 + .sdata2 start:0x8057EEF8 end:0x8057EF18 + +nw4r/snd/snd_AnimSoundReader.cpp: + .text start:0x80462F20 end:0x804630D4 align:16 nw4r/snd/snd_AxManager.cpp: .text start:0x804630E0 end:0x80464880 align:16 .ctors start:0x804DB958 end:0x804DB95C + .sbss start:0x80576650 end:0x80576668 + .sdata2 start:0x8057EF18 end:0x8057EF30 + .bss start:0x80658F80 end:0x80659390 nw4r/snd/snd_AxVoice.cpp: .text start:0x80464880 end:0x80467634 align:16 + .sdata2 start:0x8057EF30 end:0x8057EF58 nw4r/snd/snd_AxVoiceManager.cpp: .text start:0x80467640 end:0x80467DC8 align:16 + .sbss start:0x80576668 end:0x80576670 + .bss start:0x80659390 end:0x806593C8 nw4r/snd/snd_AxfxImpl.cpp: .text start:0x80467DD0 end:0x80467FC8 align:16 + .sbss start:0x80576670 end:0x80576678 nw4r/snd/snd_Bank.cpp: .text start:0x80467FD0 end:0x80468248 align:16 + .sdata2 start:0x8057EF58 end:0x8057EF78 nw4r/snd/snd_BankFile.cpp: .text start:0x80468250 end:0x8046890C align:16 + .sdata2 start:0x8057EF78 end:0x8057EF80 nw4r/snd/snd_BasicPlayer.cpp: .text start:0x80468910 end:0x80468B50 align:16 + .data start:0x8056DB38 end:0x8056DB60 + .sdata2 start:0x8057EF80 end:0x8057EF88 nw4r/snd/snd_BasicSound.cpp: .text start:0x80468B50 end:0x8046A36C align:16 .ctors start:0x804DB95C end:0x804DB960 + .data start:0x8056DB60 end:0x8056DB98 + .sbss start:0x80576678 end:0x80576680 + .sdata2 start:0x8057EF88 end:0x8057EF98 nw4r/snd/snd_BiquadFilterPreset.cpp: .text start:0x8046A370 end:0x8046A7B0 align:16 + .rodata start:0x804F7B80 end:0x804F8FB8 + .data start:0x8056DB98 end:0x8056DBE8 + .sdata2 start:0x8057EF98 end:0x8057EFA8 nw4r/snd/snd_Channel.cpp: .text start:0x8046A7B0 end:0x8046B7C8 align:16 + .sbss start:0x80576680 end:0x80576688 + .sdata2 start:0x8057EFA8 end:0x8057EFD0 + .bss start:0x806593C8 end:0x806593F8 nw4r/snd/snd_DisposeCallbackManager.cpp: .text start:0x8046B7D0 end:0x8046BB5C align:16 + .sbss start:0x80576688 end:0x80576690 + .bss start:0x806593F8 end:0x80659410 nw4r/snd/snd_DvdSoundArchive.cpp: .text start:0x8046BB60 end:0x8046C1C8 align:16 + .data start:0x8056DBE8 end:0x8056DC70 nw4r/snd/snd_EnvGenerator.cpp: .text start:0x8046C1D0 end:0x8046C5A0 align:16 + .rodata start:0x804F8FB8 end:0x804F92B8 + .sdata2 start:0x8057EFD0 end:0x8057F000 nw4r/snd/snd_ExternalSoundPlayer.cpp: .text start:0x8046C5A0 end:0x8046CB18 align:16 @@ -2944,77 +3064,114 @@ nw4r/snd/snd_FrameHeap.cpp: nw4r/snd/snd_FxReverbStdDpl2.cpp: .text start:0x8046D2E0 end:0x8046DA10 align:16 + .data start:0x8056DC70 end:0x8056DC98 + .sdata2 start:0x8057F000 end:0x8057F018 nw4r/snd/snd_InstancePool.cpp: .text start:0x8046DA10 end:0x8046DCF8 align:16 nw4r/snd/snd_Lfo.cpp: .text start:0x8046DD00 end:0x8046DF08 align:16 + .rodata start:0x804F92B8 end:0x804F92E0 + .sdata2 start:0x8057F018 end:0x8057F048 nw4r/snd/snd_MemorySoundArchive.cpp: .text start:0x8046DF10 end:0x8046E3B0 align:16 + .data start:0x8056DC98 end:0x8056DD18 nw4r/snd/snd_MidiSeqPlayer.cpp: .text start:0x8046E3B0 end:0x8046E458 align:16 nw4r/snd/snd_MmlParser.cpp: .text start:0x8046E460 end:0x8046F63C align:16 + .data start:0x8056DD18 end:0x8056DF48 + .sdata start:0x80574E90 end:0x80574EA0 + .sbss start:0x80576690 end:0x80576698 + .sdata2 start:0x8057F048 end:0x8057F068 nw4r/snd/snd_MmlSeqTrack.cpp: .text start:0x8046F640 end:0x8046F6F8 align:16 + .data start:0x8056DF48 end:0x8056DF58 nw4r/snd/snd_MmlSeqTrackAllocator.cpp: .text start:0x8046F700 end:0x8046F850 align:16 + .data start:0x8056DF58 end:0x8056DF70 nw4r/snd/snd_NandSoundArchive.cpp: .text start:0x8046F850 end:0x804700B8 align:16 + .data start:0x8056DF70 end:0x8056DFF0 + .sbss start:0x80576698 end:0x805766A0 nw4r/snd/snd_PlayerHeap.cpp: .text start:0x804700C0 end:0x804702DC align:16 + .data start:0x8056DFF0 end:0x8056E000 nw4r/snd/snd_RemoteSpeaker.cpp: .text start:0x804702E0 end:0x80470C90 align:16 nw4r/snd/snd_RemoteSpeakerManager.cpp: .text start:0x80470C90 end:0x80470ED8 align:16 + .sbss start:0x805766A0 end:0x805766A8 + .bss start:0x80659410 end:0x806596E8 nw4r/snd/snd_SeqFile.cpp: .text start:0x80470EE0 end:0x80471018 align:16 nw4r/snd/snd_SeqPlayer.cpp: .text start:0x80471020 end:0x804727F8 align:16 + .data start:0x8056E000 end:0x8056E088 + .sdata2 start:0x8057F068 end:0x8057F080 + .bss start:0x806596E8 end:0x80659708 nw4r/snd/snd_SeqSound.cpp: .text start:0x80472800 end:0x8047316C align:16 .ctors start:0x804DB960 end:0x804DB964 + .data start:0x8056E088 end:0x8056E0D8 + .sbss start:0x805766A8 end:0x805766B0 nw4r/snd/snd_SeqSoundHandle.cpp: .text start:0x80473170 end:0x804732A8 align:16 nw4r/snd/snd_SeqTrack.cpp: .text start:0x804732B0 end:0x80474818 align:16 + .rodata start:0x804F92E0 end:0x804F9308 + .data start:0x8056E0D8 end:0x8056E0E8 + .sdata2 start:0x8057F080 end:0x8057F0B0 nw4r/snd/snd_Sound3DActor.cpp: .text start:0x80474820 end:0x80474BD8 align:16 + .rodata start:0x804F9308 end:0x804F9320 + .data start:0x8056E0E8 end:0x8056E118 + .sdata2 start:0x8057F0B0 end:0x8057F0B8 nw4r/snd/snd_Sound3DCalculator.cpp: .text start:0x80474BE0 end:0x804756B0 align:16 + .sdata2 start:0x8057F0B8 end:0x8057F100 nw4r/snd/snd_Sound3DEngine.cpp: .text start:0x804756B0 end:0x804759F8 align:16 + .data start:0x8056E118 end:0x8056E138 + .sdata2 start:0x8057F100 end:0x8057F118 nw4r/snd/snd_Sound3DListener.cpp: .text start:0x80475A00 end:0x80475C88 align:16 + .sdata2 start:0x8057F118 end:0x8057F128 nw4r/snd/snd_Sound3DManager.cpp: .text start:0x80475C90 end:0x80475F78 align:16 .ctors start:0x804DB964 end:0x804DB968 + .data start:0x8056E138 end:0x8056E170 + .sdata2 start:0x8057F128 end:0x8057F130 + .bss start:0x80659708 end:0x80659720 nw4r/snd/snd_SoundActor.cpp: - .text start:0x80475F80 end:0x80476264 align:16 + .text start:0x80475F80 end:0x80476278 align:16 + .data start:0x8056E170 end:0x8056E190 + .sdata2 start:0x8057F130 end:0x8057F138 nw4r/snd/snd_SoundArchive.cpp: - .text start:0x80476270 end:0x8047697C align:16 + .text start:0x80476280 end:0x8047697C align:16 + .data start:0x8056E190 end:0x8056E1B0 nw4r/snd/snd_SoundArchiveFile.cpp: .text start:0x80476980 end:0x80477C90 align:16 @@ -3024,15 +3181,21 @@ nw4r/snd/snd_SoundArchiveLoader.cpp: nw4r/snd/snd_SoundArchivePlayer.cpp: .text start:0x80478560 end:0x8047B018 align:16 + .data start:0x8056E1B0 end:0x8056E200 + .sdata2 start:0x8057F138 end:0x8057F148 nw4r/snd/snd_SoundHandle.cpp: .text start:0x8047B020 end:0x8047B110 align:16 nw4r/snd/snd_SoundHeap.cpp: .text start:0x8047B110 end:0x8047B418 align:16 + .data start:0x8056E200 end:0x8056E210 nw4r/snd/snd_SoundPlayer.cpp: .text start:0x8047B420 end:0x8047C050 align:16 + .sbss start:0x805766B0 end:0x805766B8 + .sdata2 start:0x8057F148 end:0x8057F150 + .bss start:0x80659720 end:0x80659D40 nw4r/snd/snd_SoundStartable.cpp: .text start:0x8047C050 end:0x8047C3AC align:16 @@ -3040,9 +3203,15 @@ nw4r/snd/snd_SoundStartable.cpp: nw4r/snd/snd_SoundSystem.cpp: .text start:0x8047C3B0 end:0x8047C708 align:16 .ctors start:0x804DB968 end:0x804DB96C + .data start:0x8056E210 end:0x8056E258 + .sdata start:0x80574EA0 end:0x80574EA8 + .sbss start:0x805766B8 end:0x805766C0 + .bss start:0x80659D40 end:0x8066F660 nw4r/snd/snd_SoundThread.cpp: .text start:0x8047C710 end:0x8047CD10 align:16 + .sbss start:0x805766C0 end:0x805766C8 + .bss start:0x8066F660 end:0x8066FA20 nw4r/snd/snd_StrmChannel.cpp: .text start:0x8047CD10 end:0x8047CF50 align:16 @@ -3052,10 +3221,17 @@ nw4r/snd/snd_StrmFile.cpp: nw4r/snd/snd_StrmPlayer.cpp: .text start:0x8047D8E0 end:0x80480588 align:16 + .data start:0x8056E258 end:0x8056E2D0 + .sbss start:0x805766C8 end:0x805766D0 + .sdata2 start:0x8057F150 end:0x8057F178 + .bss start:0x8066FA20 end:0x80673A38 nw4r/snd/snd_StrmSound.cpp: .text start:0x80480590 end:0x80480D8C align:16 .ctors start:0x804DB96C end:0x804DB970 + .data start:0x8056E2D0 end:0x8056E308 + .sbss start:0x805766D0 end:0x805766D8 + .sdata2 start:0x8057F178 end:0x8057F188 nw4r/snd/snd_StrmSoundHandle.cpp: .text start:0x80480D90 end:0x80480EC8 align:16 @@ -3065,34 +3241,52 @@ nw4r/snd/snd_Task.cpp: nw4r/snd/snd_TaskManager.cpp: .text start:0x80480F10 end:0x804815D0 align:16 + .sbss start:0x805766D8 end:0x805766E0 + .bss start:0x80673A38 end:0x80673A80 nw4r/snd/snd_TaskThread.cpp: .text start:0x804815D0 end:0x80481798 align:16 nw4r/snd/snd_Voice.cpp: .text start:0x804817A0 end:0x80484034 align:16 + .data start:0x8056E308 end:0x8056E340 + .sdata2 start:0x8057F188 end:0x8057F1C0 nw4r/snd/snd_VoiceManager.cpp: .text start:0x80484040 end:0x804846F4 align:16 + .sbss start:0x805766E0 end:0x805766E8 + .bss start:0x80673A80 end:0x80673AA8 nw4r/snd/snd_Util.cpp: .text start:0x80484700 end:0x80484BD4 align:16 + .rodata start:0x804F9320 end:0x804FB7A0 + .data start:0x8056E340 end:0x8056E350 + .sdata start:0x80574EA8 end:0x80574EB0 + .sdata2 start:0x8057F1C0 end:0x8057F1F0 + +nw4r/snd/snd_WaveArchive.cpp: + .text start:0x80484BE0 end:0x80484CE8 align:16 nw4r/snd/snd_WaveFile.cpp: - .text start:0x80484BE0 end:0x80484F54 align:16 + .text start:0x80484CF0 end:0x80484F54 align:16 nw4r/snd/snd_WaveSound.cpp: .text start:0x80484F60 end:0x8048531C align:16 .ctors start:0x804DB970 end:0x804DB974 + .data start:0x8056E350 end:0x8056E388 + .sbss start:0x805766E8 end:0x805766F0 nw4r/snd/snd_WaveSoundHandle.cpp: .text start:0x80485320 end:0x80485458 align:16 nw4r/snd/snd_WsdFile.cpp: .text start:0x80485460 end:0x80485824 align:16 + .sdata2 start:0x8057F1F0 end:0x8057F1F8 nw4r/snd/snd_WsdPlayer.cpp: .text start:0x80485830 end:0x804869D8 align:16 + .data start:0x8056E388 end:0x8056E3E8 + .sdata2 start:0x8057F1F8 end:0x8057F220 nw4r/snd/snd_adpcm.cpp: .text start:0x804869E0 end:0x80486A6C align:16 diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index dd364038..752563db 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -208,7 +208,7 @@ fn_80008A00 = .text:0x80008A00; // type:function size:0x24 fn_80008A30 = .text:0x80008A30; // type:function size:0x1C0 fn_80008BF0 = .text:0x80008BF0; // type:function size:0xE4 fn_80008CE0 = .text:0x80008CE0; // type:function size:0x134 -getSoundArchivePlayer = .text:0x80008E20; // type:function size:0xC +getPlayer__9dSndMgr_cFv = .text:0x80008E20; // type:function size:0xC fn_80008E30 = .text:0x80008E30; // type:function size:0x58 fn_80008E90 = .text:0x80008E90; // type:function size:0x58 fn_80008EF0 = .text:0x80008EF0; // type:function size:0xA4 @@ -572,7 +572,7 @@ play__Q23d3d13AnmMdlWrapperFv = .text:0x80016F20; // type:function size:0x34 setFrame__Q23d3d13AnmMdlWrapperFf = .text:0x80016F60; // type:function size:0x34 setAnm__Q23d3d13AnmMdlWrapperFPCcQ23m3d10playMode_ef = .text:0x80016FA0; // type:function size:0x54 setRate__Q23d3d13AnmMdlWrapperFf = .text:0x80017000; // type:function size:0x44 -setSoundSource__Q23d3d13AnmMdlWrapperFP11SoundSource = .text:0x80017050; // type:function size:0x8 +setSoundSource__Q23d3d13AnmMdlWrapperFP16dSoundSourceIf_c = .text:0x80017050; // type:function size:0x8 loadSounds__Q23d3d13AnmMdlWrapperFPCc = .text:0x80017060; // type:function size:0xCC setSoundRate__Q23d3d13AnmMdlWrapperFf = .text:0x80017130; // type:function size:0x20 syncAnmFrame__Q23d3d13AnmMdlWrapperFv = .text:0x80017150; // type:function size:0x50 @@ -583,7 +583,7 @@ insertNode__3d3dFPQ23d3d12SomeListNodeff = .text:0x80017380; // type:function si clearList__3d3dFv = .text:0x80017430; // type:function size:0xCC fn_80017500 = .text:0x80017500; // type:function size:0x1DC fn_800176E0 = .text:0x800176E0; // type:function size:0x10 -unk2__3d3dFRQ34nw4r3g3d6ResMatRQ34nw4r3g3d14ResMatTevColorP12LightingInfo = .text:0x800176F0; // type:function size:0x418 +unk2__3d3dFRQ34nw4r3g3d6ResMatRQ34nw4r3g3d14ResMatTevColorP13ActorLighting = .text:0x800176F0; // type:function size:0x418 setRoomTevColors__3d3dFQ34nw4r3g3d6ResMdlib = .text:0x80017B10; // type:function size:0x1D4 fn_80017CF0 = .text:0x80017CF0; // type:function size:0x230 fn_80017F20 = .text:0x80017F20; // type:function size:0x20C @@ -795,100 +795,100 @@ fn_80022010 = .text:0x80022010; // type:function size:0x28 fn_80022040 = .text:0x80022040; // type:function size:0x80 fn_800220C0 = .text:0x800220C0; // type:function size:0x8 fn_800220D0 = .text:0x800220D0; // type:function size:0xD0 -fn_800221A0 = .text:0x800221A0; // type:function size:0xC4 -fn_80022270 = .text:0x80022270; // type:function size:0x5C -fn_800222D0 = .text:0x800222D0; // type:function size:0xC8 -fn_800223A0__21BlurAndPaletteManagerFP11LightParams = .text:0x800223A0; // type:function size:0x94 -fn_80022440__21BlurAndPaletteManagerFP11LightParams = .text:0x80022440; // type:function size:0x34 -fn_80022480 = .text:0x80022480; // type:function size:0xCC -fn_80022550 = .text:0x80022550; // type:function size:0x74 -__as__7mVec3_cFRC7mVec3_c = .text:0x800225D0; // type:function size:0x1C -fn_800225F0 = .text:0x800225F0; // type:function size:0xEC -fn_800226E0 = .text:0x800226E0; // type:function size:0x34 -fn_80022720 = .text:0x80022720; // type:function size:0xCC -fn_800227F0 = .text:0x800227F0; // type:function size:0xF0 -fn_800228E0 = .text:0x800228E0; // type:function size:0xEC -fn_800229D0 = .text:0x800229D0; // type:function size:0x34 -fn_80022A10 = .text:0x80022A10; // type:function size:0xD8 -fn_80022AF0__21BlurAndPaletteManagerFf = .text:0x80022AF0; // type:function size:0x3C -fn_80022B30 = .text:0x80022B30; // type:function size:0x8 -fn_80022B40 = .text:0x80022B40; // type:function size:0x58 -fn_80022BA0 = .text:0x80022BA0; // type:function size:0xC -fn_80022BB0 = .text:0x80022BB0; // type:function size:0xC -fn_80022BC0 = .text:0x80022BC0; // type:function size:0xC -fn_80022BD0 = .text:0x80022BD0; // type:function size:0xC -fn_80022BE0 = .text:0x80022BE0; // type:function size:0xC -fn_80022BF0 = .text:0x80022BF0; // type:function size:0xBC -fn_80022CB0 = .text:0x80022CB0; // type:function size:0xD8 -fn_80022D90 = .text:0x80022D90; // type:function size:0xD8 -fn_80022E70 = .text:0x80022E70; // type:function size:0x40 -fn_80022EB0 = .text:0x80022EB0; // type:function size:0x5C -fn_80022F10 = .text:0x80022F10; // type:function size:0x8C -fn_80022FA0 = .text:0x80022FA0; // type:function size:0x34 -fn_80022FE0 = .text:0x80022FE0; // type:function size:0x8 -fn_80022FF0 = .text:0x80022FF0; // type:function size:0x8 -combineColors__21BlurAndPaletteManagerFRC6mColorRC6mColorf = .text:0x80023000; // type:function size:0x144 -__ct__6mColorFv = .text:0x80023150; // type:function size:0xC -fn_80023160 = .text:0x80023160; // type:function size:0x4C -fn_800231B0 = .text:0x800231B0; // type:function size:0x10 -fn_800231C0 = .text:0x800231C0; // type:function size:0x5C -fn_80023220 = .text:0x80023220; // type:function size:0x60 -fn_80023280 = .text:0x80023280; // type:function size:0xD24 -__as__6mColorFRC6mColor = .text:0x80023FB0; // type:function size:0x24 -__as__14UnalignedColorFRC6mColor = .text:0x80023FE0; // type:function size:0x24 -__ct__3SpfFv = .text:0x80024010; // type:function size:0x114 -__ct__6SffSubFv = .text:0x80024130; // type:function size:0xC -__dt__6SffSubFv = .text:0x80024140; // type:function size:0x40 -__dt__3SpfFv = .text:0x80024180; // type:function size:0xBC -fn_80024240__21BlurAndPaletteManagerFsss = .text:0x80024240; // type:function size:0xF8 -fn_80024340 = .text:0x80024340; // type:function size:0x10 -BlurAndPaletteMgr__setMist = .text:0x80024350; // type:function size:0x18 -fn_80024370 = .text:0x80024370; // type:function size:0x58 -BlurAndPaletteMgr__setDof = .text:0x800243D0; // type:function size:0x10 -BlurAndPaletteMgr__disableDofOverride = .text:0x800243E0; // type:function size:0xC -fn_800243F0 = .text:0x800243F0; // type:function size:0x178 -__ct__6mColorFiiii = .text:0x80024570; // type:function size:0x14 -fn_80024590 = .text:0x80024590; // type:function size:0xE4 -__ct__3SffFv = .text:0x80024680; // type:function size:0x48 -__dt__3SffFv = .text:0x800246D0; // type:function size:0x64 -fn_80024740 = .text:0x80024740; // type:function size:0x24 -fn_80024770 = .text:0x80024770; // type:function size:0x24 -fn_800247A0 = .text:0x800247A0; // type:function size:0x30 -fn_800247D0__21BlurAndPaletteManagerF7mVec3_cf = .text:0x800247D0; // type:function size:0x20 -__ct__21BlurAndPaletteManagerFv = .text:0x800247F0; // type:function size:0xBB0 -__ct__7mVec3_cFfff = .text:0x800253A0; // type:function size:0x10 -__ct__4Bpm1Fv = .text:0x800253B0; // type:function size:0xC -__ct__4Bpm2Fv = .text:0x800253C0; // type:function size:0x4 -__ct__4Bpm7Fv = .text:0x800253D0; // type:function size:0x4 -__dt__4Bpm7Fv = .text:0x800253E0; // type:function size:0x40 -__ct__4Bpm8Fv = .text:0x80025420; // type:function size:0x4 -__dt__4Bpm8Fv = .text:0x80025430; // type:function size:0x40 -__ct__4Bpm9Fv = .text:0x80025470; // type:function size:0x4 -__dt__4Bpm9Fv = .text:0x80025480; // type:function size:0x40 -__ct__4Bpm3Fv = .text:0x800254C0; // type:function size:0x48 -__ct__15PaletteEAF_smolFv = .text:0x80025510; // type:function size:0x48 -__ct__21PaletteEAF_smol_entryFv = .text:0x80025560; // type:function size:0x18 -__dt__21PaletteEAF_smol_entryFv = .text:0x80025580; // type:function size:0x40 -__dt__15PaletteEAF_smolFv = .text:0x800255C0; // type:function size:0x64 -__ct__4Bpm4Fv = .text:0x80025630; // type:function size:0x48 -__ct__14PaletteEAF_bigFv = .text:0x80025680; // type:function size:0x48 -__ct__20PaletteEAF_big_entryFv = .text:0x800256D0; // type:function size:0x18 -__dt__20PaletteEAF_big_entryFv = .text:0x800256F0; // type:function size:0x40 -__dt__14PaletteEAF_bigFv = .text:0x80025730; // type:function size:0x64 -__ct__17PaletteDefaultMCFFv = .text:0x800257A0; // type:function size:0x28 -__ct__20TwoPaletteDefaultMCFFv = .text:0x800257D0; // type:function size:0x48 -__as__3SpfFRC3Spf = .text:0x80025820; // type:function size:0x8C4 -__as__3SffFRC3Sff = .text:0x800260F0; // type:function size:0xB4 -__as__17PaletteDefaultMCFFRC17PaletteDefaultMCF = .text:0x800261B0; // type:function size:0x154 -__dt__21BlurAndPaletteManagerFv = .text:0x80026310; // type:function size:0x1EC -fn_80026500 = .text:0x80026500; // type:function size:0x38 -fn_80026540 = .text:0x80026540; // type:function size:0x40 -fn_80026580 = .text:0x80026580; // type:function size:0x188 -fn_80026710 = .text:0x80026710; // type:function size:0x4C -fn_80026760 = .text:0x80026760; // type:function size:0x4C -getLightColor1__21BlurAndPaletteManagerFv = .text:0x800267B0; // type:function size:0x4C -getLightColor2__21BlurAndPaletteManagerFv = .text:0x80026800; // type:function size:0x4C -__sinit_\blur_and_palette_manager_cpp = .text:0x80026850; // type:function size:0x5C scope:local +vectle_calc__FPC7mVec3_cP7mVec3_c = .text:0x800221A0; // type:function size:0xC4 scope:local +get_vectle_calc__11dLightEnv_cFPC7mVec3_cPC7mVec3_cP7mVec3_c = .text:0x80022270; // type:function size:0x5C +sphere_to_cartesian__11dLightEnv_cFffP7mVec3_c = .text:0x800222D0; // type:function size:0xC8 +efplight_set__11dLightEnv_cFP15LIGHT_INFLUENCE = .text:0x800223A0; // type:function size:0x94 +efplight_cut__11dLightEnv_cFP15LIGHT_INFLUENCE = .text:0x80022440; // type:function size:0x34 +eflight_influence__11dLightEnv_cFPC7mVec3_c = .text:0x80022480; // type:function size:0xCC +SordFlush_set__11dLightEnv_cFPC7mVec3_cl = .text:0x80022550; // type:function size:0x74 +__as__7mVec3_cFRC7mVec3_c = .text:0x800225D0; // type:function size:0x1C scope:weak +plight_set__11dLightEnv_cFP15LIGHT_INFLUENCE = .text:0x800225F0; // type:function size:0xEC +plight_cut__11dLightEnv_cFP15LIGHT_INFLUENCE = .text:0x800226E0; // type:function size:0x34 +light_influence__11dLightEnv_cFPC7mVec3_cb = .text:0x80022720; // type:function size:0xCC +light_influence2__11dLightEnv_cFPC7mVec3_cb = .text:0x800227F0; // type:function size:0xF0 +shadow_set__11dLightEnv_cFP16SHADOW_INFLUENCE = .text:0x800228E0; // type:function size:0xEC +shadow_cut__11dLightEnv_cFP16SHADOW_INFLUENCE = .text:0x800229D0; // type:function size:0x34 +shadow_influence__11dLightEnv_cFPC7mVec3_c = .text:0x80022A10; // type:function size:0xD8 +setLightFilter__11dLightEnv_cFf = .text:0x80022AF0; // type:function size:0x3C +set0x35B0__11dLightEnv_cFf = .text:0x80022B30; // type:function size:0x8 +setBPM8__11dLightEnv_cFPC7mVec3_cUlf = .text:0x80022B40; // type:function size:0x58 +setBPM8_Type4__11dLightEnv_cFPC7mVec3_c = .text:0x80022BA0; // type:function size:0xC +setBPM8_Type6__11dLightEnv_cFPC7mVec3_c = .text:0x80022BB0; // type:function size:0xC +setBPM8_Type10__11dLightEnv_cFPC7mVec3_c = .text:0x80022BC0; // type:function size:0xC +setBPM8_Type10_2__11dLightEnv_cFPC7mVec3_c = .text:0x80022BD0; // type:function size:0xC +setBPM8_Type6_2__11dLightEnv_cFPC7mVec3_c = .text:0x80022BE0; // type:function size:0xC +check_BPM8__11dLightEnv_cFPC7mVec3_cP7mVec3_c = .text:0x80022BF0; // type:function size:0xBC +check_BPM8_1001__11dLightEnv_cFPC7mVec3_cP7mVec3_c = .text:0x80022CB0; // type:function size:0xD8 +check_BPM8_501__11dLightEnv_cFPC7mVec3_cP7mVec3_c = .text:0x80022D90; // type:function size:0xD8 +setUnk__11dLightEnv_cFPC7mVec3_cf = .text:0x80022E70; // type:function size:0x40 +setBPM9__11dLightEnv_cFPC7mVec3_cf = .text:0x80022EB0; // type:function size:0x5C +check_BPM9__11dLightEnv_cFPC7mVec3_c = .text:0x80022F10; // type:function size:0x8C +checkBPM9_Entity__11dLightEnv_cFP7mVec3_c = .text:0x80022FA0; // type:function size:0x34 +setAlternateRoomId__11dLightEnv_cFl = .text:0x80022FE0; // type:function size:0x8 +getAlterateRoomId__11dLightEnv_cFv = .text:0x80022FF0; // type:function size:0x8 +color_ratio_set__11dLightEnv_cFRC6mColorRC6mColorf = .text:0x80023000; // type:function size:0x144 +__ct__6mColorFv = .text:0x80023150; // type:function size:0xC scope:weak +vec_ratio_set__11dLightEnv_cFRC7mVec3_cRC7mVec3_cf = .text:0x80023160; // type:function size:0x4C +f32_ratio_set__11dLightEnv_cFfff = .text:0x800231B0; // type:function size:0x10 +u16_ratio_set__11dLightEnv_cFUsUsf = .text:0x800231C0; // type:function size:0x5C +u8_ratio_set__11dLightEnv_cFUcUcf = .text:0x80023220; // type:function size:0x60 +spf_ratio_set__11dLightEnv_cFR3SpfRC3SpfRC3Spff = .text:0x80023280; // type:function size:0xD24 +__as__6mColorFRC6mColor = .text:0x80023FB0; // type:function size:0x24 scope:weak +__as__14UnalignedColorFRC6mColor = .text:0x80023FE0; // type:function size:0x24 scope:weak +__ct__3SpfFv = .text:0x80024010; // type:function size:0x114 scope:weak +__ct__6SffSubFv = .text:0x80024130; // type:function size:0xC scope:weak +__dt__6SffSubFv = .text:0x80024140; // type:function size:0x40 scope:weak +__dt__3SpfFv = .text:0x80024180; // type:function size:0xBC scope:weak +set_palette_transition__11dLightEnv_cFssl = .text:0x80024240; // type:function size:0xF8 +set_override_spf__11dLightEnv_cFssf = .text:0x80024340; // type:function size:0x10 +setMist__11dLightEnv_cFUcUcUcff = .text:0x80024350; // type:function size:0x18 +setMistMode3__11dLightEnv_cFRC7mVec3_cf = .text:0x80024370; // type:function size:0x58 +setDOF__11dLightEnv_cFf = .text:0x800243D0; // type:function size:0x10 +disableDOF__11dLightEnv_cFv = .text:0x800243E0; // type:function size:0xC +light_influence_ratio_set__11dLightEnv_cFR15LIGHT_INFLUENCERC15LIGHT_INFLUENCERC15LIGHT_INFLUENCEf = .text:0x800243F0; // type:function size:0x178 +__ct__6mColorFiiii = .text:0x80024570; // type:function size:0x14 scope:weak +sff_ratio_set__11dLightEnv_cFR3SffRC3SffRC3Sfff = .text:0x80024590; // type:function size:0xE4 +__ct__3SffFv = .text:0x80024680; // type:function size:0x48 scope:weak +__dt__3SffFv = .text:0x800246D0; // type:function size:0x64 scope:weak +fn_80024740__11dLightEnv_cFUcUc = .text:0x80024740; // type:function size:0x24 +fn_80024770__11dLightEnv_cFUc = .text:0x80024770; // type:function size:0x24 +fn_800247A0__11dLightEnv_cFUc = .text:0x800247A0; // type:function size:0x30 +setWind__11dLightEnv_cF7mVec3_cf = .text:0x800247D0; // type:function size:0x20 +__ct__11dLightEnv_cFv = .text:0x800247F0; // type:function size:0xBB0 +__ct__7mVec3_cFfff = .text:0x800253A0; // type:function size:0x10 scope:weak +__ct__12EFLIGHT_PROCFv = .text:0x800253B0; // type:function size:0xC scope:weak +__ct__14WIND_INFLUENCEFv = .text:0x800253C0; // type:function size:0x4 scope:weak +__ct__16SHADOW_INFLUENCEFv = .text:0x800253D0; // type:function size:0x4 scope:weak +__dt__16SHADOW_INFLUENCEFv = .text:0x800253E0; // type:function size:0x40 scope:weak +__ct__4Bpm8Fv = .text:0x80025420; // type:function size:0x4 scope:weak +__dt__4Bpm8Fv = .text:0x80025430; // type:function size:0x40 scope:weak +__ct__4Bpm9Fv = .text:0x80025470; // type:function size:0x4 scope:weak +__dt__4Bpm9Fv = .text:0x80025480; // type:function size:0x40 scope:weak +__ct__4Bpm3Fv = .text:0x800254C0; // type:function size:0x48 scope:weak +__ct__15PaletteEAF_smolFv = .text:0x80025510; // type:function size:0x48 scope:weak +__ct__21PaletteEAF_smol_entryFv = .text:0x80025560; // type:function size:0x18 scope:weak +__dt__21PaletteEAF_smol_entryFv = .text:0x80025580; // type:function size:0x40 scope:weak +__dt__15PaletteEAF_smolFv = .text:0x800255C0; // type:function size:0x64 scope:weak +__ct__4Bpm4Fv = .text:0x80025630; // type:function size:0x48 scope:weak +__ct__14PaletteEAF_bigFv = .text:0x80025680; // type:function size:0x48 scope:weak +__ct__20PaletteEAF_big_entryFv = .text:0x800256D0; // type:function size:0x18 scope:weak +__dt__20PaletteEAF_big_entryFv = .text:0x800256F0; // type:function size:0x40 scope:weak +__dt__14PaletteEAF_bigFv = .text:0x80025730; // type:function size:0x64 scope:weak +__ct__17PaletteDefaultMCFFv = .text:0x800257A0; // type:function size:0x28 scope:weak +__ct__20TwoPaletteDefaultMCFFv = .text:0x800257D0; // type:function size:0x48 scope:weak +__as__3SpfFRC3Spf = .text:0x80025820; // type:function size:0x8C4 scope:weak +__as__3SffFRC3Sff = .text:0x800260F0; // type:function size:0xB4 scope:weak +__as__17PaletteDefaultMCFFRC17PaletteDefaultMCF = .text:0x800261B0; // type:function size:0x154 scope:weak +__dt__11dLightEnv_cFv = .text:0x80026310; // type:function size:0x1EC +fn_80026500__13ActorLightingFv = .text:0x80026500; // type:function size:0x38 +__dt__13ActorLightingFv = .text:0x80026540; // type:function size:0x40 +reset__13ActorLightingFv = .text:0x80026580; // type:function size:0x188 +getLightTev2Color__13ActorLightingFv = .text:0x80026710; // type:function size:0x4C +getLightTev1Color__13ActorLightingFv = .text:0x80026760; // type:function size:0x4C +getLightTev0Color__13ActorLightingFv = .text:0x800267B0; // type:function size:0x4C +getLightTevKColor__13ActorLightingFv = .text:0x80026800; // type:function size:0x4C +__sinit_\d_light_env_cpp = .text:0x80026850; // type:function size:0x5C scope:local __dt__18dEmitterCallback_cFv = .text:0x800268B0; // type:function size:0xB4 remove__18dEmitterCallback_cFP14dEmitterBase_c = .text:0x80026970; // type:function size:0x88 __dt__19dParticleCallback_cFv = .text:0x80026A00; // type:function size:0xB4 @@ -1022,7 +1022,7 @@ fn_8002C010 = .text:0x8002C010; // type:function size:0x58 fn_8002C070 = .text:0x8002C070; // type:function size:0x58 fn_8002C0D0 = .text:0x8002C0D0; // type:function size:0x58 fn_8002C130 = .text:0x8002C130; // type:function size:0x24 -fn_8002C160 = .text:0x8002C160; // type:function size:0x40 +__dt__16dSoundSourceIf_cFv = .text:0x8002C160; // type:function size:0x40 fn_8002C1A0 = .text:0x8002C1A0; // type:function size:0xB0 fn_8002C250 = .text:0x8002C250; // type:function size:0xB8 fn_8002C310 = .text:0x8002C310; // type:function size:0x90 @@ -1030,8 +1030,8 @@ createHeap__9dAcBase_cFv = .text:0x8002C3A0; // type:function size:0x8 __ct__9dAcBase_cFv = .text:0x8002C3B0; // type:function size:0x178 __dt__7dBase_cFv = .text:0x8002C530; // type:function size:0x58 __dt__9dAcBase_cFv = .text:0x8002C590; // type:function size:0xB4 -setTempCreateParams__9dAcBase_cFP7mVec3_cP7mAng3_cP7mVec3_clUlP9dAcBase_cUcUsScP7ObjInfo = .text:0x8002C650; // type:function size:0x34 -FUN_8002c690__9dAcBase_cFv = .text:0x8002C690; // type:function size:0x78 +setTempCreateParams__9dAcBase_cFP7mVec3_cP7mAng3_cP7mVec3_clUlP9dAcBase_cUcUsScPC9ActorInfo = .text:0x8002C650; // type:function size:0x34 +createSoundSource__9dAcBase_cFv = .text:0x8002C690; // type:function size:0x78 initAllocatorWork1Heap__9dAcBase_cFiPci = .text:0x8002C710; // type:function size:0xC initAllocator__9dAcBase_cFiPcPQ23EGG4Heapi = .text:0x8002C720; // type:function size:0x8C addActorToRoom__9dAcBase_cFl = .text:0x8002C7B0; // type:function size:0x88 @@ -3039,13 +3039,13 @@ set__16LayoutArcControlFPCPCcl = .text:0x8006A350; // type:function size:0xC load__16LayoutArcControlFPQ23EGG4Heap = .text:0x8006A360; // type:function size:0x88 fn_8006A3F0 = .text:0x8006A3F0; // type:function size:0x88 release__16LayoutArcControlFv = .text:0x8006A480; // type:function size:0xC4 -getObjByActorName_unkNamespace = .text:0x8006A550; // type:function size:0x98 -getActorIdForObjName = .text:0x8006A5F0; // type:function size:0x34 -getActorIdForObjName2 = .text:0x8006A630; // type:function size:0x34 -fn_8006A670 = .text:0x8006A670; // type:function size:0xB8 -getObjectName_8006a730 = .text:0x8006A730; // type:function size:0x18 -getObjByActorIdAndSubtype_unkNamespace = .text:0x8006A750; // type:function size:0x134 -fn_8006A890 = .text:0x8006A890; // type:function size:0x38 +getActorInfoByName__FPCc = .text:0x8006A550; // type:function size:0x98 +getProfileIdForName__FPCc = .text:0x8006A5F0; // type:function size:0x34 +getProfileId2ForName__FPCc = .text:0x8006A630; // type:function size:0x34 +getNameForProfileId__FUl = .text:0x8006A670; // type:function size:0xB8 +getActorName__FPC9ActorInfo = .text:0x8006A730; // type:function size:0x18 +getActorInfoByProfileAndSubtype__FUlUl = .text:0x8006A750; // type:function size:0x134 +getSoundSourceTypeForName__FPCc = .text:0x8006A890; // type:function size:0x38 fn_8006A8D0 = .text:0x8006A8D0; // type:function size:0x1DC fn_8006AAB0 = .text:0x8006AAB0; // type:function size:0x85C fn_8006B310 = .text:0x8006B310; // type:function size:0x94 @@ -10748,7 +10748,7 @@ fn_8019EA70 = .text:0x8019EA70; // type:function size:0x11C fn_8019EB90 = .text:0x8019EB90; // type:function size:0xC fn_8019EBA0 = .text:0x8019EBA0; // type:function size:0x160 fn_8019ED00 = .text:0x8019ED00; // type:function size:0xC -getLightObject = .text:0x8019ED10; // type:function size:0x8 +GetInstance__11dObjLight_cFv = .text:0x8019ED10; // type:function size:0x8 ObjLight__ctor = .text:0x8019ED20; // type:function size:0x30 spawnLightObject = .text:0x8019ED50; // type:function size:0x40 fn_8019ED90 = .text:0x8019ED90; // type:function size:0x884 @@ -10763,10 +10763,10 @@ ObjLight__init = .text:0x801A1F20; // type:function size:0x34 fn_801A1F60 = .text:0x801A1F60; // type:function size:0x138 ObjLight__baseUpdate = .text:0x801A20A0; // type:function size:0x4180 fn_801A6220 = .text:0x801A6220; // type:function size:0x8 -fn_801A6230 = .text:0x801A6230; // type:function size:0x8 -fn_801A6240 = .text:0x801A6240; // type:function size:0x8 -fn_801A6250 = .text:0x801A6250; // type:function size:0x8 -fn_801A6260 = .text:0x801A6260; // type:function size:0x8 +GetColor0x68__11dObjLight_cFv = .text:0x801A6230; // type:function size:0x8 +GetColor0x6C__11dObjLight_cFv = .text:0x801A6240; // type:function size:0x8 +GetColor0x100__11dObjLight_cFv = .text:0x801A6250; // type:function size:0x8 +GetColor0x104__11dObjLight_cFv = .text:0x801A6260; // type:function size:0x8 fn_801A6270 = .text:0x801A6270; // type:function size:0x44 fn_801A62C0 = .text:0x801A62C0; // type:function size:0x58 fn_801A6320 = .text:0x801A6320; // type:function size:0x80 @@ -19806,11 +19806,11 @@ fn_80359BC0 = .text:0x80359BC0; // type:function size:0x84 fn_80359C50 = .text:0x80359C50; // type:function size:0x1C fn_80359C70 = .text:0x80359C70; // type:function size:0x8 fn_80359C80 = .text:0x80359C80; // type:function size:0xA0 -SndAudioMgr____ct = .text:0x80359D20; // type:function size:0x9C -SndAudioMgr__initialize = .text:0x80359DC0; // type:function size:0xEC -fn_80359EB0 = .text:0x80359EB0; // type:function size:0x10 -SndAudioMgr__calc = .text:0x80359EC0; // type:function size:0xB8 -fn_80359F80 = .text:0x80359F80; // type:function size:0x2C +__ct__9dSndMgr_cFv = .text:0x80359D20; // type:function size:0x9C +initialize__9dSndMgr_cFPQ23EGG4HeapUl = .text:0x80359DC0; // type:function size:0xEC +initHbm__9dSndMgr_cFUl = .text:0x80359EB0; // type:function size:0x10 +calc__9dSndMgr_cFv = .text:0x80359EC0; // type:function size:0xB8 +restoreEffectsCallback__9dSndMgr_cFv = .text:0x80359F80; // type:function size:0x2C stateProc__Q23EGG12SoundHeapMgrFv = .text:0x80359FB0; // type:function size:0xD4 loadState__Q23EGG12SoundHeapMgrFl = .text:0x8035A090; // type:function size:0x8C getCurrentLevel__Q23EGG12SoundHeapMgrFv = .text:0x8035A120; // type:function size:0x54 @@ -19824,8 +19824,8 @@ startSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUl = .text:0x8035A360; // startSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUi = .text:0x8035A3A0; // type:function size:0x34 startSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandlePCc = .text:0x8035A3E0; // type:function size:0x70 setupMemoryArchive__Q23EGG9ArcPlayerFPCvPQ34nw4r3snd9SoundHeapl = .text:0x8035A450; // type:function size:0x10 -fn_8035A460 = .text:0x8035A460; // type:function size:0x58 -fn_8035A4C0 = .text:0x8035A4C0; // type:function size:0x8 +__dt__9dSndMgr_cFv = .text:0x8035A460; // type:function size:0x58 +@248@calc__9dSndMgr_cFv = .text:0x8035A4C0; // type:function size:0x8 @248@loadGroup__Q23EGG14SimpleAudioMgrFUiPQ34nw4r3snd9SoundHeapUl = .text:0x8035A4D0; // type:function size:0x8 @248@loadGroup__Q23EGG14SimpleAudioMgrFiPQ34nw4r3snd9SoundHeapUl = .text:0x8035A4E0; // type:function size:0x8 @248@loadGroup__Q23EGG14SimpleAudioMgrFUlPQ34nw4r3snd9SoundHeapUl = .text:0x8035A4F0; // type:function size:0x8 @@ -19834,97 +19834,97 @@ fn_8035A4C0 = .text:0x8035A4C0; // type:function size:0x8 @248@setupMemoryArchive__Q23EGG14SimpleAudioMgrFPCvPQ34nw4r3snd9SoundHeap = .text:0x8035A520; // type:function size:0x8 @248@openNandArchive__Q23EGG14SimpleAudioMgrFPCcPQ34nw4r3snd9SoundHeap = .text:0x8035A530; // type:function size:0x8 @248@openDvdArchive__Q23EGG14SimpleAudioMgrFPCcPQ34nw4r3snd9SoundHeap = .text:0x8035A540; // type:function size:0x8 -fn_8035A550 = .text:0x8035A550; // type:function size:0x8 -fn_8035A560 = .text:0x8035A560; // type:function size:0x3C -fn_8035A5A0 = .text:0x8035A5A0; // type:function size:0x54 -fn_8035A600 = .text:0x8035A600; // type:function size:0x240 -fn_8035A840 = .text:0x8035A840; // type:function size:0x58 -fn_8035A8A0 = .text:0x8035A8A0; // type:function size:0xE8 -fn_8035A990 = .text:0x8035A990; // type:function size:0x40 -fn_8035A9D0 = .text:0x8035A9D0; // type:function size:0x2C +@248@__dt__9dSndMgr_cFv = .text:0x8035A550; // type:function size:0x8 +__ct__11dSndActor_cFRQ34nw4r3snd18SoundArchivePlayer = .text:0x8035A560; // type:function size:0x3C +__dt__Q34nw4r3snd11SoundHandleFv = .text:0x8035A5A0; // type:function size:0x54 scope:weak +__cl__22SoundPropertiesCheckerFRQ34nw4r3snd11SoundHandle = .text:0x8035A600; // type:function size:0x240 +__dt__11dSndActor_cFv = .text:0x8035A840; // type:function size:0x58 scope:weak +__ct__13dSnd3DActor_cFP15dSndSourceParamUc = .text:0x8035A8A0; // type:function size:0xE8 +d_vt_0x34__13dSnd3DActor_cFRCQ34nw4r4math4VEC3 = .text:0x8035A990; // type:function size:0x40 +resetCachedRelativePositions__13dSnd3DActor_cFv = .text:0x8035A9D0; // type:function size:0x2C fn_8035AA00 = .text:0x8035AA00; // type:function size:0x30 -fn_8035AA30 = .text:0x8035AA30; // type:function size:0x44 -fn_8035AA80 = .text:0x8035AA80; // type:function size:0x28 -fn_8035AAB0 = .text:0x8035AAB0; // type:function size:0x50 -fn_8035AB00 = .text:0x8035AB00; // type:function size:0x54 -fn_8035AB60 = .text:0x8035AB60; // type:function size:0x78 -fn_8035ABE0 = .text:0x8035ABE0; // type:function size:0x44 -fn_8035AC30 = .text:0x8035AC30; // type:function size:0x28 -fn_8035AC60 = .text:0x8035AC60; // type:function size:0x50 -fn_8035ACB0 = .text:0x8035ACB0; // type:function size:0xBC -fn_8035AD70 = .text:0x8035AD70; // type:function size:0x3C -fn_8035ADB0 = .text:0x8035ADB0; // type:function size:0xFC -fn_8035AEB0 = .text:0x8035AEB0; // type:function size:0x3C +updatePositionRelativeToListener__13dSnd3DActor_cFv = .text:0x8035AA30; // type:function size:0x44 +calculatePositionRelativeToListener__13dSnd3DActor_cFv = .text:0x8035AA80; // type:function size:0x28 +updateDistanceToListener__13dSnd3DActor_cFv = .text:0x8035AAB0; // type:function size:0x50 +updatePositionTransformedByListener__13dSnd3DActor_cFv = .text:0x8035AB00; // type:function size:0x54 +updateCameraDirectionDot__13dSnd3DActor_cFv = .text:0x8035AB60; // type:function size:0x78 +updatePositionRelativeToCameraTarget__13dSnd3DActor_cFv = .text:0x8035ABE0; // type:function size:0x44 +calculatePositionRelativeToCameraTarget__13dSnd3DActor_cFv = .text:0x8035AC30; // type:function size:0x28 +updateDistanceToCameraTarget__13dSnd3DActor_cFv = .text:0x8035AC60; // type:function size:0x50 +updatePositionRelativeToPlayer__13dSnd3DActor_cFv = .text:0x8035ACB0; // type:function size:0xBC +getPositionRelativeToPlayer__13dSnd3DActor_cFv = .text:0x8035AD70; // type:function size:0x3C +updateDistanceToPlayer__13dSnd3DActor_cFv = .text:0x8035ADB0; // type:function size:0xFC +getDistanceToPlayer__13dSnd3DActor_cFv = .text:0x8035AEB0; // type:function size:0x3C fn_8035AEF0 = .text:0x8035AEF0; // type:function size:0xE0 fn_8035AFD0 = .text:0x8035AFD0; // type:function size:0x124 fn_8035B100 = .text:0x8035B100; // type:function size:0xB4 fn_8035B1C0 = .text:0x8035B1C0; // type:function size:0x330 fn_8035B4F0 = .text:0x8035B4F0; // type:function size:0x144 fn_8035B640 = .text:0x8035B640; // type:function size:0x1FC -fn_8035B840 = .text:0x8035B840; // type:function size:0x60 -fn_8035B8A0 = .text:0x8035B8A0; // type:function size:0xCC -fn_8035B970 = .text:0x8035B970; // type:function size:0x34 +hasPlayingSounds__13dSnd3DActor_cCFv = .text:0x8035B840; // type:function size:0x60 +isPlayingSound__13dSnd3DActor_cFUl = .text:0x8035B8A0; // type:function size:0xCC +__cl__23IsCurrentSoundIdCheckerFRQ34nw4r3snd11SoundHandle = .text:0x8035B970; // type:function size:0x34 fn_8035B9B0 = .text:0x8035B9B0; // type:function size:0x74 fn_8035BA30 = .text:0x8035BA30; // type:function size:0x20 -fn_8035BA50 = .text:0x8035BA50; // type:function size:0x8 -fn_8035BA60 = .text:0x8035BA60; // type:function size:0x58 -fn_8035BAC0 = .text:0x8035BAC0; // type:function size:0x58 -fn_8035BB20 = .text:0x8035BB20; // type:function size:0x8 -fn_8035BB30 = .text:0x8035BB30; // type:function size:0x8 -fn_8035BB40 = .text:0x8035BB40; // type:function size:0x8 -fn_8035BB50 = .text:0x8035BB50; // type:function size:0x8 -fn_8035BB60 = .text:0x8035BB60; // type:function size:0x8 -fn_8035BB70 = .text:0x8035BB70; // type:function size:0x8 -fn_8035BB80 = .text:0x8035BB80; // type:function size:0x3C -fn_8035BBC0 = .text:0x8035BBC0; // type:function size:0x40 -fn_8035BC00 = .text:0x8035BC00; // type:function size:0x428 -fn_8035C030 = .text:0x8035C030; // type:function size:0x188 +soundLabelToSoundId__13dSnd3DActor_cCFPCc = .text:0x8035BA50; // type:function size:0x8 +soundIdToSoundLabel__13dSnd3DActor_cCFUl = .text:0x8035BA60; // type:function size:0x58 +__dt__13dSnd3DActor_cFv = .text:0x8035BAC0; // type:function size:0x58 +d_vt_0x44__13dSnd3DActor_cFv = .text:0x8035BB20; // type:function size:0x8 +d_vt_0x40__13dSnd3DActor_cFv = .text:0x8035BB30; // type:function size:0x8 +d_vt_0x3C__13dSnd3DActor_cFv = .text:0x8035BB40; // type:function size:0x8 +d_vt_0x30__13dSnd3DActor_cFv = .text:0x8035BB50; // type:function size:0x8 +@84@at_0x0c__Q34nw4r3snd12Sound3DActorFPvPQ44nw4r3snd6detail10BasicSound = .text:0x8035BB60; // type:function size:0x8 +@84@__dt__13dSnd3DActor_cFv = .text:0x8035BB70; // type:function size:0x8 +__ct__14dSnd3DEngine_cFv = .text:0x8035BB80; // type:function size:0x3C +__dt__Q34nw4r3snd13Sound3DEngineFv = .text:0x8035BBC0; // type:function size:0x40 +UpdateAmbientParam__14dSnd3DEngine_cFPCQ34nw4r3snd14Sound3DManagerPCQ34nw4r3snd12Sound3DParamUlUlPQ34nw4r3snd17SoundAmbientParam = .text:0x8035BC00; // type:function size:0x428 +CalcPitch__FPCQ34nw4r4math4VEC3fRCQ34nw4r3snd14Sound3DManagerRCQ34nw4r3snd15Sound3DListenerRCQ34nw4r3snd12Sound3DParamPf = .text:0x8035C030; // type:function size:0x188 fn_8035C1C0 = .text:0x8035C1C0; // type:function size:0xDC fn_8035C2A0 = .text:0x8035C2A0; // type:function size:0x110 -fn_8035C3B0 = .text:0x8035C3B0; // type:function size:0x40 -fn_8035C3F0 = .text:0x8035C3F0; // type:function size:0x2F8 -fn_8035C6F0 = .text:0x8035C6F0; // type:function size:0x44 -fn_8035C740 = .text:0x8035C740; // type:function size:0x44 -fn_8035C790 = .text:0x8035C790; // type:function size:0x40 -fn_8035C7D0 = .text:0x8035C7D0; // type:function size:0x40 -fn_8035C810 = .text:0x8035C810; // type:function size:0xA0 -fn_8035C8B0 = .text:0x8035C8B0; // type:function size:0x84 -fn_8035C940 = .text:0x8035C940; // type:function size:0xE8 -fn_8035CA30 = .text:0x8035CA30; // type:function size:0xD8 -fn_8035CB10 = .text:0x8035CB10; // type:function size:0x6C -fn_8035CB80 = .text:0x8035CB80; // type:function size:0xD4 -fn_8035CC60 = .text:0x8035CC60; // type:function size:0xCC -fn_8035CD30 = .text:0x8035CD30; // type:function size:0x58 -fn_8035CD90 = .text:0x8035CD90; // type:function size:0x58 -fn_8035CDF0 = .text:0x8035CDF0; // type:function size:0x58 -fn_8035CE50 = .text:0x8035CE50; // type:function size:0x28 -fn_8035CE80 = .text:0x8035CE80; // type:function size:0x28 -fn_8035CEB0 = .text:0x8035CEB0; // type:function size:0x84 -fn_8035CF40 = .text:0x8035CF40; // type:function size:0x78 -fn_8035CFC0 = .text:0x8035CFC0; // type:function size:0x90 -fn_8035D050 = .text:0x8035D050; // type:function size:0x1C -fn_8035D070 = .text:0x8035D070; // type:function size:0x1C -fn_8035D090 = .text:0x8035D090; // type:function size:0x1C -fn_8035D0B0 = .text:0x8035D0B0; // type:function size:0xE8 -fn_8035D1A0 = .text:0x8035D1A0; // type:function size:0x114 -fn_8035D2C0 = .text:0x8035D2C0; // type:function size:0xC0 -fn_8035D380 = .text:0x8035D380; // type:function size:0xA0 -fn_8035D420 = .text:0x8035D420; // type:function size:0xA0 -fn_8035D4C0 = .text:0x8035D4C0; // type:function size:0xB8 -fn_8035D580 = .text:0x8035D580; // type:function size:0xB8 -fn_8035D640 = .text:0x8035D640; // type:function size:0x24 -fn_8035D670 = .text:0x8035D670; // type:function size:0x60 -fn_8035D6D0 = .text:0x8035D6D0; // type:function size:0x78 -fn_8035D750 = .text:0x8035D750; // type:function size:0x1E8 -fn_8035D940 = .text:0x8035D940; // type:function size:0x58 -fn_8035D9A0 = .text:0x8035D9A0; // type:function size:0x68 -fn_8035DA10 = .text:0x8035DA10; // type:function size:0x4C -fn_8035DA60 = .text:0x8035DA60; // type:function size:0x28 -getSoundArchivePath = .text:0x8035DA90; // type:function size:0xC -BgmManager__dtor = .text:0x8035DAA0; // type:function size:0x78 -initBgmMgr = .text:0x8035DB20; // type:function size:0x48 -BgmMgr__deref = .text:0x8035DB70; // type:function size:0x10 -BgmManager__ctor = .text:0x8035DB80; // type:function size:0x78 +__dt__14dSnd3DEngine_cFv = .text:0x8035C3B0; // type:function size:0x40 +__ct__11dSndSound_cFv = .text:0x8035C3F0; // type:function size:0x2F8 +__ct__32dSndControlSoundSeqTrackVolume_cFv = .text:0x8035C6F0; // type:function size:0x44 scope:weak +__ct__33dSndControlSoundStrmTrackVolume_cFv = .text:0x8035C740; // type:function size:0x44 scope:weak +__dt__32dSndControlSoundSeqTrackVolume_cFv = .text:0x8035C790; // type:function size:0x40 scope:weak +__dt__33dSndControlSoundStrmTrackVolume_cFv = .text:0x8035C7D0; // type:function size:0x40 scope:weak +__dt__11dSndSound_cFv = .text:0x8035C810; // type:function size:0xA0 +cancel__11dSndSound_cFv = .text:0x8035C8B0; // type:function size:0x84 +resetControls__11dSndSound_cFv = .text:0x8035C940; // type:function size:0xE8 +calc__11dSndSound_cFv = .text:0x8035CA30; // type:function size:0xD8 +fadeIn__11dSndSound_cFUll = .text:0x8035CB10; // type:function size:0x6C +stop__11dSndSound_cFl = .text:0x8035CB80; // type:function size:0xD4 +pause__11dSndSound_cFbl = .text:0x8035CC60; // type:function size:0xCC +isStrmSound__11dSndSound_cFv = .text:0x8035CD30; // type:function size:0x58 +isWaveSound__11dSndSound_cFv = .text:0x8035CD90; // type:function size:0x58 +isSeqSound__11dSndSound_cFv = .text:0x8035CDF0; // type:function size:0x58 +linkCtrl__11dSndSound_cFP18dSndControlSound_c = .text:0x8035CE50; // type:function size:0x28 +unlinkCtrl__11dSndSound_cFP18dSndControlSound_c = .text:0x8035CE80; // type:function size:0x28 +readSeqTrackVariable__11dSndSound_cFi = .text:0x8035CEB0; // type:function size:0x84 +writeSeqTrackVariable__11dSndSound_cFis = .text:0x8035CF40; // type:function size:0x78 +setControlValue__11dSndSound_cFP18dSndControlSound_cfl = .text:0x8035CFC0; // type:function size:0x90 +setVolume__11dSndSound_cFfl = .text:0x8035D050; // type:function size:0x1C +setPitchRelated__11dSndSound_cFfl = .text:0x8035D070; // type:function size:0x1C +setLinearPitch__11dSndSound_cFfl = .text:0x8035D090; // type:function size:0x1C +resetTrackVolumes__11dSndSound_cFv = .text:0x8035D0B0; // type:function size:0xE8 +setTrackVolume__11dSndSound_cFUlfl = .text:0x8035D1A0; // type:function size:0x114 +setStrmTrackVolume__11dSndSound_cFUlfl = .text:0x8035D2C0; // type:function size:0xC0 +setSingleSeqTrackVolume__11dSndSound_cFUsfl = .text:0x8035D380; // type:function size:0xA0 +setSingleStrmTrackVolume__11dSndSound_cFUsfl = .text:0x8035D420; // type:function size:0xA0 +setEachSeqTrackVolume__11dSndSound_cFUlf = .text:0x8035D4C0; // type:function size:0xB8 +setEachStrmTrackVolume__11dSndSound_cFUlf = .text:0x8035D580; // type:function size:0xB8 +getCurrentStrmTrackVolume__11dSndSound_cCFUl = .text:0x8035D640; // type:function size:0x24 +setSeqTempoRatio__11dSndSound_cFfl = .text:0x8035D670; // type:function size:0x60 +setSeqTrackMute__11dSndSound_cFUlQ34nw4r3snd7SeqMute = .text:0x8035D6D0; // type:function size:0x78 +prepareSound__11dSndSound_cFUlUl = .text:0x8035D750; // type:function size:0x1E8 +prepareSound__11dSndSound_cFPCcUl = .text:0x8035D940; // type:function size:0x58 +onPreparing__11dSndSound_cFUlUl = .text:0x8035D9A0; // type:function size:0x68 +forceStop__11dSndSound_cFv = .text:0x8035DA10; // type:function size:0x4C +configure__13dSndControl_cFfff = .text:0x8035DA60; // type:function size:0x28 +getSoundArchivePath__15dSndPlayerMgr_cFv = .text:0x8035DA90; // type:function size:0xC +__dt__33SndMgrDisposer<15dSndPlayerMgr_c>Fv = .text:0x8035DAA0; // type:function size:0x78 +create__33SndMgrDisposer<15dSndPlayerMgr_c>Fv = .text:0x8035DB20; // type:function size:0x48 +remove__33SndMgrDisposer<15dSndPlayerMgr_c>Fv = .text:0x8035DB70; // type:function size:0x10 +__ct__15dSndPlayerMgr_cFv = .text:0x8035DB80; // type:function size:0x78 fn_8035DC00 = .text:0x8035DC00; // type:function size:0x44 fn_8035DC50 = .text:0x8035DC50; // type:function size:0x8C fn_8035DCE0 = .text:0x8035DCE0; // type:function size:0x38 @@ -19936,7 +19936,7 @@ fn_8035DE60 = .text:0x8035DE60; // type:function size:0x38 fn_8035DEA0 = .text:0x8035DEA0; // type:function size:0x50 fn_8035DEF0 = .text:0x8035DEF0; // type:function size:0x38 fn_8035DF30 = .text:0x8035DF30; // type:function size:0x24 -fn_8035DF60 = .text:0x8035DF60; // type:function size:0x54 +getFreeSize__15dSndPlayerMgr_cFv = .text:0x8035DF60; // type:function size:0x54 fn_8035DFC0 = .text:0x8035DFC0; // type:function size:0x3C fn_8035E000 = .text:0x8035E000; // type:function size:0xD4 fn_8035E0E0 = .text:0x8035E0E0; // type:function size:0xCC @@ -19945,13 +19945,13 @@ fn_8035E220 = .text:0x8035E220; // type:function size:0x2C fn_8035E250 = .text:0x8035E250; // type:function size:0x8C fn_8035E2E0 = .text:0x8035E2E0; // type:function size:0x2C fn_8035E310 = .text:0x8035E310; // type:function size:0x50 -fn_8035E360 = .text:0x8035E360; // type:function size:0x70 -fn_8035E3D0 = .text:0x8035E3D0; // type:function size:0x70 -fn_8035E440 = .text:0x8035E440; // type:function size:0x2C -fn_8035E470 = .text:0x8035E470; // type:function size:0x2C -fn_8035E4A0 = .text:0x8035E4A0; // type:function size:0x44 -fn_8035E4F0 = .text:0x8035E4F0; // type:function size:0x44 -fn_8035E540 = .text:0x8035E540; // type:function size:0x18 +enterPauseState__15dSndPlayerMgr_cFv = .text:0x8035E360; // type:function size:0x70 +leavePauseState__15dSndPlayerMgr_cFv = .text:0x8035E3D0; // type:function size:0x70 +enterMenu__15dSndPlayerMgr_cFv = .text:0x8035E440; // type:function size:0x2C +leaveMenu__15dSndPlayerMgr_cFv = .text:0x8035E470; // type:function size:0x2C +enterMap__15dSndPlayerMgr_cFv = .text:0x8035E4A0; // type:function size:0x44 +leaveMap__15dSndPlayerMgr_cFv = .text:0x8035E4F0; // type:function size:0x44 +enterHelp__15dSndPlayerMgr_cFv = .text:0x8035E540; // type:function size:0x18 fn_8035E560 = .text:0x8035E560; // type:function size:0x18 fn_8035E580 = .text:0x8035E580; // type:function size:0x50 fn_8035E5D0 = .text:0x8035E5D0; // type:function size:0x44 @@ -19963,8 +19963,8 @@ fn_8035E860 = .text:0x8035E860; // type:function size:0x14 fn_8035E880 = .text:0x8035E880; // type:function size:0x14 fn_8035E8A0 = .text:0x8035E8A0; // type:function size:0xC fn_8035E8B0 = .text:0x8035E8B0; // type:function size:0xC -fn_8035E8C0 = .text:0x8035E8C0; // type:function size:0x90 -fn_8035E950 = .text:0x8035E950; // type:function size:0x6C +startSound__15dSndPlayerMgr_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfo = .text:0x8035E8C0; // type:function size:0x90 +startSound__15dSndPlayerMgr_cFPQ34nw4r3snd11SoundHandlePCcPCQ44nw4r3snd14SoundStartable9StartInfo = .text:0x8035E950; // type:function size:0x6C fn_8035E9C0 = .text:0x8035E9C0; // type:function size:0x80 fn_8035EA40 = .text:0x8035EA40; // type:function size:0x64 fn_8035EAB0 = .text:0x8035EAB0; // type:function size:0x28 @@ -19976,82 +19976,82 @@ fn_8035EB50 = .text:0x8035EB50; // type:function size:0x3C fn_8035EB90 = .text:0x8035EB90; // type:function size:0x80 fn_8035EC10 = .text:0x8035EC10; // type:function size:0x5C fn_8035EC70 = .text:0x8035EC70; // type:function size:0x84 -playSomeSound = .text:0x8035ED00; // type:function size:0x3C -fn_8035ED40 = .text:0x8035ED40; // type:function size:0x44 -fn_8035ED90 = .text:0x8035ED90; // type:function size:0x5C -fn_8035EDF0 = .text:0x8035EDF0; // type:function size:0x198 -fn_8035EF90 = .text:0x8035EF90; // type:function size:0x38 -fn_8035EFD0 = .text:0x8035EFD0; // type:function size:0x40 +convertLabelStringToSoundId__15dSndPlayerMgr_cCFPCc = .text:0x8035ED00; // type:function size:0x3C +getSoundArchivePlayerForType__15dSndPlayerMgr_cFUc = .text:0x8035ED40; // type:function size:0x44 +canUseThisPlayer__15dSndPlayerMgr_cCFUc = .text:0x8035ED90; // type:function size:0x5C +loadDemoArchive__15dSndPlayerMgr_cFPCc = .text:0x8035EDF0; // type:function size:0x198 +shutdown__15dSndPlayerMgr_cFv = .text:0x8035EF90; // type:function size:0x38 +calc__15dSndPlayerMgr_cFv = .text:0x8035EFD0; // type:function size:0x40 fn_8035F010 = .text:0x8035F010; // type:function size:0x20 fn_8035F030 = .text:0x8035F030; // type:function size:0x1C fn_8035F050 = .text:0x8035F050; // type:function size:0x50 -fn_8035F0A0 = .text:0x8035F0A0; // type:function size:0x78 -fn_8035F120 = .text:0x8035F120; // type:function size:0x48 -fn_8035F170 = .text:0x8035F170; // type:function size:0x10 -fn_8035F180 = .text:0x8035F180; // type:function size:0x114 -fn_8035F2A0 = .text:0x8035F2A0; // type:function size:0x40 -fn_8035F2E0 = .text:0x8035F2E0; // type:function size:0x40 -fn_8035F320 = .text:0x8035F320; // type:function size:0x3C -fn_8035F360 = .text:0x8035F360; // type:function size:0x40 -fn_8035F3A0 = .text:0x8035F3A0; // type:function size:0x40 -fn_8035F3E0 = .text:0x8035F3E0; // type:function size:0x40 +__dt__40SndMgrDisposer<22dSndControlPlayerMgr_c>Fv = .text:0x8035F0A0; // type:function size:0x78 +create__40SndMgrDisposer<22dSndControlPlayerMgr_c>Fv = .text:0x8035F120; // type:function size:0x48 +remove__40SndMgrDisposer<22dSndControlPlayerMgr_c>Fv = .text:0x8035F170; // type:function size:0x10 +__ct__22dSndControlPlayerMgr_cFv = .text:0x8035F180; // type:function size:0x114 +__ct__26dSndControlPlayerLpfFreq_cFv = .text:0x8035F2A0; // type:function size:0x40 +__ct__25dSndControlPlayerFxSend_cFv = .text:0x8035F2E0; // type:function size:0x40 +__ct__25dSndControlPlayerVolume_cFv = .text:0x8035F320; // type:function size:0x3C +__dt__25dSndControlPlayerVolume_cFv = .text:0x8035F360; // type:function size:0x40 +__dt__26dSndControlPlayerLpfFreq_cFv = .text:0x8035F3A0; // type:function size:0x40 +__dt__25dSndControlPlayerFxSend_cFv = .text:0x8035F3E0; // type:function size:0x40 fn_8035F420 = .text:0x8035F420; // type:function size:0xC8 fn_8035F4F0 = .text:0x8035F4F0; // type:function size:0x118 fn_8035F610 = .text:0x8035F610; // type:function size:0x158 fn_8035F770 = .text:0x8035F770; // type:function size:0xDC -fn_8035F850 = .text:0x8035F850; // type:function size:0x3C -fn_8035F890 = .text:0x8035F890; // type:function size:0xAC -fn_8035F940 = .text:0x8035F940; // type:function size:0x168 -fn_8035FAB0 = .text:0x8035FAB0; // type:function size:0x318 -fn_8035FDD0 = .text:0x8035FDD0; // type:function size:0xE0 -fn_8035FEB0 = .text:0x8035FEB0; // type:function size:0x11C -fn_8035FFD0 = .text:0x8035FFD0; // type:function size:0xE0 -fn_803600B0 = .text:0x803600B0; // type:function size:0x70 -fn_80360120 = .text:0x80360120; // type:function size:0x34 +calc__22dSndControlPlayerMgr_cFv = .text:0x8035F850; // type:function size:0x3C +executeControls__22dSndControlPlayerMgr_cFv = .text:0x8035F890; // type:function size:0xAC +calcVolumes__22dSndControlPlayerMgr_cFv = .text:0x8035F940; // type:function size:0x168 +calcMuteFlags__22dSndControlPlayerMgr_cFv = .text:0x8035FAB0; // type:function size:0x318 +__cl__21EventMuteFlagsApplierFRQ34nw4r3snd11SoundHandle = .text:0x8035FDD0; // type:function size:0xE0 +__cl__21SmallMuteFlagsApplierFRQ34nw4r3snd11SoundHandle = .text:0x8035FEB0; // type:function size:0x11C +__cl__23FanfareMuteFlagsApplierFRQ34nw4r3snd11SoundHandle = .text:0x8035FFD0; // type:function size:0xE0 +getPlayer1__22dSndControlPlayerMgr_cCFUl = .text:0x803600B0; // type:function size:0x70 +getPlayer2__22dSndControlPlayerMgr_cCFUl = .text:0x80360120; // type:function size:0x34 fn_80360160 = .text:0x80360160; // type:function size:0xBC -fn_80360220 = .text:0x80360220; // type:function size:0x28 -fn_80360250 = .text:0x80360250; // type:function size:0x28 -fn_80360280 = .text:0x80360280; // type:function size:0x94 +linkCtrl__22dSndControlPlayerMgr_cFP19dSndControlPlayer_c = .text:0x80360220; // type:function size:0x28 +unlinkCtrl__22dSndControlPlayerMgr_cFP19dSndControlPlayer_c = .text:0x80360250; // type:function size:0x28 +setVolume__22dSndControlPlayerMgr_cFUlfl = .text:0x80360280; // type:function size:0x94 fn_80360320 = .text:0x80360320; // type:function size:0xC8 -fn_803603F0 = .text:0x803603F0; // type:function size:0xB0 -fn_803604A0 = .text:0x803604A0; // type:function size:0x48 -fn_803604F0 = .text:0x803604F0; // type:function size:0x20 -fn_80360510 = .text:0x80360510; // type:function size:0x20 -fn_80360530 = .text:0x80360530; // type:function size:0x38 -fn_80360570 = .text:0x80360570; // type:function size:0xB0 -fn_80360620 = .text:0x80360620; // type:function size:0xAC -fn_803606D0 = .text:0x803606D0; // type:function size:0x40 +overrideVolume__22dSndControlPlayerMgr_cFUlfl = .text:0x803603F0; // type:function size:0xB0 +restoreVolume__22dSndControlPlayerMgr_cFUll = .text:0x803604A0; // type:function size:0x48 +setLpfFreq__22dSndControlPlayerMgr_cFUlfl = .text:0x803604F0; // type:function size:0x20 +setFxSend__22dSndControlPlayerMgr_cFUlfl = .text:0x80360510; // type:function size:0x20 +getAppliedPlayerVolume__22dSndControlPlayerMgr_cCFUl = .text:0x80360530; // type:function size:0x38 +setControlValue__22dSndControlPlayerMgr_cFQ222dSndControlPlayerMgr_c12PlayerCtrl_eUlfl = .text:0x80360570; // type:function size:0xB0 +resetControls__22dSndControlPlayerMgr_cFv = .text:0x80360620; // type:function size:0xAC +getControlTarget__22dSndControlPlayerMgr_cCFQ222dSndControlPlayerMgr_c12PlayerCtrl_eUl = .text:0x803606D0; // type:function size:0x40 fn_80360710 = .text:0x80360710; // type:function size:0x78 fn_80360790 = .text:0x80360790; // type:function size:0x5C fn_803607F0 = .text:0x803607F0; // type:function size:0x60 -fn_80360850 = .text:0x80360850; // type:function size:0x2C -fn_80360880 = .text:0x80360880; // type:function size:0x64 +setGroupVolumeFlag__22dSndControlPlayerMgr_cFQ222dSndControlPlayerMgr_c18VolumeControlGroupQ222dSndControlPlayerMgr_c9MuteLevel = .text:0x80360850; // type:function size:0x2C +setPlayerVolumeInternal__22dSndControlPlayerMgr_cFUlf = .text:0x80360880; // type:function size:0x64 fn_803608F0 = .text:0x803608F0; // type:function size:0x50 -fn_80360940 = .text:0x80360940; // type:function size:0x5C +setBgmMuteVolume__22dSndControlPlayerMgr_cFf = .text:0x80360940; // type:function size:0x5C fn_803609A0 = .text:0x803609A0; // type:function size:0x5C -fn_80360A00 = .text:0x80360A00; // type:function size:0x5C -fn_80360A60 = .text:0x80360A60; // type:function size:0x6C -fn_80360AD0 = .text:0x80360AD0; // type:function size:0x5C -fn_80360B30 = .text:0x80360B30; // type:function size:0x5C -fn_80360B90 = .text:0x80360B90; // type:function size:0x64 -fn_80360C00 = .text:0x80360C00; // type:function size:0x28 -fn_80360C30 = .text:0x80360C30; // type:function size:0x78 -fn_80360CB0 = .text:0x80360CB0; // type:function size:0x48 -fn_80360D00 = .text:0x80360D00; // type:function size:0x10 -fn_80360D10 = .text:0x80360D10; // type:function size:0xE4 -fn_80360E00 = .text:0x80360E00; // type:function size:0x60 -fn_80360E60 = .text:0x80360E60; // type:function size:0x118 -fn_80360F80 = .text:0x80360F80; // type:function size:0xC -fn_80360F90 = .text:0x80360F90; // type:function size:0x20 -fn_80360FB0 = .text:0x80360FB0; // type:function size:0xC -fn_80360FC0 = .text:0x80360FC0; // type:function size:0x18 -fn_80360FE0 = .text:0x80360FE0; // type:function size:0x390 -fn_80361370 = .text:0x80361370; // type:function size:0xEC +setBgmVolumeDecreaseSpeed__22dSndControlPlayerMgr_cFf = .text:0x80360A00; // type:function size:0x5C +setStageEffectsVolume__22dSndControlPlayerMgr_cFfl = .text:0x80360A60; // type:function size:0x6C +setStageEffectsMuteVolume__22dSndControlPlayerMgr_cFf = .text:0x80360AD0; // type:function size:0x5C +setEnemyMuteVolume__22dSndControlPlayerMgr_cFf = .text:0x80360B30; // type:function size:0x5C +setObjectMuteVolume__22dSndControlPlayerMgr_cFf = .text:0x80360B90; // type:function size:0x64 +__sinit_\d_snd_control_player_mgr_cpp = .text:0x80360C00; // type:function size:0x28 +__dt__33SndMgrDisposer<15dSnd3DManager_c>Fv = .text:0x80360C30; // type:function size:0x78 scope:weak +create__33SndMgrDisposer<15dSnd3DManager_c>Fv = .text:0x80360CB0; // type:function size:0x48 scope:weak +remove__33SndMgrDisposer<15dSnd3DManager_c>Fv = .text:0x80360D00; // type:function size:0x10 scope:weak +__ct__15dSnd3DManager_cFv = .text:0x80360D10; // type:function size:0xE4 +__dt__Q34nw4r3snd14Sound3DManagerFv = .text:0x80360E00; // type:function size:0x60 scope:weak +setup__15dSnd3DManager_cFv = .text:0x80360E60; // type:function size:0x118 +resetCamDistance__15dSnd3DManager_cFv = .text:0x80360F80; // type:function size:0xC +setCamDistance__15dSnd3DManager_cFf = .text:0x80360F90; // type:function size:0x20 +calc__15dSnd3DManager_cFv = .text:0x80360FB0; // type:function size:0xC +clearState__15dSnd3DManager_cFv = .text:0x80360FC0; // type:function size:0x18 +updateFromCamera__15dSnd3DManager_cFRQ23EGG12LookAtCamera = .text:0x80360FE0; // type:function size:0x390 +updateListenerPos__15dSnd3DManager_cFf = .text:0x80361370; // type:function size:0xEC EnemySoundMgr__dtor = .text:0x80361460; // type:function size:0x78 initEnemySoundMgr = .text:0x803614E0; // type:function size:0x48 EnemySoundMgr__deref = .text:0x80361530; // type:function size:0x10 EnemySoundMgr__ctor = .text:0x80361540; // type:function size:0x15C -fn_803616A0 = .text:0x803616A0; // type:function size:0x7C +__dt__Q34nw4r3snd15FxReverbStdDpl2Fv = .text:0x803616A0; // type:function size:0x7C fn_80361720 = .text:0x80361720; // type:function size:0x1CC fn_803618F0 = .text:0x803618F0; // type:function size:0x3DC GetStageTypeFlags = .text:0x80361CD0; // type:function size:0x2FC @@ -20066,7 +20066,7 @@ fn_80362390 = .text:0x80362390; // type:function size:0x6C fn_80362400 = .text:0x80362400; // type:function size:0x10 fn_80362410 = .text:0x80362410; // type:function size:0xC fn_80362420 = .text:0x80362420; // type:function size:0x18 -isNotInStage = .text:0x80362440; // type:function size:0x34 +isInStage = .text:0x80362440; // type:function size:0x34 fn_80362480 = .text:0x80362480; // type:function size:0x6C fn_803624F0 = .text:0x803624F0; // type:function size:0xF4 fn_803625F0 = .text:0x803625F0; // type:function size:0x140 @@ -20129,15 +20129,15 @@ fn_803651A0 = .text:0x803651A0; // type:function size:0xA0 fn_80365240 = .text:0x80365240; // type:function size:0x1F8 fn_80365440 = .text:0x80365440; // type:function size:0x10C fn_80365550 = .text:0x80365550; // type:function size:0x1A8 -fn_80365700 = .text:0x80365700; // type:function size:0xCC +setUnderwaterLpfFreq = .text:0x80365700; // type:function size:0xCC fn_803657D0 = .text:0x803657D0; // type:function size:0x78 fn_80365850 = .text:0x80365850; // type:function size:0x70 fn_803658C0 = .text:0x803658C0; // type:function size:0x5C fn_80365920 = .text:0x80365920; // type:function size:0x4C fn_80365970 = .text:0x80365970; // type:function size:0x8 fn_80365980 = .text:0x80365980; // type:function size:0x54 -fn_803659E0 = .text:0x803659E0; // type:function size:0x4C -fn_80365A30 = .text:0x80365A30; // type:function size:0x48 +resetBgmAndStageEffectLpfFreq = .text:0x803659E0; // type:function size:0x4C +resetBgmLpfFreq = .text:0x80365A30; // type:function size:0x48 fn_80365A80 = .text:0x80365A80; // type:function size:0x4C fn_80365AD0 = .text:0x80365AD0; // type:function size:0xA8 fn_80365B80 = .text:0x80365B80; // type:function size:0x5C @@ -20336,24 +20336,24 @@ fn_8036A220 = .text:0x8036A220; // type:function size:0x3C fn_8036A260 = .text:0x8036A260; // type:function size:0x6C fn_8036A2D0 = .text:0x8036A2D0; // type:function size:0xB8 fn_8036A390 = .text:0x8036A390; // type:function size:0x14 -fn_8036A3B0 = .text:0x8036A3B0; // type:function size:0x78 -fn_8036A430 = .text:0x8036A430; // type:function size:0x48 -fn_8036A480 = .text:0x8036A480; // type:function size:0x10 -fn_8036A490 = .text:0x8036A490; // type:function size:0x88 -fn_8036A520 = .text:0x8036A520; // type:function size:0x58 -fn_8036A580 = .text:0x8036A580; // type:function size:0x74 +__dt__42SndMgrDisposer<24dSndAreaSoundEffectMgr_c>Fv = .text:0x8036A3B0; // type:function size:0x78 +create__42SndMgrDisposer<24dSndAreaSoundEffectMgr_c>Fv = .text:0x8036A430; // type:function size:0x48 +remove__42SndMgrDisposer<24dSndAreaSoundEffectMgr_c>Fv = .text:0x8036A480; // type:function size:0x10 +__ct__24dSndAreaSoundEffectMgr_cFv = .text:0x8036A490; // type:function size:0x88 +__dt__15dSndAreaSound_cFv = .text:0x8036A520; // type:function size:0x58 +calc__24dSndAreaSoundEffectMgr_cFv = .text:0x8036A580; // type:function size:0x74 fn_8036A600 = .text:0x8036A600; // type:function size:0x88 fn_8036A690 = .text:0x8036A690; // type:function size:0x9C -fn_8036A730 = .text:0x8036A730; // type:function size:0xEC +startSound__24dSndAreaSoundEffectMgr_cFUlUl = .text:0x8036A730; // type:function size:0xEC fn_8036A820 = .text:0x8036A820; // type:function size:0x328 fn_8036AB50 = .text:0x8036AB50; // type:function size:0x20 fn_8036AB70 = .text:0x8036AB70; // type:function size:0x4 fn_8036AB80 = .text:0x8036AB80; // type:function size:0x4 fn_8036AB90 = .text:0x8036AB90; // type:function size:0xFC -fn_8036AC90 = .text:0x8036AC90; // type:function size:0x68 +stopSounds__24dSndAreaSoundEffectMgr_cFl = .text:0x8036AC90; // type:function size:0x68 fn_8036AD00 = .text:0x8036AD00; // type:function size:0xB0 -fn_8036ADB0 = .text:0x8036ADB0; // type:function size:0x44 -fn_8036AE00 = .text:0x8036AE00; // type:function size:0x80 +isPlayingAnySound__24dSndAreaSoundEffectMgr_cCFv = .text:0x8036ADB0; // type:function size:0x44 +isPlayingSound__24dSndAreaSoundEffectMgr_cCFUl = .text:0x8036AE00; // type:function size:0x80 fn_8036AE80 = .text:0x8036AE80; // type:function size:0xF4 fn_8036AF80 = .text:0x8036AF80; // type:function size:0x2C fn_8036AFB0 = .text:0x8036AFB0; // type:function size:0x1C0 @@ -20365,12 +20365,12 @@ fn_8036B5C0 = .text:0x8036B5C0; // type:function size:0x6C fn_8036B630 = .text:0x8036B630; // type:function size:0x170 fn_8036B7A0 = .text:0x8036B7A0; // type:function size:0x110 fn_8036B8B0 = .text:0x8036B8B0; // type:function size:0x20 -fn_8036B8D0 = .text:0x8036B8D0; // type:function size:0x54 -fn_8036B930 = .text:0x8036B930; // type:function size:0x34 -fn_8036B970 = .text:0x8036B970; // type:function size:0xC4 -fn_8036BA40 = .text:0x8036BA40; // type:function size:0x50 -fn_8036BA90 = .text:0x8036BA90; // type:function size:0xBC -fn_8036BB50 = .text:0x8036BB50; // type:function size:0x74 +__ct__15dSndAreaSound_cFv = .text:0x8036B8D0; // type:function size:0x54 +cancel__15dSndAreaSound_cFv = .text:0x8036B930; // type:function size:0x34 +calc__15dSndAreaSound_cFv = .text:0x8036B970; // type:function size:0xC4 +fadeIn__15dSndAreaSound_cFUll = .text:0x8036BA40; // type:function size:0x50 +pause__15dSndAreaSound_cFl = .text:0x8036BA90; // type:function size:0xBC +unpause__15dSndAreaSound_cFl = .text:0x8036BB50; // type:function size:0x74 fn_8036BBD0 = .text:0x8036BBD0; // type:function size:0x24 fn_8036BC00 = .text:0x8036BC00; // type:function size:0x24 fn_8036BC30 = .text:0x8036BC30; // type:function size:0x24 @@ -20382,29 +20382,29 @@ fn_8036BDB0 = .text:0x8036BDB0; // type:function size:0x30 fn_8036BDE0 = .text:0x8036BDE0; // type:function size:0xA8 fn_8036BE90 = .text:0x8036BE90; // type:function size:0x158 fn_8036BFF0 = .text:0x8036BFF0; // type:function size:0xA0 -fn_8036C090 = .text:0x8036C090; // type:function size:0x20 -fn_8036C0B0 = .text:0x8036C0B0; // type:function size:0x1C -fn_8036C0D0 = .text:0x8036C0D0; // type:function size:0xA8 -fn_8036C180 = .text:0x8036C180; // type:function size:0x84 -fn_8036C210 = .text:0x8036C210; // type:function size:0x20 -fn_8036C230 = .text:0x8036C230; // type:function size:0x1C -fn_8036C250 = .text:0x8036C250; // type:function size:0x48 -fn_8036C2A0 = .text:0x8036C2A0; // type:function size:0x70 -fn_8036C310 = .text:0x8036C310; // type:function size:0x3C -fn_8036C350 = .text:0x8036C350; // type:function size:0x4C -fn_8036C3A0 = .text:0x8036C3A0; // type:function size:0x50 -fn_8036C3F0 = .text:0x8036C3F0; // type:function size:0x54 -fn_8036C450 = .text:0x8036C450; // type:function size:0x48 -fn_8036C4A0 = .text:0x8036C4A0; // type:function size:0x40 -fn_8036C4E0 = .text:0x8036C4E0; // type:function size:0x44 -fn_8036C530 = .text:0x8036C530; // type:function size:0x44 -fn_8036C580 = .text:0x8036C580; // type:function size:0x44 -fn_8036C5D0 = .text:0x8036C5D0; // type:function size:0x10 -fn_8036C5E0 = .text:0x8036C5E0; // type:function size:0xC -fn_8036C5F0 = .text:0x8036C5F0; // type:function size:0x10 -fn_8036C600 = .text:0x8036C600; // type:function size:0xC -fn_8036C610 = .text:0x8036C610; // type:function size:0x40 -fn_8036C650 = .text:0x8036C650; // type:function size:0x58 +reset__13dSndControl_cFv = .text:0x8036C090; // type:function size:0x20 +stop__13dSndControl_cFv = .text:0x8036C0B0; // type:function size:0x1C +set__13dSndControl_cFfl = .text:0x8036C0D0; // type:function size:0xA8 +calc__13dSndControl_cFv = .text:0x8036C180; // type:function size:0x84 +apply__24dSndControlSoundVolume_cFP11dSndSound_c = .text:0x8036C210; // type:function size:0x20 +apply__23dSndControlSoundPitch_cFP11dSndSound_c = .text:0x8036C230; // type:function size:0x1C +__ct__29dSndControlSoundPitchLinear_cFv = .text:0x8036C250; // type:function size:0x48 +set__29dSndControlSoundPitchLinear_cFfl = .text:0x8036C2A0; // type:function size:0x70 +apply__29dSndControlSoundPitchLinear_cFP11dSndSound_c = .text:0x8036C310; // type:function size:0x3C +apply__31dSndControlSoundSeqTempoRatio_cFP11dSndSound_c = .text:0x8036C350; // type:function size:0x4C +apply__32dSndControlSoundSeqTrackVolume_cFP11dSndSound_c = .text:0x8036C3A0; // type:function size:0x50 +apply__33dSndControlSoundStrmTrackVolume_cFP11dSndSound_c = .text:0x8036C3F0; // type:function size:0x54 +__ct__29dSndControlPlayerVolumeBase_cFv = .text:0x8036C450; // type:function size:0x48 +reset__19dSndControlPlayer_cFv = .text:0x8036C4A0; // type:function size:0x40 +setIndex1__19dSndControlPlayer_cFUl = .text:0x8036C4E0; // type:function size:0x44 +setIndex2__19dSndControlPlayer_cFUl = .text:0x8036C530; // type:function size:0x44 +stop__19dSndControlPlayer_cFv = .text:0x8036C580; // type:function size:0x44 +apply__25dSndControlPlayerVolume_cFv = .text:0x8036C5D0; // type:function size:0x10 +getAppliedValue__25dSndControlPlayerVolume_cFv = .text:0x8036C5E0; // type:function size:0xC +apply__26dSndControlPlayerLpfFreq_cFv = .text:0x8036C5F0; // type:function size:0x10 +getAppliedValue__26dSndControlPlayerLpfFreq_cFv = .text:0x8036C600; // type:function size:0xC +apply__25dSndControlPlayerFxSend_cFv = .text:0x8036C610; // type:function size:0x40 +getAppliedValue__25dSndControlPlayerFxSend_cFv = .text:0x8036C650; // type:function size:0x58 fn_8036C6B0 = .text:0x8036C6B0; // type:function size:0x64 isInvalidSoundId = .text:0x8036C720; // type:function size:0x10 FanfareSoundMgr__dtor = .text:0x8036C730; // type:function size:0x78 @@ -20551,7 +20551,7 @@ fn_80372E30 = .text:0x80372E30; // type:function size:0x40 fn_80372E70 = .text:0x80372E70; // type:function size:0xB0 fn_80372F20 = .text:0x80372F20; // type:function size:0x6C AnotherSoundMgr__playSound = .text:0x80372F90; // type:function size:0x264 -fn_80373200 = .text:0x80373200; // type:function size:0x8 +vt_0xF4__14dSoundSource_cFv = .text:0x80373200; // type:function size:0x8 fn_80373210 = .text:0x80373210; // type:function size:0xB4 fn_803732D0 = .text:0x803732D0; // type:function size:0x44 fn_80373320 = .text:0x80373320; // type:function size:0x8C @@ -20592,8 +20592,8 @@ fn_80374DB0 = .text:0x80374DB0; // type:function size:0x24 fn_80374DE0 = .text:0x80374DE0; // type:function size:0x58 fn_80374E40 = .text:0x80374E40; // type:function size:0x10 fn_80374E50 = .text:0x80374E50; // type:function size:0x330 -fn_80375180 = .text:0x80375180; // type:function size:0x28 -fn_803751B0 = .text:0x803751B0; // type:function size:0x10 +vt_0x38__14dSoundSource_cFv = .text:0x80375180; // type:function size:0x28 +vt_0x3C__14dSoundSource_cFv = .text:0x803751B0; // type:function size:0x10 fn_803751C0 = .text:0x803751C0; // type:function size:0x70 fn_80375230 = .text:0x80375230; // type:function size:0xA4 fn_803752E0 = .text:0x803752E0; // type:function size:0xC8 @@ -20829,11 +20829,11 @@ fn_8037D640 = .text:0x8037D640; // type:function size:0x6C fn_8037D6B0 = .text:0x8037D6B0; // type:function size:0x5C fn_8037D710 = .text:0x8037D710; // type:function size:0x94 fn_8037D7B0 = .text:0x8037D7B0; // type:function size:0x50 -SoundEffectSoundMgr__dtor = .text:0x8037D800; // type:function size:0x78 -initSoundEffectSoundMgr = .text:0x8037D880; // type:function size:0x48 -SoundEffectSoundMgr__deref = .text:0x8037D8D0; // type:function size:0x10 -SoundEffectSoundMgr__ctor = .text:0x8037D8E0; // type:function size:0x9C -fn_8037D980 = .text:0x8037D980; // type:function size:0xC +__dt__38SndMgrDisposer<20dSndSmallEffectMgr_c>Fv = .text:0x8037D800; // type:function size:0x78 +create__38SndMgrDisposer<20dSndSmallEffectMgr_c>Fv = .text:0x8037D880; // type:function size:0x48 +remove__38SndMgrDisposer<20dSndSmallEffectMgr_c>Fv = .text:0x8037D8D0; // type:function size:0x10 +__ct__20dSndSmallEffectMgr_cFv = .text:0x8037D8E0; // type:function size:0x9C +__ct__Q34nw4r3snd11SoundHandleFv = .text:0x8037D980; // type:function size:0xC fn_8037D990 = .text:0x8037D990; // type:function size:0x4 fn_8037D9A0 = .text:0x8037D9A0; // type:function size:0xA0 fn_8037DA40 = .text:0x8037DA40; // type:function size:0x18 @@ -20843,13 +20843,13 @@ fn_8037DBB0 = .text:0x8037DBB0; // type:function size:0x98 fn_8037DC50 = .text:0x8037DC50; // type:function size:0x70 fn_8037DCC0 = .text:0x8037DCC0; // type:function size:0x48 fn_8037DD10 = .text:0x8037DD10; // type:function size:0x1BC -playSound__17SmallSoundManagerF7WZSound = .text:0x8037DED0; // type:function size:0x2D0 -fn_8037E1A0 = .text:0x8037E1A0; // type:function size:0x90 +playSound__20dSndSmallEffectMgr_cFUl = .text:0x8037DED0; // type:function size:0x2D0 +playSoundWithPan__20dSndSmallEffectMgr_cFUlf = .text:0x8037E1A0; // type:function size:0x90 fn_8037E230 = .text:0x8037E230; // type:function size:0xEC -fn_8037E320 = .text:0x8037E320; // type:function size:0x78 +playSoundInternal__20dSndSmallEffectMgr_cFUl = .text:0x8037E320; // type:function size:0x78 fn_8037E3A0 = .text:0x8037E3A0; // type:function size:0x158 fn_8037E500 = .text:0x8037E500; // type:function size:0x58 -playSoundWithPitch__17SmallSoundManagerF7WZSoundf = .text:0x8037E560; // type:function size:0xBC +playSoundWithPitch__20dSndSmallEffectMgr_cFUlf = .text:0x8037E560; // type:function size:0xBC fn_8037E620 = .text:0x8037E620; // type:function size:0xDC fn_8037E700 = .text:0x8037E700; // type:function size:0x8 fn_8037E710 = .text:0x8037E710; // type:function size:0x8 @@ -20868,17 +20868,17 @@ fn_8037EC30 = .text:0x8037EC30; // type:function size:0x8 fn_8037EC40 = .text:0x8037EC40; // type:function size:0x3C fn_8037EC80 = .text:0x8037EC80; // type:function size:0xB0 fn_8037ED30 = .text:0x8037ED30; // type:function size:0x68 -fn_8037EDA0 = .text:0x8037EDA0; // type:function size:0xA0 -fn_8037EE40 = .text:0x8037EE40; // type:function size:0x3C -fn_8037EE80 = .text:0x8037EE80; // type:function size:0x64 -playSound = .text:0x8037EEF0; // type:function size:0xAC -fn_8037EFA0 = .text:0x8037EFA0; // type:function size:0x80 -playButtonPressSoundWhenAdvancingTextBoxes__17SmallSoundManagerFf = .text:0x8037F020; // type:function size:0xB4 -fn_8037F0E0 = .text:0x8037F0E0; // type:function size:0xC -fn_8037F0F0 = .text:0x8037F0F0; // type:function size:0x60 +stopSounds__20dSndSmallEffectMgr_cFUlUll = .text:0x8037EDA0; // type:function size:0xA0 +__cl__12SoundStopperFRQ34nw4r3snd11SoundHandle = .text:0x8037EE40; // type:function size:0x3C +stopSounds__20dSndSmallEffectMgr_cFUll = .text:0x8037EE80; // type:function size:0x64 +isPlayingSound__20dSndSmallEffectMgr_cFUlUl = .text:0x8037EEF0; // type:function size:0xAC +isPlayingSound__20dSndSmallEffectMgr_cFUl = .text:0x8037EFA0; // type:function size:0x80 +playButtonPressSoundWhenAdvancingTextBoxes__20dSndSmallEffectMgr_cFf = .text:0x8037F020; // type:function size:0xB4 +resetButtonPressSound__20dSndSmallEffectMgr_cFv = .text:0x8037F0E0; // type:function size:0xC +setButtonPressSound__20dSndSmallEffectMgr_cFP14dSoundSource_c = .text:0x8037F0F0; // type:function size:0x60 fn_8037F150 = .text:0x8037F150; // type:function size:0x6D0 -fn_8037F820 = .text:0x8037F820; // type:function size:0x8 -fn_8037F830 = .text:0x8037F830; // type:function size:0x8 +d_s_vt_0x17C__14dSoundSource_cFv = .text:0x8037F820; // type:function size:0x8 +vt_0x18__14dSoundSource_cFv = .text:0x8037F830; // type:function size:0x8 fn_8037F840 = .text:0x8037F840; // type:function size:0x74 fn_8037F8C0 = .text:0x8037F8C0; // type:function size:0x78 fn_8037F940 = .text:0x8037F940; // type:function size:0x48 @@ -20943,13 +20943,13 @@ fn_80382210 = .text:0x80382210; // type:function size:0xE8 fn_80382300 = .text:0x80382300; // type:function size:0x28 fn_80382330 = .text:0x80382330; // type:function size:0x7C fn_803823B0 = .text:0x803823B0; // type:function size:0x18 -fn_803823D0 = .text:0x803823D0; // type:function size:0x8 +d_s_vt_0x1E0__14dSoundSource_cFv = .text:0x803823D0; // type:function size:0x8 fn_803823E0 = .text:0x803823E0; // type:function size:0x14 fn_80382400 = .text:0x80382400; // type:function size:0xC fn_80382410 = .text:0x80382410; // type:function size:0xC0 fn_803824D0 = .text:0x803824D0; // type:function size:0x24 fn_80382500 = .text:0x80382500; // type:function size:0x90 -fn_80382590 = .text:0x80382590; // type:function size:0xB0 +getSourceCategoryForSourceType__15dSndSourceMgr_cFlPCc = .text:0x80382590; // type:function size:0xB0 soundForActorInitRelated_80382640 = .text:0x80382640; // type:function size:0xFD8 fn_80383620 = .text:0x80383620; // type:function size:0x94 fn_803836C0 = .text:0x803836C0; // type:function size:0x98 @@ -20958,13 +20958,13 @@ fn_803837C0 = .text:0x803837C0; // type:function size:0x9C fn_80383860 = .text:0x80383860; // type:function size:0x94 fn_80383900 = .text:0x80383900; // type:function size:0x58 fn_80383960 = .text:0x80383960; // type:function size:0x9C -fn_80383A00 = .text:0x80383A00; // type:function size:0x8 -fn_80383A10 = .text:0x80383A10; // type:function size:0x8 -fn_80383A20 = .text:0x80383A20; // type:function size:0x4 -fn_80383A30 = .text:0x80383A30; // type:function size:0x78 -initEnemyBgmRelatedMgr = .text:0x80383AB0; // type:function size:0x48 -fn_80383B00 = .text:0x80383B00; // type:function size:0x10 -EnemyBgmRelatedMgr__ctor = .text:0x80383B10; // type:function size:0x140 +d_s_vt_0x180__14dSoundSource_cFv = .text:0x80383A00; // type:function size:0x8 +d_s_vt_0x1DC__14dSoundSource_cFv = .text:0x80383A10; // type:function size:0x8 +d_s_vt_0x1D8__14dSoundSource_cFv = .text:0x80383A20; // type:function size:0x4 +__dt__33SndMgrDisposer<15dSndSourceMgr_c>Fv = .text:0x80383A30; // type:function size:0x78 +create__33SndMgrDisposer<15dSndSourceMgr_c>Fv = .text:0x80383AB0; // type:function size:0x48 +remove__33SndMgrDisposer<15dSndSourceMgr_c>Fv = .text:0x80383B00; // type:function size:0x10 +__ct__15dSndSourceMgr_cFv = .text:0x80383B10; // type:function size:0x140 fn_80383C50 = .text:0x80383C50; // type:function size:0x78 fn_80383CD0 = .text:0x80383CD0; // type:function size:0x4C fn_80383D20 = .text:0x80383D20; // type:function size:0x44 @@ -20986,20 +20986,20 @@ fn_803848B0 = .text:0x803848B0; // type:function size:0xAC fn_80384960 = .text:0x80384960; // type:function size:0x8C fn_803849F0 = .text:0x803849F0; // type:function size:0xC fn_80384A00 = .text:0x80384A00; // type:function size:0x174 -fn_80384B80 = .text:0x80384B80; // type:function size:0x178 -fn_80384D00 = .text:0x80384D00; // type:function size:0x8 -fn_80384D10 = .text:0x80384D10; // type:function size:0x78 +registerSource__15dSndSourceMgr_cFP14dSoundSource_c = .text:0x80384B80; // type:function size:0x178 +getCategory__14dSoundSource_cCFv = .text:0x80384D00; // type:function size:0x8 +isCertainEnemyType__15dSndSourceMgr_cFP14dSoundSource_c = .text:0x80384D10; // type:function size:0x78 fn_80384D90 = .text:0x80384D90; // type:function size:0x98 -fn_80384E30 = .text:0x80384E30; // type:function size:0xBC -fn_80384EF0 = .text:0x80384EF0; // type:function size:0xAC +unregisterSource__15dSndSourceMgr_cFP14dSoundSource_c = .text:0x80384E30; // type:function size:0xBC +removeSourceFromList__15dSndSourceMgr_cFP14dSoundSource_cPQ34nw4r2ut4List = .text:0x80384EF0; // type:function size:0xAC fn_80384FA0 = .text:0x80384FA0; // type:function size:0x14 -fn_80384FC0 = .text:0x80384FC0; // type:function size:0x50 +clearSourceLists__15dSndSourceMgr_cFv = .text:0x80384FC0; // type:function size:0x50 fn_80385010 = .text:0x80385010; // type:function size:0x60 fn_80385070 = .text:0x80385070; // type:function size:0x18 fn_80385090 = .text:0x80385090; // type:function size:0x18 fn_803850B0 = .text:0x803850B0; // type:function size:0x108 fn_803851C0 = .text:0x803851C0; // type:function size:0x74 -fn_80385240 = .text:0x80385240; // type:function size:0x64 +clearSourceList__15dSndSourceMgr_cFPQ34nw4r2ut4List = .text:0x80385240; // type:function size:0x64 fn_803852B0 = .text:0x803852B0; // type:function size:0x3C fn_803852F0 = .text:0x803852F0; // type:function size:0x3C fn_80385330 = .text:0x80385330; // type:function size:0x94 @@ -21016,34 +21016,34 @@ fn_803857C0 = .text:0x803857C0; // type:function size:0x5C fn_80385820 = .text:0x80385820; // type:function size:0x8 fn_80385830 = .text:0x80385830; // type:function size:0x44 fn_80385880 = .text:0x80385880; // type:function size:0x50 -fn_803858D0 = .text:0x803858D0; // type:function size:0xA0 +playFlowSound__15dSndSourceMgr_cFUl = .text:0x803858D0; // type:function size:0xA0 fn_80385970 = .text:0x80385970; // type:function size:0x90 -fn_80385A00 = .text:0x80385A00; // type:function size:0x8 -fn_80385A10 = .text:0x80385A10; // type:function size:0x4 -fn_80385A20 = .text:0x80385A20; // type:function size:0x8 -fn_80385A30 = .text:0x80385A30; // type:function size:0x4 -fn_80385A40 = .text:0x80385A40; // type:function size:0x4 -fn_80385A50 = .text:0x80385A50; // type:function size:0x4 -fn_80385A60 = .text:0x80385A60; // type:function size:0x8 -fn_80385A70 = .text:0x80385A70; // type:function size:0x4 -fn_80385A80 = .text:0x80385A80; // type:function size:0x4 -fn_80385A90 = .text:0x80385A90; // type:function size:0x34 -fn_80385AD0 = .text:0x80385AD0; // type:function size:0x8 -fn_80385AE0 = .text:0x80385AE0; // type:function size:0x8 -fn_80385AF0 = .text:0x80385AF0; // type:function size:0x4 -fn_80385B00 = .text:0x80385B00; // type:function size:0x4 -fn_80385B10 = .text:0x80385B10; // type:function size:0x8 -fn_80385B20 = .text:0x80385B20; // type:function size:0x8 -fn_80385B30 = .text:0x80385B30; // type:function size:0x8 -fn_80385B40 = .text:0x80385B40; // type:function size:0x8 -fn_80385B50 = .text:0x80385B50; // type:function size:0x10 -fn_80385B60 = .text:0x80385B60; // type:function size:0x10 -fn_80385B70 = .text:0x80385B70; // type:function size:0x8 -fn_80385B80 = .text:0x80385B80; // type:function size:0x4 -fn_80385B90 = .text:0x80385B90; // type:function size:0x4 -fn_80385BA0 = .text:0x80385BA0; // type:function size:0x8 -fn_80385BB0 = .text:0x80385BB0; // type:function size:0x14 -fn_80385BD0 = .text:0x80385BD0; // type:function size:0x14 +vt_0x118__14dSoundSource_cFv = .text:0x80385A00; // type:function size:0x8 +vt_0x114__14dSoundSource_cFv = .text:0x80385A10; // type:function size:0x4 +d_s_vt_0x1D4__14dSoundSource_cFv = .text:0x80385A20; // type:function size:0x8 +setRate__14dSoundSource_cFf = .text:0x80385A30; // type:function size:0x4 +setFrame__14dSoundSource_cFf = .text:0x80385A40; // type:function size:0x4 +load__14dSoundSource_cFPvPCc = .text:0x80385A50; // type:function size:0x4 +isReadyMaybe__14dSoundSource_cFv = .text:0x80385A60; // type:function size:0x8 +vt_0xF0__14dSoundSource_cFv = .text:0x80385A70; // type:function size:0x4 +d_s_vt_0x1CC__14dSoundSource_cFv = .text:0x80385A80; // type:function size:0x4 +d_s_vt_0x1C0__14dSoundSource_cFv = .text:0x80385A90; // type:function size:0x34 +vt_0xE8__14dSoundSource_cFv = .text:0x80385AD0; // type:function size:0x8 +vt_0xEC__14dSoundSource_cFv = .text:0x80385AE0; // type:function size:0x8 +vt_0xE0__14dSoundSource_cFv = .text:0x80385AF0; // type:function size:0x4 +vt_0xE4__14dSoundSource_cFv = .text:0x80385B00; // type:function size:0x4 +vt_0xDC__14dSoundSource_cFv = .text:0x80385B10; // type:function size:0x8 +vt_0xD4__14dSoundSource_cFv = .text:0x80385B20; // type:function size:0x8 +vt_0x54__14dSoundSource_cFv = .text:0x80385B30; // type:function size:0x8 +vt_0x40__14dSoundSource_cFv = .text:0x80385B40; // type:function size:0x8 +vt_0x34__14dSoundSource_cFv = .text:0x80385B50; // type:function size:0x10 +vt_0x30__14dSoundSource_cFv = .text:0x80385B60; // type:function size:0x10 +vt_0xF8__14dSoundSource_cFv = .text:0x80385B70; // type:function size:0x8 +d_s_vt_0x188__14dSoundSource_cFv = .text:0x80385B80; // type:function size:0x4 +vt_0x20__14dSoundSource_cFv = .text:0x80385B90; // type:function size:0x4 +vt_0x24__14dSoundSource_cFv = .text:0x80385BA0; // type:function size:0x8 +vt_0x1C__14dSoundSource_cFv = .text:0x80385BB0; // type:function size:0x14 +vt_0x14__14dSoundSource_cFv = .text:0x80385BD0; // type:function size:0x14 fn_80385BF0 = .text:0x80385BF0; // type:function size:0xC fn_80385C00 = .text:0x80385C00; // type:function size:0xC fn_80385C10 = .text:0x80385C10; // type:function size:0xC @@ -21104,108 +21104,108 @@ fn_80386410 = .text:0x80386410; // type:function size:0x8 fn_80386420 = .text:0x80386420; // type:function size:0x8 fn_80386430 = .text:0x80386430; // type:function size:0x8 fn_80386440 = .text:0x80386440; // type:function size:0x8 -fn_80386450 = .text:0x80386450; // type:function size:0x8 +@4@d_vt_0x38__14dSoundSource_cFbi = .text:0x80386450; // type:function size:0x8 fn_80386460 = .text:0x80386460; // type:function size:0x8 fn_80386470 = .text:0x80386470; // type:function size:0x8 -fn_80386480 = .text:0x80386480; // type:function size:0x8 -fn_80386490 = .text:0x80386490; // type:function size:0x8 -fn_803864A0 = .text:0x803864A0; // type:function size:0x8 +@4@SetupSound__14dSoundSource_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x80386480; // type:function size:0x8 +@4@d_vt_0x5C__14dSoundSource_cFv = .text:0x80386490; // type:function size:0x8 +@4@d_vt_0x58__14dSoundSource_cFv = .text:0x803864A0; // type:function size:0x8 fn_803864B0 = .text:0x803864B0; // type:function size:0x8 fn_803864C0 = .text:0x803864C0; // type:function size:0x8 -fn_803864D0 = .text:0x803864D0; // type:function size:0x164 -fn_80386640 = .text:0x80386640; // type:function size:0x2C -fn_80386670 = .text:0x80386670; // type:function size:0x118 +set__17dSndSourceGroup_cFlPCc = .text:0x803864D0; // type:function size:0x164 +resetSoundSourceParam__17dSndSourceGroup_cFv = .text:0x80386640; // type:function size:0x2C +__ct__17dSndSourceGroup_cFv = .text:0x80386670; // type:function size:0x118 fn_80386790 = .text:0x80386790; // type:function size:0x120 -fn_803868B0 = .text:0x803868B0; // type:function size:0x54 +__dt__17dSndSourceGroup_cFv = .text:0x803868B0; // type:function size:0x54 fn_80386910 = .text:0x80386910; // type:function size:0xEC fn_80386A00 = .text:0x80386A00; // type:function size:0xB0 fn_80386AB0 = .text:0x80386AB0; // type:function size:0xBC fn_80386B70 = .text:0x80386B70; // type:function size:0xBC -fn_80386C30 = .text:0x80386C30; // type:function size:0x10 -fn_80386C40 = .text:0x80386C40; // type:function size:0x8 -fn_80386C50 = .text:0x80386C50; // type:function size:0x14 -fn_80386C70 = .text:0x80386C70; // type:function size:0x14 -fn_80386C90 = .text:0x80386C90; // type:function size:0x58 -fn_80386CF0 = .text:0x80386CF0; // type:function size:0xEC -fn_80386DE0 = .text:0x80386DE0; // type:function size:0x110 +calc__17dSndSourceGroup_cFv = .text:0x80386C30; // type:function size:0x10 +getNumSources__17dSndSourceGroup_cCFv = .text:0x80386C40; // type:function size:0x8 +registerSource__17dSndSourceGroup_cFP14dSoundSource_c = .text:0x80386C50; // type:function size:0x14 +unregisterSource__17dSndSourceGroup_cFP14dSoundSource_c = .text:0x80386C70; // type:function size:0x14 +clearList__17dSndSourceGroup_cFv = .text:0x80386C90; // type:function size:0x58 +getSourceClosestToListener__17dSndSourceGroup_cFv = .text:0x80386CF0; // type:function size:0xEC +getSourceClosestToPlayer__17dSndSourceGroup_cFv = .text:0x80386DE0; // type:function size:0x110 fn_80386EF0 = .text:0x80386EF0; // type:function size:0x80 -fn_80386F70 = .text:0x80386F70; // type:function size:0x1A4C +setParamFromName__17dSndSourceGroup_cFPCc = .text:0x80386F70; // type:function size:0x1A4C soundForActorInitRelated_803889c0 = .text:0x803889C0; // type:function size:0x4 -fn_803889D0 = .text:0x803889D0; // type:function size:0x108 -fn_80388AE0 = .text:0x80388AE0; // type:function size:0xC4 -fn_80388BB0 = .text:0x80388BB0; // type:function size:0x118 -fn_80388CD0 = .text:0x80388CD0; // type:function size:0x9C +__ct__14dSoundSource_cFUcP9dAcBase_cPCcP17dSndSourceGroup_c = .text:0x803889D0; // type:function size:0x108 +__dt__14dSoundSource_cFv = .text:0x80388AE0; // type:function size:0xC4 +vt_0x0C__14dSoundSource_cFv = .text:0x80388BB0; // type:function size:0x118 +vt_0x44__14dSoundSource_cFv = .text:0x80388CD0; // type:function size:0x9C fn_80388D70 = .text:0x80388D70; // type:function size:0x80 -fn_80388DF0 = .text:0x80388DF0; // type:function size:0xC -fn_80388E00 = .text:0x80388E00; // type:function size:0x88 -fn_80388E90 = .text:0x80388E90; // type:function size:0x84 -fn_80388F20 = .text:0x80388F20; // type:function size:0x4 -fn_80388F30 = .text:0x80388F30; // type:function size:0x8 -fn_80388F40 = .text:0x80388F40; // type:function size:0x8 -fn_80388F50 = .text:0x80388F50; // type:function size:0x48 +getListenerPosition__14dSoundSource_cCFv = .text:0x80388DF0; // type:function size:0xC +vt_0x2C__14dSoundSource_cFv = .text:0x80388E00; // type:function size:0x88 +d_s_vt_0x184__14dSoundSource_cFv = .text:0x80388E90; // type:function size:0x84 +d_s_vt_0x18C__14dSoundSource_cFv = .text:0x80388F20; // type:function size:0x4 +hasPlayingSounds__14dSoundSource_cCFv = .text:0x80388F30; // type:function size:0x8 +isPlayingSound__14dSoundSource_cFUl = .text:0x80388F40; // type:function size:0x8 +isPlayingSound__14dSoundSource_cFPCc = .text:0x80388F50; // type:function size:0x48 fn_80388FA0 = .text:0x80388FA0; // type:function size:0x14 fn_80388FC0 = .text:0x80388FC0; // type:function size:0x84 fn_80389050 = .text:0x80389050; // type:function size:0x68 -fn_803890C0 = .text:0x803890C0; // type:function size:0x18 -fn_803890E0 = .text:0x803890E0; // type:function size:0x1C +vt_0x5C__14dSoundSource_cFv = .text:0x803890C0; // type:function size:0x18 +vt_0x58__14dSoundSource_cFv = .text:0x803890E0; // type:function size:0x1C fn_80389100 = .text:0x80389100; // type:function size:0x60 -fn_80389160 = .text:0x80389160; // type:function size:0x40 -fn_803891A0 = .text:0x803891A0; // type:function size:0xB0 -fn_80389250 = .text:0x80389250; // type:function size:0x30 -fn_80389280 = .text:0x80389280; // type:function size:0x48 -fn_803892D0 = .text:0x803892D0; // type:function size:0x64 -fn_80389340 = .text:0x80389340; // type:function size:0x58 -fn_803893A0 = .text:0x803893A0; // type:function size:0x60 -fn_80389400 = .text:0x80389400; // type:function size:0x58 -fn_80389460 = .text:0x80389460; // type:function size:0x88 -fn_803894F0 = .text:0x803894F0; // type:function size:0x68 -fn_80389560 = .text:0x80389560; // type:function size:0x94 +d_s_vt_0x190__14dSoundSource_cFv = .text:0x80389160; // type:function size:0x40 +d_vt_0x38__14dSoundSource_cFbi = .text:0x803891A0; // type:function size:0xB0 +vt_0x60__14dSoundSource_cFv = .text:0x80389250; // type:function size:0x30 +vt_0x70__14dSoundSource_cFv = .text:0x80389280; // type:function size:0x48 +vt_0x64__14dSoundSource_cFv = .text:0x803892D0; // type:function size:0x64 +vt_0x74__14dSoundSource_cFv = .text:0x80389340; // type:function size:0x58 +vt_0x68__14dSoundSource_cFv = .text:0x803893A0; // type:function size:0x60 +vt_0x78__14dSoundSource_cFv = .text:0x80389400; // type:function size:0x58 +vt_0x6C__14dSoundSource_cFv = .text:0x80389460; // type:function size:0x88 +vt_0x7C__14dSoundSource_cFv = .text:0x803894F0; // type:function size:0x68 +vt_0xA0__14dSoundSource_cFv = .text:0x80389560; // type:function size:0x94 fn_80389600 = .text:0x80389600; // type:function size:0x74 fn_80389680 = .text:0x80389680; // type:function size:0x40 fn_803896C0 = .text:0x803896C0; // type:function size:0x1A8 -fn_80389870 = .text:0x80389870; // type:function size:0x11C -fn_80389990 = .text:0x80389990; // type:function size:0x58 -fn_803899F0 = .text:0x803899F0; // type:function size:0x184 -fn_80389B80 = .text:0x80389B80; // type:function size:0x68 -fn_80389BF0 = .text:0x80389BF0; // type:function size:0x160 -fn_80389D50 = .text:0x80389D50; // type:function size:0x78 -fn_80389DD0 = .text:0x80389DD0; // type:function size:0x11C -fn_80389EF0 = .text:0x80389EF0; // type:function size:0x58 +vt_0x80__14dSoundSource_cFv = .text:0x80389870; // type:function size:0x11C +vt_0x8C__14dSoundSource_cFv = .text:0x80389990; // type:function size:0x58 +vt_0x84__14dSoundSource_cFv = .text:0x803899F0; // type:function size:0x184 +vt_0x90__14dSoundSource_cFv = .text:0x80389B80; // type:function size:0x68 +vt_0x88__14dSoundSource_cFv = .text:0x80389BF0; // type:function size:0x160 +vt_0x94__14dSoundSource_cFv = .text:0x80389D50; // type:function size:0x78 +vt_0x98__14dSoundSource_cFv = .text:0x80389DD0; // type:function size:0x11C +vt_0x9C__14dSoundSource_cFv = .text:0x80389EF0; // type:function size:0x58 fn_80389F50 = .text:0x80389F50; // type:function size:0x208 -fn_8038A160 = .text:0x8038A160; // type:function size:0x6C +d_s_vt_0x19C__14dSoundSource_cFv = .text:0x8038A160; // type:function size:0x6C fn_8038A1D0 = .text:0x8038A1D0; // type:function size:0xD8 -fn_8038A2B0 = .text:0x8038A2B0; // type:function size:0x48 +vt_0xD8__14dSoundSource_cFv = .text:0x8038A2B0; // type:function size:0x48 fn_8038A300 = .text:0x8038A300; // type:function size:0x10 -fn_8038A310 = .text:0x8038A310; // type:function size:0xB8 -fn_8038A3D0 = .text:0x8038A3D0; // type:function size:0x58 -fn_8038A430 = .text:0x8038A430; // type:function size:0x30 -fn_8038A460 = .text:0x8038A460; // type:function size:0x48 -fn_8038A4B0 = .text:0x8038A4B0; // type:function size:0x64 -fn_8038A520 = .text:0x8038A520; // type:function size:0x58 -fn_8038A580 = .text:0x8038A580; // type:function size:0x60 -fn_8038A5E0 = .text:0x8038A5E0; // type:function size:0x58 -fn_8038A640 = .text:0x8038A640; // type:function size:0x88 -fn_8038A6D0 = .text:0x8038A6D0; // type:function size:0x68 +vt_0xA4__14dSoundSource_cFv = .text:0x8038A310; // type:function size:0xB8 +vt_0xA8__14dSoundSource_cFv = .text:0x8038A3D0; // type:function size:0x58 +vt_0xAC__14dSoundSource_cFv = .text:0x8038A430; // type:function size:0x30 +vt_0xBC__14dSoundSource_cFv = .text:0x8038A460; // type:function size:0x48 +vt_0xB0__14dSoundSource_cFv = .text:0x8038A4B0; // type:function size:0x64 +vt_0xC0__14dSoundSource_cFv = .text:0x8038A520; // type:function size:0x58 +vt_0xB4__14dSoundSource_cFv = .text:0x8038A580; // type:function size:0x60 +vt_0xC4__14dSoundSource_cFv = .text:0x8038A5E0; // type:function size:0x58 +vt_0xB8__14dSoundSource_cFv = .text:0x8038A640; // type:function size:0x88 +vt_0xC8__14dSoundSource_cFv = .text:0x8038A6D0; // type:function size:0x68 fn_8038A740 = .text:0x8038A740; // type:function size:0x1E8 fn_8038A930 = .text:0x8038A930; // type:function size:0x1D0 -fn_8038AB00 = .text:0x8038AB00; // type:function size:0x258 -fn_8038AD60 = .text:0x8038AD60; // type:function size:0x58 -fn_8038ADC0 = .text:0x8038ADC0; // type:function size:0xAC -fn_8038AE70 = .text:0x8038AE70; // type:function size:0x98 -fn_8038AF10 = .text:0x8038AF10; // type:function size:0x254 +vt_0xCC__14dSoundSource_cFv = .text:0x8038AB00; // type:function size:0x258 +vt_0xD0__14dSoundSource_cFv = .text:0x8038AD60; // type:function size:0x58 +SetupSound__14dSoundSource_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x8038ADC0; // type:function size:0xAC +d_s_vt_0x1AC__14dSoundSource_cFv = .text:0x8038AE70; // type:function size:0x98 +d_s_vt_0x1B0__14dSoundSource_cFv = .text:0x8038AF10; // type:function size:0x254 getVolumePercentMaybe = .text:0x8038B170; // type:function size:0x78 fn_8038B1F0 = .text:0x8038B1F0; // type:function size:0x90 fn_8038B280 = .text:0x8038B280; // type:function size:0x94 -fn_8038B320 = .text:0x8038B320; // type:function size:0x24 +d_s_vt_0x1C8__14dSoundSource_cFv = .text:0x8038B320; // type:function size:0x24 fn_8038B350 = .text:0x8038B350; // type:function size:0x30 -fn_8038B380 = .text:0x8038B380; // type:function size:0x8 -fn_8038B390 = .text:0x8038B390; // type:function size:0x4 -fn_8038B3A0 = .text:0x8038B3A0; // type:function size:0x8 -fn_8038B3B0 = .text:0x8038B3B0; // type:function size:0x4 -fn_8038B3C0 = .text:0x8038B3C0; // type:function size:0x54 -fn_8038B420 = .text:0x8038B420; // type:function size:0x60 -fn_8038B480 = .text:0x8038B480; // type:function size:0x74 -fn_8038B500 = .text:0x8038B500; // type:function size:0x84 +d_s_vt_0x194__14dSoundSource_cFv = .text:0x8038B380; // type:function size:0x8 +d_vt_0x58__14dSoundSource_cFv = .text:0x8038B390; // type:function size:0x4 +d_s_vt_0x1A0__14dSoundSource_cFv = .text:0x8038B3A0; // type:function size:0x8 +d_vt_0x5C__14dSoundSource_cFv = .text:0x8038B3B0; // type:function size:0x4 +d_s_vt_0x1B4__14dSoundSource_cFv = .text:0x8038B3C0; // type:function size:0x54 +d_s_vt_0x1B8__14dSoundSource_cFv = .text:0x8038B420; // type:function size:0x60 +d_s_vt_0x1BC__14dSoundSource_cFv = .text:0x8038B480; // type:function size:0x74 +d_s_vt_0x1C4__14dSoundSource_cFv = .text:0x8038B500; // type:function size:0x84 fn_8038B590 = .text:0x8038B590; // type:function size:0x24 fn_8038B5C0 = .text:0x8038B5C0; // type:function size:0x24 fn_8038B5F0 = .text:0x8038B5F0; // type:function size:0x60 @@ -21222,19 +21222,19 @@ fn_8038BA80 = .text:0x8038BA80; // type:function size:0x90 fn_8038BB10 = .text:0x8038BB10; // type:function size:0x6C fn_8038BB80 = .text:0x8038BB80; // type:function size:0x6C fn_8038BBF0 = .text:0x8038BBF0; // type:function size:0x144 -fn_8038BD40 = .text:0x8038BD40; // type:function size:0x20 -fn_8038BD60 = .text:0x8038BD60; // type:function size:0xC -fn_8038BD70 = .text:0x8038BD70; // type:function size:0x4 +vt_0xFC__14dSoundSource_cFv = .text:0x8038BD40; // type:function size:0x20 +vt_0x110__14dSoundSource_cFv = .text:0x8038BD60; // type:function size:0xC +d_s_vt_0x1E4__14dSoundSource_cFv = .text:0x8038BD70; // type:function size:0x4 fn_8038BD80 = .text:0x8038BD80; // type:function size:0xB8 -fn_8038BE40 = .text:0x8038BE40; // type:function size:0xC4 +getCharacterTalkSoundId__14dSoundSource_cFUlP14dSoundSource_c = .text:0x8038BE40; // type:function size:0xC4 fn_8038BF10 = .text:0x8038BF10; // type:function size:0x104 -fn_8038C020 = .text:0x8038C020; // type:function size:0x8 -fn_8038C030 = .text:0x8038C030; // type:function size:0x58 +d_s_vt_0x1E8__14dSoundSource_cFv = .text:0x8038C020; // type:function size:0x8 +getRemoConSoundVariant__14dSoundSource_cCFUl = .text:0x8038C030; // type:function size:0x58 fn_8038C090 = .text:0x8038C090; // type:function size:0xBC fn_8038C150 = .text:0x8038C150; // type:function size:0x280 -fn_8038C3D0 = .text:0x8038C3D0; // type:function size:0x18 -fn_8038C3F0 = .text:0x8038C3F0; // type:function size:0x8 -fn_8038C400 = .text:0x8038C400; // type:function size:0x8 +__sinit_\d_snd_source_cpp = .text:0x8038C3D0; // type:function size:0x18 +@88@__dt__14dSoundSource_cFv = .text:0x8038C3F0; // type:function size:0x8 +@4@__dt__14dSoundSource_cFv = .text:0x8038C400; // type:function size:0x8 fn_8038C410 = .text:0x8038C410; // type:function size:0xEC fn_8038C500 = .text:0x8038C500; // type:function size:0xC4 fn_8038C5D0 = .text:0x8038C5D0; // type:function size:0x3D0 @@ -21624,11 +21624,11 @@ fn_80399A40 = .text:0x80399A40; // type:function size:0x50 fn_80399A90 = .text:0x80399A90; // type:function size:0x44 fn_80399AE0 = .text:0x80399AE0; // type:function size:0x5C fn_80399B40 = .text:0x80399B40; // type:function size:0x60 -fn_80399BA0 = .text:0x80399BA0; // type:function size:0x78 -fn_80399C20 = .text:0x80399C20; // type:function size:0x84 -fn_80399CB0 = .text:0x80399CB0; // type:function size:0x10 +__dt__32SndMgrDisposer<14SndMgr80399c20>Fv = .text:0x80399BA0; // type:function size:0x78 +create__32SndMgrDisposer<14SndMgr80399c20>Fv = .text:0x80399C20; // type:function size:0x84 +remove__32SndMgrDisposer<14SndMgr80399c20>Fv = .text:0x80399CB0; // type:function size:0x10 fn_80399CC0 = .text:0x80399CC0; // type:function size:0x34 -fn_80399D00 = .text:0x80399D00; // type:function size:0x5C +__dt__14SndMgr80399c20Fv = .text:0x80399D00; // type:function size:0x5C fn_80399D60 = .text:0x80399D60; // type:function size:0x44 fn_80399DB0 = .text:0x80399DB0; // type:function size:0x34 fn_80399DF0 = .text:0x80399DF0; // type:function size:0x15C @@ -21657,9 +21657,9 @@ fn_8039A7E0 = .text:0x8039A7E0; // type:function size:0x38 fn_8039A820 = .text:0x8039A820; // type:function size:0x8 fn_8039A830 = .text:0x8039A830; // type:function size:0x8 fn_8039A840 = .text:0x8039A840; // type:function size:0x8 -fn_8039A850 = .text:0x8039A850; // type:function size:0x2C -fn_8039A880 = .text:0x8039A880; // type:function size:0x58 -fn_8039A8E0 = .text:0x8039A8E0; // type:function size:0x80 +pitchScaleForPitchIdx = .text:0x8039A850; // type:function size:0x2C +pitchScaleForPitchIdxTenths__Ff = .text:0x8039A880; // type:function size:0x58 +pitchIdxTenthsForPitchScale__Ff = .text:0x8039A8E0; // type:function size:0x80 fn_8039A960 = .text:0x8039A960; // type:function size:0x10 fn_8039A970 = .text:0x8039A970; // type:function size:0x5C fn_8039A9D0 = .text:0x8039A9D0; // type:function size:0x14 @@ -21673,7 +21673,7 @@ AIRegisterDMACallback = .text:0x8039AF80; // type:function size:0x44 AIInitDMA = .text:0x8039AFD0; // type:function size:0x7C AIStartDMA = .text:0x8039B050; // type:function size:0x14 AIStopDMA = .text:0x8039B070; // type:function size:0x14 -fn_8039B090 = .text:0x8039B090; // type:function size:0x10 +AIGetDMABytesLeft = .text:0x8039B090; // type:function size:0x10 fn_8039B0A0 = .text:0x8039B0A0; // type:function size:0x18 fn_8039B0C0 = .text:0x8039B0C0; // type:function size:0x10 AICheckInit = .text:0x8039B0D0; // type:function size:0x8 @@ -21696,73 +21696,73 @@ ARCOpenDir = .text:0x8039BE10; // type:function size:0x7C ARCReadDir = .text:0x8039BE90; // type:function size:0xBC ARCCloseDir = .text:0x8039BF50; // type:function size:0x8 AXInit = .text:0x8039BF60; // type:function size:0x54 -fn_8039BFC0 = .text:0x8039BFC0; // type:function size:0x8 -fn_8039BFD0 = .text:0x8039BFD0; // type:function size:0x14 -fn_8039BFF0 = .text:0x8039BFF0; // type:function size:0xAC -fn_8039C0A0 = .text:0x8039C0A0; // type:function size:0xB0 -fn_8039C150 = .text:0x8039C150; // type:function size:0x1C -fn_8039C170 = .text:0x8039C170; // type:function size:0x10 -fn_8039C180 = .text:0x8039C180; // type:function size:0x84 +AXIsInit = .text:0x8039BFC0; // type:function size:0x8 +__AXGetStackHead = .text:0x8039BFD0; // type:function size:0x14 +__AXServiceCallbackStack = .text:0x8039BFF0; // type:function size:0xAC +__AXAllocInit = .text:0x8039C0A0; // type:function size:0xB0 +__AXPushFreeStack = .text:0x8039C150; // type:function size:0x1C +__AXPushCallbackStack = .text:0x8039C170; // type:function size:0x10 +__AXRemoveFromStack = .text:0x8039C180; // type:function size:0x84 AXFreeVoice = .text:0x8039C210; // type:function size:0x7C AXAcquireVoice = .text:0x8039C290; // type:function size:0x184 AXSetVoicePriority = .text:0x8039C420; // type:function size:0x9C -fn_8039C4C0 = .text:0x8039C4C0; // type:function size:0x114 -fn_8039C5E0 = .text:0x8039C5E0; // type:function size:0x34 -fn_8039C620 = .text:0x8039C620; // type:function size:0x1C +__AXAuxInit = .text:0x8039C4C0; // type:function size:0x114 +__AXGetAuxAInput = .text:0x8039C5E0; // type:function size:0x34 +__AXGetAuxAOutput = .text:0x8039C620; // type:function size:0x1C fn_8039C640 = .text:0x8039C640; // type:function size:0x20 fn_8039C660 = .text:0x8039C660; // type:function size:0x20 fn_8039C680 = .text:0x8039C680; // type:function size:0x20 fn_8039C6A0 = .text:0x8039C6A0; // type:function size:0x20 -fn_8039C6C0 = .text:0x8039C6C0; // type:function size:0x34 -fn_8039C700 = .text:0x8039C700; // type:function size:0x1C +__AXGetAuxBInput = .text:0x8039C6C0; // type:function size:0x34 +__AXGetAuxBOutput = .text:0x8039C700; // type:function size:0x1C fn_8039C720 = .text:0x8039C720; // type:function size:0x20 fn_8039C740 = .text:0x8039C740; // type:function size:0x20 fn_8039C760 = .text:0x8039C760; // type:function size:0x20 fn_8039C780 = .text:0x8039C780; // type:function size:0x20 -fn_8039C7A0 = .text:0x8039C7A0; // type:function size:0x34 -fn_8039C7E0 = .text:0x8039C7E0; // type:function size:0x1C -fn_8039C800 = .text:0x8039C800; // type:function size:0x3AC +__AXGetAuxCInput = .text:0x8039C7A0; // type:function size:0x34 +__AXGetAuxCOutput = .text:0x8039C7E0; // type:function size:0x1C +__AXProcessAux = .text:0x8039C800; // type:function size:0x3AC AXRegisterAuxACallback = .text:0x8039CBB0; // type:function size:0x64 AXRegisterAuxBCallback = .text:0x8039CC20; // type:function size:0x64 AXRegisterAuxCCallback = .text:0x8039CC90; // type:function size:0x64 AXGetAuxACallback = .text:0x8039CD00; // type:function size:0x14 AXGetAuxBCallback = .text:0x8039CD20; // type:function size:0x14 AXGetAuxCCallback = .text:0x8039CD40; // type:function size:0x14 -fn_8039CD60 = .text:0x8039CD60; // type:function size:0x8 -fn_8039CD70 = .text:0x8039CD70; // type:function size:0x30 -fn_8039CDA0 = .text:0x8039CDA0; // type:function size:0x9BC -fn_8039D760 = .text:0x8039D760; // type:function size:0x50 +__AXGetCommandListCycles = .text:0x8039CD60; // type:function size:0x8 +__AXGetCommandListAddress = .text:0x8039CD70; // type:function size:0x30 +__AXNextFrame = .text:0x8039CDA0; // type:function size:0x9BC +__AXClInit = .text:0x8039D760; // type:function size:0x50 AXSetMode = .text:0x8039D7B0; // type:function size:0x8 -fn_8039D7C0 = .text:0x8039D7C0; // type:function size:0x8 +AXGetMode = .text:0x8039D7C0; // type:function size:0x8 fn_8039D7D0 = .text:0x8039D7D0; // type:function size:0x8 -fn_8039D7E0 = .text:0x8039D7E0; // type:function size:0x8 -fn_8039D7F0 = .text:0x8039D7F0; // type:function size:0x8 -fn_8039D800 = .text:0x8039D800; // type:function size:0x8 +AXGetAuxAReturnVolume = .text:0x8039D7E0; // type:function size:0x8 +AXGetAuxBReturnVolume = .text:0x8039D7F0; // type:function size:0x8 +AXGetAuxCReturnVolume = .text:0x8039D800; // type:function size:0x8 AXSetMasterVolume = .text:0x8039D810; // type:function size:0x18 AXSetAuxAReturnVolume = .text:0x8039D830; // type:function size:0x8 AXSetAuxBReturnVolume = .text:0x8039D840; // type:function size:0x8 AXSetAuxCReturnVolume = .text:0x8039D850; // type:function size:0x8 -fn_8039D860 = .text:0x8039D860; // type:function size:0x260 -fn_8039DAC0 = .text:0x8039DAC0; // type:function size:0xB0 +__AXOutNewFrame = .text:0x8039D860; // type:function size:0x260 +__AXOutAiCallback = .text:0x8039DAC0; // type:function size:0xB0 fn_8039DB70 = .text:0x8039DB70; // type:function size:0xC fn_8039DB80 = .text:0x8039DB80; // type:function size:0x54 -fn_8039DBE0 = .text:0x8039DBE0; // type:function size:0x10 +__AXDSPDoneCallback = .text:0x8039DBE0; // type:function size:0x10 fn_8039DBF0 = .text:0x8039DBF0; // type:function size:0x4 -fn_8039DC00 = .text:0x8039DC00; // type:function size:0xEC -fn_8039DCF0 = .text:0x8039DCF0; // type:function size:0x1F8 +__AXOutInitDSP = .text:0x8039DC00; // type:function size:0xEC +__AXOutInit = .text:0x8039DCF0; // type:function size:0x1F8 AXRegisterCallback = .text:0x8039DEF0; // type:function size:0x44 -fn_8039DF40 = .text:0x8039DF40; // type:function size:0x2C -fn_8039DF70 = .text:0x8039DF70; // type:function size:0xC4 -fn_8039E040 = .text:0x8039E040; // type:function size:0x58 +AXRmtGetSamplesLeft = .text:0x8039DF40; // type:function size:0x2C +AXRmtGetSamples = .text:0x8039DF70; // type:function size:0xC4 +AXRmtAdvancePtr = .text:0x8039E040; // type:function size:0x58 fn_8039E0A0 = .text:0x8039E0A0; // type:function size:0xC fn_8039E0B0 = .text:0x8039E0B0; // type:function size:0x6C fn_8039E120 = .text:0x8039E120; // type:function size:0x6C -fn_8039E190 = .text:0x8039E190; // type:function size:0x178 +__AXPrintStudio = .text:0x8039E190; // type:function size:0x178 fn_8039E310 = .text:0x8039E310; // type:function size:0x58 fn_8039E370 = .text:0x8039E370; // type:function size:0x15C fn_8039E4D0 = .text:0x8039E4D0; // type:function size:0x8 fn_8039E4E0 = .text:0x8039E4E0; // type:function size:0x550 -fn_8039EA30 = .text:0x8039EA30; // type:function size:0x310 +__AXSyncPBs = .text:0x8039EA30; // type:function size:0x310 fn_8039ED40 = .text:0x8039ED40; // type:function size:0x8 fn_8039ED50 = .text:0x8039ED50; // type:function size:0x40 fn_8039ED90 = .text:0x8039ED90; // type:function size:0x30 @@ -21770,43 +21770,43 @@ fn_8039EDC0 = .text:0x8039EDC0; // type:function size:0x28C AXSetVoiceState = .text:0x8039F050; // type:function size:0x70 AXSetVoiceAddr = .text:0x8039F0C0; // type:function size:0xE8 AXGetLpfCoefs = .text:0x8039F1B0; // type:function size:0xBC -fn_8039F270 = .text:0x8039F270; // type:function size:0x8 +AXSetMaxDspCycles = .text:0x8039F270; // type:function size:0x8 AXGetMaxVoices = .text:0x8039F280; // type:function size:0x8 -fn_8039F290 = .text:0x8039F290; // type:function size:0x40 -fn_8039F2D0 = .text:0x8039F2D0; // type:function size:0x64 -fn_8039F340 = .text:0x8039F340; // type:function size:0x24 -fn_8039F370 = .text:0x8039F370; // type:function size:0x4 -fn_8039F380 = .text:0x8039F380; // type:function size:0x19C -fn_8039F520 = .text:0x8039F520; // type:function size:0x54 -fn_8039F580 = .text:0x8039F580; // type:function size:0x524 -__AllocDelayLine = .text:0x8039FAB0; // type:function size:0x174 -__BzeroDelayLines = .text:0x8039FC30; // type:function size:0x124 -__FreeDelayLine = .text:0x8039FD60; // type:function size:0x114 +__AXGetCurrentProfile = .text:0x8039F290; // type:function size:0x40 scope:local +AXFXReverbHiInit = .text:0x8039F2D0; // type:function size:0x64 +AXFXReverbHiShutdown = .text:0x8039F340; // type:function size:0x24 +AXFXReverbHiCallback = .text:0x8039F370; // type:function size:0x4 +AXFXReverbHiExpInit = .text:0x8039F380; // type:function size:0x19C +AXFXReverbHiExpShutdown = .text:0x8039F520; // type:function size:0x54 +AXFXReverbHiExpCallback = .text:0x8039F580; // type:function size:0x524 +__AllocDelayLine = .text:0x8039FAB0; // type:function size:0x174 scope:local +__BzeroDelayLines = .text:0x8039FC30; // type:function size:0x124 scope:local +__FreeDelayLine = .text:0x8039FD60; // type:function size:0x114 scope:local fn_8039FE80 = .text:0x8039FE80; // type:function size:0x324 -fn_803A01B0 = .text:0x803A01B0; // type:function size:0x60 -fn_803A0210 = .text:0x803A0210; // type:function size:0x17C -fn_803A0390 = .text:0x803A0390; // type:function size:0xD0 -fn_803A0460 = .text:0x803A0460; // type:function size:0xB4 -fn_803A0520 = .text:0x803A0520; // type:function size:0x54 -fn_803A0580 = .text:0x803A0580; // type:function size:0x36C -fn_803A08F0 = .text:0x803A08F0; // type:function size:0x144 -fn_803A0A40 = .text:0x803A0A40; // type:function size:0x100 -fn_803A0B40 = .text:0x803A0B40; // type:function size:0xF0 -fn_803A0C30 = .text:0x803A0C30; // type:function size:0x2AC -fn_803A0EE0 = .text:0x803A0EE0; // type:function size:0x60 -fn_803A0F40 = .text:0x803A0F40; // type:function size:0x198 -fn_803A10E0 = .text:0x803A10E0; // type:function size:0xD0 -fn_803A11B0 = .text:0x803A11B0; // type:function size:0xB4 -fn_803A1270 = .text:0x803A1270; // type:function size:0x54 -fn_803A12D0 = .text:0x803A12D0; // type:function size:0x384 -fn_803A1660 = .text:0x803A1660; // type:function size:0x144 -fn_803A17B0 = .text:0x803A17B0; // type:function size:0x100 -fn_803A18B0 = .text:0x803A18B0; // type:function size:0xF0 -fn_803A19A0 = .text:0x803A19A0; // type:function size:0x2B0 -fn_803A1C50 = .text:0x803A1C50; // type:function size:0xC -fn_803A1C60 = .text:0x803A1C60; // type:function size:0xC -fn_803A1C70 = .text:0x803A1C70; // type:function size:0xC -fn_803A1C80 = .text:0x803A1C80; // type:function size:0x14 +AXFXReverbStdExpGetMemSize = .text:0x803A01B0; // type:function size:0x60 +AXFXReverbStdExpInit = .text:0x803A0210; // type:function size:0x17C +AXFXReverbStdExpSettings = .text:0x803A0390; // type:function size:0xD0 +AXFXReverbStdExpSettingsUpdate = .text:0x803A0460; // type:function size:0xB4 +AXFXReverbStdExpShutdown = .text:0x803A0520; // type:function size:0x54 +AXFXReverbStdExpCallback = .text:0x803A0580; // type:function size:0x36C +__AllocDelayLine = .text:0x803A08F0; // type:function size:0x144 scope:local +__BzeroDelayLines = .text:0x803A0A40; // type:function size:0x100 scope:local +__FreeDelayLine = .text:0x803A0B40; // type:function size:0xF0 scope:local +__InitParams = .text:0x803A0C30; // type:function size:0x2AC scope:local +AXFXReverbStdExpGetMemSizeDpl2 = .text:0x803A0EE0; // type:function size:0x60 +AXFXReverbStdExpInitDpl2 = .text:0x803A0F40; // type:function size:0x198 +AXFXReverbStdExpSettingsDpl2 = .text:0x803A10E0; // type:function size:0xD0 +AXFXReverbStdExpSettingsUpdateDpl2 = .text:0x803A11B0; // type:function size:0xB4 +AXFXReverbStdExpShutdownDpl2 = .text:0x803A1270; // type:function size:0x54 +AXFXReverbStdExpCallbackDpl2 = .text:0x803A12D0; // type:function size:0x384 +__AllocDelayLine = .text:0x803A1660; // type:function size:0x144 scope:local +__BzeroDelayLines = .text:0x803A17B0; // type:function size:0x100 scope:local +__FreeDelayLine = .text:0x803A18B0; // type:function size:0xF0 scope:local +__InitParams = .text:0x803A19A0; // type:function size:0x2B0 scope:local +__AXFXAllocFunction = .text:0x803A1C50; // type:function size:0xC scope:local +__AXFXFreeFunction = .text:0x803A1C60; // type:function size:0xC scope:local +AXFXSetHooks = .text:0x803A1C70; // type:function size:0xC +AXFXGetHooks = .text:0x803A1C80; // type:function size:0x14 PPCMfmsr = .text:0x803A1CA0; // type:function size:0x8 scope:global PPCMtmsr = .text:0x803A1CB0; // type:function size:0x8 scope:global PPCMfhid0 = .text:0x803A1CC0; // type:function size:0x8 scope:global @@ -22598,18 +22598,18 @@ fn_803CDC00 = .text:0x803CDC00; // type:function size:0x18 fn_803CDC20 = .text:0x803CDC20; // type:function size:0x70 fn_803CDC90 = .text:0x803CDC90; // type:function size:0x6C MEMGetNextListObject = .text:0x803CDD00; // type:function size:0x20 -dsp__DSPCheckMailToDSP = .text:0x803CDD20; // type:function size:0x10 -dsp__DSPCheckMailFromDSP = .text:0x803CDD30; // type:function size:0x10 -dsp__DSPReadMailFromDSP = .text:0x803CDD40; // type:function size:0x14 -dsp__DSPSendMailToDSP = .text:0x803CDD60; // type:function size:0x14 -dsp__DSPInit = .text:0x803CDD80; // type:function size:0xC0 +DSPCheckMailToDSP = .text:0x803CDD20; // type:function size:0x10 +DSPCheckMailFromDSP = .text:0x803CDD30; // type:function size:0x10 +DSPReadMailFromDSP = .text:0x803CDD40; // type:function size:0x14 +DSPSendMailToDSP = .text:0x803CDD60; // type:function size:0x14 +DSPInit = .text:0x803CDD80; // type:function size:0xC0 fn_803CDE40 = .text:0x803CDE40; // type:function size:0x8 -fn_803CDE50 = .text:0x803CDE50; // type:function size:0x70 +DSPAddTask = .text:0x803CDE50; // type:function size:0x70 fn_803CDEC0 = .text:0x803CDEC0; // type:function size:0xBC -dsp____DSP_debug_printf = .text:0x803CDF80; // type:function size:0x50 +__DSP_debug_printf = .text:0x803CDF80; // type:function size:0x50 fn_803CDFD0 = .text:0x803CDFD0; // type:function size:0x42C -dsp____DSP_exec_task = .text:0x803CE400; // type:function size:0x1A4 -dsp____DSP_boot_task = .text:0x803CE5B0; // type:function size:0x18C +__DSP_exec_task = .text:0x803CE400; // type:function size:0x1A4 +__DSP_boot_task = .text:0x803CE5B0; // type:function size:0x18C fn_803CE740 = .text:0x803CE740; // type:function size:0xA0 fn_803CE7E0 = .text:0x803CE7E0; // type:function size:0x88 ESP_InitLib = .text:0x803CE870; // type:function size:0x54 scope:global @@ -25014,28 +25014,28 @@ __ct__Q44nw4r3snd6detail13AnimSoundImplFRQ34nw4r3snd14SoundStartablePQ44nw4r3snd __dt__Q44nw4r3snd6detail13AnimSoundImplFv = .text:0x80461780; // type:function size:0xC8 Setup__Q44nw4r3snd6detail13AnimSoundImplFPCv = .text:0x80461850; // type:function size:0xE8 Shutdown__Q44nw4r3snd6detail13AnimSoundImplFv = .text:0x80461940; // type:function size:0xA0 -FUN_804619e0 = .text:0x804619E0; // type:function size:0x1C -FUN_80461a00 = .text:0x80461A00; // type:function size:0x14C -FUN_80461b50 = .text:0x80461B50; // type:function size:0x220 -FUN_80461d70 = .text:0x80461D70; // type:function size:0x284 -FUN_80462000 = .text:0x80462000; // type:function size:0x2B0 -FUN_804622b0 = .text:0x804622B0; // type:function size:0x30C -FUN_804625c0 = .text:0x804625C0; // type:function size:0x30C -FUN_804628d0 = .text:0x804628D0; // type:function size:0x2B8 -nw4r__snd__detail__shdAnimSoundImpl__HoldEvent = .text:0x80462B90; // type:function size:0x2E0 -nw4r__snd__detail__shdAnimEventPlayer____ct = .text:0x80462E70; // type:function size:0x14 -nw4r__snd__detail__shdAnimEventPlayer____dt = .text:0x80462E90; // type:function size:0x88 -nw4r__snd__detail__AnimSoundFileReader__AnimSoundFileReader = .text:0x80462F20; // type:function size:0xC -nw4r__snd__detail__AnimSoundFileReader__Setup = .text:0x80462F30; // type:function size:0x6C -nw4r__snd__detail__AnimSoundFileReader__Shutdown = .text:0x80462FA0; // type:function size:0x10 -nw4r__snd__detail__AnimSoundFileReader__GetEventCount = .text:0x80462FB0; // type:function size:0x44 -nw4r__snd__detail__AnimSoundFileReader__GetEventRef = .text:0x80463000; // type:function size:0x58 -nw4r__snd__detail__AnimSoundFileReader__GetEvent = .text:0x80463060; // type:function size:0x74 +ResetFrame__Q44nw4r3snd6detail13AnimSoundImplFfi = .text:0x804619E0; // type:function size:0x1C +UpdateFrame__Q44nw4r3snd6detail13AnimSoundImplFfQ54nw4r3snd6detail13AnimSoundImpl13PlayDirection = .text:0x80461A00; // type:function size:0x14C +UpdateForward__Q44nw4r3snd6detail13AnimSoundImplFf = .text:0x80461B50; // type:function size:0x220 +UpdateBackward__Q44nw4r3snd6detail13AnimSoundImplFf = .text:0x80461D70; // type:function size:0x284 +UpdateTrigger__Q44nw4r3snd6detail13AnimSoundImplFPCQ44nw4r3snd6detail12AnimEventReflQ54nw4r3snd6detail13AnimSoundImpl13PlayDirection = .text:0x80462000; // type:function size:0x2B0 +UpdateForwardRange__Q44nw4r3snd6detail13AnimSoundImplFPCQ44nw4r3snd6detail12AnimEventRefl = .text:0x804622B0; // type:function size:0x30C +UpdateBackwardRange__Q44nw4r3snd6detail13AnimSoundImplFPCQ44nw4r3snd6detail12AnimEventRefl = .text:0x804625C0; // type:function size:0x30C +StartEvent__Q44nw4r3snd6detail13AnimSoundImplFPCQ44nw4r3snd6detail9AnimEventb = .text:0x804628D0; // type:function size:0x2B8 +HoldEvent__Q44nw4r3snd6detail13AnimSoundImplFPCQ44nw4r3snd6detail9AnimEventb = .text:0x80462B90; // type:function size:0x2E0 +__ct__Q44nw4r3snd6detail15AnimEventPlayerFv = .text:0x80462E70; // type:function size:0x14 +__dt__Q44nw4r3snd6detail15AnimEventPlayerFv = .text:0x80462E90; // type:function size:0x88 +__ct__Q44nw4r3snd6detail19AnimSoundFileReaderFv = .text:0x80462F20; // type:function size:0xC +Setup__Q44nw4r3snd6detail19AnimSoundFileReaderFPCv = .text:0x80462F30; // type:function size:0x6C +Shutdown__Q44nw4r3snd6detail19AnimSoundFileReaderFv = .text:0x80462FA0; // type:function size:0x10 +GetEventCount__Q44nw4r3snd6detail19AnimSoundFileReaderCFv = .text:0x80462FB0; // type:function size:0x44 +GetEventRef__Q44nw4r3snd6detail19AnimSoundFileReaderCFUl = .text:0x80463000; // type:function size:0x58 +GetEvent__Q44nw4r3snd6detail19AnimSoundFileReaderCFPCQ44nw4r3snd6detail12AnimEventRef = .text:0x80463060; // type:function size:0x74 __ct__Q44nw4r3snd6detail9AxManagerFv = .text:0x804630E0; // type:function size:0x218 -__ct__Q34nw4r2ut30LinkListFv = .text:0x80463300; // type:function size:0x18 -__dt__Q34nw4r2ut30LinkListFv = .text:0x80463320; // type:function size:0x58 +__ct__Q34nw4r2ut30LinkListFv = .text:0x80463300; // type:function size:0x18 scope:weak +__dt__Q34nw4r2ut30LinkListFv = .text:0x80463320; // type:function size:0x58 scope:weak GetInstance__Q44nw4r3snd6detail9AxManagerFv = .text:0x80463380; // type:function size:0x64 -__dt__Q44nw4r3snd6detail9AxManagerFv = .text:0x804633F0; // type:function size:0x78 +__dt__Q44nw4r3snd6detail9AxManagerFv = .text:0x804633F0; // type:function size:0x78 scope:weak Init__Q44nw4r3snd6detail9AxManagerFv = .text:0x80463470; // type:function size:0x128 GetOutputVolume__Q44nw4r3snd6detail9AxManagerCFv = .text:0x804635A0; // type:function size:0x6C Update__Q44nw4r3snd6detail9AxManagerFv = .text:0x80463610; // type:function size:0x3CC @@ -25089,7 +25089,7 @@ SetVoiceSrcType__Q44nw4r3snd6detail17AxVoiceParamBlockFUl = .text:0x804671E0; // SetVoiceRmtMix__Q44nw4r3snd6detail17AxVoiceParamBlockFRC11_AXPBRMTMIX = .text:0x804672C0; // type:function size:0x1EC SetVoiceRmtIIRCoefs__Q44nw4r3snd6detail17AxVoiceParamBlockFUse = .text:0x804674B0; // type:function size:0x184 GetInstance__Q44nw4r3snd6detail14AxVoiceManagerFv = .text:0x80467640; // type:function size:0x8C -__dt__Q44nw4r3snd6detail14AxVoiceManagerFv = .text:0x804676D0; // type:function size:0x84 +__dt__Q44nw4r3snd6detail14AxVoiceManagerFv = .text:0x804676D0; // type:function size:0x84 scope:weak GetRequiredMemSize__Q44nw4r3snd6detail14AxVoiceManagerFi = .text:0x80467760; // type:function size:0xC Setup__Q44nw4r3snd6detail14AxVoiceManagerFPvUl = .text:0x80467770; // type:function size:0xBC AcquireAxVoice__Q44nw4r3snd6detail14AxVoiceManagerFUlPFPQ44nw4r3snd6detail7AxVoiceQ54nw4r3snd6detail7AxVoice21AxVoiceCallbackStatusPv_vPv = .text:0x80467830; // type:function size:0x2B8 @@ -25119,7 +25119,7 @@ SetBiquadFilter__Q44nw4r3snd6detail11BasicPlayerFif = .text:0x80468AD0; // type: SetRemoteFilter__Q44nw4r3snd6detail11BasicPlayerFi = .text:0x80468AE0; // type:function size:0x8 SetRemoteOutVolume__Q44nw4r3snd6detail11BasicPlayerFif = .text:0x80468AF0; // type:function size:0x10 GetRemoteOutVolume__Q44nw4r3snd6detail11BasicPlayerCFi = .text:0x80468B00; // type:function size:0x10 -__dt__Q44nw4r3snd6detail11BasicPlayerFv = .text:0x80468B10; // type:function size:0x40 +__dt__Q44nw4r3snd6detail11BasicPlayerFv = .text:0x80468B10; // type:function size:0x40 scope:weak __ct__Q44nw4r3snd6detail10BasicSoundFii = .text:0x80468B50; // type:function size:0xE0 InitParam__Q44nw4r3snd6detail10BasicSoundFv = .text:0x80468C30; // type:function size:0x154 StartPrepared__Q44nw4r3snd6detail10BasicSoundFv = .text:0x80468D90; // type:function size:0x18 @@ -25140,30 +25140,29 @@ AttachSoundActor__Q44nw4r3snd6detail10BasicSoundFPQ34nw4r3snd10SoundActor = .tex DetachSoundActor__Q44nw4r3snd6detail10BasicSoundFPQ34nw4r3snd10SoundActor = .text:0x80469EB0; // type:function size:0xC AttachExternalSoundPlayer__Q44nw4r3snd6detail10BasicSoundFPQ44nw4r3snd6detail19ExternalSoundPlayer = .text:0x80469EC0; // type:function size:0x8 DetachExternalSoundPlayer__Q44nw4r3snd6detail10BasicSoundFPQ44nw4r3snd6detail19ExternalSoundPlayer = .text:0x80469ED0; // type:function size:0xC -FUN_80469ee0 = .text:0x80469EE0; // type:function size:0x24 +GetRemainingFadeFrames__Q44nw4r3snd6detail10BasicSoundCFv = .text:0x80469EE0; // type:function size:0x24 GetVoiceOutCount__Q44nw4r3snd6detail10BasicSoundCFv = .text:0x80469F10; // type:function size:0x8 SetPlayerPriority__Q44nw4r3snd6detail10BasicSoundFi = .text:0x80469F20; // type:function size:0x58 -OnUpdatePlayerPriority__Q44nw4r3snd6detail10BasicSoundFv = .text:0x80469F80; // type:function size:0x4 +OnUpdatePlayerPriority__Q44nw4r3snd6detail10BasicSoundFv = .text:0x80469F80; // type:function size:0x4 scope:weak SetInitialVolume__Q44nw4r3snd6detail10BasicSoundFf = .text:0x80469F90; // type:function size:0x18 SetVolume__Q44nw4r3snd6detail10BasicSoundFfi = .text:0x80469FB0; // type:function size:0x90 SetPitch__Q44nw4r3snd6detail10BasicSoundFf = .text:0x8046A040; // type:function size:0x8 SetPan__Q44nw4r3snd6detail10BasicSoundFf = .text:0x8046A050; // type:function size:0x8 -FUN_8046a060 = .text:0x8046A060; // type:function size:0x8 -FUN_8046a070 = .text:0x8046A070; // type:function size:0x8 -FUN_8046a080 = .text:0x8046A080; // type:function size:0x8 -SetRemoteOutVolume__Q44nw4r3snd6detail10BasicSoundFif = .text:0x8046A090; // type:function size:0x10 +SetSurroundPan__Q44nw4r3snd6detail10BasicSoundFf = .text:0x8046A060; // type:function size:0x8 +SetLpfFreq__Q44nw4r3snd6detail10BasicSoundFf = .text:0x8046A070; // type:function size:0x8 +SetOutputLineFlag__Q44nw4r3snd6detail10BasicSoundFi = .text:0x8046A080; // type:function size:0x8 +SetFxSend__Q44nw4r3snd6detail10BasicSoundFQ34nw4r3snd6AuxBusf = .text:0x8046A090; // type:function size:0x10 SetRemoteFilter__Q44nw4r3snd6detail10BasicSoundFi = .text:0x8046A0A0; // type:function size:0x40 SetPanMode__Q44nw4r3snd6detail10BasicSoundFQ34nw4r3snd7PanMode = .text:0x8046A0E0; // type:function size:0x3C SetPanCurve__Q44nw4r3snd6detail10BasicSoundFQ34nw4r3snd8PanCurve = .text:0x8046A120; // type:function size:0x3C SetAmbientInfo__Q44nw4r3snd6detail10BasicSoundFRCQ54nw4r3snd6detail10BasicSound11AmbientInfo = .text:0x8046A160; // type:function size:0xC4 -GetAmbientPriority__Q44nw4r3snd6detail10BasicSoundFRCQ54nw4r3snd6detail10BasicSound11AmbientInfoUl = .text:0x8046A230; // type:function size:0x34 -fn_8046A264 = .text:0x8046A264; // type:function size:0x4 +GetAmbientPriority__Q44nw4r3snd6detail10BasicSoundFRCQ54nw4r3snd6detail10BasicSound11AmbientInfoUl = .text:0x8046A230; // type:function size:0x38 IsAttachedGeneralHandle__Q44nw4r3snd6detail10BasicSoundFv = .text:0x8046A270; // type:function size:0x14 IsAttachedTempGeneralHandle__Q44nw4r3snd6detail10BasicSoundFv = .text:0x8046A290; // type:function size:0x14 DetachGeneralHandle__Q44nw4r3snd6detail10BasicSoundFv = .text:0x8046A2B0; // type:function size:0x8 DetachTempGeneralHandle__Q44nw4r3snd6detail10BasicSoundFv = .text:0x8046A2C0; // type:function size:0x8 SetId__Q44nw4r3snd6detail10BasicSoundFUl = .text:0x8046A2D0; // type:function size:0x40 -__dt__Q44nw4r3snd6detail10BasicSoundFv = .text:0x8046A310; // type:function size:0x40 +__dt__Q44nw4r3snd6detail10BasicSoundFv = .text:0x8046A310; // type:function size:0x40 scope:weak GetRuntimeTypeInfo__Q44nw4r3snd6detail10BasicSoundCFv = .text:0x8046A350; // type:function size:0x8 scope:weak __sinit_\snd_BasicSound_cpp = .text:0x8046A360; // type:function size:0xC scope:local GetCoef__Q44nw4r3snd6detail15BiquadFilterLpfCFifPQ44nw4r3snd20BiquadFilterCallback10BiquadCoef = .text:0x8046A370; // type:function size:0x88 @@ -25171,13 +25170,13 @@ GetCoef__Q44nw4r3snd6detail15BiquadFilterHpfCFifPQ44nw4r3snd20BiquadFilterCallba GetCoef__Q44nw4r3snd6detail18BiquadFilterBpf512CFifPQ44nw4r3snd20BiquadFilterCallback10BiquadCoef = .text:0x8046A490; // type:function size:0x94 GetCoef__Q44nw4r3snd6detail19BiquadFilterBpf1024CFifPQ44nw4r3snd20BiquadFilterCallback10BiquadCoef = .text:0x8046A530; // type:function size:0x94 GetCoef__Q44nw4r3snd6detail19BiquadFilterBpf2048CFifPQ44nw4r3snd20BiquadFilterCallback10BiquadCoef = .text:0x8046A5D0; // type:function size:0x94 -__dt__Q44nw4r3snd6detail15BiquadFilterLpfFv = .text:0x8046A670; // type:function size:0x40 -__dt__Q44nw4r3snd6detail15BiquadFilterHpfFv = .text:0x8046A6B0; // type:function size:0x40 -__dt__Q44nw4r3snd6detail18BiquadFilterBpf512Fv = .text:0x8046A6F0; // type:function size:0x40 -__dt__Q44nw4r3snd6detail19BiquadFilterBpf1024Fv = .text:0x8046A730; // type:function size:0x40 -__dt__Q44nw4r3snd6detail19BiquadFilterBpf2048Fv = .text:0x8046A770; // type:function size:0x40 +__dt__Q44nw4r3snd6detail15BiquadFilterLpfFv = .text:0x8046A670; // type:function size:0x40 scope:weak +__dt__Q44nw4r3snd6detail15BiquadFilterHpfFv = .text:0x8046A6B0; // type:function size:0x40 scope:weak +__dt__Q44nw4r3snd6detail18BiquadFilterBpf512Fv = .text:0x8046A6F0; // type:function size:0x40 scope:weak +__dt__Q44nw4r3snd6detail19BiquadFilterBpf1024Fv = .text:0x8046A730; // type:function size:0x40 scope:weak +__dt__Q44nw4r3snd6detail19BiquadFilterBpf2048Fv = .text:0x8046A770; // type:function size:0x40 scope:weak GetInstance__Q44nw4r3snd6detail14ChannelManagerFv = .text:0x8046A7B0; // type:function size:0x74 -__dt__Q44nw4r3snd6detail14ChannelManagerFv = .text:0x8046A830; // type:function size:0x60 +__dt__Q44nw4r3snd6detail14ChannelManagerFv = .text:0x8046A830; // type:function size:0x60 scope:weak GetRequiredMemSize__Q44nw4r3snd6detail14ChannelManagerFi = .text:0x8046A890; // type:function size:0xC Setup__Q44nw4r3snd6detail14ChannelManagerFPvUl = .text:0x8046A8A0; // type:function size:0x94 UpdateAllChannel__Q44nw4r3snd6detail14ChannelManagerFv = .text:0x8046A940; // type:function size:0x54 @@ -25194,7 +25193,7 @@ VoiceCallbackFunc__Q44nw4r3snd6detail7ChannelFPQ44nw4r3snd6detail5VoiceQ54nw4r3s AllocChannel__Q44nw4r3snd6detail7ChannelFiiiPFPQ44nw4r3snd6detail7ChannelQ54nw4r3snd6detail7Channel21ChannelCallbackStatusUl_vUl = .text:0x8046B5C0; // type:function size:0x1EC FreeChannel__Q44nw4r3snd6detail7ChannelFPQ44nw4r3snd6detail7Channel = .text:0x8046B7B0; // type:function size:0x18 GetInstance__Q44nw4r3snd6detail22DisposeCallbackManagerFv = .text:0x8046B7D0; // type:function size:0x8C -__dt__Q44nw4r3snd6detail22DisposeCallbackManagerFv = .text:0x8046B860; // type:function size:0x5C +__dt__Q44nw4r3snd6detail22DisposeCallbackManagerFv = .text:0x8046B860; // type:function size:0x5C scope:weak RegisterDisposeCallback__Q44nw4r3snd6detail22DisposeCallbackManagerFPQ44nw4r3snd6detail15DisposeCallback = .text:0x8046B8C0; // type:function size:0x30 UnregisterDisposeCallback__Q44nw4r3snd6detail22DisposeCallbackManagerFPQ44nw4r3snd6detail15DisposeCallback = .text:0x8046B8F0; // type:function size:0x4 Dispose__Q44nw4r3snd6detail22DisposeCallbackManagerFPvUlPv = .text:0x8046B900; // type:function size:0x12C @@ -25210,11 +25209,11 @@ LoadHeader__Q34nw4r3snd15DvdSoundArchiveFPvUl = .text:0x8046BF60; // type:functi LoadLabelStringData__Q34nw4r3snd15DvdSoundArchiveFPvUl = .text:0x8046BFF0; // type:function size:0x88 Read__Q44nw4r3snd15DvdSoundArchive13DvdFileStreamFPvUl = .text:0x8046C080; // type:function size:0x2C Seek__Q44nw4r3snd15DvdSoundArchive13DvdFileStreamFlUl = .text:0x8046C0B0; // type:function size:0x80 -GetSize__Q44nw4r3snd15DvdSoundArchive13DvdFileStreamCFv = .text:0x8046C130; // type:function size:0x8 -Tell__Q44nw4r3snd15DvdSoundArchive13DvdFileStreamCFv = .text:0x8046C140; // type:function size:0x10 -detail_GetWaveDataFileAddress__Q34nw4r3snd15DvdSoundArchiveCFUl = .text:0x8046C150; // type:function size:0x8 -detail_GetFileAddress__Q34nw4r3snd15DvdSoundArchiveCFUl = .text:0x8046C160; // type:function size:0x8 -__dt__Q44nw4r3snd15DvdSoundArchive13DvdFileStreamFv = .text:0x8046C170; // type:function size:0x58 +GetSize__Q44nw4r3snd15DvdSoundArchive13DvdFileStreamCFv = .text:0x8046C130; // type:function size:0x8 scope:weak +Tell__Q44nw4r3snd15DvdSoundArchive13DvdFileStreamCFv = .text:0x8046C140; // type:function size:0x10 scope:weak +detail_GetWaveDataFileAddress__Q34nw4r3snd15DvdSoundArchiveCFUl = .text:0x8046C150; // type:function size:0x8 scope:weak +detail_GetFileAddress__Q34nw4r3snd15DvdSoundArchiveCFUl = .text:0x8046C160; // type:function size:0x8 scope:weak +__dt__Q44nw4r3snd15DvdSoundArchive13DvdFileStreamFv = .text:0x8046C170; // type:function size:0x58 scope:weak __ct__Q44nw4r3snd6detail12EnvGeneratorFv = .text:0x8046C1D0; // type:function size:0x44 Init__Q44nw4r3snd6detail12EnvGeneratorFf = .text:0x8046C220; // type:function size:0x40 Reset__Q44nw4r3snd6detail12EnvGeneratorFf = .text:0x8046C260; // type:function size:0x18 @@ -25272,27 +25271,26 @@ OpenExtStream__Q34nw4r3snd18MemorySoundArchiveCFPviPCcUlUl = .text:0x8046E210; / detail_GetRequiredStreamBufferSize__Q34nw4r3snd18MemorySoundArchiveCFv = .text:0x8046E220; // type:function size:0x8 Close__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFv = .text:0x8046E230; // type:function size:0x14 Read__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFPvUl = .text:0x8046E250; // type:function size:0x58 -Seek__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFlUl = .text:0x8046E2B0; // type:function size:0x44 -fn_8046E2F4 = .text:0x8046E2F4; // type:function size:0x4 -GetSize__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E300; // type:function size:0x8 -Tell__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E310; // type:function size:0x8 -CanWrite__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E320; // type:function size:0x8 -CanRead__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E330; // type:function size:0x8 -CanAsync__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E340; // type:function size:0x8 -CanCancel__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E350; // type:function size:0x8 -CanSeek__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E360; // type:function size:0x8 -__dt__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFv = .text:0x8046E370; // type:function size:0x40 -OnUpdateFrameSoundThread__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x8046E3B0; // type:function size:0x4 -OnShutdownSoundThread__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x8046E3C0; // type:function size:0x10 -InvalidateWaveData__Q44nw4r3snd6detail9SeqPlayerFPCvPCv = .text:0x8046E3D0; // type:function size:0x4 -OnUpdateVoiceSoundThread__Q54nw4r3snd6detail11SoundThread14PlayerCallbackFv = .text:0x8046E3E0; // type:function size:0x4 -IsPause__Q44nw4r3snd6detail9SeqPlayerCFv = .text:0x8046E3F0; // type:function size:0x8 -IsStarted__Q44nw4r3snd6detail9SeqPlayerCFv = .text:0x8046E400; // type:function size:0x8 -IsActive__Q44nw4r3snd6detail9SeqPlayerCFv = .text:0x8046E410; // type:function size:0x8 -@180@InvalidateWaveData__Q44nw4r3snd6detail9SeqPlayerFPCvPCv = .text:0x8046E420; // type:function size:0x8 -@180@InvalidateData__Q44nw4r3snd6detail9SeqPlayerFPCvPCv = .text:0x8046E430; // type:function size:0x8 -@192@OnShutdownSoundThread__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x8046E440; // type:function size:0x8 -@192@OnUpdateFrameSoundThread__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x8046E450; // type:function size:0x8 +Seek__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFlUl = .text:0x8046E2B0; // type:function size:0x48 +GetSize__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E300; // type:function size:0x8 scope:weak +Tell__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E310; // type:function size:0x8 scope:weak +CanWrite__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E320; // type:function size:0x8 scope:weak +CanRead__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E330; // type:function size:0x8 scope:weak +CanAsync__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E340; // type:function size:0x8 scope:weak +CanCancel__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E350; // type:function size:0x8 scope:weak +CanSeek__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamCFv = .text:0x8046E360; // type:function size:0x8 scope:weak +__dt__Q44nw4r3snd18MemorySoundArchive16MemoryFileStreamFv = .text:0x8046E370; // type:function size:0x40 scope:weak +OnUpdateFrameSoundThread__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x8046E3B0; // type:function size:0x4 scope:weak +OnShutdownSoundThread__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x8046E3C0; // type:function size:0x10 scope:weak +InvalidateWaveData__Q44nw4r3snd6detail9SeqPlayerFPCvPCv = .text:0x8046E3D0; // type:function size:0x4 scope:weak +OnUpdateVoiceSoundThread__Q54nw4r3snd6detail11SoundThread14PlayerCallbackFv = .text:0x8046E3E0; // type:function size:0x4 scope:weak +IsPause__Q44nw4r3snd6detail9SeqPlayerCFv = .text:0x8046E3F0; // type:function size:0x8 scope:weak +IsStarted__Q44nw4r3snd6detail9SeqPlayerCFv = .text:0x8046E400; // type:function size:0x8 scope:weak +IsActive__Q44nw4r3snd6detail9SeqPlayerCFv = .text:0x8046E410; // type:function size:0x8 scope:weak +@180@InvalidateWaveData__Q44nw4r3snd6detail9SeqPlayerFPCvPCv = .text:0x8046E420; // type:function size:0x8 scope:weak +@180@InvalidateData__Q44nw4r3snd6detail9SeqPlayerFPCvPCv = .text:0x8046E430; // type:function size:0x8 scope:weak +@192@OnShutdownSoundThread__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x8046E440; // type:function size:0x8 scope:weak +@192@OnUpdateFrameSoundThread__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x8046E450; // type:function size:0x8 scope:weak Parse__Q44nw4r3snd6detail9MmlParserCFPQ44nw4r3snd6detail11MmlSeqTrackb = .text:0x8046E460; // type:function size:0x68C CommandProc__Q44nw4r3snd6detail9MmlParserCFPQ44nw4r3snd6detail11MmlSeqTrackUlll = .text:0x8046EAF0; // type:function size:0x97C NoteOnCommandProc__Q44nw4r3snd6detail9MmlParserCFPQ44nw4r3snd6detail11MmlSeqTrackiilb = .text:0x8046F470; // type:function size:0x18 @@ -25300,30 +25298,30 @@ ReadArg__Q44nw4r3snd6detail9MmlParserCFPPCUcPQ44nw4r3snd6detail9SeqPlayerPQ44nw4 ParseAllocTrack__Q44nw4r3snd6detail9MmlParserFPCvUlPUl = .text:0x8046F600; // type:function size:0x3C __ct__Q44nw4r3snd6detail11MmlSeqTrackFv = .text:0x8046F640; // type:function size:0x3C Parse__Q44nw4r3snd6detail11MmlSeqTrackFb = .text:0x8046F680; // type:function size:0x14 -__dt__Q44nw4r3snd6detail11MmlSeqTrackFv = .text:0x8046F6A0; // type:function size:0x58 +__dt__Q44nw4r3snd6detail11MmlSeqTrackFv = .text:0x8046F6A0; // type:function size:0x58 scope:weak AllocTrack__Q44nw4r3snd6detail20MmlSeqTrackAllocatorFPQ44nw4r3snd6detail9SeqPlayer = .text:0x8046F700; // type:function size:0x68 FreeTrack__Q44nw4r3snd6detail20MmlSeqTrackAllocatorFPQ44nw4r3snd6detail8SeqTrack = .text:0x8046F770; // type:function size:0x68 Create__Q44nw4r3snd6detail20MmlSeqTrackAllocatorFPvUl = .text:0x8046F7E0; // type:function size:0xC Destroy__Q44nw4r3snd6detail20MmlSeqTrackAllocatorFPvUl = .text:0x8046F7F0; // type:function size:0x8 -GetAllocatableTrackCount__Q44nw4r3snd6detail20MmlSeqTrackAllocatorCFv = .text:0x8046F800; // type:function size:0x8 -__dt__Q44nw4r3snd6detail20MmlSeqTrackAllocatorFv = .text:0x8046F810; // type:function size:0x40 +GetAllocatableTrackCount__Q44nw4r3snd6detail20MmlSeqTrackAllocatorCFv = .text:0x8046F800; // type:function size:0x8 scope:weak +__dt__Q44nw4r3snd6detail20MmlSeqTrackAllocatorFv = .text:0x8046F810; // type:function size:0x40 scope:weak __ct__Q34nw4r3snd16NandSoundArchiveFv = .text:0x8046F850; // type:function size:0x4C __dt__Q34nw4r3snd16NandSoundArchiveFv = .text:0x8046F8A0; // type:function size:0x8C Open__Q34nw4r3snd16NandSoundArchiveFPCc = .text:0x8046F930; // type:function size:0x1BC Close__Q34nw4r3snd16NandSoundArchiveFv = .text:0x8046FAF0; // type:function size:0x4C OpenStream__Q34nw4r3snd16NandSoundArchiveCFPviUlUl = .text:0x8046FB40; // type:function size:0xB8 OpenExtStream__Q34nw4r3snd16NandSoundArchiveCFPviPCcUlUl = .text:0x8046FC00; // type:function size:0xDC -__dt__Q44nw4r3snd16NandSoundArchive14NandFileStreamFv = .text:0x8046FCE0; // type:function size:0x58 +__dt__Q44nw4r3snd16NandSoundArchive14NandFileStreamFv = .text:0x8046FCE0; // type:function size:0x58 scope:weak detail_GetRequiredStreamBufferSize__Q34nw4r3snd16NandSoundArchiveCFv = .text:0x8046FD40; // type:function size:0x8 LoadFileHeader__Q34nw4r3snd16NandSoundArchiveFv = .text:0x8046FD50; // type:function size:0xBC LoadHeader__Q34nw4r3snd16NandSoundArchiveFPvUl = .text:0x8046FE10; // type:function size:0xB0 LoadLabelStringData__Q34nw4r3snd16NandSoundArchiveFPvUl = .text:0x8046FEC0; // type:function size:0xB0 Read__Q44nw4r3snd16NandSoundArchive14NandFileStreamFPvUl = .text:0x8046FF70; // type:function size:0x84 Seek__Q44nw4r3snd16NandSoundArchive14NandFileStreamFlUl = .text:0x80470000; // type:function size:0x80 -GetSize__Q44nw4r3snd16NandSoundArchive14NandFileStreamCFv = .text:0x80470080; // type:function size:0x8 -Tell__Q44nw4r3snd16NandSoundArchive14NandFileStreamCFv = .text:0x80470090; // type:function size:0x10 -detail_GetWaveDataFileAddress__Q34nw4r3snd16NandSoundArchiveCFUl = .text:0x804700A0; // type:function size:0x8 -detail_GetFileAddress__Q34nw4r3snd16NandSoundArchiveCFUl = .text:0x804700B0; // type:function size:0x8 +GetSize__Q44nw4r3snd16NandSoundArchive14NandFileStreamCFv = .text:0x80470080; // type:function size:0x8 scope:weak +Tell__Q44nw4r3snd16NandSoundArchive14NandFileStreamCFv = .text:0x80470090; // type:function size:0x10 scope:weak +detail_GetWaveDataFileAddress__Q34nw4r3snd16NandSoundArchiveCFUl = .text:0x804700A0; // type:function size:0x8 scope:weak +detail_GetFileAddress__Q34nw4r3snd16NandSoundArchiveCFUl = .text:0x804700B0; // type:function size:0x8 scope:weak __ct__Q44nw4r3snd6detail10PlayerHeapFv = .text:0x804700C0; // type:function size:0x30 __dt__Q44nw4r3snd6detail10PlayerHeapFv = .text:0x804700F0; // type:function size:0xC4 Create__Q44nw4r3snd6detail10PlayerHeapFPvUl = .text:0x804701C0; // type:function size:0x30 @@ -25380,18 +25378,18 @@ Update__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x80472180; // type:function size UpdateTick__Q44nw4r3snd6detail9SeqPlayerFi = .text:0x80472290; // type:function size:0x264 SkipTick__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x80472500; // type:function size:0x294 NoteOn__Q44nw4r3snd6detail9SeqPlayerFiRCQ44nw4r3snd6detail10NoteOnInfo = .text:0x804727A0; // type:function size:0x28 -ChannelCallback__Q44nw4r3snd6detail9SeqPlayerFPQ44nw4r3snd6detail7Channel = .text:0x804727D0; // type:function size:0x4 -@180@__dt__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x804727E0; // type:function size:0x8 -@192@__dt__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x804727F0; // type:function size:0x8 +ChannelCallback__Q44nw4r3snd6detail9SeqPlayerFPQ44nw4r3snd6detail7Channel = .text:0x804727D0; // type:function size:0x4 scope:weak +@180@__dt__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x804727E0; // type:function size:0x8 scope:weak +@192@__dt__Q44nw4r3snd6detail9SeqPlayerFv = .text:0x804727F0; // type:function size:0x8 scope:weak __ct__Q44nw4r3snd6detail8SeqSoundFPQ44nw4r3snd6detail49SoundInstanceManagerii = .text:0x80472800; // type:function size:0x9C -__dt__Q54nw4r3snd6detail8SeqSound11SeqLoadTaskFv = .text:0x804728A0; // type:function size:0x58 +__dt__Q54nw4r3snd6detail8SeqSound11SeqLoadTaskFv = .text:0x804728A0; // type:function size:0x58 scope:weak InitParam__Q44nw4r3snd6detail8SeqSoundFv = .text:0x80472900; // type:function size:0x34 Setup__Q44nw4r3snd6detail8SeqSoundFPQ44nw4r3snd6detail17SeqTrackAllocatorUlPQ44nw4r3snd6detail14NoteOnCallback = .text:0x80472940; // type:function size:0x7C Prepare__Q44nw4r3snd6detail8SeqSoundFPCvlQ54nw4r3snd6detail9SeqPlayer10OffsetTypei = .text:0x804729C0; // type:function size:0x68 Prepare__Q44nw4r3snd6detail8SeqSoundFPQ34nw4r2ut10FileStreamlQ54nw4r3snd6detail9SeqPlayer10OffsetTypei = .text:0x80472A30; // type:function size:0xF4 NotifyLoadAsyncEndSeqData__Q44nw4r3snd6detail8SeqSoundFbPCvPv = .text:0x80472B30; // type:function size:0x74 Shutdown__Q44nw4r3snd6detail8SeqSoundFv = .text:0x80472BB0; // type:function size:0xDC -__dt__Q44nw4r3snd6detail8SeqSoundFv = .text:0x80472C90; // type:function size:0x6C +__dt__Q44nw4r3snd6detail8SeqSoundFv = .text:0x80472C90; // type:function size:0x6C scope:weak SetTempoRatio__Q44nw4r3snd6detail8SeqSoundFf = .text:0x80472D00; // type:function size:0x8 SetChannelPriority__Q44nw4r3snd6detail8SeqSoundFi = .text:0x80472D10; // type:function size:0x8 SetReleasePriorityFix__Q44nw4r3snd6detail8SeqSoundFb = .text:0x80472D20; // type:function size:0x8 @@ -25402,17 +25400,17 @@ SetTrackSilence__Q44nw4r3snd6detail8SeqSoundFUlbi = .text:0x80472E40; // type:fu SetTrackVolume__Q44nw4r3snd6detail8SeqSoundFUlf = .text:0x80472E50; // type:function size:0x8 ReadVariable__Q44nw4r3snd6detail8SeqSoundCFiPs = .text:0x80472E60; // type:function size:0x50 WriteVariable__Q44nw4r3snd6detail8SeqSoundFis = .text:0x80472EB0; // type:function size:0x2C -FUN_80472ee0 = .text:0x80472EE0; // type:function size:0x28 -WriteTrackVariable__Q44nw4r3snd6detail8SeqSoundFis = .text:0x80472F10; // type:function size:0x5C +WriteGlobalVariable__Q44nw4r3snd6detail8SeqSoundFis = .text:0x80472EE0; // type:function size:0x28 +WriteTrackVariable__Q44nw4r3snd6detail8SeqSoundFiis = .text:0x80472F10; // type:function size:0x5C GetTick__Q44nw4r3snd6detail8SeqSoundCFv = .text:0x80472F70; // type:function size:0x1C IsAttachedTempSpecialHandle__Q44nw4r3snd6detail8SeqSoundFv = .text:0x80472F90; // type:function size:0x14 DetachTempSpecialHandle__Q44nw4r3snd6detail8SeqSoundFv = .text:0x80472FB0; // type:function size:0x8 Execute__Q54nw4r3snd6detail8SeqSound11SeqLoadTaskFv = .text:0x80472FC0; // type:function size:0xF8 Cancel__Q54nw4r3snd6detail8SeqSound11SeqLoadTaskFv = .text:0x804730C0; // type:function size:0x24 OnCancel__Q54nw4r3snd6detail8SeqSound11SeqLoadTaskFv = .text:0x804730F0; // type:function size:0x2C -GetBasicPlayer__Q44nw4r3snd6detail8SeqSoundFv = .text:0x80473120; // type:function size:0x8 -GetBasicPlayer__Q44nw4r3snd6detail8SeqSoundCFv = .text:0x80473130; // type:function size:0x8 -IsPrepared__Q44nw4r3snd6detail8SeqSoundCFv = .text:0x80473140; // type:function size:0x8 +GetBasicPlayer__Q44nw4r3snd6detail8SeqSoundFv = .text:0x80473120; // type:function size:0x8 scope:weak +GetBasicPlayer__Q44nw4r3snd6detail8SeqSoundCFv = .text:0x80473130; // type:function size:0x8 scope:weak +IsPrepared__Q44nw4r3snd6detail8SeqSoundCFv = .text:0x80473140; // type:function size:0x8 scope:weak GetRuntimeTypeInfo__Q44nw4r3snd6detail8SeqSoundCFv = .text:0x80473150; // type:function size:0x8 scope:weak __sinit_\snd_SeqSound_cpp = .text:0x80473160; // type:function size:0xC scope:local __ct__Q34nw4r3snd14SeqSoundHandleFPQ34nw4r3snd11SoundHandle = .text:0x80473170; // type:function size:0xF4 @@ -25440,9 +25438,9 @@ NoteOn__Q44nw4r3snd6detail8SeqTrackFiilb = .text:0x80474410; // type:function si __ct__Q34nw4r3snd12Sound3DActorFRQ34nw4r3snd18SoundArchivePlayerRQ34nw4r3snd14Sound3DManager = .text:0x80474820; // type:function size:0x90 __dt__Q34nw4r3snd12Sound3DActorFv = .text:0x804748B0; // type:function size:0xD4 SetupSound__Q34nw4r3snd12Sound3DActorFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x80474990; // type:function size:0x1A8 -SetPosition_nw4r_snd_Sound3DActor = .text:0x80474B40; // type:function size:0x50 -FUN_80474b90 = .text:0x80474B90; // type:function size:0x3C -@84@__dt__Q34nw4r3snd12Sound3DActorFv = .text:0x80474BD0; // type:function size:0x8 +SetPosition__Q34nw4r3snd12Sound3DActorFRCQ34nw4r4math4VEC3 = .text:0x80474B40; // type:function size:0x50 +at_0x0c__Q34nw4r3snd12Sound3DActorFPvPQ44nw4r3snd6detail10BasicSound = .text:0x80474B90; // type:function size:0x3C +@84@__dt__Q34nw4r3snd12Sound3DActorFv = .text:0x80474BD0; // type:function size:0x8 scope:weak CalcVolumeAndPriority__Q34nw4r3snd17Sound3DCalculatorFRCQ34nw4r3snd14Sound3DManagerRCQ34nw4r3snd15Sound3DListenerRCQ34nw4r3snd12Sound3DParamPfPi = .text:0x80474BE0; // type:function size:0x13C CalcPan__Q34nw4r3snd17Sound3DCalculatorFRCQ34nw4r3snd14Sound3DManagerRCQ34nw4r3snd15Sound3DListenerRCQ34nw4r3snd12Sound3DParamRCQ44nw4r3snd17Sound3DCalculator12CalcPanParamPfPf = .text:0x80474D20; // type:function size:0x160 CalcPitch__Q34nw4r3snd17Sound3DCalculatorFRCQ34nw4r3snd14Sound3DManagerRCQ34nw4r3snd15Sound3DListenerRCQ34nw4r3snd12Sound3DParamPf = .text:0x80474E80; // type:function size:0x1B0 @@ -25473,10 +25471,10 @@ detail_AllocAmbientArg__Q34nw4r3snd14Sound3DManagerFUl = .text:0x80475E70; // ty detail_FreeAmbientArg__Q34nw4r3snd14Sound3DManagerFPvPCQ44nw4r3snd6detail10BasicSound = .text:0x80475EE0; // type:function size:0x14 SetBiquadFilterType__Q34nw4r3snd14Sound3DManagerFi = .text:0x80475F00; // type:function size:0x8 __ct__Q34nw4r3snd12Sound3DParamFv = .text:0x80475F10; // type:function size:0x28 -__sinit_snd_Sound3DManager_cpp = .text:0x80475F40; // type:function size:0xC scope:local -@4@detail_FreeAmbientArg__Q34nw4r3snd14Sound3DManagerFPvPCQ44nw4r3snd6detail10BasicSound = .text:0x80475F50; // type:function size:0x8 -@4@detail_AllocAmbientArg__Q34nw4r3snd14Sound3DManagerFUl = .text:0x80475F60; // type:function size:0x8 -@4@__dt__Q34nw4r3snd14Sound3DManagerFv = .text:0x80475F70; // type:function size:0x8 +__sinit_\snd_Sound3DManager_cpp = .text:0x80475F40; // type:function size:0xC scope:local +@4@detail_FreeAmbientArg__Q34nw4r3snd14Sound3DManagerFPvPCQ44nw4r3snd6detail10BasicSound = .text:0x80475F50; // type:function size:0x8 scope:weak +@4@detail_AllocAmbientArg__Q34nw4r3snd14Sound3DManagerFUl = .text:0x80475F60; // type:function size:0x8 scope:weak +@4@__dt__Q34nw4r3snd14Sound3DManagerFv = .text:0x80475F70; // type:function size:0x8 scope:weak __ct__Q34nw4r3snd10SoundActorFRQ34nw4r3snd18SoundArchivePlayer = .text:0x80475F80; // type:function size:0xC0 __dt__Q34nw4r3snd10SoundActorFv = .text:0x80476040; // type:function size:0xAC StopAllSound__Q34nw4r3snd10SoundActorFi = .text:0x804760F0; // type:function size:0x5C @@ -25486,7 +25484,7 @@ SetupSound__Q34nw4r3snd10SoundActorFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14So detail_SetupSoundWithAmbientInfo__Q34nw4r3snd10SoundActorFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPQ54nw4r3snd6detail10BasicSound11AmbientInfoPv = .text:0x804761F0; // type:function size:0x1C detail_SetupSound__Q34nw4r3snd10SoundActorFPQ34nw4r3snd11SoundHandleUlbPCQ44nw4r3snd14SoundStartable9StartInfo = .text:0x80476210; // type:function size:0x38 detail_ConvertLabelStringToSoundId__Q34nw4r3snd10SoundActorFPCc = .text:0x80476250; // type:function size:0x14 -detail_ConvertLabelStringToSoundId__Q34nw4r3snd18SoundArchivePlayerFPCc = .text:0x80476270; // type:function size:0x8 +detail_ConvertLabelStringToSoundId__Q34nw4r3snd18SoundArchivePlayerFPCc = .text:0x80476270; // type:function size:0x8 scope:weak __ct__Q34nw4r3snd12SoundArchiveFv = .text:0x80476280; // type:function size:0x24 __dt__Q34nw4r3snd12SoundArchiveFv = .text:0x804762B0; // type:function size:0x40 IsAvailable__Q34nw4r3snd12SoundArchiveCFv = .text:0x804762F0; // type:function size:0x14 @@ -25496,8 +25494,8 @@ GetPlayerCount__Q34nw4r3snd12SoundArchiveCFv = .text:0x80476340; // type:functio GetGroupCount__Q34nw4r3snd12SoundArchiveCFv = .text:0x80476350; // type:function size:0x8 GetSoundLabelString__Q34nw4r3snd12SoundArchiveCFUl = .text:0x80476360; // type:function size:0x8 ConvertLabelStringToSoundId__Q34nw4r3snd12SoundArchiveCFPCc = .text:0x80476370; // type:function size:0x10 -ConvertLabelStringToPlayerId__Q34nw4r3snd12SoundArchiveCFPCc = .text:0x80476380; // type:function size:0x10 -ConvertLabelStringToGroupId__Q34nw4r3snd12SoundArchiveCFPCc = .text:0x80476390; // type:function size:0x10 +ConvertLabelStringToGroupId__Q34nw4r3snd12SoundArchiveCFPCc = .text:0x80476380; // type:function size:0x10 +ConvertLabelStringToBankId__Q34nw4r3snd12SoundArchiveCFPCc = .text:0x80476390; // type:function size:0x10 GetSoundUserParam__Q34nw4r3snd12SoundArchiveCFUl = .text:0x804763A0; // type:function size:0x8 GetSoundType__Q34nw4r3snd12SoundArchiveCFUl = .text:0x804763B0; // type:function size:0x8 ReadSoundInfo__Q34nw4r3snd12SoundArchiveCFUlPQ44nw4r3snd12SoundArchive9SoundInfo = .text:0x804763C0; // type:function size:0x8 @@ -25547,14 +25545,14 @@ LoadGroup__Q44nw4r3snd6detail18SoundArchiveLoaderFUlPQ34nw4r3snd22SoundMemoryAll ReadFile__Q44nw4r3snd6detail18SoundArchiveLoaderFUlPvll = .text:0x804782F0; // type:function size:0x18C LoadFile__Q44nw4r3snd6detail18SoundArchiveLoaderFUlPQ34nw4r3snd22SoundMemoryAllocatable = .text:0x80478480; // type:function size:0xDC __ct__Q34nw4r3snd18SoundArchivePlayerFv = .text:0x80478560; // type:function size:0x120 -__dt__Q44nw4r3snd18SoundArchivePlayer17SeqNoteOnCallbackFv = .text:0x80478680; // type:function size:0x40 -__dt__Q44nw4r3snd18SoundArchivePlayer11WsdCallbackFv = .text:0x804786C0; // type:function size:0x40 -__ct__Q34nw4r2ut41LinkListFv = .text:0x80478700; // type:function size:0x18 -__dt__Q34nw4r2ut41LinkListFv = .text:0x80478720; // type:function size:0x58 -__ct__Q34nw4r2ut42LinkListFv = .text:0x80478780; // type:function size:0x18 -__dt__Q34nw4r2ut42LinkListFv = .text:0x804787A0; // type:function size:0x58 -__ct__Q34nw4r2ut42LinkListFv = .text:0x80478800; // type:function size:0x18 -__dt__Q34nw4r2ut42LinkListFv = .text:0x80478820; // type:function size:0x58 +__dt__Q44nw4r3snd18SoundArchivePlayer17SeqNoteOnCallbackFv = .text:0x80478680; // type:function size:0x40 scope:weak +__dt__Q44nw4r3snd18SoundArchivePlayer11WsdCallbackFv = .text:0x804786C0; // type:function size:0x40 scope:weak +__ct__Q34nw4r2ut41LinkListFv = .text:0x80478700; // type:function size:0x18 scope:weak +__dt__Q34nw4r2ut41LinkListFv = .text:0x80478720; // type:function size:0x58 scope:weak +__ct__Q34nw4r2ut42LinkListFv = .text:0x80478780; // type:function size:0x18 scope:weak +__dt__Q34nw4r2ut42LinkListFv = .text:0x804787A0; // type:function size:0x58 scope:weak +__ct__Q34nw4r2ut42LinkListFv = .text:0x80478800; // type:function size:0x18 scope:weak +__dt__Q34nw4r2ut42LinkListFv = .text:0x80478820; // type:function size:0x58 scope:weak __dt__Q34nw4r3snd18SoundArchivePlayerFv = .text:0x80478880; // type:function size:0xB8 IsAvailable__Q34nw4r3snd18SoundArchivePlayerCFv = .text:0x80478940; // type:function size:0x1C Setup__Q34nw4r3snd18SoundArchivePlayerFPCQ34nw4r3snd12SoundArchivePvUlPvUl = .text:0x80478960; // type:function size:0x104 @@ -25581,9 +25579,9 @@ InvalidateData__Q34nw4r3snd18SoundArchivePlayerFPCvPCv = .text:0x8047AC60; // ty InvalidateWaveData__Q34nw4r3snd18SoundArchivePlayerFPCvPCv = .text:0x8047AD10; // type:function size:0xA8 NoteOn__Q44nw4r3snd18SoundArchivePlayer17SeqNoteOnCallbackFPQ44nw4r3snd6detail9SeqPlayeriRCQ44nw4r3snd6detail10NoteOnInfo = .text:0x8047ADC0; // type:function size:0x128 GetWaveSoundData__Q44nw4r3snd18SoundArchivePlayer11WsdCallbackCFPQ44nw4r3snd6detail13WaveSoundInfoPQ44nw4r3snd6detail17WaveSoundNoteInfoPQ44nw4r3snd6detail8WaveInfoPCviiUl = .text:0x8047AEF0; // type:function size:0xFC -@12@detail_ConvertLabelStringToSoundId__Q34nw4r3snd18SoundArchivePlayerFPCc = .text:0x8047AFF0; // type:function size:0x8 -@12@detail_SetupSound__Q34nw4r3snd18SoundArchivePlayerFPQ34nw4r3snd11SoundHandleUlbPCQ44nw4r3snd14SoundStartable9StartInfo = .text:0x8047B000; // type:function size:0x8 -@12@__dt__Q34nw4r3snd18SoundArchivePlayerFv = .text:0x8047B010; // type:function size:0x8 +@12@detail_ConvertLabelStringToSoundId__Q34nw4r3snd18SoundArchivePlayerFPCc = .text:0x8047AFF0; // type:function size:0x8 scope:weak +@12@detail_SetupSound__Q34nw4r3snd18SoundArchivePlayerFPQ34nw4r3snd11SoundHandleUlbPCQ44nw4r3snd14SoundStartable9StartInfo = .text:0x8047B000; // type:function size:0x8 scope:weak +@12@__dt__Q34nw4r3snd18SoundArchivePlayerFv = .text:0x8047B010; // type:function size:0x8 scope:weak detail_AttachSoundAsTempHandle__Q34nw4r3snd11SoundHandleFPQ44nw4r3snd6detail10BasicSound = .text:0x8047B020; // type:function size:0x4C detail_AttachSound__Q34nw4r3snd11SoundHandleFPQ44nw4r3snd6detail10BasicSound = .text:0x8047B070; // type:function size:0x4C DetachSound__Q34nw4r3snd11SoundHandleFv = .text:0x8047B0C0; // type:function size:0x50 @@ -25597,19 +25595,19 @@ SaveState__Q34nw4r3snd9SoundHeapFv = .text:0x8047B2D0; // type:function size:0x5 LoadState__Q34nw4r3snd9SoundHeapFi = .text:0x8047B330; // type:function size:0x74 DisposeCallbackFunc__Q34nw4r3snd9SoundHeapFPvUlPv = .text:0x8047B3B0; // type:function size:0x68 __ct__Q34nw4r3snd11SoundPlayerFv = .text:0x8047B420; // type:function size:0x8C -__ct__Q34nw4r2ut44LinkListFv = .text:0x8047B4B0; // type:function size:0x18 -__dt__Q34nw4r2ut44LinkListFv = .text:0x8047B4D0; // type:function size:0x58 +__ct__Q34nw4r2ut44LinkListFv = .text:0x8047B4B0; // type:function size:0x18 scope:weak +__dt__Q34nw4r2ut44LinkListFv = .text:0x8047B4D0; // type:function size:0x58 scope:weak __dt__Q34nw4r3snd11SoundPlayerFv = .text:0x8047B530; // type:function size:0xD4 Update__Q34nw4r3snd11SoundPlayerFv = .text:0x8047B610; // type:function size:0x7C StopAllSound__Q34nw4r3snd11SoundPlayerFi = .text:0x8047B690; // type:function size:0x78 PauseAllSound__Q34nw4r3snd11SoundPlayerFbi = .text:0x8047B710; // type:function size:0x88 -nw4r__snd__SoundPlayer__SetMainOutVolume = .text:0x8047B7A0; // type:function size:0x18 -SetDefaultOutputLine__Q34nw4r3snd11SoundPlayerFi = .text:0x8047B7C0; // type:function size:0x8 +SetVolume__Q34nw4r3snd11SoundPlayerFf = .text:0x8047B7A0; // type:function size:0x18 +SetLpfFreq__Q34nw4r3snd11SoundPlayerFf = .text:0x8047B7C0; // type:function size:0x8 GetRemoteOutVolume__Q34nw4r3snd11SoundPlayerCFi = .text:0x8047B7D0; // type:function size:0x10 SetFxSend__Q34nw4r3snd11SoundPlayerFQ34nw4r3snd6AuxBusf = .text:0x8047B7E0; // type:function size:0x10 detail_SortPriorityList__Q34nw4r3snd11SoundPlayerFPQ44nw4r3snd6detail10BasicSound = .text:0x8047B7F0; // type:function size:0xF8 detail_SortPriorityList__Q34nw4r3snd11SoundPlayerFv = .text:0x8047B8F0; // type:function size:0x184 -__arraydtor$1018 = .text:0x8047BA80; // type:function size:0x1C +__arraydtor$1419 = .text:0x8047BA80; // type:function size:0x1C scope:local detail_AppendSound__Q34nw4r3snd11SoundPlayerFPQ44nw4r3snd6detail10BasicSound = .text:0x8047BAA0; // type:function size:0x1DC detail_RemoveSound__Q34nw4r3snd11SoundPlayerFPQ44nw4r3snd6detail10BasicSound = .text:0x8047BC80; // type:function size:0x88 SetPlayableSoundCount__Q34nw4r3snd11SoundPlayerFi = .text:0x8047BD10; // type:function size:0x90 @@ -25631,7 +25629,7 @@ IsInitializedSoundSystem__Q34nw4r3snd11SoundSystemFv = .text:0x8047C630; // type WaitForResetReady__Q34nw4r3snd11SoundSystemFv = .text:0x8047C640; // type:function size:0x74 __sinit_\snd_SoundSystem_cpp = .text:0x8047C6C0; // type:function size:0x48 scope:local GetInstance__Q44nw4r3snd6detail11SoundThreadFv = .text:0x8047C710; // type:function size:0xB8 -__dt__Q44nw4r3snd6detail11SoundThreadFv = .text:0x8047C7D0; // type:function size:0x70 +__dt__Q44nw4r3snd6detail11SoundThreadFv = .text:0x8047C7D0; // type:function size:0x70 scope:weak Create__Q44nw4r3snd6detail11SoundThreadFlPvUl = .text:0x8047C840; // type:function size:0x12C AxCallbackFunc__Q44nw4r3snd6detail11SoundThreadFv = .text:0x8047C970; // type:function size:0x10C SoundThreadFunc__Q44nw4r3snd6detail11SoundThreadFPv = .text:0x8047CA80; // type:function size:0xB8 @@ -25652,8 +25650,8 @@ ReadStrmTrackInfo__Q44nw4r3snd6detail14StrmFileLoaderCFPQ54nw4r3snd6detail14Strm ReadAdpcmInfo__Q44nw4r3snd6detail14StrmFileLoaderCFPQ34nw4r3snd10AdpcmParamPQ44nw4r3snd6detail14AdpcmLoopParami = .text:0x8047D5D0; // type:function size:0x14C ReadAdpcBlockData__Q44nw4r3snd6detail14StrmFileLoaderFPUsPUsii = .text:0x8047D720; // type:function size:0x1B4 __ct__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x8047D8E0; // type:function size:0xF0 -__dt__Q54nw4r3snd6detail10StrmPlayer18StrmHeaderLoadTaskFv = .text:0x8047D9D0; // type:function size:0x58 -__dt__Q54nw4r3snd6detail10StrmPlayer16StrmDataLoadTaskFv = .text:0x8047DA30; // type:function size:0x58 +__dt__Q54nw4r3snd6detail10StrmPlayer18StrmHeaderLoadTaskFv = .text:0x8047D9D0; // type:function size:0x58 scope:weak +__dt__Q54nw4r3snd6detail10StrmPlayer16StrmDataLoadTaskFv = .text:0x8047DA30; // type:function size:0x58 scope:weak __dt__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x8047DA90; // type:function size:0x100 Setup__Q44nw4r3snd6detail10StrmPlayerFPQ44nw4r3snd6detail14StrmBufferPooliUsi = .text:0x8047DB90; // type:function size:0x218 Shutdown__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x8047DDB0; // type:function size:0x90 @@ -25688,16 +25686,16 @@ __ct__Q54nw4r3snd6detail10StrmPlayer16StrmDataLoadTaskFv = .text:0x80480290; // Execute__Q54nw4r3snd6detail10StrmPlayer16StrmDataLoadTaskFv = .text:0x804802E0; // type:function size:0xD0 Cancel__Q54nw4r3snd6detail10StrmPlayer16StrmDataLoadTaskFv = .text:0x804803B0; // type:function size:0x8C OnCancel__Q54nw4r3snd6detail10StrmPlayer16StrmDataLoadTaskFv = .text:0x80480440; // type:function size:0xA8 -OnUpdateFrameSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x804804F0; // type:function size:0x4 -OnUpdateVoiceSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480500; // type:function size:0x4 -OnShutdownSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480510; // type:function size:0x10 -IsPause__Q44nw4r3snd6detail10StrmPlayerCFv = .text:0x80480520; // type:function size:0x8 -IsStarted__Q44nw4r3snd6detail10StrmPlayerCFv = .text:0x80480530; // type:function size:0x8 -IsActive__Q44nw4r3snd6detail10StrmPlayerCFv = .text:0x80480540; // type:function size:0x8 -@180@OnShutdownSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480550; // type:function size:0x8 -@180@OnUpdateVoiceSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480560; // type:function size:0x8 -@180@OnUpdateFrameSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480570; // type:function size:0x8 -@180@__dt__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480580; // type:function size:0x8 +OnUpdateFrameSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x804804F0; // type:function size:0x4 scope:weak +OnUpdateVoiceSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480500; // type:function size:0x4 scope:weak +OnShutdownSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480510; // type:function size:0x10 scope:weak +IsPause__Q44nw4r3snd6detail10StrmPlayerCFv = .text:0x80480520; // type:function size:0x8 scope:weak +IsStarted__Q44nw4r3snd6detail10StrmPlayerCFv = .text:0x80480530; // type:function size:0x8 scope:weak +IsActive__Q44nw4r3snd6detail10StrmPlayerCFv = .text:0x80480540; // type:function size:0x8 scope:weak +@180@OnShutdownSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480550; // type:function size:0x8 scope:weak +@180@OnUpdateVoiceSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480560; // type:function size:0x8 scope:weak +@180@OnUpdateFrameSoundThread__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480570; // type:function size:0x8 scope:weak +@180@__dt__Q44nw4r3snd6detail10StrmPlayerFv = .text:0x80480580; // type:function size:0x8 scope:weak __ct__Q44nw4r3snd6detail9StrmSoundFPQ44nw4r3snd6detail50SoundInstanceManagerii = .text:0x80480590; // type:function size:0xB4 InitParam__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480650; // type:function size:0x138 Setup__Q44nw4r3snd6detail9StrmSoundFPQ44nw4r3snd6detail14StrmBufferPooliUs = .text:0x80480790; // type:function size:0x7C @@ -25706,22 +25704,22 @@ UpdateMoveValue__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480870; // type:func UpdateParam__Q44nw4r3snd6detail9StrmSoundFv = .text:0x804808F0; // type:function size:0xE0 SetTrackVolume__Q44nw4r3snd6detail9StrmSoundFUlfi = .text:0x804809D0; // type:function size:0x144 Shutdown__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480B20; // type:function size:0x9C -__dt__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480BC0; // type:function size:0x5C +__dt__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480BC0; // type:function size:0x5C scope:weak OnUpdatePlayerPriority__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480C20; // type:function size:0xE4 IsAttachedTempSpecialHandle__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480D10; // type:function size:0x14 DetachTempSpecialHandle__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480D30; // type:function size:0x8 -GetBasicPlayer__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480D40; // type:function size:0x8 -GetBasicPlayer__Q44nw4r3snd6detail9StrmSoundCFv = .text:0x80480D50; // type:function size:0x8 -IsPrepared__Q44nw4r3snd6detail9StrmSoundCFv = .text:0x80480D60; // type:function size:0x8 +GetBasicPlayer__Q44nw4r3snd6detail9StrmSoundFv = .text:0x80480D40; // type:function size:0x8 scope:weak +GetBasicPlayer__Q44nw4r3snd6detail9StrmSoundCFv = .text:0x80480D50; // type:function size:0x8 scope:weak +IsPrepared__Q44nw4r3snd6detail9StrmSoundCFv = .text:0x80480D60; // type:function size:0x8 scope:weak GetRuntimeTypeInfo__Q44nw4r3snd6detail9StrmSoundCFv = .text:0x80480D70; // type:function size:0x8 scope:weak __sinit_\snd_StrmSound_cpp = .text:0x80480D80; // type:function size:0xC scope:local __ct__Q34nw4r3snd15StrmSoundHandleFPQ34nw4r3snd11SoundHandle = .text:0x80480D90; // type:function size:0xF4 DetachSound__Q34nw4r3snd15StrmSoundHandleFv = .text:0x80480E90; // type:function size:0x38 __dt__Q44nw4r3snd6detail4TaskFv = .text:0x80480ED0; // type:function size:0x40 GetInstance__Q44nw4r3snd6detail11TaskManagerFv = .text:0x80480F10; // type:function size:0x9C -__dt__Q44nw4r3snd6detail11TaskManagerFv = .text:0x80480FB0; // type:function size:0x64 -__dt__Q34nw4r2ut35LinkListFv = .text:0x80481020; // type:function size:0x58 -__ct__Q34nw4r2ut35LinkListFv = .text:0x80481080; // type:function size:0x18 +__dt__Q44nw4r3snd6detail11TaskManagerFv = .text:0x80480FB0; // type:function size:0x64 scope:weak +__dt__Q34nw4r2ut35LinkListFv = .text:0x80481020; // type:function size:0x58 scope:weak +__ct__Q34nw4r2ut35LinkListFv = .text:0x80481080; // type:function size:0x18 scope:weak AppendTask__Q44nw4r3snd6detail11TaskManagerFPQ44nw4r3snd6detail4TaskQ54nw4r3snd6detail11TaskManager12TaskPriority = .text:0x804810A0; // type:function size:0x7C PopTask__Q44nw4r3snd6detail11TaskManagerFv = .text:0x80481120; // type:function size:0x15C GetNextTask__Q44nw4r3snd6detail11TaskManagerFv = .text:0x80481280; // type:function size:0x10C @@ -25778,9 +25776,9 @@ AxVoiceCallbackFunc__Q44nw4r3snd6detail5VoiceFPQ44nw4r3snd6detail7AxVoiceQ54nw4r TransformDpl2Pan__Q44nw4r3snd6detail5VoiceFPfPfff = .text:0x80483190; // type:function size:0x1A0 CalcMixParam__Q44nw4r3snd6detail5VoiceFiiPQ54nw4r3snd6detail7AxVoice8MixParamPQ54nw4r3snd6detail7AxVoice14RemoteMixParam = .text:0x80483330; // type:function size:0xBAC InvalidateWaveData__Q44nw4r3snd6detail5VoiceFPCvPCv = .text:0x80483EE0; // type:function size:0x14C -InvalidateData__Q44nw4r3snd6detail5VoiceFPCvPCv = .text:0x80484030; // type:function size:0x4 +InvalidateData__Q44nw4r3snd6detail5VoiceFPCvPCv = .text:0x80484030; // type:function size:0x4 scope:weak GetInstance__Q44nw4r3snd6detail12VoiceManagerFv = .text:0x80484040; // type:function size:0x7C -__dt__Q44nw4r3snd6detail12VoiceManagerFv = .text:0x804840C0; // type:function size:0x70 +__dt__Q44nw4r3snd6detail12VoiceManagerFv = .text:0x804840C0; // type:function size:0x70 scope:weak GetRequiredMemSize__Q44nw4r3snd6detail12VoiceManagerFi = .text:0x80484130; // type:function size:0x8 Setup__Q44nw4r3snd6detail12VoiceManagerFPvUl = .text:0x80484140; // type:function size:0xA4 AllocVoice__Q44nw4r3snd6detail12VoiceManagerFiiiPFPQ44nw4r3snd6detail5VoiceQ54nw4r3snd6detail5Voice19VoiceCallbackStatusPv_vPv = .text:0x804841F0; // type:function size:0x1C0 @@ -25804,18 +25802,18 @@ __ct__Q44nw4r3snd6detail14WaveFileReaderFPCQ54nw4r3snd6detail8WaveFile8WaveInfo ReadWaveInfo__Q44nw4r3snd6detail14WaveFileReaderCFPQ44nw4r3snd6detail8WaveInfoPCv = .text:0x80484D20; // type:function size:0x1CC GetWaveDataAddress__Q44nw4r3snd6detail14WaveFileReaderCFPCQ54nw4r3snd6detail8WaveFile15WaveChannelInfoPCv = .text:0x80484EF0; // type:function size:0x64 __ct__Q44nw4r3snd6detail9WaveSoundFPQ44nw4r3snd6detail50SoundInstanceManagerii = .text:0x80484F60; // type:function size:0x68 -__dt__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x80484FD0; // type:function size:0x40 +__dt__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x80484FD0; // type:function size:0x40 scope:weak Prepare__Q44nw4r3snd6detail9WaveSoundFPCvlQ54nw4r3snd6detail9WsdPlayer15StartOffsetTypelPCQ54nw4r3snd6detail9WsdPlayer11WsdCallbackUl = .text:0x80485010; // type:function size:0xA0 Shutdown__Q44nw4r3snd6detail9WaveSoundFv = .text:0x804850B0; // type:function size:0x9C -__dt__Q44nw4r3snd6detail9WaveSoundFv = .text:0x80485150; // type:function size:0x40 +__dt__Q44nw4r3snd6detail9WaveSoundFv = .text:0x80485150; // type:function size:0x40 scope:weak SetChannelPriority__Q44nw4r3snd6detail9WaveSoundFi = .text:0x80485190; // type:function size:0x8 SetReleasePriorityFix__Q44nw4r3snd6detail9WaveSoundFb = .text:0x804851A0; // type:function size:0x8 OnUpdatePlayerPriority__Q44nw4r3snd6detail9WaveSoundFv = .text:0x804851B0; // type:function size:0xE4 IsAttachedTempSpecialHandle__Q44nw4r3snd6detail9WaveSoundFv = .text:0x804852A0; // type:function size:0x14 DetachTempSpecialHandle__Q44nw4r3snd6detail9WaveSoundFv = .text:0x804852C0; // type:function size:0x8 -GetBasicPlayer__Q44nw4r3snd6detail9WaveSoundFv = .text:0x804852D0; // type:function size:0x8 -GetBasicPlayer__Q44nw4r3snd6detail9WaveSoundCFv = .text:0x804852E0; // type:function size:0x8 -IsPrepared__Q44nw4r3snd6detail9WaveSoundCFv = .text:0x804852F0; // type:function size:0x8 +GetBasicPlayer__Q44nw4r3snd6detail9WaveSoundFv = .text:0x804852D0; // type:function size:0x8 scope:weak +GetBasicPlayer__Q44nw4r3snd6detail9WaveSoundCFv = .text:0x804852E0; // type:function size:0x8 scope:weak +IsPrepared__Q44nw4r3snd6detail9WaveSoundCFv = .text:0x804852F0; // type:function size:0x8 scope:weak GetRuntimeTypeInfo__Q44nw4r3snd6detail9WaveSoundCFv = .text:0x80485300; // type:function size:0x8 scope:weak __sinit_\snd_WaveSound_cpp = .text:0x80485310; // type:function size:0xC scope:local __ct__Q34nw4r3snd15WaveSoundHandleFPQ34nw4r3snd11SoundHandle = .text:0x80485320; // type:function size:0xF4 @@ -25839,18 +25837,18 @@ Update__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x80486000; // type:function size StartChannel__Q44nw4r3snd6detail9WsdPlayerFPCQ54nw4r3snd6detail9WsdPlayer11WsdCallbackUl = .text:0x804862B0; // type:function size:0x1B8 UpdateChannel__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x80486470; // type:function size:0x404 ChannelCallbackFunc__Q44nw4r3snd6detail9WsdPlayerFPQ44nw4r3snd6detail7ChannelQ54nw4r3snd6detail7Channel21ChannelCallbackStatusUl = .text:0x80486880; // type:function size:0x70 -OnUpdateFrameSoundThread__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x804868F0; // type:function size:0x4 -OnShutdownSoundThread__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x80486900; // type:function size:0x10 -InvalidateWaveData__Q44nw4r3snd6detail9WsdPlayerFPCvPCv = .text:0x80486910; // type:function size:0x4 -IsPause__Q44nw4r3snd6detail9WsdPlayerCFv = .text:0x80486920; // type:function size:0x14 -IsStarted__Q44nw4r3snd6detail9WsdPlayerCFv = .text:0x80486940; // type:function size:0x14 -IsActive__Q44nw4r3snd6detail9WsdPlayerCFv = .text:0x80486960; // type:function size:0x14 -@180@InvalidateWaveData__Q44nw4r3snd6detail9WsdPlayerFPCvPCv = .text:0x80486980; // type:function size:0x8 -@180@InvalidateData__Q44nw4r3snd6detail9WsdPlayerFPCvPCv = .text:0x80486990; // type:function size:0x8 -@180@__dt__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x804869A0; // type:function size:0x8 -@192@OnShutdownSoundThread__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x804869B0; // type:function size:0x8 -@192@OnUpdateFrameSoundThread__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x804869C0; // type:function size:0x8 -@192@__dt__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x804869D0; // type:function size:0x8 +OnUpdateFrameSoundThread__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x804868F0; // type:function size:0x4 scope:weak +OnShutdownSoundThread__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x80486900; // type:function size:0x10 scope:weak +InvalidateWaveData__Q44nw4r3snd6detail9WsdPlayerFPCvPCv = .text:0x80486910; // type:function size:0x4 scope:weak +IsPause__Q44nw4r3snd6detail9WsdPlayerCFv = .text:0x80486920; // type:function size:0x14 scope:weak +IsStarted__Q44nw4r3snd6detail9WsdPlayerCFv = .text:0x80486940; // type:function size:0x14 scope:weak +IsActive__Q44nw4r3snd6detail9WsdPlayerCFv = .text:0x80486960; // type:function size:0x14 scope:weak +@180@InvalidateWaveData__Q44nw4r3snd6detail9WsdPlayerFPCvPCv = .text:0x80486980; // type:function size:0x8 scope:weak +@180@InvalidateData__Q44nw4r3snd6detail9WsdPlayerFPCvPCv = .text:0x80486990; // type:function size:0x8 scope:weak +@180@__dt__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x804869A0; // type:function size:0x8 scope:weak +@192@OnShutdownSoundThread__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x804869B0; // type:function size:0x8 scope:weak +@192@OnUpdateFrameSoundThread__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x804869C0; // type:function size:0x8 scope:weak +@192@__dt__Q44nw4r3snd6detail9WsdPlayerFv = .text:0x804869D0; // type:function size:0x8 scope:weak DecodeDspAdpcm__Q34nw4r3snd6detailFP10_AXPBADPCMUc = .text:0x804869E0; // type:function size:0x8C LytInit__Q24nw4r3lytFv = .text:0x80486A70; // type:function size:0x54 __ct__Q34nw4r3lyt4PaneFPCQ44nw4r3lyt3res4Pane = .text:0x80486AD0; // type:function size:0x128 @@ -26385,11 +26383,11 @@ set__Q23EGG5QuatfFffff = .text:0x8049B390; // type:function size:0x14 setAxisRotation__Q23EGG5QuatfFRCQ23EGG8Vector3ff = .text:0x8049B3B0; // type:function size:0x98 norm__Q23EGG5QuatfFv = .text:0x8049B450; // type:function size:0x30 normalise__Q23EGG5QuatfFv = .text:0x8049B480; // type:function size:0x74 -conjugate__Q23EGG5QuatfFv = .text:0x8049B500; // type:function size:0x48 +conjugate__Q23EGG5QuatfCFv = .text:0x8049B500; // type:function size:0x48 rotateVector__Q23EGG5QuatfFRCQ23EGG8Vector3f = .text:0x8049B550; // type:function size:0x2A4 slerpTo__Q23EGG5QuatfCFRCQ23EGG5QuatffRQ23EGG5Quatf = .text:0x8049B800; // type:function size:0x1C4 limitSlerpTo__Q23EGG5QuatfCFRCQ23EGG5QuatfffRQ23EGG5Quatf = .text:0x8049B9D0; // type:function size:0x1DC -makeVectorRotation__Q23EGG5QuatfFRQ23EGG8Vector3fRQ23EGG8Vector3f = .text:0x8049BBB0; // type:function size:0x104 +makeVectorRotation__Q23EGG5QuatfFRCQ23EGG8Vector3fRCQ23EGG8Vector3f = .text:0x8049BBB0; // type:function size:0x104 normalise__Q23EGG8Vector3fFv = .text:0x8049BCC0; // type:function size:0x84 setLength__Q23EGG8Vector3fFRCQ23EGG8Vector3ff = .text:0x8049BD50; // type:function size:0xB8 setLength__Q23EGG8Vector3fFf = .text:0x8049BE10; // type:function size:0xA0 @@ -28218,7 +28216,7 @@ lbl_804E0EB4 = .rodata:0x804E0EB4; // type:object size:0x3C lbl_804E0EF0 = .rodata:0x804E0EF0; // type:object size:0x28 lbl_804E0F18 = .rodata:0x804E0F18; // type:object size:0x48 lbl_804E0F60 = .rodata:0x804E0F60; // type:object size:0x48 -OBJ_NAME_TO_ACTOR_ID = .rodata:0x804E0FA8; // type:object size:0x2470 data:4byte +sInfos = .rodata:0x804E0FA8; // type:object size:0x246C scope:local data:4byte lbl_804E3418 = .rodata:0x804E3418; // type:object size:0x40 data:4byte lbl_804E3458 = .rodata:0x804E3458; // type:object size:0x38 data:4byte lbl_804E3490 = .rodata:0x804E3490; // type:object size:0x3C data:4byte @@ -29150,26 +29148,26 @@ TYPE_NAME__Q34nw4r3g3d8ScnGroup = .rodata:0x804F7B10; // type:object size:0x10 TYPE_NAME__Q34nw4r3g3d7ScnRoot = .rodata:0x804F7B20; // type:object size:0x10 TYPE_NAME__Q34nw4r3g3d12ScnMdlSimple = .rodata:0x804F7B30; // type:object size:0x14 TYPE_NAME__Q34nw4r3g3d6ScnMdl = .rodata:0x804F7B48; // type:object size:0xC -TYPE_NAME__Q34nw4r3g3d14ScnMdl1Mat1Shp = .rodata:0x804F7B58; // type:object size:0x18 +TYPE_NAME__Q34nw4r3g3d14ScnMdl1Mat1Shp = .rodata:0x804F7B58; // type:object size:0x14 TYPE_NAME__Q34nw4r3g3d7ScnProc = .rodata:0x804F7B70; // type:object size:0x10 -lbl_804F7B80 = .rodata:0x804F7B80; // type:object size:0x460 -lbl_804F7FE0 = .rodata:0x804F7FE0; // type:object size:0x3CC -lbl_804F83AC = .rodata:0x804F83AC; // type:object size:0x4C4 -lbl_804F8870 = .rodata:0x804F8870; // type:object size:0x3A4 -lbl_804F8C14 = .rodata:0x804F8C14; // type:object size:0x3A4 -lbl_804F8FB8 = .rodata:0x804F8FB8; // type:object size:0x100 -lbl_804F90B8 = .rodata:0x804F90B8; // type:object size:0x200 -lbl_804F92B8 = .rodata:0x804F92B8; // type:object size:0x28 -lbl_804F92E0 = .rodata:0x804F92E0; // type:object size:0x28 data:4byte -lbl_804F9308 = .rodata:0x804F9308; // type:object size:0x18 data:4byte -lbl_804F9320 = .rodata:0x804F9320; // type:object size:0x30 -lbl_804F9350 = .rodata:0x804F9350; // type:object size:0x400 -lbl_804F9750 = .rodata:0x804F9750; // type:object size:0xF14 -lbl_804FA664 = .rodata:0x804FA664; // type:object size:0x404 -lbl_804FAA68 = .rodata:0x804FAA68; // type:object size:0x404 -lbl_804FAE6C = .rodata:0x804FAE6C; // type:object size:0x404 -lbl_804FB270 = .rodata:0x804FB270; // type:object size:0x500 -lbl_804FB770 = .rodata:0x804FB770; // type:object size:0x30 +coefTable__Q44nw4r3snd6detail15BiquadFilterLpf = .rodata:0x804F7B80; // type:object size:0x460 +coefTable__Q44nw4r3snd6detail15BiquadFilterHpf = .rodata:0x804F7FE0; // type:object size:0x3CA +coefTable__Q44nw4r3snd6detail18BiquadFilterBpf512 = .rodata:0x804F83AC; // type:object size:0x4C4 +coefTable__Q44nw4r3snd6detail19BiquadFilterBpf1024 = .rodata:0x804F8870; // type:object size:0x3A2 +coefTable__Q44nw4r3snd6detail19BiquadFilterBpf2048 = .rodata:0x804F8C14; // type:object size:0x3A2 +DecibelSquareTable__Q44nw4r3snd6detail12EnvGenerator = .rodata:0x804F8FB8; // type:object size:0x100 +@LOCAL@SetAttack__Q44nw4r3snd6detail12EnvGeneratorFi@attackTable = .rodata:0x804F90B8; // type:object size:0x200 scope:weak +@LOCAL@GetSinIdx__Q44nw4r3snd6detail3LfoFi@sinTable = .rodata:0x804F92B8; // type:object size:0x21 scope:weak +@2213 = .rodata:0x804F92E0; // type:object size:0x24 scope:local data:4byte +@4458 = .rodata:0x804F9308; // type:object size:0x14 scope:local data:4byte +NoteTable__Q44nw4r3snd6detail4Util = .rodata:0x804F9320; // type:object size:0x30 +PitchTable__Q44nw4r3snd6detail4Util = .rodata:0x804F9350; // type:object size:0x400 +Decibel2RatioTable__Q44nw4r3snd6detail4Util = .rodata:0x804F9750; // type:object size:0xF14 +Pan2RatioTableSqrt__Q44nw4r3snd6detail4Util = .rodata:0x804FA664; // type:object size:0x404 +Pan2RatioTableSinCos__Q44nw4r3snd6detail4Util = .rodata:0x804FAA68; // type:object size:0x404 +Pan2RatioTableLinear__Q44nw4r3snd6detail4Util = .rodata:0x804FAE6C; // type:object size:0x404 +RemoteFilterCoefTable__Q44nw4r3snd6detail4Util = .rodata:0x804FB270; // type:object size:0x500 +CalcLpfFreqTable__Q44nw4r3snd6detail4Util = .rodata:0x804FB770; // type:object size:0x30 gRMO_Pal60_640x456Prog_16x9__22@unnamed@eggVideo_cpp@ = .rodata:0x804FB7A0; // type:object size:0x3C scope:local gRMO_Pal60_640x456IntDf_16x9__22@unnamed@eggVideo_cpp@ = .rodata:0x804FB7DC; // type:object size:0x3C scope:local gRMO_Pal50_640x456IntDf_16x9__22@unnamed@eggVideo_cpp@ = .rodata:0x804FB818; // type:object size:0x3C scope:local @@ -29955,8 +29953,8 @@ lbl_80500CD8 = .data:0x80500CD8; // type:object size:0x70 lbl_80500D48 = .data:0x80500D48; // type:object size:0x78 lbl_80500DC0 = .data:0x80500DC0; // type:object size:0x70 lbl_80500E30 = .data:0x80500E30; // type:object size:0x50 -__vt__21BlurAndPaletteManager = .data:0x80500E80; // type:object size:0xC -lbl_80500E8C = .data:0x80500E8C; // type:object size:0xC +__vt__11dLightEnv_c = .data:0x80500E80; // type:object size:0xC +__vt__13ActorLighting = .data:0x80500E8C; // type:object size:0xC lbl_80500E98 = .data:0x80500E98; // type:object size:0x10 data:string lbl_80500EA8 = .data:0x80500EA8; // type:object size:0x444 __vt__17dMassObjEmitter_c = .data:0x805012EC; // type:object size:0xC @@ -37633,22 +37631,22 @@ __vt__12dCcMassS_Obj = .data:0x80548598; // type:object size:0xC __vt__4dCcS = .data:0x805485A8; // type:object size:0xC lbl_805485B8 = .data:0x805485B8; // type:object size:0xC lbl_805485C4 = .data:0x805485C4; // type:object size:0xC -lbl_805485D0 = .data:0x805485D0; // type:object size:0xA8 -lbl_80548678 = .data:0x80548678; // type:object size:0xC -lbl_80548684 = .data:0x80548684; // type:object size:0x1C -lbl_805486A0 = .data:0x805486A0; // type:object size:0x10 -lbl_805486B0 = .data:0x805486B0; // type:object size:0x60 -lbl_80548710 = .data:0x80548710; // type:object size:0x20 -lbl_80548730 = .data:0x80548730; // type:object size:0x28 +__vt__9dSndMgr_c = .data:0x805485D0; // type:object size:0xA8 +__vt__22SoundPropertiesChecker = .data:0x80548678; // type:object size:0xC +__vt__11dSndActor_c = .data:0x80548684; // type:object size:0x1C scope:weak +__vt__23IsCurrentSoundIdChecker = .data:0x805486A0; // type:object size:0x10 +__vt__13dSnd3DActor_c = .data:0x805486B0; // type:object size:0x60 +__vt__14dSnd3DEngine_c = .data:0x80548710; // type:object size:0x20 +__vt__11dSndSound_c = .data:0x80548730; // type:object size:0x28 lbl_80548758 = .data:0x80548758; // type:object size:0x14 data:string lbl_8054876C = .data:0x8054876C; // type:object size:0x14 data:string -lbl_80548780 = .data:0x80548780; // type:object size:0x10 -lbl_80548790 = .data:0x80548790; // type:object size:0x10 -lbl_805487A0 = .data:0x805487A0; // type:object size:0xC -lbl_805487AC = .data:0x805487AC; // type:object size:0xC -lbl_805487B8 = .data:0x805487B8; // type:object size:0xC -lbl_805487C4 = .data:0x805487C4; // type:object size:0xC -lbl_805487D0 = .data:0x805487D0; // type:object size:0x10 +__vt__15dSndPlayerMgr_c = .data:0x80548780; // type:object size:0x10 +__vt__33SndMgrDisposer<15dSndPlayerMgr_c> = .data:0x80548790; // type:object size:0xC +__vt__21EventMuteFlagsApplier = .data:0x805487A0; // type:object size:0xC +__vt__21SmallMuteFlagsApplier = .data:0x805487AC; // type:object size:0xC +__vt__23FanfareMuteFlagsApplier = .data:0x805487B8; // type:object size:0xC +__vt__40SndMgrDisposer<22dSndControlPlayerMgr_c> = .data:0x805487C4; // type:object size:0xC +__vt__33SndMgrDisposer<15dSnd3DManager_c> = .data:0x805487D0; // type:object size:0xC scope:weak lbl_805487E0 = .data:0x805487E0; // type:object size:0xAC lbl_8054888C = .data:0x8054888C; // type:object size:0xC lbl_80548898 = .data:0x80548898; // type:object size:0xC @@ -37697,18 +37695,18 @@ lbl_80548AFC = .data:0x80548AFC; // type:object size:0xC lbl_80548B08 = .data:0x80548B08; // type:object size:0x14 lbl_80548B1C = .data:0x80548B1C; // type:object size:0x10 lbl_80548B2C = .data:0x80548B2C; // type:object size:0xC -lbl_80548B38 = .data:0x80548B38; // type:object size:0x10 +__vt__42SndMgrDisposer<24dSndAreaSoundEffectMgr_c> = .data:0x80548B38; // type:object size:0x10 lbl_80548B48 = .data:0x80548B48; // type:object size:0x30 -lbl_80548B78 = .data:0x80548B78; // type:object size:0x20 -lbl_80548B98 = .data:0x80548B98; // type:object size:0x20 -lbl_80548BB8 = .data:0x80548BB8; // type:object size:0x20 -lbl_80548BD8 = .data:0x80548BD8; // type:object size:0x20 -lbl_80548BF8 = .data:0x80548BF8; // type:object size:0x20 -lbl_80548C18 = .data:0x80548C18; // type:object size:0x20 -lbl_80548C38 = .data:0x80548C38; // type:object size:0x24 -lbl_80548C5C = .data:0x80548C5C; // type:object size:0x24 -lbl_80548C80 = .data:0x80548C80; // type:object size:0x24 -lbl_80548CA4 = .data:0x80548CA4; // type:object size:0x24 +__vt__33dSndControlSoundStrmTrackVolume_c = .data:0x80548B78; // type:object size:0x20 +__vt__32dSndControlSoundSeqTrackVolume_c = .data:0x80548B98; // type:object size:0x20 +__vt__31dSndControlSoundSeqTempoRatio_c = .data:0x80548BB8; // type:object size:0x20 +__vt__29dSndControlSoundPitchLinear_c = .data:0x80548BD8; // type:object size:0x20 +__vt__23dSndControlSoundPitch_c = .data:0x80548BF8; // type:object size:0x20 +__vt__24dSndControlSoundVolume_c = .data:0x80548C18; // type:object size:0x20 +__vt__25dSndControlPlayerFxSend_c = .data:0x80548C38; // type:object size:0x24 +__vt__26dSndControlPlayerLpfFreq_c = .data:0x80548C5C; // type:object size:0x24 +__vt__25dSndControlPlayerVolume_c = .data:0x80548C80; // type:object size:0x24 +__vt__29dSndControlPlayerVolumeBase_c = .data:0x80548CA4; // type:object size:0x24 scope:weak jumptable_80548CC8 = .data:0x80548CC8; // type:object size:0x34 scope:local jumptable_80548CFC = .data:0x80548CFC; // type:object size:0x284 scope:local lbl_80548F80 = .data:0x80548F80; // type:object size:0xC @@ -37735,8 +37733,8 @@ lbl_80549178 = .data:0x80549178; // type:object size:0x10 lbl_80549188 = .data:0x80549188; // type:object size:0x10 lbl_80549198 = .data:0x80549198; // type:object size:0x10 lbl_805491A8 = .data:0x805491A8; // type:object size:0x10 -lbl_805491B8 = .data:0x805491B8; // type:object size:0xC -vtable5 = .data:0x805491C4; // type:object size:0xC +__vt__12SoundStopper = .data:0x805491B8; // type:object size:0xC +__vt__38SndMgrDisposer<20dSndSmallEffectMgr_c> = .data:0x805491C4; // type:object size:0xC lbl_805491D0 = .data:0x805491D0; // type:object size:0x10 jumptable_805491E0 = .data:0x805491E0; // type:object size:0x20 scope:local lbl_80549200 = .data:0x80549200; // type:object size:0x14 data:4byte @@ -37753,11 +37751,11 @@ lbl_80549EC4 = .data:0x80549EC4; // type:object size:0x1EC lbl_8054A0B0 = .data:0x8054A0B0; // type:object size:0x1EC lbl_8054A29C = .data:0x8054A29C; // type:object size:0x1EC lbl_8054A488 = .data:0x8054A488; // type:object size:0x1EC -lbl_8054A674 = .data:0x8054A674; // type:object size:0xC +__vt__33SndMgrDisposer<15dSndSourceMgr_c> = .data:0x8054A674; // type:object size:0xC lbl_8054A680 = .data:0x8054A680; // type:object size:0x150 lbl_8054A7D0 = .data:0x8054A7D0; // type:object size:0xC -lbl_8054A7DC = .data:0x8054A7DC; // type:object size:0x1EC -lbl_8054A9C8 = .data:0x8054A9C8; // type:object size:0x120 +__vt__14dSoundSource_c = .data:0x8054A7DC; // type:object size:0x1EC +__vt__16dSoundSourceIf_c = .data:0x8054A9C8; // type:object size:0x120 lbl_8054AAE8 = .data:0x8054AAE8; // type:object size:0x38 lbl_8054AB20 = .data:0x8054AB20; // type:object size:0x3F8 jumptable_8054AF18 = .data:0x8054AF18; // type:object size:0xA8 scope:local @@ -38585,52 +38583,52 @@ __vt__Q34nw4r3g3d12ScnMdlSimple = .data:0x8056DA28; // type:object size:0x48 __vt__Q34nw4r3g3d6ScnMdl = .data:0x8056DA70; // type:object size:0x48 @10666 = .data:0x8056DAB8; // type:object size:0x46 scope:local data:string __vt__Q34nw4r3g3d7ScnProc = .data:0x8056DB00; // type:object size:0x34 -lbl_8056DB38 = .data:0x8056DB38; // type:object size:0x28 -lbl_8056DB60 = .data:0x8056DB60; // type:object size:0x38 -lbl_8056DB98 = .data:0x8056DB98; // type:object size:0x10 -lbl_8056DBA8 = .data:0x8056DBA8; // type:object size:0x10 -lbl_8056DBB8 = .data:0x8056DBB8; // type:object size:0x10 -lbl_8056DBC8 = .data:0x8056DBC8; // type:object size:0x10 -lbl_8056DBD8 = .data:0x8056DBD8; // type:object size:0x10 -lbl_8056DBE8 = .data:0x8056DBE8; // type:object size:0x68 -lbl_8056DC50 = .data:0x8056DC50; // type:object size:0x20 -lbl_8056DC70 = .data:0x8056DC70; // type:object size:0x28 -lbl_8056DC98 = .data:0x8056DC98; // type:object size:0x60 -lbl_8056DCF8 = .data:0x8056DCF8; // type:object size:0x20 -lbl_8056DD18 = .data:0x8056DD18; // type:object size:0x28 -jumptable_8056DD40 = .data:0x8056DD40; // type:object size:0x1F4 scope:local -lbl_8056DF38 = .data:0x8056DF38; // type:object size:0x10 -lbl_8056DF48 = .data:0x8056DF48; // type:object size:0x10 -lbl_8056DF58 = .data:0x8056DF58; // type:object size:0x18 -lbl_8056DF70 = .data:0x8056DF70; // type:object size:0x60 -lbl_8056DFD0 = .data:0x8056DFD0; // type:object size:0x20 -lbl_8056DFF0 = .data:0x8056DFF0; // type:object size:0x10 -lbl_8056E000 = .data:0x8056E000; // type:object size:0xC data:4byte -lbl_8056E00C = .data:0x8056E00C; // type:object size:0xC data:4byte -lbl_8056E018 = .data:0x8056E018; // type:object size:0xC data:4byte -lbl_8056E024 = .data:0x8056E024; // type:object size:0x64 -lbl_8056E088 = .data:0x8056E088; // type:object size:0x38 -lbl_8056E0C0 = .data:0x8056E0C0; // type:object size:0x18 -lbl_8056E0D8 = .data:0x8056E0D8; // type:object size:0x10 -lbl_8056E0E8 = .data:0x8056E0E8; // type:object size:0x30 -lbl_8056E118 = .data:0x8056E118; // type:object size:0x20 -lbl_8056E138 = .data:0x8056E138; // type:object size:0x38 -lbl_8056E170 = .data:0x8056E170; // type:object size:0x20 -lbl_8056E190 = .data:0x8056E190; // type:object size:0x20 -lbl_8056E1B0 = .data:0x8056E1B0; // type:object size:0x30 -WSDCallback = .data:0x8056E1E0; // type:object size:0x10 -SeqCallback = .data:0x8056E1F0; // type:object size:0x10 -lbl_8056E200 = .data:0x8056E200; // type:object size:0x10 -lbl_8056E210 = .data:0x8056E210; // type:object size:0x48 -lbl_8056E258 = .data:0x8056E258; // type:object size:0x48 -lbl_8056E2A0 = .data:0x8056E2A0; // type:object size:0x18 -lbl_8056E2B8 = .data:0x8056E2B8; // type:object size:0x18 -lbl_8056E2D0 = .data:0x8056E2D0; // type:object size:0x38 -jumptable_8056E308 = .data:0x8056E308; // type:object size:0x24 scope:local -lbl_8056E32C = .data:0x8056E32C; // type:object size:0x14 -lbl_8056E340 = .data:0x8056E340; // type:object size:0x10 -lbl_8056E350 = .data:0x8056E350; // type:object size:0x38 -lbl_8056E388 = .data:0x8056E388; // type:object size:0x60 +__vt__Q44nw4r3snd6detail11BasicPlayer = .data:0x8056DB38; // type:object size:0x24 scope:weak +__vt__Q44nw4r3snd6detail10BasicSound = .data:0x8056DB60; // type:object size:0x38 +__vt__Q44nw4r3snd6detail19BiquadFilterBpf2048 = .data:0x8056DB98; // type:object size:0x10 +__vt__Q44nw4r3snd6detail19BiquadFilterBpf1024 = .data:0x8056DBA8; // type:object size:0x10 +__vt__Q44nw4r3snd6detail18BiquadFilterBpf512 = .data:0x8056DBB8; // type:object size:0x10 +__vt__Q44nw4r3snd6detail15BiquadFilterHpf = .data:0x8056DBC8; // type:object size:0x10 +__vt__Q44nw4r3snd6detail15BiquadFilterLpf = .data:0x8056DBD8; // type:object size:0x10 +__vt__Q44nw4r3snd15DvdSoundArchive13DvdFileStream = .data:0x8056DBE8; // type:object size:0x64 +__vt__Q34nw4r3snd15DvdSoundArchive = .data:0x8056DC50; // type:object size:0x20 +__vt__Q34nw4r3snd15FxReverbStdDpl2 = .data:0x8056DC70; // type:object size:0x24 +__vt__Q44nw4r3snd18MemorySoundArchive16MemoryFileStream = .data:0x8056DC98; // type:object size:0x5C +__vt__Q34nw4r3snd18MemorySoundArchive = .data:0x8056DCF8; // type:object size:0x20 +@3186 = .data:0x8056DD18; // type:object size:0x27 scope:local data:string +@3190 = .data:0x8056DD40; // type:object size:0x1F4 scope:local +__vt__Q44nw4r3snd6detail9MmlParser = .data:0x8056DF38; // type:object size:0x10 +__vt__Q44nw4r3snd6detail11MmlSeqTrack = .data:0x8056DF48; // type:object size:0x10 +__vt__Q44nw4r3snd6detail20MmlSeqTrackAllocator = .data:0x8056DF58; // type:object size:0x18 +__vt__Q44nw4r3snd16NandSoundArchive14NandFileStream = .data:0x8056DF70; // type:object size:0x5C +__vt__Q34nw4r3snd16NandSoundArchive = .data:0x8056DFD0; // type:object size:0x20 +__vt__Q44nw4r3snd6detail10PlayerHeap = .data:0x8056DFF0; // type:object size:0x10 +@4081 = .data:0x8056E000; // type:object size:0xC scope:local data:4byte +@4096 = .data:0x8056E00C; // type:object size:0xC scope:local data:4byte +@4111 = .data:0x8056E018; // type:object size:0xC scope:local data:4byte +__vt__Q44nw4r3snd6detail9SeqPlayer = .data:0x8056E024; // type:object size:0x64 +__vt__Q44nw4r3snd6detail8SeqSound = .data:0x8056E088; // type:object size:0x38 +__vt__Q54nw4r3snd6detail8SeqSound11SeqLoadTask = .data:0x8056E0C0; // type:object size:0x18 +__vt__Q44nw4r3snd6detail8SeqTrack = .data:0x8056E0D8; // type:object size:0x10 +__vt__Q34nw4r3snd12Sound3DActor = .data:0x8056E0E8; // type:object size:0x30 +__vt__Q34nw4r3snd13Sound3DEngine = .data:0x8056E118; // type:object size:0x1C +__vt__Q34nw4r3snd14Sound3DManager = .data:0x8056E138; // type:object size:0x34 +__vt__Q34nw4r3snd10SoundActor = .data:0x8056E170; // type:object size:0x1C +__vt__Q34nw4r3snd12SoundArchive = .data:0x8056E190; // type:object size:0x20 +__vt__Q34nw4r3snd18SoundArchivePlayer = .data:0x8056E1B0; // type:object size:0x30 +__vt__Q44nw4r3snd18SoundArchivePlayer11WsdCallback = .data:0x8056E1E0; // type:object size:0x10 +__vt__Q44nw4r3snd18SoundArchivePlayer17SeqNoteOnCallback = .data:0x8056E1F0; // type:object size:0x10 +__vt__Q34nw4r3snd9SoundHeap = .data:0x8056E200; // type:object size:0x10 +@2785 = .data:0x8056E210; // type:object size:0x46 scope:local data:string +__vt__Q44nw4r3snd6detail10StrmPlayer = .data:0x8056E258; // type:object size:0x48 +__vt__Q54nw4r3snd6detail10StrmPlayer16StrmDataLoadTask = .data:0x8056E2A0; // type:object size:0x18 +__vt__Q54nw4r3snd6detail10StrmPlayer18StrmHeaderLoadTask = .data:0x8056E2B8; // type:object size:0x18 +__vt__Q44nw4r3snd6detail9StrmSound = .data:0x8056E2D0; // type:object size:0x38 +@5068 = .data:0x8056E308; // type:object size:0x24 scope:local +__vt__Q44nw4r3snd6detail5Voice = .data:0x8056E32C; // type:object size:0x14 +PanTableTable__Q44nw4r3snd6detail4Util = .data:0x8056E340; // type:object size:0xC +__vt__Q44nw4r3snd6detail9WaveSound = .data:0x8056E350; // type:object size:0x38 +__vt__Q44nw4r3snd6detail9WsdPlayer = .data:0x8056E388; // type:object size:0x60 @324 = .data:0x8056E3E8; // type:object size:0x46 scope:local data:string __vt__Q34nw4r3lyt4Pane = .data:0x8056E430; // type:object size:0x74 __vt__Q34nw4r3lyt5Group = .data:0x8056E4A8; // type:object size:0xC @@ -41147,11 +41145,11 @@ pG3DStateIndMtxOp__Q44nw4r3g3d8G3DState23@unnamed@g3d_state_cpp@ = .sdata:0x8057 @13309 = .sdata:0x80574E78; // type:object size:0x8 scope:local data:string @13310 = .sdata:0x80574E80; // type:object size:0x8 scope:local data:string NW4R_G3D_Version___22@unnamed@g3d_init_cpp@ = .sdata:0x80574E88; // type:object size:0x4 scope:local data:4byte -lbl_80574E90 = .sdata:0x80574E90; // type:object size:0x4 -lbl_80574E94 = .sdata:0x80574E94; // type:object size:0x4 -lbl_80574E98 = .sdata:0x80574E98; // type:object size:0x8 -lbl_80574EA0 = .sdata:0x80574EA0; // type:object size:0x8 data:4byte -lbl_80574EA8 = .sdata:0x80574EA8; // type:object size:0x8 data:4byte +@3183 = .sdata:0x80574E90; // type:object size:0x2 scope:local data:string +@3184 = .sdata:0x80574E94; // type:object size:0x2 scope:local data:string +@3185 = .sdata:0x80574E98; // type:object size:0x1 scope:local +NW4R_SND_Version_ = .sdata:0x80574EA0; // type:object size:0x4 data:4byte +@LOCAL@CalcRandom__Q44nw4r3snd6detail4UtilFv@u = .sdata:0x80574EA8; // type:object size:0x4 scope:weak data:4byte NW4R_LYT_Version___22@unnamed@lyt_init_cpp@ = .sdata:0x80574EB0; // type:object size:0x4 scope:local data:4byte @6623 = .sdata:0x80574EB8; // type:object size:0x4 scope:local data:string @1484 = .sdata:0x80574EC0; // type:object size:0x2 scope:local data:string @@ -41233,7 +41231,7 @@ lbl_80575054 = .sbss:0x80575054; // type:object size:0x1 data:byte lbl_80575058 = .sbss:0x80575058; // type:object size:0x8 data:byte lbl_80575060 = .sbss:0x80575060; // type:object size:0x1 data:byte lbl_80575064 = .sbss:0x80575064; // type:object size:0x4 data:4byte -sPInstance__21BlurAndPaletteManager = .sbss:0x80575068; // type:object size:0x8 data:4byte +sPInstance__11dLightEnv_c = .sbss:0x80575068; // type:object size:0x4 data:4byte sMassObjEmitters__14dJEffManager_c = .sbss:0x80575070; // type:object size:0x4 data:4byte CURRENT_EFFECT_MANAGER_INIT = .sbss:0x80575074; // type:object size:0x4 data:4byte ms_allocator__14dJEffManager_c = .sbss:0x80575078; // type:object size:0x4 data:4byte @@ -41243,7 +41241,7 @@ s_Create_Position__9dAcBase_c = .sbss:0x80575080; // type:object size:0x4 data:4 s_Create_Rotation__9dAcBase_c = .sbss:0x80575084; // type:object size:0x4 data:4byte s_Create_Scale__9dAcBase_c = .sbss:0x80575088; // type:object size:0x4 data:4byte s_Create_Parent__9dAcBase_c = .sbss:0x8057508C; // type:object size:0x4 data:4byte -s_Create_ObjInfo__9dAcBase_c = .sbss:0x80575090; // type:object size:0x4 data:4byte +s_Create_ActorInfo__9dAcBase_c = .sbss:0x80575090; // type:object size:0x4 data:4byte s_Create_Subtype__9dAcBase_c = .sbss:0x80575094; // type:object size:0x1 data:byte ENEMY_LIST = .sbss:0x80575098; // type:object size:0x8 data:4byte NPC_ACTOR_LIST = .sbss:0x805750A0; // type:object size:0x8 data:4byte @@ -41890,34 +41888,34 @@ l_start = .sbss:0x80575D18; // type:object size:0x4 data:4byte l_wcsbuf_num = .sbss:0x80575D1C; // type:object size:0x4 data:4byte sInstance__4dCcS = .sbss:0x80575D20; // type:object size:0x4 data:4byte lbl_80575D28 = .sbss:0x80575D28; // type:object size:0x8 data:4byte -lbl_80575D30 = .sbss:0x80575D30; // type:object size:0x8 data:4byte -BGM_MGR = .sbss:0x80575D38; // type:object size:0x4 data:4byte -BGM_MGR_source = .sbss:0x80575D3C; // type:object size:0x4 data:4byte +sInstance__9dSndMgr_c = .sbss:0x80575D30; // type:object size:0x8 data:4byte +sInstance__15dSndPlayerMgr_c = .sbss:0x80575D38; // type:object size:0x4 data:4byte +sDisposer__15dSndPlayerMgr_c = .sbss:0x80575D3C; // type:object size:0x4 data:4byte lbl_80575D40 = .sbss:0x80575D40; // type:object size:0x4 data:4byte lbl_80575D44 = .sbss:0x80575D44; // type:object size:0x4 data:4byte lbl_80575D48 = .sbss:0x80575D48; // type:object size:0x4 data:4byte -lbl_80575D4C = .sbss:0x80575D4C; // type:object size:0x4 data:4byte -lbl_80575D50 = .sbss:0x80575D50; // type:object size:0x8 data:4byte -lbl_80575D58 = .sbss:0x80575D58; // type:object size:0x4 data:4byte -lbl_80575D5C = .sbss:0x80575D5C; // type:object size:0x4 data:4byte +sInstance__22dSndControlPlayerMgr_c = .sbss:0x80575D4C; // type:object size:0x4 data:4byte +sDisposer__22dSndControlPlayerMgr_c = .sbss:0x80575D50; // type:object size:0x8 data:4byte +sInstance__15dSnd3DManager_c = .sbss:0x80575D58; // type:object size:0x4 data:4byte +sDisposer__15dSnd3DManager_c = .sbss:0x80575D5C; // type:object size:0x4 data:4byte lbl_80575D60 = .sbss:0x80575D60; // type:object size:0x4 data:4byte lbl_80575D64 = .sbss:0x80575D64; // type:object size:0x4 data:4byte lbl_80575D68 = .sbss:0x80575D68; // type:object size:0x4 data:4byte ENEMY_SOUND_MGR = .sbss:0x80575D6C; // type:object size:0x4 data:4byte ENEMY_SOUND_MGR_source = .sbss:0x80575D70; // type:object size:0x8 data:4byte -lbl_80575D78 = .sbss:0x80575D78; // type:object size:0x4 data:4byte -lbl_80575D7C = .sbss:0x80575D7C; // type:object size:0x4 data:4byte +sInstance__24dSndAreaSoundEffectMgr_c = .sbss:0x80575D78; // type:object size:0x4 data:4byte +sDisposer__24dSndAreaSoundEffectMgr_c = .sbss:0x80575D7C; // type:object size:0x4 data:4byte FANFARE_SOUND_MGR = .sbss:0x80575D80; // type:object size:0x4 data:4byte FANFARE_SOUND_MGR_source = .sbss:0x80575D84; // type:object size:0x4 data:4byte lbl_80575D88 = .sbss:0x80575D88; // type:object size:0x8 data:4byte SOME_UNUSED_SOUND_MGR = .sbss:0x80575D90; // type:object size:0x4 data:4byte SOME_UNUSED_SOUND_MGR_source = .sbss:0x80575D94; // type:object size:0x4 data:4byte -sInstance__17SmallSoundManager = .sbss:0x80575D98; // type:object size:0x4 data:4byte -SOUND_EFFECT_SOUND_MGR_source = .sbss:0x80575D9C; // type:object size:0x4 data:4byte +sInstance__20dSndSmallEffectMgr_c = .sbss:0x80575D98; // type:object size:0x4 data:4byte +sDisposer__20dSndSmallEffectMgr_c = .sbss:0x80575D9C; // type:object size:0x4 data:4byte lbl_80575DA0 = .sbss:0x80575DA0; // type:object size:0x4 data:4byte lbl_80575DA4 = .sbss:0x80575DA4; // type:object size:0x4 data:4byte -ENEMY_BGM_RELATED_MGR = .sbss:0x80575DA8; // type:object size:0x4 data:4byte -lbl_80575DAC = .sbss:0x80575DAC; // type:object size:0x4 data:4byte +sInstance__15dSndSourceMgr_c = .sbss:0x80575DA8; // type:object size:0x4 data:4byte +sDisposer__15dSndSourceMgr_c = .sbss:0x80575DAC; // type:object size:0x4 data:4byte lbl_80575DB0 = .sbss:0x80575DB0; // type:object size:0x8 data:4byte lbl_80575DB8 = .sbss:0x80575DB8; // type:object size:0x8 data:byte lbl_80575DC0 = .sbss:0x80575DC0; // type:object size:0x8 data:4byte @@ -42416,33 +42414,33 @@ sTev__Q44nw4r3g3d8G3DState23@unnamed@g3d_state_cpp@ = .sbss:0x80576634; // type: @GUARD@GetViewNrmMtxPtr__Q54nw4r3g3d8G3DState23@unnamed@g3d_state_cpp@19PosNrmMtxArrayStateCFUl@m = .sbss:0x80576638; // type:object size:0x1 scope:weak data:byte sMisc__Q44nw4r3g3d8G3DState23@unnamed@g3d_state_cpp@ = .sbss:0x80576640; // type:object size:0x8 scope:local data:4byte gpCullingFrustum__Q24nw4r3g3d = .sbss:0x80576648; // type:object size:0x4 data:4byte -sBiquadFilterLpf = .sbss:0x80576650; // type:object size:0x4 data:4byte -sBiquadFilterHpf = .sbss:0x80576654; // type:object size:0x4 data:4byte -sBiquadFilterBpf512 = .sbss:0x80576658; // type:object size:0x4 data:4byte -sBiquadFilterBpf1024 = .sbss:0x8057665C; // type:object size:0x4 data:4byte -sBiquadFilterBpf2048 = .sbss:0x80576660; // type:object size:0x4 data:4byte -lbl_80576664 = .sbss:0x80576664; // type:object size:0x1 data:byte -lbl_80576665 = .sbss:0x80576665; // type:object size:0x1 data:byte -lbl_80576668 = .sbss:0x80576668; // type:object size:0x8 data:byte -lbl_80576670 = .sbss:0x80576670; // type:object size:0x4 data:4byte -lbl_80576674 = .sbss:0x80576674; // type:object size:0x4 data:4byte -lbl_80576678 = .sbss:0x80576678; // type:object size:0x8 data:4byte -lbl_80576680 = .sbss:0x80576680; // type:object size:0x8 data:byte -lbl_80576688 = .sbss:0x80576688; // type:object size:0x8 data:byte -lbl_80576690 = .sbss:0x80576690; // type:object size:0x8 data:byte -lbl_80576698 = .sbss:0x80576698; // type:object size:0x4 data:4byte -lbl_8057669C = .sbss:0x8057669C; // type:object size:0x1 data:byte -lbl_805766A0 = .sbss:0x805766A0; // type:object size:0x8 data:byte -lbl_805766A8 = .sbss:0x805766A8; // type:object size:0x8 data:4byte -lbl_805766B0 = .sbss:0x805766B0; // type:object size:0x8 data:byte -isSoundSystemInit = .sbss:0x805766B8; // type:object size:0x1 data:byte -lbl_805766BC = .sbss:0x805766BC; // type:object size:0x4 data:4byte -lbl_805766C0 = .sbss:0x805766C0; // type:object size:0x8 data:byte -lbl_805766C8 = .sbss:0x805766C8; // type:object size:0x8 data:byte -lbl_805766D0 = .sbss:0x805766D0; // type:object size:0x8 data:4byte -lbl_805766D8 = .sbss:0x805766D8; // type:object size:0x8 data:byte -lbl_805766E0 = .sbss:0x805766E0; // type:object size:0x8 data:byte -lbl_805766E8 = .sbss:0x805766E8; // type:object size:0x8 data:4byte +sBiquadFilterLpf__Q44nw4r3snd6detail9AxManager = .sbss:0x80576650; // type:object size:0x4 data:4byte +sBiquadFilterHpf__Q44nw4r3snd6detail9AxManager = .sbss:0x80576654; // type:object size:0x4 data:4byte +sBiquadFilterBpf512__Q44nw4r3snd6detail9AxManager = .sbss:0x80576658; // type:object size:0x4 data:4byte +sBiquadFilterBpf1024__Q44nw4r3snd6detail9AxManager = .sbss:0x8057665C; // type:object size:0x4 data:4byte +sBiquadFilterBpf2048__Q44nw4r3snd6detail9AxManager = .sbss:0x80576660; // type:object size:0x4 data:4byte +@GUARD@GetInstance__Q44nw4r3snd6detail9AxManagerFv@instance = .sbss:0x80576664; // type:object size:0x1 scope:weak data:byte +@LOCAL@AiDmaCallbackFunc__Q44nw4r3snd6detail9AxManagerFv@finishedFlag = .sbss:0x80576665; // type:object size:0x1 scope:weak data:byte +@GUARD@GetInstance__Q44nw4r3snd6detail14AxVoiceManagerFv@instance = .sbss:0x80576668; // type:object size:0x1 scope:weak data:byte +mCurrentFx__Q44nw4r3snd6detail8AxfxImpl = .sbss:0x80576670; // type:object size:0x4 data:4byte +mAllocatedSize__Q44nw4r3snd6detail8AxfxImpl = .sbss:0x80576674; // type:object size:0x4 data:4byte +typeInfo__Q44nw4r3snd6detail10BasicSound = .sbss:0x80576678; // type:object size:0x4 data:4byte +@GUARD@GetInstance__Q44nw4r3snd6detail14ChannelManagerFv@instance = .sbss:0x80576680; // type:object size:0x1 scope:weak data:byte +@GUARD@GetInstance__Q44nw4r3snd6detail22DisposeCallbackManagerFv@instance = .sbss:0x80576688; // type:object size:0x1 scope:weak data:byte +mPrintVarEnabledFlag__Q44nw4r3snd6detail9MmlParser = .sbss:0x80576690; // type:object size:0x1 data:byte +@LOCAL@LoadFileHeader__Q34nw4r3snd16NandSoundArchiveFv@headerAlignSize = .sbss:0x80576698; // type:object size:0x4 scope:weak data:4byte +@GUARD@LoadFileHeader__Q34nw4r3snd16NandSoundArchiveFv@headerAlignSize = .sbss:0x8057669C; // type:object size:0x1 scope:weak data:byte +@GUARD@GetInstance__Q44nw4r3snd6detail20RemoteSpeakerManagerFv@instance = .sbss:0x805766A0; // type:object size:0x1 scope:weak data:byte +typeInfo__Q44nw4r3snd6detail8SeqSound = .sbss:0x805766A8; // type:object size:0x4 data:4byte +@GUARD@detail_SortPriorityList__Q34nw4r3snd11SoundPlayerFv@tmplist = .sbss:0x805766B0; // type:object size:0x1 scope:weak data:byte +sInitialized__Q34nw4r3snd29@unnamed@snd_SoundSystem_cpp@ = .sbss:0x805766B8; // type:object size:0x1 scope:local data:byte +sMaxVoices__Q34nw4r3snd11SoundSystem = .sbss:0x805766BC; // type:object size:0x4 data:4byte +@GUARD@GetInstance__Q44nw4r3snd6detail11SoundThreadFv@instance = .sbss:0x805766C0; // type:object size:0x1 scope:weak data:byte +sStaticInitFlag__Q44nw4r3snd6detail10StrmPlayer = .sbss:0x805766C8; // type:object size:0x1 data:byte +typeInfo__Q44nw4r3snd6detail9StrmSound = .sbss:0x805766D0; // type:object size:0x4 data:4byte +@GUARD@GetInstance__Q44nw4r3snd6detail11TaskManagerFv@instance = .sbss:0x805766D8; // type:object size:0x1 scope:weak data:byte +@GUARD@GetInstance__Q44nw4r3snd6detail12VoiceManagerFv@instance = .sbss:0x805766E0; // type:object size:0x1 scope:weak data:byte +typeInfo__Q44nw4r3snd6detail9WaveSound = .sbss:0x805766E8; // type:object size:0x4 data:4byte typeInfo__Q34nw4r3lyt4Pane = .sbss:0x805766F0; // type:object size:0x4 data:4byte mspAllocator__Q34nw4r3lyt6Layout = .sbss:0x805766F8; // type:object size:0x4 data:4byte typeInfo__Q34nw4r3lyt7Picture = .sbss:0x80576700; // type:object size:0x4 data:4byte @@ -42676,35 +42674,35 @@ lbl_80576B88 = .sdata2:0x80576B88; // type:object size:0x4 align:4 data:float lbl_80576B8C = .sdata2:0x80576B8C; // type:object size:0x4 align:4 data:float lbl_80576B90 = .sdata2:0x80576B90; // type:object size:0x4 align:4 data:float lbl_80576B98 = .sdata2:0x80576B98; // type:object size:0x4 align:4 data:float -lbl_80576BA0 = .sdata2:0x80576BA0; // type:object size:0x4 align:4 data:float -lbl_80576BA4 = .sdata2:0x80576BA4; // type:object size:0x4 align:4 data:float -lbl_80576BA8 = .sdata2:0x80576BA8; // type:object size:0x4 align:4 data:float -lbl_80576BAC = .sdata2:0x80576BAC; // type:object size:0x4 align:4 data:float -lbl_80576BB0 = .sdata2:0x80576BB0; // type:object size:0x4 align:4 data:float -lbl_80576BB4 = .sdata2:0x80576BB4; // type:object size:0x4 align:4 data:float -lbl_80576BB8 = .sdata2:0x80576BB8; // type:object size:0x4 align:4 data:float -lbl_80576BBC = .sdata2:0x80576BBC; // type:object size:0x4 align:4 data:float -lbl_80576BC0 = .sdata2:0x80576BC0; // type:object size:0x4 align:4 data:float -lbl_80576BC4 = .sdata2:0x80576BC4; // type:object size:0x4 align:4 data:float -lbl_80576BC8 = .sdata2:0x80576BC8; // type:object size:0x8 align:8 data:double -lbl_80576BD0 = .sdata2:0x80576BD0; // type:object size:0x4 align:4 data:float -lbl_80576BD4 = .sdata2:0x80576BD4; // type:object size:0x4 align:4 data:float -lbl_80576BD8 = .sdata2:0x80576BD8; // type:object size:0x4 align:4 data:float -lbl_80576BDC = .sdata2:0x80576BDC; // type:object size:0x4 align:4 data:float -lbl_80576BE0 = .sdata2:0x80576BE0; // type:object size:0x4 align:4 data:float -lbl_80576BE4 = .sdata2:0x80576BE4; // type:object size:0x4 align:4 data:float -lbl_80576BE8 = .sdata2:0x80576BE8; // type:object size:0x4 align:4 data:float -lbl_80576BEC = .sdata2:0x80576BEC; // type:object size:0x4 align:4 data:float -lbl_80576BF0 = .sdata2:0x80576BF0; // type:object size:0x4 align:4 data:float -lbl_80576BF4 = .sdata2:0x80576BF4; // type:object size:0x4 align:4 data:float -lbl_80576BF8 = .sdata2:0x80576BF8; // type:object size:0x4 align:4 data:float -lbl_80576BFC = .sdata2:0x80576BFC; // type:object size:0x4 align:4 data:float -lbl_80576C00 = .sdata2:0x80576C00; // type:object size:0x4 align:4 data:float -lbl_80576C04 = .sdata2:0x80576C04; // type:object size:0x4 align:4 data:float -lbl_80576C08 = .sdata2:0x80576C08; // type:object size:0x4 align:4 data:float -lbl_80576C0C = .sdata2:0x80576C0C; // type:object size:0x4 align:4 data:float -lbl_80576C10 = .sdata2:0x80576C10; // type:object size:0x4 align:4 data:float -lbl_80576C14 = .sdata2:0x80576C14; // type:object size:0x4 align:4 data:float +@27325 = .sdata2:0x80576BA0; // type:object size:0x4 scope:local align:4 data:float +@27357 = .sdata2:0x80576BA4; // type:object size:0x4 scope:local align:4 data:float +@27413 = .sdata2:0x80576BA8; // type:object size:0x4 scope:local align:4 data:float +@27414 = .sdata2:0x80576BAC; // type:object size:0x4 scope:local align:4 data:float +@27596 = .sdata2:0x80576BB0; // type:object size:0x4 scope:local align:4 data:float +@27616 = .sdata2:0x80576BB4; // type:object size:0x4 scope:local align:4 data:float +@27620 = .sdata2:0x80576BB8; // type:object size:0x4 scope:local align:4 data:float +@27624 = .sdata2:0x80576BBC; // type:object size:0x4 scope:local align:4 data:float +@27628 = .sdata2:0x80576BC0; // type:object size:0x4 scope:local align:4 data:float +@27632 = .sdata2:0x80576BC4; // type:object size:0x4 scope:local align:4 data:float +@27782 = .sdata2:0x80576BC8; // type:object size:0x8 scope:local align:8 data:double +@28568 = .sdata2:0x80576BD0; // type:object size:0x4 scope:local align:4 data:float +@28569 = .sdata2:0x80576BD4; // type:object size:0x4 scope:local align:4 data:float +@28600 = .sdata2:0x80576BD8; // type:object size:0x4 scope:local align:4 data:float +@28601 = .sdata2:0x80576BDC; // type:object size:0x4 scope:local align:4 data:float +@28734 = .sdata2:0x80576BE0; // type:object size:0x4 scope:local align:4 data:float +@28735 = .sdata2:0x80576BE4; // type:object size:0x4 scope:local align:4 data:float +@28736 = .sdata2:0x80576BE8; // type:object size:0x4 scope:local align:4 data:float +@28737 = .sdata2:0x80576BEC; // type:object size:0x4 scope:local align:4 data:float +@28738 = .sdata2:0x80576BF0; // type:object size:0x4 scope:local align:4 data:float +@28739 = .sdata2:0x80576BF4; // type:object size:0x4 scope:local align:4 data:float +@28740 = .sdata2:0x80576BF8; // type:object size:0x4 scope:local align:4 data:float +@28741 = .sdata2:0x80576BFC; // type:object size:0x4 scope:local align:4 data:float +@28742 = .sdata2:0x80576C00; // type:object size:0x4 scope:local align:4 data:float +@28743 = .sdata2:0x80576C04; // type:object size:0x4 scope:local align:4 data:float +@28744 = .sdata2:0x80576C08; // type:object size:0x4 scope:local align:4 data:float +@28745 = .sdata2:0x80576C0C; // type:object size:0x4 scope:local align:4 data:float +@29742 = .sdata2:0x80576C10; // type:object size:0x4 scope:local align:4 data:float +@29743 = .sdata2:0x80576C14; // type:object size:0x4 scope:local align:4 data:float lbl_80576C18 = .sdata2:0x80576C18; // type:object size:0x8 align:8 data:double lbl_80576C20 = .sdata2:0x80576C20; // type:object size:0x4 align:4 data:float lbl_80576C28 = .sdata2:0x80576C28; // type:object size:0x8 align:8 data:double @@ -43366,783 +43364,783 @@ lbl_805779D8 = .sdata2:0x805779D8; // type:object size:0x8 align:8 data:double lbl_805779E0 = .sdata2:0x805779E0; // type:object size:0x4 align:4 data:float lbl_805779E8 = .sdata2:0x805779E8; // type:object size:0x4 align:4 data:float lbl_805779F0 = .sdata2:0x805779F0; // type:object size:0x8 align:8 data:double -lbl_805779F8 = .sdata2:0x805779F8; // type:object size:0x8 -lbl_80577A00 = .sdata2:0x80577A00; // type:object size:0x8 -lbl_80577A08 = .sdata2:0x80577A08; // type:object size:0x8 -lbl_80577A10 = .sdata2:0x80577A10; // type:object size:0x8 -lbl_80577A18 = .sdata2:0x80577A18; // type:object size:0x8 -lbl_80577A20 = .sdata2:0x80577A20; // type:object size:0x8 -lbl_80577A28 = .sdata2:0x80577A28; // type:object size:0x8 -lbl_80577A30 = .sdata2:0x80577A30; // type:object size:0x8 -lbl_80577A38 = .sdata2:0x80577A38; // type:object size:0x8 -lbl_80577A40 = .sdata2:0x80577A40; // type:object size:0x8 -lbl_80577A48 = .sdata2:0x80577A48; // type:object size:0x8 -lbl_80577A50 = .sdata2:0x80577A50; // type:object size:0x8 -lbl_80577A58 = .sdata2:0x80577A58; // type:object size:0x8 -lbl_80577A60 = .sdata2:0x80577A60; // type:object size:0x8 -lbl_80577A68 = .sdata2:0x80577A68; // type:object size:0x8 -lbl_80577A70 = .sdata2:0x80577A70; // type:object size:0x8 -lbl_80577A78 = .sdata2:0x80577A78; // type:object size:0x8 -lbl_80577A80 = .sdata2:0x80577A80; // type:object size:0x8 -lbl_80577A88 = .sdata2:0x80577A88; // type:object size:0x8 -lbl_80577A90 = .sdata2:0x80577A90; // type:object size:0x8 -lbl_80577A98 = .sdata2:0x80577A98; // type:object size:0x8 -lbl_80577AA0 = .sdata2:0x80577AA0; // type:object size:0x8 -lbl_80577AA8 = .sdata2:0x80577AA8; // type:object size:0x8 -lbl_80577AB0 = .sdata2:0x80577AB0; // type:object size:0x8 -lbl_80577AB8 = .sdata2:0x80577AB8; // type:object size:0x8 -lbl_80577AC0 = .sdata2:0x80577AC0; // type:object size:0x8 -lbl_80577AC8 = .sdata2:0x80577AC8; // type:object size:0x8 -lbl_80577AD0 = .sdata2:0x80577AD0; // type:object size:0x8 -lbl_80577AD8 = .sdata2:0x80577AD8; // type:object size:0x8 -lbl_80577AE0 = .sdata2:0x80577AE0; // type:object size:0x8 -lbl_80577AE8 = .sdata2:0x80577AE8; // type:object size:0x8 -lbl_80577AF0 = .sdata2:0x80577AF0; // type:object size:0x8 -lbl_80577AF8 = .sdata2:0x80577AF8; // type:object size:0x8 -lbl_80577B00 = .sdata2:0x80577B00; // type:object size:0x8 -lbl_80577B08 = .sdata2:0x80577B08; // type:object size:0x8 -lbl_80577B10 = .sdata2:0x80577B10; // type:object size:0x8 -lbl_80577B18 = .sdata2:0x80577B18; // type:object size:0x8 -lbl_80577B20 = .sdata2:0x80577B20; // type:object size:0x8 -lbl_80577B28 = .sdata2:0x80577B28; // type:object size:0x8 -lbl_80577B30 = .sdata2:0x80577B30; // type:object size:0x8 -lbl_80577B38 = .sdata2:0x80577B38; // type:object size:0x8 -lbl_80577B40 = .sdata2:0x80577B40; // type:object size:0x8 -lbl_80577B48 = .sdata2:0x80577B48; // type:object size:0x8 -lbl_80577B50 = .sdata2:0x80577B50; // type:object size:0x8 -lbl_80577B58 = .sdata2:0x80577B58; // type:object size:0x8 -lbl_80577B60 = .sdata2:0x80577B60; // type:object size:0x8 -lbl_80577B68 = .sdata2:0x80577B68; // type:object size:0x8 -lbl_80577B70 = .sdata2:0x80577B70; // type:object size:0x8 -lbl_80577B78 = .sdata2:0x80577B78; // type:object size:0x8 -lbl_80577B80 = .sdata2:0x80577B80; // type:object size:0x8 -lbl_80577B88 = .sdata2:0x80577B88; // type:object size:0x8 -lbl_80577B90 = .sdata2:0x80577B90; // type:object size:0x8 -lbl_80577B98 = .sdata2:0x80577B98; // type:object size:0x8 -lbl_80577BA0 = .sdata2:0x80577BA0; // type:object size:0x8 -lbl_80577BA8 = .sdata2:0x80577BA8; // type:object size:0x8 -lbl_80577BB0 = .sdata2:0x80577BB0; // type:object size:0x8 -lbl_80577BB8 = .sdata2:0x80577BB8; // type:object size:0x8 -lbl_80577BC0 = .sdata2:0x80577BC0; // type:object size:0x8 -lbl_80577BC8 = .sdata2:0x80577BC8; // type:object size:0x8 -lbl_80577BD0 = .sdata2:0x80577BD0; // type:object size:0x8 -lbl_80577BD8 = .sdata2:0x80577BD8; // type:object size:0x8 -lbl_80577BE0 = .sdata2:0x80577BE0; // type:object size:0x8 -lbl_80577BE8 = .sdata2:0x80577BE8; // type:object size:0x8 -lbl_80577BF0 = .sdata2:0x80577BF0; // type:object size:0x8 -lbl_80577BF8 = .sdata2:0x80577BF8; // type:object size:0x8 -lbl_80577C00 = .sdata2:0x80577C00; // type:object size:0x8 -lbl_80577C08 = .sdata2:0x80577C08; // type:object size:0x8 -lbl_80577C10 = .sdata2:0x80577C10; // type:object size:0x8 -lbl_80577C18 = .sdata2:0x80577C18; // type:object size:0x8 data:string -lbl_80577C20 = .sdata2:0x80577C20; // type:object size:0x8 -lbl_80577C28 = .sdata2:0x80577C28; // type:object size:0x8 data:string -lbl_80577C30 = .sdata2:0x80577C30; // type:object size:0x8 -lbl_80577C38 = .sdata2:0x80577C38; // type:object size:0x8 data:string -lbl_80577C40 = .sdata2:0x80577C40; // type:object size:0x8 -lbl_80577C48 = .sdata2:0x80577C48; // type:object size:0x8 -lbl_80577C50 = .sdata2:0x80577C50; // type:object size:0x8 -lbl_80577C58 = .sdata2:0x80577C58; // type:object size:0x8 -lbl_80577C60 = .sdata2:0x80577C60; // type:object size:0x8 -lbl_80577C68 = .sdata2:0x80577C68; // type:object size:0x8 -lbl_80577C70 = .sdata2:0x80577C70; // type:object size:0x8 data:string -lbl_80577C78 = .sdata2:0x80577C78; // type:object size:0x8 data:string -lbl_80577C80 = .sdata2:0x80577C80; // type:object size:0x8 -lbl_80577C88 = .sdata2:0x80577C88; // type:object size:0x8 -lbl_80577C90 = .sdata2:0x80577C90; // type:object size:0x8 data:string -lbl_80577C98 = .sdata2:0x80577C98; // type:object size:0x8 data:string -lbl_80577CA0 = .sdata2:0x80577CA0; // type:object size:0x8 -lbl_80577CA8 = .sdata2:0x80577CA8; // type:object size:0x8 data:string -lbl_80577CB0 = .sdata2:0x80577CB0; // type:object size:0x8 data:string -lbl_80577CB8 = .sdata2:0x80577CB8; // type:object size:0x8 data:string -lbl_80577CC0 = .sdata2:0x80577CC0; // type:object size:0x8 data:string -lbl_80577CC8 = .sdata2:0x80577CC8; // type:object size:0x8 data:string -lbl_80577CD0 = .sdata2:0x80577CD0; // type:object size:0x8 -lbl_80577CD8 = .sdata2:0x80577CD8; // type:object size:0x8 data:string -lbl_80577CE0 = .sdata2:0x80577CE0; // type:object size:0x4 data:string -lbl_80577CE4 = .sdata2:0x80577CE4; // type:object size:0x8 -lbl_80577CEC = .sdata2:0x80577CEC; // type:object size:0xC -lbl_80577CF8 = .sdata2:0x80577CF8; // type:object size:0x8 data:string -lbl_80577D00 = .sdata2:0x80577D00; // type:object size:0x8 data:string -lbl_80577D08 = .sdata2:0x80577D08; // type:object size:0x8 data:string -lbl_80577D10 = .sdata2:0x80577D10; // type:object size:0x8 -lbl_80577D18 = .sdata2:0x80577D18; // type:object size:0x4 data:string -lbl_80577D1C = .sdata2:0x80577D1C; // type:object size:0x8 -lbl_80577D24 = .sdata2:0x80577D24; // type:object size:0xC -lbl_80577D30 = .sdata2:0x80577D30; // type:object size:0x8 data:string -lbl_80577D38 = .sdata2:0x80577D38; // type:object size:0x4 data:string -lbl_80577D3C = .sdata2:0x80577D3C; // type:object size:0x8 -lbl_80577D44 = .sdata2:0x80577D44; // type:object size:0xC -lbl_80577D50 = .sdata2:0x80577D50; // type:object size:0x8 data:string -lbl_80577D58 = .sdata2:0x80577D58; // type:object size:0x8 -lbl_80577D60 = .sdata2:0x80577D60; // type:object size:0x8 data:string -lbl_80577D68 = .sdata2:0x80577D68; // type:object size:0x8 data:string -lbl_80577D70 = .sdata2:0x80577D70; // type:object size:0x8 data:string -lbl_80577D78 = .sdata2:0x80577D78; // type:object size:0x8 -lbl_80577D80 = .sdata2:0x80577D80; // type:object size:0x4 data:string -lbl_80577D84 = .sdata2:0x80577D84; // type:object size:0x8 -lbl_80577D8C = .sdata2:0x80577D8C; // type:object size:0xC -lbl_80577D98 = .sdata2:0x80577D98; // type:object size:0x8 data:string -lbl_80577DA0 = .sdata2:0x80577DA0; // type:object size:0x8 data:string -lbl_80577DA8 = .sdata2:0x80577DA8; // type:object size:0x8 -lbl_80577DB0 = .sdata2:0x80577DB0; // type:object size:0x8 -lbl_80577DB8 = .sdata2:0x80577DB8; // type:object size:0x8 -lbl_80577DC0 = .sdata2:0x80577DC0; // type:object size:0x8 data:string -lbl_80577DC8 = .sdata2:0x80577DC8; // type:object size:0x8 -lbl_80577DD0 = .sdata2:0x80577DD0; // type:object size:0x8 data:string -lbl_80577DD8 = .sdata2:0x80577DD8; // type:object size:0x8 -lbl_80577DE0 = .sdata2:0x80577DE0; // type:object size:0x8 -lbl_80577DE8 = .sdata2:0x80577DE8; // type:object size:0x8 -lbl_80577DF0 = .sdata2:0x80577DF0; // type:object size:0x8 data:string -lbl_80577DF8 = .sdata2:0x80577DF8; // type:object size:0x8 data:string -lbl_80577E00 = .sdata2:0x80577E00; // type:object size:0x8 data:string -lbl_80577E08 = .sdata2:0x80577E08; // type:object size:0x8 -lbl_80577E10 = .sdata2:0x80577E10; // type:object size:0x8 -lbl_80577E18 = .sdata2:0x80577E18; // type:object size:0x8 -lbl_80577E20 = .sdata2:0x80577E20; // type:object size:0x8 data:string -lbl_80577E28 = .sdata2:0x80577E28; // type:object size:0x8 data:string -lbl_80577E30 = .sdata2:0x80577E30; // type:object size:0x8 -lbl_80577E38 = .sdata2:0x80577E38; // type:object size:0x8 -lbl_80577E40 = .sdata2:0x80577E40; // type:object size:0x8 -lbl_80577E48 = .sdata2:0x80577E48; // type:object size:0x8 -lbl_80577E50 = .sdata2:0x80577E50; // type:object size:0x8 data:string -lbl_80577E58 = .sdata2:0x80577E58; // type:object size:0x8 -lbl_80577E60 = .sdata2:0x80577E60; // type:object size:0x8 -lbl_80577E68 = .sdata2:0x80577E68; // type:object size:0x8 data:string -lbl_80577E70 = .sdata2:0x80577E70; // type:object size:0x8 -lbl_80577E78 = .sdata2:0x80577E78; // type:object size:0x8 -lbl_80577E80 = .sdata2:0x80577E80; // type:object size:0x8 data:string -lbl_80577E88 = .sdata2:0x80577E88; // type:object size:0x8 data:string -lbl_80577E90 = .sdata2:0x80577E90; // type:object size:0x8 -lbl_80577E98 = .sdata2:0x80577E98; // type:object size:0x8 -lbl_80577EA0 = .sdata2:0x80577EA0; // type:object size:0x8 -lbl_80577EA8 = .sdata2:0x80577EA8; // type:object size:0x8 -lbl_80577EB0 = .sdata2:0x80577EB0; // type:object size:0x8 -lbl_80577EB8 = .sdata2:0x80577EB8; // type:object size:0x8 -lbl_80577EC0 = .sdata2:0x80577EC0; // type:object size:0x8 -lbl_80577EC8 = .sdata2:0x80577EC8; // type:object size:0x8 -lbl_80577ED0 = .sdata2:0x80577ED0; // type:object size:0x8 data:string -lbl_80577ED8 = .sdata2:0x80577ED8; // type:object size:0x8 -lbl_80577EE0 = .sdata2:0x80577EE0; // type:object size:0x8 data:string -lbl_80577EE8 = .sdata2:0x80577EE8; // type:object size:0x8 data:string -lbl_80577EF0 = .sdata2:0x80577EF0; // type:object size:0x8 -lbl_80577EF8 = .sdata2:0x80577EF8; // type:object size:0x8 -lbl_80577F00 = .sdata2:0x80577F00; // type:object size:0x8 data:string -lbl_80577F08 = .sdata2:0x80577F08; // type:object size:0x8 data:string -lbl_80577F10 = .sdata2:0x80577F10; // type:object size:0x8 -lbl_80577F18 = .sdata2:0x80577F18; // type:object size:0x8 -lbl_80577F20 = .sdata2:0x80577F20; // type:object size:0x8 -lbl_80577F28 = .sdata2:0x80577F28; // type:object size:0x8 -lbl_80577F30 = .sdata2:0x80577F30; // type:object size:0x8 -lbl_80577F38 = .sdata2:0x80577F38; // type:object size:0x8 -lbl_80577F40 = .sdata2:0x80577F40; // type:object size:0x8 -lbl_80577F48 = .sdata2:0x80577F48; // type:object size:0x8 -lbl_80577F50 = .sdata2:0x80577F50; // type:object size:0x8 data:string -lbl_80577F58 = .sdata2:0x80577F58; // type:object size:0x8 data:string -lbl_80577F60 = .sdata2:0x80577F60; // type:object size:0x8 -lbl_80577F68 = .sdata2:0x80577F68; // type:object size:0x8 data:string -lbl_80577F70 = .sdata2:0x80577F70; // type:object size:0x8 data:string -lbl_80577F78 = .sdata2:0x80577F78; // type:object size:0x8 data:string -lbl_80577F80 = .sdata2:0x80577F80; // type:object size:0x8 -lbl_80577F88 = .sdata2:0x80577F88; // type:object size:0x4 data:string -lbl_80577F8C = .sdata2:0x80577F8C; // type:object size:0xC -lbl_80577F98 = .sdata2:0x80577F98; // type:object size:0x8 data:string -lbl_80577FA0 = .sdata2:0x80577FA0; // type:object size:0x8 -lbl_80577FA8 = .sdata2:0x80577FA8; // type:object size:0x8 -lbl_80577FB0 = .sdata2:0x80577FB0; // type:object size:0x8 -lbl_80577FB8 = .sdata2:0x80577FB8; // type:object size:0x8 -lbl_80577FC0 = .sdata2:0x80577FC0; // type:object size:0x8 -lbl_80577FC8 = .sdata2:0x80577FC8; // type:object size:0x8 -lbl_80577FD0 = .sdata2:0x80577FD0; // type:object size:0x8 data:string -lbl_80577FD8 = .sdata2:0x80577FD8; // type:object size:0x8 -lbl_80577FE0 = .sdata2:0x80577FE0; // type:object size:0x8 data:string -lbl_80577FE8 = .sdata2:0x80577FE8; // type:object size:0x8 data:string -lbl_80577FF0 = .sdata2:0x80577FF0; // type:object size:0x8 -lbl_80577FF8 = .sdata2:0x80577FF8; // type:object size:0x8 -lbl_80578000 = .sdata2:0x80578000; // type:object size:0x8 data:string -lbl_80578008 = .sdata2:0x80578008; // type:object size:0x8 data:string -lbl_80578010 = .sdata2:0x80578010; // type:object size:0x8 -lbl_80578018 = .sdata2:0x80578018; // type:object size:0x8 -lbl_80578020 = .sdata2:0x80578020; // type:object size:0x8 -lbl_80578028 = .sdata2:0x80578028; // type:object size:0x8 data:string -lbl_80578030 = .sdata2:0x80578030; // type:object size:0x8 data:string -lbl_80578038 = .sdata2:0x80578038; // type:object size:0x8 -lbl_80578040 = .sdata2:0x80578040; // type:object size:0x8 data:string -lbl_80578048 = .sdata2:0x80578048; // type:object size:0x8 data:string -lbl_80578050 = .sdata2:0x80578050; // type:object size:0x8 data:string -lbl_80578058 = .sdata2:0x80578058; // type:object size:0x8 -lbl_80578060 = .sdata2:0x80578060; // type:object size:0x8 data:string -lbl_80578068 = .sdata2:0x80578068; // type:object size:0x8 -lbl_80578070 = .sdata2:0x80578070; // type:object size:0x8 data:string -lbl_80578078 = .sdata2:0x80578078; // type:object size:0x8 data:string -lbl_80578080 = .sdata2:0x80578080; // type:object size:0x8 data:string -lbl_80578088 = .sdata2:0x80578088; // type:object size:0x8 -lbl_80578090 = .sdata2:0x80578090; // type:object size:0x8 data:string -lbl_80578098 = .sdata2:0x80578098; // type:object size:0x8 data:string -lbl_805780A0 = .sdata2:0x805780A0; // type:object size:0x8 data:string -lbl_805780A8 = .sdata2:0x805780A8; // type:object size:0x4 data:string -lbl_805780AC = .sdata2:0x805780AC; // type:object size:0x4 data:string -lbl_805780B0 = .sdata2:0x805780B0; // type:object size:0x8 -lbl_805780B8 = .sdata2:0x805780B8; // type:object size:0x8 -lbl_805780C0 = .sdata2:0x805780C0; // type:object size:0x8 -lbl_805780C8 = .sdata2:0x805780C8; // type:object size:0x8 data:string -lbl_805780D0 = .sdata2:0x805780D0; // type:object size:0x8 -lbl_805780D8 = .sdata2:0x805780D8; // type:object size:0x8 -lbl_805780E0 = .sdata2:0x805780E0; // type:object size:0x8 data:string -lbl_805780E8 = .sdata2:0x805780E8; // type:object size:0x8 data:string -lbl_805780F0 = .sdata2:0x805780F0; // type:object size:0x8 -lbl_805780F8 = .sdata2:0x805780F8; // type:object size:0x8 -lbl_80578100 = .sdata2:0x80578100; // type:object size:0x8 -lbl_80578108 = .sdata2:0x80578108; // type:object size:0x4 data:string -lbl_8057810C = .sdata2:0x8057810C; // type:object size:0xC -lbl_80578118 = .sdata2:0x80578118; // type:object size:0x8 data:string -lbl_80578120 = .sdata2:0x80578120; // type:object size:0x8 -lbl_80578128 = .sdata2:0x80578128; // type:object size:0x8 data:string -lbl_80578130 = .sdata2:0x80578130; // type:object size:0x8 -lbl_80578138 = .sdata2:0x80578138; // type:object size:0x8 data:string -lbl_80578140 = .sdata2:0x80578140; // type:object size:0x8 -lbl_80578148 = .sdata2:0x80578148; // type:object size:0x8 -lbl_80578150 = .sdata2:0x80578150; // type:object size:0x8 data:string -lbl_80578158 = .sdata2:0x80578158; // type:object size:0x8 -lbl_80578160 = .sdata2:0x80578160; // type:object size:0x4 data:string -lbl_80578164 = .sdata2:0x80578164; // type:object size:0x8 -lbl_8057816C = .sdata2:0x8057816C; // type:object size:0x8 -lbl_80578174 = .sdata2:0x80578174; // type:object size:0x4 data:string -lbl_80578178 = .sdata2:0x80578178; // type:object size:0x8 -lbl_80578180 = .sdata2:0x80578180; // type:object size:0x8 data:string -lbl_80578188 = .sdata2:0x80578188; // type:object size:0x8 data:string -lbl_80578190 = .sdata2:0x80578190; // type:object size:0x8 -lbl_80578198 = .sdata2:0x80578198; // type:object size:0x8 data:string -lbl_805781A0 = .sdata2:0x805781A0; // type:object size:0x8 -lbl_805781A8 = .sdata2:0x805781A8; // type:object size:0x8 data:string -lbl_805781B0 = .sdata2:0x805781B0; // type:object size:0x4 data:string -lbl_805781B4 = .sdata2:0x805781B4; // type:object size:0x4 data:string -lbl_805781B8 = .sdata2:0x805781B8; // type:object size:0x8 data:string -lbl_805781C0 = .sdata2:0x805781C0; // type:object size:0x4 data:string -lbl_805781C4 = .sdata2:0x805781C4; // type:object size:0x4 data:string -lbl_805781C8 = .sdata2:0x805781C8; // type:object size:0x8 -lbl_805781D0 = .sdata2:0x805781D0; // type:object size:0x8 data:string -lbl_805781D8 = .sdata2:0x805781D8; // type:object size:0x4 data:string -lbl_805781DC = .sdata2:0x805781DC; // type:object size:0x8 -lbl_805781E4 = .sdata2:0x805781E4; // type:object size:0x8 -lbl_805781EC = .sdata2:0x805781EC; // type:object size:0x8 -lbl_805781F4 = .sdata2:0x805781F4; // type:object size:0x4 data:string -lbl_805781F8 = .sdata2:0x805781F8; // type:object size:0x8 -lbl_80578200 = .sdata2:0x80578200; // type:object size:0x8 -lbl_80578208 = .sdata2:0x80578208; // type:object size:0x4 data:string -lbl_8057820C = .sdata2:0x8057820C; // type:object size:0x4 data:string -lbl_80578210 = .sdata2:0x80578210; // type:object size:0x8 -lbl_80578218 = .sdata2:0x80578218; // type:object size:0x8 -lbl_80578220 = .sdata2:0x80578220; // type:object size:0x8 data:string -lbl_80578228 = .sdata2:0x80578228; // type:object size:0x8 data:string -lbl_80578230 = .sdata2:0x80578230; // type:object size:0x8 -lbl_80578238 = .sdata2:0x80578238; // type:object size:0x8 -lbl_80578240 = .sdata2:0x80578240; // type:object size:0x8 data:string -lbl_80578248 = .sdata2:0x80578248; // type:object size:0x8 -lbl_80578250 = .sdata2:0x80578250; // type:object size:0x8 data:string -lbl_80578258 = .sdata2:0x80578258; // type:object size:0x8 data:string -lbl_80578260 = .sdata2:0x80578260; // type:object size:0x8 -lbl_80578268 = .sdata2:0x80578268; // type:object size:0x8 data:string -lbl_80578270 = .sdata2:0x80578270; // type:object size:0x8 data:string -lbl_80578278 = .sdata2:0x80578278; // type:object size:0x8 data:string -lbl_80578280 = .sdata2:0x80578280; // type:object size:0x8 -lbl_80578288 = .sdata2:0x80578288; // type:object size:0x8 -lbl_80578290 = .sdata2:0x80578290; // type:object size:0x8 data:string -lbl_80578298 = .sdata2:0x80578298; // type:object size:0x8 -lbl_805782A0 = .sdata2:0x805782A0; // type:object size:0x8 data:string -lbl_805782A8 = .sdata2:0x805782A8; // type:object size:0x8 data:string -lbl_805782B0 = .sdata2:0x805782B0; // type:object size:0x8 data:string -lbl_805782B8 = .sdata2:0x805782B8; // type:object size:0x8 data:string -lbl_805782C0 = .sdata2:0x805782C0; // type:object size:0x8 data:string -lbl_805782C8 = .sdata2:0x805782C8; // type:object size:0x8 data:string -lbl_805782D0 = .sdata2:0x805782D0; // type:object size:0x8 -lbl_805782D8 = .sdata2:0x805782D8; // type:object size:0x8 data:string -lbl_805782E0 = .sdata2:0x805782E0; // type:object size:0x8 data:string -lbl_805782E8 = .sdata2:0x805782E8; // type:object size:0x8 data:string -lbl_805782F0 = .sdata2:0x805782F0; // type:object size:0x8 -lbl_805782F8 = .sdata2:0x805782F8; // type:object size:0x8 -lbl_80578300 = .sdata2:0x80578300; // type:object size:0x8 -lbl_80578308 = .sdata2:0x80578308; // type:object size:0x8 -lbl_80578310 = .sdata2:0x80578310; // type:object size:0x8 -lbl_80578318 = .sdata2:0x80578318; // type:object size:0x8 data:string -lbl_80578320 = .sdata2:0x80578320; // type:object size:0x8 data:string -lbl_80578328 = .sdata2:0x80578328; // type:object size:0x8 -lbl_80578330 = .sdata2:0x80578330; // type:object size:0x8 data:string -lbl_80578338 = .sdata2:0x80578338; // type:object size:0x8 -lbl_80578340 = .sdata2:0x80578340; // type:object size:0x8 data:string -lbl_80578348 = .sdata2:0x80578348; // type:object size:0x8 data:string -lbl_80578350 = .sdata2:0x80578350; // type:object size:0x8 data:string -lbl_80578358 = .sdata2:0x80578358; // type:object size:0x8 -lbl_80578360 = .sdata2:0x80578360; // type:object size:0x8 -lbl_80578368 = .sdata2:0x80578368; // type:object size:0x8 data:string -lbl_80578370 = .sdata2:0x80578370; // type:object size:0x8 -lbl_80578378 = .sdata2:0x80578378; // type:object size:0x8 -lbl_80578380 = .sdata2:0x80578380; // type:object size:0x8 data:string -lbl_80578388 = .sdata2:0x80578388; // type:object size:0x8 data:string -lbl_80578390 = .sdata2:0x80578390; // type:object size:0x8 -lbl_80578398 = .sdata2:0x80578398; // type:object size:0x8 data:string -lbl_805783A0 = .sdata2:0x805783A0; // type:object size:0x8 data:string -lbl_805783A8 = .sdata2:0x805783A8; // type:object size:0x8 data:string -lbl_805783B0 = .sdata2:0x805783B0; // type:object size:0x8 data:string -lbl_805783B8 = .sdata2:0x805783B8; // type:object size:0x8 data:string -lbl_805783C0 = .sdata2:0x805783C0; // type:object size:0x8 data:string -lbl_805783C8 = .sdata2:0x805783C8; // type:object size:0x8 -lbl_805783D0 = .sdata2:0x805783D0; // type:object size:0x8 -lbl_805783D8 = .sdata2:0x805783D8; // type:object size:0x8 -lbl_805783E0 = .sdata2:0x805783E0; // type:object size:0x8 -lbl_805783E8 = .sdata2:0x805783E8; // type:object size:0x8 data:string -lbl_805783F0 = .sdata2:0x805783F0; // type:object size:0x8 -lbl_805783F8 = .sdata2:0x805783F8; // type:object size:0x8 data:string -lbl_80578400 = .sdata2:0x80578400; // type:object size:0x8 data:string -lbl_80578408 = .sdata2:0x80578408; // type:object size:0x8 -lbl_80578410 = .sdata2:0x80578410; // type:object size:0x8 data:string -lbl_80578418 = .sdata2:0x80578418; // type:object size:0x8 -lbl_80578420 = .sdata2:0x80578420; // type:object size:0x8 data:string -lbl_80578428 = .sdata2:0x80578428; // type:object size:0x8 -lbl_80578430 = .sdata2:0x80578430; // type:object size:0x8 data:string -lbl_80578438 = .sdata2:0x80578438; // type:object size:0x8 data:string -lbl_80578440 = .sdata2:0x80578440; // type:object size:0x8 data:string -lbl_80578448 = .sdata2:0x80578448; // type:object size:0x8 -lbl_80578450 = .sdata2:0x80578450; // type:object size:0x8 data:string -lbl_80578458 = .sdata2:0x80578458; // type:object size:0x8 -lbl_80578460 = .sdata2:0x80578460; // type:object size:0x8 data:string -lbl_80578468 = .sdata2:0x80578468; // type:object size:0x8 -lbl_80578470 = .sdata2:0x80578470; // type:object size:0x8 data:string -lbl_80578478 = .sdata2:0x80578478; // type:object size:0x8 data:string -lbl_80578480 = .sdata2:0x80578480; // type:object size:0x8 -lbl_80578488 = .sdata2:0x80578488; // type:object size:0x8 -lbl_80578490 = .sdata2:0x80578490; // type:object size:0x8 data:string -lbl_80578498 = .sdata2:0x80578498; // type:object size:0x8 data:string -lbl_805784A0 = .sdata2:0x805784A0; // type:object size:0x8 data:string -lbl_805784A8 = .sdata2:0x805784A8; // type:object size:0x8 data:string -lbl_805784B0 = .sdata2:0x805784B0; // type:object size:0x8 data:string -lbl_805784B8 = .sdata2:0x805784B8; // type:object size:0x8 -lbl_805784C0 = .sdata2:0x805784C0; // type:object size:0x8 data:string -lbl_805784C8 = .sdata2:0x805784C8; // type:object size:0x8 -lbl_805784D0 = .sdata2:0x805784D0; // type:object size:0x8 data:string -lbl_805784D8 = .sdata2:0x805784D8; // type:object size:0x8 -lbl_805784E0 = .sdata2:0x805784E0; // type:object size:0x8 data:string -lbl_805784E8 = .sdata2:0x805784E8; // type:object size:0x8 -lbl_805784F0 = .sdata2:0x805784F0; // type:object size:0x8 data:string -lbl_805784F8 = .sdata2:0x805784F8; // type:object size:0x8 -lbl_80578500 = .sdata2:0x80578500; // type:object size:0x8 data:string -lbl_80578508 = .sdata2:0x80578508; // type:object size:0x8 data:string -lbl_80578510 = .sdata2:0x80578510; // type:object size:0x8 data:string -lbl_80578518 = .sdata2:0x80578518; // type:object size:0x8 data:string -lbl_80578520 = .sdata2:0x80578520; // type:object size:0x8 data:string -lbl_80578528 = .sdata2:0x80578528; // type:object size:0x8 data:string -lbl_80578530 = .sdata2:0x80578530; // type:object size:0x8 data:string -lbl_80578538 = .sdata2:0x80578538; // type:object size:0x8 -lbl_80578540 = .sdata2:0x80578540; // type:object size:0x8 -lbl_80578548 = .sdata2:0x80578548; // type:object size:0x8 data:string -lbl_80578550 = .sdata2:0x80578550; // type:object size:0x8 -lbl_80578558 = .sdata2:0x80578558; // type:object size:0x8 data:string -lbl_80578560 = .sdata2:0x80578560; // type:object size:0x8 -lbl_80578568 = .sdata2:0x80578568; // type:object size:0x8 data:string -lbl_80578570 = .sdata2:0x80578570; // type:object size:0x8 -lbl_80578578 = .sdata2:0x80578578; // type:object size:0x8 -lbl_80578580 = .sdata2:0x80578580; // type:object size:0x8 -lbl_80578588 = .sdata2:0x80578588; // type:object size:0x8 -lbl_80578590 = .sdata2:0x80578590; // type:object size:0x8 -lbl_80578598 = .sdata2:0x80578598; // type:object size:0x8 -lbl_805785A0 = .sdata2:0x805785A0; // type:object size:0x8 data:string -lbl_805785A8 = .sdata2:0x805785A8; // type:object size:0x8 data:string -lbl_805785B0 = .sdata2:0x805785B0; // type:object size:0x8 data:string -lbl_805785B8 = .sdata2:0x805785B8; // type:object size:0x8 data:string -lbl_805785C0 = .sdata2:0x805785C0; // type:object size:0x8 data:string -lbl_805785C8 = .sdata2:0x805785C8; // type:object size:0x8 data:string -lbl_805785D0 = .sdata2:0x805785D0; // type:object size:0x8 -lbl_805785D8 = .sdata2:0x805785D8; // type:object size:0x4 data:string -lbl_805785DC = .sdata2:0x805785DC; // type:object size:0x8 -lbl_805785E4 = .sdata2:0x805785E4; // type:object size:0x8 -lbl_805785EC = .sdata2:0x805785EC; // type:object size:0xC -lbl_805785F8 = .sdata2:0x805785F8; // type:object size:0x8 data:string -lbl_80578600 = .sdata2:0x80578600; // type:object size:0x8 data:string -lbl_80578608 = .sdata2:0x80578608; // type:object size:0x8 -lbl_80578610 = .sdata2:0x80578610; // type:object size:0x8 -lbl_80578618 = .sdata2:0x80578618; // type:object size:0x8 -lbl_80578620 = .sdata2:0x80578620; // type:object size:0x8 data:string -lbl_80578628 = .sdata2:0x80578628; // type:object size:0x8 -lbl_80578630 = .sdata2:0x80578630; // type:object size:0x8 -lbl_80578638 = .sdata2:0x80578638; // type:object size:0x8 data:string -lbl_80578640 = .sdata2:0x80578640; // type:object size:0x8 data:string -lbl_80578648 = .sdata2:0x80578648; // type:object size:0x8 data:string -lbl_80578650 = .sdata2:0x80578650; // type:object size:0x8 data:string -lbl_80578658 = .sdata2:0x80578658; // type:object size:0x8 data:string -lbl_80578660 = .sdata2:0x80578660; // type:object size:0x8 data:string -lbl_80578668 = .sdata2:0x80578668; // type:object size:0x8 -lbl_80578670 = .sdata2:0x80578670; // type:object size:0x8 data:string -lbl_80578678 = .sdata2:0x80578678; // type:object size:0x8 -lbl_80578680 = .sdata2:0x80578680; // type:object size:0x8 data:string -lbl_80578688 = .sdata2:0x80578688; // type:object size:0x8 data:string -lbl_80578690 = .sdata2:0x80578690; // type:object size:0x8 data:string -lbl_80578698 = .sdata2:0x80578698; // type:object size:0x8 data:string -lbl_805786A0 = .sdata2:0x805786A0; // type:object size:0x8 data:string -lbl_805786A8 = .sdata2:0x805786A8; // type:object size:0x8 -lbl_805786B0 = .sdata2:0x805786B0; // type:object size:0x8 data:string -lbl_805786B8 = .sdata2:0x805786B8; // type:object size:0x8 -lbl_805786C0 = .sdata2:0x805786C0; // type:object size:0x8 data:string -lbl_805786C8 = .sdata2:0x805786C8; // type:object size:0x8 data:string -lbl_805786D0 = .sdata2:0x805786D0; // type:object size:0x8 data:string -lbl_805786D8 = .sdata2:0x805786D8; // type:object size:0x8 data:string -lbl_805786E0 = .sdata2:0x805786E0; // type:object size:0x8 data:string -lbl_805786E8 = .sdata2:0x805786E8; // type:object size:0x8 data:string -lbl_805786F0 = .sdata2:0x805786F0; // type:object size:0x8 -lbl_805786F8 = .sdata2:0x805786F8; // type:object size:0x8 -lbl_80578700 = .sdata2:0x80578700; // type:object size:0x8 data:string -lbl_80578708 = .sdata2:0x80578708; // type:object size:0x8 data:string -lbl_80578710 = .sdata2:0x80578710; // type:object size:0x8 data:string -lbl_80578718 = .sdata2:0x80578718; // type:object size:0x8 data:string -lbl_80578720 = .sdata2:0x80578720; // type:object size:0x8 data:string -lbl_80578728 = .sdata2:0x80578728; // type:object size:0x8 data:string -lbl_80578730 = .sdata2:0x80578730; // type:object size:0x8 data:string -lbl_80578738 = .sdata2:0x80578738; // type:object size:0x8 data:string -lbl_80578740 = .sdata2:0x80578740; // type:object size:0x8 -lbl_80578748 = .sdata2:0x80578748; // type:object size:0x8 data:string -lbl_80578750 = .sdata2:0x80578750; // type:object size:0x8 -lbl_80578758 = .sdata2:0x80578758; // type:object size:0x8 data:string -lbl_80578760 = .sdata2:0x80578760; // type:object size:0x8 -lbl_80578768 = .sdata2:0x80578768; // type:object size:0x8 -lbl_80578770 = .sdata2:0x80578770; // type:object size:0x8 data:string -lbl_80578778 = .sdata2:0x80578778; // type:object size:0x8 -lbl_80578780 = .sdata2:0x80578780; // type:object size:0x8 -lbl_80578788 = .sdata2:0x80578788; // type:object size:0x8 -lbl_80578790 = .sdata2:0x80578790; // type:object size:0x8 -lbl_80578798 = .sdata2:0x80578798; // type:object size:0x8 data:string -lbl_805787A0 = .sdata2:0x805787A0; // type:object size:0x8 -lbl_805787A8 = .sdata2:0x805787A8; // type:object size:0x8 data:string -lbl_805787B0 = .sdata2:0x805787B0; // type:object size:0x8 data:string -lbl_805787B8 = .sdata2:0x805787B8; // type:object size:0x8 data:string -lbl_805787C0 = .sdata2:0x805787C0; // type:object size:0x8 data:string -lbl_805787C8 = .sdata2:0x805787C8; // type:object size:0x8 -lbl_805787D0 = .sdata2:0x805787D0; // type:object size:0x8 data:string -lbl_805787D8 = .sdata2:0x805787D8; // type:object size:0x8 -lbl_805787E0 = .sdata2:0x805787E0; // type:object size:0x8 data:string -lbl_805787E8 = .sdata2:0x805787E8; // type:object size:0x8 data:string -lbl_805787F0 = .sdata2:0x805787F0; // type:object size:0x8 data:string -lbl_805787F8 = .sdata2:0x805787F8; // type:object size:0x8 data:string -lbl_80578800 = .sdata2:0x80578800; // type:object size:0x8 data:string -lbl_80578808 = .sdata2:0x80578808; // type:object size:0x8 data:string -lbl_80578810 = .sdata2:0x80578810; // type:object size:0x8 data:string -lbl_80578818 = .sdata2:0x80578818; // type:object size:0x8 data:string -lbl_80578820 = .sdata2:0x80578820; // type:object size:0x8 data:string -lbl_80578828 = .sdata2:0x80578828; // type:object size:0x8 -lbl_80578830 = .sdata2:0x80578830; // type:object size:0x8 data:string -lbl_80578838 = .sdata2:0x80578838; // type:object size:0x8 -lbl_80578840 = .sdata2:0x80578840; // type:object size:0x8 -lbl_80578848 = .sdata2:0x80578848; // type:object size:0x8 data:string -lbl_80578850 = .sdata2:0x80578850; // type:object size:0x8 data:string -lbl_80578858 = .sdata2:0x80578858; // type:object size:0x8 -lbl_80578860 = .sdata2:0x80578860; // type:object size:0x8 data:string -lbl_80578868 = .sdata2:0x80578868; // type:object size:0x8 -lbl_80578870 = .sdata2:0x80578870; // type:object size:0x8 -lbl_80578878 = .sdata2:0x80578878; // type:object size:0x8 -lbl_80578880 = .sdata2:0x80578880; // type:object size:0x8 data:string -lbl_80578888 = .sdata2:0x80578888; // type:object size:0x8 -lbl_80578890 = .sdata2:0x80578890; // type:object size:0x8 data:string -lbl_80578898 = .sdata2:0x80578898; // type:object size:0x8 data:string -lbl_805788A0 = .sdata2:0x805788A0; // type:object size:0x8 data:string -lbl_805788A8 = .sdata2:0x805788A8; // type:object size:0x8 data:string -lbl_805788B0 = .sdata2:0x805788B0; // type:object size:0x8 data:string -lbl_805788B8 = .sdata2:0x805788B8; // type:object size:0x8 data:string -lbl_805788C0 = .sdata2:0x805788C0; // type:object size:0x8 data:string -lbl_805788C8 = .sdata2:0x805788C8; // type:object size:0x8 data:string -lbl_805788D0 = .sdata2:0x805788D0; // type:object size:0x8 data:string -lbl_805788D8 = .sdata2:0x805788D8; // type:object size:0x8 -lbl_805788E0 = .sdata2:0x805788E0; // type:object size:0x8 -lbl_805788E8 = .sdata2:0x805788E8; // type:object size:0x8 data:string -lbl_805788F0 = .sdata2:0x805788F0; // type:object size:0x8 data:string -lbl_805788F8 = .sdata2:0x805788F8; // type:object size:0x8 data:string -lbl_80578900 = .sdata2:0x80578900; // type:object size:0x8 data:string -lbl_80578908 = .sdata2:0x80578908; // type:object size:0x8 data:string -lbl_80578910 = .sdata2:0x80578910; // type:object size:0x8 data:string -lbl_80578918 = .sdata2:0x80578918; // type:object size:0x8 data:string -lbl_80578920 = .sdata2:0x80578920; // type:object size:0x8 data:string -lbl_80578928 = .sdata2:0x80578928; // type:object size:0x8 data:string -lbl_80578930 = .sdata2:0x80578930; // type:object size:0x8 data:string -lbl_80578938 = .sdata2:0x80578938; // type:object size:0x8 data:string -lbl_80578940 = .sdata2:0x80578940; // type:object size:0x8 data:string -lbl_80578948 = .sdata2:0x80578948; // type:object size:0x8 -lbl_80578950 = .sdata2:0x80578950; // type:object size:0x8 data:string -lbl_80578958 = .sdata2:0x80578958; // type:object size:0x8 data:string -lbl_80578960 = .sdata2:0x80578960; // type:object size:0x8 data:string -lbl_80578968 = .sdata2:0x80578968; // type:object size:0x8 -lbl_80578970 = .sdata2:0x80578970; // type:object size:0x8 -lbl_80578978 = .sdata2:0x80578978; // type:object size:0x8 data:string -lbl_80578980 = .sdata2:0x80578980; // type:object size:0x8 data:string -lbl_80578988 = .sdata2:0x80578988; // type:object size:0x8 -lbl_80578990 = .sdata2:0x80578990; // type:object size:0x8 data:string -lbl_80578998 = .sdata2:0x80578998; // type:object size:0x8 -lbl_805789A0 = .sdata2:0x805789A0; // type:object size:0x8 -lbl_805789A8 = .sdata2:0x805789A8; // type:object size:0x8 -lbl_805789B0 = .sdata2:0x805789B0; // type:object size:0x8 -lbl_805789B8 = .sdata2:0x805789B8; // type:object size:0x8 -lbl_805789C0 = .sdata2:0x805789C0; // type:object size:0x8 -lbl_805789C8 = .sdata2:0x805789C8; // type:object size:0x8 data:string -lbl_805789D0 = .sdata2:0x805789D0; // type:object size:0x8 data:string -lbl_805789D8 = .sdata2:0x805789D8; // type:object size:0x8 data:string -lbl_805789E0 = .sdata2:0x805789E0; // type:object size:0x8 -lbl_805789E8 = .sdata2:0x805789E8; // type:object size:0x8 -lbl_805789F0 = .sdata2:0x805789F0; // type:object size:0x8 data:string -lbl_805789F8 = .sdata2:0x805789F8; // type:object size:0x8 -lbl_80578A00 = .sdata2:0x80578A00; // type:object size:0x8 -lbl_80578A08 = .sdata2:0x80578A08; // type:object size:0x8 data:string -lbl_80578A10 = .sdata2:0x80578A10; // type:object size:0x8 -lbl_80578A18 = .sdata2:0x80578A18; // type:object size:0x8 data:string -lbl_80578A20 = .sdata2:0x80578A20; // type:object size:0x8 -lbl_80578A28 = .sdata2:0x80578A28; // type:object size:0x8 -lbl_80578A30 = .sdata2:0x80578A30; // type:object size:0x8 -lbl_80578A38 = .sdata2:0x80578A38; // type:object size:0x8 -lbl_80578A40 = .sdata2:0x80578A40; // type:object size:0x8 -lbl_80578A48 = .sdata2:0x80578A48; // type:object size:0x8 -lbl_80578A50 = .sdata2:0x80578A50; // type:object size:0x8 -lbl_80578A58 = .sdata2:0x80578A58; // type:object size:0x8 data:string -lbl_80578A60 = .sdata2:0x80578A60; // type:object size:0x8 -lbl_80578A68 = .sdata2:0x80578A68; // type:object size:0x8 -lbl_80578A70 = .sdata2:0x80578A70; // type:object size:0x8 data:string -lbl_80578A78 = .sdata2:0x80578A78; // type:object size:0x8 -lbl_80578A80 = .sdata2:0x80578A80; // type:object size:0x8 data:string -lbl_80578A88 = .sdata2:0x80578A88; // type:object size:0x8 -lbl_80578A90 = .sdata2:0x80578A90; // type:object size:0x8 -lbl_80578A98 = .sdata2:0x80578A98; // type:object size:0x8 data:string -lbl_80578AA0 = .sdata2:0x80578AA0; // type:object size:0x8 -lbl_80578AA8 = .sdata2:0x80578AA8; // type:object size:0x8 data:string -lbl_80578AB0 = .sdata2:0x80578AB0; // type:object size:0x8 data:string -lbl_80578AB8 = .sdata2:0x80578AB8; // type:object size:0x8 -lbl_80578AC0 = .sdata2:0x80578AC0; // type:object size:0x8 data:string -lbl_80578AC8 = .sdata2:0x80578AC8; // type:object size:0x8 data:string -lbl_80578AD0 = .sdata2:0x80578AD0; // type:object size:0x8 -lbl_80578AD8 = .sdata2:0x80578AD8; // type:object size:0x8 -lbl_80578AE0 = .sdata2:0x80578AE0; // type:object size:0x8 -lbl_80578AE8 = .sdata2:0x80578AE8; // type:object size:0x8 -lbl_80578AF0 = .sdata2:0x80578AF0; // type:object size:0x8 -lbl_80578AF8 = .sdata2:0x80578AF8; // type:object size:0x8 -lbl_80578B00 = .sdata2:0x80578B00; // type:object size:0x8 -lbl_80578B08 = .sdata2:0x80578B08; // type:object size:0x8 data:string -lbl_80578B10 = .sdata2:0x80578B10; // type:object size:0x8 data:string -lbl_80578B18 = .sdata2:0x80578B18; // type:object size:0x8 data:string -lbl_80578B20 = .sdata2:0x80578B20; // type:object size:0x8 -lbl_80578B28 = .sdata2:0x80578B28; // type:object size:0x8 data:string -lbl_80578B30 = .sdata2:0x80578B30; // type:object size:0x8 data:string -lbl_80578B38 = .sdata2:0x80578B38; // type:object size:0x8 data:string -lbl_80578B40 = .sdata2:0x80578B40; // type:object size:0x8 data:string -lbl_80578B48 = .sdata2:0x80578B48; // type:object size:0x8 data:string -lbl_80578B50 = .sdata2:0x80578B50; // type:object size:0x8 -lbl_80578B58 = .sdata2:0x80578B58; // type:object size:0x8 data:string -lbl_80578B60 = .sdata2:0x80578B60; // type:object size:0x8 data:string -lbl_80578B68 = .sdata2:0x80578B68; // type:object size:0x8 -lbl_80578B70 = .sdata2:0x80578B70; // type:object size:0x8 data:string -lbl_80578B78 = .sdata2:0x80578B78; // type:object size:0x8 data:string -lbl_80578B80 = .sdata2:0x80578B80; // type:object size:0x8 data:string -lbl_80578B88 = .sdata2:0x80578B88; // type:object size:0x8 -lbl_80578B90 = .sdata2:0x80578B90; // type:object size:0x8 data:string -lbl_80578B98 = .sdata2:0x80578B98; // type:object size:0x8 data:string -lbl_80578BA0 = .sdata2:0x80578BA0; // type:object size:0x8 data:string -lbl_80578BA8 = .sdata2:0x80578BA8; // type:object size:0x8 data:string -lbl_80578BB0 = .sdata2:0x80578BB0; // type:object size:0x8 data:string -lbl_80578BB8 = .sdata2:0x80578BB8; // type:object size:0x8 data:string -lbl_80578BC0 = .sdata2:0x80578BC0; // type:object size:0x8 data:string -lbl_80578BC8 = .sdata2:0x80578BC8; // type:object size:0x8 data:string -lbl_80578BD0 = .sdata2:0x80578BD0; // type:object size:0x8 data:string -lbl_80578BD8 = .sdata2:0x80578BD8; // type:object size:0x8 data:string -lbl_80578BE0 = .sdata2:0x80578BE0; // type:object size:0x8 data:string -lbl_80578BE8 = .sdata2:0x80578BE8; // type:object size:0x8 data:string -lbl_80578BF0 = .sdata2:0x80578BF0; // type:object size:0x8 data:string -lbl_80578BF8 = .sdata2:0x80578BF8; // type:object size:0x8 data:string -lbl_80578C00 = .sdata2:0x80578C00; // type:object size:0x8 data:string -lbl_80578C08 = .sdata2:0x80578C08; // type:object size:0x8 data:string -lbl_80578C10 = .sdata2:0x80578C10; // type:object size:0x8 data:string -lbl_80578C18 = .sdata2:0x80578C18; // type:object size:0x8 data:string -lbl_80578C20 = .sdata2:0x80578C20; // type:object size:0x8 -lbl_80578C28 = .sdata2:0x80578C28; // type:object size:0x8 data:string -lbl_80578C30 = .sdata2:0x80578C30; // type:object size:0x8 -lbl_80578C38 = .sdata2:0x80578C38; // type:object size:0x8 data:string -lbl_80578C40 = .sdata2:0x80578C40; // type:object size:0x8 data:string -lbl_80578C48 = .sdata2:0x80578C48; // type:object size:0x8 -lbl_80578C50 = .sdata2:0x80578C50; // type:object size:0x8 -lbl_80578C58 = .sdata2:0x80578C58; // type:object size:0x8 data:string -lbl_80578C60 = .sdata2:0x80578C60; // type:object size:0x8 -lbl_80578C68 = .sdata2:0x80578C68; // type:object size:0x8 data:string -lbl_80578C70 = .sdata2:0x80578C70; // type:object size:0x8 data:string -lbl_80578C78 = .sdata2:0x80578C78; // type:object size:0x8 data:string -lbl_80578C80 = .sdata2:0x80578C80; // type:object size:0x8 data:string -lbl_80578C88 = .sdata2:0x80578C88; // type:object size:0x8 data:string -lbl_80578C90 = .sdata2:0x80578C90; // type:object size:0x8 data:string -lbl_80578C98 = .sdata2:0x80578C98; // type:object size:0x8 data:string -lbl_80578CA0 = .sdata2:0x80578CA0; // type:object size:0x8 -lbl_80578CA8 = .sdata2:0x80578CA8; // type:object size:0x8 data:string -lbl_80578CB0 = .sdata2:0x80578CB0; // type:object size:0x8 -lbl_80578CB8 = .sdata2:0x80578CB8; // type:object size:0x8 data:string -lbl_80578CC0 = .sdata2:0x80578CC0; // type:object size:0x8 data:string -lbl_80578CC8 = .sdata2:0x80578CC8; // type:object size:0x8 data:string -lbl_80578CD0 = .sdata2:0x80578CD0; // type:object size:0x8 data:string -lbl_80578CD8 = .sdata2:0x80578CD8; // type:object size:0x8 data:string -lbl_80578CE0 = .sdata2:0x80578CE0; // type:object size:0x8 data:string -lbl_80578CE8 = .sdata2:0x80578CE8; // type:object size:0x8 -lbl_80578CF0 = .sdata2:0x80578CF0; // type:object size:0x8 data:string -lbl_80578CF8 = .sdata2:0x80578CF8; // type:object size:0x8 data:string -lbl_80578D00 = .sdata2:0x80578D00; // type:object size:0x8 -lbl_80578D08 = .sdata2:0x80578D08; // type:object size:0x8 -lbl_80578D10 = .sdata2:0x80578D10; // type:object size:0x8 data:string -lbl_80578D18 = .sdata2:0x80578D18; // type:object size:0x8 -lbl_80578D20 = .sdata2:0x80578D20; // type:object size:0x8 data:string -lbl_80578D28 = .sdata2:0x80578D28; // type:object size:0x8 data:string -lbl_80578D30 = .sdata2:0x80578D30; // type:object size:0x8 data:string -lbl_80578D38 = .sdata2:0x80578D38; // type:object size:0x8 -lbl_80578D40 = .sdata2:0x80578D40; // type:object size:0x8 -lbl_80578D48 = .sdata2:0x80578D48; // type:object size:0x8 -lbl_80578D50 = .sdata2:0x80578D50; // type:object size:0x8 data:string -lbl_80578D58 = .sdata2:0x80578D58; // type:object size:0x8 -lbl_80578D60 = .sdata2:0x80578D60; // type:object size:0x8 -lbl_80578D68 = .sdata2:0x80578D68; // type:object size:0x8 data:string -lbl_80578D70 = .sdata2:0x80578D70; // type:object size:0x8 -lbl_80578D78 = .sdata2:0x80578D78; // type:object size:0x8 data:string -lbl_80578D80 = .sdata2:0x80578D80; // type:object size:0x8 -lbl_80578D88 = .sdata2:0x80578D88; // type:object size:0x8 data:string -lbl_80578D90 = .sdata2:0x80578D90; // type:object size:0x8 data:string -lbl_80578D98 = .sdata2:0x80578D98; // type:object size:0x8 -lbl_80578DA0 = .sdata2:0x80578DA0; // type:object size:0x8 data:string -lbl_80578DA8 = .sdata2:0x80578DA8; // type:object size:0x8 -lbl_80578DB0 = .sdata2:0x80578DB0; // type:object size:0x8 -lbl_80578DB8 = .sdata2:0x80578DB8; // type:object size:0x8 -lbl_80578DC0 = .sdata2:0x80578DC0; // type:object size:0x8 -lbl_80578DC8 = .sdata2:0x80578DC8; // type:object size:0x8 -lbl_80578DD0 = .sdata2:0x80578DD0; // type:object size:0x8 -lbl_80578DD8 = .sdata2:0x80578DD8; // type:object size:0x8 -lbl_80578DE0 = .sdata2:0x80578DE0; // type:object size:0x8 -lbl_80578DE8 = .sdata2:0x80578DE8; // type:object size:0x8 -lbl_80578DF0 = .sdata2:0x80578DF0; // type:object size:0x8 -lbl_80578DF8 = .sdata2:0x80578DF8; // type:object size:0x8 data:string -lbl_80578E00 = .sdata2:0x80578E00; // type:object size:0x8 -lbl_80578E08 = .sdata2:0x80578E08; // type:object size:0x8 -lbl_80578E10 = .sdata2:0x80578E10; // type:object size:0x8 -lbl_80578E18 = .sdata2:0x80578E18; // type:object size:0x8 -lbl_80578E20 = .sdata2:0x80578E20; // type:object size:0x8 -lbl_80578E28 = .sdata2:0x80578E28; // type:object size:0x8 -lbl_80578E30 = .sdata2:0x80578E30; // type:object size:0x8 -lbl_80578E38 = .sdata2:0x80578E38; // type:object size:0x8 -lbl_80578E40 = .sdata2:0x80578E40; // type:object size:0x8 -lbl_80578E48 = .sdata2:0x80578E48; // type:object size:0x8 data:string -lbl_80578E50 = .sdata2:0x80578E50; // type:object size:0x8 data:string -lbl_80578E58 = .sdata2:0x80578E58; // type:object size:0x8 -lbl_80578E60 = .sdata2:0x80578E60; // type:object size:0x8 -lbl_80578E68 = .sdata2:0x80578E68; // type:object size:0x8 data:string -lbl_80578E70 = .sdata2:0x80578E70; // type:object size:0x8 -lbl_80578E78 = .sdata2:0x80578E78; // type:object size:0x8 -lbl_80578E80 = .sdata2:0x80578E80; // type:object size:0x8 -lbl_80578E88 = .sdata2:0x80578E88; // type:object size:0x8 -lbl_80578E90 = .sdata2:0x80578E90; // type:object size:0x8 data:string -lbl_80578E98 = .sdata2:0x80578E98; // type:object size:0x8 data:string -lbl_80578EA0 = .sdata2:0x80578EA0; // type:object size:0x8 data:string -lbl_80578EA8 = .sdata2:0x80578EA8; // type:object size:0x8 -lbl_80578EB0 = .sdata2:0x80578EB0; // type:object size:0x8 -lbl_80578EB8 = .sdata2:0x80578EB8; // type:object size:0x8 data:string -lbl_80578EC0 = .sdata2:0x80578EC0; // type:object size:0x8 data:string -lbl_80578EC8 = .sdata2:0x80578EC8; // type:object size:0x8 data:string -lbl_80578ED0 = .sdata2:0x80578ED0; // type:object size:0x8 data:string -lbl_80578ED8 = .sdata2:0x80578ED8; // type:object size:0x8 data:string -lbl_80578EE0 = .sdata2:0x80578EE0; // type:object size:0x8 data:string -lbl_80578EE8 = .sdata2:0x80578EE8; // type:object size:0x8 -lbl_80578EF0 = .sdata2:0x80578EF0; // type:object size:0x8 data:string -lbl_80578EF8 = .sdata2:0x80578EF8; // type:object size:0x8 data:string -lbl_80578F00 = .sdata2:0x80578F00; // type:object size:0x8 data:string -lbl_80578F08 = .sdata2:0x80578F08; // type:object size:0x8 data:string -lbl_80578F10 = .sdata2:0x80578F10; // type:object size:0x8 -lbl_80578F18 = .sdata2:0x80578F18; // type:object size:0x8 -lbl_80578F20 = .sdata2:0x80578F20; // type:object size:0x8 data:string -lbl_80578F28 = .sdata2:0x80578F28; // type:object size:0x8 data:string -lbl_80578F30 = .sdata2:0x80578F30; // type:object size:0x8 data:string -lbl_80578F38 = .sdata2:0x80578F38; // type:object size:0x8 -lbl_80578F40 = .sdata2:0x80578F40; // type:object size:0x8 -lbl_80578F48 = .sdata2:0x80578F48; // type:object size:0x8 data:string -lbl_80578F50 = .sdata2:0x80578F50; // type:object size:0x8 -lbl_80578F58 = .sdata2:0x80578F58; // type:object size:0x8 -lbl_80578F60 = .sdata2:0x80578F60; // type:object size:0x8 -lbl_80578F68 = .sdata2:0x80578F68; // type:object size:0x8 data:string -lbl_80578F70 = .sdata2:0x80578F70; // type:object size:0x8 -lbl_80578F78 = .sdata2:0x80578F78; // type:object size:0x8 -lbl_80578F80 = .sdata2:0x80578F80; // type:object size:0x8 data:string -lbl_80578F88 = .sdata2:0x80578F88; // type:object size:0x8 data:string -lbl_80578F90 = .sdata2:0x80578F90; // type:object size:0x8 data:string -lbl_80578F98 = .sdata2:0x80578F98; // type:object size:0x8 -lbl_80578FA0 = .sdata2:0x80578FA0; // type:object size:0x8 data:string -lbl_80578FA8 = .sdata2:0x80578FA8; // type:object size:0x8 data:string -lbl_80578FB0 = .sdata2:0x80578FB0; // type:object size:0x8 data:string -lbl_80578FB8 = .sdata2:0x80578FB8; // type:object size:0x8 data:string -lbl_80578FC0 = .sdata2:0x80578FC0; // type:object size:0x8 data:string -lbl_80578FC8 = .sdata2:0x80578FC8; // type:object size:0x8 data:string -lbl_80578FD0 = .sdata2:0x80578FD0; // type:object size:0x8 data:string -lbl_80578FD8 = .sdata2:0x80578FD8; // type:object size:0x8 -lbl_80578FE0 = .sdata2:0x80578FE0; // type:object size:0x8 data:string -lbl_80578FE8 = .sdata2:0x80578FE8; // type:object size:0x8 -lbl_80578FF0 = .sdata2:0x80578FF0; // type:object size:0x8 data:string -lbl_80578FF8 = .sdata2:0x80578FF8; // type:object size:0x8 -lbl_80579000 = .sdata2:0x80579000; // type:object size:0x8 -lbl_80579008 = .sdata2:0x80579008; // type:object size:0x8 data:string -lbl_80579010 = .sdata2:0x80579010; // type:object size:0x8 data:string -lbl_80579018 = .sdata2:0x80579018; // type:object size:0x8 data:string -lbl_80579020 = .sdata2:0x80579020; // type:object size:0x8 data:string -lbl_80579028 = .sdata2:0x80579028; // type:object size:0x8 -lbl_80579030 = .sdata2:0x80579030; // type:object size:0x8 data:string -lbl_80579038 = .sdata2:0x80579038; // type:object size:0x8 data:string -lbl_80579040 = .sdata2:0x80579040; // type:object size:0x8 data:string -lbl_80579048 = .sdata2:0x80579048; // type:object size:0x8 data:string -lbl_80579050 = .sdata2:0x80579050; // type:object size:0x8 -lbl_80579058 = .sdata2:0x80579058; // type:object size:0x8 data:string -lbl_80579060 = .sdata2:0x80579060; // type:object size:0x8 data:string -lbl_80579068 = .sdata2:0x80579068; // type:object size:0x8 -lbl_80579070 = .sdata2:0x80579070; // type:object size:0x8 data:string -lbl_80579078 = .sdata2:0x80579078; // type:object size:0x8 -lbl_80579080 = .sdata2:0x80579080; // type:object size:0x8 -lbl_80579088 = .sdata2:0x80579088; // type:object size:0x8 -lbl_80579090 = .sdata2:0x80579090; // type:object size:0x8 -lbl_80579098 = .sdata2:0x80579098; // type:object size:0x8 -lbl_805790A0 = .sdata2:0x805790A0; // type:object size:0x8 data:string -lbl_805790A8 = .sdata2:0x805790A8; // type:object size:0x8 data:string -lbl_805790B0 = .sdata2:0x805790B0; // type:object size:0x8 data:string -lbl_805790B8 = .sdata2:0x805790B8; // type:object size:0x8 data:string -lbl_805790C0 = .sdata2:0x805790C0; // type:object size:0x8 data:string -lbl_805790C8 = .sdata2:0x805790C8; // type:object size:0x8 data:string -lbl_805790D0 = .sdata2:0x805790D0; // type:object size:0x8 -lbl_805790D8 = .sdata2:0x805790D8; // type:object size:0x8 -lbl_805790E0 = .sdata2:0x805790E0; // type:object size:0x8 -lbl_805790E8 = .sdata2:0x805790E8; // type:object size:0x8 -lbl_805790F0 = .sdata2:0x805790F0; // type:object size:0x8 data:string -lbl_805790F8 = .sdata2:0x805790F8; // type:object size:0x8 data:string -lbl_80579100 = .sdata2:0x80579100; // type:object size:0x8 data:string -lbl_80579108 = .sdata2:0x80579108; // type:object size:0x8 data:string -lbl_80579110 = .sdata2:0x80579110; // type:object size:0x8 data:string -lbl_80579118 = .sdata2:0x80579118; // type:object size:0x8 data:string -lbl_80579120 = .sdata2:0x80579120; // type:object size:0x8 data:string -lbl_80579128 = .sdata2:0x80579128; // type:object size:0x8 data:string -lbl_80579130 = .sdata2:0x80579130; // type:object size:0x8 data:string -lbl_80579138 = .sdata2:0x80579138; // type:object size:0x8 data:string -lbl_80579140 = .sdata2:0x80579140; // type:object size:0x8 -lbl_80579148 = .sdata2:0x80579148; // type:object size:0x8 -lbl_80579150 = .sdata2:0x80579150; // type:object size:0x8 data:string -lbl_80579158 = .sdata2:0x80579158; // type:object size:0x8 -lbl_80579160 = .sdata2:0x80579160; // type:object size:0x8 -lbl_80579168 = .sdata2:0x80579168; // type:object size:0x8 -lbl_80579170 = .sdata2:0x80579170; // type:object size:0x8 -lbl_80579178 = .sdata2:0x80579178; // type:object size:0x8 -lbl_80579180 = .sdata2:0x80579180; // type:object size:0x8 data:string -lbl_80579188 = .sdata2:0x80579188; // type:object size:0x8 data:string -lbl_80579190 = .sdata2:0x80579190; // type:object size:0x8 -lbl_80579198 = .sdata2:0x80579198; // type:object size:0x8 data:string -lbl_805791A0 = .sdata2:0x805791A0; // type:object size:0x8 data:string -lbl_805791A8 = .sdata2:0x805791A8; // type:object size:0x8 -lbl_805791B0 = .sdata2:0x805791B0; // type:object size:0x8 data:string -lbl_805791B8 = .sdata2:0x805791B8; // type:object size:0x8 -lbl_805791C0 = .sdata2:0x805791C0; // type:object size:0x8 data:string -lbl_805791C8 = .sdata2:0x805791C8; // type:object size:0x8 data:string -lbl_805791D0 = .sdata2:0x805791D0; // type:object size:0x8 data:string -lbl_805791D8 = .sdata2:0x805791D8; // type:object size:0x8 data:string -lbl_805791E0 = .sdata2:0x805791E0; // type:object size:0x8 -lbl_805791E8 = .sdata2:0x805791E8; // type:object size:0x8 -lbl_805791F0 = .sdata2:0x805791F0; // type:object size:0x8 data:string -lbl_805791F8 = .sdata2:0x805791F8; // type:object size:0x8 -lbl_80579200 = .sdata2:0x80579200; // type:object size:0x8 -lbl_80579208 = .sdata2:0x80579208; // type:object size:0x8 +@62 = .sdata2:0x805779F8; // type:object size:0x7 scope:local data:string +@63 = .sdata2:0x80577A00; // type:object size:0x7 scope:local data:string +@64 = .sdata2:0x80577A08; // type:object size:0x7 scope:local data:string +@65 = .sdata2:0x80577A10; // type:object size:0x7 scope:local data:string +@66 = .sdata2:0x80577A18; // type:object size:0x7 scope:local data:string +@67 = .sdata2:0x80577A20; // type:object size:0x7 scope:local data:string +@68 = .sdata2:0x80577A28; // type:object size:0x7 scope:local data:string +@69 = .sdata2:0x80577A30; // type:object size:0x7 scope:local data:string +@70 = .sdata2:0x80577A38; // type:object size:0x7 scope:local data:string +@71 = .sdata2:0x80577A40; // type:object size:0x7 scope:local data:string +@72 = .sdata2:0x80577A48; // type:object size:0x7 scope:local data:string +@73 = .sdata2:0x80577A50; // type:object size:0x7 scope:local data:string +@74 = .sdata2:0x80577A58; // type:object size:0x7 scope:local data:string +@75 = .sdata2:0x80577A60; // type:object size:0x7 scope:local data:string +@76 = .sdata2:0x80577A68; // type:object size:0x7 scope:local data:string +@77 = .sdata2:0x80577A70; // type:object size:0x7 scope:local data:string +@78 = .sdata2:0x80577A78; // type:object size:0x7 scope:local data:string +@79 = .sdata2:0x80577A80; // type:object size:0x7 scope:local data:string +@80 = .sdata2:0x80577A88; // type:object size:0x7 scope:local data:string +@81 = .sdata2:0x80577A90; // type:object size:0x7 scope:local data:string +@82 = .sdata2:0x80577A98; // type:object size:0x7 scope:local data:string +@83 = .sdata2:0x80577AA0; // type:object size:0x7 scope:local data:string +@84 = .sdata2:0x80577AA8; // type:object size:0x7 scope:local data:string +@85 = .sdata2:0x80577AB0; // type:object size:0x7 scope:local data:string +@86 = .sdata2:0x80577AB8; // type:object size:0x7 scope:local data:string +@87 = .sdata2:0x80577AC0; // type:object size:0x7 scope:local data:string +@88 = .sdata2:0x80577AC8; // type:object size:0x7 scope:local data:string +@89 = .sdata2:0x80577AD0; // type:object size:0x7 scope:local data:string +@90 = .sdata2:0x80577AD8; // type:object size:0x7 scope:local data:string +@91 = .sdata2:0x80577AE0; // type:object size:0x7 scope:local data:string +@92 = .sdata2:0x80577AE8; // type:object size:0x7 scope:local data:string +@93 = .sdata2:0x80577AF0; // type:object size:0x7 scope:local data:string +@94 = .sdata2:0x80577AF8; // type:object size:0x7 scope:local data:string +@95 = .sdata2:0x80577B00; // type:object size:0x7 scope:local data:string +@96 = .sdata2:0x80577B08; // type:object size:0x7 scope:local data:string +@97 = .sdata2:0x80577B10; // type:object size:0x7 scope:local data:string +@98 = .sdata2:0x80577B18; // type:object size:0x7 scope:local data:string +@99 = .sdata2:0x80577B20; // type:object size:0x7 scope:local data:string +@100 = .sdata2:0x80577B28; // type:object size:0x7 scope:local data:string +@101 = .sdata2:0x80577B30; // type:object size:0x7 scope:local data:string +@102 = .sdata2:0x80577B38; // type:object size:0x7 scope:local data:string +@103 = .sdata2:0x80577B40; // type:object size:0x7 scope:local data:string +@104 = .sdata2:0x80577B48; // type:object size:0x7 scope:local data:string +@105 = .sdata2:0x80577B50; // type:object size:0x7 scope:local data:string +@106 = .sdata2:0x80577B58; // type:object size:0x7 scope:local data:string +@107 = .sdata2:0x80577B60; // type:object size:0x7 scope:local data:string +@108 = .sdata2:0x80577B68; // type:object size:0x7 scope:local data:string +@109 = .sdata2:0x80577B70; // type:object size:0x7 scope:local data:string +@110 = .sdata2:0x80577B78; // type:object size:0x7 scope:local data:string +@111 = .sdata2:0x80577B80; // type:object size:0x7 scope:local data:string +@112 = .sdata2:0x80577B88; // type:object size:0x7 scope:local data:string +@113 = .sdata2:0x80577B90; // type:object size:0x7 scope:local data:string +@114 = .sdata2:0x80577B98; // type:object size:0x7 scope:local data:string +@115 = .sdata2:0x80577BA0; // type:object size:0x7 scope:local data:string +@116 = .sdata2:0x80577BA8; // type:object size:0x7 scope:local data:string +@117 = .sdata2:0x80577BB0; // type:object size:0x7 scope:local data:string +@118 = .sdata2:0x80577BB8; // type:object size:0x7 scope:local data:string +@119 = .sdata2:0x80577BC0; // type:object size:0x7 scope:local data:string +@120 = .sdata2:0x80577BC8; // type:object size:0x7 scope:local data:string +@121 = .sdata2:0x80577BD0; // type:object size:0x7 scope:local data:string +@122 = .sdata2:0x80577BD8; // type:object size:0x7 scope:local data:string +@123 = .sdata2:0x80577BE0; // type:object size:0x7 scope:local data:string +@124 = .sdata2:0x80577BE8; // type:object size:0x7 scope:local data:string +@125 = .sdata2:0x80577BF0; // type:object size:0x5 scope:local data:string +@126 = .sdata2:0x80577BF8; // type:object size:0x5 scope:local data:string +@127 = .sdata2:0x80577C00; // type:object size:0x5 scope:local data:string +@128 = .sdata2:0x80577C08; // type:object size:0x7 scope:local data:string +@129 = .sdata2:0x80577C10; // type:object size:0x6 scope:local data:string +@130 = .sdata2:0x80577C18; // type:object size:0x8 scope:local data:string +@131 = .sdata2:0x80577C20; // type:object size:0x4 scope:local data:string +@132 = .sdata2:0x80577C28; // type:object size:0x8 scope:local data:string +@133 = .sdata2:0x80577C30; // type:object size:0x6 scope:local data:string +@134 = .sdata2:0x80577C38; // type:object size:0x8 scope:local data:string +@135 = .sdata2:0x80577C40; // type:object size:0x7 scope:local data:string +@136 = .sdata2:0x80577C48; // type:object size:0x7 scope:local data:string +@137 = .sdata2:0x80577C50; // type:object size:0x7 scope:local data:string +@138 = .sdata2:0x80577C58; // type:object size:0x7 scope:local data:string +@139 = .sdata2:0x80577C60; // type:object size:0x7 scope:local data:string +@140 = .sdata2:0x80577C68; // type:object size:0x7 scope:local data:string +@141 = .sdata2:0x80577C70; // type:object size:0x8 scope:local data:string +@142 = .sdata2:0x80577C78; // type:object size:0x8 scope:local data:string +@143 = .sdata2:0x80577C80; // type:object size:0x7 scope:local data:string +@144 = .sdata2:0x80577C88; // type:object size:0x7 scope:local data:string +@145 = .sdata2:0x80577C90; // type:object size:0x8 scope:local data:string +@146 = .sdata2:0x80577C98; // type:object size:0x8 scope:local data:string +@147 = .sdata2:0x80577CA0; // type:object size:0x6 scope:local data:string +@148 = .sdata2:0x80577CA8; // type:object size:0x8 scope:local data:string +@149 = .sdata2:0x80577CB0; // type:object size:0x8 scope:local data:string +@150 = .sdata2:0x80577CB8; // type:object size:0x8 scope:local data:string +@151 = .sdata2:0x80577CC0; // type:object size:0x8 scope:local data:string +@152 = .sdata2:0x80577CC8; // type:object size:0x8 scope:local data:string +@153 = .sdata2:0x80577CD0; // type:object size:0x7 scope:local data:string +@154 = .sdata2:0x80577CD8; // type:object size:0x8 scope:local data:string +@155 = .sdata2:0x80577CE0; // type:object size:0x4 scope:local data:string +@156 = .sdata2:0x80577CE4; // type:object size:0x5 scope:local data:string +@157 = .sdata2:0x80577CEC; // type:object size:0x6 scope:local data:string +@158 = .sdata2:0x80577CF8; // type:object size:0x8 scope:local data:string +@159 = .sdata2:0x80577D00; // type:object size:0x8 scope:local data:string +@160 = .sdata2:0x80577D08; // type:object size:0x8 scope:local data:string +@161 = .sdata2:0x80577D10; // type:object size:0x5 scope:local data:string +@162 = .sdata2:0x80577D18; // type:object size:0x4 scope:local data:string +@163 = .sdata2:0x80577D1C; // type:object size:0x5 scope:local data:string +@164 = .sdata2:0x80577D24; // type:object size:0x5 scope:local data:string +@165 = .sdata2:0x80577D30; // type:object size:0x8 scope:local data:string +@166 = .sdata2:0x80577D38; // type:object size:0x4 scope:local data:string +@167 = .sdata2:0x80577D3C; // type:object size:0x6 scope:local data:string +@168 = .sdata2:0x80577D44; // type:object size:0x7 scope:local data:string +@169 = .sdata2:0x80577D50; // type:object size:0x8 scope:local data:string +@170 = .sdata2:0x80577D58; // type:object size:0x7 scope:local data:string +@171 = .sdata2:0x80577D60; // type:object size:0x8 scope:local data:string +@172 = .sdata2:0x80577D68; // type:object size:0x8 scope:local data:string +@173 = .sdata2:0x80577D70; // type:object size:0x8 scope:local data:string +@174 = .sdata2:0x80577D78; // type:object size:0x7 scope:local data:string +@175 = .sdata2:0x80577D80; // type:object size:0x4 scope:local data:string +@176 = .sdata2:0x80577D84; // type:object size:0x7 scope:local data:string +@177 = .sdata2:0x80577D8C; // type:object size:0x5 scope:local data:string +@178 = .sdata2:0x80577D98; // type:object size:0x8 scope:local data:string +@179 = .sdata2:0x80577DA0; // type:object size:0x8 scope:local data:string +@180 = .sdata2:0x80577DA8; // type:object size:0x6 scope:local data:string +@181 = .sdata2:0x80577DB0; // type:object size:0x7 scope:local data:string +@182 = .sdata2:0x80577DB8; // type:object size:0x7 scope:local data:string +@183 = .sdata2:0x80577DC0; // type:object size:0x8 scope:local data:string +@184 = .sdata2:0x80577DC8; // type:object size:0x6 scope:local data:string +@185 = .sdata2:0x80577DD0; // type:object size:0x8 scope:local data:string +@186 = .sdata2:0x80577DD8; // type:object size:0x6 scope:local data:string +@187 = .sdata2:0x80577DE0; // type:object size:0x7 scope:local data:string +@188 = .sdata2:0x80577DE8; // type:object size:0x6 scope:local data:string +@189 = .sdata2:0x80577DF0; // type:object size:0x8 scope:local data:string +@190 = .sdata2:0x80577DF8; // type:object size:0x8 scope:local data:string +@191 = .sdata2:0x80577E00; // type:object size:0x8 scope:local data:string +@192 = .sdata2:0x80577E08; // type:object size:0x5 scope:local data:string +@193 = .sdata2:0x80577E10; // type:object size:0x7 scope:local data:string +@194 = .sdata2:0x80577E18; // type:object size:0x6 scope:local data:string +@195 = .sdata2:0x80577E20; // type:object size:0x8 scope:local data:string +@196 = .sdata2:0x80577E28; // type:object size:0x8 scope:local data:string +@197 = .sdata2:0x80577E30; // type:object size:0x5 scope:local data:string +@198 = .sdata2:0x80577E38; // type:object size:0x5 scope:local data:string +@199 = .sdata2:0x80577E40; // type:object size:0x6 scope:local data:string +@200 = .sdata2:0x80577E48; // type:object size:0x5 scope:local data:string +@201 = .sdata2:0x80577E50; // type:object size:0x8 scope:local data:string +@202 = .sdata2:0x80577E58; // type:object size:0x7 scope:local data:string +@203 = .sdata2:0x80577E60; // type:object size:0x6 scope:local data:string +@204 = .sdata2:0x80577E68; // type:object size:0x8 scope:local data:string +@205 = .sdata2:0x80577E70; // type:object size:0x7 scope:local data:string +@206 = .sdata2:0x80577E78; // type:object size:0x6 scope:local data:string +@207 = .sdata2:0x80577E80; // type:object size:0x8 scope:local data:string +@208 = .sdata2:0x80577E88; // type:object size:0x8 scope:local data:string +@209 = .sdata2:0x80577E90; // type:object size:0x7 scope:local data:string +@210 = .sdata2:0x80577E98; // type:object size:0x6 scope:local data:string +@211 = .sdata2:0x80577EA0; // type:object size:0x7 scope:local data:string +@212 = .sdata2:0x80577EA8; // type:object size:0x7 scope:local data:string +@213 = .sdata2:0x80577EB0; // type:object size:0x7 scope:local data:string +@214 = .sdata2:0x80577EB8; // type:object size:0x7 scope:local data:string +@215 = .sdata2:0x80577EC0; // type:object size:0x7 scope:local data:string +@216 = .sdata2:0x80577EC8; // type:object size:0x7 scope:local data:string +@217 = .sdata2:0x80577ED0; // type:object size:0x8 scope:local data:string +@218 = .sdata2:0x80577ED8; // type:object size:0x4 scope:local data:string +@219 = .sdata2:0x80577EE0; // type:object size:0x8 scope:local data:string +@220 = .sdata2:0x80577EE8; // type:object size:0x8 scope:local data:string +@221 = .sdata2:0x80577EF0; // type:object size:0x7 scope:local data:string +@222 = .sdata2:0x80577EF8; // type:object size:0x7 scope:local data:string +@223 = .sdata2:0x80577F00; // type:object size:0x8 scope:local data:string +@224 = .sdata2:0x80577F08; // type:object size:0x8 scope:local data:string +@225 = .sdata2:0x80577F10; // type:object size:0x5 scope:local data:string +@226 = .sdata2:0x80577F18; // type:object size:0x6 scope:local data:string +@227 = .sdata2:0x80577F20; // type:object size:0x6 scope:local data:string +@228 = .sdata2:0x80577F28; // type:object size:0x6 scope:local data:string +@229 = .sdata2:0x80577F30; // type:object size:0x6 scope:local data:string +@230 = .sdata2:0x80577F38; // type:object size:0x6 scope:local data:string +@231 = .sdata2:0x80577F40; // type:object size:0x7 scope:local data:string +@232 = .sdata2:0x80577F48; // type:object size:0x5 scope:local data:string +@233 = .sdata2:0x80577F50; // type:object size:0x8 scope:local data:string +@234 = .sdata2:0x80577F58; // type:object size:0x8 scope:local data:string +@235 = .sdata2:0x80577F60; // type:object size:0x5 scope:local data:string +@236 = .sdata2:0x80577F68; // type:object size:0x8 scope:local data:string +@237 = .sdata2:0x80577F70; // type:object size:0x8 scope:local data:string +@238 = .sdata2:0x80577F78; // type:object size:0x8 scope:local data:string +@239 = .sdata2:0x80577F80; // type:object size:0x7 scope:local data:string +@240 = .sdata2:0x80577F88; // type:object size:0x4 scope:local data:string +@241 = .sdata2:0x80577F8C; // type:object size:0x7 scope:local data:string +@242 = .sdata2:0x80577F98; // type:object size:0x8 scope:local data:string +@243 = .sdata2:0x80577FA0; // type:object size:0x7 scope:local data:string +@244 = .sdata2:0x80577FA8; // type:object size:0x7 scope:local data:string +@245 = .sdata2:0x80577FB0; // type:object size:0x7 scope:local data:string +@246 = .sdata2:0x80577FB8; // type:object size:0x7 scope:local data:string +@247 = .sdata2:0x80577FC0; // type:object size:0x7 scope:local data:string +@248 = .sdata2:0x80577FC8; // type:object size:0x7 scope:local data:string +@249 = .sdata2:0x80577FD0; // type:object size:0x8 scope:local data:string +@250 = .sdata2:0x80577FD8; // type:object size:0x6 scope:local data:string +@251 = .sdata2:0x80577FE0; // type:object size:0x8 scope:local data:string +@252 = .sdata2:0x80577FE8; // type:object size:0x8 scope:local data:string +@253 = .sdata2:0x80577FF0; // type:object size:0x5 scope:local data:string +@254 = .sdata2:0x80577FF8; // type:object size:0x7 scope:local data:string +@255 = .sdata2:0x80578000; // type:object size:0x8 scope:local data:string +@256 = .sdata2:0x80578008; // type:object size:0x8 scope:local data:string +@257 = .sdata2:0x80578010; // type:object size:0x7 scope:local data:string +@258 = .sdata2:0x80578018; // type:object size:0x6 scope:local data:string +@259 = .sdata2:0x80578020; // type:object size:0x6 scope:local data:string +@260 = .sdata2:0x80578028; // type:object size:0x8 scope:local data:string +@261 = .sdata2:0x80578030; // type:object size:0x8 scope:local data:string +@262 = .sdata2:0x80578038; // type:object size:0x7 scope:local data:string +@263 = .sdata2:0x80578040; // type:object size:0x8 scope:local data:string +@264 = .sdata2:0x80578048; // type:object size:0x8 scope:local data:string +@265 = .sdata2:0x80578050; // type:object size:0x8 scope:local data:string +@266 = .sdata2:0x80578058; // type:object size:0x5 scope:local data:string +@267 = .sdata2:0x80578060; // type:object size:0x8 scope:local data:string +@268 = .sdata2:0x80578068; // type:object size:0x7 scope:local data:string +@269 = .sdata2:0x80578070; // type:object size:0x8 scope:local data:string +@270 = .sdata2:0x80578078; // type:object size:0x8 scope:local data:string +@271 = .sdata2:0x80578080; // type:object size:0x8 scope:local data:string +@272 = .sdata2:0x80578088; // type:object size:0x5 scope:local data:string +@273 = .sdata2:0x80578090; // type:object size:0x8 scope:local data:string +@274 = .sdata2:0x80578098; // type:object size:0x8 scope:local data:string +@275 = .sdata2:0x805780A0; // type:object size:0x8 scope:local data:string +@276 = .sdata2:0x805780A8; // type:object size:0x4 scope:local data:string +@277 = .sdata2:0x805780AC; // type:object size:0x4 scope:local data:string +@278 = .sdata2:0x805780B0; // type:object size:0x5 scope:local data:string +@279 = .sdata2:0x805780B8; // type:object size:0x6 scope:local data:string +@280 = .sdata2:0x805780C0; // type:object size:0x5 scope:local data:string +@281 = .sdata2:0x805780C8; // type:object size:0x8 scope:local data:string +@282 = .sdata2:0x805780D0; // type:object size:0x7 scope:local data:string +@283 = .sdata2:0x805780D8; // type:object size:0x4 scope:local data:string +@284 = .sdata2:0x805780E0; // type:object size:0x8 scope:local data:string +@285 = .sdata2:0x805780E8; // type:object size:0x8 scope:local data:string +@286 = .sdata2:0x805780F0; // type:object size:0x5 scope:local data:string +@287 = .sdata2:0x805780F8; // type:object size:0x6 scope:local data:string +@288 = .sdata2:0x80578100; // type:object size:0x5 scope:local data:string +@289 = .sdata2:0x80578108; // type:object size:0x4 scope:local data:string +@290 = .sdata2:0x8057810C; // type:object size:0x6 scope:local data:string +@291 = .sdata2:0x80578118; // type:object size:0x8 scope:local data:string +@292 = .sdata2:0x80578120; // type:object size:0x5 scope:local data:string +@293 = .sdata2:0x80578128; // type:object size:0x8 scope:local data:string +@294 = .sdata2:0x80578130; // type:object size:0x7 scope:local data:string +@295 = .sdata2:0x80578138; // type:object size:0x8 scope:local data:string +@296 = .sdata2:0x80578140; // type:object size:0x7 scope:local data:string +@297 = .sdata2:0x80578148; // type:object size:0x7 scope:local data:string +@298 = .sdata2:0x80578150; // type:object size:0x8 scope:local data:string +@299 = .sdata2:0x80578158; // type:object size:0x5 scope:local data:string +@300 = .sdata2:0x80578160; // type:object size:0x4 scope:local data:string +@301 = .sdata2:0x80578164; // type:object size:0x7 scope:local data:string +@302 = .sdata2:0x8057816C; // type:object size:0x7 scope:local data:string +@303 = .sdata2:0x80578174; // type:object size:0x4 scope:local data:string +@304 = .sdata2:0x80578178; // type:object size:0x4 scope:local data:string +@305 = .sdata2:0x80578180; // type:object size:0x8 scope:local data:string +@306 = .sdata2:0x80578188; // type:object size:0x8 scope:local data:string +@307 = .sdata2:0x80578190; // type:object size:0x7 scope:local data:string +@308 = .sdata2:0x80578198; // type:object size:0x8 scope:local data:string +@309 = .sdata2:0x805781A0; // type:object size:0x4 scope:local data:string +@310 = .sdata2:0x805781A8; // type:object size:0x8 scope:local data:string +@311 = .sdata2:0x805781B0; // type:object size:0x4 scope:local data:string +@312 = .sdata2:0x805781B4; // type:object size:0x4 scope:local data:string +@313 = .sdata2:0x805781B8; // type:object size:0x8 scope:local data:string +@314 = .sdata2:0x805781C0; // type:object size:0x4 scope:local data:string +@315 = .sdata2:0x805781C4; // type:object size:0x4 scope:local data:string +@316 = .sdata2:0x805781C8; // type:object size:0x7 scope:local data:string +@317 = .sdata2:0x805781D0; // type:object size:0x8 scope:local data:string +@318 = .sdata2:0x805781D8; // type:object size:0x4 scope:local data:string +@319 = .sdata2:0x805781DC; // type:object size:0x5 scope:local data:string +@320 = .sdata2:0x805781E4; // type:object size:0x7 scope:local data:string +@321 = .sdata2:0x805781EC; // type:object size:0x6 scope:local data:string +@322 = .sdata2:0x805781F4; // type:object size:0x4 scope:local data:string +@323 = .sdata2:0x805781F8; // type:object size:0x7 scope:local data:string +@324 = .sdata2:0x80578200; // type:object size:0x7 scope:local data:string +@325 = .sdata2:0x80578208; // type:object size:0x4 scope:local data:string +@326 = .sdata2:0x8057820C; // type:object size:0x4 scope:local data:string +@327 = .sdata2:0x80578210; // type:object size:0x7 scope:local data:string +@328 = .sdata2:0x80578218; // type:object size:0x4 scope:local data:string +@329 = .sdata2:0x80578220; // type:object size:0x8 scope:local data:string +@330 = .sdata2:0x80578228; // type:object size:0x8 scope:local data:string +@331 = .sdata2:0x80578230; // type:object size:0x5 scope:local data:string +@332 = .sdata2:0x80578238; // type:object size:0x4 scope:local data:string +@333 = .sdata2:0x80578240; // type:object size:0x8 scope:local data:string +@334 = .sdata2:0x80578248; // type:object size:0x7 scope:local data:string +@335 = .sdata2:0x80578250; // type:object size:0x8 scope:local data:string +@336 = .sdata2:0x80578258; // type:object size:0x8 scope:local data:string +@337 = .sdata2:0x80578260; // type:object size:0x7 scope:local data:string +@338 = .sdata2:0x80578268; // type:object size:0x8 scope:local data:string +@339 = .sdata2:0x80578270; // type:object size:0x8 scope:local data:string +@340 = .sdata2:0x80578278; // type:object size:0x8 scope:local data:string +@341 = .sdata2:0x80578280; // type:object size:0x6 scope:local data:string +@342 = .sdata2:0x80578288; // type:object size:0x6 scope:local data:string +@343 = .sdata2:0x80578290; // type:object size:0x8 scope:local data:string +@344 = .sdata2:0x80578298; // type:object size:0x6 scope:local data:string +@345 = .sdata2:0x805782A0; // type:object size:0x8 scope:local data:string +@346 = .sdata2:0x805782A8; // type:object size:0x8 scope:local data:string +@347 = .sdata2:0x805782B0; // type:object size:0x8 scope:local data:string +@348 = .sdata2:0x805782B8; // type:object size:0x8 scope:local data:string +@349 = .sdata2:0x805782C0; // type:object size:0x8 scope:local data:string +@350 = .sdata2:0x805782C8; // type:object size:0x8 scope:local data:string +@351 = .sdata2:0x805782D0; // type:object size:0x5 scope:local data:string +@352 = .sdata2:0x805782D8; // type:object size:0x8 scope:local data:string +@353 = .sdata2:0x805782E0; // type:object size:0x8 scope:local data:string +@354 = .sdata2:0x805782E8; // type:object size:0x8 scope:local data:string +@355 = .sdata2:0x805782F0; // type:object size:0x5 scope:local data:string +@356 = .sdata2:0x805782F8; // type:object size:0x5 scope:local data:string +@357 = .sdata2:0x80578300; // type:object size:0x6 scope:local data:string +@358 = .sdata2:0x80578308; // type:object size:0x6 scope:local data:string +@359 = .sdata2:0x80578310; // type:object size:0x6 scope:local data:string +@360 = .sdata2:0x80578318; // type:object size:0x8 scope:local data:string +@361 = .sdata2:0x80578320; // type:object size:0x8 scope:local data:string +@362 = .sdata2:0x80578328; // type:object size:0x7 scope:local data:string +@363 = .sdata2:0x80578330; // type:object size:0x8 scope:local data:string +@364 = .sdata2:0x80578338; // type:object size:0x7 scope:local data:string +@365 = .sdata2:0x80578340; // type:object size:0x8 scope:local data:string +@366 = .sdata2:0x80578348; // type:object size:0x8 scope:local data:string +@367 = .sdata2:0x80578350; // type:object size:0x8 scope:local data:string +@368 = .sdata2:0x80578358; // type:object size:0x7 scope:local data:string +@369 = .sdata2:0x80578360; // type:object size:0x7 scope:local data:string +@370 = .sdata2:0x80578368; // type:object size:0x8 scope:local data:string +@371 = .sdata2:0x80578370; // type:object size:0x6 scope:local data:string +@372 = .sdata2:0x80578378; // type:object size:0x5 scope:local data:string +@373 = .sdata2:0x80578380; // type:object size:0x8 scope:local data:string +@374 = .sdata2:0x80578388; // type:object size:0x8 scope:local data:string +@375 = .sdata2:0x80578390; // type:object size:0x6 scope:local data:string +@376 = .sdata2:0x80578398; // type:object size:0x8 scope:local data:string +@377 = .sdata2:0x805783A0; // type:object size:0x8 scope:local data:string +@378 = .sdata2:0x805783A8; // type:object size:0x8 scope:local data:string +@379 = .sdata2:0x805783B0; // type:object size:0x8 scope:local data:string +@380 = .sdata2:0x805783B8; // type:object size:0x8 scope:local data:string +@381 = .sdata2:0x805783C0; // type:object size:0x8 scope:local data:string +@382 = .sdata2:0x805783C8; // type:object size:0x6 scope:local data:string +@383 = .sdata2:0x805783D0; // type:object size:0x7 scope:local data:string +@384 = .sdata2:0x805783D8; // type:object size:0x7 scope:local data:string +@385 = .sdata2:0x805783E0; // type:object size:0x7 scope:local data:string +@386 = .sdata2:0x805783E8; // type:object size:0x8 scope:local data:string +@387 = .sdata2:0x805783F0; // type:object size:0x5 scope:local data:string +@388 = .sdata2:0x805783F8; // type:object size:0x8 scope:local data:string +@389 = .sdata2:0x80578400; // type:object size:0x8 scope:local data:string +@390 = .sdata2:0x80578408; // type:object size:0x7 scope:local data:string +@391 = .sdata2:0x80578410; // type:object size:0x8 scope:local data:string +@392 = .sdata2:0x80578418; // type:object size:0x5 scope:local data:string +@393 = .sdata2:0x80578420; // type:object size:0x8 scope:local data:string +@394 = .sdata2:0x80578428; // type:object size:0x7 scope:local data:string +@395 = .sdata2:0x80578430; // type:object size:0x8 scope:local data:string +@396 = .sdata2:0x80578438; // type:object size:0x8 scope:local data:string +@397 = .sdata2:0x80578440; // type:object size:0x8 scope:local data:string +@398 = .sdata2:0x80578448; // type:object size:0x6 scope:local data:string +@399 = .sdata2:0x80578450; // type:object size:0x8 scope:local data:string +@400 = .sdata2:0x80578458; // type:object size:0x7 scope:local data:string +@401 = .sdata2:0x80578460; // type:object size:0x8 scope:local data:string +@402 = .sdata2:0x80578468; // type:object size:0x7 scope:local data:string +@403 = .sdata2:0x80578470; // type:object size:0x8 scope:local data:string +@404 = .sdata2:0x80578478; // type:object size:0x8 scope:local data:string +@405 = .sdata2:0x80578480; // type:object size:0x7 scope:local data:string +@406 = .sdata2:0x80578488; // type:object size:0x7 scope:local data:string +@407 = .sdata2:0x80578490; // type:object size:0x8 scope:local data:string +@408 = .sdata2:0x80578498; // type:object size:0x8 scope:local data:string +@409 = .sdata2:0x805784A0; // type:object size:0x8 scope:local data:string +@410 = .sdata2:0x805784A8; // type:object size:0x8 scope:local data:string +@411 = .sdata2:0x805784B0; // type:object size:0x8 scope:local data:string +@412 = .sdata2:0x805784B8; // type:object size:0x5 scope:local data:string +@413 = .sdata2:0x805784C0; // type:object size:0x8 scope:local data:string +@414 = .sdata2:0x805784C8; // type:object size:0x7 scope:local data:string +@415 = .sdata2:0x805784D0; // type:object size:0x8 scope:local data:string +@416 = .sdata2:0x805784D8; // type:object size:0x7 scope:local data:string +@417 = .sdata2:0x805784E0; // type:object size:0x8 scope:local data:string +@418 = .sdata2:0x805784E8; // type:object size:0x7 scope:local data:string +@419 = .sdata2:0x805784F0; // type:object size:0x8 scope:local data:string +@420 = .sdata2:0x805784F8; // type:object size:0x7 scope:local data:string +@421 = .sdata2:0x80578500; // type:object size:0x8 scope:local data:string +@422 = .sdata2:0x80578508; // type:object size:0x8 scope:local data:string +@423 = .sdata2:0x80578510; // type:object size:0x8 scope:local data:string +@424 = .sdata2:0x80578518; // type:object size:0x8 scope:local data:string +@425 = .sdata2:0x80578520; // type:object size:0x8 scope:local data:string +@426 = .sdata2:0x80578528; // type:object size:0x8 scope:local data:string +@427 = .sdata2:0x80578530; // type:object size:0x8 scope:local data:string +@428 = .sdata2:0x80578538; // type:object size:0x6 scope:local data:string +@429 = .sdata2:0x80578540; // type:object size:0x6 scope:local data:string +@430 = .sdata2:0x80578548; // type:object size:0x8 scope:local data:string +@431 = .sdata2:0x80578550; // type:object size:0x7 scope:local data:string +@432 = .sdata2:0x80578558; // type:object size:0x8 scope:local data:string +@433 = .sdata2:0x80578560; // type:object size:0x6 scope:local data:string +@434 = .sdata2:0x80578568; // type:object size:0x8 scope:local data:string +@435 = .sdata2:0x80578570; // type:object size:0x6 scope:local data:string +@436 = .sdata2:0x80578578; // type:object size:0x6 scope:local data:string +@437 = .sdata2:0x80578580; // type:object size:0x6 scope:local data:string +@438 = .sdata2:0x80578588; // type:object size:0x6 scope:local data:string +@439 = .sdata2:0x80578590; // type:object size:0x6 scope:local data:string +@440 = .sdata2:0x80578598; // type:object size:0x6 scope:local data:string +@441 = .sdata2:0x805785A0; // type:object size:0x8 scope:local data:string +@442 = .sdata2:0x805785A8; // type:object size:0x8 scope:local data:string +@443 = .sdata2:0x805785B0; // type:object size:0x8 scope:local data:string +@444 = .sdata2:0x805785B8; // type:object size:0x8 scope:local data:string +@445 = .sdata2:0x805785C0; // type:object size:0x8 scope:local data:string +@446 = .sdata2:0x805785C8; // type:object size:0x8 scope:local data:string +@447 = .sdata2:0x805785D0; // type:object size:0x5 scope:local data:string +@448 = .sdata2:0x805785D8; // type:object size:0x4 scope:local data:string +@449 = .sdata2:0x805785DC; // type:object size:0x7 scope:local data:string +@450 = .sdata2:0x805785E4; // type:object size:0x6 scope:local data:string +@451 = .sdata2:0x805785EC; // type:object size:0x7 scope:local data:string +@452 = .sdata2:0x805785F8; // type:object size:0x8 scope:local data:string +@453 = .sdata2:0x80578600; // type:object size:0x8 scope:local data:string +@454 = .sdata2:0x80578608; // type:object size:0x7 scope:local data:string +@455 = .sdata2:0x80578610; // type:object size:0x6 scope:local data:string +@456 = .sdata2:0x80578618; // type:object size:0x6 scope:local data:string +@457 = .sdata2:0x80578620; // type:object size:0x8 scope:local data:string +@458 = .sdata2:0x80578628; // type:object size:0x6 scope:local data:string +@459 = .sdata2:0x80578630; // type:object size:0x7 scope:local data:string +@460 = .sdata2:0x80578638; // type:object size:0x8 scope:local data:string +@461 = .sdata2:0x80578640; // type:object size:0x8 scope:local data:string +@462 = .sdata2:0x80578648; // type:object size:0x8 scope:local data:string +@463 = .sdata2:0x80578650; // type:object size:0x8 scope:local data:string +@464 = .sdata2:0x80578658; // type:object size:0x8 scope:local data:string +@465 = .sdata2:0x80578660; // type:object size:0x8 scope:local data:string +@466 = .sdata2:0x80578668; // type:object size:0x7 scope:local data:string +@467 = .sdata2:0x80578670; // type:object size:0x8 scope:local data:string +@468 = .sdata2:0x80578678; // type:object size:0x7 scope:local data:string +@469 = .sdata2:0x80578680; // type:object size:0x8 scope:local data:string +@470 = .sdata2:0x80578688; // type:object size:0x8 scope:local data:string +@471 = .sdata2:0x80578690; // type:object size:0x8 scope:local data:string +@472 = .sdata2:0x80578698; // type:object size:0x8 scope:local data:string +@473 = .sdata2:0x805786A0; // type:object size:0x8 scope:local data:string +@474 = .sdata2:0x805786A8; // type:object size:0x6 scope:local data:string +@475 = .sdata2:0x805786B0; // type:object size:0x8 scope:local data:string +@476 = .sdata2:0x805786B8; // type:object size:0x7 scope:local data:string +@477 = .sdata2:0x805786C0; // type:object size:0x8 scope:local data:string +@478 = .sdata2:0x805786C8; // type:object size:0x8 scope:local data:string +@479 = .sdata2:0x805786D0; // type:object size:0x8 scope:local data:string +@480 = .sdata2:0x805786D8; // type:object size:0x8 scope:local data:string +@481 = .sdata2:0x805786E0; // type:object size:0x8 scope:local data:string +@482 = .sdata2:0x805786E8; // type:object size:0x8 scope:local data:string +@483 = .sdata2:0x805786F0; // type:object size:0x7 scope:local data:string +@484 = .sdata2:0x805786F8; // type:object size:0x7 scope:local data:string +@485 = .sdata2:0x80578700; // type:object size:0x8 scope:local data:string +@486 = .sdata2:0x80578708; // type:object size:0x8 scope:local data:string +@487 = .sdata2:0x80578710; // type:object size:0x8 scope:local data:string +@488 = .sdata2:0x80578718; // type:object size:0x8 scope:local data:string +@489 = .sdata2:0x80578720; // type:object size:0x8 scope:local data:string +@490 = .sdata2:0x80578728; // type:object size:0x8 scope:local data:string +@491 = .sdata2:0x80578730; // type:object size:0x8 scope:local data:string +@492 = .sdata2:0x80578738; // type:object size:0x8 scope:local data:string +@493 = .sdata2:0x80578740; // type:object size:0x7 scope:local data:string +@494 = .sdata2:0x80578748; // type:object size:0x8 scope:local data:string +@495 = .sdata2:0x80578750; // type:object size:0x7 scope:local data:string +@496 = .sdata2:0x80578758; // type:object size:0x8 scope:local data:string +@497 = .sdata2:0x80578760; // type:object size:0x7 scope:local data:string +@498 = .sdata2:0x80578768; // type:object size:0x7 scope:local data:string +@499 = .sdata2:0x80578770; // type:object size:0x8 scope:local data:string +@500 = .sdata2:0x80578778; // type:object size:0x7 scope:local data:string +@501 = .sdata2:0x80578780; // type:object size:0x7 scope:local data:string +@502 = .sdata2:0x80578788; // type:object size:0x7 scope:local data:string +@503 = .sdata2:0x80578790; // type:object size:0x7 scope:local data:string +@504 = .sdata2:0x80578798; // type:object size:0x8 scope:local data:string +@505 = .sdata2:0x805787A0; // type:object size:0x7 scope:local data:string +@506 = .sdata2:0x805787A8; // type:object size:0x8 scope:local data:string +@507 = .sdata2:0x805787B0; // type:object size:0x8 scope:local data:string +@508 = .sdata2:0x805787B8; // type:object size:0x8 scope:local data:string +@509 = .sdata2:0x805787C0; // type:object size:0x8 scope:local data:string +@510 = .sdata2:0x805787C8; // type:object size:0x7 scope:local data:string +@511 = .sdata2:0x805787D0; // type:object size:0x8 scope:local data:string +@512 = .sdata2:0x805787D8; // type:object size:0x7 scope:local data:string +@513 = .sdata2:0x805787E0; // type:object size:0x8 scope:local data:string +@514 = .sdata2:0x805787E8; // type:object size:0x8 scope:local data:string +@515 = .sdata2:0x805787F0; // type:object size:0x8 scope:local data:string +@516 = .sdata2:0x805787F8; // type:object size:0x8 scope:local data:string +@517 = .sdata2:0x80578800; // type:object size:0x8 scope:local data:string +@518 = .sdata2:0x80578808; // type:object size:0x8 scope:local data:string +@519 = .sdata2:0x80578810; // type:object size:0x8 scope:local data:string +@520 = .sdata2:0x80578818; // type:object size:0x8 scope:local data:string +@521 = .sdata2:0x80578820; // type:object size:0x8 scope:local data:string +@522 = .sdata2:0x80578828; // type:object size:0x7 scope:local data:string +@523 = .sdata2:0x80578830; // type:object size:0x8 scope:local data:string +@524 = .sdata2:0x80578838; // type:object size:0x7 scope:local data:string +@525 = .sdata2:0x80578840; // type:object size:0x7 scope:local data:string +@526 = .sdata2:0x80578848; // type:object size:0x8 scope:local data:string +@527 = .sdata2:0x80578850; // type:object size:0x8 scope:local data:string +@528 = .sdata2:0x80578858; // type:object size:0x7 scope:local data:string +@529 = .sdata2:0x80578860; // type:object size:0x8 scope:local data:string +@530 = .sdata2:0x80578868; // type:object size:0x7 scope:local data:string +@531 = .sdata2:0x80578870; // type:object size:0x7 scope:local data:string +@532 = .sdata2:0x80578878; // type:object size:0x7 scope:local data:string +@533 = .sdata2:0x80578880; // type:object size:0x8 scope:local data:string +@534 = .sdata2:0x80578888; // type:object size:0x7 scope:local data:string +@535 = .sdata2:0x80578890; // type:object size:0x8 scope:local data:string +@536 = .sdata2:0x80578898; // type:object size:0x8 scope:local data:string +@537 = .sdata2:0x805788A0; // type:object size:0x8 scope:local data:string +@538 = .sdata2:0x805788A8; // type:object size:0x8 scope:local data:string +@539 = .sdata2:0x805788B0; // type:object size:0x8 scope:local data:string +@540 = .sdata2:0x805788B8; // type:object size:0x8 scope:local data:string +@541 = .sdata2:0x805788C0; // type:object size:0x8 scope:local data:string +@542 = .sdata2:0x805788C8; // type:object size:0x8 scope:local data:string +@543 = .sdata2:0x805788D0; // type:object size:0x8 scope:local data:string +@544 = .sdata2:0x805788D8; // type:object size:0x7 scope:local data:string +@545 = .sdata2:0x805788E0; // type:object size:0x7 scope:local data:string +@546 = .sdata2:0x805788E8; // type:object size:0x8 scope:local data:string +@547 = .sdata2:0x805788F0; // type:object size:0x8 scope:local data:string +@548 = .sdata2:0x805788F8; // type:object size:0x8 scope:local data:string +@549 = .sdata2:0x80578900; // type:object size:0x8 scope:local data:string +@550 = .sdata2:0x80578908; // type:object size:0x8 scope:local data:string +@551 = .sdata2:0x80578910; // type:object size:0x8 scope:local data:string +@552 = .sdata2:0x80578918; // type:object size:0x8 scope:local data:string +@553 = .sdata2:0x80578920; // type:object size:0x8 scope:local data:string +@554 = .sdata2:0x80578928; // type:object size:0x8 scope:local data:string +@555 = .sdata2:0x80578930; // type:object size:0x8 scope:local data:string +@556 = .sdata2:0x80578938; // type:object size:0x8 scope:local data:string +@557 = .sdata2:0x80578940; // type:object size:0x8 scope:local data:string +@558 = .sdata2:0x80578948; // type:object size:0x7 scope:local data:string +@559 = .sdata2:0x80578950; // type:object size:0x8 scope:local data:string +@560 = .sdata2:0x80578958; // type:object size:0x8 scope:local data:string +@561 = .sdata2:0x80578960; // type:object size:0x8 scope:local data:string +@562 = .sdata2:0x80578968; // type:object size:0x7 scope:local data:string +@563 = .sdata2:0x80578970; // type:object size:0x7 scope:local data:string +@564 = .sdata2:0x80578978; // type:object size:0x8 scope:local data:string +@565 = .sdata2:0x80578980; // type:object size:0x8 scope:local data:string +@566 = .sdata2:0x80578988; // type:object size:0x7 scope:local data:string +@567 = .sdata2:0x80578990; // type:object size:0x8 scope:local data:string +@568 = .sdata2:0x80578998; // type:object size:0x7 scope:local data:string +@569 = .sdata2:0x805789A0; // type:object size:0x7 scope:local data:string +@570 = .sdata2:0x805789A8; // type:object size:0x7 scope:local data:string +@571 = .sdata2:0x805789B0; // type:object size:0x7 scope:local data:string +@572 = .sdata2:0x805789B8; // type:object size:0x7 scope:local data:string +@573 = .sdata2:0x805789C0; // type:object size:0x7 scope:local data:string +@574 = .sdata2:0x805789C8; // type:object size:0x8 scope:local data:string +@575 = .sdata2:0x805789D0; // type:object size:0x8 scope:local data:string +@576 = .sdata2:0x805789D8; // type:object size:0x8 scope:local data:string +@577 = .sdata2:0x805789E0; // type:object size:0x6 scope:local data:string +@578 = .sdata2:0x805789E8; // type:object size:0x7 scope:local data:string +@579 = .sdata2:0x805789F0; // type:object size:0x8 scope:local data:string +@580 = .sdata2:0x805789F8; // type:object size:0x6 scope:local data:string +@581 = .sdata2:0x80578A00; // type:object size:0x6 scope:local data:string +@582 = .sdata2:0x80578A08; // type:object size:0x8 scope:local data:string +@583 = .sdata2:0x80578A10; // type:object size:0x7 scope:local data:string +@584 = .sdata2:0x80578A18; // type:object size:0x8 scope:local data:string +@585 = .sdata2:0x80578A20; // type:object size:0x6 scope:local data:string +@586 = .sdata2:0x80578A28; // type:object size:0x7 scope:local data:string +@587 = .sdata2:0x80578A30; // type:object size:0x6 scope:local data:string +@588 = .sdata2:0x80578A38; // type:object size:0x6 scope:local data:string +@589 = .sdata2:0x80578A40; // type:object size:0x6 scope:local data:string +@590 = .sdata2:0x80578A48; // type:object size:0x6 scope:local data:string +@591 = .sdata2:0x80578A50; // type:object size:0x7 scope:local data:string +@592 = .sdata2:0x80578A58; // type:object size:0x8 scope:local data:string +@593 = .sdata2:0x80578A60; // type:object size:0x6 scope:local data:string +@594 = .sdata2:0x80578A68; // type:object size:0x7 scope:local data:string +@595 = .sdata2:0x80578A70; // type:object size:0x8 scope:local data:string +@596 = .sdata2:0x80578A78; // type:object size:0x6 scope:local data:string +@597 = .sdata2:0x80578A80; // type:object size:0x8 scope:local data:string +@598 = .sdata2:0x80578A88; // type:object size:0x7 scope:local data:string +@599 = .sdata2:0x80578A90; // type:object size:0x7 scope:local data:string +@600 = .sdata2:0x80578A98; // type:object size:0x8 scope:local data:string +@601 = .sdata2:0x80578AA0; // type:object size:0x7 scope:local data:string +@602 = .sdata2:0x80578AA8; // type:object size:0x8 scope:local data:string +@603 = .sdata2:0x80578AB0; // type:object size:0x8 scope:local data:string +@604 = .sdata2:0x80578AB8; // type:object size:0x6 scope:local data:string +@605 = .sdata2:0x80578AC0; // type:object size:0x8 scope:local data:string +@606 = .sdata2:0x80578AC8; // type:object size:0x8 scope:local data:string +@607 = .sdata2:0x80578AD0; // type:object size:0x7 scope:local data:string +@608 = .sdata2:0x80578AD8; // type:object size:0x7 scope:local data:string +@609 = .sdata2:0x80578AE0; // type:object size:0x7 scope:local data:string +@610 = .sdata2:0x80578AE8; // type:object size:0x7 scope:local data:string +@611 = .sdata2:0x80578AF0; // type:object size:0x7 scope:local data:string +@612 = .sdata2:0x80578AF8; // type:object size:0x7 scope:local data:string +@613 = .sdata2:0x80578B00; // type:object size:0x7 scope:local data:string +@614 = .sdata2:0x80578B08; // type:object size:0x8 scope:local data:string +@615 = .sdata2:0x80578B10; // type:object size:0x8 scope:local data:string +@616 = .sdata2:0x80578B18; // type:object size:0x8 scope:local data:string +@617 = .sdata2:0x80578B20; // type:object size:0x7 scope:local data:string +@618 = .sdata2:0x80578B28; // type:object size:0x8 scope:local data:string +@619 = .sdata2:0x80578B30; // type:object size:0x8 scope:local data:string +@620 = .sdata2:0x80578B38; // type:object size:0x8 scope:local data:string +@621 = .sdata2:0x80578B40; // type:object size:0x8 scope:local data:string +@622 = .sdata2:0x80578B48; // type:object size:0x8 scope:local data:string +@623 = .sdata2:0x80578B50; // type:object size:0x7 scope:local data:string +@624 = .sdata2:0x80578B58; // type:object size:0x8 scope:local data:string +@625 = .sdata2:0x80578B60; // type:object size:0x8 scope:local data:string +@626 = .sdata2:0x80578B68; // type:object size:0x6 scope:local data:string +@627 = .sdata2:0x80578B70; // type:object size:0x8 scope:local data:string +@628 = .sdata2:0x80578B78; // type:object size:0x8 scope:local data:string +@629 = .sdata2:0x80578B80; // type:object size:0x8 scope:local data:string +@630 = .sdata2:0x80578B88; // type:object size:0x7 scope:local data:string +@631 = .sdata2:0x80578B90; // type:object size:0x8 scope:local data:string +@632 = .sdata2:0x80578B98; // type:object size:0x8 scope:local data:string +@633 = .sdata2:0x80578BA0; // type:object size:0x8 scope:local data:string +@634 = .sdata2:0x80578BA8; // type:object size:0x8 scope:local data:string +@635 = .sdata2:0x80578BB0; // type:object size:0x8 scope:local data:string +@636 = .sdata2:0x80578BB8; // type:object size:0x8 scope:local data:string +@637 = .sdata2:0x80578BC0; // type:object size:0x8 scope:local data:string +@638 = .sdata2:0x80578BC8; // type:object size:0x8 scope:local data:string +@639 = .sdata2:0x80578BD0; // type:object size:0x8 scope:local data:string +@640 = .sdata2:0x80578BD8; // type:object size:0x8 scope:local data:string +@641 = .sdata2:0x80578BE0; // type:object size:0x8 scope:local data:string +@642 = .sdata2:0x80578BE8; // type:object size:0x8 scope:local data:string +@643 = .sdata2:0x80578BF0; // type:object size:0x8 scope:local data:string +@644 = .sdata2:0x80578BF8; // type:object size:0x8 scope:local data:string +@645 = .sdata2:0x80578C00; // type:object size:0x8 scope:local data:string +@646 = .sdata2:0x80578C08; // type:object size:0x8 scope:local data:string +@647 = .sdata2:0x80578C10; // type:object size:0x8 scope:local data:string +@648 = .sdata2:0x80578C18; // type:object size:0x8 scope:local data:string +@649 = .sdata2:0x80578C20; // type:object size:0x7 scope:local data:string +@650 = .sdata2:0x80578C28; // type:object size:0x8 scope:local data:string +@651 = .sdata2:0x80578C30; // type:object size:0x5 scope:local data:string +@652 = .sdata2:0x80578C38; // type:object size:0x8 scope:local data:string +@653 = .sdata2:0x80578C40; // type:object size:0x8 scope:local data:string +@654 = .sdata2:0x80578C48; // type:object size:0x7 scope:local data:string +@655 = .sdata2:0x80578C50; // type:object size:0x6 scope:local data:string +@656 = .sdata2:0x80578C58; // type:object size:0x8 scope:local data:string +@657 = .sdata2:0x80578C60; // type:object size:0x5 scope:local data:string +@658 = .sdata2:0x80578C68; // type:object size:0x8 scope:local data:string +@659 = .sdata2:0x80578C70; // type:object size:0x8 scope:local data:string +@660 = .sdata2:0x80578C78; // type:object size:0x8 scope:local data:string +@661 = .sdata2:0x80578C80; // type:object size:0x8 scope:local data:string +@662 = .sdata2:0x80578C88; // type:object size:0x8 scope:local data:string +@663 = .sdata2:0x80578C90; // type:object size:0x8 scope:local data:string +@664 = .sdata2:0x80578C98; // type:object size:0x8 scope:local data:string +@665 = .sdata2:0x80578CA0; // type:object size:0x6 scope:local data:string +@666 = .sdata2:0x80578CA8; // type:object size:0x8 scope:local data:string +@667 = .sdata2:0x80578CB0; // type:object size:0x7 scope:local data:string +@668 = .sdata2:0x80578CB8; // type:object size:0x8 scope:local data:string +@669 = .sdata2:0x80578CC0; // type:object size:0x8 scope:local data:string +@670 = .sdata2:0x80578CC8; // type:object size:0x8 scope:local data:string +@671 = .sdata2:0x80578CD0; // type:object size:0x8 scope:local data:string +@672 = .sdata2:0x80578CD8; // type:object size:0x8 scope:local data:string +@673 = .sdata2:0x80578CE0; // type:object size:0x8 scope:local data:string +@674 = .sdata2:0x80578CE8; // type:object size:0x6 scope:local data:string +@675 = .sdata2:0x80578CF0; // type:object size:0x8 scope:local data:string +@676 = .sdata2:0x80578CF8; // type:object size:0x8 scope:local data:string +@677 = .sdata2:0x80578D00; // type:object size:0x7 scope:local data:string +@678 = .sdata2:0x80578D08; // type:object size:0x6 scope:local data:string +@679 = .sdata2:0x80578D10; // type:object size:0x8 scope:local data:string +@680 = .sdata2:0x80578D18; // type:object size:0x5 scope:local data:string +@681 = .sdata2:0x80578D20; // type:object size:0x8 scope:local data:string +@682 = .sdata2:0x80578D28; // type:object size:0x8 scope:local data:string +@683 = .sdata2:0x80578D30; // type:object size:0x8 scope:local data:string +@684 = .sdata2:0x80578D38; // type:object size:0x6 scope:local data:string +@685 = .sdata2:0x80578D40; // type:object size:0x7 scope:local data:string +@686 = .sdata2:0x80578D48; // type:object size:0x6 scope:local data:string +@687 = .sdata2:0x80578D50; // type:object size:0x8 scope:local data:string +@688 = .sdata2:0x80578D58; // type:object size:0x6 scope:local data:string +@689 = .sdata2:0x80578D60; // type:object size:0x7 scope:local data:string +@690 = .sdata2:0x80578D68; // type:object size:0x8 scope:local data:string +@691 = .sdata2:0x80578D70; // type:object size:0x6 scope:local data:string +@692 = .sdata2:0x80578D78; // type:object size:0x8 scope:local data:string +@693 = .sdata2:0x80578D80; // type:object size:0x7 scope:local data:string +@694 = .sdata2:0x80578D88; // type:object size:0x8 scope:local data:string +@695 = .sdata2:0x80578D90; // type:object size:0x8 scope:local data:string +@696 = .sdata2:0x80578D98; // type:object size:0x3 scope:local data:string +@697 = .sdata2:0x80578DA0; // type:object size:0x8 scope:local data:string +@698 = .sdata2:0x80578DA8; // type:object size:0x6 scope:local data:string +@699 = .sdata2:0x80578DB0; // type:object size:0x7 scope:local data:string +@700 = .sdata2:0x80578DB8; // type:object size:0x6 scope:local data:string +@701 = .sdata2:0x80578DC0; // type:object size:0x7 scope:local data:string +@702 = .sdata2:0x80578DC8; // type:object size:0x6 scope:local data:string +@703 = .sdata2:0x80578DD0; // type:object size:0x5 scope:local data:string +@704 = .sdata2:0x80578DD8; // type:object size:0x6 scope:local data:string +@705 = .sdata2:0x80578DE0; // type:object size:0x7 scope:local data:string +@706 = .sdata2:0x80578DE8; // type:object size:0x7 scope:local data:string +@707 = .sdata2:0x80578DF0; // type:object size:0x6 scope:local data:string +@708 = .sdata2:0x80578DF8; // type:object size:0x8 scope:local data:string +@709 = .sdata2:0x80578E00; // type:object size:0x7 scope:local data:string +@710 = .sdata2:0x80578E08; // type:object size:0x5 scope:local data:string +@711 = .sdata2:0x80578E10; // type:object size:0x6 scope:local data:string +@712 = .sdata2:0x80578E18; // type:object size:0x6 scope:local data:string +@713 = .sdata2:0x80578E20; // type:object size:0x7 scope:local data:string +@714 = .sdata2:0x80578E28; // type:object size:0x5 scope:local data:string +@715 = .sdata2:0x80578E30; // type:object size:0x5 scope:local data:string +@716 = .sdata2:0x80578E38; // type:object size:0x6 scope:local data:string +@717 = .sdata2:0x80578E40; // type:object size:0x7 scope:local data:string +@718 = .sdata2:0x80578E48; // type:object size:0x8 scope:local data:string +@719 = .sdata2:0x80578E50; // type:object size:0x8 scope:local data:string +@720 = .sdata2:0x80578E58; // type:object size:0x6 scope:local data:string +@721 = .sdata2:0x80578E60; // type:object size:0x6 scope:local data:string +@722 = .sdata2:0x80578E68; // type:object size:0x8 scope:local data:string +@723 = .sdata2:0x80578E70; // type:object size:0x7 scope:local data:string +@724 = .sdata2:0x80578E78; // type:object size:0x6 scope:local data:string +@725 = .sdata2:0x80578E80; // type:object size:0x6 scope:local data:string +@726 = .sdata2:0x80578E88; // type:object size:0x5 scope:local data:string +@727 = .sdata2:0x80578E90; // type:object size:0x8 scope:local data:string +@728 = .sdata2:0x80578E98; // type:object size:0x8 scope:local data:string +@729 = .sdata2:0x80578EA0; // type:object size:0x8 scope:local data:string +@730 = .sdata2:0x80578EA8; // type:object size:0x7 scope:local data:string +@731 = .sdata2:0x80578EB0; // type:object size:0x7 scope:local data:string +@732 = .sdata2:0x80578EB8; // type:object size:0x8 scope:local data:string +@733 = .sdata2:0x80578EC0; // type:object size:0x8 scope:local data:string +@734 = .sdata2:0x80578EC8; // type:object size:0x8 scope:local data:string +@735 = .sdata2:0x80578ED0; // type:object size:0x8 scope:local data:string +@736 = .sdata2:0x80578ED8; // type:object size:0x8 scope:local data:string +@737 = .sdata2:0x80578EE0; // type:object size:0x8 scope:local data:string +@738 = .sdata2:0x80578EE8; // type:object size:0x7 scope:local data:string +@739 = .sdata2:0x80578EF0; // type:object size:0x8 scope:local data:string +@740 = .sdata2:0x80578EF8; // type:object size:0x8 scope:local data:string +@741 = .sdata2:0x80578F00; // type:object size:0x8 scope:local data:string +@742 = .sdata2:0x80578F08; // type:object size:0x8 scope:local data:string +@743 = .sdata2:0x80578F10; // type:object size:0x6 scope:local data:string +@744 = .sdata2:0x80578F18; // type:object size:0x6 scope:local data:string +@745 = .sdata2:0x80578F20; // type:object size:0x8 scope:local data:string +@746 = .sdata2:0x80578F28; // type:object size:0x8 scope:local data:string +@747 = .sdata2:0x80578F30; // type:object size:0x8 scope:local data:string +@748 = .sdata2:0x80578F38; // type:object size:0x6 scope:local data:string +@749 = .sdata2:0x80578F40; // type:object size:0x7 scope:local data:string +@750 = .sdata2:0x80578F48; // type:object size:0x8 scope:local data:string +@751 = .sdata2:0x80578F50; // type:object size:0x7 scope:local data:string +@752 = .sdata2:0x80578F58; // type:object size:0x5 scope:local data:string +@753 = .sdata2:0x80578F60; // type:object size:0x7 scope:local data:string +@754 = .sdata2:0x80578F68; // type:object size:0x8 scope:local data:string +@755 = .sdata2:0x80578F70; // type:object size:0x7 scope:local data:string +@756 = .sdata2:0x80578F78; // type:object size:0x7 scope:local data:string +@757 = .sdata2:0x80578F80; // type:object size:0x8 scope:local data:string +@758 = .sdata2:0x80578F88; // type:object size:0x8 scope:local data:string +@759 = .sdata2:0x80578F90; // type:object size:0x8 scope:local data:string +@760 = .sdata2:0x80578F98; // type:object size:0x7 scope:local data:string +@761 = .sdata2:0x80578FA0; // type:object size:0x8 scope:local data:string +@762 = .sdata2:0x80578FA8; // type:object size:0x8 scope:local data:string +@763 = .sdata2:0x80578FB0; // type:object size:0x8 scope:local data:string +@764 = .sdata2:0x80578FB8; // type:object size:0x8 scope:local data:string +@765 = .sdata2:0x80578FC0; // type:object size:0x8 scope:local data:string +@766 = .sdata2:0x80578FC8; // type:object size:0x8 scope:local data:string +@767 = .sdata2:0x80578FD0; // type:object size:0x8 scope:local data:string +@768 = .sdata2:0x80578FD8; // type:object size:0x6 scope:local data:string +@769 = .sdata2:0x80578FE0; // type:object size:0x8 scope:local data:string +@770 = .sdata2:0x80578FE8; // type:object size:0x6 scope:local data:string +@771 = .sdata2:0x80578FF0; // type:object size:0x8 scope:local data:string +@772 = .sdata2:0x80578FF8; // type:object size:0x5 scope:local data:string +@773 = .sdata2:0x80579000; // type:object size:0x7 scope:local data:string +@774 = .sdata2:0x80579008; // type:object size:0x8 scope:local data:string +@775 = .sdata2:0x80579010; // type:object size:0x8 scope:local data:string +@776 = .sdata2:0x80579018; // type:object size:0x8 scope:local data:string +@777 = .sdata2:0x80579020; // type:object size:0x8 scope:local data:string +@778 = .sdata2:0x80579028; // type:object size:0x7 scope:local data:string +@779 = .sdata2:0x80579030; // type:object size:0x8 scope:local data:string +@780 = .sdata2:0x80579038; // type:object size:0x8 scope:local data:string +@781 = .sdata2:0x80579040; // type:object size:0x8 scope:local data:string +@782 = .sdata2:0x80579048; // type:object size:0x8 scope:local data:string +@783 = .sdata2:0x80579050; // type:object size:0x7 scope:local data:string +@784 = .sdata2:0x80579058; // type:object size:0x8 scope:local data:string +@785 = .sdata2:0x80579060; // type:object size:0x8 scope:local data:string +@786 = .sdata2:0x80579068; // type:object size:0x4 scope:local data:string +@787 = .sdata2:0x80579070; // type:object size:0x8 scope:local data:string +@788 = .sdata2:0x80579078; // type:object size:0x7 scope:local data:string +@789 = .sdata2:0x80579080; // type:object size:0x6 scope:local data:string +@790 = .sdata2:0x80579088; // type:object size:0x7 scope:local data:string +@791 = .sdata2:0x80579090; // type:object size:0x5 scope:local data:string +@792 = .sdata2:0x80579098; // type:object size:0x6 scope:local data:string +@793 = .sdata2:0x805790A0; // type:object size:0x8 scope:local data:string +@794 = .sdata2:0x805790A8; // type:object size:0x8 scope:local data:string +@795 = .sdata2:0x805790B0; // type:object size:0x8 scope:local data:string +@796 = .sdata2:0x805790B8; // type:object size:0x8 scope:local data:string +@797 = .sdata2:0x805790C0; // type:object size:0x8 scope:local data:string +@798 = .sdata2:0x805790C8; // type:object size:0x8 scope:local data:string +@799 = .sdata2:0x805790D0; // type:object size:0x5 scope:local data:string +@800 = .sdata2:0x805790D8; // type:object size:0x7 scope:local data:string +@801 = .sdata2:0x805790E0; // type:object size:0x7 scope:local data:string +@802 = .sdata2:0x805790E8; // type:object size:0x7 scope:local data:string +@803 = .sdata2:0x805790F0; // type:object size:0x8 scope:local data:string +@804 = .sdata2:0x805790F8; // type:object size:0x8 scope:local data:string +@805 = .sdata2:0x80579100; // type:object size:0x8 scope:local data:string +@806 = .sdata2:0x80579108; // type:object size:0x8 scope:local data:string +@807 = .sdata2:0x80579110; // type:object size:0x8 scope:local data:string +@808 = .sdata2:0x80579118; // type:object size:0x8 scope:local data:string +@809 = .sdata2:0x80579120; // type:object size:0x8 scope:local data:string +@810 = .sdata2:0x80579128; // type:object size:0x8 scope:local data:string +@811 = .sdata2:0x80579130; // type:object size:0x8 scope:local data:string +@812 = .sdata2:0x80579138; // type:object size:0x8 scope:local data:string +@813 = .sdata2:0x80579140; // type:object size:0x7 scope:local data:string +@814 = .sdata2:0x80579148; // type:object size:0x7 scope:local data:string +@815 = .sdata2:0x80579150; // type:object size:0x8 scope:local data:string +@816 = .sdata2:0x80579158; // type:object size:0x6 scope:local data:string +@817 = .sdata2:0x80579160; // type:object size:0x7 scope:local data:string +@818 = .sdata2:0x80579168; // type:object size:0x6 scope:local data:string +@819 = .sdata2:0x80579170; // type:object size:0x7 scope:local data:string +@820 = .sdata2:0x80579178; // type:object size:0x5 scope:local data:string +@821 = .sdata2:0x80579180; // type:object size:0x8 scope:local data:string +@822 = .sdata2:0x80579188; // type:object size:0x8 scope:local data:string +@823 = .sdata2:0x80579190; // type:object size:0x7 scope:local data:string +@824 = .sdata2:0x80579198; // type:object size:0x8 scope:local data:string +@825 = .sdata2:0x805791A0; // type:object size:0x8 scope:local data:string +@826 = .sdata2:0x805791A8; // type:object size:0x6 scope:local data:string +@827 = .sdata2:0x805791B0; // type:object size:0x8 scope:local data:string +@828 = .sdata2:0x805791B8; // type:object size:0x6 scope:local data:string +@829 = .sdata2:0x805791C0; // type:object size:0x8 scope:local data:string +@830 = .sdata2:0x805791C8; // type:object size:0x8 scope:local data:string +@831 = .sdata2:0x805791D0; // type:object size:0x8 scope:local data:string +@832 = .sdata2:0x805791D8; // type:object size:0x8 scope:local data:string +@833 = .sdata2:0x805791E0; // type:object size:0x6 scope:local data:string +@834 = .sdata2:0x805791E8; // type:object size:0x7 scope:local data:string +@835 = .sdata2:0x805791F0; // type:object size:0x8 scope:local data:string +@836 = .sdata2:0x805791F8; // type:object size:0x6 scope:local data:string +@837 = .sdata2:0x80579200; // type:object size:0x7 scope:local data:string +@838 = .sdata2:0x80579208; // type:object size:0x5 scope:local data:string lbl_80579210 = .sdata2:0x80579210; // type:object size:0x4 align:4 data:float lbl_80579214 = .sdata2:0x80579214; // type:object size:0x4 align:4 data:float lbl_80579218 = .sdata2:0x80579218; // type:object size:0x4 align:4 data:float @@ -48375,11 +48373,11 @@ lbl_8057D358 = .sdata2:0x8057D358; // type:object size:0x4 align:4 data:float lbl_8057D35C = .sdata2:0x8057D35C; // type:object size:0x4 align:4 data:float lbl_8057D360 = .sdata2:0x8057D360; // type:object size:0x4 align:4 data:float lbl_8057D364 = .sdata2:0x8057D364; // type:object size:0x4 align:4 data:float -lbl_8057D368 = .sdata2:0x8057D368; // type:object size:0x4 align:4 data:float -lbl_8057D36C = .sdata2:0x8057D36C; // type:object size:0x4 align:4 data:float -lbl_8057D370 = .sdata2:0x8057D370; // type:object size:0x4 align:4 data:float -lbl_8057D374 = .sdata2:0x8057D374; // type:object size:0x4 align:4 data:float -lbl_8057D378 = .sdata2:0x8057D378; // type:object size:0x4 align:4 data:float +@7826 = .sdata2:0x8057D368; // type:object size:0x4 scope:local align:4 data:float +@7827 = .sdata2:0x8057D36C; // type:object size:0x4 scope:local align:4 data:float +@7828 = .sdata2:0x8057D370; // type:object size:0x4 scope:local align:4 data:float +@7829 = .sdata2:0x8057D374; // type:object size:0x4 scope:local align:4 data:float +@7830 = .sdata2:0x8057D378; // type:object size:0x4 scope:local align:4 data:float lbl_8057D380 = .sdata2:0x8057D380; // type:object size:0x4 align:4 data:float lbl_8057D384 = .sdata2:0x8057D384; // type:object size:0x4 align:4 data:float lbl_8057D388 = .sdata2:0x8057D388; // type:object size:0x4 align:4 data:float @@ -48392,22 +48390,22 @@ lbl_8057D3A4 = .sdata2:0x8057D3A4; // type:object size:0x4 align:4 data:float lbl_8057D3A8 = .sdata2:0x8057D3A8; // type:object size:0x4 align:4 data:float lbl_8057D3AC = .sdata2:0x8057D3AC; // type:object size:0x4 align:4 data:float lbl_8057D3B0 = .sdata2:0x8057D3B0; // type:object size:0x4 align:4 data:float -lbl_8057D3B8 = .sdata2:0x8057D3B8; // type:object size:0x4 align:4 data:float -lbl_8057D3BC = .sdata2:0x8057D3BC; // type:object size:0x4 align:4 data:float -lbl_8057D3C0 = .sdata2:0x8057D3C0; // type:object size:0x4 align:4 data:float -lbl_8057D3C4 = .sdata2:0x8057D3C4; // type:object size:0x4 align:4 data:float -lbl_8057D3C8 = .sdata2:0x8057D3C8; // type:object size:0x4 align:4 data:float -lbl_8057D3CC = .sdata2:0x8057D3CC; // type:object size:0x4 align:4 data:float -lbl_8057D3D0 = .sdata2:0x8057D3D0; // type:object size:0x4 align:4 data:float -lbl_8057D3D4 = .sdata2:0x8057D3D4; // type:object size:0x4 align:4 data:float -lbl_8057D3D8 = .sdata2:0x8057D3D8; // type:object size:0x4 align:4 data:float -lbl_8057D3DC = .sdata2:0x8057D3DC; // type:object size:0x4 align:4 data:float -lbl_8057D3E0 = .sdata2:0x8057D3E0; // type:object size:0x4 align:4 data:float -lbl_8057D3E4 = .sdata2:0x8057D3E4; // type:object size:0x4 align:4 data:float -lbl_8057D3E8 = .sdata2:0x8057D3E8; // type:object size:0x4 align:4 data:float -lbl_8057D3EC = .sdata2:0x8057D3EC; // type:object size:0x4 align:4 data:float -lbl_8057D3F0 = .sdata2:0x8057D3F0; // type:object size:0x4 align:4 data:float -lbl_8057D3F4 = .sdata2:0x8057D3F4; // type:object size:0x4 align:4 data:float +@8273 = .sdata2:0x8057D3B8; // type:object size:0x4 scope:local align:4 data:float +@8274 = .sdata2:0x8057D3BC; // type:object size:0x4 scope:local align:4 data:float +@8275 = .sdata2:0x8057D3C0; // type:object size:0x4 scope:local align:4 data:float +@8276 = .sdata2:0x8057D3C4; // type:object size:0x4 scope:local align:4 data:float +@8344 = .sdata2:0x8057D3C8; // type:object size:0x4 scope:local align:4 data:float +@8345 = .sdata2:0x8057D3CC; // type:object size:0x4 scope:local align:4 data:float +@8346 = .sdata2:0x8057D3D0; // type:object size:0x4 scope:local align:4 data:float +@8347 = .sdata2:0x8057D3D4; // type:object size:0x4 scope:local align:4 data:float +@8348 = .sdata2:0x8057D3D8; // type:object size:0x4 scope:local align:4 data:float +@8349 = .sdata2:0x8057D3DC; // type:object size:0x4 scope:local align:4 data:float +@8364 = .sdata2:0x8057D3E0; // type:object size:0x4 scope:local align:4 data:float +@8365 = .sdata2:0x8057D3E4; // type:object size:0x4 scope:local align:4 data:float +@8485 = .sdata2:0x8057D3E8; // type:object size:0x4 scope:local align:4 data:float +@8486 = .sdata2:0x8057D3EC; // type:object size:0x4 scope:local align:4 data:float +@8487 = .sdata2:0x8057D3F0; // type:object size:0x4 scope:local align:4 data:float +@8488 = .sdata2:0x8057D3F4; // type:object size:0x4 scope:local align:4 data:float lbl_8057D3F8 = .sdata2:0x8057D3F8; // type:object size:0x4 align:4 data:float lbl_8057D3FC = .sdata2:0x8057D3FC; // type:object size:0x4 align:4 data:float lbl_8057D400 = .sdata2:0x8057D400; // type:object size:0x4 align:4 data:float @@ -48611,12 +48609,12 @@ lbl_8057D90C = .sdata2:0x8057D90C; // type:object size:0x4 align:4 data:float lbl_8057D910 = .sdata2:0x8057D910; // type:object size:0x4 align:4 data:float lbl_8057D914 = .sdata2:0x8057D914; // type:object size:0x4 align:4 data:float lbl_8057D918 = .sdata2:0x8057D918; // type:object size:0x4 align:4 data:float -lbl_8057D920 = .sdata2:0x8057D920; // type:object size:0x8 align:8 data:double -lbl_8057D928 = .sdata2:0x8057D928; // type:object size:0x4 align:4 data:float -lbl_8057D92C = .sdata2:0x8057D92C; // type:object size:0x4 align:4 data:float -lbl_8057D930 = .sdata2:0x8057D930; // type:object size:0x4 align:4 data:float -lbl_8057D938 = .sdata2:0x8057D938; // type:object size:0x4 align:4 data:float -lbl_8057D93C = .sdata2:0x8057D93C; // type:object size:0x4 align:4 data:float +@2743 = .sdata2:0x8057D920; // type:object size:0x8 scope:local align:8 data:double +@2762 = .sdata2:0x8057D928; // type:object size:0x4 scope:local align:4 data:float +@2763 = .sdata2:0x8057D92C; // type:object size:0x4 scope:local align:4 data:float +@2767 = .sdata2:0x8057D930; // type:object size:0x4 scope:local align:4 data:float +@1614 = .sdata2:0x8057D938; // type:object size:0x4 scope:local align:4 data:float +@1615 = .sdata2:0x8057D93C; // type:object size:0x4 scope:local align:4 data:float lbl_8057D940 = .sdata2:0x8057D940; // type:object size:0x4 align:4 data:float lbl_8057D944 = .sdata2:0x8057D944; // type:object size:0x4 align:4 data:float lbl_8057D948 = .sdata2:0x8057D948; // type:object size:0x4 align:4 data:float @@ -49199,9 +49197,9 @@ lbl_8057E5B8 = .sdata2:0x8057E5B8; // type:object size:0x4 align:4 data:float lbl_8057E5BC = .sdata2:0x8057E5BC; // type:object size:0x4 align:4 data:float lbl_8057E5C0 = .sdata2:0x8057E5C0; // type:object size:0x4 data:4byte lbl_8057E5C4 = .sdata2:0x8057E5C4; // type:object size:0x4 align:4 data:float -lbl_8057E5C8 = .sdata2:0x8057E5C8; // type:object size:0x4 data:4byte -lbl_8057E5CC = .sdata2:0x8057E5CC; // type:object size:0x4 data:4byte -lbl_8057E5D0 = .sdata2:0x8057E5D0; // type:object size:0x8 data:4byte +sNumPlayers__22dSndControlPlayerMgr_c = .sdata2:0x8057E5C8; // type:object size:0x4 data:4byte +sPlayerMax__22dSndControlPlayerMgr_c = .sdata2:0x8057E5CC; // type:object size:0x4 data:4byte +sEventMuteFlagsMask__15dSndPlayerMgr_c = .sdata2:0x8057E5D0; // type:object size:0x8 data:4byte lbl_8057E5D8 = .sdata2:0x8057E5D8; // type:object size:0x4 align:4 data:float lbl_8057E5DC = .sdata2:0x8057E5DC; // type:object size:0x4 align:4 data:float lbl_8057E5E0 = .sdata2:0x8057E5E0; // type:object size:0x8 align:8 data:double @@ -49637,162 +49635,162 @@ norm_epsilon__Q34nw4r3g3d26@unnamed@g3d_calcview_cpp@ = .sdata2:0x8057EDF0; // t @11135 = .sdata2:0x8057EEE4; // type:object size:0x4 scope:local align:4 data:float @11136 = .sdata2:0x8057EEE8; // type:object size:0x4 scope:local align:4 data:float @11190 = .sdata2:0x8057EEF0; // type:object size:0x4 scope:local align:4 data:float -lbl_8057EEF8 = .sdata2:0x8057EEF8; // type:object size:0x4 align:4 data:float -lbl_8057EEFC = .sdata2:0x8057EEFC; // type:object size:0x4 align:4 data:float -lbl_8057EF00 = .sdata2:0x8057EF00; // type:object size:0x8 align:8 data:double -lbl_8057EF08 = .sdata2:0x8057EF08; // type:object size:0x8 align:8 data:double -lbl_8057EF10 = .sdata2:0x8057EF10; // type:object size:0x4 align:4 data:float -lbl_8057EF14 = .sdata2:0x8057EF14; // type:object size:0x4 align:4 data:float -lbl_8057EF18 = .sdata2:0x8057EF18; // type:object size:0x4 align:4 data:float -lbl_8057EF1C = .sdata2:0x8057EF1C; // type:object size:0x4 align:4 data:float -lbl_8057EF20 = .sdata2:0x8057EF20; // type:object size:0x8 align:8 data:double -lbl_8057EF28 = .sdata2:0x8057EF28; // type:object size:0x4 align:4 data:float -lbl_8057EF2C = .sdata2:0x8057EF2C; // type:object size:0x4 align:4 data:float -lbl_8057EF30 = .sdata2:0x8057EF30; // type:object size:0x4 align:4 data:float -lbl_8057EF34 = .sdata2:0x8057EF34; // type:object size:0x4 align:4 data:float -lbl_8057EF38 = .sdata2:0x8057EF38; // type:object size:0x4 align:4 data:float -lbl_8057EF40 = .sdata2:0x8057EF40; // type:object size:0x8 align:8 data:double -lbl_8057EF48 = .sdata2:0x8057EF48; // type:object size:0x4 align:4 data:float -lbl_8057EF4C = .sdata2:0x8057EF4C; // type:object size:0x4 align:4 data:float -lbl_8057EF50 = .sdata2:0x8057EF50; // type:object size:0x4 align:4 data:float -lbl_8057EF54 = .sdata2:0x8057EF54; // type:object size:0x4 align:4 data:float -lbl_8057EF58 = .sdata2:0x8057EF58; // type:object size:0x4 align:4 data:float -lbl_8057EF5C = .sdata2:0x8057EF5C; // type:object size:0x4 align:4 data:float -lbl_8057EF60 = .sdata2:0x8057EF60; // type:object size:0x4 align:4 data:float -lbl_8057EF68 = .sdata2:0x8057EF68; // type:object size:0x8 align:8 data:double -lbl_8057EF70 = .sdata2:0x8057EF70; // type:object size:0x8 align:8 data:double -lbl_8057EF78 = .sdata2:0x8057EF78; // type:object size:0x4 align:4 data:float -lbl_8057EF80 = .sdata2:0x8057EF80; // type:object size:0x4 align:4 data:float -lbl_8057EF84 = .sdata2:0x8057EF84; // type:object size:0x4 align:4 data:float -lbl_8057EF88 = .sdata2:0x8057EF88; // type:object size:0x4 align:4 data:float -lbl_8057EF8C = .sdata2:0x8057EF8C; // type:object size:0x4 align:4 data:float -lbl_8057EF90 = .sdata2:0x8057EF90; // type:object size:0x8 align:8 data:double -lbl_8057EF98 = .sdata2:0x8057EF98; // type:object size:0x8 align:8 data:double -lbl_8057EFA0 = .sdata2:0x8057EFA0; // type:object size:0x4 align:4 data:float -lbl_8057EFA8 = .sdata2:0x8057EFA8; // type:object size:0x4 align:4 data:float -lbl_8057EFAC = .sdata2:0x8057EFAC; // type:object size:0x4 align:4 data:float -lbl_8057EFB0 = .sdata2:0x8057EFB0; // type:object size:0x4 align:4 data:float -lbl_8057EFB4 = .sdata2:0x8057EFB4; // type:object size:0x4 align:4 data:float -lbl_8057EFB8 = .sdata2:0x8057EFB8; // type:object size:0x4 align:4 data:float -lbl_8057EFC0 = .sdata2:0x8057EFC0; // type:object size:0x8 align:8 data:double -lbl_8057EFC8 = .sdata2:0x8057EFC8; // type:object size:0x8 align:8 data:double -lbl_8057EFD0 = .sdata2:0x8057EFD0; // type:object size:0x4 align:4 data:float -lbl_8057EFD4 = .sdata2:0x8057EFD4; // type:object size:0x4 align:4 data:float -lbl_8057EFD8 = .sdata2:0x8057EFD8; // type:object size:0x4 align:4 data:float -lbl_8057EFDC = .sdata2:0x8057EFDC; // type:object size:0x4 align:4 data:float -lbl_8057EFE0 = .sdata2:0x8057EFE0; // type:object size:0x4 align:4 data:float -lbl_8057EFE8 = .sdata2:0x8057EFE8; // type:object size:0x8 align:8 data:double -lbl_8057EFF0 = .sdata2:0x8057EFF0; // type:object size:0x4 align:4 data:float -lbl_8057EFF4 = .sdata2:0x8057EFF4; // type:object size:0x4 align:4 data:float -lbl_8057EFF8 = .sdata2:0x8057EFF8; // type:object size:0x4 align:4 data:float -lbl_8057EFFC = .sdata2:0x8057EFFC; // type:object size:0x4 align:4 data:float -lbl_8057F000 = .sdata2:0x8057F000; // type:object size:0x4 align:4 data:float -lbl_8057F004 = .sdata2:0x8057F004; // type:object size:0x4 align:4 data:float -lbl_8057F008 = .sdata2:0x8057F008; // type:object size:0x4 align:4 data:float -lbl_8057F00C = .sdata2:0x8057F00C; // type:object size:0x4 align:4 data:float -lbl_8057F010 = .sdata2:0x8057F010; // type:object size:0x4 align:4 data:float -lbl_8057F014 = .sdata2:0x8057F014; // type:object size:0x4 align:4 data:float -lbl_8057F018 = .sdata2:0x8057F018; // type:object size:0x4 align:4 data:float -lbl_8057F01C = .sdata2:0x8057F01C; // type:object size:0x4 align:4 data:float -lbl_8057F020 = .sdata2:0x8057F020; // type:object size:0x4 align:4 data:float -lbl_8057F028 = .sdata2:0x8057F028; // type:object size:0x8 align:8 data:double -lbl_8057F030 = .sdata2:0x8057F030; // type:object size:0x4 align:4 data:float -lbl_8057F034 = .sdata2:0x8057F034; // type:object size:0x4 align:4 data:float -lbl_8057F038 = .sdata2:0x8057F038; // type:object size:0x4 align:4 data:float -lbl_8057F040 = .sdata2:0x8057F040; // type:object size:0x8 align:8 data:double -lbl_8057F048 = .sdata2:0x8057F048; // type:object size:0x4 align:4 data:float -lbl_8057F04C = .sdata2:0x8057F04C; // type:object size:0x4 align:4 data:float -lbl_8057F050 = .sdata2:0x8057F050; // type:object size:0x4 align:4 data:float -lbl_8057F054 = .sdata2:0x8057F054; // type:object size:0x4 align:4 data:float -lbl_8057F058 = .sdata2:0x8057F058; // type:object size:0x8 align:8 data:double -lbl_8057F060 = .sdata2:0x8057F060; // type:object size:0x8 align:8 data:double -lbl_8057F068 = .sdata2:0x8057F068; // type:object size:0x4 align:4 data:float -lbl_8057F06C = .sdata2:0x8057F06C; // type:object size:0x4 align:4 data:float -lbl_8057F070 = .sdata2:0x8057F070; // type:object size:0x8 align:8 data:double -lbl_8057F078 = .sdata2:0x8057F078; // type:object size:0x4 align:4 data:float -lbl_8057F080 = .sdata2:0x8057F080; // type:object size:0x4 align:4 data:float -lbl_8057F084 = .sdata2:0x8057F084; // type:object size:0x4 align:4 data:float -lbl_8057F088 = .sdata2:0x8057F088; // type:object size:0x4 align:4 data:float -lbl_8057F08C = .sdata2:0x8057F08C; // type:object size:0x4 align:4 data:float -lbl_8057F090 = .sdata2:0x8057F090; // type:object size:0x4 align:4 data:float -lbl_8057F094 = .sdata2:0x8057F094; // type:object size:0x4 align:4 data:float -lbl_8057F098 = .sdata2:0x8057F098; // type:object size:0x4 align:4 data:float -lbl_8057F0A0 = .sdata2:0x8057F0A0; // type:object size:0x8 align:8 data:double -lbl_8057F0A8 = .sdata2:0x8057F0A8; // type:object size:0x8 align:8 data:double -lbl_8057F0B0 = .sdata2:0x8057F0B0; // type:object size:0x4 align:4 data:float -lbl_8057F0B8 = .sdata2:0x8057F0B8; // type:object size:0x4 align:4 data:float -lbl_8057F0BC = .sdata2:0x8057F0BC; // type:object size:0x4 align:4 data:float -lbl_8057F0C0 = .sdata2:0x8057F0C0; // type:object size:0x4 align:4 data:float -lbl_8057F0C8 = .sdata2:0x8057F0C8; // type:object size:0x8 align:8 data:double -lbl_8057F0D0 = .sdata2:0x8057F0D0; // type:object size:0x8 align:8 data:double -lbl_8057F0D8 = .sdata2:0x8057F0D8; // type:object size:0x4 align:4 data:float -lbl_8057F0DC = .sdata2:0x8057F0DC; // type:object size:0x4 align:4 data:float -lbl_8057F0E0 = .sdata2:0x8057F0E0; // type:object size:0x4 align:4 data:float -lbl_8057F0E4 = .sdata2:0x8057F0E4; // type:object size:0x4 align:4 data:float -lbl_8057F0E8 = .sdata2:0x8057F0E8; // type:object size:0x4 align:4 data:float -lbl_8057F0EC = .sdata2:0x8057F0EC; // type:object size:0x4 align:4 data:float -lbl_8057F0F0 = .sdata2:0x8057F0F0; // type:object size:0x4 align:4 data:float -lbl_8057F0F4 = .sdata2:0x8057F0F4; // type:object size:0x4 align:4 data:float -lbl_8057F0F8 = .sdata2:0x8057F0F8; // type:object size:0x4 align:4 data:float -lbl_8057F0FC = .sdata2:0x8057F0FC; // type:object size:0x4 align:4 data:float -lbl_8057F100 = .sdata2:0x8057F100; // type:object size:0x4 align:4 data:float -lbl_8057F104 = .sdata2:0x8057F104; // type:object size:0x4 align:4 data:float -lbl_8057F108 = .sdata2:0x8057F108; // type:object size:0x4 align:4 data:float -lbl_8057F10C = .sdata2:0x8057F10C; // type:object size:0x4 align:4 data:float -lbl_8057F110 = .sdata2:0x8057F110; // type:object size:0x4 align:4 data:float -lbl_8057F118 = .sdata2:0x8057F118; // type:object size:0x4 align:4 data:float -lbl_8057F11C = .sdata2:0x8057F11C; // type:object size:0x4 align:4 data:float -lbl_8057F120 = .sdata2:0x8057F120; // type:object size:0x4 align:4 data:float -lbl_8057F128 = .sdata2:0x8057F128; // type:object size:0x4 align:4 data:float -lbl_8057F12C = .sdata2:0x8057F12C; // type:object size:0x4 align:4 data:float -lbl_8057F130 = .sdata2:0x8057F130; // type:object size:0x4 align:4 data:float -lbl_8057F134 = .sdata2:0x8057F134; // type:object size:0x4 align:4 data:float -lbl_8057F138 = .sdata2:0x8057F138; // type:object size:0x4 align:4 data:float -lbl_8057F140 = .sdata2:0x8057F140; // type:object size:0x8 align:8 data:double -lbl_8057F148 = .sdata2:0x8057F148; // type:object size:0x4 align:4 data:float -lbl_8057F14C = .sdata2:0x8057F14C; // type:object size:0x4 align:4 data:float -lbl_8057F150 = .sdata2:0x8057F150; // type:object size:0x4 align:4 data:float -lbl_8057F158 = .sdata2:0x8057F158; // type:object size:0x8 align:8 data:double -lbl_8057F160 = .sdata2:0x8057F160; // type:object size:0x8 align:8 data:double -lbl_8057F168 = .sdata2:0x8057F168; // type:object size:0x4 align:4 data:float -lbl_8057F16C = .sdata2:0x8057F16C; // type:object size:0x4 align:4 data:float -lbl_8057F170 = .sdata2:0x8057F170; // type:object size:0x4 align:4 data:float -lbl_8057F178 = .sdata2:0x8057F178; // type:object size:0x4 align:4 data:float -lbl_8057F17C = .sdata2:0x8057F17C; // type:object size:0x4 align:4 data:float -lbl_8057F180 = .sdata2:0x8057F180; // type:object size:0x8 align:8 data:double -lbl_8057F188 = .sdata2:0x8057F188; // type:object size:0x4 align:4 data:float -lbl_8057F18C = .sdata2:0x8057F18C; // type:object size:0x4 align:4 data:float -lbl_8057F190 = .sdata2:0x8057F190; // type:object size:0x4 align:4 data:float -lbl_8057F194 = .sdata2:0x8057F194; // type:object size:0x4 align:4 data:float -lbl_8057F198 = .sdata2:0x8057F198; // type:object size:0x4 align:4 data:float -lbl_8057F19C = .sdata2:0x8057F19C; // type:object size:0x4 align:4 data:float -lbl_8057F1A0 = .sdata2:0x8057F1A0; // type:object size:0x4 align:4 data:float -lbl_8057F1A4 = .sdata2:0x8057F1A4; // type:object size:0x4 align:4 data:float -lbl_8057F1A8 = .sdata2:0x8057F1A8; // type:object size:0x4 align:4 data:float -lbl_8057F1AC = .sdata2:0x8057F1AC; // type:object size:0x4 align:4 data:float -lbl_8057F1B0 = .sdata2:0x8057F1B0; // type:object size:0x4 align:4 data:float -lbl_8057F1B4 = .sdata2:0x8057F1B4; // type:object size:0x4 align:4 data:float -lbl_8057F1B8 = .sdata2:0x8057F1B8; // type:object size:0x4 align:4 data:float -lbl_8057F1C0 = .sdata2:0x8057F1C0; // type:object size:0x4 align:4 data:float -lbl_8057F1C4 = .sdata2:0x8057F1C4; // type:object size:0x4 align:4 data:float -lbl_8057F1C8 = .sdata2:0x8057F1C8; // type:object size:0x4 align:4 data:float -lbl_8057F1CC = .sdata2:0x8057F1CC; // type:object size:0x4 align:4 data:float -lbl_8057F1D0 = .sdata2:0x8057F1D0; // type:object size:0x4 align:4 data:float -lbl_8057F1D4 = .sdata2:0x8057F1D4; // type:object size:0x4 align:4 data:float -lbl_8057F1D8 = .sdata2:0x8057F1D8; // type:object size:0x4 align:4 data:float -lbl_8057F1DC = .sdata2:0x8057F1DC; // type:object size:0x4 align:4 data:float -lbl_8057F1E0 = .sdata2:0x8057F1E0; // type:object size:0x4 align:4 data:float -lbl_8057F1E4 = .sdata2:0x8057F1E4; // type:object size:0x4 align:4 data:float -lbl_8057F1E8 = .sdata2:0x8057F1E8; // type:object size:0x4 align:4 data:float -lbl_8057F1EC = .sdata2:0x8057F1EC; // type:object size:0x4 align:4 data:float -lbl_8057F1F0 = .sdata2:0x8057F1F0; // type:object size:0x4 align:4 data:float -lbl_8057F1F8 = .sdata2:0x8057F1F8; // type:object size:0x4 align:4 data:float -lbl_8057F1FC = .sdata2:0x8057F1FC; // type:object size:0x4 align:4 data:float -lbl_8057F200 = .sdata2:0x8057F200; // type:object size:0x4 align:4 data:float -lbl_8057F204 = .sdata2:0x8057F204; // type:object size:0x4 align:4 data:float -lbl_8057F208 = .sdata2:0x8057F208; // type:object size:0x4 align:4 data:float -lbl_8057F210 = .sdata2:0x8057F210; // type:object size:0x8 align:8 data:double -lbl_8057F218 = .sdata2:0x8057F218; // type:object size:0x8 align:8 data:double +@4352 = .sdata2:0x8057EEF8; // type:object size:0x4 scope:local align:4 data:float +@4353 = .sdata2:0x8057EEFC; // type:object size:0x4 scope:local align:4 data:float +@4474 = .sdata2:0x8057EF00; // type:object size:0x8 scope:local align:8 data:double +@4600 = .sdata2:0x8057EF08; // type:object size:0x8 scope:local align:8 data:double +@5006 = .sdata2:0x8057EF10; // type:object size:0x4 scope:local align:4 data:float +@5007 = .sdata2:0x8057EF14; // type:object size:0x4 scope:local align:4 data:float +@2457 = .sdata2:0x8057EF18; // type:object size:0x4 scope:local align:4 data:float +@2458 = .sdata2:0x8057EF1C; // type:object size:0x4 scope:local align:4 data:float +@2523 = .sdata2:0x8057EF20; // type:object size:0x8 scope:local align:8 data:double +@2626 = .sdata2:0x8057EF28; // type:object size:0x4 scope:local align:4 data:float +@3157 = .sdata2:0x8057EF2C; // type:object size:0x4 scope:local align:4 data:float +@5196 = .sdata2:0x8057EF30; // type:object size:0x4 scope:local align:4 data:float +@5197 = .sdata2:0x8057EF34; // type:object size:0x4 scope:local align:4 data:float +@5198 = .sdata2:0x8057EF38; // type:object size:0x4 scope:local align:4 data:float +@5201 = .sdata2:0x8057EF40; // type:object size:0x8 scope:local align:8 data:double +@5425 = .sdata2:0x8057EF48; // type:object size:0x4 scope:local align:4 data:float +@5426 = .sdata2:0x8057EF4C; // type:object size:0x4 scope:local align:4 data:float +@5427 = .sdata2:0x8057EF50; // type:object size:0x4 scope:local align:4 data:float +@5467 = .sdata2:0x8057EF54; // type:object size:0x4 scope:local align:4 data:float +@1517 = .sdata2:0x8057EF58; // type:object size:0x4 scope:local align:4 data:float +@1518 = .sdata2:0x8057EF5C; // type:object size:0x4 scope:local align:4 data:float +@1519 = .sdata2:0x8057EF60; // type:object size:0x4 scope:local align:4 data:float +@1524 = .sdata2:0x8057EF68; // type:object size:0x8 scope:local align:8 data:double +@1525 = .sdata2:0x8057EF70; // type:object size:0x8 scope:local align:8 data:double +@1860 = .sdata2:0x8057EF78; // type:object size:0x4 scope:local align:4 data:float +@608 = .sdata2:0x8057EF80; // type:object size:0x4 scope:local align:4 data:float +@609 = .sdata2:0x8057EF84; // type:object size:0x4 scope:local align:4 data:float +@1976 = .sdata2:0x8057EF88; // type:object size:0x4 scope:local align:4 data:float +@1977 = .sdata2:0x8057EF8C; // type:object size:0x4 scope:local align:4 data:float +@2034 = .sdata2:0x8057EF90; // type:object size:0x8 scope:local align:8 data:double +@212 = .sdata2:0x8057EF98; // type:object size:0x8 scope:local align:8 data:double +@247 = .sdata2:0x8057EFA0; // type:object size:0x4 scope:local align:4 data:float +@2816 = .sdata2:0x8057EFA8; // type:object size:0x4 scope:local align:4 data:float +@2937 = .sdata2:0x8057EFAC; // type:object size:0x4 scope:local align:4 data:float +@3086 = .sdata2:0x8057EFB0; // type:object size:0x4 scope:local align:4 data:float +@3087 = .sdata2:0x8057EFB4; // type:object size:0x4 scope:local align:4 data:float +@3088 = .sdata2:0x8057EFB8; // type:object size:0x4 scope:local align:4 data:float +@3092 = .sdata2:0x8057EFC0; // type:object size:0x8 scope:local align:8 data:double +@3093 = .sdata2:0x8057EFC8; // type:object size:0x8 scope:local align:8 data:double +VOLUME_INIT__Q44nw4r3snd6detail12EnvGenerator = .sdata2:0x8057EFD0; // type:object size:0x4 align:4 data:float +@180 = .sdata2:0x8057EFD4; // type:object size:0x4 scope:local align:4 data:float +@181 = .sdata2:0x8057EFD8; // type:object size:0x4 scope:local align:4 data:float +@189 = .sdata2:0x8057EFDC; // type:object size:0x4 scope:local align:4 data:float +@210 = .sdata2:0x8057EFE0; // type:object size:0x4 scope:local align:4 data:float +@213 = .sdata2:0x8057EFE8; // type:object size:0x8 scope:local align:8 data:double +@224 = .sdata2:0x8057EFF0; // type:object size:0x4 scope:local align:4 data:float +@225 = .sdata2:0x8057EFF4; // type:object size:0x4 scope:local align:4 data:float +@226 = .sdata2:0x8057EFF8; // type:object size:0x4 scope:local align:4 data:float +@227 = .sdata2:0x8057EFFC; // type:object size:0x4 scope:local align:4 data:float +@1730 = .sdata2:0x8057F000; // type:object size:0x4 scope:local align:4 data:float +@1731 = .sdata2:0x8057F004; // type:object size:0x4 scope:local align:4 data:float +@1732 = .sdata2:0x8057F008; // type:object size:0x4 scope:local align:4 data:float +@1733 = .sdata2:0x8057F00C; // type:object size:0x4 scope:local align:4 data:float +@1734 = .sdata2:0x8057F010; // type:object size:0x4 scope:local align:4 data:float +@1735 = .sdata2:0x8057F014; // type:object size:0x4 scope:local align:4 data:float +@94 = .sdata2:0x8057F018; // type:object size:0x4 scope:local align:4 data:float +@95 = .sdata2:0x8057F01C; // type:object size:0x4 scope:local align:4 data:float +@110 = .sdata2:0x8057F020; // type:object size:0x4 scope:local align:4 data:float +@113 = .sdata2:0x8057F028; // type:object size:0x8 scope:local align:8 data:double +@123 = .sdata2:0x8057F030; // type:object size:0x4 scope:local align:4 data:float +@124 = .sdata2:0x8057F034; // type:object size:0x4 scope:local align:4 data:float +@125 = .sdata2:0x8057F038; // type:object size:0x4 scope:local align:4 data:float +@129 = .sdata2:0x8057F040; // type:object size:0x8 scope:local align:8 data:double +@3179 = .sdata2:0x8057F048; // type:object size:0x4 scope:local align:4 data:float +@3180 = .sdata2:0x8057F04C; // type:object size:0x4 scope:local align:4 data:float +@3181 = .sdata2:0x8057F050; // type:object size:0x4 scope:local align:4 data:float +@3182 = .sdata2:0x8057F054; // type:object size:0x4 scope:local align:4 data:float +@3191 = .sdata2:0x8057F058; // type:object size:0x8 scope:local align:8 data:double +@3192 = .sdata2:0x8057F060; // type:object size:0x8 scope:local align:8 data:double +@3811 = .sdata2:0x8057F068; // type:object size:0x4 scope:local align:4 data:float +@3812 = .sdata2:0x8057F06C; // type:object size:0x4 scope:local align:4 data:float +@4051 = .sdata2:0x8057F070; // type:object size:0x8 scope:local align:8 data:double +@4321 = .sdata2:0x8057F078; // type:object size:0x4 scope:local align:4 data:float +@2980 = .sdata2:0x8057F080; // type:object size:0x4 scope:local align:4 data:float +@2981 = .sdata2:0x8057F084; // type:object size:0x4 scope:local align:4 data:float +@3311 = .sdata2:0x8057F088; // type:object size:0x4 scope:local align:4 data:float +@3312 = .sdata2:0x8057F08C; // type:object size:0x4 scope:local align:4 data:float +@3313 = .sdata2:0x8057F090; // type:object size:0x4 scope:local align:4 data:float +@3314 = .sdata2:0x8057F094; // type:object size:0x4 scope:local align:4 data:float +@3315 = .sdata2:0x8057F098; // type:object size:0x4 scope:local align:4 data:float +@3319 = .sdata2:0x8057F0A0; // type:object size:0x8 scope:local align:8 data:double +@3320 = .sdata2:0x8057F0A8; // type:object size:0x8 scope:local align:8 data:double +@4796 = .sdata2:0x8057F0B0; // type:object size:0x4 scope:local align:4 data:float +@2828 = .sdata2:0x8057F0B8; // type:object size:0x4 scope:local align:4 data:float +@2829 = .sdata2:0x8057F0BC; // type:object size:0x4 scope:local align:4 data:float +@2830 = .sdata2:0x8057F0C0; // type:object size:0x4 scope:local align:4 data:float +@2837 = .sdata2:0x8057F0C8; // type:object size:0x8 scope:local align:8 data:double +@2838 = .sdata2:0x8057F0D0; // type:object size:0x8 scope:local align:8 data:double +@2902 = .sdata2:0x8057F0D8; // type:object size:0x4 scope:local align:4 data:float +@2903 = .sdata2:0x8057F0DC; // type:object size:0x4 scope:local align:4 data:float +@2962 = .sdata2:0x8057F0E0; // type:object size:0x4 scope:local align:4 data:float +@2963 = .sdata2:0x8057F0E4; // type:object size:0x4 scope:local align:4 data:float +@2964 = .sdata2:0x8057F0E8; // type:object size:0x4 scope:local align:4 data:float +@2965 = .sdata2:0x8057F0EC; // type:object size:0x4 scope:local align:4 data:float +@2966 = .sdata2:0x8057F0F0; // type:object size:0x4 scope:local align:4 data:float +@2967 = .sdata2:0x8057F0F4; // type:object size:0x4 scope:local align:4 data:float +@2968 = .sdata2:0x8057F0F8; // type:object size:0x4 scope:local align:4 data:float +@2969 = .sdata2:0x8057F0FC; // type:object size:0x4 scope:local align:4 data:float +@2216 = .sdata2:0x8057F100; // type:object size:0x4 scope:local align:4 data:float +@2217 = .sdata2:0x8057F104; // type:object size:0x4 scope:local align:4 data:float +@2218 = .sdata2:0x8057F108; // type:object size:0x4 scope:local align:4 data:float +@2219 = .sdata2:0x8057F10C; // type:object size:0x4 scope:local align:4 data:float +@2392 = .sdata2:0x8057F110; // type:object size:0x4 scope:local align:4 data:float +@1266 = .sdata2:0x8057F118; // type:object size:0x4 scope:local align:4 data:float +@1267 = .sdata2:0x8057F11C; // type:object size:0x4 scope:local align:4 data:float +@1268 = .sdata2:0x8057F120; // type:object size:0x4 scope:local align:4 data:float +@2580 = .sdata2:0x8057F128; // type:object size:0x4 scope:local align:4 data:float +@2581 = .sdata2:0x8057F12C; // type:object size:0x4 scope:local align:4 data:float +@3454 = .sdata2:0x8057F130; // type:object size:0x4 scope:local align:4 data:float +@3455 = .sdata2:0x8057F134; // type:object size:0x4 scope:local align:4 data:float +@12402 = .sdata2:0x8057F138; // type:object size:0x4 scope:local align:4 data:float +@12410 = .sdata2:0x8057F140; // type:object size:0x8 scope:local align:8 data:double +@2452 = .sdata2:0x8057F148; // type:object size:0x4 scope:local align:4 data:float +@2453 = .sdata2:0x8057F14C; // type:object size:0x4 scope:local align:4 data:float +@5421 = .sdata2:0x8057F150; // type:object size:0x4 scope:local align:4 data:float +@5423 = .sdata2:0x8057F158; // type:object size:0x8 scope:local align:8 data:double +@5425 = .sdata2:0x8057F160; // type:object size:0x8 scope:local align:8 data:double +@5492 = .sdata2:0x8057F168; // type:object size:0x4 scope:local align:4 data:float +@5765 = .sdata2:0x8057F16C; // type:object size:0x4 scope:local align:4 data:float +@5766 = .sdata2:0x8057F170; // type:object size:0x4 scope:local align:4 data:float +@2698 = .sdata2:0x8057F178; // type:object size:0x4 scope:local align:4 data:float +@2727 = .sdata2:0x8057F17C; // type:object size:0x4 scope:local align:4 data:float +@2730 = .sdata2:0x8057F180; // type:object size:0x8 scope:local align:8 data:double +@4083 = .sdata2:0x8057F188; // type:object size:0x4 scope:local align:4 data:float +@4084 = .sdata2:0x8057F18C; // type:object size:0x4 scope:local align:4 data:float +@4815 = .sdata2:0x8057F190; // type:object size:0x4 scope:local align:4 data:float +@4816 = .sdata2:0x8057F194; // type:object size:0x4 scope:local align:4 data:float +@4817 = .sdata2:0x8057F198; // type:object size:0x4 scope:local align:4 data:float +@4818 = .sdata2:0x8057F19C; // type:object size:0x4 scope:local align:4 data:float +@4819 = .sdata2:0x8057F1A0; // type:object size:0x4 scope:local align:4 data:float +@4820 = .sdata2:0x8057F1A4; // type:object size:0x4 scope:local align:4 data:float +@4821 = .sdata2:0x8057F1A8; // type:object size:0x4 scope:local align:4 data:float +@4822 = .sdata2:0x8057F1AC; // type:object size:0x4 scope:local align:4 data:float +@5062 = .sdata2:0x8057F1B0; // type:object size:0x4 scope:local align:4 data:float +@5063 = .sdata2:0x8057F1B4; // type:object size:0x4 scope:local align:4 data:float +@5064 = .sdata2:0x8057F1B8; // type:object size:0x4 scope:local align:4 data:float +@312 = .sdata2:0x8057F1C0; // type:object size:0x4 scope:local align:4 data:float +@313 = .sdata2:0x8057F1C4; // type:object size:0x4 scope:local align:4 data:float +@314 = .sdata2:0x8057F1C8; // type:object size:0x4 scope:local align:4 data:float +@326 = .sdata2:0x8057F1CC; // type:object size:0x4 scope:local align:4 data:float +@327 = .sdata2:0x8057F1D0; // type:object size:0x4 scope:local align:4 data:float +@328 = .sdata2:0x8057F1D4; // type:object size:0x4 scope:local align:4 data:float +@366 = .sdata2:0x8057F1D8; // type:object size:0x4 scope:local align:4 data:float +@367 = .sdata2:0x8057F1DC; // type:object size:0x4 scope:local align:4 data:float +@368 = .sdata2:0x8057F1E0; // type:object size:0x4 scope:local align:4 data:float +@409 = .sdata2:0x8057F1E4; // type:object size:0x4 scope:local align:4 data:float +@410 = .sdata2:0x8057F1E8; // type:object size:0x4 scope:local align:4 data:float +@411 = .sdata2:0x8057F1EC; // type:object size:0x4 scope:local align:4 data:float +@1628 = .sdata2:0x8057F1F0; // type:object size:0x4 scope:local align:4 data:float +@2739 = .sdata2:0x8057F1F8; // type:object size:0x4 scope:local align:4 data:float +@3148 = .sdata2:0x8057F1FC; // type:object size:0x4 scope:local align:4 data:float +@3149 = .sdata2:0x8057F200; // type:object size:0x4 scope:local align:4 data:float +@3150 = .sdata2:0x8057F204; // type:object size:0x4 scope:local align:4 data:float +@3151 = .sdata2:0x8057F208; // type:object size:0x4 scope:local align:4 data:float +@3155 = .sdata2:0x8057F210; // type:object size:0x8 scope:local align:8 data:double +@3156 = .sdata2:0x8057F218; // type:object size:0x8 scope:local align:8 data:double @5330 = .sdata2:0x8057F220; // type:object size:0x4 scope:local align:4 data:float @5331 = .sdata2:0x8057F224; // type:object size:0x4 scope:local align:4 data:float @5589 = .sdata2:0x8057F228; // type:object size:0x4 scope:local align:4 data:float @@ -50335,9 +50333,9 @@ lbl_8058F1A8 = .bss:0x8058F1A8; // type:object size:0x10 data:4byte lbl_8058F1B8 = .bss:0x8058F1B8; // type:object size:0x10 align:4 data:float lbl_8058F1C8 = .bss:0x8058F1C8; // type:object size:0x28 align:4 data:float lbl_8058F1F0 = .bss:0x8058F1F0; // type:object size:0x20 data:byte -lbl_8058F210 = .bss:0x8058F210; // type:object size:0x10 -sInstance__21BlurAndPaletteManager = .bss:0x8058F220; // type:object size:0x5D70 -lbl_80594F90 = .bss:0x80594F90; // type:object size:0x10 data:4byte +@23379 = .bss:0x8058F210; // type:object size:0xC scope:local +sInstance__11dLightEnv_c = .bss:0x8058F220; // type:object size:0x5D70 +sList__13ActorLighting = .bss:0x80594F90; // type:object size:0xC data:4byte sPlayingEffectsList__14dJEffManager_c = .bss:0x80594FA0; // type:object size:0x18 data:4byte sCommonEmitterCallbacks__14dJEffManager_c = .bss:0x80594FB8; // type:object size:0x1C sShpEmitters__14dJEffManager_c = .bss:0x80594FD4; // type:object size:0x1E2C @@ -50397,7 +50395,7 @@ sRumblePreset7__9dRumble_c = .bss:0x805A07CC; // type:object size:0xC data:4byte sRumblePreset8__9dRumble_c = .bss:0x805A07D8; // type:object size:0xC data:4byte sRumblePreset9__9dRumble_c = .bss:0x805A07E4; // type:object size:0xC data:4byte sRumblePreset10__9dRumble_c = .bss:0x805A07F0; // type:object size:0xC data:4byte -@LOCAL@play__9dRumble_cFv@rumble_strings = .bss:0x805A07FC; // type:object size:0x42 scope:local data:byte +@LOCAL@execute__9dRumble_cFv@rumble_strings = .bss:0x805A07FC; // type:object size:0x42 scope:local data:byte @LOCAL@start__9dRumble_cFRC14dRumbleEntry_cUl@rumble_string = .bss:0x805A0840; // type:object size:0x21 scope:local data:byte @LOCAL@getCurrentStageDirectory__22CurrentStageArcManagerFv@sStageDirTmp = .bss:0x805A0868; // type:object size:0x40 scope:local data:byte s_roomArcTmp = .bss:0x805A08A8; // type:object size:0x20 scope:local data:byte @@ -51932,32 +51930,32 @@ sRenderMode__Q44nw4r3g3d8G3DState23@unnamed@g3d_state_cpp@ = .bss:0x80640E48; // IndMtxOpDefault__Q44nw4r3g3d8G3DState23@unnamed@g3d_state_cpp@ = .bss:0x80640E88; // type:object size:0x98 scope:local data:4byte @LOCAL@GetViewNrmMtxPtr__Q54nw4r3g3d8G3DState23@unnamed@g3d_state_cpp@19PosNrmMtxArrayStateCFUl@m = .bss:0x80640F20; // type:object size:0x24 scope:weak sTemp__Q54nw4r3g3d6detail7workmem25@unnamed@g3d_workmem_cpp@ = .bss:0x80640F80; // type:object size:0x18000 scope:local -lbl_80658F80 = .bss:0x80658F80; // type:object size:0x100 -lbl_80659080 = .bss:0x80659080; // type:object size:0x200 -lbl_80659280 = .bss:0x80659280; // type:object size:0xC -lbl_8065928C = .bss:0x8065928C; // type:object size:0x104 data:4byte -lbl_80659390 = .bss:0x80659390; // type:object size:0xC -lbl_8065939C = .bss:0x8065939C; // type:object size:0x2C data:4byte -lbl_806593C8 = .bss:0x806593C8; // type:object size:0x10 -lbl_806593D8 = .bss:0x806593D8; // type:object size:0x20 data:4byte -lbl_806593F8 = .bss:0x806593F8; // type:object size:0xC -lbl_80659404 = .bss:0x80659404; // type:object size:0xC data:4byte -lbl_80659410 = .bss:0x80659410; // type:object size:0x2D8 data:byte -lbl_806596E8 = .bss:0x806596E8; // type:object size:0x20 data:2byte -lbl_80659708 = .bss:0x80659708; // type:object size:0x18 -lbl_80659720 = .bss:0x80659720; // type:object size:0x10 -lbl_80659730 = .bss:0x80659730; // type:object size:0x610 data:4byte -lbl_80659D40 = .bss:0x80659D40; // type:object size:0x10 -lbl_80659D50 = .bss:0x80659D50; // type:object size:0x330 -lbl_8065A080 = .bss:0x8065A080; // type:object size:0x155E0 -lbl_8066F660 = .bss:0x8066F660; // type:object size:0x10 -lbl_8066F670 = .bss:0x8066F670; // type:object size:0x3B0 -lbl_8066FA20 = .bss:0x8066FA20; // type:object size:0x4000 -lbl_80673A20 = .bss:0x80673A20; // type:object size:0x18 -lbl_80673A38 = .bss:0x80673A38; // type:object size:0xC -lbl_80673A44 = .bss:0x80673A44; // type:object size:0x3C -lbl_80673A80 = .bss:0x80673A80; // type:object size:0xC -lbl_80673A8C = .bss:0x80673A8C; // type:object size:0x1C data:byte +sZeroBuffer__Q44nw4r3snd6detail9AxManager = .bss:0x80658F80; // type:object size:0x100 +sBiquadFilterCallbackTable__Q44nw4r3snd6detail9AxManager = .bss:0x80659080; // type:object size:0x200 +@1190 = .bss:0x80659280; // type:object size:0xC scope:local +@LOCAL@GetInstance__Q44nw4r3snd6detail9AxManagerFv@instance = .bss:0x8065928C; // type:object size:0x104 scope:weak data:4byte +@986 = .bss:0x80659390; // type:object size:0xC scope:local +@LOCAL@GetInstance__Q44nw4r3snd6detail14AxVoiceManagerFv@instance = .bss:0x8065939C; // type:object size:0x2C scope:weak data:4byte +@1671 = .bss:0x806593C8; // type:object size:0xC scope:local +@LOCAL@GetInstance__Q44nw4r3snd6detail14ChannelManagerFv@instance = .bss:0x806593D8; // type:object size:0x20 scope:weak data:4byte +@781 = .bss:0x806593F8; // type:object size:0xC scope:local +@LOCAL@GetInstance__Q44nw4r3snd6detail22DisposeCallbackManagerFv@instance = .bss:0x80659404; // type:object size:0xC scope:weak data:4byte +@LOCAL@GetInstance__Q44nw4r3snd6detail20RemoteSpeakerManagerFv@instance = .bss:0x80659410; // type:object size:0x2D8 scope:weak data:byte +mGlobalVariable__Q44nw4r3snd6detail9SeqPlayer = .bss:0x806596E8; // type:object size:0x20 data:2byte +sEngine__Q34nw4r3snd32@unnamed@snd_Sound3DManager_cpp@ = .bss:0x80659708; // type:object size:0x14 scope:local +@1420 = .bss:0x80659720; // type:object size:0xC scope:local +@LOCAL@detail_SortPriorityList__Q34nw4r3snd11SoundPlayerFv@tmplist = .bss:0x80659730; // type:object size:0x600 scope:weak data:4byte +@2786 = .bss:0x80659D40; // type:object size:0xC scope:local +sTaskThread__Q34nw4r3snd11SoundSystem = .bss:0x80659D50; // type:object size:0x320 +@LOCAL@InitSoundSystem__Q34nw4r3snd11SoundSystemFll@defaultSoundSystemWork@0 = .bss:0x8065A080; // type:object size:0x155E0 scope:weak +@1941 = .bss:0x8066F660; // type:object size:0xC scope:local +@LOCAL@GetInstance__Q44nw4r3snd6detail11SoundThreadFv@instance = .bss:0x8066F670; // type:object size:0x398 scope:weak +sLoadBuffer__Q44nw4r3snd6detail10StrmPlayer = .bss:0x8066FA20; // type:object size:0x4000 align:32 +sLoadBufferMutex__Q44nw4r3snd6detail10StrmPlayer = .bss:0x80673A20; // type:object size:0x18 +@886 = .bss:0x80673A38; // type:object size:0xC scope:local +@LOCAL@GetInstance__Q44nw4r3snd6detail11TaskManagerFv@instance = .bss:0x80673A44; // type:object size:0x3C scope:weak +@1109 = .bss:0x80673A80; // type:object size:0xC scope:local +@LOCAL@GetInstance__Q44nw4r3snd6detail12VoiceManagerFv@instance = .bss:0x80673A8C; // type:object size:0x1C scope:weak data:byte @LOCAL@SetSize__Q44nw4r3lyt6detail11TexCoordAryFUc@texCoords = .bss:0x80673AA8; // type:object size:0x20 scope:weak align:4 data:float sArchiveList__Q23EGG7Archive = .bss:0x80673AC8; // type:object size:0xC sDvdList__Q23EGG7DvdFile = .bss:0x80673AD8; // type:object size:0xC diff --git a/configure.py b/configure.py index 96451bbb..d6166140 100644 --- a/configure.py +++ b/configure.py @@ -313,10 +313,10 @@ def EGGLib(lib_name, objects): } -def nw4rLib(lib_name, objects, extra_cflags=[]): +def nw4rLib(lib_name, objects, extra_cflags=[], mw_version=None): return { "lib": lib_name, - "mw_version": "Wii/1.3", # most seem to be around 1.2, snd is 1.6 + "mw_version": mw_version or "Wii/1.3", # most seem to be around 1.2, snd is 1.6 "cflags": cflags_nw4r + extra_cflags, "progress_category": "nw4r", "host": False, @@ -387,7 +387,7 @@ config.libs = [ Object(NonMatching, "toBeSorted/d_shadow.cpp"), Object(NonMatching, "toBeSorted/d_unk_mdl_stuff_1.cpp"), Object(NonMatching, "toBeSorted/d_unk_mdl_stuff_2.cpp"), - Object(NonMatching, "toBeSorted/blur_and_palette_manager.cpp"), + Object(Matching, "d/d_light_env.cpp"), Object(NonMatching, "toBeSorted/d_emitter.cpp"), Object(NonMatching, "toBeSorted/d_effects_2.cpp"), Object(NonMatching, "toBeSorted/sound_info.cpp"), @@ -435,7 +435,7 @@ config.libs = [ Object(NonMatching, "toBeSorted/arc_managers/oarc_control.cpp"), Object(Matching, "toBeSorted/arc_managers/layout_arc_manager.cpp"), Object(NonMatching, "toBeSorted/arc_managers/layout_arc_control.cpp"), - Object(NonMatching, "toBeSorted/base_tables.cpp"), + Object(Matching, "toBeSorted/actor_info.cpp"), Object(NonMatching, "toBeSorted/unk_vec_math.cpp"), Object(NonMatching, "toBeSorted/unk_mdl_cc.cpp"), Object(NonMatching, "toBeSorted/d_camera.cpp"), @@ -700,26 +700,39 @@ config.libs = [ "progress_category": "game", "host": False, "objects": [ - # These are very low quality splits since nobody has figured - # out enough detail. Need to look into nw4r::snd first - Object(NonMatching, "d/snd/d_snd.cpp"), - Object(NonMatching, "d/snd/d_snd_actor.cpp"), - Object(NonMatching, "d/snd/d_snd_engine.cpp"), - Object(NonMatching, "d/snd/d_snd_unk_component_1.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_bgm.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk1.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk3.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_enemy.cpp"), + Object(NonMatching, "d/snd/d_snd_mgr.cpp"), + Object(Matching, "d/snd/d_snd_actor.cpp"), + Object(NonMatching, "d/snd/d_snd_3d_actor.cpp"), + Object(NonMatching, "d/snd/d_snd_3d_engine.cpp"), + Object(Matching, "d/snd/d_snd_sound.cpp"), + Object(NonMatching, "d/snd/d_snd_player_mgr.cpp"), + Object(NonMatching, "d/snd/d_snd_control_player_mgr.cpp"), + Object(Matching, "d/snd/d_snd_3d_manager.cpp"), + # this one is a bit weird. it deals with all the stage definitions, + # but it's not actually the bgm manager? + Object(NonMatching, "d/snd/d_snd_stage_mgr.cpp"), Object(NonMatching, "d/snd/d_snd_unk_component_2.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_effect.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_5.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_6.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_7.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_8.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_9.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_10.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_11.cpp"), - Object(NonMatching, "d/snd/mgr/d_snd_mgr_unk_12.cpp"), + Object(NonMatching, "d/snd/d_snd_area_sound_effect_mgr.cpp"), + Object(NonMatching, "d/snd/d_snd_area_sound.cpp"), + Object(Matching, "d/snd/d_snd_control_sound.cpp"), + Object(Matching, "d/snd/d_snd_control_player.cpp"), + Object(NonMatching, "d/snd/d_snd_bgm_mgr.cpp"), + Object(NonMatching, "d/snd/d_snd_bgm_sound_callbacks.cpp"), + Object(NonMatching, "d/snd/d_snd_bgm_sound_boss_callbacks.cpp"), + Object(NonMatching, "d/snd/d_snd_bgm_sound.cpp"), + Object(NonMatching, "d/snd/d_snd_unk_15.cpp"), + Object(NonMatching, "d/snd/d_snd_small_effect_mgr.cpp"), + Object(NonMatching, "d/snd/d_snd_harp_mgr.cpp"), + Object(NonMatching, "d/snd/d_snd_anim_sound.cpp"), + Object(NonMatching, "d/snd/d_snd_source_mgr.cpp"), + Object(NonMatching, "d/snd/d_snd_source_group.cpp"), + Object(NonMatching, "d/snd/d_snd_source.cpp"), + Object(NonMatching, "d/snd/d_snd_mgr_unk_7.cpp"), + Object(NonMatching, "d/snd/d_snd_mgr_unk_8.cpp"), + Object(NonMatching, "d/snd/d_snd_mgr_unk_9.cpp"), + Object(NonMatching, "d/snd/d_snd_mgr_unk_10.cpp"), + Object(NonMatching, "d/snd/d_snd_mgr_unk_11.cpp"), + Object(NonMatching, "d/snd/d_snd_calc_pitch.cpp"), ], }, { @@ -999,7 +1012,7 @@ config.libs = [ Object(Matching, "nw4r/g3d/g3d_scnmdl.cpp"), # Object(NonMatching, "nw4r/g3d/g3d_scnchoice.cpp"), # Object(NonMatching, "nw4r/g3d/g3d_scngroupex.cpp"), - # Object(NonMatching, "nw4r/g3d/g3d_scnmdl1mat1shp.cpp"), + Object(Matching, "nw4r/g3d/g3d_scnmdl1mat1shp.cpp"), # Object(NonMatching, "nw4r/g3d/g3d_scnmdlexpand.cpp"), Object(Matching, "nw4r/g3d/g3d_calcmaterial.cpp"), Object(Matching, "nw4r/g3d/g3d_init.cpp"), @@ -1012,81 +1025,83 @@ config.libs = [ nw4rLib( "snd", [ - Object(NonMatching, "nw4r/snd/snd_AnimSound.cpp"), - Object(NonMatching, "nw4r/snd/snd_AxManager.cpp"), - Object(NonMatching, "nw4r/snd/snd_AxVoice.cpp"), - Object(NonMatching, "nw4r/snd/snd_AxVoiceManager.cpp"), - Object(NonMatching, "nw4r/snd/snd_AxfxImpl.cpp"), - Object(NonMatching, "nw4r/snd/snd_Bank.cpp"), - Object(NonMatching, "nw4r/snd/snd_BankFile.cpp"), - Object(NonMatching, "nw4r/snd/snd_BasicPlayer.cpp"), - Object(NonMatching, "nw4r/snd/snd_BasicSound.cpp"), - Object(NonMatching, "nw4r/snd/snd_BiquadFilterPreset.cpp"), - Object(NonMatching, "nw4r/snd/snd_Channel.cpp"), - Object(NonMatching, "nw4r/snd/snd_DisposeCallbackManager.cpp"), - Object(NonMatching, "nw4r/snd/snd_debug.cpp"), - Object(NonMatching, "nw4r/snd/snd_DvdSoundArchive.cpp"), - Object(NonMatching, "nw4r/snd/snd_EnvGenerator.cpp"), - Object(NonMatching, "nw4r/snd/snd_ExternalSoundPlayer.cpp"), - Object(NonMatching, "nw4r/snd/snd_FrameHeap.cpp"), - Object(NonMatching, "nw4r/snd/snd_FxBase.cpp"), - Object(NonMatching, "nw4r/snd/snd_FxChorus.cpp"), - Object(NonMatching, "nw4r/snd/snd_FxDelay.cpp"), - Object(NonMatching, "nw4r/snd/snd_FxReverbHi.cpp"), - Object(NonMatching, "nw4r/snd/snd_FxReverbHiDpl2.cpp"), - Object(NonMatching, "nw4r/snd/snd_FxReverbStd.cpp"), - Object(NonMatching, "nw4r/snd/snd_FxReverbStdDpl2.cpp"), - Object(NonMatching, "nw4r/snd/snd_InstancePool.cpp"), - Object(NonMatching, "nw4r/snd/snd_Lfo.cpp"), - Object(NonMatching, "nw4r/snd/snd_MemorySoundArchive.cpp"), - Object(NonMatching, "nw4r/snd/snd_MidiSeqPlayer.cpp"), - Object(NonMatching, "nw4r/snd/snd_MmlParser.cpp"), - Object(NonMatching, "nw4r/snd/snd_MmlSeqTrack.cpp"), - Object(NonMatching, "nw4r/snd/snd_MmlSeqTrackAllocator.cpp"), - Object(NonMatching, "nw4r/snd/snd_NandSoundArchive.cpp"), - Object(NonMatching, "nw4r/snd/snd_PlayerHeap.cpp"), - Object(NonMatching, "nw4r/snd/snd_RemoteSpeaker.cpp"), - Object(NonMatching, "nw4r/snd/snd_RemoteSpeakerManager.cpp"), - Object(NonMatching, "nw4r/snd/snd_SeqFile.cpp"), - Object(NonMatching, "nw4r/snd/snd_SeqPlayer.cpp"), - Object(NonMatching, "nw4r/snd/snd_SeqSound.cpp"), - Object(NonMatching, "nw4r/snd/snd_SeqSoundHandle.cpp"), - Object(NonMatching, "nw4r/snd/snd_SeqTrack.cpp"), - Object(NonMatching, "nw4r/snd/snd_Sound3DActor.cpp"), - Object(NonMatching, "nw4r/snd/snd_Sound3DCalculator.cpp"), - Object(NonMatching, "nw4r/snd/snd_Sound3DEngine.cpp"), - Object(NonMatching, "nw4r/snd/snd_Sound3DListener.cpp"), - Object(NonMatching, "nw4r/snd/snd_Sound3DManager.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundActor.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundArchive.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundArchiveFile.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundArchiveLoader.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundArchivePlayer.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundHandle.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundHeap.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundPlayer.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundStartable.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundSystem.cpp"), - Object(NonMatching, "nw4r/snd/snd_SoundThread.cpp"), - Object(NonMatching, "nw4r/snd/snd_StrmChannel.cpp"), - Object(NonMatching, "nw4r/snd/snd_StrmFile.cpp"), - Object(NonMatching, "nw4r/snd/snd_StrmPlayer.cpp"), - Object(NonMatching, "nw4r/snd/snd_StrmSound.cpp"), - Object(NonMatching, "nw4r/snd/snd_StrmSoundHandle.cpp"), - Object(NonMatching, "nw4r/snd/snd_Task.cpp"), - Object(NonMatching, "nw4r/snd/snd_TaskManager.cpp"), - Object(NonMatching, "nw4r/snd/snd_TaskThread.cpp"), - Object(NonMatching, "nw4r/snd/snd_Voice.cpp"), - Object(NonMatching, "nw4r/snd/snd_VoiceManager.cpp"), - Object(NonMatching, "nw4r/snd/snd_Util.cpp"), - Object(NonMatching, "nw4r/snd/snd_WaveArchive.cpp"), - Object(NonMatching, "nw4r/snd/snd_WaveFile.cpp"), - Object(NonMatching, "nw4r/snd/snd_WaveSound.cpp"), - Object(NonMatching, "nw4r/snd/snd_WaveSoundHandle.cpp"), - Object(NonMatching, "nw4r/snd/snd_WsdFile.cpp"), - Object(NonMatching, "nw4r/snd/snd_WsdPlayer.cpp"), - Object(NonMatching, "nw4r/snd/snd_adpcm.cpp"), + Object(Matching, "nw4r/snd/snd_AnimSound.cpp"), + Object(Matching, "nw4r/snd/snd_AnimSoundReader.cpp"), + Object(Matching, "nw4r/snd/snd_AxManager.cpp"), + Object(Matching, "nw4r/snd/snd_AxVoice.cpp"), + Object(Matching, "nw4r/snd/snd_AxVoiceManager.cpp"), + Object(Matching, "nw4r/snd/snd_AxfxImpl.cpp"), + Object(Matching, "nw4r/snd/snd_Bank.cpp"), + Object(Matching, "nw4r/snd/snd_BankFile.cpp"), + Object(Matching, "nw4r/snd/snd_BasicPlayer.cpp"), + Object(Matching, "nw4r/snd/snd_BasicSound.cpp"), + Object(Matching, "nw4r/snd/snd_BiquadFilterPreset.cpp"), + Object(Matching, "nw4r/snd/snd_Channel.cpp"), + Object(Matching, "nw4r/snd/snd_DisposeCallbackManager.cpp"), + # Object(NonMatching, "nw4r/snd/snd_debug.cpp"), + Object(Matching, "nw4r/snd/snd_DvdSoundArchive.cpp"), + Object(Matching, "nw4r/snd/snd_EnvGenerator.cpp"), + Object(Matching, "nw4r/snd/snd_ExternalSoundPlayer.cpp"), + Object(Matching, "nw4r/snd/snd_FrameHeap.cpp"), + # Object(NonMatching, "nw4r/snd/snd_FxBase.cpp"), + # Object(NonMatching, "nw4r/snd/snd_FxChorus.cpp"), + # Object(NonMatching, "nw4r/snd/snd_FxDelay.cpp"), + # Object(NonMatching, "nw4r/snd/snd_FxReverbHi.cpp"), + # Object(NonMatching, "nw4r/snd/snd_FxReverbHiDpl2.cpp"), + # Object(NonMatching, "nw4r/snd/snd_FxReverbStd.cpp"), + Object(Matching, "nw4r/snd/snd_FxReverbStdDpl2.cpp"), + Object(Matching, "nw4r/snd/snd_InstancePool.cpp"), + Object(Matching, "nw4r/snd/snd_Lfo.cpp"), + Object(Matching, "nw4r/snd/snd_MemorySoundArchive.cpp"), + Object(Matching, "nw4r/snd/snd_MidiSeqPlayer.cpp"), + Object(Matching, "nw4r/snd/snd_MmlParser.cpp"), + Object(Matching, "nw4r/snd/snd_MmlSeqTrack.cpp"), + Object(Matching, "nw4r/snd/snd_MmlSeqTrackAllocator.cpp"), + Object(Matching, "nw4r/snd/snd_NandSoundArchive.cpp"), + Object(Matching, "nw4r/snd/snd_PlayerHeap.cpp"), + Object(Matching, "nw4r/snd/snd_RemoteSpeaker.cpp"), + Object(Matching, "nw4r/snd/snd_RemoteSpeakerManager.cpp"), + Object(Matching, "nw4r/snd/snd_SeqFile.cpp"), + Object(Matching, "nw4r/snd/snd_SeqPlayer.cpp"), + Object(Matching, "nw4r/snd/snd_SeqSound.cpp"), + Object(Matching, "nw4r/snd/snd_SeqSoundHandle.cpp"), + Object(Matching, "nw4r/snd/snd_SeqTrack.cpp"), + Object(Matching, "nw4r/snd/snd_Sound3DActor.cpp"), + Object(Matching, "nw4r/snd/snd_Sound3DCalculator.cpp"), + Object(Matching, "nw4r/snd/snd_Sound3DEngine.cpp"), + Object(Matching, "nw4r/snd/snd_Sound3DListener.cpp"), + Object(Matching, "nw4r/snd/snd_Sound3DManager.cpp"), + Object(Matching, "nw4r/snd/snd_SoundActor.cpp"), + Object(Matching, "nw4r/snd/snd_SoundArchive.cpp"), + Object(Matching, "nw4r/snd/snd_SoundArchiveFile.cpp"), + Object(Matching, "nw4r/snd/snd_SoundArchiveLoader.cpp"), + Object(Matching, "nw4r/snd/snd_SoundArchivePlayer.cpp"), + Object(Matching, "nw4r/snd/snd_SoundHandle.cpp"), + Object(Matching, "nw4r/snd/snd_SoundHeap.cpp"), + Object(Matching, "nw4r/snd/snd_SoundPlayer.cpp"), + Object(Matching, "nw4r/snd/snd_SoundStartable.cpp"), + Object(Matching, "nw4r/snd/snd_SoundSystem.cpp"), + Object(Matching, "nw4r/snd/snd_SoundThread.cpp"), + Object(Matching, "nw4r/snd/snd_StrmChannel.cpp"), + Object(Matching, "nw4r/snd/snd_StrmFile.cpp"), + Object(Matching, "nw4r/snd/snd_StrmPlayer.cpp"), + Object(Matching, "nw4r/snd/snd_StrmSound.cpp"), + Object(Matching, "nw4r/snd/snd_StrmSoundHandle.cpp"), + Object(Matching, "nw4r/snd/snd_Task.cpp"), + Object(Matching, "nw4r/snd/snd_TaskManager.cpp"), + Object(Matching, "nw4r/snd/snd_TaskThread.cpp"), + Object(Matching, "nw4r/snd/snd_Voice.cpp"), + Object(Matching, "nw4r/snd/snd_VoiceManager.cpp"), + Object(Matching, "nw4r/snd/snd_Util.cpp"), + Object(Matching, "nw4r/snd/snd_WaveArchive.cpp"), + Object(Matching, "nw4r/snd/snd_WaveFile.cpp"), + Object(Matching, "nw4r/snd/snd_WaveSound.cpp"), + Object(Matching, "nw4r/snd/snd_WaveSoundHandle.cpp"), + Object(Matching, "nw4r/snd/snd_WsdFile.cpp"), + Object(Matching, "nw4r/snd/snd_WsdPlayer.cpp"), + Object(Matching, "nw4r/snd/snd_adpcm.cpp"), ], + mw_version="Wii/1.6", ), nw4rLib( "lyt", @@ -1957,9 +1972,9 @@ config.libs = [ Rel( NonMatching, "d_a_obj_bigbomb_flower", "REL/d/a/obj/d_a_obj_bigbomb_flower.cpp" ), - Rel(NonMatching, "d_a_obj_bird_sp", "REL/d/a/obj/d_a_obj_bird_sp.cpp"), + Rel(Matching, "d_a_obj_bird_sp", "REL/d/a/obj/d_a_obj_bird_sp.cpp"), Rel(Matching, "d_a_obj_bird_statue", "REL/d/a/obj/d_a_obj_bird_statue.cpp"), - Rel(NonMatching, "d_a_obj_blade", "REL/d/a/obj/d_a_obj_blade.cpp"), + Rel(Matching, "d_a_obj_blade", "REL/d/a/obj/d_a_obj_blade.cpp"), Rel(NonMatching, "d_a_obj_blast_rock", "REL/d/a/obj/d_a_obj_blast_rock.cpp"), Rel(NonMatching, "d_a_obj_block_rope", "REL/d/a/obj/d_a_obj_block_rope.cpp"), Rel( @@ -2017,7 +2032,7 @@ config.libs = [ "d_a_obj_display_only_nbs", "REL/d/a/obj/d_a_obj_display_only_nbs.cpp", ), - Rel(NonMatching, "d_a_obj_distant_ship", "REL/d/a/obj/d_a_obj_distant_ship.cpp"), + Rel(Matching, "d_a_obj_distant_ship", "REL/d/a/obj/d_a_obj_distant_ship.cpp"), Rel( NonMatching, "d_a_obj_diviner_crystal", @@ -2043,12 +2058,8 @@ config.libs = [ ), Rel(NonMatching, "d_a_obj_evil_field", "REL/d/a/obj/d_a_obj_evil_field.cpp"), Rel(NonMatching, "d_a_obj_F302_light", "REL/d/a/obj/d_a_obj_F302_light.cpp"), - Rel( - NonMatching, "d_a_obj_F400_gate_leaf", "REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp" - ), - Rel( - NonMatching, "d_a_obj_F400_gate_seal", "REL/d/a/obj/d_a_obj_F400_gate_seal.cpp" - ), + Rel(Matching, "d_a_obj_F400_gate_leaf", "REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp"), + Rel(Matching, "d_a_obj_F400_gate_seal", "REL/d/a/obj/d_a_obj_F400_gate_seal.cpp"), Rel(NonMatching, "d_a_obj_farmland", "REL/d/a/obj/d_a_obj_farmland.cpp"), Rel(NonMatching, "d_a_obj_fence", "REL/d/a/obj/d_a_obj_fence.cpp"), Rel(Matching, "d_a_obj_fence_boko2", "REL/d/a/obj/d_a_obj_fence_boko2.cpp"), @@ -2104,11 +2115,11 @@ config.libs = [ Rel(NonMatching, "d_a_obj_hit_lever_sw", "REL/d/a/obj/d_a_obj_hit_lever_sw.cpp"), Rel(NonMatching, "d_a_obj_hole", "REL/d/a/obj/d_a_obj_hole.cpp"), Rel(NonMatching, "d_a_obj_hole_minigame", "REL/d/a/obj/d_a_obj_hole_minigame.cpp"), - Rel(NonMatching, "d_a_obj_impa_door", "REL/d/a/obj/d_a_obj_impa_door.cpp"), + Rel(Matching, "d_a_obj_impa_door", "REL/d/a/obj/d_a_obj_impa_door.cpp"), Rel(NonMatching, "d_a_obj_insect_island", "REL/d/a/obj/d_a_obj_insect_island.cpp"), Rel(NonMatching, "d_a_obj_into_hole", "REL/d/a/obj/d_a_obj_into_hole.cpp"), Rel(Matching, "d_a_obj_iron_stage", "REL/d/a/obj/d_a_obj_iron_stage.cpp"), - Rel(NonMatching, "d_a_obj_island_LOD", "REL/d/a/obj/d_a_obj_island_LOD.cpp"), + Rel(Matching, "d_a_obj_island_LOD", "REL/d/a/obj/d_a_obj_island_LOD.cpp"), Rel(Matching, "d_a_obj_island_nusi", "REL/d/a/obj/d_a_obj_island_nusi.cpp"), Rel( NonMatching, @@ -2147,10 +2158,10 @@ config.libs = [ Rel(NonMatching, "d_a_obj_lotus", "REL/d/a/obj/d_a_obj_lotus.cpp"), Rel(NonMatching, "d_a_obj_lotus_flower", "REL/d/a/obj/d_a_obj_lotus_flower.cpp"), Rel(NonMatching, "d_a_obj_lotus_seed", "REL/d/a/obj/d_a_obj_lotus_seed.cpp"), - Rel(NonMatching, "d_a_obj_mapparts", "REL/d/a/obj/d_a_obj_mapparts.cpp"), + Rel(Matching, "d_a_obj_mapparts", "REL/d/a/obj/d_a_obj_mapparts.cpp"), Rel(Matching, "d_a_obj_megami_island", "REL/d/a/obj/d_a_obj_megami_island.cpp"), Rel(NonMatching, "d_a_obj_mg_pumpkin", "REL/d/a/obj/d_a_obj_mg_pumpkin.cpp"), - Rel(NonMatching, "d_a_obj_mole_cover", "REL/d/a/obj/d_a_obj_mole_cover.cpp"), + Rel(Matching, "d_a_obj_mole_cover", "REL/d/a/obj/d_a_obj_mole_cover.cpp"), Rel(Matching, "d_a_obj_mole_soil", "REL/d/a/obj/d_a_obj_mole_soil.cpp"), Rel(NonMatching, "d_a_obj_move_elec", "REL/d/a/obj/d_a_obj_move_elec.cpp"), Rel(NonMatching, "d_a_obj_move_lift_vol", "REL/d/a/obj/d_a_obj_move_lift_vol.cpp"), @@ -2180,9 +2191,9 @@ config.libs = [ Rel(Matching, "d_a_obj_pumpkin_bar", "REL/d/a/obj/d_a_obj_pumpkin_bar.cpp"), Rel(Matching, "d_a_obj_pumpkin_leaf", "REL/d/a/obj/d_a_obj_pumpkin_leaf.cpp"), Rel(NonMatching, "d_a_obj_push_block", "REL/d/a/obj/d_a_obj_push_block.cpp"), - Rel(NonMatching, "d_a_obj_puzzle_island", "REL/d/a/obj/d_a_obj_puzzle_island.cpp"), + Rel(Matching, "d_a_obj_puzzle_island", "REL/d/a/obj/d_a_obj_puzzle_island.cpp"), Rel(NonMatching, "d_a_obj_rail_end", "REL/d/a/obj/d_a_obj_rail_end.cpp"), - Rel(NonMatching, "d_a_obj_rail_post", "REL/d/a/obj/d_a_obj_rail_post.cpp"), + Rel(Matching, "d_a_obj_rail_post", "REL/d/a/obj/d_a_obj_rail_post.cpp"), Rel(NonMatching, "d_a_obj_ride_rock", "REL/d/a/obj/d_a_obj_ride_rock.cpp"), Rel(Matching, "d_a_obj_ring", "REL/d/a/obj/d_a_obj_ring.cpp"), Rel(NonMatching, "d_a_obj_rock_boat", "REL/d/a/obj/d_a_obj_rock_boat.cpp"), @@ -2190,7 +2201,7 @@ config.libs = [ Rel(NonMatching, "d_a_obj_rock_sky", "REL/d/a/obj/d_a_obj_rock_sky.cpp"), Rel(NonMatching, "d_a_obj_roll_pillar", "REL/d/a/obj/d_a_obj_roll_pillar.cpp"), Rel(NonMatching, "d_a_obj_roll_rock", "REL/d/a/obj/d_a_obj_roll_rock.cpp"), - Rel(NonMatching, "d_a_obj_rope_base", "REL/d/a/obj/d_a_obj_rope_base.cpp"), + Rel(Matching, "d_a_obj_rope_base", "REL/d/a/obj/d_a_obj_rope_base.cpp"), Rel(NonMatching, "d_a_obj_rope_igaiga", "REL/d/a/obj/d_a_obj_rope_igaiga.cpp"), Rel( NonMatching, "d_a_obj_rotation_light", "REL/d/a/obj/d_a_obj_rotation_light.cpp" @@ -2293,7 +2304,7 @@ config.libs = [ Rel(NonMatching, "d_a_obj_syako_shutter", "REL/d/a/obj/d_a_obj_syako_shutter.cpp"), Rel(NonMatching, "d_a_obj_tableware", "REL/d/a/obj/d_a_obj_tableware.cpp"), Rel(NonMatching, "d_a_obj_tackle", "REL/d/a/obj/d_a_obj_tackle.cpp"), - Rel(NonMatching, "d_a_obj_tarzan_pole", "REL/d/a/obj/d_a_obj_tarzan_pole.cpp"), + Rel(Matching, "d_a_obj_tarzan_pole", "REL/d/a/obj/d_a_obj_tarzan_pole.cpp"), Rel(NonMatching, "d_a_obj_tenijima", "REL/d/a/obj/d_a_obj_tenijima.cpp"), Rel(NonMatching, "d_a_obj_teni_rail", "REL/d/a/obj/d_a_obj_teni_rail.cpp"), Rel( diff --git a/include/UnknownTypeBelongings.h b/include/UnknownTypeBelongings.h deleted file mode 100644 index b34592e5..00000000 --- a/include/UnknownTypeBelongings.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef DECOMP_UNKNOWN_TYPES_H -#define DECOMP_UNKNOWN_TYPES_H - -#include "common.h" - -// MOST LIKELY mVEC -struct Vec3f { - f32 x, y, z; -}; - -struct Vec2f { - f32 x, y; -}; - -struct Vec3s { - s16 x, y, z; -}; - -struct ObjInfo { - /* 0x00 */ char *name; - /* 0x04 */ u16 obj_id; - /* 0x06 */ u16 obj_id2; - /* 0x08 */ u16 fiTextEntryId; - /* 0x0A */ s8 unk_0xA; - /* 0x0B */ u8 subtype; -}; - -// is now fLiNdBa_c -// struct ActorReference { -// ActorReference* prev; -// ActorReference* next; -// fBase_c* link; -// }; - -class UnkCollider {}; - -#endif diff --git a/include/d/a/d_a_base.h b/include/d/a/d_a_base.h index 550adccb..ceadd9b5 100644 --- a/include/d/a/d_a_base.h +++ b/include/d/a/d_a_base.h @@ -1,95 +1,22 @@ #ifndef D_A_BASE_H #define D_A_BASE_H -#include "UnknownTypeBelongings.h" #include "common.h" #include "d/d_base.h" +#include "d/snd/d_snd_source_if.h" #include "m/m_allocator.h" #include "m/m_angle.h" #include "m/m_vec.h" +#include "toBeSorted/actor_info.h" #include "toBeSorted/raii_ptr.h" #include "toBeSorted/tlist.h" class dAcBase_c; struct cBgS_PolyInfo; -struct SoundSource { - virtual ~SoundSource() {} -// TODO there's probably multiple inheritance involved and stuff -#define SOUNDSOURCE_VIRTUAL(offset) virtual void vt_##offset(); - - SOUNDSOURCE_VIRTUAL(0x0C); - SOUNDSOURCE_VIRTUAL(0x10); - SOUNDSOURCE_VIRTUAL(0x14); - SOUNDSOURCE_VIRTUAL(0x18); - SOUNDSOURCE_VIRTUAL(0x1C); - SOUNDSOURCE_VIRTUAL(0x20); - SOUNDSOURCE_VIRTUAL(0x24); - SOUNDSOURCE_VIRTUAL(0x28); - SOUNDSOURCE_VIRTUAL(0x2C); - SOUNDSOURCE_VIRTUAL(0x30); - SOUNDSOURCE_VIRTUAL(0x34); - SOUNDSOURCE_VIRTUAL(0x38); - SOUNDSOURCE_VIRTUAL(0x3C); - virtual void vt_0x40(s32); - SOUNDSOURCE_VIRTUAL(0x44); - virtual bool shutdown(); // 0x48 - SOUNDSOURCE_VIRTUAL(0x4C); - SOUNDSOURCE_VIRTUAL(0x50); - SOUNDSOURCE_VIRTUAL(0x54); - SOUNDSOURCE_VIRTUAL(0x58); - SOUNDSOURCE_VIRTUAL(0x5C); - SOUNDSOURCE_VIRTUAL(0x60); - SOUNDSOURCE_VIRTUAL(0x64); - SOUNDSOURCE_VIRTUAL(0x68); - SOUNDSOURCE_VIRTUAL(0x6C); - SOUNDSOURCE_VIRTUAL(0x70); - SOUNDSOURCE_VIRTUAL(0x74); - SOUNDSOURCE_VIRTUAL(0x78); - SOUNDSOURCE_VIRTUAL(0x7C); - SOUNDSOURCE_VIRTUAL(0x80); - SOUNDSOURCE_VIRTUAL(0x84); - SOUNDSOURCE_VIRTUAL(0x88); - SOUNDSOURCE_VIRTUAL(0x8C); - SOUNDSOURCE_VIRTUAL(0x90); - SOUNDSOURCE_VIRTUAL(0x94); - SOUNDSOURCE_VIRTUAL(0x98); - SOUNDSOURCE_VIRTUAL(0x9C); - SOUNDSOURCE_VIRTUAL(0xA0); - SOUNDSOURCE_VIRTUAL(0xA4); - SOUNDSOURCE_VIRTUAL(0xA8); - SOUNDSOURCE_VIRTUAL(0xAC); - SOUNDSOURCE_VIRTUAL(0xB0); - SOUNDSOURCE_VIRTUAL(0xB4); - SOUNDSOURCE_VIRTUAL(0xB8); - SOUNDSOURCE_VIRTUAL(0xBC); - SOUNDSOURCE_VIRTUAL(0xC0); - SOUNDSOURCE_VIRTUAL(0xC4); - SOUNDSOURCE_VIRTUAL(0xC8); - SOUNDSOURCE_VIRTUAL(0xCC); - SOUNDSOURCE_VIRTUAL(0xD0); - SOUNDSOURCE_VIRTUAL(0xD4); - SOUNDSOURCE_VIRTUAL(0xD8); - SOUNDSOURCE_VIRTUAL(0xDC); - SOUNDSOURCE_VIRTUAL(0xE0); - SOUNDSOURCE_VIRTUAL(0xE4); - SOUNDSOURCE_VIRTUAL(0xE8); - SOUNDSOURCE_VIRTUAL(0xEC); - SOUNDSOURCE_VIRTUAL(0xF0); - SOUNDSOURCE_VIRTUAL(0xF4); - SOUNDSOURCE_VIRTUAL(0xF8); - SOUNDSOURCE_VIRTUAL(0xFC); - - virtual bool isReadyMaybe(); // 0x100 - virtual bool load(void *data, const char *name); // 0x104 - virtual void setFrame(f32 frame); // 0x108 - virtual void setRate(f32 frame); // 0x10C - virtual void set_0x164(UNKWORD val); // 0x114 -}; - struct SoundInfo { dAcBase_c *actor; - SoundSource *sound_source; + dSoundSourceIf_c *sound_source; mVec3_c *obj_pos; TListNode mLink; }; @@ -141,9 +68,9 @@ public: class dAcBase_c : public dBase_c { public: /* 0x68 */ mHeapAllocator_c heap_allocator; - /* 0x84 */ ObjInfo *obj_info; + /* 0x84 */ const ActorInfo *mpActorInfo; /* 0x88 */ TList sound_list; - /* 0x94 */ RaiiPtr sound_source; + /* 0x94 */ RaiiPtr sound_source; /* 0x98 */ mVec3_c *obj_pos; /* 0x9C */ mVec3_c pos_copy; /* 0xA8 */ u32 params2; @@ -249,10 +176,10 @@ public: // funcs found in TU /* 8002c650 */ static void setTempCreateParams( mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, s32 roomId, u32 params2, dAcBase_c *parent, u8 subtype, u16 unkFlag, - s8 viewClipIdx, ObjInfo *objInfo + s8 viewClipIdx, const ActorInfo *actorInfo ); - /* 8002c690 */ SoundSource *FUN_8002c690(); + /* 8002c690 */ dSoundSourceIf_c *createSoundSource(); /* 8002c710 */ int initAllocatorWork1Heap(int size, char *name, int align); /* 8002c720 */ int initAllocator(int size, char *name, EGG::Heap *heap, int align); /* 8002c7b0 */ bool addActorToRoom(s32 roomId); @@ -301,7 +228,7 @@ public: /* 8002d810 */ void FUN_8002d810(); /* 8002d830 */ void FUN_8002d830(); /* 8002d860 */ void FUN_8002d860(UNKWORD val); - /* 8002d880 */ SoundSource *getSoundSource(); + /* 8002d880 */ dSoundSourceIf_c *getSoundSource(); // End of SoundSource stuff /* 8002d890 */ void removeSoundInfo(SoundInfo *); @@ -339,7 +266,7 @@ public: /* 80575084 */ static mAng3_c *s_Create_Rotation; /* 80575088 */ static mVec3_c *s_Create_Scale; /* 8057508C */ static dAcBase_c *s_Create_Parent; - /* 80575090 */ static ObjInfo *s_Create_ObjInfo; + /* 80575090 */ static const ActorInfo *s_Create_ActorInfo; /* 80575094 */ static u8 s_Create_Subtype; }; diff --git a/include/d/a/d_a_bird.h b/include/d/a/d_a_bird.h index 42db16b8..05450e45 100644 --- a/include/d/a/d_a_bird.h +++ b/include/d/a/d_a_bird.h @@ -26,11 +26,19 @@ public: STATE_FUNC_DECLARE(dBird_c, MiniGameEnd); STATE_FUNC_DECLARE(dBird_c, MiniGameLevelUpDemo); + // fn_129_8DD0, only referenced by d_a_obj_bird_sp + void accelerateTowards(mVec3_c &targetDirection); + s16 getNumDashes() const { return mNumDashes; } + static dBird_c *getInstance() { + return spInstance; + } + private: + static dBird_c *spInstance; /* 0x??? */ STATE_MGR_DECLARE(dBird_c); u8 _0x36C[0xF8E - 0x36C]; /* 0xF8E */ s16 mNumDashes; diff --git a/include/d/a/e/d_a_e_sm.h b/include/d/a/e/d_a_e_sm.h index 76a1882a..77fe923f 100644 --- a/include/d/a/e/d_a_e_sm.h +++ b/include/d/a/e/d_a_e_sm.h @@ -8,18 +8,19 @@ #include "d/col/bg/d_bg_s_acch.h" #include "d/col/cc/d_cc_d.h" #include "d/d_jnt_col.h" +#include "d/d_light_env.h" #include "d/d_shadow.h" #include "m/m3d/m_anmmatclr.h" #include "m/m3d/m_anmtexpat.h" #include "m/m_angle.h" #include "m/m_vec.h" #include "s/s_State.hpp" -#include "toBeSorted/blur_and_palette_manager.h" #include "toBeSorted/d_d3d.h" #include "toBeSorted/d_emitter.h" #include "toBeSorted/stage_render_stuff.h" #include "toBeSorted/time_area_mgr.h" + class dAcEsm_c : public dAcEnBase_c { public: enum SmColor_e { @@ -213,7 +214,7 @@ private: /* 0xBCC */ u8 field_0xBCC; /* 0xBCD */ u8 field_0xBCD; /* 0xBCE */ u8 field_0xBCE; - /* 0xBD0 */ LightParams mLightInfo; + /* 0xBD0 */ LIGHT_INFLUENCE mLightInfo; static bool sSomeArrayInit; static bool sSomeArray[9]; diff --git a/include/d/a/obj/d_a_obj_F400_gate_leaf.h b/include/d/a/obj/d_a_obj_F400_gate_leaf.h index a31e3ba8..24b73c1e 100644 --- a/include/d/a/obj/d_a_obj_F400_gate_leaf.h +++ b/include/d/a/obj/d_a_obj_F400_gate_leaf.h @@ -8,7 +8,14 @@ public: dAcOF400GateLeaf_c() {} virtual ~dAcOF400GateLeaf_c() {} + virtual bool createHeap() override; + virtual int create() override; + virtual int draw() override; + + u16 getStoryflag(); + private: + /* 0x330 */ m3d::smdl_c mMdl; }; #endif diff --git a/include/d/a/obj/d_a_obj_F400_gate_seal.h b/include/d/a/obj/d_a_obj_F400_gate_seal.h index f4f2714e..bcdb4e8e 100644 --- a/include/d/a/obj/d_a_obj_F400_gate_seal.h +++ b/include/d/a/obj/d_a_obj_F400_gate_seal.h @@ -2,13 +2,25 @@ #define D_A_OBJ_F400_GATE_SEAL_H #include "d/a/obj/d_a_obj_base.h" +#include "d/a/obj/d_a_obj_door.h" +#include "m/m3d/m_anmmatclr.h" +#include "m/m3d/m_smdl.h" class dAcOF400GateSeal_c : public dAcObjBase_c { public: dAcOF400GateSeal_c() {} virtual ~dAcOF400GateSeal_c() {} + virtual bool createHeap() override; + virtual int actorCreate() override; + virtual int actorPostCreate() override; + virtual int actorExecute() override; + virtual int draw() override; + private: + /* 0x330 */ m3d::smdl_c mMdl; + /* 0x34C */ m3d::anmMatClr_c mAnmClr; + /* 0x378 */ dAcRef_c mDoor; }; #endif diff --git a/include/d/a/obj/d_a_obj_base.h b/include/d/a/obj/d_a_obj_base.h index c8e1cd80..2b0c75d8 100644 --- a/include/d/a/obj/d_a_obj_base.h +++ b/include/d/a/obj/d_a_obj_base.h @@ -7,6 +7,7 @@ #include "d/col/c/c_cc_d.h" #include "d/col/c/c_m3d_g_aab.h" #include "d/d_jnt_col.h" +#include "d/d_light_env.h" #include "d/d_linkage.h" #include "egg/math/eggMath.h" #include "m/m3d/m_shadow.h" @@ -17,32 +18,6 @@ #include "m/m_vec.h" #include "m/types_m.h" -// Ghidra has it as `unk_ActorObjectBase` -struct LightingInfo { - /* 0x00 */ u8 mField_0x00[0x40 - 0x00]; - /* 0x40 */ mColor mTev0Color; - /* 0x44 */ mColor mTev1Color; - /* 0x48 */ mColor mTev2Color; - /* 0x4C */ mColor mTevPrevColor; - /* 0x50 */ mColor mTevK0Color; - /* 0x54 */ mColor mTevK1Color; - /* 0x58 */ mColor mTevK2Color; - /* 0x5C */ mColor mTevK3Color; - /* 0x60 */ u8 mLightingCode; - /* 0x61 */ u8 _0x61; - /* 0x62 */ u8 _0x62; - /* 0x63 */ u8 _0x63; - /* 0x64 */ u8 _0x64; - /* 0x65 */ bool mUseTev0; - /* 0x66 */ bool mUseTev1; - /* 0x67 */ bool mUseTev2; - /* 0x68 */ bool mUseTevPrev; - /* 0x69 */ bool mUseTevK0; - /* 0x6A */ bool mUseTevK1; - /* 0x6B */ bool mUseTevK2; - /* 0x6C */ bool mUseTevK3; - /* 0x6D */ u8 mField_0x69[0x70 - 0x6D]; -}; // Ghidra: ActorObjectBase // size: 0x330 @@ -76,7 +51,7 @@ public: /* 0x208 */ mAng3_c mStartingRot; /* 0x210 */ dLinkage_c mLinkage; /* 0x2B8 */ u32 mField_0x2B8; - /* 0x2BC */ LightingInfo mLightingInfo; + /* 0x2BC */ ActorLighting mLightingInfo; /* 0x32C */ u32 mField_0x32C; public: @@ -195,7 +170,7 @@ public: u32 roomId ); /* 8002efa0 */ void fn_8002efa0(); - /* 8002eff0 */ bool fn_8002eff0(f32 *, s16 *, UnkCollider *, f32 *, f32 *); + /* 8002eff0 */ bool fn_8002eff0(f32 *, s16 *, f32 *, f32 *, f32 *); /* 8002f190 */ void createChildAttached2( fProfile::PROFILE_NAME_e actorId, u32 params1, mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, u32 params2, u32 roomId diff --git a/include/d/a/obj/d_a_obj_bird_sp.h b/include/d/a/obj/d_a_obj_bird_sp.h index efeb9a2e..3a4919bc 100644 --- a/include/d/a/obj/d_a_obj_bird_sp.h +++ b/include/d/a/obj/d_a_obj_bird_sp.h @@ -2,13 +2,21 @@ #define D_A_OBJ_BIRD_SP_H #include "d/a/obj/d_a_obj_base.h" +#include "d/col/cc/d_cc_d.h" class dAcObjBirdSp_c : public dAcObjBase_c { public: dAcObjBirdSp_c() {} virtual ~dAcObjBirdSp_c() {} + virtual bool createHeap() override; + virtual int create() override; + virtual int actorExecute() override; + virtual int draw() override; + private: + static dCcD_SrcSph sCcSrc; + /* 0x330 */ dCcD_Sph mCollider; }; #endif diff --git a/include/d/a/obj/d_a_obj_blade.h b/include/d/a/obj/d_a_obj_blade.h index d2a7f71c..b0204632 100644 --- a/include/d/a/obj/d_a_obj_blade.h +++ b/include/d/a/obj/d_a_obj_blade.h @@ -2,13 +2,23 @@ #define D_A_OBJ_BLADE_H #include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_anmmdl.h" +#include "nw4r/g3d/res/g3d_resfile.h" class dAcOblade_c : public dAcObjBase_c { public: dAcOblade_c() {} virtual ~dAcOblade_c() {} + virtual bool createHeap() override; + virtual int create() override; + virtual int doDelete() override; + virtual int actorExecute() override; + virtual int draw() override; + private: + /* 0x330 */ nw4r::g3d::ResFile mResFile; + /* 0x334 */ m3d::mdlAnmChr mMdl; }; #endif diff --git a/include/d/a/obj/d_a_obj_distant_ship.h b/include/d/a/obj/d_a_obj_distant_ship.h index 42261420..d1df78b2 100644 --- a/include/d/a/obj/d_a_obj_distant_ship.h +++ b/include/d/a/obj/d_a_obj_distant_ship.h @@ -2,13 +2,25 @@ #define D_A_OBJ_DISTANT_SHIP_H #include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/res/g3d_resfile.h" class dAcOdistantShip_c : public dAcObjBase_c { public: dAcOdistantShip_c() {} virtual ~dAcOdistantShip_c() {} + virtual int create() override; + virtual int doDelete() override; + virtual int draw() override; + virtual bool createHeap() override; + virtual int actorExecute() override; + const char *getModelName(); private: + /* 0x330 */ nw4r::g3d::ResFile mBrres; + /* 0x334 */ m3d::smdl_c mModel; + /* 0x350 */ u8 mSubtype; + /* 0x351 */ bool mIsVisible; }; #endif diff --git a/include/d/a/obj/d_a_obj_door.h b/include/d/a/obj/d_a_obj_door.h index fa6c4c35..6681801e 100644 --- a/include/d/a/obj/d_a_obj_door.h +++ b/include/d/a/obj/d_a_obj_door.h @@ -8,6 +8,8 @@ public: dAcOdoor_c() {} virtual ~dAcOdoor_c() {} + bool isLocked(); + private: }; diff --git a/include/d/a/obj/d_a_obj_girahim_foot.h b/include/d/a/obj/d_a_obj_girahim_foot.h index 01476278..ddc5199a 100644 --- a/include/d/a/obj/d_a_obj_girahim_foot.h +++ b/include/d/a/obj/d_a_obj_girahim_foot.h @@ -2,19 +2,32 @@ #define D_A_OBJ_GIRAHIM_FOOT_H #include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_s_acch.h" +#include "d/d_shadow.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/res/g3d_resfile.h" #include "s/s_State.hpp" -#include "s/s_StateMgr.hpp" class dAcOgirahimFoot_c : public dAcObjBase_c { public: dAcOgirahimFoot_c() : mStateMgr(*this, sStateID::null) {} virtual ~dAcOgirahimFoot_c() {} + virtual int create() override; + virtual int doDelete() override; + virtual int draw() override; + virtual bool createHeap() override; + virtual int actorExecute() override; + STATE_FUNC_DECLARE(dAcOgirahimFoot_c, Wait); STATE_FUNC_DECLARE(dAcOgirahimFoot_c, Appear); private: - /* 0x??? */ STATE_MGR_DECLARE(dAcOgirahimFoot_c); + /* 0x330 */ nw4r::g3d::ResFile mRes; + /* 0x334 */ m3d::smdl_c mMdl; + /* 0x350 */ dShadowCircle_c mShadow; + /* 0x358 */ STATE_MGR_DECLARE(dAcOgirahimFoot_c); + /* 0x394 */ bool field_0x394; }; #endif diff --git a/include/d/a/obj/d_a_obj_impa_door.h b/include/d/a/obj/d_a_obj_impa_door.h index c30c6606..2ba7f85f 100644 --- a/include/d/a/obj/d_a_obj_impa_door.h +++ b/include/d/a/obj/d_a_obj_impa_door.h @@ -2,8 +2,9 @@ #define D_A_OBJ_IMPA_DOOR_H #include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/res/g3d_resfile.h" #include "s/s_State.hpp" -#include "s/s_StateMgr.hpp" class dAcOimpaDoor_c : public dAcObjBase_c { public: @@ -12,8 +13,16 @@ public: STATE_FUNC_DECLARE(dAcOimpaDoor_c, Wait); + virtual bool createHeap() override; + virtual int create() override; + virtual int doDelete() override; + virtual int actorExecute() override; + virtual int draw() override; + private: - /* 0x??? */ STATE_MGR_DECLARE(dAcOimpaDoor_c); + /* 0x330 */ nw4r::g3d::ResFile mResFile; + /* 0x334 */ m3d::smdl_c mMdl; + /* 0x350 */ STATE_MGR_DECLARE(dAcOimpaDoor_c); }; #endif diff --git a/include/d/a/obj/d_a_obj_island_LOD.h b/include/d/a/obj/d_a_obj_island_LOD.h index c6fb5449..ce1cb0cc 100644 --- a/include/d/a/obj/d_a_obj_island_LOD.h +++ b/include/d/a/obj/d_a_obj_island_LOD.h @@ -8,7 +8,19 @@ public: dAcOislandLOD_c() {} virtual ~dAcOislandLOD_c() {} + virtual bool createHeap() override; + virtual int create() override; + virtual int doDelete() override; + virtual int actorExecute() override; + virtual int draw() override; + private: + static const char* const resFilenames[5]; + static const char* const resMdlNames[5]; + + /* 0x330 */ nw4r::g3d::ResFile mResFile; + /* 0x334 */ m3d::smdl_c mMdl; + /* 0x350 */ u8 mMdlLodIdx; }; #endif diff --git a/include/d/a/obj/d_a_obj_mapparts.h b/include/d/a/obj/d_a_obj_mapparts.h index 7242dd91..75c6993f 100644 --- a/include/d/a/obj/d_a_obj_mapparts.h +++ b/include/d/a/obj/d_a_obj_mapparts.h @@ -8,6 +8,8 @@ public: dAcOMapparts_c() {} virtual ~dAcOMapparts_c() {} + virtual int create() override; + private: }; diff --git a/include/d/a/obj/d_a_obj_mole_cover.h b/include/d/a/obj/d_a_obj_mole_cover.h index a03a8323..3c1216d8 100644 --- a/include/d/a/obj/d_a_obj_mole_cover.h +++ b/include/d/a/obj/d_a_obj_mole_cover.h @@ -2,13 +2,25 @@ #define D_A_OBJ_MOLE_COVER_H #include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_w.h" +#include "m/m3d/m_smdl.h" +#include "nw4r/g3d/res/g3d_resfile.h" class dAcOmoleCover_c : public dAcObjBase_c { public: dAcOmoleCover_c() {} virtual ~dAcOmoleCover_c() {} + virtual bool createHeap() override; + virtual int create() override; + virtual int doDelete() override; + virtual int actorExecute() override; + virtual int draw() override; + private: + /* 0x330 */ nw4r::g3d::ResFile mResFile; + /* 0x334 */ m3d::smdl_c mMdl; + /* 0x350 */ dBgW mBgW; }; #endif diff --git a/include/d/a/obj/d_a_obj_puzzle_island.h b/include/d/a/obj/d_a_obj_puzzle_island.h index 9300e35f..480712b9 100644 --- a/include/d/a/obj/d_a_obj_puzzle_island.h +++ b/include/d/a/obj/d_a_obj_puzzle_island.h @@ -2,13 +2,26 @@ #define D_A_OBJ_PUZZLE_ISLAND_H #include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_w.h" +#include "m/m3d/m_smdl.h" class dAcOpuzzleIsland_c : public dAcObjBase_c { public: dAcOpuzzleIsland_c() {} virtual ~dAcOpuzzleIsland_c() {} + virtual bool createHeap() override; + virtual int create() override; + virtual int doDelete() override; + virtual int actorExecute() override; + virtual int draw() override; + + static void rideCallback(dBgW *, dAcObjBase_c *, dAcObjBase_c *); + private: + /* 0x330 */ m3d::smdl_c mMdl; + /* 0x34C */ nw4r::g3d::ResFile mResFile; + /* 0x350 */ dBgW mBgW; }; #endif diff --git a/include/d/a/obj/d_a_obj_rail_post.h b/include/d/a/obj/d_a_obj_rail_post.h index 7e9e32e9..ba5af422 100644 --- a/include/d/a/obj/d_a_obj_rail_post.h +++ b/include/d/a/obj/d_a_obj_rail_post.h @@ -2,13 +2,22 @@ #define D_A_OBJ_RAIL_POST_H #include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_w.h" class dAcORailPost : public dAcObjBase_c { public: dAcORailPost(); virtual ~dAcORailPost(); + virtual bool createHeap() override; + virtual int create() override; + virtual int doDelete() override; + virtual int actorExecute() override; + virtual int draw() override; + private: + /* 0x330 */ m3d::smdl_c mMdl; + /* 0x350 */ dBgW mBgW; }; #endif diff --git a/include/d/a/obj/d_a_obj_rope_base.h b/include/d/a/obj/d_a_obj_rope_base.h index 8c43a7c1..53c232b0 100644 --- a/include/d/a/obj/d_a_obj_rope_base.h +++ b/include/d/a/obj/d_a_obj_rope_base.h @@ -2,13 +2,26 @@ #define D_A_OBJ_ROPE_BASE_H #include "d/a/obj/d_a_obj_base.h" +#include "m/m3d/m_smdl.h" +#include "m/m_vec.h" +#include "nw4r/g3d/res/g3d_resfile.h" class dAcOropeBase_c : public dAcObjBase_c { public: dAcOropeBase_c() {} virtual ~dAcOropeBase_c() {} + virtual bool createHeap() override; + virtual int create() override; + virtual int doDelete() override; + virtual int actorExecute() override; + virtual int draw() override; + private: + /* 0x330 */ nw4r::g3d::ResFile mResFile; + /* 0x334 */ m3d::smdl_c mMdl; + /* 0x350 */ mVec3_c mRopePos; + /* 0x35C */ bool field_0x35C; }; #endif diff --git a/include/d/a/obj/d_a_obj_stream_lava.h b/include/d/a/obj/d_a_obj_stream_lava.h index a4226a87..78857b24 100644 --- a/include/d/a/obj/d_a_obj_stream_lava.h +++ b/include/d/a/obj/d_a_obj_stream_lava.h @@ -1,20 +1,47 @@ #ifndef D_A_OBJ_STREAM_LAVA_H #define D_A_OBJ_STREAM_LAVA_H +#include "common.h" #include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_w.h" +#include "m/m3d/m_anmmatclr.h" +#include "m/m3d/m_anmtexsrt.h" +#include "nw4r/g3d/res/g3d_resfile.h" #include "s/s_State.hpp" -#include "s/s_StateMgr.hpp" +#include "toBeSorted/actor_event.h" +#include "toBeSorted/stage_render_stuff.h" class dAcOstreamLava_c : public dAcObjBase_c { public: - dAcOstreamLava_c() : mStateMgr(*this, sStateID::null) {} + dAcOstreamLava_c() : mStateMgr(*this, sStateID::null), mEvent(*this, nullptr), mScnCallback(this) {} + virtual int create() override; + virtual int doDelete() override; + virtual int draw() override; + virtual bool createHeap() override; virtual ~dAcOstreamLava_c() {} + virtual int actorExecute() override; STATE_FUNC_DECLARE(dAcOstreamLava_c, Wait); STATE_FUNC_DECLARE(dAcOstreamLava_c, Stream); private: - /* 0x??? */ STATE_MGR_DECLARE(dAcOstreamLava_c); + const static f32 unkFloat0; + static u32 eventFlags1; + static u32 eventFlags2; + + /* 0x330 */ nw4r::g3d::ResFile mResFile; + /* 0x334 */ m3d::smdl_c mModel; + /* 0x350 */ m3d::anmTexSrt_c mAnmTexSrtWait; + /* 0x37C */ m3d::anmMatClr_c mAnmMatClr; + /* 0x3A8 */ dBgW mCollision; + /* 0x5B8 */ STATE_MGR_DECLARE(dAcOstreamLava_c); + /* 0x5F4 */ ActorEventRelated mEvent; + /* 0x644 */ dScnCallback_c mScnCallback; + + /* 0x650 */ u8 mSubtype; + /* 0x651 */ u8 mShouldStreamSceneflag; + /* 0x652 */ u8 mEventId; + /* 0x653 */ bool mHideActor; }; #endif diff --git a/include/d/a/obj/d_a_obj_tarzan_pole.h b/include/d/a/obj/d_a_obj_tarzan_pole.h index 419133c6..819fc342 100644 --- a/include/d/a/obj/d_a_obj_tarzan_pole.h +++ b/include/d/a/obj/d_a_obj_tarzan_pole.h @@ -2,13 +2,35 @@ #define D_A_OBJ_TARZAN_POLE_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 "m/m3d/m_smdl.h" +#include "m/m_vec.h" +#include "nw4r/g3d/res/g3d_resfile.h" class dAcOTarzanPole_c : public dAcObjBase_c { public: dAcOTarzanPole_c() {} virtual ~dAcOTarzanPole_c() {} + virtual bool createHeap() override; + virtual int create() override; + virtual int doDelete() override; + virtual int actorExecute() override; + virtual int draw() override; + private: + static dCcD_SrcSph sCcSrc; + + static const f32 sXOffset; + static const f32 sYOffset; + + /* 0x330 */ nw4r::g3d::ResFile mBrres; + /* 0x334 */ m3d::smdl_c mMdl; + /* 0x350 */ dBgW mBgCollider; + /* 0x560 */ dCcD_Sph mCollider; + /* 0x6b0 */ mVec3_c mVec; // TODO: Find better name, once we've figured out it's purpose + /* 0x6bc */ f32 mFloat; // TODO: No usage found yet }; #endif diff --git a/include/d/a/obj/d_a_obj_tbox.h b/include/d/a/obj/d_a_obj_tbox.h index 9c52e759..b3c95053 100644 --- a/include/d/a/obj/d_a_obj_tbox.h +++ b/include/d/a/obj/d_a_obj_tbox.h @@ -8,6 +8,7 @@ #include "d/col/bg/d_bg_w.h" #include "d/col/cc/d_cc_d.h" #include "d/d_cc.h" +#include "d/d_light_env.h" #include "d/d_shadow.h" #include "m/m3d/m_anmchr.h" #include "m/m3d/m_anmmatclr.h" @@ -20,10 +21,10 @@ #include "s/s_State.hpp" #include "toBeSorted/actor_event.h" #include "toBeSorted/attention.h" -#include "toBeSorted/blur_and_palette_manager.h" #include "toBeSorted/dowsing_target.h" #include "toBeSorted/stage_render_stuff.h" + class dAcTbox_c : public dAcObjBase_c { public: enum TboxVariant_e { @@ -139,7 +140,7 @@ private: /* 0x049C */ m3d::anmTexPat_c mAnmGoddessPat; /* 0x04C8 */ dScnCallback_c mScnCallback; /* 0x04D4 */ dShadowCircle_c mShadowCircle; - /* 0x04DC */ LightParams mLightInfo; + /* 0x04DC */ LIGHT_INFLUENCE mLightInfo; /* 0x04F8 */ dBgW mBgWs[2]; /* 0x0918 */ dCcD_Linked_Unk mCcD1; /* 0x0B30 */ dCcD_Linked_Unk mCcD2; diff --git a/include/d/d_light_env.h b/include/d/d_light_env.h new file mode 100644 index 00000000..c5c98188 --- /dev/null +++ b/include/d/d_light_env.h @@ -0,0 +1,496 @@ +#ifndef D_LIGHT_ENV_H +#define D_LIGHT_ENV_H + +#include "common.h" +#include "m/m_color.h" +#include "m/m_vec.h" +#include "toBeSorted/tlist.h" + +class ActorLighting { +public: + typedef TList ListType; + /* 0x00 */ TListNode mNode; + static ListType sList; + static void fn_80026500(); + static const mColor &getLightTev2Color(); + static const mColor &getLightTev1Color(); + static const mColor &getLightTev0Color(); + static const mColor &getLightTevKColor(); + +public: + virtual ~ActorLighting(); + + void reset(); + +public: + /* 0x0C */ f32 field_0x0C; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 field_0x18; + /* 0x1C */ f32 field_0x1C; + /* 0x20 */ f32 field_0x20; + /* 0x24 */ f32 field_0x24; + /* 0x28 */ f32 field_0x28; + /* 0x2C */ f32 field_0x2C; + /* 0x30 */ f32 field_0x30; + /* 0x34 */ f32 field_0x34; + /* 0x38 */ f32 field_0x38; + /* 0x3C */ s32 mLightSetIdx; + /* 0x40 */ mColor mTev0Color; + /* 0x44 */ mColor mTev1Color; + /* 0x48 */ mColor mTev2Color; + /* 0x4C */ mColor mTevPrevColor; + /* 0x50 */ mColor mTevK0Color; + /* 0x54 */ mColor mTevK1Color; + /* 0x58 */ mColor mTevK2Color; + /* 0x5C */ mColor mTevK3Color; + /* 0x60 */ u8 mLightingCode; + /* 0x61 */ u8 field_0x61; + /* 0x62 */ u8 field_0x62; + /* 0x63 */ u8 field_0x63; + /* 0x64 */ u8 field_0x64; + /* 0x65 */ bool mUseTev0; + /* 0x66 */ bool mUseTev1; + /* 0x67 */ bool mUseTev2; + /* 0x68 */ bool mUseTevPrev; + /* 0x69 */ bool mUseTevK0; + /* 0x6A */ bool mUseTevK1; + /* 0x6B */ bool mUseTevK2; + /* 0x6C */ bool mUseTevK3; +}; + +struct LIGHT_INFLUENCE { + void SetColor(mColor clr) { + mClr = clr; + } + void SetScale(f32 scale) { + mScale = scale; + } + void SetPosition(const mVec3_c &pos) { + mPos.x = pos.x; + mPos.y = pos.y; + mPos.z = pos.z; + } + + /* 0x00 */ mVec3_c mPos; + /* 0x0C */ mColor mClr; + /* 0x10 */ f32 mScale; + /* 0x14 */ s32 mIdx; + /* 0x18 */ bool field_0x18; +}; + +// This is a weird one - mColor / nw4r::ut::Color are assumed +// to be 4-byte-aligned so that all the u32 type punning works +// correctly, but field_0x1D5 is unaligned and uses a separate +// assignment operator! So we'll go with a separate type for now. +struct UnalignedColor { + UnalignedColor &operator=(const mColor &color) { + r = color.r; + g = color.g; + b = color.b; + a = color.a; + return *this; + } + u8 r, g, b, a; +}; + +struct PaletteDefaultMCF { + /* 0x00 */ mColor MA00_kColor3; + /* 0x04 */ mColor MA01_tevReg1; + /* 0x08 */ mColor MA01_kColor2; + /* 0x0C */ mColor MA02_tevReg1; + /* 0x10 */ mColor MA02_kColor2; + /* 0x14 */ mColor MA03_kColor3; + /* 0x18 */ mColor MA06_kColor3; + /* 0x1C */ mColor field_0x1C; +}; + +struct TwoPaletteDefaultMCF { + /* 0x00 */ PaletteDefaultMCF field_0x00; + /* 0x20 */ PaletteDefaultMCF field_0x20; +}; + +struct ActorPalette { + /* 0x000 */ mColor mAmbientClr; + /* 0x004 */ mColor mDiffuseClr; + /* 0x008 */ mColor mBrightnessClr; + /* 0x00C */ mColor mSpecularClr; + /* 0x010 */ mColor mDarkShadowClr; + /* 0x014 */ mColor mDarkLightClr; + /* 0x018 */ f32 mSpecular; + /* 0x01C */ mColor field_0x01C; + /* 0x020 */ f32 mTemperature; // -1 cool, 1 warm + /* 0x024 */ f32 field_0x24; + /* 0x028 */ mColor mShadowClr; + /* 0x02C */ mColor field_0x02C; +}; + +struct StagePalette { + /* 0x000 */ f32 mBrightness; + /* 0x004 */ mColor mShadowClr; + /* 0x008 */ mColor mLightClr; + /* 0x00C */ f32 mSunMoonAngle1; + /* 0x010 */ f32 mSunMoonAngle2; + + /* 0x014 */ mColor field_0x014; + /* 0x018 */ u8 field_0x018[5]; + /* 0x020 */ mColor field_0x020[5]; + /* 0x034 */ f32 field_0x034[5]; + /* 0x048 */ f32 field_0x048[5]; + + /* 0x05C */ f32 field_0x05C; + /* 0x060 */ mColor field_0x060; + /* 0x064 */ u8 field_0x064[5]; + /* 0x06C */ mColor field_0x06C[5]; + /* 0x080 */ f32 field_0x080[5]; + /* 0x094 */ f32 field_0x094[5]; + + /* 0x0A8 */ f32 field_0x0A8; + /* 0x0AC */ mColor field_0x0AC; + /* 0x0B0 */ u8 field_0x0B0[5]; + /* 0x0B8 */ mColor field_0x0B8[5]; + /* 0x0CC */ f32 field_0x0CC[5]; + /* 0x0E0 */ f32 field_0x0E0[5]; + + /* 0x0F4 */ f32 field_0x0F4; + /* 0x0F8 */ mColor field_0x0F8; + /* 0x0FC */ u8 field_0x0FC[5]; + /* 0x104 */ mColor field_0x104[5]; + /* 0x118 */ f32 field_0x118[5]; + /* 0x12C */ f32 field_0x12C[5]; +}; + +struct SkyPalette { + /* 0x000 */ mColor field_0x00; + /* 0x004 */ mColor field_0x04; + /* 0x008 */ mColor field_0x08; + /* 0x00C */ mColor mCloudColor; + /* 0x010 */ mColor mSkyColor; + /* 0x014 */ mColor field_0x14; + /* 0x018 */ mColor mSkyFilter; + /* 0x01C */ mVec3_c mSkyCenter; + /* 0x028 */ mVec3_c mSkyScale; +}; + +struct SffSub { + mColor field_0x00; + f32 field_0x04; + f32 field_0x08; +}; + +struct SpfSubUnk0 { + /* 0x00 */ SffSub field_0x00; + /* 0x0C */ f32 field_0x0C[3]; +}; + +struct SpfSubUnk1 { + /* 0x00 */ u8 field_0x00; + /* 0x04 */ f32 field_0x04; + /* 0x08 */ f32 field_0x08; + /* 0x0C */ u8 field_0x0C; + /* 0x10 */ f32 field_0x10; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ u8 field_0x18; + /* 0x19 */ UnalignedColor field_0x19; // Bloom Color + /* 0x1D */ u8 field_0x1D; +}; + +struct SpfSubUnk2 { + /* 0x00 */ f32 field_0x00; // Blur Dist + /* 0x04 */ f32 field_0x04; // Blur Diffuse + /* 0x08 */ f32 field_0x08; // Softness Distance + /* 0x0C */ f32 field_0x0C; // Softness diffuse + /* 0x10 */ u8 field_0x10; + /* 0x11 */ u8 field_0x11; // Turning this to not 0 disables effects + /* 0x12 */ u16 field_0x12; + /* 0x14 */ f32 field_0x14; + /* 0x18 */ f32 field_0x18; + /* 0x1C */ f32 field_0x1C; // Blur? + /* 0x20 */ f32 field_0x20; // Fog? Shadow? +}; + +// Broken up in a way to get the assignment operator to match. +// Not 100% certain +struct Spf { + /* 0x000 */ ActorPalette mActorPalette; + /* 0x030 */ StagePalette mStagePalette; + /* 0x170 */ SkyPalette mSkyPalette; + /* 0x1A4 */ SpfSubUnk0 field_0x1A4; + /* 0x1BC */ SpfSubUnk1 field_0x1BC; + /* 0x1DC */ SpfSubUnk2 field_0x1D4; + /* 0x200 */ mColor mParticleTransparentClr; + /* 0x204 */ mColor mParticleSolidClr; +}; + +struct Sff { + SffSub field_0x00[3]; +}; + +struct EFLIGHT_PROC { + /* 0x00 */ u8 mState; + /* 0x01 */ u8 mFrame; + /* 0x04 */ int mLightType; + /* 0x08 */ LIGHT_INFLUENCE field_0x8; +}; + +// Deals with the direction wind particles go? +struct WIND_INFLUENCE { + /* 0x00 */ mVec3_c mVel; + /* 0x0C */ f32 field_0x0C; + /* 0x10 */ f32 field_0x10; +}; + +struct PaletteEAF_smol_entry { + mColor field_0x00; + mColor field_0x04; + mColor field_0x08; + mColor field_0x0C; +}; + +struct PaletteEAF_smol { + PaletteEAF_smol_entry field_0x00[8]; +}; + +struct PaletteEAF_big_entry { + mColor field_0x00; + mColor field_0x04; + mColor field_0x08; + mColor field_0x0C; + u8 field_0x10; +}; + +struct PaletteEAF_big { + /* 0x00 */ PaletteEAF_big_entry field_0x00[8]; +}; + +// Apparently particle color related +struct Bpm3 { + /* 0x00 */ PaletteEAF_smol field_0x00[0x20]; +}; + +struct Bpm4 { + /* 0x00 */ PaletteEAF_big field_0x00[0x20]; +}; + +struct SHADOW_INFLUENCE { + /* 0x00 */ mVec3_c mPos; + /* 0x0C */ f32 mRadius; + /* 0x10 */ s16 mIdx; +}; +struct Bpm8 { + /* 0x00 */ mVec3_c mPos; + /* 0x0C */ f32 mRadius; + /* 0x10 */ s32 field_0x10; +}; + +struct Bpm9 { + /* 0x00 */ bool field_0x00; + /* 0x04 */ mVec3_c mPos; + /* 0x10 */ f32 mRadius; +}; + +struct Mist { + /* 0x00 */ u8 mMode; + /* 0x01 */ u8 mDecay; + /* 0x02 */ u8 mAlpha; + /* 0x04 */ f32 mDirection; + /* 0x08 */ f32 mSpeed; +}; + +struct SpfSetting { + s16 mIdxStart; + s16 mIdxEnd; + f32 mRatio; +}; + +struct SpfTransitionSetting { + s16 mIdxBefore; + s16 mIdxAfter; + s32 mNumFrames; +}; + +class dLightEnv_c { +public: + dLightEnv_c(); + virtual ~dLightEnv_c(); + + static dLightEnv_c &GetInstance() { + return sInstance; + } + + static dLightEnv_c *GetPInstance() { + return sPInstance; + } + + void get_vectle_calc(const mVec3_c *, const mVec3_c *, mVec3_c *); + void sphere_to_cartesian(f32 ang_y, f32 ang_xz, mVec3_c *); + + void efplight_set(LIGHT_INFLUENCE *pLightInfo); + void efplight_cut(LIGHT_INFLUENCE *pLightInfo); + LIGHT_INFLUENCE *eflight_influence(const mVec3_c *); + + // Name is guess based on closest func in tp + void SordFlush_set(const mVec3_c *pPos, s32 lightType); + + void plight_set(LIGHT_INFLUENCE *pLightInfo); + void plight_cut(LIGHT_INFLUENCE *pLightInfo); + LIGHT_INFLUENCE *light_influence(const mVec3_c *, bool param2); + LIGHT_INFLUENCE *light_influence2(const mVec3_c *, bool param2); + + void shadow_set(SHADOW_INFLUENCE *pShadowInfo); + void shadow_cut(SHADOW_INFLUENCE *pShadowInfo); + SHADOW_INFLUENCE *shadow_influence(const mVec3_c *); + + void setLightFilter(f32 ratio); + void set0x35B0(f32 f); + + // Params are guesses + void setBPM8(const mVec3_c *pos, u32 type, f32 radius); + void setBPM8_Type4(const mVec3_c *pos); + void setBPM8_Type6(const mVec3_c *pos); + void setBPM8_Type10(const mVec3_c *pos); + void setBPM8_Type10_2(const mVec3_c *pos); + void setBPM8_Type6_2(const mVec3_c *pos); + bool check_BPM8(const mVec3_c *pos, mVec3_c *pOutPos); + bool check_BPM8_1001(const mVec3_c *pos, mVec3_c *pOutPos); + bool check_BPM8_501(const mVec3_c *pos, mVec3_c *pOutPos); + + bool setUnk(const mVec3_c *pos, f32 radius); + void setBPM9(const mVec3_c *pos, f32 radius); + bool check_BPM9(const mVec3_c *pos); + + s32 checkBPM9_Entity(mVec3_c *pOutPos); + + void setAlternateRoomId(s32 roomId); + s32 getAlterateRoomId(); + + mColor color_ratio_set(const mColor &start, const mColor &end, f32 ratio); + mVec3_c vec_ratio_set(const mVec3_c &start, const mVec3_c &end, f32 ratio); + f32 f32_ratio_set(const f32 start, const f32 end, f32 ratio); + u16 u16_ratio_set(const u16 start, const u16 end, f32 ratio); + u8 u8_ratio_set(const u8 start, const u8 end, f32 ratio); + + void spf_ratio_set(Spf &out, const Spf &start, const Spf &end, f32 ratio); + void light_influence_ratio_set( + LIGHT_INFLUENCE &out, const LIGHT_INFLUENCE &start, const LIGHT_INFLUENCE &end, f32 ratio + ); + void sff_ratio_set(Sff &out, const Sff &start, const Sff &end, f32 ratio); + + void set_override_spf(s16 start, s16 end, f32 ratio); + + void setMist(u8 mode, u8 decay, u8 alpha, f32 dir, f32 speed); + void setMistMode3(const mVec3_c &vel, f32 value); + + void setDOF(f32 dof); + void disableDOF(); + + void setWind(mVec3_c mPos, f32 f); + + void setField_0x2F20(f32 arg) { + field_0x2F20 = arg; + } + + void set_palette_transition(s16 before, s16 after, s32 numFrames); + + // All related + void fn_80024740(u8, u8); + bool fn_80024770(u8); + bool fn_800247A0(u8); + + u8 get0x2DE8() const { + return field_0x2DE8[0]; + } + + const PaletteDefaultMCF &GetCurrentDefaultMcf() const { + return field_0x5CE4; + } + + const Spf &GetCurrentSpf() const { + return currentSpf; + } + + const PaletteEAF_smol_entry &getSmallEAF(s32 idx1, s32 idx2) { + return field_0x38E4.field_0x00[idx1].field_0x00[idx2]; + } + + f32 getfield_0x2F14() const { + return field_0x2F14; + } + + f32 getfield_0x2F18() const { + return field_0x2F18; + } + + f32 getfield_0x2F1C() const { + return field_0x2F1C; + } + +private: + /* 0x0004 */ Spf currentSpf; + /* 0x020C */ Spf spfs[20]; + /* 0x2AAC */ Sff currentSff; + /* 0x2AD0 */ Sff sffs[20]; + /* 0x2DA0 */ SpfSetting mCurrentSpfSetting; + /* 0x2DA8 */ u8 field_0x2DA8[0x2DB4 - 0x2DA8]; + /* 0x2DB4 */ SpfTransitionSetting mTransitionSpfSetting; + /* 0x2DBC */ u8 field_0x2DBC[0x2DC0 - 0x2DBC]; + /* 0x2DC0 */ SpfSetting mOverrideSpfSetting; + /* 0x2DC8 */ Mist mMistInfo; + /* 0x2DD4 */ mVec3_c mMistPos; + /* 0x2DE0 */ bool mDofEnabled; + /* 0x2DE4 */ f32 mDof; + /* 0x2DE8 */ u8 field_0x2DE8[0x2DEC - 0x2DE8]; + /* 0x2DEC */ mColor field_0x2DEC; + /* 0x2DF0 */ u8 field_0x2DF0[0x2DF4 - 0x2DF0]; + /* 0x2DF4 */ mColor field_0x2DF4; + /* 0x2DF8 */ mVec3_c field_0x2DF8; + /* 0x2E04 */ u8 field_0x2E04[0x2E08 - 0x2E04]; + /* 0x2E08 */ mVec3_c field_0x2E08[5]; + /* 0x2E44 */ mVec3_c field_0x2E44[5]; + /* 0x2E80 */ mVec3_c field_0x2E80[5]; + /* 0x2EBC */ mVec3_c field_0x2EBC[5]; + /* 0x2EF8 */ mColor field_0x2EF8; + /* 0x2EFC */ mColor field_0x2EFC; + /* 0x2F00 */ mVec3_c field_0x2F00; + /* 0x2F0C */ s16 field_0x2F0C; + /* 0x2F0E */ s16 field_0x2F0E; + /* 0x2F10 */ u8 field_0x2F10; + /* 0x2F14 */ f32 field_0x2F14; + /* 0x2F18 */ f32 field_0x2F18; + /* 0x2F1C */ f32 field_0x2F1C; + /* 0x2F20 */ f32 field_0x2F20; + /* 0x2F24 */ u8 field_0x2F24[4]; + /* 0x2F28 */ LIGHT_INFLUENCE *efplight[5]; + /* 0x2F3C */ LIGHT_INFLUENCE *pointlight[200]; + /* 0x325C */ SHADOW_INFLUENCE *pshadow[200]; + /* 0x357C */ EFLIGHT_PROC eflight; + /* 0x35A0 */ WIND_INFLUENCE mWind; + /* 0x35B4 */ SHADOW_INFLUENCE field_0x35B4[8]; + /* 0x3654 */ Bpm8 field_0x3654[10]; + /* 0x371C */ Bpm9 field_0x371C[20]; + /* 0x387C */ u32 field_0x387C; + /* 0x38B0 */ bool field_0x38B0; + /* 0x38B4 */ mVec3_c field_0x38B4; + /* 0x38C0 */ f32 field_0x38C0; + /* 0x38C4 */ s32 field_0x38C4; + /* 0x38C8 */ mVec3_c field_0x38C8; + /* 0x38D4 */ u32 mPlayerRoomId; + /* 0x38D8 */ s32 mAlternateRoomId; + /* 0x38D8 */ u32 field_0x38DC; + /* 0x38D8 */ s32 field_0x38E0; + /* 0x38E4 */ Bpm3 field_0x38E4; + /* 0x48E4 */ Bpm4 field_0x48E4; + /* 0x5CE4 */ PaletteDefaultMCF field_0x5CE4; + /* 0x5D04 */ TwoPaletteDefaultMCF field_0x5D04; + /* 0x5D44 */ u8 field_0x5D44[0x5D59 - 0x5D44]; + /* 0x5D59 */ struct { // Anonymous until more is known + bool mEnabled; + u8 mValue; + } field_0x5D59[9]; + /* 0x5D6C */ u8 field_0x5D6C[0x5D70 - 0x5D6C]; + + static dLightEnv_c sInstance; + static dLightEnv_c *sPInstance; +}; + +#endif diff --git a/include/d/d_obj_light.h b/include/d/d_obj_light.h new file mode 100644 index 00000000..bc1065c4 --- /dev/null +++ b/include/d/d_obj_light.h @@ -0,0 +1,51 @@ +#ifndef D_OBJ_LIGHT_H +#define D_OBJ_LIGHT_H + +#include "d/d_base.h" +#include "f/f_base.h" +#include "m/m_color.h" +#include "toBeSorted/d_emitter.h" + +struct UnkLightThing /* : Inheritance Chain TODO */ { + UnkLightThing(); + virtual ~UnkLightThing(); + + /* 0x04 */ u8 _0x04[0x40 - 0x04]; +}; +class dObjLight_c : public dBase_c { +public: + dObjLight_c(); + + virtual ~dObjLight_c() {} + virtual int create() override; + virtual int doDelete() override; + virtual int execute() override; + virtual int draw() override; + +public: + static bool CreateInstance(); + static dObjLight_c *GetInstance(); + + mColor &GetColor0x68(); + mColor &GetColor0x6C(); + mColor &GetColor0x100(); + mColor &GetColor0x104(); + +private: + /* 0x068 */ mColor field_0x68[1][3]; + /* 0x074 */ EffectsStruct mEff; + /* 0x0A8 */ u8 _0xA8[0xB4 - 0xA8]; + /* 0x0B4 */ mColor field_0xB4; + /* 0x0B8 */ u8 _0xB8[0xD0 - 0xB8]; + /* 0x0D0 */ mColor field_0xD0; + /* 0x0D4 */ u8 _0xD4[0x100 - 0xD4]; + /* 0x100 */ mColor field_0x100; + /* 0x104 */ mColor field_0x104; + /* 0x108 */ u8 _0x108[0x10C - 0x108]; + /* 0x10C */ UnkLightThing field_0x10C[8]; + +private: + static dObjLight_c sInstance; +}; + +#endif diff --git a/include/d/flag/baseflag_manager.h b/include/d/flag/baseflag_manager.h index 932e3b76..db0aa401 100644 --- a/include/d/flag/baseflag_manager.h +++ b/include/d/flag/baseflag_manager.h @@ -35,6 +35,10 @@ public: u16 getUncommittedValue_Priv(u16 flag) const; + u32 checkFlagValid(u16 counterIdx) const { + return mpFlagIndex->checkFlagValid(counterIdx, mFlagCount); + } + protected: void setFlagSizes(u16 flagCount, u16 flagSizeBytes); diff --git a/include/d/snd/d_snd_3d_actor.h b/include/d/snd/d_snd_3d_actor.h new file mode 100644 index 00000000..6f3ad6d4 --- /dev/null +++ b/include/d/snd/d_snd_3d_actor.h @@ -0,0 +1,96 @@ +#ifndef D_SND_ACTOR_H +#define D_SND_ACTOR_H + +#include "common.h" +#include "d/snd/d_snd_misc.h" +#include "nw4r/math/math_types.h" +#include "nw4r/snd/snd_Sound3DActor.h" + +class dSnd3DActor_c : public nw4r::snd::Sound3DActor { +public: + dSnd3DActor_c(dSndSourceParam *pSourceParam, u8 sourceType); + + virtual ~dSnd3DActor_c() {} + + virtual bool d_vt_0x30() { + return true; + } + + virtual void d_vt_0x34(const nw4r::math::VEC3 &); + + virtual void d_vt_0x38(bool flag, int fadeFrames) = 0; + + virtual UNKWORD d_vt_0x3C() { + return 0; + } + + virtual UNKWORD d_vt_0x40() { + return 0; + } + + virtual UNKWORD d_vt_0x44() { + return 0; + } + + virtual const nw4r::math::VEC3 &getPositionRelativeToPlayer(); + virtual f32 getDistanceToPlayer(); // vt 0x4C + virtual void updatePositionRelativeToPlayer(); // vt 0x50 + virtual void updateDistanceToPlayer(); // vt 0x54 + virtual void d_vt_0x58() = 0; + virtual void d_vt_0x5C() = 0; + + void resetCachedRelativePositions(); + + void updatePositionTransformedByListener(); + void updateCameraDirectionDot(); + void updatePositionRelativeToCameraTarget(); + void calculatePositionRelativeToCameraTarget(); + void updateDistanceToCameraTarget(); + void calculatePositionRelativeToListener(); + void updatePositionRelativeToListener(); + void updateDistanceToListener(); + + bool checkFlag(u16 flag) const { + return (mFlags & flag); + } + + void setFlag(u16 flag) { + mFlags |= flag; + } + + f32 getDistanceToListener() { + updateDistanceToListener(); + return mDistanceToListener; + } + + bool hasPlayingSounds() const; + bool isPlayingSound(u32 id); + + const char *soundIdToSoundLabel(u32 soundId) const; + u32 soundLabelToSoundId(const char *soundLabel) const; + +protected: + // a_ prefix to prevent multiple inheritance clashes + /* 0x7D */ u8 a_field_0x7D; + /* 0x7E */ u8 a_field_0x7E; + /* 0x7F */ u8 a_field_0x7F; + /* 0x80 */ u8 a_field_0x80; + /* 0x84 */ f32 a_field_0x84; + /* 0x88 */ f32 a_field_0x88; + /* 0x8C */ f32 a_field_0x8C; + /* 0x90 */ f32 a_field_0x90; + /* 0x94 */ f32 mDistanceToListener; + /* 0x98 */ f32 mCameraDirectionDot; + /* 0x9C */ f32 a_field_0x9C; + /* 0xA0 */ nw4r::math::VEC3 mPositionRelativeToListener; + /* 0xAC */ nw4r::math::VEC3 mPositionTransformedByListener; + /* 0xB8 */ f32 mDistanceToCameraTarget; + /* 0xBC */ nw4r::math::VEC3 mPositionRelativeToCameraTarget; + /* 0xC8 */ dSndSourceParam *mpSourceParam; + /* 0xCC */ u16 mFlags; + /* 0xD0 */ nw4r::math::VEC3 mPositionRelativeToPlayer; + /* 0xDC */ f32 mDistanceToPlayer; + /* 0xE0 */ f32 a_field_0xE0; +}; + +#endif diff --git a/include/d/snd/d_snd_3d_engine.h b/include/d/snd/d_snd_3d_engine.h new file mode 100644 index 00000000..309f169a --- /dev/null +++ b/include/d/snd/d_snd_3d_engine.h @@ -0,0 +1,18 @@ +#ifndef D_SND_3D_ENGINE +#define D_SND_3D_ENGINE + +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_Sound3DEngine.h" +#include "nw4r/snd/snd_Sound3DManager.h" + +class dSnd3DEngine_c : public nw4r::snd::Sound3DEngine { +public: + dSnd3DEngine_c(); + + virtual void UpdateAmbientParam( + const nw4r::snd::Sound3DManager *mgr, const nw4r::snd::Sound3DParam *param3d, u32 unk, u32 flags, + nw4r::snd::SoundAmbientParam *paramAmb + ) override; +}; + +#endif diff --git a/include/d/snd/d_snd_3d_manager.h b/include/d/snd/d_snd_3d_manager.h new file mode 100644 index 00000000..2ac0b062 --- /dev/null +++ b/include/d/snd/d_snd_3d_manager.h @@ -0,0 +1,63 @@ +#ifndef D_SND_3D_MANAGER_H +#define D_SND_3D_MANAGER_H + +#include "d/snd/d_snd_3d_engine.h" +#include "d/snd/d_snd_util.h" +#include "egg/gfx/eggCamera.h" +#include "m/m_vec.h" +#include "nw4r/math/math_types.h" +#include "nw4r/snd/snd_Sound3DListener.h" +#include "nw4r/snd/snd_Sound3DManager.h" + +SND_DISPOSER_FORWARD_DECL(dSnd3DManager_c); + +class dSnd3DManager_c { + SND_DISPOSER_MEMBERS(dSnd3DManager_c); + +public: + dSnd3DManager_c(); + + void setup(); + void updateFromCamera(EGG::LookAtCamera &camera); + void setCamDistance(f32 value); + void resetCamDistance(); + void calc(); + void clearState(); + + nw4r::snd::Sound3DManager &getManager() { + return mManager; + } + + const mVec3_c &getCameraTargetPos() const { + return mCameraTargetPosition; + } + + const mVec3_c &getNrmCameraDirection() const { + return mCameraDirectionNormalized; + } + + const nw4r::math::VEC3 &getSndListenerPos() const { + return mListener.GetPosition(); + } + + const nw4r::math::MTX34 &getSndListenerMatrix() const { + return mListener.GetMatrix(); + } + +private: + void updateListenerPos(f32); + /* 0x010 */ bool mIsSetup; + /* 0x011 */ bool mCalculationsFresh; + /* 0x014 */ dSnd3DEngine_c *mpEngine; + /* 0x018 */ nw4r::snd::Sound3DManager mManager; + /* 0x044 */ nw4r::snd::Sound3DListener mListener; + /* 0xB0 */ EGG::LookAtCamera mCamera; + /* 0x138 */ mVec3_c mCameraDirectionNormalized; + /* 0x144 */ mVec3_c mCameraTargetPosition; + /* 0x150 */ f32 mCameraPosSqVelocity; + /* 0x154 */ f32 mCameraAtSqVelocity; + /* 0x158 */ f32 mCamDistance; + /* 0x15C */ s16 mTimer; +}; + +#endif diff --git a/include/d/snd/d_snd_actor.h b/include/d/snd/d_snd_actor.h new file mode 100644 index 00000000..d07a8b5d --- /dev/null +++ b/include/d/snd/d_snd_actor.h @@ -0,0 +1,14 @@ +#ifndef D_SND_3D_ACTOR_H +#define D_SND_3D_ACTOR_H + +#include "nw4r/snd/snd_SoundActor.h" + +class dSndActor_c : public nw4r::snd::SoundActor { +public: + dSndActor_c(nw4r::snd::SoundArchivePlayer &rPlayer); + +private: + void doesSomethingWithForeachSound(); +}; + +#endif diff --git a/include/d/snd/d_snd_area_sound.h b/include/d/snd/d_snd_area_sound.h new file mode 100644 index 00000000..963fefeb --- /dev/null +++ b/include/d/snd/d_snd_area_sound.h @@ -0,0 +1,38 @@ +#ifndef D_SND_AREA_SOUND_H +#define D_SND_AREA_SOUND_H + +#include "common.h" +#include "d/snd/d_snd_sound.h" + +/** A sound class used for dSndAreaSoundEffectMgr */ +class dSndAreaSound_c : public dSndSound_c { +public: + dSndAreaSound_c(); + + virtual void cancel() override; // 0x08 + virtual void calc() override; // 0x0C + virtual void fadeIn(u32 id, s32 fadeFrames) override; // 0x10 + + virtual void initCallback(u32 id); // 0x28 + + typedef void (*Callback)(dSndAreaSound_c &sound); + + using dSndSound_c::pause; + + void pause(s32 fadeFrames); + void unpause(s32 fadeFrames); + +private: + bool isFadingOut() const { + return mIsFadingOut && IsAttachedSound(); + } + + /* 0x0F0 */ bool field_0xF0; + /* 0x0F4 */ Callback mpCalcCallback; + /* 0x0F8 */ UNKWORD field_0xF8; + /* 0x0FC */ UNKWORD field_0xFC; + /* 0x100 */ UNKWORD field_0x100; + /* 0x104 */ UNKWORD field_0x104; +}; + +#endif diff --git a/include/d/snd/d_snd_area_sound_effect_mgr.h b/include/d/snd/d_snd_area_sound_effect_mgr.h new file mode 100644 index 00000000..aa4f7f72 --- /dev/null +++ b/include/d/snd/d_snd_area_sound_effect_mgr.h @@ -0,0 +1,39 @@ +#ifndef D_SND_AREA_SOUND_EFFECT_MGR_H +#define D_SND_AREA_SOUND_EFFECT_MGR_H + +#include "common.h" +#include "d/snd/d_snd_actor.h" +#include "d/snd/d_snd_area_sound.h" +#include "d/snd/d_snd_util.h" + +SND_DISPOSER_FORWARD_DECL(dSndAreaSoundEffectMgr_c); + +/** + * A singleton sound actor for playing persistent environmental background + * sound effects. Turn this off and the Faron birds will stop singing. + * + * Plays sounds like SE_A_F100 (hence the name, not sure if it's the real meaning). + */ +class dSndAreaSoundEffectMgr_c { + SND_DISPOSER_MEMBERS(dSndAreaSoundEffectMgr_c) + +public: + dSndAreaSoundEffectMgr_c(); + + bool startSound(u32 soundId, u32 handleIdx); + void calc(); + void stopSounds(s32 fadeFrames); + +private: + bool isPlayingAnySound() const; + bool isPlayingSound(u32 soundId) const; + + /* 0x010 */ dSndAreaSound_c mSounds[3]; + /* 0x328 */ UNKWORD field_0x328; + /* 0x32C */ f32 field_0x32C; + /* 0x330 */ f32 field_0x330; + /* 0x334 */ dSndActor_c mActor; + /* 0x388 */ f32 field_0x388; +}; + +#endif diff --git a/include/d/snd/d_snd_calc_pitch.h b/include/d/snd/d_snd_calc_pitch.h new file mode 100644 index 00000000..5365e1e3 --- /dev/null +++ b/include/d/snd/d_snd_calc_pitch.h @@ -0,0 +1,10 @@ +#ifndef D_SND_CALC_PITCH_H +#define D_SND_CALC_PITCH_H + +#include "common.h" + +f32 pitchScaleForPitchIdx(s32 idx); +f32 pitchScaleForPitchIdxTenths(f32 idx); +f32 pitchIdxTenthsForPitchScale(f32 scale); + +#endif diff --git a/include/d/snd/d_snd_checkers.h b/include/d/snd/d_snd_checkers.h new file mode 100644 index 00000000..d18c2777 --- /dev/null +++ b/include/d/snd/d_snd_checkers.h @@ -0,0 +1,107 @@ +#ifndef D_SND_CHECKERS_H +#define D_SND_CHECKERS_H + +#include "nw4r/snd/snd_SoundHandle.h" +#include "toBeSorted/music_mgrs.h" + +class SoundPropertiesChecker { +public: + virtual void operator()(nw4r::snd::SoundHandle &pHandle) { + if (mSoundId != -1 && mSoundId != pHandle.GetId()) { + return; + } + + if (mpPlayCounter != nullptr) { + (*mpPlayCounter)++; + } else { + mPlayCounter++; + } + + if (pHandle.IsPause()) { + if (mpPauseCounter != nullptr) { + (*mpPauseCounter)++; + } else { + mPauseCounter++; + } + return; + } + + if (fn_803721F0(FANFARE_SOUND_MGR, pHandle.GetId())) { + if (mpCounter3 != nullptr) { + (*mpCounter3)++; + } else { + mCounter3++; + } + return; + } + + if (fn_803720E0(FANFARE_SOUND_MGR, pHandle.GetId())) { + if (mpCounter3 != nullptr) { + (*mpCounter3)++; + } else { + mCounter3++; + } + return; + } + + if (fn_80372070(FANFARE_SOUND_MGR, pHandle.GetId())) { + if (mpCounter4 != nullptr) { + (*mpCounter4)++; + } else { + mCounter4++; + } + return; + } + + if (fn_803734C0(FANFARE_SOUND_MGR, pHandle.GetId()) && !fn_80373550(FANFARE_SOUND_MGR, pHandle.GetId())) { + mCounter3++; + } + } + +private: + /* 0x04 */ u32 mSoundId; + /* 0x08 */ u32 mPlayCounter; + /* 0x0C */ u32 mPauseCounter; + /* 0x10 */ u32 mCounter3; + /* 0x14 */ u32 mCounter4; + /* 0x18 */ u32 *mpPlayCounter; + /* 0x1C */ u32 *mpPauseCounter; + /* 0x20 */ u32 *mpCounter3; + /* 0x24 */ u32 *mpCounter4; +}; + + +// used at the very least when trying to finish Demise +class IsCurrentSoundIdChecker { +public: + IsCurrentSoundIdChecker(u32 id, bool *pResult) : mSoundId(id), mpResult(pResult) {} + ~IsCurrentSoundIdChecker() {} + + virtual void operator()(nw4r::snd::SoundHandle &pHandle) { + if (mSoundId == pHandle.GetId()) { + *mpResult = true; + } + } + +private: + /* 0x04 */ u32 mSoundId; + /* 0x08 */ bool *mpResult; +}; + +class SoundStopper { +public: + SoundStopper(u32 id, s32 fadeFrames) : mSoundId(id), mFadeFrames(fadeFrames) {} + ~SoundStopper() {} + + virtual void operator()(nw4r::snd::SoundHandle &pHandle) { + if (mSoundId == pHandle.GetId()) { + pHandle.Stop(mFadeFrames); + } + } + +private: + /* 0x04 */ u32 mSoundId; + /* 0x08 */ s32 mFadeFrames; +}; + +#endif diff --git a/include/d/snd/d_snd_control_player.h b/include/d/snd/d_snd_control_player.h new file mode 100644 index 00000000..c4bc4fe2 --- /dev/null +++ b/include/d/snd/d_snd_control_player.h @@ -0,0 +1,53 @@ +#ifndef D_SND_CONTROL_PLAYER_H +#define D_SND_CONTROL_PLAYER_H + +#include "d/snd/d_snd_sound.h" +#include "nw4r/snd/snd_SoundPlayer.h" + +class dSndControlPlayer_c : public dSndControl_c { +public: + dSndControlPlayer_c(f32 value, f32 min, f32 max) : dSndControl_c(value, min, max) {} + virtual void reset() override; // vt 0x0C + + virtual void stop() override; // vt 0x18 + virtual void apply() = 0; // vt 0x1C + virtual f32 getAppliedValue() = 0; // vt 0x20 + + void setIndex1(u32 idx); + void setIndex2(u32 idx); + +protected: + /* 0x30 */ nw4r::snd::SoundPlayer *mpPlayer; + /* 0x34 */ u32 mIndex; +}; + +class dSndControlPlayerVolumeBase_c : public dSndControlPlayer_c { +public: + dSndControlPlayerVolumeBase_c(); +}; + +class dSndControlPlayerVolume_c : public dSndControlPlayerVolumeBase_c { +public: + dSndControlPlayerVolume_c() {} + + virtual void apply() override; // vt 0x1C + virtual f32 getAppliedValue() override; // vt 0x20 +}; + +class dSndControlPlayerLpfFreq_c : public dSndControlPlayer_c { +public: + dSndControlPlayerLpfFreq_c() : dSndControlPlayer_c(0.0f, -1.0f, 0.0f) {} + + virtual void apply() override; // vt 0x1C + virtual f32 getAppliedValue() override; // vt 0x20 +}; + +class dSndControlPlayerFxSend_c : public dSndControlPlayer_c { +public: + dSndControlPlayerFxSend_c() : dSndControlPlayer_c(0.0f, 0.0f, 1.0f) {} + + virtual void apply() override; // vt 0x1C + virtual f32 getAppliedValue() override; // vt 0x20 +}; + +#endif diff --git a/include/d/snd/d_snd_control_player_mgr.h b/include/d/snd/d_snd_control_player_mgr.h new file mode 100644 index 00000000..541268fb --- /dev/null +++ b/include/d/snd/d_snd_control_player_mgr.h @@ -0,0 +1,95 @@ +#ifndef D_SND_CONTROL_PLAYER_MGR_H +#define D_SND_CONTROL_PLAYER_MGR_H + +#include "d/snd/d_snd_control_player.h" +#include "d/snd/d_snd_util.h" +#include "nw4r/snd/snd_SoundPlayer.h" +#include "nw4r/ut/ut_list.h" + +SND_DISPOSER_FORWARD_DECL(dSndControlPlayerMgr_c); + +class dSndControlPlayerMgr_c { + SND_DISPOSER_MEMBERS(dSndControlPlayerMgr_c); + +public: + enum PlayerCtrl_e { + CTRL_VOLUME = 0, + CTRL_LPF_FREQ = 1, + CTRL_FX_SEND = 2, + + CTRL_MAX = 3, + }; + + dSndControlPlayerMgr_c(); + + void calc(); + + static const s32 sNumPlayers; + static const s32 sPlayerMax; + + nw4r::snd::SoundPlayer *getPlayer1(u32) const; + nw4r::snd::SoundPlayer *getPlayer2(u32) const; + + void setVolume(u32 playerIdx, f32 value, s32 frames); + + void setLpfFreq(u32 playerIdx, f32 value, s32 frames); + void setFxSend(u32 playerIdx, f32 value, s32 frames); + + void overrideVolume(u32 playerIdx, f32 volume, s32 frames); + void restoreVolume(u32 playerIdx, s32 frames); + + void muteAllWorldSounds(s32 fadeFrames); + void unmuteAllWorldSounds(s32 fadeFrames); + + enum MuteLevel { + MUTE_FULL = 0, + MUTE_PARTIAL = 1, + + MUTE_MAX = 2, + }; + + enum VolumeControlGroup { + /** PLAYER_BGM, PLAYER_BGM_BOSS */ + CTRL_GROUP_BGM = 0, + /** PLAYER_TG_SOUND - PLAYER_AREA_IN_WATER_LV */ + CTRL_GROUP_STAGE_EFFECTS = 1, + /** PLAYER_ENEMY - PLAYER_ENEMY_FOOTSTEP */ + CTRL_GROUP_ENEMY = 2, + /* PLAYER_OBJECT_1 - PLAYER_TG_SOUND, but not PLAYER_NPC_VOICE */ + CTRL_GROUP_OBJECTS = 3, + + CTRL_GROUP_MAX = 4, + }; + void setGroupVolumeFlag(VolumeControlGroup group, MuteLevel level); + + void setBgmVolumeDecreaseSpeed(f32 speed); + void setStageEffectsVolume(f32 volume, s32 fadeFrames); + +private: + void setBgmMuteVolume(f32 volume); + void setStageEffectsMuteVolume(f32 volume); + void setEnemyMuteVolume(f32 volume); + void setObjectMuteVolume(f32 volume); + void setPlayerVolumeInternal(u32 playerIdx, f32 volume); + + void resetControls(); + void calcVolumes(); + void calcMuteFlags(); + void executeControls(); + void linkCtrl(dSndControlPlayer_c *); + void unlinkCtrl(dSndControlPlayer_c *); + void setControlValue(PlayerCtrl_e ctrlType, u32 playerIdx, f32 value, s32 frames); + f32 getAppliedPlayerVolume(u32 playerIdx) const; + f32 getControlTarget(PlayerCtrl_e ctrlType, u32 playerIdx) const; + + /* 0x10 */ dSndControlPlayer_c *mpCtrls[CTRL_MAX]; + /* 0x1C */ f32 *mpTargetVolumes; + /* 0x20 */ f32 *mpMaxVolumeDecreases; + /* 0x24 */ f32 *mpMaxVolumeIncreases; + /* 0x28 */ f32 *mpSavedVolumes; + /* 0x2C */ u32 mOverrideVolumeMask; + /* 0x30 */ nw4r::ut::List mActiveControls; + /* 0x3C */ s16 mTimersForGroupVolume[4][2]; +}; + +#endif diff --git a/include/d/snd/d_snd_mgr.h b/include/d/snd/d_snd_mgr.h new file mode 100644 index 00000000..305e96ea --- /dev/null +++ b/include/d/snd/d_snd_mgr.h @@ -0,0 +1,33 @@ +#ifndef D_SND_MGR_H +#define D_SND_MGR_H + +#include "egg/audio/eggAudioMgr.h" +#include "nw4r/snd/snd_SoundArchivePlayer.h" + +/** The core audio manager used for most sounds. */ +class dSndMgr_c : public EGG::SimpleAudioMgr { +public: + dSndMgr_c(); + + virtual void calc() override; + void initialize(EGG::Heap *heap, u32 size); + void initHbm(u32 frame); + + static void restoreEffectsCallback(); + + static dSndMgr_c *GetInstance() { + return sInstance; + } + + static nw4r::snd::SoundArchivePlayer* getPlayer() { + return sInstance->ArcPlayer::getPlayer(); + } + +private: + static dSndMgr_c *sInstance; + + /* 0x6C8 */ u8 _0x6C8[0x6CC - 0x6C8]; + /* 0x6CC */ u8 field_0x6CC; +}; + +#endif diff --git a/include/d/snd/d_snd_misc.h b/include/d/snd/d_snd_misc.h new file mode 100644 index 00000000..f5bfaa7f --- /dev/null +++ b/include/d/snd/d_snd_misc.h @@ -0,0 +1,29 @@ +#ifndef D_SND_MISC_H +#define D_SND_MISC_H + +#include "common.h" + +// This is at least accessed by dSnd3DEngine_c's functions that +// are called as part of UpdateAmbientParam. Appears to be +// related to the biquadFilterValue. +struct dSndSourceParam { + dSndSourceParam() { + reset(); + } + + void reset() { + field_0x00 = 300.0; + field_0x04 = 1000.0f; + field_0x08 = 100.0f; + field_0x0C = 400.0f; + field_0x10 = 5000.0f; + } + + /* 0x00 */ f32 field_0x00; + /* 0x04 */ f32 field_0x04; + /* 0x08 */ f32 field_0x08; + /* 0x0C */ f32 field_0x0C; + /* 0x10 */ f32 field_0x10; +}; + +#endif diff --git a/include/d/snd/d_snd_player_mgr.h b/include/d/snd/d_snd_player_mgr.h new file mode 100644 index 00000000..7808092d --- /dev/null +++ b/include/d/snd/d_snd_player_mgr.h @@ -0,0 +1,169 @@ +#ifndef D_SND_PLAYER_MGR_H +#define D_SND_PLAYER_MGR_H + +#include "d/snd/d_snd_mgr.h" +#include "d/snd/d_snd_util.h" +#include "nw4r/snd/snd_MemorySoundArchive.h" +#include "nw4r/snd/snd_SoundArchivePlayer.h" +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/snd/snd_SoundStartable.h" + +SND_DISPOSER_FORWARD_DECL(dSndPlayerMgr_c); + +/** + * The main interface for managing sound stuff. Will delegate to dSndMgr_c for + * most things, but handles demo (cutscene) sound effects (SE_DEMO*) by itself. + * + * Previous Ghidra name: BgmMgr + */ +class dSndPlayerMgr_c { +public: + SND_DISPOSER_MEMBERS(dSndPlayerMgr_c); + +public: + dSndPlayerMgr_c(); + + void shutdown(); + void calc(); + + void enterMenu(); + void leaveMenu(); + void enterMap(); + void leaveMap(); + void enterHelp(); + void leaveHelp(); + + void enterHbm(); + void leaveHbm(); + + u32 getFreeSize(); + bool loadDemoArchive(const char *demoArchiveName); + const char *getSoundArchivePath(); + u32 convertLabelStringToSoundId(const char *label) const; + + nw4r::snd::SoundArchivePlayer &getSoundArchivePlayerForType(u8 sourceType); + bool canUseThisPlayer(u8 sourceType) const; + + enum PlayerMgrFlag_e { + MGR_HBM = 0x1, + MGR_UNK_0x2 = 0x2, + MGR_PAUSE = 0x4, + MGR_MAP = 0x8, + MGR_HELP = 0x10, + }; + + bool checkFlag(u32 mask) const { + return mFlags & mask; + } + + void onFlag(u32 mask) { + mFlags |= mask; + } + + void offFlag(u32 mask) { + mFlags &= ~mask; + } + + u32 getEventMuteMask(u32 id) { + nw4r::snd::SoundArchive *archive; + if (mSoundArchivePlayer.IsAvailable()) { + archive = &mSoundArchive; + } else { + archive = dSndMgr_c::GetInstance()->getArchive(); + } + return archive->GetSoundUserParam(id) & sEventMuteFlagsMask; + } + + enum FanfareUnmuteParam_e { + FANFARE_UNMUTE_BGM = 0x10000, + FANFARE_UNMUTE_STAGE_EFFECTS = 0x20000, + FANFARE_UNMUTE_ENEMY = 0x40000, + FANFARE_UNMUTE_OBJECTS = 0x80000, + }; + + // seem to be used for Small and Event sounds + enum UserParamEventSmall_e { + MUTE_BGM_PART = 0x10000, + MUTE_BGM_FULL = 0x20000, + MUTE_STAGE_EFFECTS_PART = 0x40000, + MUTE_STAGE_EFFECTS_FULL = 0x80000, + MUTE_ENEMY_PART = 0x100000, + MUTE_ENEMY_FULL = 0x200000, + MUTE_OBJECTS_PART = 0x400000, + MUTE_OBJECTS_FULL = 0x800000, + }; + + static const u32 sEventMuteFlagsMask; + + // For a full overview over which sounds are played by which players, + // see https://gist.github.com/robojumper/f81a55857cebed2c79cf3cf3c1ec8f04 + enum PlayerIndex_e { + /** Background music */ + PLAYER_BGM = 0, + /** Background music, boss battle */ + PLAYER_BGM_BOSS = 1, + /** "fanfare?" */ + PLAYER_FAN = 2, + /** small sound effects, only a few (UI navigation related) */ + PLAYER_SMALL_IMPORTANT = 3, + /** small sound, often UI related */ + PLAYER_SMALL_NORMAL = 4, + /** hit, roll attack, cloth, sink */ + PLAYER_LINK_BODY = 5, + /** Link voice */ + PLAYER_LINK_VOICE = 6, + /** Link footstep, swimming */ + PLAYER_LINK_FOOTSTEP = 7, + /** Sword, beetle, ... */ + PLAYER_LINK_EQUIPMENT = 8, + /** Enemy sound effects */ + PLAYER_ENEMY = 9, + /** Enemy voices */ + PLAYER_ENEMY_VOICE = 10, + /** Enemy footstep */ + PLAYER_ENEMY_FOOTSTEP = 11, + /** Misc objects */ + PLAYER_OBJECT_1 = 12, + /** Misc objects */ + PLAYER_OBJECT_2 = 13, + /** NPC footsteps */ + PLAYER_NPC_FOOTSTEP = 14, + /** NPC voices */ + PLAYER_NPC_VOICE = 15, + /** leaves, grass */ + PLAYER_FOLIAGE = 16, + /** misc TgSound environmental effects */ + PLAYER_TG_SOUND = 17, + /** area sound effects (Faron birds...) */ + PLAYER_AREA = 18, + /** not sure, only SE_A_IN_WATER_LV */ + PLAYER_AREA_IN_WATER_LV = 19, + /** event */ + PLAYER_EVENT = 20, + /** not sure */ + PLAYER_UNK_21 = 21, + }; + +private: + /* 0x010 */ u8 field_0x010; + /* 0x011 */ u8 field_0x011; + /* 0x014 */ s32 field_0x014; + /* 0x018 */ s32 field_0x018; + /* 0x01C */ s32 field_0x01C; + /* 0x020 */ u32 mFlags; + + // system menu, inventory, map + void enterPauseState(); + void leavePauseState(); + + virtual nw4r::snd::SoundStartable::StartResult + startSound(nw4r::snd::SoundHandle *pHandle, u32 soundId, const nw4r::snd::SoundStartable::StartInfo *pStartInfo); + virtual nw4r::snd::SoundStartable::StartResult startSound( + nw4r::snd::SoundHandle *pHandle, const char *soundLabel, const nw4r::snd::SoundStartable::StartInfo *pStartInfo + ); + + /* 0x028 */ nw4r::snd::MemorySoundArchive mSoundArchive; + /* 0x178 */ nw4r::snd::SoundArchivePlayer mSoundArchivePlayer; +}; + +#endif diff --git a/include/d/snd/d_snd_small_effect_mgr.h b/include/d/snd/d_snd_small_effect_mgr.h new file mode 100644 index 00000000..6504728a --- /dev/null +++ b/include/d/snd/d_snd_small_effect_mgr.h @@ -0,0 +1,56 @@ +#ifndef D_SND_SMALL_EFFECT_MGR_H +#define D_SND_SMALL_EFFECT_MGR_H + +#include "d/snd/d_snd_source.h" +#include "d/snd/d_snd_util.h" +#include "d/snd/d_snd_wzsound.h" // IWYU pragma: export +#include "nw4r/snd/snd_SoundHandle.h" + + +SND_DISPOSER_FORWARD_DECL(dSndSmallEffectMgr_c); + +/** + * An interface for playing the SE_S ("sound effect, small"?) sounds. + */ +class dSndSmallEffectMgr_c { + SND_DISPOSER_MEMBERS(dSndSmallEffectMgr_c) + +public: + dSndSmallEffectMgr_c(); + + bool playSound(u32 soundId); + bool playSoundWithPan(u32 soundId, f32 pan); + void playSoundWithPitch(u32 soundId, f32 pitch); + + + bool playButtonPressSoundWhenAdvancingTextBoxes(f32); + void resetButtonPressSound(); + void setButtonPressSound(dSoundSource_c *source); + +private: + bool playSoundInternal(u32 soundId); + void stopSounds(u32 playerIdx, u32 soundId, s32 fadeFrames); + void stopSounds(u32 soundId, s32 fadeFrames); + bool isPlayingSound(u32 playerIdx, u32 soundId); + bool isPlayingSound(u32 soundId); + + /* 0x10 */ nw4r::snd::SoundHandle mHandle1; + // used for most sounds + /* 0x14 */ nw4r::snd::SoundHandle mNormalSound; + /* 0x18 */ nw4r::snd::SoundHandle mHandle3; + // apparently used for shield gauge sounds, but maybe not given + // that the callers appear unreachable + /* 0x1C */ nw4r::snd::SoundHandle mShieldGaugeHandles[3]; + + /* 0x28 */ s32 field_0x28; + /* 0x2C */ s32 field_0x2C; + /* 0x30 */ s32 field_0x30; + /* 0x34 */ s32 field_0x34; + /* 0x38 */ u32 mTextboxAdvanceSound; + /* 0x3C */ nw4r::snd::SoundHandle mHandle4; + /* 0x40 */ u16 field_0x40; + /* 0x42 */ u16 field_0x42; + /* 0x44 */ s32 field_0x44; +}; + +#endif diff --git a/include/d/snd/d_snd_sound.h b/include/d/snd/d_snd_sound.h new file mode 100644 index 00000000..c2b865da --- /dev/null +++ b/include/d/snd/d_snd_sound.h @@ -0,0 +1,225 @@ +#ifndef D_SND_SOUND_H +#define D_SND_SOUND_H + +#include "common.h" +#include "nw4r/snd/snd_SeqTrack.h" +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/snd/snd_SoundStartable.h" +#include "nw4r/ut/ut_list.h" + +class dSndSound_c; + +// Not sure, handles a bunch of floats, exists in a ton of variants +class dSndControl_c { +public: + dSndControl_c(f32 value, f32 min, f32 max) + : mResetValue(value), + mMax(max), + mMin(min), + mCurrValue(value), + mStartValue(value), + mTargetValue(value), + mDuration(0), + mTimer(0), + mIsLinked(false) {} + + ~dSndControl_c() {} + + virtual void configure(f32 value, f32 min, f32 max); // vt 0x08 + virtual void reset(); // vt 0x0C + virtual void set(f32 value, s32 frames); // vt 0x10 + virtual void calc(); // vt 0x14 + virtual void stop(); // vt 0x18 + + bool isLinked() const { + return mIsLinked; + } + + void setLinked(bool linked) { + mIsLinked = linked; + } + + f32 getCurrentValue() const { + return mCurrValue; + } + + f32 getTargetValue() const { + return mTargetValue; + } + + bool isFinished() const { + return mTimer >= mDuration; + } + +protected: + /* 0x04 */ f32 mResetValue; + /* 0x08 */ f32 mMax; + /* 0x0C */ f32 mMin; + /* 0x10 */ f32 mCurrValue; + /* 0x14 */ f32 mStartValue; + /* 0x18 */ f32 mTargetValue; + /* 0x1C */ s32 mDuration; + /* 0x20 */ s32 mTimer; + /* 0x24 */ nw4r::ut::Node mNode; + /* 0x2C */ bool mIsLinked; +}; + +class dSndControlSound_c : public dSndControl_c { +public: + dSndControlSound_c(f32 value, f32 min, f32 max) : dSndControl_c(value, min, max) {} + virtual void apply(dSndSound_c *pHandle) = 0; // vt 0x1C + +private: +}; + +class dSndControlSoundVolume_c : public dSndControlSound_c { +public: + dSndControlSoundVolume_c() : dSndControlSound_c(1.0f, 0.0f, 2.0f) {} + virtual void apply(dSndSound_c *pHandle) override; +}; + +class dSndControlSoundPitch_c : public dSndControlSound_c { +public: + dSndControlSoundPitch_c() : dSndControlSound_c(1.0f, 0.25f, 4.0f) {} + virtual void apply(dSndSound_c *pHandle) override; +}; + +/** Stores pitch as a value from -24 to 24, exponentially scaling it to 0.25-4.0 */ +class dSndControlSoundPitchLinear_c : public dSndControlSound_c { +public: + dSndControlSoundPitchLinear_c(); + virtual void apply(dSndSound_c *pHandle) override; + virtual void set(f32 value, s32 frames) override; + + void setControl(dSndControlSound_c *ctrl) { + mpOtherControl = ctrl; + } + +private: + /* 0x30 */ dSndControlSound_c *mpOtherControl; +}; + +class dSndControlSoundSeqTempoRatio_c : public dSndControlSound_c { +public: + dSndControlSoundSeqTempoRatio_c() : dSndControlSound_c(1.0f, 0.25f, 4.0f) {} + virtual void apply(dSndSound_c *pHandle) override; +}; + +class dSndControlSoundSeqTrackVolume_c : public dSndControlSound_c { +public: + dSndControlSoundSeqTrackVolume_c() : dSndControlSound_c(1.0f, 0.0f, 2.0f) {} + virtual void apply(dSndSound_c *pHandle) override; + + void setMask(u16 mask) { + mMask = mask; + } + +private: + /* 0x2E */ u16 mMask; +}; + +class dSndControlSoundStrmTrackVolume_c : public dSndControlSound_c { +public: + dSndControlSoundStrmTrackVolume_c() : dSndControlSound_c(1.0f, 0.0f, 2.0f) {} + virtual void apply(dSndSound_c *pHandle) override; + + void setMask(u16 mask) { + mMask = mask; + } + +private: + /* 0x2E */ u16 mMask; +}; + +class dSndSound_c : public nw4r::snd::SoundHandle { +public: + dSndSound_c(); + ~dSndSound_c(); + + virtual void cancel(); // 0x08 + virtual void calc(); // 0x0C + virtual void fadeIn(u32 id, s32 fadeFrames); // 0x10 + virtual nw4r::snd::SoundStartable::StartResult prepareSound(u32 soundId, u32 startOffset); // 0x14 + virtual nw4r::snd::SoundStartable::StartResult prepareSound(const char *label, u32 startOffset); // 0x18 + virtual void onPreparing(u32 soundId, u32 startOffset); // 0x1C + virtual void stop(s32 fadeFrames); // 0x20 + virtual void pause(bool pauseFlag, s32 fadeFrames); // 0x24 + + bool isStrmSound(); + bool isWaveSound(); + bool isSeqSound(); + + f32 getCurrentStrmTrackVolume(u32 index) const; + + void setVolume(f32 volume, s32 frames); + void setPitchRelated(f32 pitch, s32 frames); + void setLinearPitch(f32 pitch, s32 frames); + void setTrackVolume(u32 trackFlags, f32 volume, s32 frames); + void setStrmTrackVolume(u32 trackFlags, f32 volume, s32 frames); + void setSingleSeqTrackVolume(u16 index, f32 volume, s32 frames); + void setSingleStrmTrackVolume(u16 index, f32 volume, s32 frames); + + // why f32 frames? + void setEachSeqTrackVolume(u32 trackFlags, f32 frames); + void setEachStrmTrackVolume(u32 trackFlags, f32 frames); + + void setSeqTempoRatio(f32 ratio, s32 frames); + void setSeqTrackMute(u32 trackFlags, nw4r::snd::SeqMute mute); + void forceStop(); + + s16 readSeqTrackVariable(int varNo); + void writeSeqTrackVariable(int varNo, s16 value); + + void linkCtrl(dSndControlSound_c *); + void unlinkCtrl(dSndControlSound_c *); + +protected: + bool cannotStart() const { + return mIsRunning && !mIsFadingOut && IsAttachedSound(); + } + + bool isRunning() const { + return mIsRunning && IsAttachedSound(); + } + + bool isPreparing() const { + return mIsPreparing && !mIsRunning; + } + + bool canCancel() const { + return mIsRunning || mIsPreparing || IsAttachedSound(); + } + + bool isPreparingSoundId(u32 soundId) const { + bool ret = mIsPreparing; + if (ret) { + ret = !mIsRunning; + } + if (ret) { + ret = GetId() == soundId; + } + return ret; + } + + void resetControls(); + void resetTrackVolumes(); + + void setControlValue(dSndControlSound_c *ctrl, f32 value, s32 frames); + + /* 0x08 */ u8 _0x08[0x10 - 0x08]; + + /* 0x10 */ u32 mPrevStartOffset; + /* 0x14 */ bool mIsPreparing; + /* 0x15 */ bool mPauseFlag; + /* 0x16 */ bool mIsRunning; + /* 0x17 */ bool mIsFadingOut; + /* 0x18 */ dSndControlSoundVolume_c mCtrlVolume; + /* 0x48 */ dSndControlSoundPitch_c mCtrlPitch; + /* 0x78 */ dSndControlSoundPitchLinear_c mLinearPitch; + /* 0xAC */ dSndControlSoundSeqTrackVolume_c *mpCtrlSeqTrackVolume; + /* 0xB0 */ dSndControlSoundStrmTrackVolume_c *mpCtrlStrmTrackVolume; + /* 0xB4 */ dSndControlSoundSeqTempoRatio_c mpCtrlSeqTempoRatio; + /* 0xE4 */ nw4r::ut::List mList; +}; + +#endif diff --git a/include/d/snd/d_snd_source.h b/include/d/snd/d_snd_source.h new file mode 100644 index 00000000..946589ea --- /dev/null +++ b/include/d/snd/d_snd_source.h @@ -0,0 +1,115 @@ +#ifndef D_SOUND_SOURCE_H +#define D_SOUND_SOURCE_H + +#include "common.h" +#include "d/snd/d_snd_3d_actor.h" +#include "d/snd/d_snd_source_if.h" +#include "nw4r/ut/ut_list.h" + +#include + +class dSndSourceGroup_c; + +/** Manages sound relating to a particular actor. */ +/** Size: probably 0x15C */ +class dSoundSource_c : public dSoundSourceIf_c, public dSnd3DActor_c { +public: + dSoundSource_c(u8 sourceType, dAcBase_c *, const char *name, dSndSourceGroup_c *pOwnerGroup); + virtual ~dSoundSource_c(); + + static u32 getCharacterTalkSoundId(u32 baseSoundId, dSoundSource_c *source); + u32 getRemoConSoundVariant(u32 soundId) const; + + // This is where it gets a bit wild and this class starts mixing in overrides between + // new virtual functions, which causes the vtable to list these functions in exactly this + // order. + virtual const char *getName() const; + bool isName(const char *name) const { + return !std::strcmp(getName(), name); + } + virtual void d_s_vt_0x180(); + virtual void d_s_vt_0x184(); + virtual void d_s_vt_0x188(); + virtual void d_s_vt_0x18C(); + virtual void d_s_vt_0x190(); + virtual void d_s_vt_0x194(); + + virtual void d_vt_0x58() override; + + virtual void d_s_vt_0x19C(); + virtual void d_s_vt_0x1A0(); + + virtual void d_vt_0x5C() override; + virtual StartResult + SetupSound(nw4r::snd::SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void *) override; + + virtual void d_s_vt_0x1AC(); + virtual void d_s_vt_0x1B0(); + virtual void d_s_vt_0x1B4(); + virtual void d_s_vt_0x1B8(); + virtual void d_s_vt_0x1BC(); + virtual void d_s_vt_0x1C0(); + virtual void d_s_vt_0x1C4(bool flag, int fadeFrames); + virtual void d_s_vt_0x1C8(); + virtual void d_s_vt_0x1CC(); + + virtual void d_vt_0x38(bool flag, int fadeFrames) override; + + virtual void d_s_vt_0x1D4(); + virtual void d_s_vt_0x1D8(); + virtual void d_s_vt_0x1DC(); + virtual void d_s_vt_0x1E0(); + virtual void d_s_vt_0x1E4(); + virtual void d_s_vt_0x1E8(); + + // Overrides of dSoundSourceIf_c - always in the first section of + // the vtable, so the order is not certain. May have to reorder for weak + // function order. + virtual s32 getCategory() const override { + return mSourceCategory; + } + virtual const nw4r::math::VEC3 &getListenerPosition() const override; + + virtual bool hasPlayingSounds() const override; // 0x48 + virtual bool isPlayingSound(u32 soundId) override; // 0x4C + virtual bool isPlayingSound(const char *soundId) override; // 0x50 + + virtual bool isReadyMaybe() override { + return false; + } // 0x100 + virtual void load(void *data, const char *name) override {} // 0x104 + virtual void setFrame(f32 frame) override {} // 0x108 + virtual void setRate(f32 frame) override {} // 0x10C + +private: + // at 0x00: dSoundSourceIf_c vtable + // at 0x04: dSnd3DActor_c sub-object + // at 0x58: thunk-vtable + + /* 0xE8 */ nw4r::ut::Node mMgrLink; + /* 0x0F0 */ const char *mpName; + /* 0x0F4 */ UNKWORD field_0x0F4; + /* 0x0F8 */ dAcBase_c *mpPlayer; + /* 0x0FC */ u8 mSourceCategory; + /* 0x0FD */ u8 mSourceType; + /* 0x0FE */ u8 field_0x0FE; + /* 0x0FF */ u8 field_0x0FF; + /* 0x100 */ u8 field_0x100; + /* 0x101 */ u8 field_0x101; + /* 0x102 */ u8 field_0x102; + /* 0x104 */ UNKWORD field_0x104; + /* 0x108 */ UNKWORD field_0x108; + /* 0x10C */ UNKWORD field_0x10C; + /* 0x110 */ nw4r::ut::List field_0x110; // node offset 0xEC + /* 0x11C */ UNKWORD field_0x11C; + /* 0x120 */ nw4r::ut::List field_0x120; // node offset 0x4 + /* 0x12C */ nw4r::ut::List field_0x12C; // node offset 0x4 + /* 0x138 */ nw4r::ut::Node mGroupLink; // node for list in dSndSourceGroup_c + /* 0x140 */ dSndSourceGroup_c *mpOwnerGroup; + /* 0x144 */ u8 _0x144[0x154 - 0x144]; + /* 0x154 */ UNKWORD field_0x154; + /* 0x158 */ s16 field_0x158; + /* 0x15A */ s16 field_0x15A; +}; + +#endif diff --git a/include/d/snd/d_snd_source_enums.h b/include/d/snd/d_snd_source_enums.h new file mode 100644 index 00000000..d4ebe17c --- /dev/null +++ b/include/d/snd/d_snd_source_enums.h @@ -0,0 +1,74 @@ +#ifndef D_SND_SOURCE_ENUMS_H +#define D_SND_SOURCE_ENUMS_H + +// TODO: Expand when we figure out what the other entries have in common +enum SoundSourceType_e { + // 0-1: Player (0) + SND_SOURCE_PLAYER = 0, + SND_SOURCE_PLAYER_HEAD = 1, + + // 2-9: Equipment (1) + SND_SOURCE_NET = 2, + SND_SOURCE_BLADE = 3, + SND_SOURCE_SHIELD = 4, + SND_SOURCE_WHIP = 5, + SND_SOURCE_BOOMERANG = 6, + SND_SOURCE_ARROW = 7, + SND_SOURCE_BOMB = 8, + SND_SOURCE_HOOKSHOT = 9, + + // 10-31: Enemy? (2) + SND_SOURCE_ENEMY_10 = 10, + SND_SOURCE_BIGBOSS = 20, + SND_SOURCE_GIRAHUMU_3 = 24, + SND_SOURCE_BULLET = 29, + SND_SOURCE_ENEMY_31 = 31, + + // 32-42: Object? (3) + SND_SOURCE_OBJECT = 32, + SND_SOURCE_BAMBOO = 34, + SND_SOURCE_ITEM = 35, + SND_SOURCE_TERRY_SHOP = 36, + SND_SOURCE_TIME_STONE = 37, + SND_SOURCE_CLEF = 38, + SND_SOURCE_SHUTTER = 39, + SND_SOURCE_OBJECT_42 = 42, + + // 43-52: Npc (4) + SND_SOURCE_NPC_43 = 43, + SND_SOURCE_KENSEI = 44, + SND_SOURCE_PLAYER_BIRD = 45, + SND_SOURCE_NPC_48 = 48, + SND_SOURCE_INSECT = 49, + SND_SOURCE_NPC_NRM = 51, + SND_SOURCE_NPC_DRAGON = 52, + + // 53: TagSound (5) + SND_SOURCE_TG_SOUND = 53, + + // 54-57: Harp Related (6) + SND_SOURCE_54 = 54, + SND_SOURCE_OBJECT_WARP = 55, + SND_SOURCE_SW_HARP = 56, + SND_SOURCE_57 = 57, + + // 58: ? (7) + SND_SOURCE_58 = 58, + + // 59: ? (9) + SND_SOURCE_59 = 59, +}; + +enum SoundSourceCategory_e { + SND_SOURCE_CATEGORY_PLAYER = 0, + SND_SOURCE_CATEGORY_EQUIPMENT = 1, + SND_SOURCE_CATEGORY_ENEMY = 2, + SND_SOURCE_CATEGORY_OBJECT = 3, + SND_SOURCE_CATEGORY_NPC = 4, + SND_SOURCE_CATEGORY_TG_SOUND = 5, + SND_SOURCE_CATEGORY_6 = 6, + SND_SOURCE_CATEGORY_7 = 7, + SND_SOURCE_CATEGORY_9 = 9, +}; + +#endif diff --git a/include/d/snd/d_snd_source_group.h b/include/d/snd/d_snd_source_group.h new file mode 100644 index 00000000..187b41a5 --- /dev/null +++ b/include/d/snd/d_snd_source_group.h @@ -0,0 +1,63 @@ +#ifndef D_SND_SOURCE_GROUP_H +#define D_SND_SOURCE_GROUP_H + +#include "common.h" +#include "d/snd/d_snd_misc.h" +#include "nw4r/ut/ut_list.h" +#include "sized_string.h" + +class dSoundSource_c; + +/** + * All similar dSoundSource_c's are put in a group. The game can then find the closest + * source for a given type by name/id, for example for changing things about the music + * depending on proximity to a certain object or enemy. + * + * Through its dSndSourceParam, it can also "send" parameters to all dSnd3DActors + * corresponding to these sound sources. + * + * Size: 0x70 + */ +class dSndSourceGroup_c { +public: + dSndSourceGroup_c(); + dSndSourceGroup_c(s32 sourceType, const char*, u32, s32 mSubtype); + ~dSndSourceGroup_c(); + + void registerSource(dSoundSource_c *); + void unregisterSource(dSoundSource_c *); + + dSndSourceParam* getAmbientParam() { + return &mParam; + } + + dSoundSource_c *getSourceClosestToListener(); + dSoundSource_c *getSourceClosestToPlayer(); + + s32 getNumSources() const; + void set(s32 type, const char *name); + void calc(); + +private: + bool setParamFromName(const char *name); + void resetSoundSourceParam(); + void clearList(); + + /* 0x00 */ nw4r::ut::Node mNode1; + /* 0x08 */ nw4r::ut::Node mNode2; + /* 0x10 */ UNKWORD field_0x10; + /* 0x14 */ s32 mSourceCategory; + /* 0x18 */ s32 mSubtype; + /* 0x1C */ u8 field_0x1C; + /* 0x1D */ u8 field_0x1D; + /* 0x1E */ SizedString<32> mName; + /* 0x40 */ UNKWORD field_0x40; + /* 0x44 */ nw4r::ut::List mSourceList; + /* 0x50 */ dSndSourceParam mParam; + /* 0x64 */ dSoundSource_c *mpCachedClosestSourceToListener; + /* 0x68 */ dSoundSource_c *mpCachedClosestSourceToPlayer; + /* 0x6C */ bool mCalculatedClosestToListener; + /* 0x6D */ bool mCalculatedClosestToPlayer; +}; + +#endif diff --git a/include/d/snd/d_snd_source_if.h b/include/d/snd/d_snd_source_if.h new file mode 100644 index 00000000..fa65be05 --- /dev/null +++ b/include/d/snd/d_snd_source_if.h @@ -0,0 +1,87 @@ +#ifndef D_SOUND_SOURCE_IF_H +#define D_SOUND_SOURCE_IF_H + +#include "common.h" +#include "nw4r/math/math_types.h" + +class dAcBase_c; + +/** An abstract interface for sound relating to a particular actor. */ +class dSoundSourceIf_c { +public: + virtual ~dSoundSourceIf_c() {} +#define SOUNDSOURCE_VIRTUAL(offset) virtual void vt_##offset() = 0; + + SOUNDSOURCE_VIRTUAL(0x0C); + virtual s32 getCategory() const = 0; // 0x10 + SOUNDSOURCE_VIRTUAL(0x14); + virtual s32 getActorType() const = 0; + SOUNDSOURCE_VIRTUAL(0x1C); + SOUNDSOURCE_VIRTUAL(0x20); + SOUNDSOURCE_VIRTUAL(0x24); + virtual const nw4r::math::VEC3 &getListenerPosition() const = 0; // 0x28 + SOUNDSOURCE_VIRTUAL(0x2C); + SOUNDSOURCE_VIRTUAL(0x30); + SOUNDSOURCE_VIRTUAL(0x34); + SOUNDSOURCE_VIRTUAL(0x38); + SOUNDSOURCE_VIRTUAL(0x3C); + SOUNDSOURCE_VIRTUAL(0x40); + SOUNDSOURCE_VIRTUAL(0x44); + virtual bool hasPlayingSounds() const = 0; // 0x48 + virtual bool isPlayingSound(u32 soundId) = 0; // 0x4C + virtual bool isPlayingSound(const char *soundId) = 0; // 0x50 + SOUNDSOURCE_VIRTUAL(0x54); + SOUNDSOURCE_VIRTUAL(0x58); + SOUNDSOURCE_VIRTUAL(0x5C); + SOUNDSOURCE_VIRTUAL(0x60); + SOUNDSOURCE_VIRTUAL(0x64); + SOUNDSOURCE_VIRTUAL(0x68); + SOUNDSOURCE_VIRTUAL(0x6C); + SOUNDSOURCE_VIRTUAL(0x70); + SOUNDSOURCE_VIRTUAL(0x74); + SOUNDSOURCE_VIRTUAL(0x78); + SOUNDSOURCE_VIRTUAL(0x7C); + SOUNDSOURCE_VIRTUAL(0x80); + SOUNDSOURCE_VIRTUAL(0x84); + SOUNDSOURCE_VIRTUAL(0x88); + SOUNDSOURCE_VIRTUAL(0x8C); + SOUNDSOURCE_VIRTUAL(0x90); + SOUNDSOURCE_VIRTUAL(0x94); + SOUNDSOURCE_VIRTUAL(0x98); + SOUNDSOURCE_VIRTUAL(0x9C); + SOUNDSOURCE_VIRTUAL(0xA0); + SOUNDSOURCE_VIRTUAL(0xA4); + SOUNDSOURCE_VIRTUAL(0xA8); + SOUNDSOURCE_VIRTUAL(0xAC); + SOUNDSOURCE_VIRTUAL(0xB0); + SOUNDSOURCE_VIRTUAL(0xB4); + SOUNDSOURCE_VIRTUAL(0xB8); + SOUNDSOURCE_VIRTUAL(0xBC); + SOUNDSOURCE_VIRTUAL(0xC0); + SOUNDSOURCE_VIRTUAL(0xC4); + SOUNDSOURCE_VIRTUAL(0xC8); + SOUNDSOURCE_VIRTUAL(0xCC); + SOUNDSOURCE_VIRTUAL(0xD0); + SOUNDSOURCE_VIRTUAL(0xD4); + SOUNDSOURCE_VIRTUAL(0xD8); + SOUNDSOURCE_VIRTUAL(0xDC); + SOUNDSOURCE_VIRTUAL(0xE0); + SOUNDSOURCE_VIRTUAL(0xE4); + SOUNDSOURCE_VIRTUAL(0xE8); + SOUNDSOURCE_VIRTUAL(0xEC); + SOUNDSOURCE_VIRTUAL(0xF0); + SOUNDSOURCE_VIRTUAL(0xF4); + SOUNDSOURCE_VIRTUAL(0xF8); + SOUNDSOURCE_VIRTUAL(0xFC); + + virtual bool isReadyMaybe() = 0; // 0x100 + virtual void load(void *data, const char *name) = 0; // 0x104 + virtual void setFrame(f32 frame) = 0; // 0x108 + virtual void setRate(f32 frame) = 0; // 0x10C + + SOUNDSOURCE_VIRTUAL(0x110); + SOUNDSOURCE_VIRTUAL(0x114); + SOUNDSOURCE_VIRTUAL(0x118); +}; + +#endif diff --git a/include/d/snd/d_snd_source_mgr.h b/include/d/snd/d_snd_source_mgr.h new file mode 100644 index 00000000..5582b2d3 --- /dev/null +++ b/include/d/snd/d_snd_source_mgr.h @@ -0,0 +1,60 @@ +#ifndef D_SND_SOURCE_MGR_H +#define D_SND_SOURCE_MGR_H + +#include "d/snd/d_snd_source.h" +#include "d/snd/d_snd_source_group.h" +#include "d/snd/d_snd_util.h" +#include "nw4r/ut/ut_list.h" + +SND_DISPOSER_FORWARD_DECL(dSndSourceMgr_c); + +class dSndSourceMgr_c { + SND_DISPOSER_MEMBERS(dSndSourceMgr_c); + + static const u32 NUM_GROUPS = 128; + +public: + dSndSourceMgr_c(); + + void registerSource(dSoundSource_c *source); + void unregisterSource(dSoundSource_c *source); + + void playFlowSound(u32 id); + static s32 getSourceCategoryForSourceType(s32 sourceType, const char *name); + +private: + static bool isCertainEnemyType(dSoundSource_c *source); + void removeSourceFromList(dSoundSource_c *source, nw4r::ut::List *list); + void clearSourceLists(); + void clearSourceList(nw4r::ut::List *list); + + /* 0x0010 */ u8 field_0x0010; + /* 0x0011 */ u8 field_0x0011; + /* 0x0012 */ u8 field_0x0012; + /* 0x0013 */ u8 field_0x0013; + + /* 0x0014 */ dSndSourceGroup_c *mpDefaultGroup; + /* 0x0018 */ nw4r::ut::List mGroupList1; + /* 0x0024 */ nw4r::ut::List mGroupList2; + /* 0x0030 */ nw4r::ut::List mGroupList3; + /* 0x003C */ dSndSourceGroup_c mGroups[NUM_GROUPS]; + + // Not sure what these are for + /* 0x383C */ nw4r::ut::List mAllSources; // node offset 0xE8, probably into dSoundSource::mMgrLink + /* 0x3848 */ nw4r::ut::List field_0x3848; // node offset 0x15C, possibly a subset of source types + /* 0x3854 */ nw4r::ut::List field_0x3854; // node offset 0x160 + + /* 0x3860 */ UNKWORD field_0x3860; + /* 0x3864 */ UNKWORD field_0x3864; + /* 0x3868 */ UNKWORD field_0x3868; + /* 0x386C */ f32 field_0x386C; + + /* 0x3870 */ dSoundSource_c *mpPlayerSource; + /* 0x3874 */ dSoundSource_c *mpKenseiSource; + /* 0x3878 */ dSoundSource_c *mpBoomerangSource; + /* 0x387C */ dSoundSource_c *mpTBoatSource; + /* 0x3880 */ dSoundSource_c *field_0x3880; // fi singing related? + /* 0x3884 */ dSoundSource_c *field_0x3884; +}; + +#endif diff --git a/include/d/snd/d_snd_util.h b/include/d/snd/d_snd_util.h new file mode 100644 index 00000000..5040fa50 --- /dev/null +++ b/include/d/snd/d_snd_util.h @@ -0,0 +1,71 @@ +#ifndef D_SND_UTIL_H +#define D_SND_UTIL_H + +#include "common.h" +#include "egg/core/eggDisposer.h" + +// This setup is only inferred. d/snd uses it all over the place. +// This works for dSndPlayerMgr_c, which has a vtable of its own but the Disposer at offset 0. +// It also works for the factory at 0x80399c20, which calls a base class ctor, +// an inline ctor, and has the Disposer at offset 0x18 + +template +struct SndMgrDisposer : public EGG::Disposer { + virtual ~SndMgrDisposer(); + + static T *create(); + static void remove(); +}; + +template +SndMgrDisposer::~SndMgrDisposer() { + if (this == T::sDisposer) { + remove(); + } +} + +template +T *SndMgrDisposer::create() { + if (T::sInstance == nullptr) { + T::sInstance = new T(); + T::sDisposer = T::sInstance->GetDisposer(); + } + return T::sInstance; +} + +template +void SndMgrDisposer::remove() { + T::sInstance = nullptr; + T::sDisposer = nullptr; +} + +#define SND_DISPOSER_FORWARD_DECL(class_name) \ + class class_name; \ + extern template class SndMgrDisposer; + +#define SND_DISPOSER_DEFINE(class_name) \ + template class SndMgrDisposer; \ + class_name *class_name::sInstance; \ + SndMgrDisposer *class_name::sDisposer; + +#define SND_DISPOSER_MEMBERS(class_name) \ +public: \ + SndMgrDisposer *GetDisposer() { \ + return &mDisposer; \ + } \ + \ + static class_name *GetInstance() { \ + return sInstance; \ + } \ + \ + static void create() { \ + SndMgrDisposer::create(); \ + } \ + \ + static class_name *sInstance; \ + static SndMgrDisposer *sDisposer; \ + \ +private: \ + SndMgrDisposer mDisposer; + +#endif diff --git a/include/toBeSorted/small_sound_mgr.h b/include/d/snd/d_snd_wzsound.h similarity index 99% rename from include/toBeSorted/small_sound_mgr.h rename to include/d/snd/d_snd_wzsound.h index 06978ad1..63da34c9 100644 --- a/include/toBeSorted/small_sound_mgr.h +++ b/include/d/snd/d_snd_wzsound.h @@ -1,9 +1,8 @@ -#ifndef SMALL_SOUND_MGR_H -#define SMALL_SOUND_MGR_H +#ifndef D_SND_WZSOUND_H +#define D_SND_WZSOUND_H // Thanks kiwi! https://gist.github.com/kiwi515/47bb17b07ed502bdfa7faa60bc48a3c7 -#include "common.h" enum WZSound { /* 0x0000 */ SE_L_FLIPED, /* 0x0001 */ SE_L_FS_START, @@ -6469,18 +6468,4 @@ enum WZSound { /* 0x193D */ LABEL_SOUND_END }; -class SmallSoundManager { -public: - void playSound(WZSound id); - void playSoundWithPitch(WZSound id, f32 pitch); - void playButtonPressSoundWhenAdvancingTextBoxes(f32); - - static SmallSoundManager *GetInstance() { - return sInstance; - } - -private: - static SmallSoundManager *sInstance; -}; - #endif diff --git a/include/d/t/d_t_shutter_fence_forbiddance.h b/include/d/t/d_t_shutter_fence_forbiddance.h index fed5dab1..5b4dd9b3 100644 --- a/include/d/t/d_t_shutter_fence_forbiddance.h +++ b/include/d/t/d_t_shutter_fence_forbiddance.h @@ -1,13 +1,16 @@ #ifndef D_T_SHUTTER_FENCE_FORBIDDANCE_H #define D_T_SHUTTER_FENCE_FORBIDDANCE_H -#include "d/a/d_a_base.h" +#include "d/t/d_tg.h" -class dTgShutterFenceForbiddance_c : public dAcBase_c { +class dTgShutterFenceForbiddance_c : public dTg_c { public: dTgShutterFenceForbiddance_c(); virtual ~dTgShutterFenceForbiddance_c(); + virtual int create() override; + virtual int actorExecute() override; + private: }; diff --git a/include/egg/audio/eggAudioArcPlayerMgr.h b/include/egg/audio/eggAudioArcPlayerMgr.h index 49673250..f9b982c0 100644 --- a/include/egg/audio/eggAudioArcPlayerMgr.h +++ b/include/egg/audio/eggAudioArcPlayerMgr.h @@ -26,12 +26,20 @@ public: void stopAllSound(); u32 changeNameToId(const char *name) { - return mOpenSndArchive->ConvertLabelStringToSoundId(name); + u32 id = -1; + if (mOpenSndArchive != nullptr) { + id = mOpenSndArchive->ConvertLabelStringToSoundId(name); + } + return id; } nw4r::snd::SoundArchivePlayer *getPlayer() { return mActiveSndArchivePlayer; } + nw4r::snd::SoundArchive *getArchive() { + return mOpenSndArchive; + } + void setLoadStringLabels(bool bLoad) { mLoadLabelStringData = bLoad; } @@ -65,12 +73,7 @@ public: virtual bool startSound(nw4r::snd::SoundHandle *handle, const char *name) // at 0x40 { - u32 id = -1; - if (mOpenSndArchive) { - id = changeNameToId(name); - } - - return ArcPlayer::startSound(handle, id); + return ArcPlayer::startSound(handle, changeNameToId(name)); } virtual bool prepareSound(nw4r::snd::SoundHandle *handle, u32 id) // at 0x44 @@ -85,12 +88,7 @@ public: virtual bool prepareSound(nw4r::snd::SoundHandle *handle, const char *name) // at 0x4C { - u32 id = -1; - if (mOpenSndArchive) { - id = changeNameToId(name); - } - - return ArcPlayer::prepareSound(handle, id); + return ArcPlayer::prepareSound(handle, changeNameToId(name)); } virtual bool holdSound(nw4r::snd::SoundHandle *handle, u32 id) // at 0x50 @@ -105,12 +103,7 @@ public: virtual bool holdSound(nw4r::snd::SoundHandle *handle, const char *name) // at 0x58 { - u32 id = -1; - if (mOpenSndArchive) { - id = changeNameToId(name); - } - - return ArcPlayer::holdSound(handle, id); + return ArcPlayer::holdSound(handle, changeNameToId(name)); } private: diff --git a/include/egg/audio/eggAudioHeapMgr.h b/include/egg/audio/eggAudioHeapMgr.h index fa8ef361..9fd269cc 100644 --- a/include/egg/audio/eggAudioHeapMgr.h +++ b/include/egg/audio/eggAudioHeapMgr.h @@ -21,9 +21,38 @@ public: ~SoundHeapMgr() { destroySoundHeap(); } - virtual bool loadState(s32 id) {} - virtual int getCurrentLevel() {} - virtual void stateProc() {} + int saveState() { + return mSoundHeap.SaveState(); + } + virtual bool loadState(s32 id) { + s32 level = mSoundHeap.GetCurrentLevel(); + if (id > 0 && level >= id) { + mSoundHeap.LoadState(id); + return true; + } else { + return false; + } + } + virtual int getCurrentLevel() { + return mSoundHeap.GetCurrentLevel(); + } + virtual void stateProc() { + OSMessage msg; + if (OSReceiveMessage(&mQueue1.mQueue, &msg, 0)) { + bool ok = loadState((s32)msg); + OSSendMessage(&mQueue3.mQueue, (OSMessage)ok, 0); + } + + if (OSReceiveMessage(&mQueue2.mQueue, &msg, 0)) { + int ok = mSoundHeap.SaveState(); + OSSendMessage(&mQueue3.mQueue, (OSMessage)ok, 0); + } + + if (OSReceiveMessage(&mQueue, &msg, 0)) { + int level = getCurrentLevel(); + OSSendMessage(&mQueue3.mQueue, (OSMessage)level, 0); + } + } void createSoundHeap(Allocator *allocator, u32 size); void destroySoundHeap(); @@ -34,7 +63,9 @@ public: private: nw4r::snd::SoundHeap mSoundHeap; - u8 unk[0x68 - 0x38]; + // I guess we're not initializing this queue? + OSMessageQueue mQueue; + OSMessage mBuffer[4]; SoundMessageQueue mQueue1; SoundMessageQueue mQueue2; SoundMessageQueue mQueue3; diff --git a/include/egg/audio/eggAudioUtility.h b/include/egg/audio/eggAudioUtility.h index 6a56ea66..7abb95b9 100644 --- a/include/egg/audio/eggAudioUtility.h +++ b/include/egg/audio/eggAudioUtility.h @@ -12,7 +12,7 @@ namespace EGG { struct MultiArcSimpleAudioMgr { u8 field_0x000[0x0FC - 0x000]; s32 field_0x0FC; - ArcPlayer players[]; + ArcPlayer players[1]; nw4r::snd::SoundArchivePlayer *getPlayer(int i) { return players[i].getPlayer(); diff --git a/include/egg/core/eggDvdRipper.h b/include/egg/core/eggDvdRipper.h index 82fd09b2..8f4b4b48 100644 --- a/include/egg/core/eggDvdRipper.h +++ b/include/egg/core/eggDvdRipper.h @@ -6,7 +6,6 @@ #include "egg/core/eggHeap.h" #include "egg/core/eggStreamDecomp.h" - namespace EGG { class DvdRipper { @@ -28,6 +27,29 @@ public: typedef void (*UnkCallback)(void *); public: + // Not sure + struct Arg { + Arg(const char *path, u8 *pOut, Heap *pHeap, EAllocDirection allocDir, u32 offset, u32 *pRead, u32 *fileSize) + : path(path), + pOut(pOut), + pHeap(pHeap), + allocDir(allocDir), + offset(offset), + pRead(pRead), + fileSize(fileSize) {} + const char *path; + u8 *pOut; + Heap *pHeap; + EAllocDirection allocDir; + u32 offset; + u32 *pRead; + u32 *fileSize; + }; + + static u8 *loadToMainRAM(Arg &arg) { + return loadToMainRAM(arg.path, arg.pOut, arg.pHeap, arg.allocDir, arg.offset, arg.pRead, arg.fileSize); + } + static u8 * loadToMainRAM(s32 entryNum, u8 *pOut, Heap *pHeap, EAllocDirection allocDir, u32 offset, u32 *pRead, u32 *fileSize); diff --git a/include/egg/gfx/eggCamera.h b/include/egg/gfx/eggCamera.h index c3104fb7..67c3853d 100644 --- a/include/egg/gfx/eggCamera.h +++ b/include/egg/gfx/eggCamera.h @@ -35,6 +35,15 @@ protected: class LookAtCamera : public BaseCamera { public: LookAtCamera() : mPos(0.0f, 10.0f, 0.0f), mAt(0.0f, 0.0f, 0.0f), mUp(0.0f, 1.0f, 0.0f) {} + + LookAtCamera& operator=(const LookAtCamera &other) { + mViewMtx.copyFrom(other.mViewMtx); + mOtherMtx.copyFrom(other.mOtherMtx); + mPos = other.mPos; + mAt = other.mAt; + mUp = other.mUp; + return *this; + } // Which way around? virtual Matrix34f &getViewMatrix() override { return mViewMtx; @@ -53,7 +62,15 @@ public: virtual void doDraw() override; virtual Matrix34f &getViewMatrixOld() override; -protected: + Vector3f getDirection() const { + return mAt - mPos; + } + + Vector3f getOtherDirection() const { + return mPos - mAt; + } + +public: /* 0x64 */ Vector3f mPos; /* 0x70 */ Vector3f mAt; /* 0x7C */ Vector3f mUp; diff --git a/include/egg/math/eggMatrix.h b/include/egg/math/eggMatrix.h index a99a0698..d16f2865 100644 --- a/include/egg/math/eggMatrix.h +++ b/include/egg/math/eggMatrix.h @@ -4,6 +4,7 @@ #include "common.h" #include "egg/math/eggQuat.h" #include "egg/math/eggVector.h" +#include "nw4r/math/math_types.h" namespace EGG { @@ -55,6 +56,14 @@ struct Matrix34f { void multiplyTo(const Matrix34f &m2, Matrix34f &to) const; void dump(); + operator nw4r::math::MTX34 *() { + return (nw4r::math::MTX34 *)this; + } + + operator const nw4r::math::MTX34 *() const { + return (nw4r::math::MTX34 *)this; + } + public: void concat(const Matrix34f &, Matrix34f &) const; void rotate(const Vector3f &rpy) const; diff --git a/include/egg/math/eggQuat.h b/include/egg/math/eggQuat.h index df67e10d..302de985 100644 --- a/include/egg/math/eggQuat.h +++ b/include/egg/math/eggQuat.h @@ -39,14 +39,14 @@ struct Quatf { /* 8049b3b0 */ void setAxisRotation(const Vector3f &, f32); /* 8049b450 */ f32 norm(); /* 8049b480 */ void normalise(); - /* 8049b500 */ Quatf conjugate(); + /* 8049b500 */ Quatf conjugate() const; /* */ Quatf inverse(); /* 8049b550 */ Vector3f rotateVector(const Vector3f &); /* */ Vector3f rotateVectorInv(const Vector3f &); /* 8049b800 */ void slerpTo(const Quatf &, f32, Quatf &out) const; /* 8049b800 */ void limitSlerpTo(const Quatf &, f32, f32, Quatf &out) const; /* */ void makeVectorRotationLimit(Vector3f &, Vector3f &, f32); - /* 8049bbb0 */ void makeVectorRotation(Vector3f &, Vector3f &); + /* 8049bbb0 */ void makeVectorRotation(const Vector3f &, const Vector3f &); void multScalar(f32 s) { w *= s; diff --git a/include/f/f_base.h b/include/f/f_base.h index c24095fe..34ecfa13 100644 --- a/include/f/f_base.h +++ b/include/f/f_base.h @@ -15,7 +15,6 @@ #include "f/f_manager.h" #include "f/f_profile.h" - // Ghidra: fBase // size: 0x64 // official name @@ -91,6 +90,10 @@ public: group_type = m_tmpCtData.group_type; } + u32 getFromParams(u8 shift, u32 mask) { + return (params >> shift) & mask; + } + public: /* 802e12f0 */ fBase_c(); /* 802e23b0 */ static void *operator new(size_t); diff --git a/include/nw4r/lyt/lyt_layout.h b/include/nw4r/lyt/lyt_layout.h index dd988c4b..543065fb 100644 --- a/include/nw4r/lyt/lyt_layout.h +++ b/include/nw4r/lyt/lyt_layout.h @@ -2,11 +2,11 @@ #define NW4R_LYT_LAYOUT_H #include "common.h" -#include "new.h" #include "nw4r/lyt/lyt_animation.h" #include "nw4r/lyt/lyt_types.h" #include "rvl/MEM/mem_allocator.h" +#include namespace nw4r { namespace lyt { diff --git a/include/nw4r/math/math_arithmetic.h b/include/nw4r/math/math_arithmetic.h index 8bd573cb..2892128b 100644 --- a/include/nw4r/math/math_arithmetic.h +++ b/include/nw4r/math/math_arithmetic.h @@ -5,6 +5,8 @@ #include "nw4r/types_nw4r.h" // IWYU pragma: export #include "rvl/OS.h" // IWYU pragma: export +#include + #define NW4R_MATH_QNAN (-(0.0f / 0.0f)) #define NW4R_MATH_FLT_MAX 3.402823466e+38f @@ -30,7 +32,7 @@ inline f32 FAbs(register f32 x) { } inline f32 FCeil(f32 x) { - return ceilf(x); + return std::ceilf(x); } inline f32 FExp(f32 x) { @@ -38,7 +40,7 @@ inline f32 FExp(f32 x) { } inline f32 FFloor(f32 x) { - return floorf(x); + return std::floorf(x); } inline f32 FInv(register f32 x) { diff --git a/include/nw4r/snd/snd_AnimSound.h b/include/nw4r/snd/snd_AnimSound.h index 2b25ea5b..37d66c2f 100644 --- a/include/nw4r/snd/snd_AnimSound.h +++ b/include/nw4r/snd/snd_AnimSound.h @@ -1 +1,129 @@ /* Only implemented to the extent necessary to match data sections. */ + +#include "nw4r/snd/snd_AnimSoundReader.h" +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/snd/snd_SoundStartable.h" + +// Class and non-inlined function names from InazumaWii +// Names of automatically inlined functions from BBA + +namespace nw4r { +namespace snd { +namespace detail { + +class AnimEventPlayer { +public: + AnimEventPlayer(); + ~AnimEventPlayer(); + + SoundHandle *GetHandle() { + return &mHandle; + } + + bool IsAttachedSound() const { + return mHandle.IsAttachedSound(); + } + + bool IsCurrentEvent(const AnimEvent *event) const { + return event == mpEvent; + } + + int GetPriority() const { + if (!IsAttachedSound()) { + return 0; + } + return mHandle.detail_GetAttachedSound()->GetPriority(); + } + + bool IsRunning() const { + return mIsRunning; + } + + void UpdateFrame(); + + void ForceStop(); + + void StopEvent(const AnimEvent *event) { + if (mpEvent == event) { + ForceStop(); + } + } + + void SetVolume(f32 volume) { + if (IsAttachedSound()) { + mHandle.detail_GetAttachedSound()->SetVolume(volume, 0); + } + } + + void SetPitch(f32 pitch) { + if (IsAttachedSound()) { + mHandle.detail_GetAttachedSound()->SetPitch(pitch); + } + } + + void StartEvent(const AnimEvent *event, SoundStartable *startable, bool b); + void HoldEvent(const AnimEvent *event, SoundStartable *startable, bool b); + + // Not sure about these, this could be related to + // InitParam__Q44nw4r3snd6detail15AnimEventPlayerFPCQ44nw4r3snd6detail9AnimEventb + // from BBA, but SetVariable is almost certainly an inline (duplicated code) + // but the float argument is read from AnimSoundImpl so something seems to have + // changed. + void SetVolumePitch(const AnimEvent *event, bool b); + void SetVariable(const AnimEvent *event, u32 varNo, f32 f); + +private: + SoundHandle mHandle; // at 0x00 + const AnimEvent *mpEvent; // at 0x04 + bool mIsRunning; // at 0x08 +}; + +class AnimSoundImpl { +public: + enum PlayDirection { + FORWARD, + BACKWARD, + }; + + AnimSoundImpl(SoundStartable &startable, AnimEventPlayer *player, int); + ~AnimSoundImpl(); + + bool Setup(const void *data); + void Shutdown(); + void ResetFrame(f32, int); + void UpdateFrame(f32 frame, PlayDirection dir); + void UpdateForward(f32 frame); + void UpdateBackward(f32 frame); + void UpdateOneFrame(s32 duration, PlayDirection direction); + void UpdateTrigger(const AnimEventRef *, s32, PlayDirection); + void UpdateForwardRange(const AnimEventRef *, s32); + void UpdateBackwardRange(const AnimEventRef *, s32); + + void StartEvent(const AnimEvent *, bool); + void HoldEvent(const AnimEvent *, bool); + void StopEvent(const AnimEvent *); + bool IsPlayableLoopCount(const nw4r::snd::detail::AnimEventFrameInfo&); + + + typedef void (*Callback)(int, s32, const char *, UNKWORD, UNKWORD); + +private: + /* 0x00 */ SoundStartable &mStartable; + /* 0x04 */ AnimSoundFileReader mReader; + /* 0x0C */ f32 field_0x0C; + /* 0x10 */ AnimEventPlayer *mpSounds; + /* 0x14 */ int mNumSounds; + /* 0x18 */ bool mIsActive; + /* 0x19 */ u8 field_0x19; + /* 0x1A */ u8 field_0x1A; + /* 0x1C */ UNKWORD field_0x1C; + /* 0x20 */ Callback mCallback; + /* 0x24 */ UNKWORD field_0x24; + /* 0x28 */ f32 field_0x28; + /* 0x2C */ f32 mVariableValue; +}; + +} // namespace detail +} // namespace snd +} // namespace nw4r diff --git a/include/nw4r/snd/snd_AnimSoundReader.h b/include/nw4r/snd/snd_AnimSoundReader.h new file mode 100644 index 00000000..43e9adf1 --- /dev/null +++ b/include/nw4r/snd/snd_AnimSoundReader.h @@ -0,0 +1,111 @@ +#include "nw4r/snd/snd_Util.h" +#include "nw4r/ut/ut_binaryFileFormat.h" + +namespace nw4r { +namespace snd { +namespace detail { + +// Type and name revealed by BBA +struct AnimEventFrameInfo { + int field_0x00; // at 0x00 + int field_0x04; // at 0x04 + u8 flags; // at 0x08 + s8 field_0x09; // at 0x09 + u8 field_0x0A; // at 0x0A +}; + +struct AnimEvent { + u32 flags; // at 0x00 + u32 soundId; // at 0x04 + detail::Util::DataRef soundLabelRef; // at 0x08 + u8 volume; // at 0x10 + u8 field_0x11; // at 0x11 + u8 varNo; // at 0x12 + f32 pitch; // at 0x14 + UNKWORD field_0x18; // at 0x18 + UNKWORD field_0x1C; // at 0x1C + + bool ShouldPreventStart() const { + return flags & 1; + } + + const char *GetSoundLabel() const { + return Util::GetDataRefAddress0(soundLabelRef, this); + } + + bool GetVarNo(u32 *var) const { + if (flags & 2) { + *var = varNo; + return true; + } + return false; + } + + bool MatchesDirection(int playDirection) const { + bool ret = 0; + u32 config = field_0x11; + if ((config == 0 || (playDirection == 0 && config == 1) || (playDirection == 1 && config == 2))) { + ret = true; + } + return ret; + } +}; + +// Name from Inazuma, BBA +struct AnimEventRef { + AnimEventFrameInfo mInfo; // at 0x00 + Util::DataRef event; // at 0x0C +}; + +// Names unknown +struct AnimSoundFile { + static u32 const SIGNATURE_FILE = NW4R_FOUR_BYTE('R', 'A', 'S', 'D'); + static int const FILE_VERSION = NW4R_FILE_VERSION(1, 0); + + struct Header { + ut::BinaryFileHeader fileHeader; // size 0x10, offset 0x00 + u32 blockOffset; // at 0x10 + }; + + struct EventTable { + Util::Table eventRef; // at 0x00 + }; + + struct Block { + ut::BinaryBlockHeader blockHeader; // at 0x00 + u32 duration; // at 0x08 + Util::DataRef eventTable; // at 0x0C + }; +}; + +// Name from Inazuma +class AnimSoundFileReader { +public: + AnimSoundFileReader(); + bool Setup(const void *buf); + void Shutdown(); + u32 GetEventCount() const; + + const AnimSoundFile::EventTable *GetEventTable() const; + const AnimEventRef *GetEventRef(u32 id) const; + const AnimEvent *GetEvent(const AnimEventRef *ref) const; + + bool IsValid() const { + return mpHeader != NULL; + } + + u32 GetAnimDuration() const { + if (!IsValid()) { + return 0; + } + return mpBlock->duration; + } + +private: + const AnimSoundFile::Header *mpHeader; // at 0x00 + const AnimSoundFile::Block *mpBlock; // at 0x04 +}; + +} // namespace detail +} // namespace snd +} // namespace nw4r diff --git a/include/nw4r/snd/snd_AxManager.h b/include/nw4r/snd/snd_AxManager.h index e68069a0..1aad4de5 100644 --- a/include/nw4r/snd/snd_AxManager.h +++ b/include/nw4r/snd/snd_AxManager.h @@ -7,6 +7,7 @@ #include "common.h" +#include "nw4r/snd/snd_AxVoice.h" #include "nw4r/snd/snd_global.h" #include "nw4r/snd/snd_FxBase.h" @@ -106,6 +107,10 @@ namespace nw4r { namespace snd { namespace detail return mResetReadyCounter == 0; } + AxVoice::SrcType GetSrcType() const { + return mSrcType; + } + private: // cdtors AxManager(); @@ -117,11 +122,11 @@ namespace nw4r { namespace snd { namespace detail // static members private: - static u8 const AUX_CALLBACK_WAIT_FRAME; + static u8 const AUX_CALLBACK_WAIT_FRAME = 6; static u16 const AUX_RETURN_VOLUME_MAX = AX_MAX_VOLUME; - static int const FX_SAMPLE_RATE; - static SampleFormat const FX_SAMPLE_FORMAT; - static int const FX_BUFFER_SIZE; + static int const FX_SAMPLE_RATE = 32000; + static SampleFormat const FX_SAMPLE_FORMAT = SAMPLE_FORMAT_PCM_S32; + static int const FX_BUFFER_SIZE = 0x180; static int const ZERO_BUFFER_SIZE = 256; static int const SAMPLES_PAR_AUDIO_FRAME; static int const AUDIO_FRAME_INTERVAL; @@ -147,7 +152,7 @@ namespace nw4r { namespace snd { namespace detail MoveValue mMainOutVolume; // size 0x10, offset 0x2c MoveValue mVolumeForReset; // size 0x10, offset 0x3c AIDMACallback mOldAidCallback; // size 0x04, offset 0x4c - s32 mResetReadyCounter; // size 0x04, offset 0x50 + volatile s32 mResetReadyCounter; // size 0x04, offset 0x50 MoveValue mAuxFadeVolume[AUX_BUS_NUM]; // size 0x30, offset 0x54 MoveValue mAuxUserVolume[AUX_BUS_NUM]; // size 0x30, offset 0x84 FxBase::LinkList mFxList[AUX_BUS_NUM]; // size 0x24, offset 0xb4 @@ -156,7 +161,8 @@ namespace nw4r { namespace snd { namespace detail u8 mAuxCallbackWaitCounter[AUX_BUS_NUM]; // size 0x03, offset 0xf0 /* 1 byte padding */ u32 mEffectProcessTick[AUX_BUS_NUM]; // size 0x0c, offset 0xf4 - }; // size 0x100 + AxVoice::SrcType mSrcType; + }; // size 0x104 }}} // namespace nw4r::snd::detail #endif // NW4R_SND_AX_MANAGER_H diff --git a/include/nw4r/snd/snd_AxVoice.h b/include/nw4r/snd/snd_AxVoice.h index 45bd9575..0b709c4b 100644 --- a/include/nw4r/snd/snd_AxVoice.h +++ b/include/nw4r/snd/snd_AxVoice.h @@ -121,6 +121,8 @@ namespace nw4r { namespace snd { namespace detail void SetVoiceBiquad(AXPBBIQUAD const &biquad); void SetVoiceBiquadCoefs(u16 b0, u16 b1, u16 b2, u16 a1, u16 a2); void SetVoiceRmtIIR(__AXPBRMTIIR const &iir); + void SetVoiceRmtOn(u16 on); + void SetVoiceRmtMix(_AXPBRMTMIX const &iir); void SetVoiceRmtIIRCoefs(u16 type, ...); void Set(AXVPB *vpb); @@ -235,6 +237,7 @@ namespace nw4r { namespace snd { namespace detail void SetLoopFlag(bool loopFlag); void SetPriority(u32 priority); void SetVoiceType(VoiceType type); + void EnableRemote(bool enable); void ResetDelta(); void SetAddr(bool loopFlag, void const *waveAddr, u32 startOffset, u32 loopStart, u32 loopEnd); @@ -242,6 +245,7 @@ namespace nw4r { namespace snd { namespace detail void SetAdpcm(AdpcmParam const *param); void SetAdpcmLoop(AdpcmLoopParam const *param); bool SetMix(MixParam const ¶m); + void SetRmtMix(const RemoteMixParam ¶m); void SetSrc(f32 ratio, bool initialUpdate); void SetVe(f32 volume, f32 initVolume); void SetLpf(u16 freq); @@ -269,7 +273,7 @@ namespace nw4r { namespace snd { namespace detail static void CalcOffsetAdpcmParam(u16 *outPredScale, u16 *outYn1, u16 *outYn2, u32 offset, - void *dataAddr, + const void *dataAddr, AdpcmParam const &adpcmParam); private: diff --git a/include/nw4r/snd/snd_AxfxImpl.h b/include/nw4r/snd/snd_AxfxImpl.h index 4721ddaf..06334ff7 100644 --- a/include/nw4r/snd/snd_AxfxImpl.h +++ b/include/nw4r/snd/snd_AxfxImpl.h @@ -9,13 +9,12 @@ namespace snd { namespace detail { struct AxfxImpl { - bool mIsActive; // at 0x0 MEMiHeapHead *mHeap; // at 0x4 u32 mAllocCount; // at 0x8 static const u32 HEAP_SIZE_MIN = MEM_FRM_HEAP_MIN_SIZE + 32; - AxfxImpl() : mIsActive(false), mHeap(NULL), mAllocCount(0) {} + AxfxImpl() : mHeap(NULL), mAllocCount(0) {} bool CreateHeap(void *pBuffer, u32 size); void DestroyHeap(); @@ -29,7 +28,7 @@ struct AxfxImpl { } void HookAlloc(AXFXAllocHook *pAllocHook, AXFXFreeHook *pFreeHook); - void RestoreAlloc(AXFXAllocHook allocHook, AXFXFreeHook freeHook); + u32 RestoreAlloc(AXFXAllocHook allocHook, AXFXFreeHook freeHook); static void *Alloc(u32 size); static void Free(void *pBlock); diff --git a/include/nw4r/snd/snd_BasicPlayer.h b/include/nw4r/snd/snd_BasicPlayer.h index ccd5d31e..a25f95fb 100644 --- a/include/nw4r/snd/snd_BasicPlayer.h +++ b/include/nw4r/snd/snd_BasicPlayer.h @@ -44,7 +44,8 @@ namespace nw4r { namespace snd { namespace detail PanMode panMode; // size 0x04, offset 0x28 PanCurve panCurve; // size 0x04, offset 0x2c f32 fxSend[AUX_BUS_NUM]; // size 0x0c, offset 0x30 - VoiceOutParam voiceOutParam[4]; // size 0x60, offset 0x3c + f32 remoteOutVolume[4]; // size 0x04, offset 0x3c + VoiceOutParam voiceOutParam[4]; // size 0x60, offset 0x5c }; // size 0x9c }}} // namespace nw4r::snd::detail @@ -75,6 +76,8 @@ namespace nw4r { namespace snd { namespace detail // methods void InitParam(); + void SetRemoteOutVolume(int remote, f32 volume); + f32 GetRemoteOutVolume(int remote) const; f32 GetVolume() const { return mPlayerParamSet.volume; } f32 GetPitch() const { return mPlayerParamSet.pitch; } diff --git a/include/nw4r/snd/snd_BasicSound.h b/include/nw4r/snd/snd_BasicSound.h index eca939cd..b3629b19 100644 --- a/include/nw4r/snd/snd_BasicSound.h +++ b/include/nw4r/snd/snd_BasicSound.h @@ -44,7 +44,8 @@ namespace nw4r { namespace snd lpf (0.0f), biquadFilterValue (0.0f), biquadFilterType (0), - priority (0) + priority (0), + field_0x24 (0) { } @@ -59,6 +60,7 @@ namespace nw4r { namespace snd f32 biquadFilterValue; // size 0x04, offset 0x18 int biquadFilterType; // size 0x04, offset 0x1c int priority; // size 0x04, offset 0x20 + UNKWORD field_0x24; }; // size 0x24 // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x27514 @@ -76,7 +78,8 @@ namespace nw4r { namespace snd lpf (0.0f), biquadFilterValue (0.0f), biquadFilterType (0), - priority (0) + priority (0), + field_0x24 (0) { } @@ -91,6 +94,7 @@ namespace nw4r { namespace snd f32 biquadFilterValue; // size 0x04, offset 0x18 int biquadFilterType; // size 0x04, offset 0x1c int priority; // size 0x04, offset 0x20 + UNKWORD field_0x24; VoiceOutParam voiceOutParam[4]; // size 0x60, offset 0x24 }; // size 0x84 @@ -141,10 +145,10 @@ namespace nw4r { namespace snd { namespace detail // typedefs public: - typedef ut::LinkList PriorityLinkList; - typedef ut::LinkList SoundPlayerPlayLinkList; - typedef ut::LinkList SoundPlayerPriorityLinkList; - typedef ut::LinkList ExtSoundPlayerPlayLinkList; + typedef ut::LinkList PriorityLinkList; + typedef ut::LinkList SoundPlayerPlayLinkList; + typedef ut::LinkList SoundPlayerPriorityLinkList; + typedef ut::LinkList ExtSoundPlayerPlayLinkList; // nested types public: @@ -165,10 +169,10 @@ namespace nw4r { namespace snd { namespace detail }; // methods public: - virtual void at_0x08(); - virtual void at_0x0c(void *, int, int, void *); - virtual int at_0x10(void *, int); - virtual int at_0x14(void *, int); + virtual ~AmbientParamUpdateCallback() {} + virtual void detail_UpdateAmbientParam(const void*, u32, int, SoundAmbientParam*); + virtual int detail_GetAmbientPriority(const void*, u32); + virtual int detail_GetRequiredVoiceOutCount(const void*, u32); // members private: @@ -182,8 +186,8 @@ namespace nw4r { namespace snd { namespace detail public: // virtual function ordering // vtable AmbientArgUpdateCallback - virtual void at_0x08(); - virtual void at_0x0c(void *, void *); + virtual ~AmbientArgUpdateCallback() {} + virtual void at_0x0c(void *, BasicSound *); // members private: @@ -198,9 +202,11 @@ namespace nw4r { namespace snd { namespace detail public: // virtual function ordering // vtable AmbientArgAllocaterCallback - virtual void at_0x08(); - virtual void *at_0x0c(int); - virtual void at_0x10(void *, void *); + virtual ~AmbientArgAllocaterCallback() {} + virtual void *detail_AllocAmbientArg(u32 size); // at 0x8 + + virtual void detail_FreeAmbientArg(void *pArg, + const detail::BasicSound *pSound); // at 0xC // members private: @@ -244,25 +250,32 @@ namespace nw4r { namespace snd { namespace detail void StartPrepared(); void Update(); void Pause(bool flag, int fadeFrames); - bool IsPaused() const; + bool IsPause() const; void Stop(int fadeFrames); void SetAutoStopCounter(int count); + void FadeIn(int fadeFrames); + bool GetStartedFlag() const { return mStartedFlag; } u32 GetId() const { return mId; } PlayerHeap *GetPlayerHeap() { return mPlayerHeap; } SoundPlayer *GetSoundPlayer() { return mSoundPlayer; } int GetVoiceOutCount() const; + int GetPriority() const { return mPriority; } void SetPlayerPriority(int priority); void SetInitialVolume(f32 volume); void SetVolume(f32 volume, int frames); void SetPitch(f32 pitch); + void SetPan(f32 pan); + void SetSurroundPan(f32 pan); + void SetLpfFreq(f32 freq); void SetFxSend(AuxBus bus, f32 send); void SetRemoteFilter(int filter); void SetPanMode(PanMode mode); void SetPanCurve(PanCurve curve); void SetAmbientInfo(AmbientInfo const &ambientArgInfo); void SetId(u32 id); + void SetOutputLineFlag(int flag); void AttachPlayerHeap(PlayerHeap *heap); void AttachSoundPlayer(SoundPlayer *player); @@ -279,12 +292,18 @@ namespace nw4r { namespace snd { namespace detail void DetachGeneralHandle(); void DetachTempGeneralHandle(); + int GetRemainingFadeFrames() const; + int CalcCurrentPlayerPriority() const { return ut::Clamp(mPriority + mAmbientParam.priority, PRIORITY_MIN, PRIORITY_MAX); } + void ClearAmbientArgUpdateCallback() { + mAmbientInfo.argUpdateCallback = NULL; + } + static int GetAmbientPriority(AmbientInfo const &ambientInfo, u32 soundId); @@ -308,41 +327,40 @@ namespace nw4r { namespace snd { namespace detail ExternalSoundPlayer *mExtSoundPlayer; // size 0x04, offset 0x18 AmbientInfo mAmbientInfo; // size 0x14, offset 0x1c SoundParam mAmbientParam; // size 0x24, offset 0x30 - SoundActorParam mActorParam; // size 0x0c, offset 0x54 - MoveValue mFadeVolume; // size 0x10, offset 0x60 - MoveValue mPauseFadeVolume; // size 0x10, offset 0x70 - bool mStartFlag; // size 0x01, offset 0x80 - bool mStartedFlag; // size 0x01, offset 0x81 - bool mAutoStopFlag; // size 0x01, offset 0x82 - bool mFadeOutFlag; // size 0x01, offset 0x83 - PauseState mPauseState; // size 0x04, offset 0x84 - bool mUnPauseFlag; // size 0x01, offset 0x88 + SoundActorParam mActorParam; // size 0x0c, offset 0x58 + MoveValue mFadeVolume; // size 0x10, offset 0x64 + MoveValue mPauseFadeVolume; // size 0x10, offset 0x74 + bool mStartFlag; // size 0x01, offset 0x84 + bool mStartedFlag; // size 0x01, offset 0x85 + bool mAutoStopFlag; // size 0x01, offset 0x86 + bool mFadeOutFlag; // size 0x01, offset 0x87 + PauseState mPauseState; // size 0x04, offset 0x88 + bool mUnPauseFlag; // size 0x01, offset 0x8c /* 3 bytes padding */ - s32 mAutoStopCounter; // size 0x04, offset 0x8c - u32 mUpdateCounter; // size 0x04, offset 0x90 - u8 mPriority; // size 0x01, offset 0x94 - u8 mVoiceOutCount; // size 0x01, offset 0x95 - u8 mBiquadFilterType; // size 0x01, offset 0x96 + s32 mAutoStopCounter; // size 0x04, offset 0x90 + u32 mUpdateCounter; // size 0x04, offset 0x94 + u8 mPriority; // size 0x01, offset 0x98 + u8 mVoiceOutCount; // size 0x01, offset 0x99 + u8 mBiquadFilterType; // size 0x01, offset 0x9a /* 1 byte padding */ - u32 mId; // size 0x04, offset 0x98 - MoveValue mExtMoveVolume; // size 0x10, offset 0x9c - f32 mInitVolume; // size 0x04, offset 0xac - f32 mExtPan; // size 0x04, offset 0xb0 - f32 mExtSurroundPan; // size 0x04, offset 0xb4 - f32 mExtPitch; // size 0x04, offset 0xb8 - f32 mLpfFreq; // size 0x04, offset 0xbc - f32 mBiquadFilterValue; // size 0x04, offset 0xc0 - int mOutputLineFlag; // size 0x04, offset 0xc4 - f32 mMainOutVolume; // size 0x04, offset 0xc8 - f32 mMainSend; // size 0x04, offset 0xcc - f32 mFxSend[AUX_BUS_NUM]; // size 0x0c, offset 0xd0 - // NOTE: Name is not from DWARF; derived from usage and other nearby names - u32 mPauseNestCounter; // size 0x04, offset 0xdc + u32 mId; // size 0x04, offset 0x9c + MoveValue mExtMoveVolume; // size 0x10, offset 0xa0 + f32 mInitVolume; // size 0x04, offset 0xb0 + f32 mExtPan; // size 0x04, offset 0xb4 + f32 mExtSurroundPan; // size 0x04, offset 0xb8 + f32 mExtPitch; // size 0x04, offset 0xbc + f32 mLpfFreq; // size 0x04, offset 0xc0 + f32 mBiquadFilterValue; // size 0x04, offset 0xc4 + int mOutputLineFlag; // size 0x04, offset 0xc8 + f32 mMainOutVolume; // size 0x04, offset 0xcc + f32 mMainSend; // size 0x04, offset 0xd0 + f32 mFxSend[AUX_BUS_NUM]; // size 0x0c, offset 0xd4 + f32 mRemoteOutVolume[4]; // size 0x10, offset 0xe0 public: - ut::LinkListNode mPriorityLink; // size 0x08, offset 0xe0 - ut::LinkListNode mSoundPlayerPlayLink; // size 0x08, offset 0xe8 - ut::LinkListNode mSoundPlayerPriorityLink; // size 0x08, offset 0xf0 - ut::LinkListNode mExtSoundPlayerPlayLink; // size 0x08, offset 0xf8 + ut::LinkListNode mPriorityLink; // size 0x08, offset 0xf0 + ut::LinkListNode mSoundPlayerPlayLink; // size 0x08, offset 0xf8 + ut::LinkListNode mSoundPlayerPriorityLink; // size 0x08, offset 0x100 + ut::LinkListNode mExtSoundPlayerPlayLink; // size 0x08, offset 0x108 // friends private: diff --git a/include/nw4r/snd/snd_Channel.h b/include/nw4r/snd/snd_Channel.h index 636d3a7c..20a34077 100644 --- a/include/nw4r/snd/snd_Channel.h +++ b/include/nw4r/snd/snd_Channel.h @@ -63,7 +63,7 @@ namespace nw4r { namespace snd { namespace detail ChannelCallbackStatus status, u32 userData); - typedef ut::LinkList LinkList; + typedef ut::LinkList LinkList; // methods public: @@ -115,6 +115,10 @@ namespace nw4r { namespace snd { namespace detail { mUserSurroundPan = surroundPan; } + void SetRemoteOutVolume(int channel, f32 volume) + { + mRemoteOutVolume[channel] = volume; + } void SetUserLpfFreq(f32 lpfFreq) { mUserLpfFreq = lpfFreq; } void SetOutputLine(int lineFlag) { mOutputLineFlag = lineFlag; } void SetMainOutVolume(f32 volume) { mMainOutVolume = volume; } @@ -208,6 +212,7 @@ namespace nw4r { namespace snd { namespace detail f32 mMainOutVolume; // size 0x04, offset 0x5c f32 mMainSend; // size 0x04, offset 0x60 f32 mFxSend[AUX_BUS_NUM]; // size 0x0c, offset 0x64 + f32 mRemoteOutVolume[4]; f32 mUserPitch; // size 0x04, offset 0x70 f32 mSweepPitch; // size 0x04, offset 0x74 s32 mSweepCounter; // size 0x04, offset 0x78 diff --git a/include/nw4r/snd/snd_ExternalSoundPlayer.h b/include/nw4r/snd/snd_ExternalSoundPlayer.h index 1fd2a9ba..d76e296f 100644 --- a/include/nw4r/snd/snd_ExternalSoundPlayer.h +++ b/include/nw4r/snd/snd_ExternalSoundPlayer.h @@ -6,11 +6,15 @@ */ #include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/snd/snd_global.h" /******************************************************************************* * classes and functions */ +namespace nw4r { namespace snd { class SoundActor; }} + namespace nw4r { namespace snd { namespace detail { // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x27049 @@ -24,12 +28,43 @@ namespace nw4r { namespace snd { namespace detail int GetPlayingSoundCount() const { return mSoundList.GetSize(); } int GetPlayableSoundCount() const { return mPlayableCount; } void SetPlayableSoundCount(int count); + void StopAllSound(int fadeFrames); + void PauseAllSound(bool flag, int fadeFrames); + void DetachSoundActorAll(SoundActor *sound); bool AppendSound(BasicSound *sound); void RemoveSound(BasicSound *sound); bool detail_CanPlaySound(int startPriority); + template + TForEachFunc ForEachSound(TForEachFunc pFunc, bool reverse) { + if (reverse) { + detail::BasicSound::ExtSoundPlayerPlayLinkList::ReverseIterator it = mSoundList.GetBeginReverseIter(); + + while (it != mSoundList.GetEndReverseIter()) { + detail::BasicSound::ExtSoundPlayerPlayLinkList::ReverseIterator curr = it; + + SoundHandle handle; + handle.detail_AttachSoundAsTempHandle(&*curr); + pFunc(handle); + + if (handle.IsAttachedSound()) { + ++it; + } + } + } else { + NW4R_RANGE_FOR_NO_AUTO_INC(it, mSoundList) { + decltype(it) curItr = it++; + SoundHandle handle; + handle.detail_AttachSoundAsTempHandle(&*curItr); + pFunc(handle); + } + } + + return pFunc; + } + private: BasicSound *GetLowestPrioritySound(); diff --git a/include/nw4r/snd/snd_FrameHeap.h b/include/nw4r/snd/snd_FrameHeap.h index 3fe9d628..86b4b3ed 100644 --- a/include/nw4r/snd/snd_FrameHeap.h +++ b/include/nw4r/snd/snd_FrameHeap.h @@ -34,22 +34,19 @@ public: private: struct Block { NW4R_UT_LIST_NODE_DECL(); // at 0x0 - u32 mSize; // at 0x8 - FreeCallback mCallback; // at 0xc - void *mCallbackArg; // at 0x10 + void *mpBuffer; // at 0x8 + u32 mSize; // at 0xC + FreeCallback mCallback; // at 0x10 + void *mCallbackArg; // at 0x14 - Block(u32 size, FreeCallback pCallback, void *pCallbackArg) - : mSize(size), mCallback(pCallback), mCallbackArg(pCallbackArg) {} + Block(void *pBuffer2, u32 size, FreeCallback pCallback, void *pCallbackArg) + : mSize(size), mCallback(pCallback), mCallbackArg(pCallbackArg), mpBuffer(pBuffer2) {} ~Block() { if (mCallback != NULL) { - mCallback(GetBufferAddr(), mSize, mCallbackArg); + mCallback(mpBuffer, mSize, mCallbackArg); } } - - void *GetBufferAddr() { - return ut::AddOffsetToPtr(this, BLOCK_BUFFER_SIZE); - } }; NW4R_UT_LIST_TYPEDEF_DECL(Block); diff --git a/include/nw4r/snd/snd_FxBase.h b/include/nw4r/snd/snd_FxBase.h index 187b105e..34694095 100644 --- a/include/nw4r/snd/snd_FxBase.h +++ b/include/nw4r/snd/snd_FxBase.h @@ -34,7 +34,7 @@ namespace nw4r { namespace snd // vtable FxBase virtual bool StartUp(); virtual void Shutdown(); - virtual void UpdateBuffer(int, void *, u32, SampleFormat, f32, + virtual void UpdateBuffer(int, void **, u32, SampleFormat, f32, OutputMode); virtual void OnChangeOutputMode(); diff --git a/include/nw4r/snd/snd_FxReverbStdDpl2.h b/include/nw4r/snd/snd_FxReverbStdDpl2.h new file mode 100644 index 00000000..033a8fc1 --- /dev/null +++ b/include/nw4r/snd/snd_FxReverbStdDpl2.h @@ -0,0 +1,78 @@ +#ifndef NW4R_SND_FX_REVERB_STD_DPL2_H +#define NW4R_SND_FX_REVERB_STD_DPL2_H + +#include "nw4r/snd/snd_AxfxImpl.h" +#include "nw4r/snd/snd_FxBase.h" +#include "nw4r/types_nw4r.h" + +#include "rvl/AXFX.h" // IWYU pragma: export + +namespace nw4r { +namespace snd { + +namespace detail { +struct FxReverbStdParam { + f32 field_0x00; + f32 field_0x04; + f32 field_0x08; + f32 field_0x0C; + f32 field_0x10; + int field_0x14; + f32 field_0x18; + int field_0x1C; + f32 field_0x20; + f32 field_0x24; + + FxReverbStdParam() + : field_0x00(0.02f), + field_0x04(3.0f), + field_0x08(0.6f), + field_0x0C(0.4f), + field_0x10(1.0f), + field_0x14(5), + field_0x18(0.02f), + field_0x1C(0), + field_0x20(0.0f), + field_0x24(1.0f) {} +}; +} // namespace detail + +class FxReverbStdDpl2 : public FxBase { +public: +public: + FxReverbStdDpl2(); + + virtual ~FxReverbStdDpl2() { + Shutdown(); + ReleaseWorkBuffer(); + } // at 0x8 + + virtual bool StartUp() override; // at 0xC + virtual void Shutdown() override; // at 0x10 + + virtual void UpdateBuffer( + int channels, void **ppBuffer, u32 size, SampleFormat format, f32 sampleRate, + OutputMode mode + ) override; // at 0x14 + + virtual bool AssignWorkBuffer(void *pBuffer, u32 size); // at 0x18 + virtual void ReleaseWorkBuffer(); // at 0x1C + + u32 GetRequiredMemSize(); + bool SetParam(const detail::FxReverbStdParam &rParam); + + void OnChangeOutputMode() override; + +private: + u8 mIsActive; + int mOutputMode; // at 0x10 + detail::AxfxImpl mImpl; // at 0x14 + detail::FxReverbStdParam mParam; // at 0x1C + AXFX_REVERBSTD_EXP mAxfxParam; // at 0x44 + AXFX_REVERBSTD_EXP_DPL2 mAxfxParamDpl; // at 0x12C +}; + +} // namespace snd +} // namespace nw4r + +#endif diff --git a/include/nw4r/snd/snd_MoveValue.h b/include/nw4r/snd/snd_MoveValue.h index 3d2def72..31592473 100644 --- a/include/nw4r/snd/snd_MoveValue.h +++ b/include/nw4r/snd/snd_MoveValue.h @@ -41,6 +41,10 @@ namespace nw4r { namespace snd { namespace detail bool IsFinished() const { return mCounter >= mFrame; } + TTime GetRemainingTime() const { + return IsFinished() ? 0 : mFrame - mCounter; + } + void InitValue(TValue value) { mOrigin = value; diff --git a/include/nw4r/snd/snd_RemoteSpeakerManager.h b/include/nw4r/snd/snd_RemoteSpeakerManager.h index 79ebd56d..2793637c 100644 --- a/include/nw4r/snd/snd_RemoteSpeakerManager.h +++ b/include/nw4r/snd/snd_RemoteSpeakerManager.h @@ -21,8 +21,9 @@ public: private: static const int SPEAKER_ALARM_HZ = 150; - static const int SPEAKER_ALARM_PERIOD_NSEC = static_cast(1.0f / SPEAKER_ALARM_HZ * 1000 * 1000 * 1000); - + // commented out since it causes compiler warnings + // static const int SPEAKER_ALARM_PERIOD_NSEC = static_cast(1.0f / SPEAKER_ALARM_HZ * 1000 * 1000 * 1000); + static const int SPEAKER_ALARM_PERIOD_NSEC = 6666667; private: RemoteSpeakerManager(); diff --git a/include/nw4r/snd/snd_SeqPlayer.h b/include/nw4r/snd/snd_SeqPlayer.h index 50467dfa..54b8e0ae 100644 --- a/include/nw4r/snd/snd_SeqPlayer.h +++ b/include/nw4r/snd/snd_SeqPlayer.h @@ -9,7 +9,9 @@ #include "nw4r/snd/snd_BasicPlayer.h" #include "nw4r/snd/snd_DisposeCallbackManager.h" // DisposeCallback +#include "nw4r/snd/snd_SeqTrack.h" #include "nw4r/snd/snd_SoundThread.h" +#include "nw4r/ut/ut_Lock.h" /******************************************************************************* * types @@ -128,6 +130,10 @@ namespace nw4r { namespace snd { namespace detail SeqTrack *GetPlayerTrack(int trackNo); s16 volatile *GetVariablePtr(int varNo); + s16 GetLocalVariable(int varNo) const; + void SetLocalVariable(int varNo, s16 value); + static void SetGlobalVariable(int varNo, s16 value); + void SetTempoRatio(f32 tempo); void SetReleasePriorityFix(bool fix); void SetChannelPriority(int priority); @@ -143,11 +149,19 @@ namespace nw4r { namespace snd { namespace detail return mParserParam.timebase * mParserParam.tempo * mTempoRatio; } + u32 GetTickCounter() const { + return mTickCounter; + } + void SetSeqData(void const *seqBase, s32 seqOffset); void CallSeqUserprocCallback(u16 procId, SeqTrack *track); Channel *NoteOn(int bankNo, NoteOnInfo const ¬eOnInfo); + void SetTrackMute(u32 trackFlags, SeqMute mute); + void SetTrackSilence(u32 trackFlags, bool silence, int fadeFrames); + void SetTrackVolume(u32 trackFlags, f32 volume); + static void InitSeqPlayer(); private: @@ -162,6 +176,40 @@ namespace nw4r { namespace snd { namespace detail void UpdateTick(int msec); void SkipTick(); + template + void SetTrackParam(u32 trackFlags, void (SeqTrack::*pSetter)(T), T param) { + ut::AutoInterruptLock lock; + + for (int i = 0; i < TRACK_NUM && trackFlags != 0; + trackFlags >>= 1, i++) { + + if (trackFlags & 1) { + SeqTrack* pTrack = GetPlayerTrack(i); + + if (pTrack != NULL) { + (pTrack->*pSetter)(param); + } + } + } + } + + template + void SetTrackParam(u32 trackFlags, void (SeqTrack::*pSetter)(T, U), T param, U param2) { + ut::AutoInterruptLock lock; + + for (int i = 0; i < TRACK_NUM && trackFlags != 0; + trackFlags >>= 1, i++) { + + if (trackFlags & 1) { + SeqTrack* pTrack = GetPlayerTrack(i); + + if (pTrack != NULL) { + (pTrack->*pSetter)(param, param2); + } + } + } + } + // static members public: static int const MAX_SKIP_TICK_PER_FRAME = 768; @@ -172,6 +220,8 @@ namespace nw4r { namespace snd { namespace detail static int const GLOBAL_VARIABLE_NUM = 16; static int const PLAYER_VARIABLE_NUM = 16; + static const int TRACK_NUM = 16; + private: static s16 mGlobalVariable[GLOBAL_VARIABLE_NUM]; diff --git a/include/nw4r/snd/snd_SeqSound.h b/include/nw4r/snd/snd_SeqSound.h index 0960cbb9..7079f9bc 100644 --- a/include/nw4r/snd/snd_SeqSound.h +++ b/include/nw4r/snd/snd_SeqSound.h @@ -41,7 +41,7 @@ namespace nw4r { namespace snd { namespace detail /* redeclare with this class instead of BasicSound for * SoundInstanceManager */ - typedef ut::LinkList PriorityLinkList; + typedef ut::LinkList PriorityLinkList; // nested types public: @@ -121,6 +121,15 @@ namespace nw4r { namespace snd { namespace detail static void NotifyLoadAsyncEndSeqData(bool result, void const *seqBase, void *userData); + void SetTrackMute(u32 trackFlags, SeqMute mute); + void SetTrackSilence(u32 trackFlags, bool silence, int fadeFrames); + void SetTrackVolume(u32 trackFlags, f32 volume); + bool ReadVariable(int varNo, s16 *value) const; + bool WriteVariable(int varNo, s16 value); + static bool WriteGlobalVariable(int varNo, s16 value); + bool WriteTrackVariable(int trackNo, int varNo, s16 value); + u32 GetTick() const; + static DebugSoundType GetSoundType() { return DEBUG_SOUND_TYPE_SEQSOUND; diff --git a/include/nw4r/snd/snd_SeqSoundHandle.h b/include/nw4r/snd/snd_SeqSoundHandle.h index 745132ad..374a966c 100644 --- a/include/nw4r/snd/snd_SeqSoundHandle.h +++ b/include/nw4r/snd/snd_SeqSoundHandle.h @@ -7,6 +7,8 @@ #include "common.h" // nullptr +#include "nw4r/snd/snd_SeqSound.h" +#include "nw4r/snd/snd_SeqTrack.h" #include "nw4r/ut/ut_NonCopyable.h" // ut::NonCopyable /******************************************************************************* @@ -27,11 +29,38 @@ namespace nw4r { namespace snd { // methods public: + SeqSoundHandle(SoundHandle*); + ~SeqSoundHandle() { DetachSound(); } // methods bool IsAttachedSound() const { return mSound != nullptr; } void DetachSound(); + void WriteVariable(int varNo, s16 value) { + if (IsAttachedSound()) + mSound->WriteVariable(varNo, value); + } + + void ReadVariable(int varNo, s16 *value) { + if (IsAttachedSound()) + mSound->ReadVariable(varNo, value); + } + + void SetTrackMute(u32 trackFlags, SeqMute mute) { + if (IsAttachedSound()) + mSound->SetTrackMute(trackFlags, mute); + } + + void SetTempoRatio(f32 tempoRatio) { + if (IsAttachedSound()) + mSound->SetTempoRatio(tempoRatio); + } + + void SetVolume(u32 trackFlags, f32 volume) { + if (IsAttachedSound()) + mSound->SetTrackVolume(trackFlags, volume); + } + // members private: /* base ut::NonCopyable */ // size 0x00, offset 0x00 diff --git a/include/nw4r/snd/snd_SeqTrack.h b/include/nw4r/snd/snd_SeqTrack.h index dd013b77..0cec4aa4 100644 --- a/include/nw4r/snd/snd_SeqTrack.h +++ b/include/nw4r/snd/snd_SeqTrack.h @@ -93,9 +93,9 @@ namespace nw4r { namespace snd { namespace detail MoveValue volume; // size 0x06, offset 0x54 MoveValue pan; // size 0x06, offset 0x5a MoveValue surroundPan; // size 0x06, offset 0x60 + MoveValue pitchBend; // size 0x01, offset 0x68 u8 volume2; // size 0x01, offset 0x66 u8 velocityRange; // size 0x01, offset 0x67 - s8 pitchBend; // size 0x01, offset 0x68 u8 bendRange; // size 0x01, offset 0x69 s8 initPan; // size 0x01, offset 0x6a s8 transpose; // size 0x01, offset 0x6b @@ -141,6 +141,7 @@ namespace nw4r { namespace snd { namespace detail void SetPlayerTrackNo(int playerTrackNo); void SetVolume(f32); + void SetTrackVariable(int variable, s16 value); void SetPitch(f32); void SetPan(f32); void SetSurroundPan(f32); diff --git a/include/nw4r/snd/snd_Sound3DActor.h b/include/nw4r/snd/snd_Sound3DActor.h index 339377ac..168fafa6 100644 --- a/include/nw4r/snd/snd_Sound3DActor.h +++ b/include/nw4r/snd/snd_Sound3DActor.h @@ -2,11 +2,11 @@ #ifndef NW4R_SND_SOUND_3D_ACTOR_H #define NW4R_SND_SOUND_3D_ACTOR_H -#include "nw4r/math.h" #include "nw4r/snd/snd_BasicSound.h" #include "nw4r/snd/snd_SoundActor.h" #include "nw4r/types_nw4r.h" +#include "nw4r/math.h" namespace nw4r { namespace snd { @@ -14,27 +14,32 @@ namespace snd { class Sound3DActor : public SoundActor, public detail::BasicSound::AmbientInfo::AmbientArgUpdateCallback { public: Sound3DActor(SoundArchivePlayer &rPlayer, Sound3DManager &rManager); - virtual ~Sound3DActor(); // at 0x8 + virtual ~Sound3DActor(); - virtual StartResult detail_SetupSound( - SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientInfo *pArgInfo, - detail::ExternalSoundPlayer *pPlayer, bool hold, - const StartInfo *pStartInfo - ); // at 0xC + virtual StartResult SetupSound(SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void *) override; - virtual void detail_Update(void *pArg, - const detail::BasicSound *pSound); // at 0xC + // AmbientArgUpdateCallback + virtual void at_0x0c(void *arg, detail::BasicSound* sound) override; + const nw4r::math::VEC3 &GetPosition() const { + return mPosition; + } void SetPosition(const math::VEC3 &rPosition); + void SetUserParam(u32 userParam) { + mUserParam = userParam; + } + private: static void ClearUpdateCallback(SoundHandle &rHandle); private: - Sound3DManager &m3DManager; // at 0xAC - SoundArchivePlayer &mSoundArchivePlayer; // at 0xB0 - u32 mUserParam; // at 0xB4 - math::VEC3 mPosition; // at 0xB8 + Sound3DManager &m3DManager; // at 0x58 + SoundArchivePlayer *mSoundArchivePlayer; // at 0x5C + u32 mUserParam; // at 0x60 + math::VEC3 mPosition; // at 0x64 + math::VEC3 mVelocity; // at 0x70 + bool mSkipVelocityUpdate; // at 0x7C }; } // namespace snd diff --git a/include/nw4r/snd/snd_Sound3DCalculator.h b/include/nw4r/snd/snd_Sound3DCalculator.h new file mode 100644 index 00000000..29c23c69 --- /dev/null +++ b/include/nw4r/snd/snd_Sound3DCalculator.h @@ -0,0 +1,44 @@ +#ifndef NW4R_SND_SOUND_3D_CALCULATOR_H +#define NW4R_SND_SOUND_3D_CALCULATOR_H + +#include "common.h" +#include "nw4r/math/math_triangular.h" + +namespace nw4r { +namespace snd { + +class Sound3DManager; +class Sound3DParam; + +class Sound3DCalculator { +public: + struct CalcPanParam { + f32 speakerAngleStereo; // at 0x00 + f32 frontSpeakerAngleDpl2; // at 0x04 + f32 rearSpeakerAngleDpl2; // at 0x08 + f32 initPan; // at 0x0C + + CalcPanParam() + : speakerAngleStereo(NW4R_MATH_PI / 4), + frontSpeakerAngleDpl2(NW4R_MATH_PI / 6), + rearSpeakerAngleDpl2(2 * NW4R_MATH_PI / 3), + initPan(0.0f) {} + }; + + static void + CalcVolumeAndPriority(const Sound3DManager &, const Sound3DListener &, const Sound3DParam &, float *, int *); + static void CalcPan( + const Sound3DManager &, const Sound3DListener &, const Sound3DParam &, const Sound3DCalculator::CalcPanParam &, + float *pan, float *surroundPan + ); + static void CalcPitch(const Sound3DManager &, const Sound3DListener &, const Sound3DParam &, float *); + static void CalcBiquadFilterValue(const Sound3DManager &, const Sound3DListener &, const Sound3DParam &, float *); + static void CalcPanDpl2(const nw4r::math::VEC3 &, float, float, float, float, float, float, float *, float *); + static void CalcPanStereo(const nw4r::math::VEC3 &, float, float, float, float, float *, float *); + static void CalcAngleAndDistance(const nw4r::math::VEC3 &, float, float, float *, float *); +}; + +} // namespace snd +} // namespace nw4r + +#endif diff --git a/include/nw4r/snd/snd_Sound3DEngine.h b/include/nw4r/snd/snd_Sound3DEngine.h new file mode 100644 index 00000000..abab43f6 --- /dev/null +++ b/include/nw4r/snd/snd_Sound3DEngine.h @@ -0,0 +1,31 @@ +#ifndef NW4R_SND_SOUND_3D_ENGINE_H +#define NW4R_SND_SOUND_3D_ENGINE_H + +#include "nw4r/types_nw4r.h" +#include "nw4r/snd/snd_Sound3DCalculator.h" + + +namespace nw4r { +namespace snd { + +class Sound3DManager; +class SoundAmbientParam; + +class Sound3DEngine { +public: + Sound3DEngine(); + virtual ~Sound3DEngine() {} + + virtual void UpdateAmbientParam(const Sound3DManager*, const Sound3DParam*, u32, int, SoundAmbientParam*); + virtual s32 GetAmbientPriority(const Sound3DManager*, const Sound3DParam*, u32); + virtual s32 GetRequiredVoiceOutCount(const Sound3DManager*, const Sound3DParam*, u32); + virtual void UpdateAmbientParam(const Sound3DManager*, const Sound3DParam*, u32, u32 flags, SoundAmbientParam*); + +private: + Sound3DCalculator::CalcPanParam mPanParam; // at 0x04 +}; + +} // namespace snd +} // namespace nw4r + +#endif diff --git a/include/nw4r/snd/snd_Sound3DListener.h b/include/nw4r/snd/snd_Sound3DListener.h index 911279ac..dc97054f 100644 --- a/include/nw4r/snd/snd_Sound3DListener.h +++ b/include/nw4r/snd/snd_Sound3DListener.h @@ -1,8 +1,10 @@ #ifndef NW4R_SND_SOUND_3D_LISTENER_H #define NW4R_SND_SOUND_3D_LISTENER_H -#include "nw4r/math.h" +#include "common.h" #include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_LinkList.h" +#include "nw4r/math.h" namespace nw4r { namespace snd { @@ -15,32 +17,53 @@ public: return mMtx; } + const math::VEC3 &GetPosition() const { + return mPosition; + } + + const math::VEC3 &GetVelocity() const { + return mVelocity; + } + + void SetMatrix(const math::MTX34 &mtx); + f32 GetInteriorSize() const { return mInteriorSize; } - void SetInteriorSize(f32 size) { - mInteriorSize = size; - } + void SetInteriorSize(f32 size); f32 GetMaxVolumeDistance() const { return mMaxVolumeDistance; } - void SetMaxVolumeDistance(f32 distance) { - mMaxVolumeDistance = distance; - } + void SetMaxVolumeDistance(f32 distance); f32 GetUnitDistance() const { return mUnitDistance; } - void SetUnitDistance(f32 distance) { - mUnitDistance = distance; + void SetUnitDistance(f32 distance); + + f32 GetUnitBiquadFilterValue() const { + return mUnitBiquadFilterValue; } + void SetUnitBiquadFilterValue(f32 value); + + f32 GetUnitBiquadFilterMax() const { + return mUnitBiquadFilterMax; + } + void SetUnitBiquadFilterMax(f32 value); private: - math::MTX34 mMtx; // at 0x0 - f32 mInteriorSize; // at 0x30 - f32 mMaxVolumeDistance; // at 0x34 - f32 mUnitDistance; // at 0x38 + math::MTX34 mMtx; // at 0x0 + math::VEC3 mPosition; // at 0x30 + math::VEC3 mVelocity; // at 0x3C + f32 mInteriorSize; // at 0x48 + f32 mMaxVolumeDistance; // at 0x4C + f32 mUnitDistance; // at 0x50 + UNKWORD field_0x54; // at 0x54 + u8 mSkipVelocityUpdate; // at 0x58 + f32 mUnitBiquadFilterValue; // at 0x5C + f32 mUnitBiquadFilterMax; // at 0x60 + ut::LinkListNode mNode; // at 0x64 }; } // namespace snd diff --git a/include/nw4r/snd/snd_Sound3DManager.h b/include/nw4r/snd/snd_Sound3DManager.h index 2ec2204c..1c370eef 100644 --- a/include/nw4r/snd/snd_Sound3DManager.h +++ b/include/nw4r/snd/snd_Sound3DManager.h @@ -1,47 +1,55 @@ #ifndef NW4R_SND_SOUND_3D_MANAGER_H #define NW4R_SND_SOUND_3D_MANAGER_H -#include "nw4r/math.h" #include "nw4r/snd/snd_BasicSound.h" #include "nw4r/snd/snd_InstancePool.h" +#include "nw4r/snd/snd_Sound3DEngine.h" #include "nw4r/snd/snd_SoundArchive.h" #include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_LinkList.h" +#include "nw4r/math.h" namespace nw4r { namespace snd { +struct Sound3DParam { + /* 0x00 */ math::VEC3 position; + /* 0x0C */ math::VEC3 velocity; + /* 0x18 */ UNKWORD field_0x18; + /* 0x1C */ u8 decayCurve; + /* 0x1D */ u8 decayRatio; + /* 0x1E */ u8 field_0x1E; + /* 0x20 */ u32 userParam; + /* 0x24 */ UNKWORD field_0x24; + + Sound3DParam(); +}; + class Sound3DManager : public detail::BasicSound::AmbientInfo::AmbientParamUpdateCallback, public detail::BasicSound::AmbientInfo::AmbientArgAllocaterCallback { public: - struct Sound3DActorParam { - u32 userParam; // at 0x0 - SoundArchive::Sound3DParam soundParam; // at 0x4 - math::VEC3 position; // at 0xC + typedef ut::LinkList ListenerList; - Sound3DActorParam(); - }; - -public: Sound3DManager(); - virtual void detail_Update( - SoundParam *pParam, u32 id, detail::BasicSound *pSound, const void *pArg, - u32 flags - ); // at 0x8 + virtual void detail_UpdateAmbientParam(const void*, u32, int, SoundAmbientParam*) override; + virtual int detail_GetAmbientPriority(const void*, u32) override; + virtual int detail_GetRequiredVoiceOutCount(const void*, u32) override; - virtual void Update(SoundParam *pParam, u32 id, SoundHandle *pHandle, const void *pArg, - u32 flags); // at 0x10 - - virtual void *detail_AllocAmbientArg(u32 size); // at 0x14 + virtual void *detail_AllocAmbientArg(u32 size) override; virtual void detail_FreeAmbientArg(void *pArg, - const detail::BasicSound *pSound); // at 0x18 + const detail::BasicSound *pSound) override; u32 GetRequiredMemSize(const SoundArchive *pArchive); bool Setup(const SoundArchive *pArchive, void *pBuffer, u32 size); - Sound3DListener *GetListener() const { - return mListener; + const ListenerList &GetListenerList() const { + return mListenerList; + } + + ListenerList &GetListenerList() { + return mListenerList; } int GetMaxPriorityReduction() const { @@ -51,11 +59,29 @@ public: mMaxPriorityReduction = max; } - f32 GetPanRange() const { - return mPanRange; + int GetBiquadFilterType() const { + return mBiquadFilterType; + } + void SetBiquadFilterType(int type); + + f32 GetField0x20() const { + return field_0x20; } -private: + void SetField0x20(f32 value) { + field_0x20 = value; + } + + f32 GetField0x24() const { + return field_0x24; + } + + void SetField0x24(f32 value) { + field_0x24 = value; + } + + void SetEngine(Sound3DEngine *engine); + enum ParamDecayCurve { DECAY_CURVE_NONE, DECAY_CURVE_LOGARITHMIC, @@ -63,16 +89,13 @@ private: }; private: - detail::InstancePool mParamPool; // at 0x8 - Sound3DListener *mListener; // at 0xC - s32 mMaxPriorityReduction; // at 0x10 - - f32 mSpeakerAngleStereo; // at 0x14 - f32 mFrontSpeakerAngleDpl2; // at 0x18 - f32 mRearSpeakerAngleDpl2; // at 0x1C - - f32 mInitPan; // at 0x20 - f32 mPanRange; // at 0x24 + detail::InstancePool mParamPool; // at 0x8 + ListenerList mListenerList; // at 0x0C + Sound3DEngine *mpEngine; // at 0x18 + s32 mMaxPriorityReduction; // at 0x1C + f32 field_0x20; // at 0x20 + f32 field_0x24; // at 0x24 + int mBiquadFilterType; // at 0x28 }; } // namespace snd diff --git a/include/nw4r/snd/snd_SoundActor.h b/include/nw4r/snd/snd_SoundActor.h index eeb1941d..044772a7 100644 --- a/include/nw4r/snd/snd_SoundActor.h +++ b/include/nw4r/snd/snd_SoundActor.h @@ -30,8 +30,17 @@ namespace nw4r { namespace snd // methods public: // cdtors - SoundActor(); + SoundActor(SoundArchivePlayer &player); + virtual ~SoundActor(); + virtual u32 detail_ConvertLabelStringToSoundId(const char* label) override; + virtual StartResult detail_SetupSound(SoundHandle *pHandle, u32 soundId, bool holdFlag, const StartInfo *pStartInfo) override; + + + virtual StartResult SetupSound(SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void*); + virtual StartResult detail_SetupSoundWithAmbientInfo(SoundHandle*, u32, const StartInfo*, detail::BasicSound::AmbientInfo*, void*); + + // methods detail::ExternalSoundPlayer *detail_GetActorPlayer(int actorPlayerId) { @@ -41,11 +50,25 @@ namespace nw4r { namespace snd return &mActorPlayer[actorPlayerId]; } + + template + TForEachFunc ForEachSound(TForEachFunc pFunc, bool reverse) { + for (int i = 0; i < ACTOR_PLAYER_COUNT; i++) { + mActorPlayer[i].ForEachSound(pFunc, reverse); + } + + return pFunc; + } + detail::SoundActorParam const &detail_GetActorParam() const { return mActorParam; } + void StopAllSound(int fadeFrames); + void PauseAllSound(bool flag, int fadeFrames); + int GetPlayingSoundCount(int playerId) const; + // static members public: static int const ACTOR_PLAYER_COUNT = 4; diff --git a/include/nw4r/snd/snd_SoundArchive.h b/include/nw4r/snd/snd_SoundArchive.h index 76b63469..8904ddf8 100644 --- a/include/nw4r/snd/snd_SoundArchive.h +++ b/include/nw4r/snd/snd_SoundArchive.h @@ -123,6 +123,7 @@ namespace nw4r { namespace snd u32 flags; // at 0x0 u8 decayCurve; // at 0x4 u8 decayRatio; // at 0x5 + u8 field_0x06; // at 0x6 }; // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x256dc @@ -180,6 +181,7 @@ namespace nw4r { namespace snd u32 ConvertLabelStringToSoundId(char const *label) const; u32 ConvertLabelStringToPlayerId(const char* pLabel) const; u32 ConvertLabelStringToGroupId(const char* pLabel) const; + u32 ConvertLabelStringToBankId(const char* pLabel) const; u32 GetSoundUserParam(u32 id) const; bool ReadSoundInfo(u32 soundId, SoundInfo *info) const; @@ -189,6 +191,7 @@ namespace nw4r { namespace snd bool ReadPlayerInfo(u32 playerId, PlayerInfo *info) const; bool ReadSoundArchivePlayerInfo(SoundArchivePlayerInfo *info) const; + bool detail_ReadSound3DParam(u32 soundId, nw4r::snd::SoundArchive::Sound3DParam*) const; bool ReadBankInfo(u32 bankId, BankInfo *info) const; diff --git a/include/nw4r/snd/snd_SoundArchiveFile.h b/include/nw4r/snd/snd_SoundArchiveFile.h index 3e05a24a..07b52a47 100644 --- a/include/nw4r/snd/snd_SoundArchiveFile.h +++ b/include/nw4r/snd/snd_SoundArchiveFile.h @@ -99,7 +99,12 @@ namespace nw4r { namespace snd { namespace detail SOUND_TYPE_WAVE, }; - struct Sound3DParam; + struct Sound3DParam { + u32 flags; + u8 decayCurve; + u8 decayRatio; + u8 field_0x06; + }; // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x25183 struct SeqSoundInfo @@ -295,6 +300,7 @@ namespace nw4r { namespace snd { namespace detail char const *GetString(u32 id) const; SoundArchive::SoundType GetSoundType(u32 soundId) const; + u32 GetSoundStringId(u32 id) const; u32 GetBankCount() const; u32 GetPlayerCount() const; u32 GetGroupCount() const; @@ -323,6 +329,7 @@ namespace nw4r { namespace snd { namespace detail bool ReadBankInfo(u32 bankId, SoundArchive::BankInfo *info) const; bool ReadPlayerInfo(u32 playerId, SoundArchive::PlayerInfo *info) const; + bool ReadSound3DParam(u32 soundId, nw4r::snd::SoundArchive::Sound3DParam* info) const; bool ReadGroupItemInfo(u32 groupId, u32 index, SoundArchive::GroupItemInfo *info) const; @@ -346,6 +353,9 @@ namespace nw4r { namespace snd { namespace detail u32 ConvertLabelStringToGroupId(const char* pLabel) const { return ConvertLabelStringToId(mStringTreeGroup, pLabel); } + u32 ConvertLabelStringToBankId(const char* pLabel) const { + return ConvertLabelStringToId(mStringTreeBank, pLabel); + } private: static bool IsValidFileHeader(void const *soundArchiveData); diff --git a/include/nw4r/snd/snd_SoundArchiveLoader.h b/include/nw4r/snd/snd_SoundArchiveLoader.h index da2f22e9..4c55479c 100644 --- a/include/nw4r/snd/snd_SoundArchiveLoader.h +++ b/include/nw4r/snd/snd_SoundArchiveLoader.h @@ -44,6 +44,8 @@ public: ~SoundArchiveLoader(); void *LoadGroup(u32 id, SoundMemoryAllocatable *pAllocatable, void **ppWaveBuffer, u32 blockSize); + s32 ReadFile(u32, void *, s32, s32); + void *LoadFile(u32 id, SoundMemoryAllocatable* pAllocatable); private: mutable OSMutex mMutex; // at 0x0 diff --git a/include/nw4r/snd/snd_SoundArchivePlayer.h b/include/nw4r/snd/snd_SoundArchivePlayer.h index 34231be7..8724fde1 100644 --- a/include/nw4r/snd/snd_SoundArchivePlayer.h +++ b/include/nw4r/snd/snd_SoundArchivePlayer.h @@ -55,8 +55,8 @@ namespace nw4r { namespace snd public: // virtual function ordering // vtable SoundArchivePlayer_FileManager - virtual void const *at_0x08(int) = 0; - virtual void const *at_0x0c(int) = 0; + virtual void const *GetFileAddress(u32) = 0; + virtual void const *GetFileWaveDataAddress(u32) = 0; // members private: @@ -98,6 +98,8 @@ namespace nw4r { namespace snd { } + virtual ~SeqNoteOnCallback() {} + // virtual function ordering // vtable NoteOnCallback virtual detail::Channel *NoteOn( @@ -176,6 +178,8 @@ namespace nw4r { namespace snd return LoadGroup(static_cast(id), pAllocatable, blockSize); } + bool IsLoadedGroup(u32 groupId) const; + SoundArchive const &GetSoundArchive() const; u32 GetSoundPlayerCount() const { return mSoundPlayerCount; } SoundPlayer &GetSoundPlayer(u32 playerId); @@ -218,6 +222,11 @@ namespace nw4r { namespace snd void UpdateCommonSoundParam(detail::BasicSound *sound, SoundArchive::SoundInfo const *commonInfo); + SoundStartable::StartResult detail_SetupSoundImpl( + SoundHandle *handle, u32 soundId, + detail::BasicSound::AmbientInfo *ambientArgInfo, SoundActor *actor, + bool holdFlag, SoundStartable::StartInfo const *startInfo); + private: template Sound *AllocSound( @@ -225,10 +234,6 @@ namespace nw4r { namespace snd int priority, int ambientPriority, detail::BasicSound::AmbientInfo *ambientArgInfo); - SoundStartable::StartResult detail_SetupSoundImpl( - SoundHandle *handle, u32 soundId, - detail::BasicSound::AmbientInfo *ambientArgInfo, SoundActor *actor, - bool holdFlag, SoundStartable::StartInfo const *startInfo); SoundStartable::StartResult PrepareSeqImpl( detail::SeqSound *sound, SoundArchive::SoundInfo const *commonInfo, SoundArchive::SeqSoundInfo const *info, diff --git a/include/nw4r/snd/snd_SoundHandle.h b/include/nw4r/snd/snd_SoundHandle.h index 19040155..847f7942 100644 --- a/include/nw4r/snd/snd_SoundHandle.h +++ b/include/nw4r/snd/snd_SoundHandle.h @@ -31,8 +31,51 @@ namespace nw4r { namespace snd void detail_AttachSound(detail::BasicSound *sound); bool IsAttachedSound() const { return mSound != nullptr; } detail::BasicSound *detail_GetAttachedSound() { return mSound; } + const detail::BasicSound *detail_GetAttachedSound() const { return mSound; } void DetachSound(); + + void FadeIn(int fadeFrames) { + if (IsAttachedSound()) + mSound->FadeIn(fadeFrames); + } + + void SetVolume(f32 volume, int frames) { + if (IsAttachedSound()) + mSound->SetVolume(volume, frames); + } + + void SetPitch(f32 volume) { + if (IsAttachedSound()) + mSound->SetPitch(volume); + } + + void Stop(int fadeFrames) { + if (IsAttachedSound()) + mSound->Stop(fadeFrames); + } + + void Pause(bool flag, int fadeFrames) { + if (IsAttachedSound()) + mSound->Pause(flag, fadeFrames); + } + + void SetPan(f32 pan) { + if (IsAttachedSound()) + mSound->SetPan(pan); + } + + bool IsPause() const { + return IsAttachedSound() && mSound->IsPause(); + } + + int GetRemainingFadeFrames() const { + if (IsAttachedSound()) + return mSound->GetRemainingFadeFrames(); + + return 0; + } + u32 GetId() const { if (IsAttachedSound()) diff --git a/include/nw4r/snd/snd_SoundInstanceManager.h b/include/nw4r/snd/snd_SoundInstanceManager.h index c43d546e..092200ae 100644 --- a/include/nw4r/snd/snd_SoundInstanceManager.h +++ b/include/nw4r/snd/snd_SoundInstanceManager.h @@ -179,7 +179,7 @@ namespace nw4r { namespace snd { namespace detail private: MemoryPool mPool; // size 0x04, offset 0x00 typename Sound::PriorityLinkList mPriorityList; // size 0x0c, offset 0x04 - mutable OSMutex mMutex; // size 0x18, offset 0x10 + OSMutex mMutex; // size 0x18, offset 0x10 }; // size 0x28 }}} // namespace nw4r::snd::detail diff --git a/include/nw4r/snd/snd_SoundPlayer.h b/include/nw4r/snd/snd_SoundPlayer.h index 33dd9fa3..52382946 100644 --- a/include/nw4r/snd/snd_SoundPlayer.h +++ b/include/nw4r/snd/snd_SoundPlayer.h @@ -10,6 +10,7 @@ #include "nw4r/snd/snd_BasicSound.h" #include "nw4r/snd/snd_global.h" // AUX_BUS_NUM #include "nw4r/snd/snd_PlayerHeap.h" +#include "nw4r/snd/snd_SoundHandle.h" /******************************************************************************* * classes @@ -30,15 +31,19 @@ namespace nw4r { namespace snd // methods int GetPlayableSoundCount() const { return mPlayableCount; } f32 GetVolume() const { return mVolume; } + void SetVolume(f32 volume); f32 GetLpfFreq() const { return mLpfFreq; } + void SetLpfFreq(f32 freq); int GetDefaultOutputLine() const { return mOutputLineFlag; } f32 GetMainOutVolume() const { return mMainOutVolume; } int GetBiquadFilterType() const { return mBiquadType; } f32 GetBiquadFilterValue() const { return mBiquadValue; } f32 GetMainSend() const { return mMainSend; } f32 GetFxSend(int index) const { return mFxSend[index]; } + void SetFxSend(AuxBus, f32); void SetPlayableSoundCount(int count); + f32 GetRemoteOutVolume(int remote) const; int GetPlayingSoundCount() const { return mSoundList.GetSize(); } detail::BasicSound *GetLowestPrioritySound() @@ -65,6 +70,35 @@ namespace nw4r { namespace snd void detail_FreePlayerHeap(detail::BasicSound *sound); void detail_AppendPlayerHeap(detail::PlayerHeap *heap); + // Apparently exists, needed in d/snd + template + TForEachFunc ForEachSound(TForEachFunc pFunc, bool reverse) { + if (reverse) { + detail::BasicSound::SoundPlayerPlayLinkList::ReverseIterator it = mSoundList.GetBeginReverseIter(); + + while (it != mSoundList.GetEndReverseIter()) { + detail::BasicSound::SoundPlayerPlayLinkList::ReverseIterator curr = it; + + SoundHandle handle; + handle.detail_AttachSoundAsTempHandle(&*curr); + pFunc(handle); + + if (handle.IsAttachedSound()) { + ++it; + } + } + } else { + NW4R_RANGE_FOR_NO_AUTO_INC(it, mSoundList) { + decltype(it) curItr = it++; + SoundHandle handle; + handle.detail_AttachSoundAsTempHandle(&*curItr); + pFunc(handle); + } + } + + return pFunc; + } + // members private: detail::BasicSound::SoundPlayerPlayLinkList mSoundList; // size 0x0c, offset 0x00 @@ -78,6 +112,7 @@ namespace nw4r { namespace snd f32 mMainOutVolume; // size 0x04, offset 0x38 int mBiquadType; // size 0x04, offset 0x3c f32 mBiquadValue; // size 0x04, offset 0x40 + f32 mRemoteOutVolume[4]; f32 mMainSend; // size 0x04, offset 0x44 f32 mFxSend[AUX_BUS_NUM]; // size 0x0c, offset 0x48 }; // size 0x54 diff --git a/include/nw4r/snd/snd_SoundStartable.h b/include/nw4r/snd/snd_SoundStartable.h index c438be45..86d62ec6 100644 --- a/include/nw4r/snd/snd_SoundStartable.h +++ b/include/nw4r/snd/snd_SoundStartable.h @@ -54,6 +54,7 @@ namespace nw4r { namespace snd // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x27291 struct StartInfo { + StartInfo() : enableFlag(0) {} // enums public: enum EnableFlag @@ -76,6 +77,7 @@ namespace nw4r { namespace snd // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x27208 struct SeqSoundInfo { + SeqSoundInfo() : seqDataAddress(NULL), startLocationLabel(NULL) {} void *seqDataAddress; // size 0x04, offset 0x00 char const *startLocationLabel; // size 0x04, offset 0x04 }; // size 0x08 @@ -108,52 +110,58 @@ namespace nw4r { namespace snd SoundHandle *pHandle, u32 id, const StartInfo *pStartInfo ); StartResult detail_StartSound( - SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientInfo *pArgInfo, - detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo + SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo ); StartResult detail_HoldSound( SoundHandle *pHandle, u32 id, const StartInfo *pStartInfo ); - StartResult detail_HoldSound( - SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientInfo *pArgInfo, - detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo + SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo ); StartResult detail_PrepareSound( - SoundHandle *pHandle, u32 id, detail::BasicSound::AmbientInfo *pArgInfo, - detail::ExternalSoundPlayer *pPlayer, const StartInfo *pStartInfo + SoundHandle *pHandle, u32 id, const StartInfo *pStartInfo + ); + StartResult detail_PrepareSound( + SoundHandle *pHandle, const char *label, + const StartInfo *pStartInfo ); bool StartSound(SoundHandle *pHandle, u32 id) { - return detail_StartSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; + return detail_StartSound(pHandle, id, NULL) == START_SUCCESS; + } + bool StartSound(SoundHandle *pHandle, const char *label) { + return detail_StartSound(pHandle, label, NULL) == START_SUCCESS; } bool StartSound(SoundHandle *pHandle, unsigned int id) { - return detail_StartSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; + return detail_StartSound(pHandle, id, NULL) == START_SUCCESS; } bool StartSound(SoundHandle *pHandle, int id) { - return detail_StartSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; + return detail_StartSound(pHandle, id, NULL) == START_SUCCESS; } bool HoldSound(SoundHandle *pHandle, u32 id) { - return detail_HoldSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; + return detail_HoldSound(pHandle, id, NULL) == START_SUCCESS; + } + bool HoldSound(SoundHandle *pHandle, const char *label) { + return detail_HoldSound(pHandle, label, NULL) == START_SUCCESS; } bool HoldSound(SoundHandle *pHandle, unsigned int id) { - return detail_HoldSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; + return detail_HoldSound(pHandle, id, NULL) == START_SUCCESS; } bool HoldSound(SoundHandle *pHandle, int id) { - return detail_HoldSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; + return detail_HoldSound(pHandle, id, NULL) == START_SUCCESS; } bool PrepareSound(SoundHandle *pHandle, u32 id) { - return detail_PrepareSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; + return detail_PrepareSound(pHandle, id, NULL) == START_SUCCESS; } bool PrepareSound(SoundHandle *pHandle, unsigned int id) { - return detail_PrepareSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; + return detail_PrepareSound(pHandle, id, NULL) == START_SUCCESS; } bool PrepareSound(SoundHandle *pHandle, int id) { - return detail_PrepareSound(pHandle, id, NULL, NULL, NULL) == START_SUCCESS; + return detail_PrepareSound(pHandle, id, NULL) == START_SUCCESS; } // members diff --git a/include/nw4r/snd/snd_SoundThread.h b/include/nw4r/snd/snd_SoundThread.h index 42d4a10f..7d250496 100644 --- a/include/nw4r/snd/snd_SoundThread.h +++ b/include/nw4r/snd/snd_SoundThread.h @@ -101,6 +101,7 @@ namespace nw4r { namespace snd { namespace detail static void *SoundThreadFunc(void *arg); void SoundThreadProc(); + void FrameProcess(); // static members private: @@ -121,6 +122,7 @@ namespace nw4r { namespace snd { namespace detail PlayerCallback::LinkList mPlayerCallbackList; // size 0x00c, offset 0x384 u32 mProcessTick; // size 0x004, offset 0x390 bool mCreateFlag; // size 0x001, offset 0x394 + bool field_0x395; // size 0x001, offset 0x395 /* 3 bytes padding */ }; // size 0x398 }}} // namespace nw4r::snd::detail diff --git a/include/nw4r/snd/snd_StrmPlayer.h b/include/nw4r/snd/snd_StrmPlayer.h index 96742e28..a4889945 100644 --- a/include/nw4r/snd/snd_StrmPlayer.h +++ b/include/nw4r/snd/snd_StrmPlayer.h @@ -31,7 +31,17 @@ namespace nw4r { namespace ut { class FileStream; }} * classes and functions */ -namespace nw4r { namespace snd { namespace detail +namespace nw4r { namespace snd { + +struct StrmDataInfo +{ + /* 0x00 */ bool loopFlag; + /* 0x04 */ int sampleRate; + /* 0x08 */ u32 loopStart; + /* 0x0C */ u32 loopEnd; +}; + +namespace detail { // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x2fcda class StrmPlayer : public BasicPlayer, public SoundThread::PlayerCallback @@ -162,7 +172,9 @@ namespace nw4r { namespace snd { namespace detail void SetAdpcmLoopContext(int channelNum, u16 *predScale); void SetTrackVolume(u32 trackBitFlag, f32 volume); + u32 GetPlaySamplePosition() const; + bool ReadStrmDataInfo(StrmDataInfo*) const; void InitParam(); bool SetupPlayer(); bool Prepare(ut::FileStream *fileStream, @@ -221,8 +233,8 @@ namespace nw4r { namespace snd { namespace detail /* base BasicPlayer */ // size 0x0a4, offset 0x000 /* base SoundThread::PlayerCallback */ // size 0x00c, offset 0x0a4 StrmFileReader::StrmInfo mStrmInfo; // size 0x040, offset 0x0b0 - bool mSetupFlag; // size 0x001, offset 0x0f0 - bool volatile mActiveFlag; // size 0x001, offset 0x0f1 + bool volatile mSetupFlag; // size 0x001, offset 0x0f0 + bool mActiveFlag; // size 0x001, offset 0x0f1 bool mStartedFlag; // size 0x001, offset 0x0f2 bool mPreparedFlag; // size 0x001, offset 0x0f3 bool mTaskErrorFlag; // size 0x001, offset 0x0f4 diff --git a/include/nw4r/snd/snd_StrmSound.h b/include/nw4r/snd/snd_StrmSound.h index 45175c92..240659ea 100644 --- a/include/nw4r/snd/snd_StrmSound.h +++ b/include/nw4r/snd/snd_StrmSound.h @@ -40,7 +40,7 @@ namespace nw4r { namespace snd { namespace detail /* redeclare with this class instead of BasicSound for * SoundInstanceManager */ - typedef ut::LinkList PriorityLinkList; + typedef ut::LinkList PriorityLinkList; // methods public: @@ -80,6 +80,8 @@ namespace nw4r { namespace snd { namespace detail bool Prepare(StrmPlayer::StartOffsetType startOffsetType, s32 offset, ut::FileStream *fileStream); + + void SetTrackVolume(u32 trackFlags, f32 volume, int fadeFrames); static DebugSoundType GetSoundType() { diff --git a/include/nw4r/snd/snd_StrmSoundHandle.h b/include/nw4r/snd/snd_StrmSoundHandle.h index bebb9e40..e377ed9a 100644 --- a/include/nw4r/snd/snd_StrmSoundHandle.h +++ b/include/nw4r/snd/snd_StrmSoundHandle.h @@ -7,6 +7,8 @@ #include "common.h" // nullptr +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/snd/snd_StrmSound.h" #include "nw4r/ut/ut_NonCopyable.h" // ut::NonCopyable /******************************************************************************* @@ -28,10 +30,17 @@ namespace nw4r { namespace snd // methods public: // methods + StrmSoundHandle(SoundHandle*); + ~StrmSoundHandle() { DetachSound(); } bool IsAttachedSound() const { return mSound != nullptr; } void DetachSound(); + void SetVolume(u32 trackFlags, f32 volume, int fadeFrames) { + if (IsAttachedSound()) + mSound->SetTrackVolume(trackFlags, volume, fadeFrames); + } + // members private: /* base NonCopyable */ // size 0x00, offset 0x00 diff --git a/include/nw4r/snd/snd_Voice.h b/include/nw4r/snd/snd_Voice.h index 32e6a690..3c43d741 100644 --- a/include/nw4r/snd/snd_Voice.h +++ b/include/nw4r/snd/snd_Voice.h @@ -55,7 +55,7 @@ namespace nw4r { namespace snd { namespace detail // typedefs public: - typedef ut::LinkList LinkList; + typedef ut::LinkList LinkList; typedef void Callback(Voice *dropVoice, VoiceCallbackStatus status, void *callbackData); @@ -92,6 +92,7 @@ namespace nw4r { namespace snd { namespace detail void SetMainOutVolume(f32 volume); void SetMainSend(f32 send); void SetFxSend(AuxBus bus, f32 send); + void SetRemoteOutVolume(int remote, f32 volume); void SetPitch(f32 pitch); void SetVolume(f32 volume); void SetVeVolume(f32 targetVolume, f32 initVolume); @@ -103,6 +104,10 @@ namespace nw4r { namespace snd { namespace detail { return IsActive() && mAxVoice[0][0]->IsPlayFinished(); } + bool IsRun() const + { + return IsActive() && mAxVoice[0][0]->IsRun(); + } SampleFormat GetFormat() const; u32 GetCurrentPlayingSample() const; int GetPhysicalVoiceCount() const @@ -228,6 +233,7 @@ namespace nw4r { namespace snd { namespace detail f32 mMainOutVolume; // size 0x04, offset 0xc0 f32 mMainSend; // size 0x04, offset 0xc4 f32 mFxSend[AUX_BUS_NUM]; // size 0x0c, offset 0xc8 + f32 mRemoteOutVolume[4]; // size 0x10, offset 0xd4 TODO following sizes wrong f32 mPitch; // size 0x04, offset 0xd4 f32 mVolume; // size 0x04, offset 0xd8 f32 mVeInitVolume; // size 0x04, offset 0xdc diff --git a/include/nw4r/snd/snd_WaveSound.h b/include/nw4r/snd/snd_WaveSound.h index ebac599c..87989c8e 100644 --- a/include/nw4r/snd/snd_WaveSound.h +++ b/include/nw4r/snd/snd_WaveSound.h @@ -36,7 +36,7 @@ namespace nw4r { namespace snd { namespace detail /* redeclare with this class instead of BasicSound for * SoundInstanceManager */ - typedef ut::LinkList PriorityLinkList; + typedef ut::LinkList PriorityLinkList; // methods public: diff --git a/include/nw4r/snd/snd_WsdPlayer.h b/include/nw4r/snd/snd_WsdPlayer.h index 6116cf0e..5cf90b48 100644 --- a/include/nw4r/snd/snd_WsdPlayer.h +++ b/include/nw4r/snd/snd_WsdPlayer.h @@ -18,7 +18,16 @@ * classes and functions */ -namespace nw4r { namespace snd { namespace detail +namespace nw4r { namespace snd { + +struct WsdDataInfo { + /* 0x00 */ bool loopFlag; + /* 0x04 */ int sampleRate; + /* 0x08 */ u32 loopStart; + /* 0x0C */ u32 loopEnd; +}; + +namespace detail { // [R89JEL]:/bin/RVL/Debug/mainD.elf:.debug::0x30b74 class WsdPlayer : public BasicPlayer, @@ -98,6 +107,7 @@ namespace nw4r { namespace snd { namespace detail { return mChannel != nullptr && mChannel->IsActive(); } + bool ReadWsdDataInfo(WsdDataInfo*) const; u32 GetPlaySamplePosition() const; private: diff --git a/include/nw4r/ut/ut_LinkList.h b/include/nw4r/ut/ut_LinkList.h index e96cfa3d..5d890f34 100644 --- a/include/nw4r/ut/ut_LinkList.h +++ b/include/nw4r/ut/ut_LinkList.h @@ -328,7 +328,7 @@ public: return Iterator(LinkListImpl::GetBeginIter()); } ConstIterator GetBeginIter() const { - return ConstIterator(GetBeginIter()); + return const_cast(this)->LinkListImpl::GetBeginIter(); } detail::ReverseIterator GetBeginReverseIter() { return detail::ReverseIterator(GetBeginIter()); @@ -338,7 +338,7 @@ public: return Iterator(LinkListImpl::GetEndIter()); } ConstIterator GetEndIter() const { - return ConstIterator(GetEndIter()); + return const_cast(this)->LinkListImpl::GetEndIter(); } detail::ReverseIterator GetEndReverseIter() { return detail::ReverseIterator(GetEndIter()); diff --git a/include/nw4r/ut/ut_RuntimeTypeInfo.h b/include/nw4r/ut/ut_RuntimeTypeInfo.h index 12bf7cc4..289ed170 100644 --- a/include/nw4r/ut/ut_RuntimeTypeInfo.h +++ b/include/nw4r/ut/ut_RuntimeTypeInfo.h @@ -47,8 +47,12 @@ inline TDerived DynamicCast(TBase *ptr) { // Derived type info const detail::RuntimeTypeInfo *derivedTypeInfo = detail::GetTypeInfoFromPtr_(static_cast(NULL)); // Downcast if possible - if (ptr && ptr->GetRuntimeTypeInfo()->IsDerivedFrom(derivedTypeInfo)) { - return static_cast(ptr); + // NB Wii/1.6 used in SND seems to be very sensitive to the way this + // is structured while Wii/1.5 and below don't seem to care at all + if (ptr) { + if (ptr->GetRuntimeTypeInfo()->IsDerivedFrom(derivedTypeInfo)) { + return static_cast(ptr); + } } return NULL; diff --git a/include/rvl/AXFX.h b/include/rvl/AXFX.h index fbfaaa60..5046b176 100644 --- a/include/rvl/AXFX.h +++ b/include/rvl/AXFX.h @@ -15,6 +15,7 @@ extern "C" { #include "rvl/AXFX/AXFXReverbHiExp.h" #include "rvl/AXFX/AXFXReverbHiExpDpl2.h" #include "rvl/AXFX/AXFXSrcCoef.h" +#include "rvl/AXFX/AXFXReverbStd.h" #ifdef __cplusplus } diff --git a/include/rvl/AXFX/AXFXReverbStd.h b/include/rvl/AXFX/AXFXReverbStd.h new file mode 100644 index 00000000..5bf34d1d --- /dev/null +++ b/include/rvl/AXFX/AXFXReverbStd.h @@ -0,0 +1,62 @@ +#ifndef RVL_SDK_AXFX_REVERB_STD_H +#define RVL_SDK_AXFX_REVERB_STD_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +typedef struct AXFX_REVERBSTD_EXP { + u8 _0x00[0xB4]; + u32 field_0xB4; + f32 field_0xB8; + f32 field_0xBC; + u32 field_0xC0; + f32 field_0xC4; + f32 field_0xC8; + f32 field_0xCC; + f32 field_0xD0; + f32 field_0xD4; + u32 field_0xD8; + u32 field_0xDC; + f32 field_0xE0; + f32 field_0xE4; +} AXFX_REVERBSTD_EXP; + +typedef struct AXFX_REVERBSTD_EXP_DPL2 { + u8 _0x00[0xD0]; + u32 field_0xD0; + f32 field_0xD4; + f32 field_0xD8; + u32 field_0xDC; + f32 field_0xE0; + f32 field_0xE4; + f32 field_0xE8; + f32 field_0xEC; + f32 field_0xF0; + u32 field_0xF4; + u32 field_0xF8; + f32 field_0xFC; + f32 field_0x100; +} AXFX_REVERBSTD_EXP_DPL2; + +u32 AXFXReverbStdExpGetMemSize(const AXFX_REVERBSTD_EXP *fx); +BOOL AXFXReverbStdExpInit(AXFX_REVERBSTD_EXP *fx); +void AXFXReverbStdExpShutdown(AXFX_REVERBSTD_EXP *fx); +BOOL AXFXReverbStdExpSettings(AXFX_REVERBSTD_EXP *fx); +BOOL AXFXReverbStdExpSettingsUpdate(AXFX_REVERBSTD_EXP *fx); +void AXFXReverbStdExpCallback(void* chans, AXFX_REVERBSTD_EXP* context); + +u32 AXFXReverbStdExpGetMemSizeDpl2(const AXFX_REVERBSTD_EXP_DPL2 *fx); +BOOL AXFXReverbStdExpInitDpl2(AXFX_REVERBSTD_EXP_DPL2 *fx); +void AXFXReverbStdExpShutdownDpl2(AXFX_REVERBSTD_EXP_DPL2 *fx); +BOOL AXFXReverbStdExpSettingsDpl2(AXFX_REVERBSTD_EXP_DPL2 *fx); +BOOL AXFXReverbStdExpSettingsUpdateDpl2(AXFX_REVERBSTD_EXP_DPL2 *fx); + +void AXFXReverbStdExpCallbackDpl2(void* chans, AXFX_REVERBSTD_EXP_DPL2* context); + +#ifdef __cplusplus +} +#endif +#endif diff --git a/include/sized_string.h b/include/sized_string.h index dc711238..44e26ebe 100644 --- a/include/sized_string.h +++ b/include/sized_string.h @@ -5,6 +5,7 @@ #include "common.h" #include "string.h" #include "wstring.h" +#include "printf.h" extern "C" bool strequals(const char *a, const char *b); diff --git a/include/sound_mgrs/sound_audio_manager.h b/include/sound_mgrs/sound_audio_manager.h deleted file mode 100644 index 1bfe885c..00000000 --- a/include/sound_mgrs/sound_audio_manager.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef SOUND_AUDIO_MANAGER_H -#define SOUND_AUDIO_MANAGER_H - -#include "common.h" -#include "egg/audio/eggAudioMgr.h" - - -// Size: 0x6d0 -class SndAudioMgr : public EGG::SimpleAudioMgr { -public: -}; - -#endif diff --git a/include/toBeSorted/actor_info.h b/include/toBeSorted/actor_info.h new file mode 100644 index 00000000..7a9f545e --- /dev/null +++ b/include/toBeSorted/actor_info.h @@ -0,0 +1,26 @@ +#ifndef D_ACTOR_INFO_H +#define D_ACTOR_INFO_H + +#include "common.h" + +/** + * profileId and profileId2 are always the same. + */ +struct ActorInfo { + /* 0x00 */ const char *name; + /* 0x04 */ u16 profileId; + /* 0x06 */ u16 profileId2; + /* 0x08 */ u16 fiTextEntryId; // also used for kill counters + /* 0x0A */ s8 soundSourceType; + /* 0x0B */ u8 subtype; +}; + +const ActorInfo *getActorInfoByName(const char *name); +u16 getProfileIdForName(const char *name); +u16 getProfileId2ForName(const char *name); +const char *getNameForProfileId(u32 profileId); +const char *getActorName(const ActorInfo *actorInfo); +const ActorInfo *getActorInfoByProfileAndSubtype(u32 profileId, u32 subtype); +s32 getSoundSourceTypeForName(const char *name); + +#endif diff --git a/include/toBeSorted/blur_and_palette_manager.h b/include/toBeSorted/blur_and_palette_manager.h deleted file mode 100644 index 6f985709..00000000 --- a/include/toBeSorted/blur_and_palette_manager.h +++ /dev/null @@ -1,356 +0,0 @@ -#ifndef BLUR_AND_PALETTE_MANAGER_H -#define BLUR_AND_PALETTE_MANAGER_H - -#include "common.h" -#include "egg/math/eggVector.h" -#include "m/m_color.h" -#include "m/m_vec.h" -#include "rvl/GX/GXTypes.h" -#include "toBeSorted/tlist.h" - -struct UnkBlurPaletteListNode { - TListNode mNode; -}; - -struct SffSub { - mColor field_0x00; - f32 field_0x04; - f32 field_0x08; -}; - -struct SpfSub2 { - mColor field_0x00; - u8 field_0x04[5]; -}; - -// This is a weird one - mColor / nw4r::ut::Color are assumed -// to be 4-byte-aligned so that all the u32 type punning works -// correctly, but field_0x1D5 is unaligned and uses a separate -// assignment operator! So we'll go with a separate type for now. -struct UnalignedColor { - UnalignedColor &operator=(const mColor &color) { - r = color.r; - g = color.g; - b = color.b; - a = color.a; - return *this; - } - u8 r, g, b, a; -}; - -struct PaletteDefaultMCF { - /* 0x00 */ mColor MA00_kColor3; - /* 0x04 */ mColor MA01_tevReg1; - /* 0x08 */ mColor MA01_kColor2; - /* 0x0C */ mColor MA02_tevReg1; - /* 0x10 */ mColor MA02_kColor2; - /* 0x14 */ mColor MA03_kColor3; - /* 0x18 */ mColor MA06_kColor3; - /* 0x1C */ mColor field_0x1C; -}; - -struct TwoPaletteDefaultMCF { - /* 0x00 */ PaletteDefaultMCF field_0x00; - /* 0x20 */ PaletteDefaultMCF field_0x20; -}; - -// Ghidra had contents of this in an array but that won't work due to dtor codegen. -// Start is correct (dtor offset), needs to at least include field_0x104 -struct SpfSub { - /* 0x000 */ f32 field_0x000; - /* 0x004 */ mColor grey_787878; - /* 0x008 */ SffSub white3_ffffff; - /* 0x014 */ SpfSub2 field_0x014; - /* 0x020 */ mColor field_0x020[5]; - /* 0x034 */ f32 field_0x034[5]; - /* 0x048 */ f32 field_0x048[5]; - /* 0x05C */ f32 field_0x05C; - /* 0x060 */ SpfSub2 field_0x060; - /* 0x06C */ mColor field_0x06C[5]; - /* 0x080 */ f32 field_0x080[5]; - /* 0x094 */ f32 field_0x094[5]; - /* 0x0A8 */ f32 field_0x0A8; - /* 0x0AC */ SpfSub2 field_0x0AC; - /* 0x0B8 */ mColor field_0x0B8[5]; - /* 0x0CC */ f32 field_0x0CC[5]; - /* 0x0E0 */ f32 field_0x0E0[5]; - /* 0x0F4 */ f32 field_0x0F4; - /* 0x0F8 */ SpfSub2 field_0x0F8; - /* 0x104 */ mColor field_0x104[5]; - /* 0x118 */ f32 field_0x118[5]; - /* 0x12C */ f32 field_0x12C[5]; -}; - -// We assume there's SffSub in here because of weak function order -// The size is correct now, but the default assignment operator doesn't match yet, -// which could have many reasons. Need to tweak the layout. -struct Spf { - Spf(); - ~Spf() {} - - /* 0x000 */ mColor grey_aaaaaa; - /* 0x004 */ mColor white_ffffff; - /* 0x008 */ mColor grey_808080; - /* 0x00C */ mColor cream_ffffc0; - /* 0x010 */ mColor grey2_aaaaaa; - /* 0x014 */ mColor white2_ffffff; - /* 0x018 */ f32 field_0x18; - /* 0x01C */ mColor pastel_orange_ffb787; - /* 0x020 */ f32 field_0x20; - /* 0x024 */ f32 field_0x24; - /* 0x028 */ mColor black_000000; - /* 0x02C */ mColor black2_000000; - /* 0x030 */ SpfSub mSub; - /* 0x170 */ mColor grey_787878; - /* 0x174 */ mColor grey2_787878; - /* 0x178 */ mColor grey3_787878; - /* 0x17C */ mColor mCloudColor; - /* 0x180 */ mColor mSkyColor; - /* 0x184 */ mColor seafoam_green_b9d8b7; - /* 0x188 */ mColor white3_ffffff; - /* 0x18C */ mVec3_c field_0x18C; - /* 0x198 */ mVec3_c field_0x198; - /* 0x1A4 */ SffSub MAO5_kColor3; // assuming SffSub here due to initialization with same values - /* 0x1B0 */ mVec3_c field_0x1B0; - /* 0x1BC */ u8 field_0x1BC; - /* 0x1C0 */ f32 field_0x1C0; - /* 0x1C4 */ f32 field_0x1C4; - /* 0x1C8 */ u8 field_0x1C8; - /* 0x1CC */ f32 field_0x1CC; - /* 0x1D0 */ f32 field_0x1D0; - /* 0x1D4 */ u8 field_0x1D4; - /* 0x1D5 */ UnalignedColor field_0x1D5; // pastel_yelow_#fff0b4 - /* 0x1D9 */ u8 field_0x1D9; - /* 0x1DC */ f32 field_0x1DC; - /* 0x1E0 */ f32 field_0x1E0; - /* 0x1E4 */ f32 field_0x1E4; - /* 0x1E8 */ f32 field_0x1E8; - /* 0x1EC */ u8 field_0x1EC; - /* 0x1ED */ u8 field_0x1ED; - /* 0x1EE */ u16 field_0x1EE; - /* 0x1F0 */ f32 field_0x1F0; - /* 0x1F4 */ f32 field_0x1F4; - /* 0x1F8 */ f32 field_0x1F8; - /* 0x1FC */ f32 field_0x1FC; - /* 0x200 */ mColor black3_000000; - /* 0x204 */ mColor black4_000000; -}; - -struct Sff { - Sff(); - ~Sff() {} - - SffSub field_0x00[3]; -}; - -struct Bpm1 { - Bpm1() {} - ~Bpm1() {} - - u8 field_0x00[0x14 - 0x00]; - mColor field_0x14; -}; - -struct Bpm2 { - Bpm2() {} - ~Bpm2() {} - - // maybe - u8 _0x00[0x14 - 0x00]; -}; - -struct PaletteEAF_smol_entry { - PaletteEAF_smol_entry() {} - ~PaletteEAF_smol_entry() {} - mColor field_0x00; - mColor field_0x04; - mColor field_0x08; - mColor field_0x0C; -}; - -struct PaletteEAF_smol { - ~PaletteEAF_smol() {} - PaletteEAF_smol_entry field_0x00[8]; -}; - -struct PaletteEAF_big_entry { - PaletteEAF_big_entry() {} - ~PaletteEAF_big_entry() {} - mColor field_0x00; - mColor field_0x04; - mColor field_0x08; - mColor field_0x0C; - u8 field_0x10; -}; - -struct PaletteEAF_big { - ~PaletteEAF_big() {} - PaletteEAF_big_entry field_0x00[8]; -}; - -// Apparently particle color related -struct Bpm3 { - Bpm3() {} - ~Bpm3() {} - - PaletteEAF_smol field_0x00[0x20]; -}; - -struct Bpm4 { - Bpm4() {} - ~Bpm4() {} - - PaletteEAF_big field_0x00[0x20]; -}; - -struct Bpm7 { - Bpm7() {} - ~Bpm7() {} - - u8 _0x00[0x14 - 0x00]; -}; - -struct Bpm8 { - Bpm8() {} - ~Bpm8() {} - - u8 _0x00[0x14 - 0x00]; -}; - -struct Bpm9 { - Bpm9() {} - ~Bpm9() {} - - u8 _0x00[0x14 - 0x00]; -}; - -struct LightParams { - void SetColor(mColor clr) { - mClr = clr; - } - void SetScale(f32 scale) { - mScale = scale; - } - void SetPosition(const mVec3_c &pos) { - mPos = pos; - } - - /* 0x00 */ EGG::Vector3f mPos; - /* 0x0C */ mColor mClr; - /* 0x10 */ f32 mScale; - /* 0x14 */ s32 mIdx; - /* 0x18 */ s32 field_0x18; -}; - -class BlurAndPaletteManager { -public: - BlurAndPaletteManager(); - virtual ~BlurAndPaletteManager() { - sPInstance = nullptr; - } - - static BlurAndPaletteManager &GetInstance() { - return sInstance; - } - - static BlurAndPaletteManager *GetPInstance() { - return sPInstance; - } - - void fn_800247D0(mVec3_c, f32); - void fn_80022AF0(f32); - void setField_0x2F20(f32 arg) { - field_0x2F20 = arg; - } - void fn_800223A0(LightParams *); - void fn_80022440(LightParams *); - void fn_800225F0(LightParams *); - void fn_800226E0(LightParams *); - // light pillar related - void fn_80024240(s16, s16, s16); - - u8 get0x2DE8() const { - return field_0x2DE0[8]; - } - - const PaletteDefaultMCF &GetCurrentDefaultMcf() const { - return field_0x5CE4; - } - - const Spf &GetCurrentSph() const { - return currentSpf; - } - - const PaletteEAF_smol_entry &getSmallEAF(s32 idx1, s32 idx2) { - return field_0x38E4.field_0x00[idx1].field_0x00[idx2]; - } - - f32 getfield_0x2F14() const { - return field_0x2F14; - } - - f32 getfield_0x2F18() const { - return field_0x2F18; - } - - f32 getfield_0x2F1C() const { - return field_0x2F1C; - } - - static mColor &getLightColor1(); - static mColor &getLightColor2(); - -private: - mColor combineColors(const mColor &c1, const mColor &c2, f32 ratio); - - /* 0x0004 */ Spf currentSpf; - /* 0x020C */ Spf spfs[20]; - /* 0x2AAC */ Sff currentSff; - /* 0x2AD0 */ Sff sffs[20]; - /* 0x2DA0 */ u8 field_0x2DA0[0x2DD4 - 0x2DA0]; - /* 0x2DD4 */ mVec3_c field_0x2DD4; - /* 0x2DE0 */ u8 field_0x2DE0[0x2DEC - 0x2DE0]; - /* 0x2DEC */ mColor field_0x2DEC; - /* 0x2DF0 */ u8 field_0x2DF0[0x2DF4 - 0x2DF0]; - /* 0x2DF4 */ mColor field_0x2DF4; - /* 0x2DF8 */ mVec3_c field_0x2DF8; - /* 0x2E04 */ u8 field_0x2E04[0x2E08 - 0x2E04]; - /* 0x2E08 */ mVec3_c field_0x2E08[5]; - /* 0x2E44 */ mVec3_c field_0x2E44[5]; - /* 0x2E80 */ mVec3_c field_0x2E80[5]; - /* 0x2EBC */ mVec3_c field_0x2EBC[5]; - /* 0x2EF8 */ mColor field_0x2EF8; - /* 0x2EFC */ mColor field_0x2EFC; - /* 0x2F00 */ mVec3_c field_0x2F00; - /* 0x2F0C */ s16 field_0x2F0C; - /* 0x2F0E */ s16 field_0x2F0E; - /* 0x2F10 */ u8 field_0x2F10; - /* 0x2F14 */ f32 field_0x2F14; - /* 0x2F18 */ f32 field_0x2F18; - /* 0x2F1C */ f32 field_0x2F1C; - /* 0x2F20 */ f32 field_0x2F20; - /* 0x2F24 */ u8 field_0x2F24[4]; - /* 0x2F28 */ LightParams *field_0x2F28[5]; - /* 0x2F3C */ LightParams *field_0x2F3C[200]; - /* 0x325C */ u8 field_0x325C[0x357C - 0x325C]; - /* 0x357C */ Bpm1 field_0x357C; - /* 0x3594 */ u8 _0x3594[0x35A0 - 0x3594]; - /* 0x35A0 */ Bpm2 field_0x35A0; - /* 0x35B4 */ Bpm7 field_0x35B4[8]; - /* 0x3654 */ Bpm8 field_0x3654[10]; - /* 0x371C */ Bpm9 field_0x371C[20]; - /* 0x38AC */ u8 _0x38AC[0x38B4 - 0x38AC]; - /* 0x38B4 */ mVec3_c field_0x38B4; - /* 0x38C0 */ u8 _0x38C0[0x38C8 - 0x38C0]; - /* 0x38C8 */ mVec3_c field_0x38C8; - /* 0x38D4 */ u8 _0x38D4[0x38E4 - 0x38D4]; - /* 0x38E4 */ Bpm3 field_0x38E4; - /* 0x48E4 */ Bpm4 field_0x48E4; - /* 0x5CE4 */ PaletteDefaultMCF field_0x5CE4; - /* 0x5D04 */ TwoPaletteDefaultMCF field_0x5D04; - - static BlurAndPaletteManager sInstance; - static BlurAndPaletteManager *sPInstance; -}; - -#endif diff --git a/include/toBeSorted/d_d3d.h b/include/toBeSorted/d_d3d.h index 07e9505d..76cbd010 100644 --- a/include/toBeSorted/d_d3d.h +++ b/include/toBeSorted/d_d3d.h @@ -91,14 +91,14 @@ public: return create2(ac, mdlFile, mdlName, anmName, callback, bufferOption); } - void setSoundSource(SoundSource *pSource); + void setSoundSource(dSoundSourceIf_c *pSource); protected: bool loadSounds(const char *name); void syncAnmFrame(); void setSoundRate(f32 rate); - /* 0x68 */ SoundSource *mpSoundSource; + /* 0x68 */ dSoundSourceIf_c *mpSoundSource; /* 0x6C */ void *mpSoundData; }; diff --git a/include/toBeSorted/event.h b/include/toBeSorted/event.h index f07f8aa6..68ff6e68 100644 --- a/include/toBeSorted/event.h +++ b/include/toBeSorted/event.h @@ -15,6 +15,10 @@ public: void *callback2; public: + static u32 makeEventFlag(const u32 &clearMask, const u32 &unsetBits) { + return clearMask & ~unsetBits; + } + /** 0x800A0C40 */ Event(const char *eventName, u32 unk, u32 eventFlags, void *callback1, void *callback2); Event(u32 eventId, s32 roomId, u32 eventFlags, void *callback1, void *callback2); diff --git a/include/toBeSorted/music_mgrs.h b/include/toBeSorted/music_mgrs.h index 476c1293..b7b4d884 100644 --- a/include/toBeSorted/music_mgrs.h +++ b/include/toBeSorted/music_mgrs.h @@ -2,16 +2,21 @@ #define MUSIC_MGRS_H #include "common.h" +#include "d/snd/d_snd_player_mgr.h" +#include "d/snd/d_snd_source_mgr.h" -class BgmMgr; +class dSndPlayerMgr_c; +class dSndSound_c; -extern "C" BgmMgr *BGM_MGR; +// A lot of these names are and were guesses that are probably wrong in a lot of ways. + +#define BGM_MGR (dSndPlayerMgr_c::GetInstance()) extern "C" void fn_8035E000(); -extern "C" void fn_8035E860(BgmMgr *); -extern "C" void fn_8035E310(BgmMgr *); -extern "C" void fn_8035E820(BgmMgr *); -extern "C" void fn_8035E880(BgmMgr *); -extern "C" void fn_8035E790(BgmMgr *, UNKWORD, void *); +extern "C" void fn_8035E860(dSndPlayerMgr_c *); +extern "C" void fn_8035E310(dSndPlayerMgr_c *); +extern "C" void fn_8035E820(dSndPlayerMgr_c *); +extern "C" void fn_8035E880(dSndPlayerMgr_c *); +extern "C" void fn_8035E790(dSndPlayerMgr_c *, UNKWORD, void *); extern "C" void *ENEMY_SOUND_MGR; extern "C" void fn_80362150(void *, u16); @@ -21,12 +26,25 @@ extern "C" void fn_80362730(void *); extern "C" void fn_80365D20(void *); extern "C" void fn_803624F0(void *); extern "C" void fn_80364FD0(void *, s32); +extern "C" bool fn_80364DA0(void *); +extern "C" void fn_80365020(void *); +extern "C" void fn_80364D00(void *, s32); -extern "C" void *ENEMY_BGM_RELATED_MGR; -extern "C" void fn_80384570(void *, bool); -extern "C" void fn_803858D0(void *); +#define ENEMY_BGM_RELATED_MGR (dSndSourceMgr_c::GetInstance()) +extern "C" void fn_80384570(dSndSourceMgr_c *, bool); +// This one has a SoundActor that actually plays the BGM_ music tracks, +// including the battle BGM track. extern "C" void *FANFARE_SOUND_MGR; extern "C" void AnotherSoundMgr__playSound(void *, s32); +extern "C" bool fn_803721F0(void *, u32); +extern "C" bool fn_803720E0(void *, u32); +extern "C" bool fn_80372070(void *, u32); +extern "C" bool fn_803734C0(void *, u32); +extern "C" bool fn_80373550(void *, u32); +extern "C" void fn_80372920(void *); +extern "C" void fn_803738B0(void *, dSndSound_c *sound); +extern "C" void fn_80373900(void *, dSndSound_c *sound); +extern "C" bool fn_803733B0(void*, u32); #endif diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath index 7517fae0..d0f5d5d3 100644 --- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath @@ -15,13 +15,13 @@ using ::atan; using ::atan2; using ::atan2f; using ::ceil; -using ::ceilf; +// using ::ceilf; using ::copysign; using ::cos; -using ::cosf; -using ::fabsf; +// using ::cosf; +// using ::fabsf; using ::floor; -using ::floorf; +// using ::floorf; using ::fmod; using ::fmodf; using ::frexp; @@ -33,13 +33,29 @@ using ::modff; using ::pow; using ::scalbn; using ::sin; -using ::sinf; +// using ::sinf; using ::sqrt; -using ::sqrtf; +// using ::sqrtf; using ::tan; using ::tanf; -inline float sqrt(float x) { +inline float ceilf(float x) { + return ::ceil(x); +} + +inline float floorf(float x) { + return ::floor(x); +} + +inline float cosf(float x) { + return cos(x); +} + +inline float sinf(float x) { + return sin(x); +} + +inline float sqrtf(float x) { return ::sqrtf(x); } @@ -54,5 +70,12 @@ inline float sqrt(float x) { } // namespace std +#define _HUGE_ENUF 1e+300 +#define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF)) +#define HUGE_VAL ((double)INFINITY) +#define HUGE_VALL ((long double)INFINITY) + +#define DOUBLE_INF HUGE_VAL + #endif #endif diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h index 38e4772b..4ab23c36 100644 --- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/cmath.h @@ -3,21 +3,14 @@ namespace std { -/* float fabs(float num) { - return ::fabsf(num); -} */ inline float fabsf(float num) { return ::fabsf(num); } -inline float sqrt(float x) { - return ::sqrtf(x); -} - inline float abs(float x) { return ::fabsf(x); } } // namespace std -#endif \ No newline at end of file +#endif diff --git a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math.h b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math.h index 0d311c0e..58b6b4e7 100644 --- a/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math.h +++ b/src/PowerPC_EABI_Support/MSL/MSL_C/MSL_Common/Include/math.h @@ -29,7 +29,7 @@ double cos(double); float cosf(float); double exp(double); double ceil(double); -float ceilf(float); +// float ceilf(float); double frexp(double, int *); double ldexp(double, int); double modf(double, double *); diff --git a/src/REL/d/a/d_a_bird.cpp b/src/REL/d/a/d_a_bird.cpp index 2700bfcb..581a8ad9 100644 --- a/src/REL/d/a/d_a_bird.cpp +++ b/src/REL/d/a/d_a_bird.cpp @@ -18,6 +18,8 @@ STATE_DEFINE(dBird_c, MiniGameMove); STATE_DEFINE(dBird_c, MiniGameEnd); STATE_DEFINE(dBird_c, MiniGameLevelUpDemo); +dBird_c *dBird_c::spInstance; + void dBird_c::initializeState_Wait() {} void dBird_c::executeState_Wait() {} void dBird_c::finalizeState_Wait() {} @@ -63,3 +65,5 @@ void dBird_c::finalizeState_MiniGameEnd() {} void dBird_c::initializeState_MiniGameLevelUpDemo() {} void dBird_c::executeState_MiniGameLevelUpDemo() {} void dBird_c::finalizeState_MiniGameLevelUpDemo() {} + +void dBird_c::accelerateTowards(mVec3_c &targetDirection) {} diff --git a/src/REL/d/a/d_a_bombf.cpp b/src/REL/d/a/d_a_bombf.cpp index b664ce01..72456bae 100644 --- a/src/REL/d/a/d_a_bombf.cpp +++ b/src/REL/d/a/d_a_bombf.cpp @@ -5,9 +5,9 @@ #include "d/col/bg/d_bg_s.h" #include "d/col/bg/d_bg_s_lin_chk.h" #include "d/flag/sceneflag_manager.h" +#include "d/snd/d_snd_wzsound.h" #include "m/m_mtx.h" #include "m/m_vec.h" -#include "toBeSorted/small_sound_mgr.h" #include "toBeSorted/time_area_mgr.h" SPECIAL_ACTOR_PROFILE(BOMBF, dAcBombf_c, fProfile::BOMBF, 0x129, 0, 4099); diff --git a/src/REL/d/a/e/d_a_e_sm.cpp b/src/REL/d/a/e/d_a_e_sm.cpp index dae7f886..b095eafc 100644 --- a/src/REL/d/a/e/d_a_e_sm.cpp +++ b/src/REL/d/a/e/d_a_e_sm.cpp @@ -16,10 +16,12 @@ #include "d/col/cc/d_cc_s.h" #include "d/d_camera.h" #include "d/d_jnt_col.h" +#include "d/d_light_env.h" #include "d/d_linkage.h" #include "d/d_sc_game.h" #include "d/flag/sceneflag_manager.h" #include "d/flag/storyflag_manager.h" +#include "d/snd/d_snd_wzsound.h" #include "f/f_base.h" #include "f/f_profile_name.h" #include "m/m3d/m_fanm.h" @@ -36,11 +38,11 @@ #include "rvl/MTX/mtx.h" #include "rvl/MTX/mtxvec.h" #include "s/s_Math.h" -#include "toBeSorted/blur_and_palette_manager.h" #include "toBeSorted/d_emitter.h" -#include "toBeSorted/small_sound_mgr.h" #include "toBeSorted/time_area_mgr.h" +#include + SPECIAL_ACTOR_PROFILE(E_SM, dAcEsm_c, fProfile::E_SM, 0xEB, 0, 4098); static dCcD_SrcSph sSphSrc = { @@ -198,7 +200,7 @@ int dAcEsm_c::actorCreate() { mLightInfo.SetColor(mColor(0xCC, 0xFF, 0xFF, 0xFF)); mLightInfo.SetScale(0.f); - BlurAndPaletteManager::GetPInstance()->fn_800225F0(&mLightInfo); + dLightEnv_c::GetPInstance()->plight_set(&mLightInfo); if (field_0xBBF == 1) { rotation.x = 0x8000; field_0xBCC = 1; @@ -315,7 +317,7 @@ int dAcEsm_c::actorPostCreate() { } int dAcEsm_c::doDelete() { - BlurAndPaletteManager::GetPInstance()->fn_800226E0(&mLightInfo); + dLightEnv_c::GetPInstance()->plight_cut(&mLightInfo); return SUCCEEDED; } diff --git a/src/REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp b/src/REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp index e8f0ee98..3596fc3c 100644 --- a/src/REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp +++ b/src/REL/d/a/obj/d_a_obj_F400_gate_leaf.cpp @@ -1,3 +1,56 @@ #include "d/a/obj/d_a_obj_F400_gate_leaf.h" +#include "common.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/flag/storyflag_manager.h" +#include "f/f_base.h" +#include "nw4r/g3d/res/g3d_resfile.h" SPECIAL_ACTOR_PROFILE(OBJ_F400_GATE_LEAF, dAcOF400GateLeaf_c, fProfile::OBJ_F400_GATE_LEAF, 0x286, 0, 3); + +bool dAcOF400GateLeaf_c::createHeap() { + void *data = dAcObjBase_c::getOarcResFile("F400GateLeaf"); + if (data == nullptr) { + return false; + } + + nw4r::g3d::ResFile resFile(data); + if (!resFile.IsValid()){ + return false; + } + + nw4r::g3d::ResMdl mdl = resFile.GetResMdl("F400GateLeaf"); + if (!mdl.IsValid()){ + return false; + } + + return mMdl.create(mdl, &heap_allocator, 0, 1, nullptr); +} + +int dAcOF400GateLeaf_c::create() { + u32 counterIdx = getStoryflag(); + u32 flagValid = StoryflagManager::sInstance->checkFlagValid(counterIdx); + if (flagValid == 0) { + return FAILED; + } + CREATE_ALLOCATOR(dAcOF400GateLeaf_c); + mMdl.setPriorityDraw(0x1C, 9); + updateMatrix(); + mMdl.setLocalMtx(mWorldMtx); + mVec3_c min, max; + mMdl.getBounds(&min,&max); + boundingBox.Set(min, max); + return SUCCEEDED; +} + +int dAcOF400GateLeaf_c::draw() { + StoryflagManager *storyFlagManager = StoryflagManager::sInstance; + u32 counterIdx = getStoryflag(); + if (!storyFlagManager->getCounterOrFlag(counterIdx)) { + dAcObjBase_c::drawModelType1(&mMdl); + } + return SUCCEEDED; +} + +u16 dAcOF400GateLeaf_c::getStoryflag() { + return params & 0xffff; +} diff --git a/src/REL/d/a/obj/d_a_obj_F400_gate_seal.cpp b/src/REL/d/a/obj/d_a_obj_F400_gate_seal.cpp index d6898bde..e0147bd4 100644 --- a/src/REL/d/a/obj/d_a_obj_F400_gate_seal.cpp +++ b/src/REL/d/a/obj/d_a_obj_F400_gate_seal.cpp @@ -1,3 +1,115 @@ #include "d/a/obj/d_a_obj_F400_gate_seal.h" +#include "common.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/a/obj/d_a_obj_door.h" +#include "f/f_base.h" +#include "f/f_profile_name.h" +#include "m/m3d/m_anmmatclr.h" +#include "nw4r/g3d/res/g3d_resanmclr.h" +#include "nw4r/g3d/res/g3d_resfile.h" +#include "nw4r/g3d/res/g3d_resmdl.h" +#include "rvl/MTX/vec.h" + SPECIAL_ACTOR_PROFILE(OBJ_F400_GATE_SEAL, dAcOF400GateSeal_c, fProfile::OBJ_F400_GATE_SEAL, 0x287, 0, 6); + +bool dAcOF400GateSeal_c::createHeap() { + void *data = dAcObjBase_c::getOarcResFile("F400GateSeal"); + if (data == nullptr) { + return false; + } + + nw4r::g3d::ResFile resFile(data); + if (!resFile.IsValid()) { + return false; + } + + nw4r::g3d::ResMdl mdl = resFile.GetResMdl("F400GateSeal"); + if (!mdl.IsValid()) { + return false; + } + + if (!mMdl.create(mdl, &heap_allocator, 0)) { + return false; + } + + nw4r::g3d::ResAnmClr anmClr = resFile.GetResAnmClr("F400GateSeal"); + if (!anmClr.IsValid()) { + return false; + } + + if (!mAnmClr.create(mdl, anmClr, &heap_allocator, 0, 1)) { + return false; + } + + return mMdl.setAnm(mAnmClr); +} + +int dAcOF400GateSeal_c::actorCreate() { + return SUCCEEDED; +} + +int dAcOF400GateSeal_c::actorPostCreate() { + bool notDone = true; + dAcOdoor_c *parent = (dAcOdoor_c *)fManager_c::searchBaseByProfName(fProfile::OBJ_DOOR, nullptr); + dAcOdoor_c *door; + + while (notDone && parent != nullptr) { + if (10000.0f < PSVECSquareDistance(position, parent->position)) { + parent = (dAcOdoor_c *)fManager_c::searchBaseByProfName(fProfile::OBJ_DOOR, parent); + door = parent; + } else { + notDone = false; + } + } + if (notDone) { + return FAILED; + } + + mDoor.link(door); + CREATE_ALLOCATOR(dAcOF400GateSeal_c); + if (mDoor.get() == nullptr) { + return FAILED; + } + if (mDoor.get()->isLocked()) { + mAnmClr.setFrame(mAnmClr.getFrameStart(0), 0); + } else { + mAnmClr.setFrame(mAnmClr.getFrameMax(0), 0); + } + mMdl.setPriorityDraw(0x1C, 9); + updateMatrix(); + mMdl.setLocalMtx(mWorldMtx); + mVec3_c min, max; + mMdl.getBounds(&min, &max); + boundingBox.Set(min, max); + return SUCCEEDED; +} + +int dAcOF400GateSeal_c::actorExecute() { + if (mDoor.get() == nullptr) { + return SUCCEEDED; + } + + if (mDoor.get()->isLocked()) { + f32 frame = mAnmClr.getFrameStart(0); + mAnmClr.setFrame(frame, 0); + } else { + if (checkObjectProperty(2)) { + f32 frame = mAnmClr.getFrameMax(0); + mAnmClr.setFrame(frame, 0); + } else { + mAnmClr.play(); + } + } + if (mAnmClr.isStop(0)) { + setObjectProperty(0x200); + } else { + clearObjectProperty(0x200); + } + return SUCCEEDED; +} + +int dAcOF400GateSeal_c::draw() { + dAcObjBase_c::drawModelType1(&mMdl); + return SUCCEEDED; +} diff --git a/src/REL/d/a/obj/d_a_obj_bird_sp.cpp b/src/REL/d/a/obj/d_a_obj_bird_sp.cpp index f188f860..6d8301b5 100644 --- a/src/REL/d/a/obj/d_a_obj_bird_sp.cpp +++ b/src/REL/d/a/obj/d_a_obj_bird_sp.cpp @@ -1,3 +1,68 @@ #include "d/a/obj/d_a_obj_bird_sp.h" +#include "d/a/d_a_bird.h" +#include "d/col/c/c_cc_d.h" +#include "d/col/cc/d_cc_s.h" +#include "f/f_base.h" +#include "f/f_profile_name.h" +#include "m/m_mtx.h" + +// clang-format off +dCcD_SrcSph dAcObjBirdSp_c::sCcSrc = { + /* mObjInf */ { + /* mObjAt */ {0, 2, {0, 0, 0}, 0, 0, 0, 0, 0, 0}, + // AT_TYPE_COMMON0 - AT_TYPE_WIND + /* mObjTg */ {~(AT_TYPE_BUGNET | AT_TYPE_BEETLE | AT_TYPE_0x80000 | AT_TYPE_0x8000), 0x00000105, {0, 00, 0x407}, 0, 0}, + /* mObjCo */ {0x00004029}}, + /* mSphInf */ {1000.0f} +}; +// clang-format on + SPECIAL_ACTOR_PROFILE(OBJ_BIRD_SP_UP, dAcObjBirdSp_c, fProfile::OBJ_BIRD_SP_UP, 0x260, 0, 1); + +bool dAcObjBirdSp_c::createHeap() { + return SUCCEEDED; +} + +int dAcObjBirdSp_c::create() { + CREATE_ALLOCATOR(dAcObjBirdSp_c); + + boundingBox.Set(mVec3_c(-2000, -2000, -2000), mVec3_c(2000, 2000, 2000)); + mCollider.Set(sCcSrc); + mCollider.SetStts(mStts); + mCollider.SetR(mScale.x * 1000.0f); + + return SUCCEEDED; +} +int dAcObjBirdSp_c::actorExecute() { + /* if its colliding with Bird or Player */ + if (mCollider.ChkCoHit() && mCollider.GetCoActor() != nullptr && + (mCollider.GetCoActor()->profile_name == fProfile::BIRD || + mCollider.GetCoActor()->profile_name == fProfile::PLAYER)) { + mVec3_c posChange(0, -0.2, 1.0); + mMtx_c matrix; + matrix.ZXYrotS(rotation); + PSMTXMultVec(matrix.m, posChange, posChange); + + f32 angle = (position - dBird_c::getInstance()->position).dot(posChange); + if (angle < 0.0f) { + posChange = -posChange; + } + + posChange *= 1000.0f; + posChange += position; + posChange -= dBird_c::getInstance()->position; + dBird_c::getInstance()->accelerateTowards(posChange); + } + + mCollider.SetC(position); + dCcS::GetInstance()->Set(&mCollider); + mWorldMtx.transS(position.x, position.y, position.z); + mWorldMtx.ZXYrotM(rotation); + + return SUCCEEDED; +} + +int dAcObjBirdSp_c::draw() { + return SUCCEEDED; +} diff --git a/src/REL/d/a/obj/d_a_obj_blade.cpp b/src/REL/d/a/obj/d_a_obj_blade.cpp index 7ac3a94b..e72061d9 100644 --- a/src/REL/d/a/obj/d_a_obj_blade.cpp +++ b/src/REL/d/a/obj/d_a_obj_blade.cpp @@ -1,3 +1,42 @@ #include "d/a/obj/d_a_obj_blade.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/d_stage.h" +#include "f/f_base.h" +#include "m/m_vec.h" +#include "nw4r/g3d/res/g3d_resfile.h" +#include "toBeSorted/arc_managers/current_stage_arc_manager.h" + SPECIAL_ACTOR_PROFILE(OBJ_BLADE, dAcOblade_c, fProfile::OBJ_BLADE, 0x1E4, 0, 4); + +bool dAcOblade_c::createHeap() { + void *data = CurrentStageArcManager::GetInstance()->getData("g3d/stage.brres"); + mResFile = nw4r::g3d::ResFile(data); + dStage_c::bindStageResToFile(&mResFile); + dStage_c::bindSkyCmnToResFile(&mResFile); + TRY_CREATE(mMdl.create(data, "StageF000Blade", "StageF000Blade", &heap_allocator, 0x120)); + return true; +} + +int dAcOblade_c::create() { + CREATE_ALLOCATOR(dAcOblade_c); + mMdl.setAnm("StageF000Blade", m3d::PLAY_MODE_4); + updateMatrix(); + mMdl.getModel().setLocalMtx(mWorldMtx); + boundingBox.Set(mVec3_c(-0.0f, -0.0f, -0.0f), mVec3_c(0.0f, 0.0f, 0.0f)); + return SUCCEEDED; +} + +int dAcOblade_c::doDelete() { + return SUCCEEDED; +} + +int dAcOblade_c::actorExecute() { + mMdl.play(); + return SUCCEEDED; +} + +int dAcOblade_c::draw() { + drawModelType1(&mMdl.getModel()); + return SUCCEEDED; +} diff --git a/src/REL/d/a/obj/d_a_obj_distant_ship.cpp b/src/REL/d/a/obj/d_a_obj_distant_ship.cpp index af5666b7..45d773c3 100644 --- a/src/REL/d/a/obj/d_a_obj_distant_ship.cpp +++ b/src/REL/d/a/obj/d_a_obj_distant_ship.cpp @@ -1,3 +1,58 @@ #include "d/a/obj/d_a_obj_distant_ship.h" +#include "common.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/flag/sceneflag_manager.h" +#include "f/f_base.h" +#include "nw4r/g3d/res/g3d_resfile.h" +#include "toBeSorted/arc_managers/current_stage_arc_manager.h" + SPECIAL_ACTOR_PROFILE(OBJ_DIS_SHIP, dAcOdistantShip_c, fProfile::OBJ_DIS_SHIP, 0x143, 0, 0); + +bool dAcOdistantShip_c::createHeap() { + const char *modelName = getModelName(); + mBrres = (nw4r::g3d::ResFile)CurrentStageArcManager::GetInstance()->getData("g3d/stage.brres"); + TRY_CREATE(mModel.create(mBrres.GetResMdl(modelName), &heap_allocator, 0x120, 1, 0)); + return SUCCEEDED; +} + +int dAcOdistantShip_c::create() { + mIsVisible = false; + u8 flag = getFromParams(0, 0xFF); + mSubtype = getFromParams(8, 0xF); + + if (SceneflagManager::sInstance->checkBoolFlag(roomid, flag)) { + mIsVisible = true; + } + + if (mIsVisible) { + CREATE_ALLOCATOR(dAcOdistantShip_c); + updateMatrix(); + mModel.setLocalMtx(mWorldMtx); + boundingBox.Set(mVec3_c(-0.0f, -0.0f, -0.0f), mVec3_c(0.0f, 0.0f, 0.0f)); + } + return SUCCEEDED; +} + +int dAcOdistantShip_c::doDelete() { + return SUCCEEDED; +} + +int dAcOdistantShip_c::actorExecute() { + return SUCCEEDED; +} + +int dAcOdistantShip_c::draw() { + if (mIsVisible) { + drawModelType1(&mModel); + } + return SUCCEEDED; +} + +const char *dAcOdistantShip_c::getModelName() { + switch (mSubtype) { + case 0: return "StageF301_D300"; + case 1: return "StageF301_3_D300"; + default: return nullptr; + } +} diff --git a/src/REL/d/a/obj/d_a_obj_girahim_foot.cpp b/src/REL/d/a/obj/d_a_obj_girahim_foot.cpp index c873f90a..4e00ed88 100644 --- a/src/REL/d/a/obj/d_a_obj_girahim_foot.cpp +++ b/src/REL/d/a/obj/d_a_obj_girahim_foot.cpp @@ -1,13 +1,93 @@ #include "d/a/obj/d_a_obj_girahim_foot.h" +#include "common.h" +#include "d/a/obj/d_a_obj_base.h" +#include "f/f_base.h" +#include "m/m_angle.h" +#include "m/m_vec.h" +#include "nw4r/g3d/res/g3d_resfile.h" +#include "s/s_State.hpp" +#include "toBeSorted/d_emitter.h" + SPECIAL_ACTOR_PROFILE(OBJ_GIRAHIM_FOOT, dAcOgirahimFoot_c, fProfile::OBJ_GIRAHIM_FOOT, 0x210, 0, 6); STATE_DEFINE(dAcOgirahimFoot_c, Wait); STATE_DEFINE(dAcOgirahimFoot_c, Appear); -void dAcOgirahimFoot_c::initializeState_Wait() {} -void dAcOgirahimFoot_c::executeState_Wait() {} +bool dAcOgirahimFoot_c::createHeap() { + mRes = nw4r::g3d::ResFile(getOarcResFile("Girahim_Foot")); + + nw4r::g3d::ResMdl resMdl = mRes.GetResMdl("Girahim_Foot"); + + TRY_CREATE(mMdl.create(resMdl, &heap_allocator, 0x120, 1, nullptr)); + + return true; +} + +int dAcOgirahimFoot_c::create() { + CREATE_ALLOCATOR(dAcOgirahimFoot_c); + + updateMatrix(); + + mMdl.setLocalMtx(mWorldMtx); + + mStateMgr.changeState(StateID_Wait); + + poscopy2.x = 13275.0f; + poscopy2.y = 2370.0f; + poscopy2.z = -11780.0f; + + mVec3_c min, max; + mMdl.getBounds(&min, &max); + boundingBox.Set(min, max); + + return SUCCEEDED; +} + +int dAcOgirahimFoot_c::doDelete() { + return SUCCEEDED; +}; + +int dAcOgirahimFoot_c::draw() { + if (*mStateMgr.getStateID() == StateID_Appear) { + drawModelType1(&mMdl); + static mQuat_c rot(0.0f, 25.0f, 0.0f, 200.0f); + fn_8002edb0(mShadow, mMdl, &rot, -1, -1, 0.0f); + } + return SUCCEEDED; +} + +int dAcOgirahimFoot_c::actorExecute() { + mStateMgr.executeState(); + return SUCCEEDED; +} + +void dAcOgirahimFoot_c::initializeState_Wait() { + field_0x394 = false; +} + +void dAcOgirahimFoot_c::executeState_Wait() { + if (field_0x394) { + mStateMgr.changeState(StateID_Appear); + } + return; +} + void dAcOgirahimFoot_c::finalizeState_Wait() {} -void dAcOgirahimFoot_c::initializeState_Appear() {} -void dAcOgirahimFoot_c::executeState_Appear() {} + +void dAcOgirahimFoot_c::initializeState_Appear() { + field_0x394 = true; +} + +// Not matching by one instruction +void dAcOgirahimFoot_c::executeState_Appear() { + if (field_0x394) { + return; + } + + dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_77_, position, nullptr, &mScale, nullptr, nullptr, 0, 0); + + deleteRequest(); +} + void dAcOgirahimFoot_c::finalizeState_Appear() {} diff --git a/src/REL/d/a/obj/d_a_obj_impa_door.cpp b/src/REL/d/a/obj/d_a_obj_impa_door.cpp index ce75d5fd..5bd57c4f 100644 --- a/src/REL/d/a/obj/d_a_obj_impa_door.cpp +++ b/src/REL/d/a/obj/d_a_obj_impa_door.cpp @@ -1,9 +1,48 @@ #include "d/a/obj/d_a_obj_impa_door.h" +#include "common.h" +#include "d/a/obj/d_a_obj_base.h" +#include "f/f_base.h" +#include "m/m_vec.h" +#include "nw4r/g3d/res/g3d_resfile.h" +#include "nw4r/g3d/res/g3d_resmdl.h" + SPECIAL_ACTOR_PROFILE(OBJ_IMPA_DOOR, dAcOimpaDoor_c, fProfile::OBJ_IMPA_DOOR, 0x20C, 0, 3); STATE_DEFINE(dAcOimpaDoor_c, Wait); +bool dAcOimpaDoor_c::createHeap() { + void *data = getOarcFile("DoorG", "g3d/model.brres"); + mResFile = nw4r::g3d::ResFile(data); + nw4r::g3d::ResMdl mdl = mResFile.GetResMdl("DoorG"); + TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x120, 1, nullptr)); + return true; +} + +int dAcOimpaDoor_c::create() { + CREATE_ALLOCATOR(dAcOimpaDoor_c); + updateMatrix(); + mMdl.setLocalMtx(mWorldMtx); + mStateMgr.changeState(StateID_Wait); + mMdl.setPriorityDraw(0x1C, 9); + boundingBox.Set(mVec3_c(-250.0f, 0.0f, -30.0f), mVec3_c(250.0f, 940.0f, 30.0f)); + return SUCCEEDED; +} + +int dAcOimpaDoor_c::doDelete() { + return SUCCEEDED; +} + +int dAcOimpaDoor_c::actorExecute() { + mStateMgr.executeState(); + return SUCCEEDED; +} + +int dAcOimpaDoor_c::draw() { + drawModelType1(&mMdl); + return SUCCEEDED; +} + void dAcOimpaDoor_c::initializeState_Wait() {} void dAcOimpaDoor_c::executeState_Wait() {} void dAcOimpaDoor_c::finalizeState_Wait() {} diff --git a/src/REL/d/a/obj/d_a_obj_island_LOD.cpp b/src/REL/d/a/obj/d_a_obj_island_LOD.cpp index 56fe0d7b..c398d70a 100644 --- a/src/REL/d/a/obj/d_a_obj_island_LOD.cpp +++ b/src/REL/d/a/obj/d_a_obj_island_LOD.cpp @@ -1,3 +1,55 @@ #include "d/a/obj/d_a_obj_island_LOD.h" +#include "common.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/d_light_env.h" +#include "d/d_stage.h" +#include "f/f_base.h" + +const char *const dAcOislandLOD_c::resFilenames[5] = { + "IslLODA", "IslLODB", "IslLODC", "IslLODD", "IslLODE", +}; + +const char *const dAcOislandLOD_c::resMdlNames[5] = { + "IslLODA", "IslLODB", "IslLODC", "IslLODD", "IslLODE", +}; + SPECIAL_ACTOR_PROFILE(OBJ_ISLAND_LOD, dAcOislandLOD_c, fProfile::OBJ_ISLAND_LOD, 0x211, 0, 3); + +bool dAcOislandLOD_c::createHeap() { + mMdlLodIdx = params & 0xf; + void *data = getOarcResFile(dAcOislandLOD_c::resFilenames[mMdlLodIdx]); + mResFile = nw4r::g3d::ResFile(data); + dStage_c::bindStageResToFile(&mResFile); + dStage_c::bindSkyCmnToResFile(&mResFile); + nw4r::g3d::ResMdl mdl = mResFile.GetResMdl(dAcOislandLOD_c::resMdlNames[mMdlLodIdx]); + TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x120, 1, nullptr)); + return true; +} + +int dAcOislandLOD_c::create() { + CREATE_ALLOCATOR(dAcOislandLOD_c); + updateMatrix(); + mMdl.setLocalMtx(mWorldMtx); + mVec3_c min, max; + mMdl.getBounds(&min, &max); + boundingBox.Set(min, max); + mCullingDistance = 500000.0; + return SUCCEEDED; +} + +int dAcOislandLOD_c::doDelete() { + return SUCCEEDED; +} +int dAcOislandLOD_c::actorExecute() { + return SUCCEEDED; +} + +int dAcOislandLOD_c::draw() { + dLightEnv_c &blurAndPaletteManager = dLightEnv_c::GetInstance(); + if (blurAndPaletteManager.fn_80024770(7) && !blurAndPaletteManager.fn_800247A0(7)) { + return SUCCEEDED; + } + drawModelType1(&mMdl); + return SUCCEEDED; +} diff --git a/src/REL/d/a/obj/d_a_obj_mapparts.cpp b/src/REL/d/a/obj/d_a_obj_mapparts.cpp index 274c280b..5e4a118f 100644 --- a/src/REL/d/a/obj/d_a_obj_mapparts.cpp +++ b/src/REL/d/a/obj/d_a_obj_mapparts.cpp @@ -1,3 +1,8 @@ #include "d/a/obj/d_a_obj_mapparts.h" +#include "f/f_base.h" SPECIAL_ACTOR_PROFILE(OBJ_MAPPARTS, dAcOMapparts_c, fProfile::OBJ_MAPPARTS, 0x288, 0, 0); + +int dAcOMapparts_c::create() { + return FAILED; +} diff --git a/src/REL/d/a/obj/d_a_obj_mole_cover.cpp b/src/REL/d/a/obj/d_a_obj_mole_cover.cpp index 6baa0ca1..adfea836 100644 --- a/src/REL/d/a/obj/d_a_obj_mole_cover.cpp +++ b/src/REL/d/a/obj/d_a_obj_mole_cover.cpp @@ -1,3 +1,51 @@ #include "d/a/obj/d_a_obj_mole_cover.h" +#include "common.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_s.h" +#include "d/d_stage.h" +#include "f/f_base.h" +#include "m/m_vec.h" +#include "nw4r/g3d/res/g3d_resfile.h" +#include "nw4r/g3d/res/g3d_resmdl.h" +#include "toBeSorted/arc_managers/current_stage_arc_manager.h" + SPECIAL_ACTOR_PROFILE(OBJ_MOLE_COVER, dAcOmoleCover_c, fProfile::OBJ_MOLE_COVER, 0x20F, 0, 3); + +bool dAcOmoleCover_c::createHeap() { + void *data = CurrentStageArcManager::GetInstance()->getData("g3d/stage.brres"); + mResFile = nw4r::g3d::ResFile(data); + dStage_c::bindStageResToFile(&mResFile); + dStage_c::bindSkyCmnToResFile(&mResFile); + nw4r::g3d::ResMdl mdl = mResFile.GetResMdl("StageF000MallCover"); + TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x120, 1, nullptr)); + void *dzb = CurrentStageArcManager::GetInstance()->getData("dzb/StageF000MallCover.dzb"); + void *plc = CurrentStageArcManager::GetInstance()->getData("dat/StageF000MallCover.plc"); + updateMatrix(); + mMdl.setLocalMtx(mWorldMtx); + TRY_CREATE(!mBgW.Set((cBgD_t *)dzb, (PLC *)plc, 1, &mWorldMtx, &mScale)); + mBgW.Lock(); + return true; +} + +int dAcOmoleCover_c::create() { + CREATE_ALLOCATOR(dAcOmoleCover_c); + dBgS::GetInstance()->Regist(&mBgW, this); + mMdl.setPriorityDraw(0x1C, 9); + boundingBox.Set(mVec3_c(-1900.0f, 1100.0f, -5500.0f), mVec3_c(100.0f, 1700.0f, -1800.0f)); + mCullingDistance = FLOAT_MAX; + return SUCCEEDED; +} + +int dAcOmoleCover_c::doDelete() { + return SUCCEEDED; +} + +int dAcOmoleCover_c::actorExecute() { + return SUCCEEDED; +} + +int dAcOmoleCover_c::draw() { + drawModelType1(&mMdl); + return SUCCEEDED; +} diff --git a/src/REL/d/a/obj/d_a_obj_puzzle_island.cpp b/src/REL/d/a/obj/d_a_obj_puzzle_island.cpp index c823a141..46984073 100644 --- a/src/REL/d/a/obj/d_a_obj_puzzle_island.cpp +++ b/src/REL/d/a/obj/d_a_obj_puzzle_island.cpp @@ -1,3 +1,63 @@ #include "d/a/obj/d_a_obj_puzzle_island.h" +#include "common.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_s.h" +#include "d/d_stage.h" +#include "d/flag/storyflag_manager.h" +#include "f/f_base.h" +#include "nw4r/g3d/res/g3d_resfile.h" +#include "nw4r/g3d/res/g3d_resmdl.h" + SPECIAL_ACTOR_PROFILE(OBJ_PUZZLE_ISLAND, dAcOpuzzleIsland_c, fProfile::OBJ_PUZZLE_ISLAND, 0x1D6, 0, 3); + +void dAcOpuzzleIsland_c::rideCallback(dBgW *unknown, dAcObjBase_c *actor, dAcObjBase_c *interactor) { + if (interactor->isActorPlayer() && actor != nullptr && StoryflagManager::sInstance->getCounterOrFlag(0x11d) == 0) { + StoryflagManager::sInstance->setFlag(0x11d); + } + return; +} + +bool dAcOpuzzleIsland_c::createHeap() { + void *data = getOarcResFile("IslPuz"); + mResFile = nw4r::g3d::ResFile(data); + dStage_c::bindStageResToFile(&mResFile); + dStage_c::bindSkyCmnToResFile(&mResFile); + nw4r::g3d::ResMdl mdl = mResFile.GetResMdl("IslPuz"); + TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x120, 1, nullptr)); + void *dzb = dAcObjBase_c::getOarcFile("IslPuz", "dzb/IslPuz.dzb"); + void *plc = dAcObjBase_c::getOarcFile("IslPuz", "dat/IslPuz.plc"); + updateMatrix(); + mMdl.setScale(mScale); + mMdl.setLocalMtx(mWorldMtx); + TRY_CREATE(!mBgW.Set((cBgD_t *)dzb, (PLC *)plc, cBgW::MOVE_BG_e, &mWorldMtx, &mScale)); + mBgW.Lock(); + return true; +} + +int dAcOpuzzleIsland_c::create() { + CREATE_ALLOCATOR(dAcOpuzzleIsland_c); + mBgW.SetCrrFunc(dBgS_MoveBGProc_Typical); + dBgS::GetInstance()->Regist(&mBgW, this); + mMdl.setPriorityDraw(0x1C, 9); + mVec3_c min, max; + mMdl.getBounds(&min, &max); + boundingBox.Set(min, max); + mCullingDistance = 500000.0f; + mBgW.SetRideCallback(rideCallback); + return SUCCEEDED; +} + +int dAcOpuzzleIsland_c::doDelete() { + return SUCCEEDED; +} + +int dAcOpuzzleIsland_c::actorExecute() { + mBgW.Move(); + return SUCCEEDED; +} + +int dAcOpuzzleIsland_c::draw() { + drawModelType1(&mMdl); + return SUCCEEDED; +} diff --git a/src/REL/d/a/obj/d_a_obj_rail_post.cpp b/src/REL/d/a/obj/d_a_obj_rail_post.cpp index 6498a094..b3b4aea1 100644 --- a/src/REL/d/a/obj/d_a_obj_rail_post.cpp +++ b/src/REL/d/a/obj/d_a_obj_rail_post.cpp @@ -1,6 +1,67 @@ #include "d/a/obj/d_a_obj_rail_post.h" +#include "d/a/obj/d_a_obj_base.h" +#include "d/col/bg/d_bg_s.h" +#include "nw4r/g3d/res/g3d_resmdl.h" + SPECIAL_ACTOR_PROFILE(OBJ_RAIL_POST, dAcORailPost, fProfile::OBJ_RAIL_POST, 0x280, 0, 3); dAcORailPost::dAcORailPost() {} dAcORailPost::~dAcORailPost() {} + +bool dAcORailPost::createHeap() { + void *resFilePtr = getOarcResFile("RailPost"); + if (resFilePtr == nullptr) { + return false; + } + + nw4r::g3d::ResFile res(resFilePtr); + if (res.IsValid() == false) { + return false; + } + + nw4r::g3d::ResMdl mdl = res.GetResMdl("RailPost"); + if (mdl.IsValid() == false) { + return false; + } + + if (!mMdl.create(mdl, &heap_allocator, 0x20, 1, nullptr)) { + return false; + } + + mMdl.setLocalMtx(mWorldMtx); + void *dzb = getOarcDZB("RailPost", "RailPost"); + void *plc = getOarcPLC("RailPost", "RailPost"); + TRY_CREATE(!mBgW.Set((cBgD_t *)dzb, (PLC *)plc, 0x81, &mWorldMtx, &mScale)); + + dBgS::GetInstance()->Regist(&mBgW, this); + + return true; +} + +int dAcORailPost::create() { + mVec3_c boundsMin; + mVec3_c boundsMax; + updateMatrix(); + CREATE_ALLOCATOR(dAcORailPost); + + mMdl.getBounds(&boundsMin, &boundsMax); + boundingBox.Set(boundsMin, boundsMax); + mCullingDistance = 25000.0f; + + return SUCCEEDED; +} + +int dAcORailPost::doDelete() { + dBgS::GetInstance()->Release(&mBgW); + return SUCCEEDED; +} + +int dAcORailPost::actorExecute() { + return SUCCEEDED; +} + +int dAcORailPost::draw() { + mMdl.entry(); + return SUCCEEDED; +} diff --git a/src/REL/d/a/obj/d_a_obj_rope_base.cpp b/src/REL/d/a/obj/d_a_obj_rope_base.cpp index 9431e1cf..cbd1f0f5 100644 --- a/src/REL/d/a/obj/d_a_obj_rope_base.cpp +++ b/src/REL/d/a/obj/d_a_obj_rope_base.cpp @@ -1,3 +1,49 @@ #include "d/a/obj/d_a_obj_rope_base.h" +#include "d/a/obj/d_a_obj_base.h" +#include "f/f_base.h" +#include "m/m_vec.h" +#include "nw4r/g3d/res/g3d_resfile.h" +#include "nw4r/g3d/res/g3d_resmdl.h" +#include "nw4r/g3d/res/g3d_resnode.h" + SPECIAL_ACTOR_PROFILE(OBJ_ROPE_BASE, dAcOropeBase_c, fProfile::OBJ_ROPE_BASE, 0x216, 0, 3); + +bool dAcOropeBase_c::createHeap() { + void *data = getOarcResFile("PracticeWood"); + mResFile = nw4r::g3d::ResFile(data); + nw4r::g3d::ResMdl mdl = mResFile.GetResMdl("RopeBase"); + TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x120, 1, nullptr)); + updateMatrix(); + mMdl.setLocalMtx(mWorldMtx); + mMdl.calc(true); + nw4r::g3d::ResNode resNode = mdl.GetResNode("rope_loc"); + mMdl.getNodeWorldMtxMultVecZero(resNode.GetID(), mRopePos); + return true; +} + +int dAcOropeBase_c::create() { + CREATE_ALLOCATOR(dAcOropeBase_c); + updateMatrix(); + mMdl.setLocalMtx(mWorldMtx); + boundingBox.Set(mVec3_c(-525.0f, -0.0f, -500.0f), mVec3_c(-325.0f, 700.0f, -300.0f)); + return SUCCEEDED; +} + +int dAcOropeBase_c::doDelete() { + return SUCCEEDED; +} + +int dAcOropeBase_c::actorExecute() { + if (checkObjectProperty(2)) { + field_0x35C = true; + } else { + field_0x35C = false; + } + return SUCCEEDED; +} + +int dAcOropeBase_c::draw() { + drawModelType1(&mMdl); + return SUCCEEDED; +} diff --git a/src/REL/d/a/obj/d_a_obj_stream_lava.cpp b/src/REL/d/a/obj/d_a_obj_stream_lava.cpp index 0de85e82..8578a76f 100644 --- a/src/REL/d/a/obj/d_a_obj_stream_lava.cpp +++ b/src/REL/d/a/obj/d_a_obj_stream_lava.cpp @@ -1,13 +1,176 @@ #include "d/a/obj/d_a_obj_stream_lava.h" -SPECIAL_ACTOR_PROFILE(OBJ_STREAM_LAVA, dAcOstreamLava_c, fProfile::OBJ_STREAM_LAVA, 0x1FA, 0, 6); +#include "common.h" +#include "d/col/bg/d_bg_s.h" +#include "d/d_room.h" +#include "d/d_stage.h" +#include "d/flag/sceneflag_manager.h" +#include "m/m3d/m_fanm.h" +#include "nw4r/g3d/res/g3d_resfile.h" STATE_DEFINE(dAcOstreamLava_c, Wait); STATE_DEFINE(dAcOstreamLava_c, Stream); -void dAcOstreamLava_c::initializeState_Wait() {} -void dAcOstreamLava_c::executeState_Wait() {} -void dAcOstreamLava_c::finalizeState_Wait() {} -void dAcOstreamLava_c::initializeState_Stream() {} -void dAcOstreamLava_c::executeState_Stream() {} +const f32 dAcOstreamLava_c::unkFloat0 = 0.0f; + +static const char *const AcOstreamLava__OarcNames[] = { + "FlowLavaD2", "FlowLavaD2", "FlowLavaLast_2", "FlowLavaLast_2", "FlowLavaLast_2", +}; +static const char *const AcOstreamLava__ModelNames[] = { + "FlowLavaD2_A", "FlowLavaD2_B", "FlowLavaLast_2A", "FlowLavaLast_2B", "FlowLavaLast_2C", +}; +static const char *const AcOstreamLava__DbzNames[] = { + "dzb/FlowLavaD2_A.dzb", "dzb/FlowLavaD2_B.dzb", "dzb/FlowLavaLast_2A.dzb", + "dzb/FlowLavaLast_2B.dzb", "dzb/FlowLavaLast_2C.dzb", +}; +static const char *const AcOstreamLava__PlcNames[] = { + "dat/FlowLavaD2_A.plc", "dat/FlowLavaD2_B.plc", "dat/FlowLavaLast_2A.plc", + "dat/FlowLavaLast_2B.plc", "dat/FlowLavaLast_2C.plc", +}; +static const char *const AcOstreamLava__AnmClrNames[] = { + "FlowLavaD2", "FlowLavaD2", "FlowLavaLast_2", "FlowLavaLast_2", "FlowLavaLast_2", +}; + +SPECIAL_ACTOR_PROFILE(OBJ_STREAM_LAVA, dAcOstreamLava_c, fProfile::OBJ_STREAM_LAVA, 0x1FA, 0, 6); + +bool dAcOstreamLava_c::createHeap() { + mSubtype = params & 0xF; + mResFile = nw4r::g3d::ResFile(getOarcResFile(AcOstreamLava__OarcNames[mSubtype])); + dStage_c::bindStageResToFile(&mResFile); + + nw4r::g3d::ResMdl mdl; + nw4r::g3d::ResAnmTexSrt anmSrtWait; + nw4r::g3d::ResAnmClr anmClr; + + mdl = mResFile.GetResMdl(AcOstreamLava__ModelNames[mSubtype]); + TRY_CREATE(mModel.create(mdl, &heap_allocator, 0x32C)); + + anmSrtWait = mResFile.GetResAnmTexSrt("Wait"); + TRY_CREATE(mAnmTexSrtWait.create(mdl, anmSrtWait, &heap_allocator, nullptr, 1)); + mModel.setAnm(mAnmTexSrtWait); + + anmClr = mResFile.GetResAnmClr(AcOstreamLava__AnmClrNames[mSubtype]); + TRY_CREATE(mAnmMatClr.create(mdl, anmClr, &heap_allocator, nullptr, 1)); + + void *dzb = getOarcFile(AcOstreamLava__OarcNames[mSubtype], AcOstreamLava__DbzNames[mSubtype]); + void *plc = getOarcFile(AcOstreamLava__OarcNames[mSubtype], AcOstreamLava__PlcNames[mSubtype]); + updateMatrix(); + mModel.setLocalMtx(mWorldMtx); + + TRY_CREATE(!mCollision.Set((cBgD_t *)dzb, (PLC *)plc, cBgW::MOVE_BG_e, &mWorldMtx, &mScale)); + mCollision.Lock(); + + TRY_CREATE(mCollision.InitMapStuff(&heap_allocator)); + return true; +} + +int dAcOstreamLava_c::create() { + CREATE_ALLOCATOR(dAcOstreamLava_c); + dBgS::GetInstance()->Regist(&mCollision, this); + dBgS::GetInstance()->RegistBg(&mCollision, this); + + mShouldStreamSceneflag = getFromParams(4, 0xFF); // (params >> 4) & 0xFF; + mEventId = getFromParams(0xC, 0xFF); // params >> 0xC; + mHideActor = !getFromParams(0x14, 1); // (params >> 0x14 & 1) == 0; + mModel.setAnm(mAnmMatClr); + + bool shouldStream = SceneflagManager::sInstance->checkFlag(roomid, mShouldStreamSceneflag); + if (shouldStream) { + mStateMgr.changeState(StateID_Stream); + } else { + mStateMgr.changeState(StateID_Wait); + } + + mModel.setPriorityDraw(0x1C, 0x9); + mVec3_c min, max; + mModel.getBounds(&min, &max); + boundingBox.Set(min, max); + mCullingDistance = 50000.0f; + + int roomId_tmp = roomid; + if (addActorToRoom(-1)) { + roomid = roomId_tmp; + changeLoadedEntitiesWithSet(); + } + + return SUCCEEDED; +} + +int dAcOstreamLava_c::doDelete() { + dBgS::GetInstance()->UnRegist(&mCollision); + changeLoadedEntitiesNoSet(); + return SUCCEEDED; +} + +int dAcOstreamLava_c::actorExecute() { + mStateMgr.executeState(); + mAnmMatClr.play(); + + dRoom_c *currentRoom = dStage_c::GetInstance()->getRoom(roomid); + + if (currentRoom->checkFlag(2)) { + setObjectProperty(0x200); + return SUCCEEDED; + } else { + clearObjectProperty(0x200); + return SUCCEEDED; + } +} + +int dAcOstreamLava_c::draw() { + if (!mHideActor) { + drawModelType1(&mModel); + } + return SUCCEEDED; +} + +void dAcOstreamLava_c::initializeState_Wait() { + mAnmTexSrtWait.setAnm(mModel, mResFile.GetResAnmTexSrt("Wait"), 0, m3d::PLAY_MODE_4); +} + +void dAcOstreamLava_c::executeState_Wait() { + mAnmTexSrtWait.play(); + + bool shouldStream = SceneflagManager::sInstance->checkFlag(roomid, mShouldStreamSceneflag); + if (shouldStream) { + mStateMgr.changeState(StateID_Stream); + } +} + +// BADLY MATCHING +// Using the potential improvement causes issues with the andc instruction +// Should be: andc r6, r0, r9 +// Currently: andc r6, r9, r0 +// https://decomp.me/scratch/3PKdt +void dAcOstreamLava_c::finalizeState_Wait() { + if (mEventId != 0xFF) { + // Hacky solution: + static volatile u32 FLAGS_1 = 0x00000001; + static u32 FLAGS_2 = 0x00100001; + u32 f1 = FLAGS_1; + u32 f2 = FLAGS_2; + u32 eventFlag = f2 & ~f1; + + // Potential improvement: + // Swaps the numbers in .data and swaps the operands in andc + // u32 eventFlag = Event::makeEventFlag(0x100001, 0x1); + + Event ev(mEventId, roomid, eventFlag, nullptr, nullptr); + mEvent.scheduleEvent(ev, 0); + } +} + +void dAcOstreamLava_c::initializeState_Stream() { + mAnmTexSrtWait.setAnm(mModel, mResFile.GetResAnmTexSrt("Flow"), 0, m3d::PLAY_MODE_4); +} + +void dAcOstreamLava_c::executeState_Stream() { + mAnmTexSrtWait.play(); + + bool shouldStream = SceneflagManager::sInstance->checkFlag(roomid, mShouldStreamSceneflag); + if (!shouldStream) { + mStateMgr.changeState(StateID_Wait); + } +} + void dAcOstreamLava_c::finalizeState_Stream() {} diff --git a/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp b/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp index 58868832..321998a7 100644 --- a/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp +++ b/src/REL/d/a/obj/d_a_obj_tarzan_pole.cpp @@ -1,3 +1,107 @@ #include "d/a/obj/d_a_obj_tarzan_pole.h" +#include "d/a/d_a_base.h" +#include "d/a/d_a_item.h" +#include "d/a/d_a_itembase.h" +#include "d/a/d_a_player.h" +#include "d/col/bg/d_bg_s.h" +#include "d/col/cc/d_cc_d.h" +#include "d/col/cc/d_cc_s.h" +#include "f/f_base.h" +#include "nw4r/g3d/res/g3d_resmdl.h" +#include "toBeSorted/attention.h" + SPECIAL_ACTOR_PROFILE(OBJ_TARZAN_POLE, dAcOTarzanPole_c, fProfile::OBJ_TARZAN_POLE, 0x235, 0, 3); + +// clang-format off +dCcD_SrcSph dAcOTarzanPole_c::sCcSrc = { + /* mObjInf */ { + /* mObjAt */ {0, 0, {0, 0, 0}, 0, 0, 0, 0, 0, 0}, + /* mObjTg */ {(AT_TYPE_WHIP | AT_TYPE_WIND), 0x800311, {0, 0, 0x407}, 0x0000, 0x0000}, + /* mObjCo */ {0x00000000}}, + /* mSphInf */ {10.0f} +}; +// clang-format on + +const f32 dAcOTarzanPole_c::sXOffset = 320.0f; +const f32 dAcOTarzanPole_c::sYOffset = 0.0f; + +bool dAcOTarzanPole_c::createHeap() { + // Get Res File + void *resFile = getOarcResFile("WhipBar"); + mBrres = nw4r::g3d::ResFile(resFile); + + // Create model + nw4r::g3d::ResMdl resMdl = mBrres.GetResMdl("WhipBar"); + TRY_CREATE(mMdl.create(resMdl, &heap_allocator, 0x120, 1, nullptr)); + + // Load Collider + void *dzb = getOarcDZB("WhipBar", "WhipBar"); + void *plc = getOarcPLC("WhipBar", "WhipBar"); + updateMatrix(); + if (mBgCollider.Set((cBgD_t *)dzb, (PLC *)plc, 1, &mWorldMtx, &mScale)) { + return false; + } + + return true; +} + +int dAcOTarzanPole_c::create() { + CREATE_ALLOCATOR(dAcOTarzanPole_c); + + dBgS::GetInstance()->Regist(&mBgCollider, this); + + mStts.SetRank(1); + mCollider.Set(sCcSrc); + mCollider.SetStts(mStts); + + forwardAccel = 0.0f; + forwardMaxSpeed = -40.0f; + + mFloat = (s32)(params & 0xFF) * 10.0f; + if ((s32)(params & 0xFF) == 0xFF) { + mFloat = 0.0f; + } + + mVec = mVec3_c::Ex * 400.0f; + mVec.rotY(rotation.y); + boundingBox.Set(mVec3_c(-0.0f, -120.0f, -110.0f), mVec3_c(500.0f, 140.0f, 110.0f)); + + return SUCCEEDED; +} + +int dAcOTarzanPole_c::doDelete() { + return SUCCEEDED; +} + +int dAcOTarzanPole_c::actorExecute() { + updateMatrix(); + mMdl.setLocalMtx(mWorldMtx); + mMdl.calc(false); + + const dAcPy_c *player = dAcPy_c::GetLink(); + bool bVar = false; + if (mCollider.ChkTgHit() && mCollider.ChkTgAtHitType(AT_TYPE_WHIP)) { + setObjectProperty(0x1000); + } + + mVec = mVec3_c::Ex * sXOffset + mVec3_c::Ey * sYOffset; + mVec.rotY(rotation.y); + poscopy2 = position + mVec; + poscopy3 = poscopy2 + mVec3_c::Ey * 20.0f; + + // 0x400000 corresponds to dAcPy_FLG0::FLG0_SWING_ROPE + if (player != nullptr && !player->checkActionFlags(0x400000) && dAcItem_c::checkFlag(ITEM_WHIP)) { + AttentionManager::GetInstance()->addUnk7Target(*this, 1, 1000.0f, 10.0f, -600.0, 200); + } + + mCollider.SetC(poscopy2); + + dCcS::GetInstance()->Set(&mCollider); + return SUCCEEDED; +} + +int dAcOTarzanPole_c::draw() { + drawModelType1(&mMdl); + return SUCCEEDED; +} diff --git a/src/REL/d/a/obj/d_a_obj_tower_gearD101.cpp b/src/REL/d/a/obj/d_a_obj_tower_gearD101.cpp index 0a2200b8..cee568bd 100644 --- a/src/REL/d/a/obj/d_a_obj_tower_gearD101.cpp +++ b/src/REL/d/a/obj/d_a_obj_tower_gearD101.cpp @@ -5,12 +5,12 @@ #include "d/a/obj/d_a_obj_tower_D101.h" #include "d/col/bg/d_bg_s_wtr_chk.h" #include "d/d_stage.h" +#include "d/snd/d_snd_wzsound.h" #include "f/f_base.h" #include "f/f_manager.h" #include "f/f_profile_name.h" #include "m/m_vec.h" #include "nw4r/g3d/res/g3d_resmdl.h" -#include "toBeSorted/small_sound_mgr.h" SPECIAL_ACTOR_PROFILE(OBJ_TOWER_GEAR_D101, dAcOTowerGearD101_c, fProfile::OBJ_TOWER_GEAR_D101, 0x17E, 0, 7); diff --git a/src/REL/d/a/obj/d_a_obj_tubo.cpp b/src/REL/d/a/obj/d_a_obj_tubo.cpp index bfcb4ba7..b931adc9 100644 --- a/src/REL/d/a/obj/d_a_obj_tubo.cpp +++ b/src/REL/d/a/obj/d_a_obj_tubo.cpp @@ -17,9 +17,11 @@ #include "d/col/c/c_cc_d.h" #include "d/col/c/c_m3d_g_pla.h" #include "d/col/cc/d_cc_s.h" +#include "d/d_light_env.h" #include "d/d_linkage.h" #include "d/flag/dungeonflag_manager.h" #include "d/flag/sceneflag_manager.h" +#include "d/snd/d_snd_wzsound.h" #include "egg/math/eggMath.h" #include "f/f_manager.h" #include "f/f_profile_name.h" @@ -31,12 +33,11 @@ #include "rvl/MTX/mtxvec.h" #include "s/s_Math.h" #include "toBeSorted/attention.h" -#include "toBeSorted/blur_and_palette_manager.h" #include "toBeSorted/d_emitter.h" #include "toBeSorted/event_manager.h" -#include "toBeSorted/small_sound_mgr.h" #include "toBeSorted/special_item_drop_mgr.h" + void float_ordering() { f32 f[] = {15.f, .4f, .4f, 5.f}; } @@ -451,7 +452,7 @@ void dAcOtubo_c::destroy() { if (!boolParam) { return; } - fn_80022BE0(BlurAndPaletteManager::GetPInstance(), position); + fn_80022BE0(dLightEnv_c::GetPInstance(), position); GetLinkage().fn_80050EA0(this); dEmitterBase_c *fx_thing = dJEffManager_c::spawnEffect( diff --git a/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp b/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp index 52890a43..12e6215a 100644 --- a/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp +++ b/src/REL/d/a/obj/d_a_obj_tumble_weed.cpp @@ -10,6 +10,8 @@ #include "d/col/c/c_m3d_g_pla.h" #include "d/col/cc/d_cc_d.h" #include "d/col/cc/d_cc_s.h" +#include "d/d_light_env.h" +#include "d/snd/d_snd_wzsound.h" #include "egg/math/eggMath.h" #include "egg/math/eggQuat.h" #include "m/m_angle.h" @@ -17,11 +19,8 @@ #include "m/m_quat.h" #include "m/m_vec.h" #include "s/s_Math.h" -#include "toBeSorted/blur_and_palette_manager.h" #include "toBeSorted/d_emitter.h" #include "toBeSorted/dowsing_target.h" -#include "toBeSorted/small_sound_mgr.h" - void float_ordering() { const f32 arr[] = {5.f, 15.f, 7.f, 0.5f, 0.1f}; @@ -106,7 +105,7 @@ int dAcOTumbleWeed_c::actorExecute() { calcWind(); sLib::chase(&mField_0x980, 1.f, 0.1f); - BlurAndPaletteManager::GetInstance().fn_800247D0(mField_0x968, mField_0x980); + dLightEnv_c::GetInstance().setWind(mField_0x968, mField_0x980); calcVelocity(); position += velocity; diff --git a/src/REL/d/t/d_t_reaction.cpp b/src/REL/d/t/d_t_reaction.cpp index 9c8f32d1..99c50aef 100644 --- a/src/REL/d/t/d_t_reaction.cpp +++ b/src/REL/d/t/d_t_reaction.cpp @@ -9,8 +9,8 @@ #include "d/d_pouch.h" #include "d/d_sc_game.h" #include "d/flag/sceneflag_manager.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "m/m_angle.h" -#include "toBeSorted/small_sound_mgr.h" SPECIAL_ACTOR_PROFILE(TAG_REACTION, dTgReaction_c, fProfile::TAG_REACTION, 0x0151, 0, 0); @@ -172,7 +172,7 @@ void dTgReaction_c::checkForBonkItem() { if (dAcObjBase_c::create(fProfile::ITEM, roomid, newItemParms, &c2, nullptr, nullptr, 0xFFFFFFFF)) { field_0x4DD = 1; onDelete(); - SmallSoundManager::GetInstance()->playSound(SE_S_READ_RIDDLE_A); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_READ_RIDDLE_A); } } } else { @@ -194,7 +194,7 @@ void dTgReaction_c::checkForBonkItem() { pos.y += field_0x4E4; if (fn_578_DB0(pos, uVar3)) { - SmallSoundManager::GetInstance()->playSound(SE_S_READ_RIDDLE_B); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_READ_RIDDLE_B); } SceneflagManager::sInstance->setFlag(roomid, getSceneFlag()); onDelete(); @@ -228,7 +228,7 @@ void dTgReaction_c::checkForSlingBellowsItem() { mVec3_c spawnPos = position; spawnPos.y += field_0x4E4; if (fn_578_DB0(spawnPos, uVar3)) { - SmallSoundManager::GetInstance()->playSound(SE_S_READ_RIDDLE_B); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_READ_RIDDLE_B); } SceneflagManager::sInstance->setFlag(roomid, getSceneFlag()); onDelete(); diff --git a/src/REL/d/t/d_t_shutter_fence_forbiddance.cpp b/src/REL/d/t/d_t_shutter_fence_forbiddance.cpp index c85cbf98..82f5c395 100644 --- a/src/REL/d/t/d_t_shutter_fence_forbiddance.cpp +++ b/src/REL/d/t/d_t_shutter_fence_forbiddance.cpp @@ -1,8 +1,33 @@ #include "d/t/d_t_shutter_fence_forbiddance.h" +#include "common.h" +#include "f/f_base.h" + SPECIAL_ACTOR_PROFILE( TAG_SHUTTER_FENCE_FORBIDDANCE, dTgShutterFenceForbiddance_c, fProfile::TAG_SHUTTER_FENCE_FORBIDDANCE, 0x2A4, 0, 4 ); -dTgShutterFenceForbiddance_c::dTgShutterFenceForbiddance_c() {} -dTgShutterFenceForbiddance_c::~dTgShutterFenceForbiddance_c() {} +static dTgShutterFenceForbiddance_c *FIRST_PTR; + +dTgShutterFenceForbiddance_c::dTgShutterFenceForbiddance_c() { + if (!FIRST_PTR) { + FIRST_PTR = this; + } +} +dTgShutterFenceForbiddance_c::~dTgShutterFenceForbiddance_c() { + if (this == FIRST_PTR) { + FIRST_PTR = nullptr; + } +} + +int dTgShutterFenceForbiddance_c::create() { + if (this != FIRST_PTR) { + return FAILED; + } + return SUCCEEDED; +} + +// TODO after finding out more about d_a_obj_door_base +int dTgShutterFenceForbiddance_c::actorExecute() { + return SUCCEEDED; +} diff --git a/src/REL/d/t/d_t_sound_area.cpp b/src/REL/d/t/d_t_sound_area.cpp index ca60e02f..655caa73 100644 --- a/src/REL/d/t/d_t_sound_area.cpp +++ b/src/REL/d/t/d_t_sound_area.cpp @@ -3,6 +3,7 @@ #include "d/a/d_a_player.h" #include "d/a/obj/d_a_obj_base.h" #include "d/col/c/c_m3d_g_cps.h" +#include "d/snd/d_snd_3d_manager.h" #include "d/t/d_t_sound_area_mgr.h" #include "rvl/MTX.h" // IWYU pragma: export @@ -45,20 +46,13 @@ int dTgSndAr_c::doDelete() { return SUCCEEDED; } -struct Unk { - u8 unk[0x144]; - mVec3_c v; -}; - -extern Unk *lbl_80575D58; - int dTgSndAr_c::actorExecute() { dAcBase_c *link = dAcPy_c::LINK; if (link != nullptr && checkPosInArea(link->position)) { link->setBit_field_0xE8(params & 0xFF); } - if (lbl_80575D58 != nullptr) { - mVec3_c pos = lbl_80575D58->v; + if (dSnd3DManager_c::GetInstance() != nullptr) { + mVec3_c pos = dSnd3DManager_c::GetInstance()->getCameraTargetPos(); if (checkPosInArea(pos) && dTgSndMg_c::GetInstance() != nullptr) { dTgSndMg_c::GetInstance()->setBgmFlag(params & 0xFF); } diff --git a/src/d/a/d_a_base.cpp b/src/d/a/d_a_base.cpp index ff47e669..5ad96e3c 100644 --- a/src/d/a/d_a_base.cpp +++ b/src/d/a/d_a_base.cpp @@ -17,6 +17,7 @@ #include "f/f_list_nd.h" #include "m/m_angle.h" #include "m/m_vec.h" +#include "toBeSorted/actor_info.h" #include "toBeSorted/event.h" #include "toBeSorted/event_manager.h" #include "toBeSorted/file_manager.h" @@ -33,13 +34,10 @@ mVec3_c *dAcBase_c::s_Create_Position; mAng3_c *dAcBase_c::s_Create_Rotation; mVec3_c *dAcBase_c::s_Create_Scale; dAcBase_c *dAcBase_c::s_Create_Parent; -ObjInfo *dAcBase_c::s_Create_ObjInfo; +const ActorInfo *dAcBase_c::s_Create_ActorInfo; u8 dAcBase_c::s_Create_Subtype; -extern "C" ObjInfo *getObjByActorIdAndSubtype_unkNamespace(ProfileName, u8); -extern "C" ObjInfo *getObjByActorName_unkNamespace(char *name); -extern "C" char *getObjectName_8006a730(ObjInfo *); -extern "C" SoundSource *soundForActorInitRelated_803889c0(s8, fBase_c *, char *, u8); +extern "C" dSoundSourceIf_c *soundForActorInitRelated_803889c0(s8, fBase_c *, const char *, u8); bool dAcBase_c::createHeap() { return true; @@ -50,7 +48,7 @@ bool dAcBase_c::createHeap() { // 8002c3b0 dAcBase_c::dAcBase_c() : heap_allocator(), - obj_info(s_Create_ObjInfo), + mpActorInfo(s_Create_ActorInfo), sound_list(), obj_pos(&position), params2(s_Create_Params2), @@ -82,8 +80,8 @@ dAcBase_c::dAcBase_c() fProfile::fActorProfile_c *profile = (fProfile::fActorProfile_c *)((*fProfile::sProfileList)[profile_name]); actor_properties = profile->mActorProperties; - if (obj_info == nullptr) { - obj_info = getObjByActorIdAndSubtype_unkNamespace(profile_name, actor_subtype); + if (mpActorInfo == nullptr) { + mpActorInfo = getActorInfoByProfileAndSubtype(profile_name, actor_subtype); } someStr[0] = '\0'; } @@ -98,7 +96,7 @@ dAcBase_c::~dAcBase_c() {} void dAcBase_c::setTempCreateParams( mVec3_c *pos, mAng3_c *rot, mVec3_c *scale, s32 roomId, u32 params2, dAcBase_c *parent, u8 subtype, u16 unkFlag, - s8 viewClipIdx, ObjInfo *objInfo + s8 viewClipIdx, const ActorInfo *actorInfo ) { s_Create_Position = pos; s_Create_Rotation = rot; @@ -109,22 +107,21 @@ void dAcBase_c::setTempCreateParams( s_Create_Subtype = subtype; s_Create_UnkFlags = unkFlag; s_Create_ViewClipIdx = viewClipIdx; - s_Create_ObjInfo = objInfo; + s_Create_ActorInfo = actorInfo; } -// has regswap -SoundSource *dAcBase_c::FUN_8002c690() { - if (obj_info == nullptr) { +dSoundSourceIf_c *dAcBase_c::createSoundSource() { + if (mpActorInfo == nullptr) { return nullptr; } - s32 unk_val = obj_info->unk_0xA; - if (unk_val == -1) { + s32 soundSourceType = mpActorInfo->soundSourceType; + if (soundSourceType == -1) { return nullptr; } - char *objName = getObjectName_8006a730(obj_info); - return soundForActorInitRelated_803889c0(unk_val, this, objName, subtype); + const char *actorName = getActorName(mpActorInfo); + return soundForActorInitRelated_803889c0(soundSourceType, this, actorName, subtype); } int dAcBase_c::initAllocatorWork1Heap(int size, char *name, int align) { @@ -135,7 +132,7 @@ int dAcBase_c::initAllocator(int size, char *name, EGG::Heap *heap, int align) { if (!heap_allocator.createNewTempFrmHeap(size, heap, name, 0x20, 0)) { return 0; } - sound_source = FUN_8002c690(); + sound_source = createSoundSource(); int success = createHeap(); heap_allocator.adjustFrmHeapRestoreCurrent(); return success; @@ -344,16 +341,16 @@ u32 dAcBase_c::getParams2Lower() const { // 8002d020 dAcBase_c *dAcBase_c::findActor(char *objName, dAcBase_c *parent) { - ObjInfo *objInfo = getObjByActorName_unkNamespace(objName); - if (objInfo == nullptr) { + const ActorInfo *actorInfo = getActorInfoByName(objName); + if (actorInfo == nullptr) { return nullptr; } else { do { - parent = (dAcBase_c *)fManager_c::searchBaseByProfName(objInfo->obj_id, parent); + parent = (dAcBase_c *)fManager_c::searchBaseByProfName(actorInfo->profileId, parent); if (parent == nullptr) { break; } - } while (parent->actor_subtype != objInfo->subtype); + } while (parent->actor_subtype != actorInfo->subtype); } return parent; } @@ -515,7 +512,7 @@ void dAcBase_c::FUN_8002d830() {} void dAcBase_c::FUN_8002d860(UNKWORD) {} // 8002d880 -SoundSource *dAcBase_c::getSoundSource() { +dSoundSourceIf_c *dAcBase_c::getSoundSource() { return sound_source.get(); } // End of SoundSource stuff diff --git a/src/d/a/d_a_insect.cpp b/src/d/a/d_a_insect.cpp index db7c66fb..b93cac0d 100644 --- a/src/d/a/d_a_insect.cpp +++ b/src/d/a/d_a_insect.cpp @@ -10,12 +10,12 @@ #include "d/col/bg/d_bg_w_base.h" #include "d/col/c/c_cc_d.h" #include "d/col/c/c_m3d_g_pla.h" +#include "d/snd/d_snd_wzsound.h" #include "m/m_angle.h" #include "m/m_mtx.h" #include "m/m_vec.h" #include "toBeSorted/attention.h" #include "toBeSorted/d_emitter.h" -#include "toBeSorted/small_sound_mgr.h" void dAcOInsect_c::kill() { dJEffManager_c::spawnEffect(PARTICLE_RESOURCE_ID_MAPPING_394_, position, nullptr, nullptr, nullptr, nullptr, 0, 0); diff --git a/src/d/a/obj/d_a_obj_switch.cpp b/src/d/a/obj/d_a_obj_switch.cpp index efb49d97..d64f90bb 100644 --- a/src/d/a/obj/d_a_obj_switch.cpp +++ b/src/d/a/obj/d_a_obj_switch.cpp @@ -6,10 +6,10 @@ #include "d/d_linkage.h" #include "d/d_rumble.h" #include "d/flag/sceneflag_manager.h" +#include "d/snd/d_snd_wzsound.h" #include "nw4r/g3d/res/g3d_resfile.h" #include "s/s_Math.h" #include "toBeSorted/d_emitter.h" -#include "toBeSorted/small_sound_mgr.h" SPECIAL_ACTOR_PROFILE(OBJ_SW, dAcOsw_c, fProfile::OBJ_SW, 0x12B, 0, 0x1002); diff --git a/src/d/a/obj/d_a_obj_tbox.cpp b/src/d/a/obj/d_a_obj_tbox.cpp index eea6e056..6c9e99dd 100644 --- a/src/d/a/obj/d_a_obj_tbox.cpp +++ b/src/d/a/obj/d_a_obj_tbox.cpp @@ -11,12 +11,14 @@ #include "d/col/c/c_bg_s_poly_info.h" #include "d/col/cc/d_cc_d.h" #include "d/col/cc/d_cc_s.h" +#include "d/d_light_env.h" #include "d/d_pouch.h" #include "d/d_room.h" #include "d/d_stage.h" #include "d/flag/sceneflag_manager.h" #include "d/flag/storyflag_manager.h" #include "d/flag/tboxflag_manager.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "d/t/d_t_siren.h" #include "m/m3d/m_fanm.h" #include "m/m3d/m_scnleaf.h" @@ -31,11 +33,10 @@ #include "s/s_Math.h" #include "toBeSorted/arc_managers/oarc_manager.h" #include "toBeSorted/attention.h" -#include "toBeSorted/blur_and_palette_manager.h" #include "toBeSorted/counters/goddess_chest_counter.h" #include "toBeSorted/dowsing_target.h" #include "toBeSorted/event_manager.h" -#include "toBeSorted/small_sound_mgr.h" + SPECIAL_ACTOR_PROFILE(TBOX, dAcTbox_c, fProfile::TBOX, 0x018D, 0, 6); @@ -1781,7 +1782,7 @@ void dAcTbox_c::executeState_DemoAppear() { if (isStop && mAnmMatClr1.isStop(0) && field_0x11F8 > 0x5A) { mEvent.advanceNext(); mStateMgr.changeState(StateID_WaitOpen); - SmallSoundManager::GetInstance()->playSound(SE_S_READ_RIDDLE_A); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_READ_RIDDLE_A); } } } @@ -1977,15 +1978,15 @@ void dAcTbox_c::executeState_Open() { if (mVariant == GODDESS) { if (0.4f < field_0x11EC) { sLib::chase(&field_0x11EC, 0.4f, getSomeRate()); - BlurAndPaletteManager::GetInstance().fn_80022AF0(field_0x11EC); - BlurAndPaletteManager::GetInstance().setField_0x2F20(field_0x11EC); + dLightEnv_c::GetInstance().setLightFilter(field_0x11EC); + dLightEnv_c::GetInstance().setField_0x2F20(field_0x11EC); } } else if (mVariant != SMALL) { // exact same code as in the other branch if (0.4f < field_0x11EC) { sLib::chase(&field_0x11EC, 0.4f, getSomeRate()); - BlurAndPaletteManager::GetInstance().fn_80022AF0(field_0x11EC); - BlurAndPaletteManager::GetInstance().setField_0x2F20(field_0x11EC); + dLightEnv_c::GetInstance().setLightFilter(field_0x11EC); + dLightEnv_c::GetInstance().setField_0x2F20(field_0x11EC); } } if (mMdl1.getAnm().isStop()) { @@ -2010,14 +2011,14 @@ void dAcTbox_c::executeState_PresentItem() { if (mVariant == GODDESS) { if (0.4f < field_0x11EC) { sLib::chase(&field_0x11EC, 0.4f, getSomeRate()); - BlurAndPaletteManager::GetInstance().fn_80022AF0(field_0x11EC); - BlurAndPaletteManager::GetInstance().setField_0x2F20(field_0x11EC); + dLightEnv_c::GetInstance().setLightFilter(field_0x11EC); + dLightEnv_c::GetInstance().setField_0x2F20(field_0x11EC); } } else if (mVariant != SMALL) { if (0.4f < field_0x11EC) { sLib::chase(&field_0x11EC, 0.4f, getSomeRate()); - BlurAndPaletteManager::GetInstance().fn_80022AF0(field_0x11EC); - BlurAndPaletteManager::GetInstance().setField_0x2F20(field_0x11EC); + dLightEnv_c::GetInstance().setLightFilter(field_0x11EC); + dLightEnv_c::GetInstance().setField_0x2F20(field_0x11EC); } } mEvent.advanceNext(); @@ -2059,8 +2060,8 @@ void dAcTbox_c::executeState_Close() { if (field_0x11FC <= 0) { if (field_0x11EC < 1.0f) { sLib::chase(&field_0x11EC, 1.0f, getSomeRate()); - BlurAndPaletteManager::GetInstance().fn_80022AF0(field_0x11EC); - BlurAndPaletteManager::GetInstance().setField_0x2F20(field_0x11EC); + dLightEnv_c::GetInstance().setLightFilter(field_0x11EC); + dLightEnv_c::GetInstance().setField_0x2F20(field_0x11EC); } } else { field_0x11FC--; @@ -2088,8 +2089,8 @@ void dAcTbox_c::executeState_Close() { if (field_0x11FC <= 0) { if (field_0x11EC < 1.0f) { sLib::chase(&field_0x11EC, 1.0f, getSomeRate()); - BlurAndPaletteManager::GetInstance().fn_80022AF0(field_0x11EC); - BlurAndPaletteManager::GetInstance().setField_0x2F20(field_0x11EC); + dLightEnv_c::GetInstance().setLightFilter(field_0x11EC); + dLightEnv_c::GetInstance().setField_0x2F20(field_0x11EC); } } else { field_0x11FC--; @@ -2140,8 +2141,8 @@ void dAcTbox_c::executeState_Wait() { if (field_0x11FC <= 0) { if (field_0x11EC < 1.0f) { sLib::chase(&field_0x11EC, 1.0f, getSomeRate()); - BlurAndPaletteManager::GetInstance().fn_80022AF0(field_0x11EC); - BlurAndPaletteManager::GetInstance().setField_0x2F20(field_0x11EC); + dLightEnv_c::GetInstance().setLightFilter(field_0x11EC); + dLightEnv_c::GetInstance().setField_0x2F20(field_0x11EC); } } else { field_0x11FC--; @@ -2165,9 +2166,9 @@ void dAcTbox_c::executeState_GoddessWait() { if (field_0x11FC <= 0) { if (field_0x11EC < 1.0f) { sLib::chase(&field_0x11EC, 1.0f, getSomeRate()); - BlurAndPaletteManager::GetInstance().fn_80022AF0(field_0x11EC); + dLightEnv_c::GetInstance().setLightFilter(field_0x11EC); // this is apparently not needed here - // BlurAndPaletteManager::GetInstance().setField_0x2F20(field_0x11EC); + // dLightEnv_c::GetInstance().setField_0x2F20(field_0x11EC); } } else { field_0x11FC--; @@ -2232,14 +2233,14 @@ void dAcTbox_c::unsetShouldCloseFlag() { void dAcTbox_c::fn_8026D370() { if (isNotSmall()) { field_0x11F0 = 1; - BlurAndPaletteManager::GetInstance().fn_800223A0(&mLightInfo); + dLightEnv_c::GetInstance().efplight_set(&mLightInfo); } } void dAcTbox_c::fn_8026D3C0() { if (mAnmChr.isStop() && mAnmTexSrt1.isStop(0) && mAnmMatClr2.isStop(0)) { field_0x11F0 = 0; - BlurAndPaletteManager::GetInstance().fn_80022440(&mLightInfo); + dLightEnv_c::GetInstance().efplight_cut(&mLightInfo); } else { mAnmChr.play(); mAnmTexSrt1.play(); diff --git a/src/d/d_cs_game.cpp b/src/d/d_cs_game.cpp index 5ab406a5..da22bbef 100644 --- a/src/d/d_cs_game.cpp +++ b/src/d/d_cs_game.cpp @@ -3,9 +3,9 @@ #include "d/d_cs_base.h" #include "d/d_cursor_hit_check.h" #include "d/lyt/d2d.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "f/f_base.h" #include "toBeSorted/arc_managers/layout_arc_manager.h" -#include "toBeSorted/small_sound_mgr.h" SPECIAL_BASE_PROFILE(C_GAME, dCsGame_c, fProfile::C_GAME, 0x2BF, 0x06F9); @@ -407,7 +407,7 @@ void dCsGame_c::lytItemCursor_c::lytBowCsr_c::executeState_Charge() { if (!mAnm[MAIN_ANIM_ARROW_PEAK].isEnabled()) { mAnm[MAIN_ANIM_ARROW_PEAK].setAnimEnable(true); mAnm[MAIN_ANIM_ARROW_PEAK].setFrame(0.0f); - SmallSoundManager::GetInstance()->playSound(SE_S_BW_ALIGN_SIGHT); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_BW_ALIGN_SIGHT); } mAnm[MAIN_ANIM_ARROW_KEEP].setAnimEnable(false); } else { diff --git a/src/d/d_light_env.cpp b/src/d/d_light_env.cpp new file mode 100644 index 00000000..ac52b039 --- /dev/null +++ b/src/d/d_light_env.cpp @@ -0,0 +1,975 @@ + +#include "d/d_light_env.h" + +#include "common.h" +#include "d/a/d_a_itembase.h" +#include "d/a/d_a_player.h" +#include "d/d_obj_light.h" +#include "d/d_sc_game.h" +#include "d/flag/itemflag_manager.h" +#include "m/m_color.h" +#include "m/m_vec.h" +#include "nw4r/math/math_arithmetic.h" + +#include + +dLightEnv_c dLightEnv_c::sInstance; +dLightEnv_c *dLightEnv_c::sPInstance; + +ActorLighting::ListType ActorLighting::sList; + +// Same as vectle_calc in d_kankyo_rain from tp +static void vectle_calc(const mVec3_c *pIn, mVec3_c *pOut) { + f32 s = nw4r::math::FSqrt(pIn->squaredLength()); + if (s != 0.0f) { + pOut->x = pIn->x / s; + pOut->y = pIn->y / s; + pOut->z = pIn->z / s; + } else { + pOut->x = 0.0f; + pOut->y = 0.0f; + pOut->z = 0.0f; + } +} + +// Same as get_vectle_calc in d_kankyo_rain from tp +void dLightEnv_c::get_vectle_calc(const mVec3_c *pInA, const mVec3_c *pInB, mVec3_c *pOut) { + mVec3_c pos; + pos.x = pInB->x - pInA->x; + pos.y = pInB->y - pInA->y; + pos.z = pInB->z - pInA->z; + vectle_calc(&pos, pOut); +} + +void dLightEnv_c::sphere_to_cartesian(f32 angY, f32 angXZ, mVec3_c *pOut) { + f32 radY = angY / (180.f / M_PI); + f32 radXZ = angXZ / (180.f / M_PI); + + mVec3_c pos; + pos.x = std::cosf(radY) * std::sinf(radXZ); + pos.y = std::sinf(radY); + pos.z = std::cosf(radY) * std::cosf(radXZ); + + pOut->x = pos.x; + pOut->y = pos.y; + pOut->z = pos.z; +} + +void dLightEnv_c::efplight_set(LIGHT_INFLUENCE *pLightInfo) { + if (pLightInfo == nullptr) { + return; + } + + pLightInfo->mIdx = 0; + for (int i = 0; i < 5; ++i) { + if (efplight[i] == pLightInfo) { + return; + } + } + for (int i = 0; i < 5; i++) { + if (efplight[i] == NULL) { + efplight[i] = pLightInfo; + efplight[i]->mIdx = i + 1; + break; + } + } +} +void dLightEnv_c::efplight_cut(LIGHT_INFLUENCE *pLightInfo) { + if (pLightInfo == nullptr) { + return; + } + + if (pLightInfo->mIdx != 0) { + int idx = pLightInfo->mIdx - 1; + if (idx >= 0 && idx < 5) { + efplight[idx] = nullptr; + } + } +} + +LIGHT_INFLUENCE *dLightEnv_c::eflight_influence(const mVec3_c *pPos) { + f32 max = 1000000.f; + LIGHT_INFLUENCE *pOut = nullptr; + + for (int i = 0; i < 5; i++) { + if (efplight[i] != nullptr) { + if (max > pPos->distance(efplight[i]->mPos) && efplight[i]->mScale > 0.01f) { + max = pPos->distance(efplight[i]->mPos); + pOut = efplight[i]; + } + } + } + + return pOut; +} + +void dLightEnv_c::SordFlush_set(const mVec3_c *pPos, s32 lightType) { + if (eflight.mState == 0) { + eflight.mState = 1; + eflight.mLightType = lightType; + eflight.field_0x8.mPos = *pPos; + } else if (eflight.mState == 2 || eflight.mState == 10 || eflight.mState == 11) { + eflight.mState = 4; + eflight.mLightType = lightType; + eflight.field_0x8.mPos = *pPos; + } +} + +void dLightEnv_c::plight_set(LIGHT_INFLUENCE *pLightInfo) { + if (pLightInfo == nullptr) { + return; + } + pLightInfo->mIdx = 0; + + for (int i = 0; i < 200; i++) { + // @bug shouldnt this be pointlight instead of efplight? + if (efplight[i] == pLightInfo) { + return; + } + } + + for (int i = 0; i < 200; i++) { + if (pointlight[i] == NULL) { + pointlight[i] = pLightInfo; + pointlight[i]->mIdx = i + 1; + break; + } + } +} +void dLightEnv_c::plight_cut(LIGHT_INFLUENCE *pLightInfo) { + if (pLightInfo == nullptr) { + return; + } + + if (pLightInfo->mIdx != 0) { + int idx = pLightInfo->mIdx - 1; + if (idx >= 0 && idx < 200) { + pointlight[idx] = nullptr; + } + } +} + +LIGHT_INFLUENCE *dLightEnv_c::light_influence(const mVec3_c *pPos, bool param2) { + f32 max = 1000000.f; + LIGHT_INFLUENCE *pOut = nullptr; + + if (dAcPy_c::GetLink() && dAcPy_c::GetLink()->checkActionFlagsCont(0x400000)) { + return nullptr; + } + + for (int i = 0; i < 200; i++) { + if (pointlight[i] != nullptr && pointlight[i]->field_0x18 == param2) { + if (max > pPos->distance(pointlight[i]->mPos)) { + max = pPos->distance(pointlight[i]->mPos); + pOut = pointlight[i]; + } + } + } + + return pOut; +} + +LIGHT_INFLUENCE *dLightEnv_c::light_influence2(const mVec3_c *pPos, bool param2) { + f32 max = 1000000.f; + f32 temp = 1000000.f; + LIGHT_INFLUENCE *pOut2 = nullptr; + LIGHT_INFLUENCE *pOut = nullptr; + + if (dAcPy_c::GetLink() && dAcPy_c::GetLink()->checkActionFlagsCont(0x400000)) { + return nullptr; + } + for (int i = 0; i < 200; i++) { + if (pointlight[i] != nullptr && pointlight[i]->field_0x18 == param2) { + f32 dist = pPos->distance(pointlight[i]->mPos); + if (dist < temp) { + if (dist < max) { + temp = max; + max = dist; + pOut = pOut2; + pOut2 = pointlight[i]; + } else { + temp = dist; + pOut = pointlight[i]; + } + } + } + } + + return pOut; +} + +void dLightEnv_c::shadow_set(SHADOW_INFLUENCE *pShadowInfo) { + if (pShadowInfo == nullptr) { + return; + } + + pShadowInfo->mIdx = 0; + for (int i = 0; i < 200; ++i) { + if (pshadow[i] == pShadowInfo) { + return; + } + } + for (int i = 0; i < 200; i++) { + if (pshadow[i] == NULL) { + pshadow[i] = pShadowInfo; + pshadow[i]->mIdx = i + 1; + break; + } + } +} + +void dLightEnv_c::shadow_cut(SHADOW_INFLUENCE *pShadowInfo) { + if (pShadowInfo == nullptr) { + return; + } + + if (pShadowInfo->mIdx != 0) { + int idx = pShadowInfo->mIdx - 1; + if (idx >= 0 && idx < 200) { + pshadow[idx] = nullptr; + } + } +} + +SHADOW_INFLUENCE *dLightEnv_c::shadow_influence(const mVec3_c *pPos) { + f32 max = 1000000.f; + SHADOW_INFLUENCE *pOut = nullptr; + + for (int i = 0; i < 200; i++) { + if (pshadow[i] != nullptr && pPos->y < pshadow[i]->mPos.y) { + if (max > pPos->distance(pshadow[i]->mPos)) { + if (pPos->distance(pshadow[i]->mPos) < pshadow[i]->mRadius) { + max = pPos->distance(pshadow[i]->mPos); + pOut = pshadow[i]; + } + } + } + } + + return pOut; +} + +void dLightEnv_c::setLightFilter(f32 ratio) { + field_0x2DF4.r = ratio * 255.f; + field_0x2DF4.g = ratio * 255.f; + field_0x2DF4.b = ratio * 255.f; +} +void dLightEnv_c::set0x35B0(f32 f) { + mWind.field_0x10 = f; +} + +void dLightEnv_c::setBPM8(const mVec3_c *pos, u32 type, f32 radius) { + for (int i = 0; i < 10; ++i) { + if (field_0x3654[i].field_0x10 <= -1) { + field_0x3654[i].mPos = *pos; + field_0x3654[i].mRadius = radius; + field_0x3654[i].field_0x10 = type; + return; + } + } +} + +void dLightEnv_c::setBPM8_Type4(const mVec3_c *pos) { + setBPM8(pos, 4, 250.f); +} + +void dLightEnv_c::setBPM8_Type6(const mVec3_c *pos) { + setBPM8(pos, 6, 500.f); +} + +void dLightEnv_c::setBPM8_Type10(const mVec3_c *pos) { + setBPM8(pos, 10, 1000.f); +} + +void dLightEnv_c::setBPM8_Type10_2(const mVec3_c *pos) { + setBPM8(pos, 10, 1001.f); +} + +void dLightEnv_c::setBPM8_Type6_2(const mVec3_c *pos) { + setBPM8(pos, 6, 501.f); +} + +bool dLightEnv_c::check_BPM8(const mVec3_c *pos, mVec3_c *pOutPos) { + bool ret = false; + for (int i = 0; i < 10; ++i) { + if (field_0x3654[i].field_0x10 > 0) { + if (pos->distance(field_0x3654[i].mPos) <= field_0x3654[i].mRadius) { + ret = true; + if (pOutPos) { + *pOutPos = field_0x3654[i].mPos; + } + break; + } + } + } + return ret; +} + +bool dLightEnv_c::check_BPM8_1001(const mVec3_c *pos, mVec3_c *pOutPos) { + bool ret = false; + for (int i = 0; i < 10; ++i) { + if (field_0x3654[i].field_0x10 > 0) { + if (pos->distance(field_0x3654[i].mPos) <= field_0x3654[i].mRadius && field_0x3654[i].mRadius == 1001.f) { + ret = true; + if (pOutPos) { + *pOutPos = field_0x3654[i].mPos; + } + break; + } + } + } + return ret; +} + +bool dLightEnv_c::check_BPM8_501(const mVec3_c *pos, mVec3_c *pOutPos) { + bool ret = false; + for (int i = 0; i < 10; ++i) { + if (field_0x3654[i].field_0x10 > 0) { + if (pos->distance(field_0x3654[i].mPos) <= field_0x3654[i].mRadius && field_0x3654[i].mRadius == 501.f) { + ret = true; + if (pOutPos) { + *pOutPos = field_0x3654[i].mPos; + } + break; + } + } + } + return ret; +} + +bool dLightEnv_c::setUnk(const mVec3_c *pos, f32 radius) { + bool ret = false; + if (field_0x38B0 == false) { + field_0x38B0 = true; + field_0x38B4 = *pos; + field_0x38C0 = radius; + ret = true; + } + + return ret; +} + +void dLightEnv_c::setBPM9(const mVec3_c *pos, f32 radius) { + for (int i = 0; i < 20; ++i) { + if (field_0x371C[i].field_0x00 == false) { + field_0x371C[i].field_0x00 = true; + field_0x371C[i].mPos = *pos; + field_0x371C[i].mRadius = radius; + return; + } + } +} + +bool dLightEnv_c::check_BPM9(const mVec3_c *pos) { + bool ret = false; + for (int i = 0; i < 20; ++i) { + if (field_0x371C[i].field_0x00) { + if (pos->distance(field_0x371C[i].mPos) <= field_0x371C[i].mRadius) { + ret = true; + break; + } + } + } + return ret; +} + +s32 dLightEnv_c::checkBPM9_Entity(mVec3_c *pos) { + s32 value = field_0x38C4; + if (value != 0 && pos != nullptr) { + *pos = field_0x38C8; + } + return value; +} + +void dLightEnv_c::setAlternateRoomId(s32 roomId) { + mAlternateRoomId = roomId; +} + +s32 dLightEnv_c::getAlterateRoomId() { + return mAlternateRoomId; +} + +mColor dLightEnv_c::color_ratio_set(const mColor &start, const mColor &end, f32 ratio) { + mColor result; + result.Set(0xff, 0xff, 0xff, 0xff); + result.r = (start.r + ratio * ((f32)end.r - (f32)start.r)); + result.g = (start.g + ratio * ((f32)end.g - (f32)start.g)); + result.b = (start.b + ratio * ((f32)end.b - (f32)start.b)); + result.a = (start.a + ratio * ((f32)end.a - (f32)start.a)); + return result; +} + +mVec3_c dLightEnv_c::vec_ratio_set(const mVec3_c &start, const mVec3_c &end, f32 ratio) { + mVec3_c result; + result.x = start.x + ratio * (end.x - start.x); + result.y = start.y + ratio * (end.y - start.y); + result.z = start.z + ratio * (end.z - start.z); + return result; +} + +f32 dLightEnv_c::f32_ratio_set(const f32 start, const f32 end, f32 ratio) { + return start + ratio * (end - start); +} + +u16 dLightEnv_c::u16_ratio_set(const u16 start, const u16 end, f32 ratio) { + return (f32)start + ratio * ((f32)end - (f32)start); +} + +u8 dLightEnv_c::u8_ratio_set(const u8 start, const u8 end, f32 ratio) { + return static_cast((f32)start + ratio * (f32)(end - (f32)start)) & 0xFF; +} + +void dLightEnv_c::spf_ratio_set(Spf &out, const Spf &start, const Spf &end, f32 ratio) { + mColor black0; + mColor black1; + out.mActorPalette.mAmbientClr = + color_ratio_set(start.mActorPalette.mAmbientClr, end.mActorPalette.mAmbientClr, ratio); + out.mActorPalette.mDiffuseClr = + color_ratio_set(start.mActorPalette.mDiffuseClr, end.mActorPalette.mDiffuseClr, ratio); + out.mActorPalette.mBrightnessClr = + color_ratio_set(start.mActorPalette.mBrightnessClr, end.mActorPalette.mBrightnessClr, ratio); + out.mActorPalette.mSpecularClr = + color_ratio_set(start.mActorPalette.mSpecularClr, end.mActorPalette.mSpecularClr, ratio); + out.mActorPalette.mDarkShadowClr = + color_ratio_set(start.mActorPalette.mDarkShadowClr, end.mActorPalette.mDarkShadowClr, ratio); + out.mActorPalette.mDarkLightClr = + color_ratio_set(start.mActorPalette.mDarkLightClr, end.mActorPalette.mDarkLightClr, ratio); + + out.mActorPalette.mSpecular = f32_ratio_set(start.mActorPalette.mSpecular, end.mActorPalette.mSpecular, ratio); + out.mActorPalette.field_0x01C = + color_ratio_set(start.mActorPalette.field_0x01C, end.mActorPalette.field_0x01C, ratio); + out.mActorPalette.mTemperature = + f32_ratio_set(start.mActorPalette.mTemperature, end.mActorPalette.mTemperature, ratio); + out.mActorPalette.field_0x24 = f32_ratio_set(start.mActorPalette.field_0x24, end.mActorPalette.field_0x24, ratio); + + black0 = start.mActorPalette.mShadowClr; + black1 = end.mActorPalette.mShadowClr; + if (black0.a == 0) { + black0.Set(0, 0, 0x1E, 0xC8); + } + if (black1.a == 0) { + black1.Set(0, 0, 0x1E, 0xC8); + } + + out.mActorPalette.mShadowClr = color_ratio_set(black0, black1, ratio); + out.mActorPalette.field_0x02C = + color_ratio_set(start.mActorPalette.field_0x02C, end.mActorPalette.field_0x02C, ratio); + + out.mStagePalette.mBrightness = + f32_ratio_set(start.mStagePalette.mBrightness, end.mStagePalette.mBrightness, ratio); + out.mStagePalette.mShadowClr = color_ratio_set(start.mStagePalette.mShadowClr, end.mStagePalette.mShadowClr, ratio); + out.mStagePalette.mLightClr = color_ratio_set(start.mStagePalette.mLightClr, end.mStagePalette.mLightClr, ratio); + out.mStagePalette.mSunMoonAngle1 = + f32_ratio_set(start.mStagePalette.mSunMoonAngle1, end.mStagePalette.mSunMoonAngle1, ratio); + out.mStagePalette.mSunMoonAngle2 = + f32_ratio_set(start.mStagePalette.mSunMoonAngle2, end.mStagePalette.mSunMoonAngle2, ratio); + + out.mStagePalette.field_0x014 = + color_ratio_set(start.mStagePalette.field_0x014, end.mStagePalette.field_0x014, ratio); + + for (int i = 0; i < 5; ++i) { + out.mStagePalette.field_0x018[i] = + u8_ratio_set(start.mStagePalette.field_0x018[i], end.mStagePalette.field_0x018[i], ratio); + out.mStagePalette.field_0x020[i] = + color_ratio_set(start.mStagePalette.field_0x020[i], end.mStagePalette.field_0x020[i], ratio); + out.mStagePalette.field_0x034[i] = + f32_ratio_set(start.mStagePalette.field_0x034[i], end.mStagePalette.field_0x034[i], ratio); + out.mStagePalette.field_0x048[i] = + f32_ratio_set(start.mStagePalette.field_0x048[i], end.mStagePalette.field_0x048[i], ratio); + } + + out.mStagePalette.field_0x05C = + f32_ratio_set(start.mStagePalette.field_0x05C, end.mStagePalette.field_0x05C, ratio); + out.mStagePalette.field_0x060 = + color_ratio_set(start.mStagePalette.field_0x060, end.mStagePalette.field_0x060, ratio); + + for (int i = 0; i < 5; ++i) { + out.mStagePalette.field_0x064[i] = + u8_ratio_set(start.mStagePalette.field_0x064[i], end.mStagePalette.field_0x064[i], ratio); + out.mStagePalette.field_0x06C[i] = + color_ratio_set(start.mStagePalette.field_0x06C[i], end.mStagePalette.field_0x06C[i], ratio); + out.mStagePalette.field_0x080[i] = + f32_ratio_set(start.mStagePalette.field_0x080[i], end.mStagePalette.field_0x080[i], ratio); + out.mStagePalette.field_0x094[i] = + f32_ratio_set(start.mStagePalette.field_0x094[i], end.mStagePalette.field_0x094[i], ratio); + } + + out.mStagePalette.field_0x0A8 = + f32_ratio_set(start.mStagePalette.field_0x0A8, end.mStagePalette.field_0x0A8, ratio); + out.mStagePalette.field_0x0AC = + color_ratio_set(start.mStagePalette.field_0x0AC, end.mStagePalette.field_0x0AC, ratio); + + for (int i = 0; i < 5; ++i) { + out.mStagePalette.field_0x0B0[i] = + u8_ratio_set(start.mStagePalette.field_0x0B0[i], end.mStagePalette.field_0x0B0[i], ratio); + out.mStagePalette.field_0x0B8[i] = + color_ratio_set(start.mStagePalette.field_0x0B8[i], end.mStagePalette.field_0x0B8[i], ratio); + out.mStagePalette.field_0x0CC[i] = + f32_ratio_set(start.mStagePalette.field_0x0CC[i], end.mStagePalette.field_0x0CC[i], ratio); + out.mStagePalette.field_0x0E0[i] = + f32_ratio_set(start.mStagePalette.field_0x0E0[i], end.mStagePalette.field_0x0E0[i], ratio); + } + + out.mStagePalette.field_0x0F4 = + f32_ratio_set(start.mStagePalette.field_0x0F4, end.mStagePalette.field_0x0F4, ratio); + out.mStagePalette.field_0x0F8 = + color_ratio_set(start.mStagePalette.field_0x0F8, end.mStagePalette.field_0x0F8, ratio); + + for (int i = 0; i < 5; ++i) { + out.mStagePalette.field_0x0FC[i] = + u8_ratio_set(start.mStagePalette.field_0x0FC[i], end.mStagePalette.field_0x0FC[i], ratio); + out.mStagePalette.field_0x104[i] = + color_ratio_set(start.mStagePalette.field_0x104[i], end.mStagePalette.field_0x104[i], ratio); + out.mStagePalette.field_0x118[i] = + f32_ratio_set(start.mStagePalette.field_0x118[i], end.mStagePalette.field_0x118[i], ratio); + out.mStagePalette.field_0x12C[i] = + f32_ratio_set(start.mStagePalette.field_0x12C[i], end.mStagePalette.field_0x12C[i], ratio); + } + + out.mSkyPalette.field_0x00 = color_ratio_set(start.mSkyPalette.field_0x00, end.mSkyPalette.field_0x00, ratio); + out.mSkyPalette.field_0x04 = color_ratio_set(start.mSkyPalette.field_0x04, end.mSkyPalette.field_0x04, ratio); + out.mSkyPalette.field_0x08 = color_ratio_set(start.mSkyPalette.field_0x08, end.mSkyPalette.field_0x08, ratio); + out.mSkyPalette.mCloudColor = color_ratio_set(start.mSkyPalette.mCloudColor, end.mSkyPalette.mCloudColor, ratio); + out.mSkyPalette.mSkyColor = color_ratio_set(start.mSkyPalette.mSkyColor, end.mSkyPalette.mSkyColor, ratio); + out.mSkyPalette.field_0x14 = color_ratio_set(start.mSkyPalette.field_0x14, end.mSkyPalette.field_0x14, ratio); + out.mSkyPalette.mSkyFilter = color_ratio_set(start.mSkyPalette.mSkyFilter, end.mSkyPalette.mSkyFilter, ratio); + out.mSkyPalette.mSkyCenter = vec_ratio_set(start.mSkyPalette.mSkyCenter, end.mSkyPalette.mSkyCenter, ratio); + out.mSkyPalette.mSkyScale = vec_ratio_set(start.mSkyPalette.mSkyScale, end.mSkyPalette.mSkyScale, ratio); + + out.field_0x1A4.field_0x00.field_0x00 = + color_ratio_set(start.field_0x1A4.field_0x00.field_0x00, end.field_0x1A4.field_0x00.field_0x00, ratio); + out.field_0x1A4.field_0x00.field_0x04 = + f32_ratio_set(start.field_0x1A4.field_0x00.field_0x04, end.field_0x1A4.field_0x00.field_0x04, ratio); + out.field_0x1A4.field_0x00.field_0x08 = + f32_ratio_set(start.field_0x1A4.field_0x00.field_0x08, end.field_0x1A4.field_0x00.field_0x08, ratio); + + out.field_0x1A4.field_0x0C[0] = + f32_ratio_set(start.field_0x1A4.field_0x0C[0], end.field_0x1A4.field_0x0C[0], ratio); + out.field_0x1A4.field_0x0C[1] = + f32_ratio_set(start.field_0x1A4.field_0x0C[1], end.field_0x1A4.field_0x0C[1], ratio); + out.field_0x1A4.field_0x0C[2] = + f32_ratio_set(start.field_0x1A4.field_0x0C[2], end.field_0x1A4.field_0x0C[2], ratio); + + out.field_0x1BC.field_0x00 = u8_ratio_set(start.field_0x1BC.field_0x00, end.field_0x1BC.field_0x00, ratio); + out.field_0x1BC.field_0x04 = f32_ratio_set(start.field_0x1BC.field_0x04, end.field_0x1BC.field_0x04, ratio); + out.field_0x1BC.field_0x08 = f32_ratio_set(start.field_0x1BC.field_0x08, end.field_0x1BC.field_0x08, ratio); + + out.field_0x1BC.field_0x0C = u8_ratio_set(start.field_0x1BC.field_0x0C, end.field_0x1BC.field_0x0C, ratio); + out.field_0x1BC.field_0x10 = f32_ratio_set(start.field_0x1BC.field_0x10, end.field_0x1BC.field_0x10, ratio); + out.field_0x1BC.field_0x14 = f32_ratio_set(start.field_0x1BC.field_0x14, end.field_0x1BC.field_0x14, ratio); + + out.field_0x1BC.field_0x18 = u8_ratio_set(start.field_0x1BC.field_0x18, end.field_0x1BC.field_0x18, ratio); + + out.field_0x1BC.field_0x19 = color_ratio_set( + mColor(*(u32 *)&start.field_0x1BC.field_0x19), mColor(*(u32 *)&end.field_0x1BC.field_0x19), ratio + ); + + out.field_0x1BC.field_0x1D = u8_ratio_set(start.field_0x1BC.field_0x1D, end.field_0x1BC.field_0x1D, ratio); + + out.field_0x1D4.field_0x00 = f32_ratio_set(start.field_0x1D4.field_0x00, end.field_0x1D4.field_0x00, ratio); + out.field_0x1D4.field_0x04 = f32_ratio_set(start.field_0x1D4.field_0x04, end.field_0x1D4.field_0x04, ratio); + out.field_0x1D4.field_0x08 = f32_ratio_set(start.field_0x1D4.field_0x08, end.field_0x1D4.field_0x08, ratio); + out.field_0x1D4.field_0x0C = f32_ratio_set(start.field_0x1D4.field_0x0C, end.field_0x1D4.field_0x0C, ratio); + + out.field_0x1D4.field_0x10 = u8_ratio_set(start.field_0x1D4.field_0x10, end.field_0x1D4.field_0x10, ratio); + out.field_0x1D4.field_0x11 = u8_ratio_set(start.field_0x1D4.field_0x11, end.field_0x1D4.field_0x11, ratio); + + out.field_0x1D4.field_0x12 = u16_ratio_set(start.field_0x1D4.field_0x12, end.field_0x1D4.field_0x12, ratio); + + out.field_0x1D4.field_0x14 = f32_ratio_set(start.field_0x1D4.field_0x14, end.field_0x1D4.field_0x14, ratio); + out.field_0x1D4.field_0x18 = f32_ratio_set(start.field_0x1D4.field_0x18, end.field_0x1D4.field_0x18, ratio); + out.field_0x1D4.field_0x1C = f32_ratio_set(start.field_0x1D4.field_0x1C, end.field_0x1D4.field_0x1C, ratio); + out.field_0x1D4.field_0x20 = f32_ratio_set(start.field_0x1D4.field_0x20, end.field_0x1D4.field_0x20, ratio); + + out.mParticleTransparentClr = color_ratio_set(start.mParticleTransparentClr, end.mParticleTransparentClr, ratio); + out.mParticleSolidClr = color_ratio_set(start.mParticleSolidClr, end.mParticleSolidClr, ratio); +} + +void __Spf_ct_dt_genertation() { + Spf s; +} + +void dLightEnv_c::set_palette_transition(s16 before, s16 after, s32 numFrames) { + mTransitionSpfSetting.mIdxBefore = before; + mTransitionSpfSetting.mIdxAfter = after; + mTransitionSpfSetting.mNumFrames = numFrames; + + if (after == 50) { + if (dScGame_c::currentSpawnInfo.isNight()) { + mTransitionSpfSetting.mIdxAfter = 3; + } else { + mTransitionSpfSetting.mIdxAfter = 5; + } + } else if (after == 51) { + if (ItemflagManager::sInstance->getFlagDirect(ITEM_AMBER_TABLET)) { + if (dScGame_c::currentSpawnInfo.isNight()) { + mTransitionSpfSetting.mIdxAfter = 10; + } else { + mTransitionSpfSetting.mIdxAfter = 9; + } + } else if (ItemflagManager::sInstance->getFlagDirect(ITEM_RUBY_TABLET)) { + if (dScGame_c::currentSpawnInfo.isNight()) { + mTransitionSpfSetting.mIdxAfter = 8; + } else { + mTransitionSpfSetting.mIdxAfter = 7; + } + } else { + mTransitionSpfSetting.mIdxAfter = 6; + } + } +} + +void dLightEnv_c::set_override_spf(s16 start, s16 end, f32 ratio) { + mOverrideSpfSetting.mIdxStart = start; + mOverrideSpfSetting.mIdxEnd = end; + mOverrideSpfSetting.mRatio = ratio; +} + +void dLightEnv_c::setMist(u8 mode, u8 decay, u8 alpha, f32 dir, f32 speed) { + mMistInfo.mMode = mode; + mMistInfo.mDecay = decay; + mMistInfo.mDirection = dir; + mMistInfo.mSpeed = speed; + mMistInfo.mAlpha = alpha; +} + +void dLightEnv_c::setMistMode3(const mVec3_c &pos, f32 value) { + mMistInfo.mMode = 3; + mMistInfo.mDecay = value * 128.f; + mMistPos = pos; + mMistInfo.mSpeed = value * 200.f; + mMistInfo.mAlpha = 0; +} + +void dLightEnv_c::setDOF(f32 dof) { + mDofEnabled = true; + mDof = dof; +} + +void dLightEnv_c::disableDOF() { + mDofEnabled = false; +} + +void dLightEnv_c::light_influence_ratio_set( + LIGHT_INFLUENCE &out, const LIGHT_INFLUENCE &start, const LIGHT_INFLUENCE &end, f32 ratio +) { + mColor black(0, 0, 0, 0); + + out.mIdx = start.mIdx; + out.field_0x18 = start.field_0x18; + + if (ratio <= 0.5f) { + f32 i_ratio = ratio * 2.f; + out.mPos = start.mPos; + out.mClr = color_ratio_set(start.mClr, black, i_ratio); + out.mScale = f32_ratio_set(start.mScale, 0.f, i_ratio); + } else { + f32 i_ratio = (ratio - 0.5f) * 2.f; + out.mPos = end.mPos; + out.mClr = color_ratio_set(black, end.mClr, i_ratio); + out.mScale = f32_ratio_set(0.f, end.mScale, i_ratio); + } +} + +void dLightEnv_c::sff_ratio_set(Sff &out, const Sff &start, const Sff &end, f32 ratio) { + for (int i = 0; i < 3; ++i) { + out.field_0x00[i].field_0x00 = + color_ratio_set(start.field_0x00[i].field_0x00, end.field_0x00[i].field_0x00, ratio); + out.field_0x00[i].field_0x04 = + f32_ratio_set(start.field_0x00[i].field_0x04, end.field_0x00[i].field_0x04, ratio); + out.field_0x00[i].field_0x08 = + f32_ratio_set(start.field_0x00[i].field_0x08, end.field_0x00[i].field_0x08, ratio); + } +} + +void __Sff_ct_dt_generation() { + Sff s; +} + +void dLightEnv_c::fn_80024740(u8 idx, u8 value) { + if (idx != 0) { + field_0x5D59[idx - 1].mEnabled = true; + field_0x5D59[idx - 1].mValue = value; + } +} + +bool dLightEnv_c::fn_80024770(u8 idx) { + bool ret = false; + if (idx != 0) { + ret = field_0x5D59[idx - 1].mEnabled; + } + return ret; +} +bool dLightEnv_c::fn_800247A0(u8 idx) { + bool ret = false; + if (idx != 0) { + if (field_0x5D59[idx - 1].mValue != 0) { + ret = true; + } + } + return ret; +} + +void dLightEnv_c::setWind(mVec3_c mPos, f32 f) { + mWind.mVel = mPos; + mWind.field_0x0C = f; +} + +dLightEnv_c::dLightEnv_c() { + mColor grey_aaaaaa = mColor(0xaa, 0xaa, 0xaa, 0xff); + mColor white_ffffff = mColor(0xff, 0xff, 0xff, 0xff); + mColor cream_ffffc0 = mColor(0xff, 0xff, 0xc0, 0xff); + mColor grey_808080 = mColor(0x80, 0x80, 0x80, 0xff); + mColor grey_787878 = mColor(0x78, 0x78, 0x78, 0xff); + mColor white2_ffffff = mColor(0xff, 0xff, 0xff, 0xff); + mColor grey_7f7f7f = mColor(0x7f, 0x7f, 0x7f, 0xff); + mColor yellow_ffd86b = mColor(0xff, 0xd8, 0x6b, 0xff); + mColor sea_blue_29424e = mColor(0x29, 0x42, 0x4e, 0xff); + mColor seafoam_green_b9d8b7 = mColor(0xb9, 0xd8, 0xb7, 0xff); + mColor white3_ffffff = mColor(0xff, 0xff, 0xff, 0xff); + mColor black_000000 = mColor(0x00, 0x00, 0x00, 0xff); + mColor pastel_orange_ffb787 = mColor(0xff, 0xb7, 0x87, 0xff); + mColor lightblue_aad2ff = mColor(0xaa, 0xd2, 0xff, 0xff); + mVec3_c v1(0.0f, 1.0f, 0.0f); + mColor white4_ffffff = mColor(0xff, 0xff, 0xff, 0xff); + f32 f1 = 2000.0f; + f32 f2 = 100000.0f; + mVec3_c v2(0.0f, 0.0f, 0.0f); + mVec3_c v3(1.0f, 1.0f, 1.0f); + mColor white5_ffffff = mColor(0xff, 0xff, 0xff, 0xff); + mColor pastel_yellow_fffb04 = mColor(0xff, 0xf0, 0xb4, 0xff); + mColor grey_3c3c3c = mColor(0x3c, 0x3c, 0x3c, 0xff); + mColor grey_a0a091 = mColor(0xa0, 0xa0, 0x91, 0xff); + mColor magenta_7d0091 = mColor(0x7d, 0x00, 0x91, 0xff); + mColor sand_ffebb4 = mColor(0xff, 0xeb, 0xb4, 0xff); + + sPInstance = this; + + currentSpf.mActorPalette.mAmbientClr = grey_aaaaaa; + currentSpf.mActorPalette.mDiffuseClr = white_ffffff; + currentSpf.mActorPalette.mBrightnessClr = grey_808080; + currentSpf.mActorPalette.mSpecularClr = cream_ffffc0; + currentSpf.mActorPalette.mDarkShadowClr = grey_aaaaaa; + currentSpf.mActorPalette.mDarkLightClr = white_ffffff; + currentSpf.mActorPalette.mSpecular = 0.6f; + currentSpf.mActorPalette.field_0x01C = pastel_orange_ffb787; + currentSpf.mActorPalette.field_0x24 = 195.0f; + currentSpf.mActorPalette.mTemperature = 0.5f; + currentSpf.mActorPalette.mShadowClr = black_000000; + currentSpf.mActorPalette.field_0x02C = black_000000; + + currentSpf.mStagePalette.mShadowClr = grey_787878; + currentSpf.mStagePalette.mLightClr = white2_ffffff; + currentSpf.mStagePalette.field_0x014 = grey_7f7f7f; + currentSpf.mStagePalette.field_0x060 = grey_7f7f7f; + currentSpf.mStagePalette.field_0x0AC = grey_7f7f7f; + currentSpf.mStagePalette.field_0x0F8 = grey_7f7f7f; + + currentSpf.mSkyPalette.mCloudColor = yellow_ffd86b; + currentSpf.mSkyPalette.mSkyColor = sea_blue_29424e; + currentSpf.mSkyPalette.field_0x14 = seafoam_green_b9d8b7; + currentSpf.mSkyPalette.mSkyFilter = white3_ffffff; + currentSpf.mSkyPalette.mSkyCenter = v2; + currentSpf.mSkyPalette.mSkyScale = v3; + + currentSpf.mStagePalette.mBrightness = 0.0625f; + currentSpf.mStagePalette.field_0x05C = 0.0625f; + currentSpf.mStagePalette.field_0x0A8 = 0.0625f; + currentSpf.mStagePalette.field_0x0F4 = 0.0625f; + + currentSpf.mSkyPalette.field_0x00 = grey_787878; + currentSpf.mSkyPalette.field_0x04 = grey_787878; + currentSpf.mSkyPalette.field_0x08 = grey_787878; + + currentSpf.field_0x1A4.field_0x00.field_0x00 = white4_ffffff; + currentSpf.field_0x1A4.field_0x00.field_0x04 = f1; + currentSpf.field_0x1A4.field_0x00.field_0x08 = f2; + + currentSpf.mStagePalette.mSunMoonAngle1 = 45.0f; + currentSpf.mStagePalette.mSunMoonAngle2 = 180.0f; + + for (int i = 0; i < 5; i++) { + currentSpf.mStagePalette.field_0x020[i] = black_000000; + field_0x2E08[i] = v1; + currentSpf.mStagePalette.field_0x018[i] = 0; + currentSpf.mStagePalette.field_0x034[i] = 0.0f; + currentSpf.mStagePalette.field_0x048[i] = 0.0f; + + currentSpf.mStagePalette.field_0x06C[i] = black_000000; + field_0x2E44[i] = v1; + currentSpf.mStagePalette.field_0x064[i] = 0; + currentSpf.mStagePalette.field_0x080[i] = 0.0f; + currentSpf.mStagePalette.field_0x094[i] = 0.0f; + + currentSpf.mStagePalette.field_0x0B8[i] = black_000000; + field_0x2E80[i] = v1; + currentSpf.mStagePalette.field_0x0B0[i] = 0; + currentSpf.mStagePalette.field_0x0CC[i] = 0.0f; + currentSpf.mStagePalette.field_0x0E0[i] = 0.0f; + + currentSpf.mStagePalette.field_0x104[i] = black_000000; + field_0x2EBC[i] = v1; + currentSpf.mStagePalette.field_0x0FC[i] = 0; + currentSpf.mStagePalette.field_0x118[i] = 0.0f; + currentSpf.mStagePalette.field_0x12C[i] = 0.0f; + } + + currentSpf.field_0x1A4.field_0x0C[0] = 0.55f; + currentSpf.field_0x1A4.field_0x0C[1] = 1.0f; + currentSpf.field_0x1A4.field_0x0C[2] = 0.0f; + + currentSpf.field_0x1BC.field_0x00 = 0; + currentSpf.field_0x1BC.field_0x04 = 1.0f; + currentSpf.field_0x1BC.field_0x08 = 0.5f; + currentSpf.field_0x1BC.field_0x0C = 0; + currentSpf.field_0x1BC.field_0x10 = 0.5f; + currentSpf.field_0x1BC.field_0x14 = 0.0f; + + currentSpf.field_0x1BC.field_0x18 = 0; + currentSpf.field_0x1BC.field_0x19 = pastel_yellow_fffb04; + currentSpf.field_0x1BC.field_0x1D = 1; + + currentSpf.field_0x1D4.field_0x00 = 3300.0f; + currentSpf.field_0x1D4.field_0x04 = 3300.0f; + currentSpf.field_0x1D4.field_0x08 = 1000.0f; + currentSpf.field_0x1D4.field_0x0C = 500.0f; + currentSpf.field_0x1D4.field_0x10 = 0xFF; + currentSpf.field_0x1D4.field_0x11 = 1; + currentSpf.field_0x1D4.field_0x12 = 0; + currentSpf.field_0x1D4.field_0x14 = 0.0f; + currentSpf.field_0x1D4.field_0x18 = 0.0f; + currentSpf.field_0x1D4.field_0x1C = 6.93359f; + currentSpf.field_0x1D4.field_0x20 = 8.0f; + currentSpf.mParticleTransparentClr = black_000000; + currentSpf.mParticleSolidClr = black_000000; + + for (int i = 0; i < 3; i++) { + currentSff.field_0x00[i].field_0x00 = white4_ffffff; + currentSff.field_0x00[i].field_0x04 = f1; + currentSff.field_0x00[i].field_0x08 = f2; + } + + for (int i = 0; i < 20; i++) { + spfs[i] = currentSpf; + sffs[i] = currentSff; + } + + field_0x2DEC = lightblue_aad2ff; + field_0x2EF8 = grey_a0a091; + field_0x2EFC = grey_3c3c3c; + field_0x2F00 = v1; + + field_0x2F0C = 30000; + field_0x2F0E = -8000; + field_0x2F10 = 0; + field_0x2DF8 = v1; + + for (int i = 0; i < 32; i++) { + for (int j = 0; j < 8; j++) { + field_0x38E4.field_0x00[i].field_0x00[j].field_0x00 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x38E4.field_0x00[i].field_0x00[j].field_0x04 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x38E4.field_0x00[i].field_0x00[j].field_0x08 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x38E4.field_0x00[i].field_0x00[j].field_0x0C = mColor(0xff, 0xff, 0xff, 0xff); + field_0x48E4.field_0x00[i].field_0x00[j].field_0x00 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x48E4.field_0x00[i].field_0x00[j].field_0x04 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x48E4.field_0x00[i].field_0x00[j].field_0x08 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x48E4.field_0x00[i].field_0x00[j].field_0x0C = mColor(0xff, 0xff, 0xff, 0xff); + field_0x48E4.field_0x00[i].field_0x00[j].field_0x10 = 0; + } + } + + field_0x5CE4.MA00_kColor3 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x5CE4.MA01_tevReg1 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x5CE4.MA01_kColor2 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x5CE4.MA02_tevReg1 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x5CE4.MA02_kColor2 = mColor(0xff, 0xff, 0xff, 0xff); + field_0x5CE4.MA03_kColor3 = mColor(0xff, 0xff, 0xff, 0xff); + + field_0x5D04.field_0x00 = field_0x5CE4; + field_0x5D04.field_0x20 = field_0x5CE4; +} + +dLightEnv_c::~dLightEnv_c() { + sPInstance = nullptr; +} + +void ActorLighting::fn_80026500() { + for (ListType::Iterator start = sList.GetBeginIter(); start != sList.GetEndIter(); ++start) { + // Probably stripped + } +} + +ActorLighting::~ActorLighting() {} + +void ActorLighting::reset() { + field_0x0C = -999999.f; + field_0x10 = -999999.f; + field_0x14 = -999999.f; + field_0x18 = -999999.f; + field_0x1C = -999999.f; + field_0x20 = -999999.f; + field_0x24 = -999999.f; + field_0x28 = -999999.f; + field_0x2C = -999999.f; + + field_0x38 = 999999.f; + + mLightSetIdx = -1; + + mLightingCode = 0xF; // TODO(Lighting Code) + field_0x61 = 0; + field_0x62 = 0; + field_0x30 = 0.f; + field_0x34 = 1.f; + field_0x63 = 0; + field_0x64 = 0; + mTev0Color = mColor(0, 0, 0, 0); + mTevK0Color = mColor(0, 0, 0, 0); + + mTev1Color = mColor(0, 0, 0, 0); + mTev2Color = mColor(0, 0, 0, 0); + mTevPrevColor = mColor(0, 0, 0, 0); + + mTevK1Color = mColor(0, 0, 0, 0); + mTevK2Color = mColor(0, 0, 0, 0); + mTevK3Color = mColor(0, 0, 0, 0); + + mUseTev1 = false; + mUseTev2 = false; + mUseTevPrev = false; + mUseTevK1 = false; + mUseTevK2 = false; + mUseTevK3 = false; +} + +const mColor &ActorLighting::getLightTev2Color() { + if (dObjLight_c::GetInstance() == nullptr) { + return mColor(0, 0, 0, 0); + } else { + return dObjLight_c::GetInstance()->GetColor0x68(); + } +} + +const mColor &ActorLighting::getLightTev1Color() { + if (dObjLight_c::GetInstance() == nullptr) { + return mColor(0, 0, 0, 0); + } else { + return dObjLight_c::GetInstance()->GetColor0x6C(); + } +} + +const mColor &ActorLighting::getLightTev0Color() { + if (dObjLight_c::GetInstance() == nullptr) { + return mColor(0, 0, 0, 0); + } else { + return dObjLight_c::GetInstance()->GetColor0x100(); + } +} + +const mColor &ActorLighting::getLightTevKColor() { + if (dObjLight_c::GetInstance() == nullptr) { + return mColor(0, 0, 0, 0); + } else { + return dObjLight_c::GetInstance()->GetColor0x104(); + } +} diff --git a/src/d/d_message.cpp b/src/d/d_message.cpp index 83add314..ba09d084 100644 --- a/src/d/d_message.cpp +++ b/src/d/d_message.cpp @@ -6,6 +6,7 @@ #include "d/a/d_a_itembase.h" #include "d/a/d_a_player.h" #include "d/d_base.h" +#include "d/d_light_env.h" #include "d/d_player.h" #include "d/d_pouch.h" #include "d/d_sc_game.h" @@ -22,6 +23,8 @@ #include "d/lyt/d_lyt_mini_game.h" #include "d/lyt/meter/d_lyt_meter.h" #include "d/lyt/msg_window/d_lyt_msg_window.h" +#include "d/snd/d_snd_small_effect_mgr.h" +#include "d/snd/d_snd_source_mgr.h" #include "egg/core/eggHeap.h" #include "f/f_base.h" #include "f/f_profile.h" @@ -31,14 +34,12 @@ #include "libms/msgfile.h" #include "sized_string.h" #include "toBeSorted/arc_managers/oarc_manager.h" -#include "toBeSorted/blur_and_palette_manager.h" #include "toBeSorted/dowsing_target.h" #include "toBeSorted/event_manager.h" #include "toBeSorted/fi_context.h" #include "toBeSorted/file_manager.h" #include "toBeSorted/minigame_mgr.h" #include "toBeSorted/music_mgrs.h" -#include "toBeSorted/small_sound_mgr.h" #include "toBeSorted/unk_save_time.h" #include "rvl/OS.h" @@ -46,6 +47,7 @@ #include #include + s32 dFlow_c::sExitId = -1; dFlow_c::dFlow_c() { @@ -198,7 +200,7 @@ void dFlow_c::playSound(u32 params) { return; } if (params >= 100) { - fn_803858D0(ENEMY_BGM_RELATED_MGR); + dSndSourceMgr_c::GetInstance()->playFlowSound(params); return; } @@ -216,7 +218,7 @@ void dFlow_c::playSound(u32 params) { switch (sSoundDefs[idx].mSoundMgr) { case 0: AnotherSoundMgr__playSound(FANFARE_SOUND_MGR, sSoundDefs[idx].mSoundId); break; - case 1: SmallSoundManager::GetInstance()->playSound(sSoundDefs[idx].mSoundId); break; + case 1: dSndSmallEffectMgr_c::GetInstance()->playSound(sSoundDefs[idx].mSoundId); break; } } @@ -495,8 +497,8 @@ bool dFlow_c::handleEventInternal(const MsbFlowInfo *element) { case EVENT_PALETTE: { s16 p1 = (params1n2 >> 16) & 0xFFFF; s16 p2 = params1n2 & 0xFFFF; - if (&BlurAndPaletteManager::GetInstance() != nullptr) { - BlurAndPaletteManager::GetInstance().fn_80024240(-1, p1, p2); + if (&dLightEnv_c::GetInstance() != nullptr) { + dLightEnv_c::GetInstance().set_palette_transition(-1, p1, p2); } break; } diff --git a/src/d/d_player_mdl.cpp b/src/d/d_player_mdl.cpp index a994eebb..c5c45ba3 100644 --- a/src/d/d_player_mdl.cpp +++ b/src/d/d_player_mdl.cpp @@ -631,7 +631,7 @@ bool daPlBaseMdl_c::create( field_0x58 = 0; mpSoundData = nullptr; field_0x5A = 0xFFFF; - SoundSource *sound = player->getSoundSource(); + dSoundSourceIf_c *sound = player->getSoundSource(); if (sound->isReadyMaybe()) { sound->load(nullptr, ""); } @@ -1772,7 +1772,7 @@ void daPlayerModelBase_c::removeAnmChr(s32 childIdx) { } void daPlayerModelBase_c::loadSound(nw4r::g3d::ResFile &file, const char *name, s32 childIdx) { - SoundSource *s = getSoundSource(); + dSoundSourceIf_c *s = getSoundSource(); mCurrentAnmChrIdx = childIdx; SizedString<64> path; path.sprintf("%s.brasd", name); @@ -1785,7 +1785,7 @@ void daPlayerModelBase_c::loadSound(nw4r::g3d::ResFile &file, const char *name, } void daPlayerModelBase_c::loadSoundForAnim(s32 childIdx) { - SoundSource *s = getSoundSource(); + dSoundSourceIf_c *s = getSoundSource(); s32 anim = mAnimations[childIdx]; mCurrentAnmChrIdx = childIdx; if (anim != mMainMdl.getField_0x5A()) { diff --git a/src/d/d_stage_parse.cpp b/src/d/d_stage_parse.cpp index 81104567..73b6dd13 100644 --- a/src/d/d_stage_parse.cpp +++ b/src/d/d_stage_parse.cpp @@ -15,6 +15,7 @@ #include "m/m_angle.h" #include "m/m_vec.h" #include "sized_string.h" +#include "toBeSorted/actor_info.h" #include "toBeSorted/file_manager.h" struct BzsHeader { @@ -242,13 +243,11 @@ static void handleBzsPly(int roomid, const BzsSectionHead *section) { } } -extern "C" u16 getActorIdForObjName2(const char *objname); - static void handleBzsObjn(int roomid, const BzsSectionHead *section) { const OBJN *objn = OFS_TO_PTR(OBJN, section); const char *buf = reinterpret_cast(objn); for (s32 i = 0; i < section->mCount; i++) { - dStageMgr_c::GetInstance()->addObjId(getActorIdForObjName2(buf + objn->offset)); + dStageMgr_c::GetInstance()->addObjId(getProfileId2ForName(buf + objn->offset)); objn++; } } @@ -266,7 +265,7 @@ static void handleBzsLayerObjn(int roomid, const BzsSectionHead *section) { const OBJN *objn = OFS_TO_PTR(OBJN, section); const char *buf = reinterpret_cast(objn); for (s32 i = 0; i < section->mCount; i++) { - u16 id = getActorIdForObjName2(buf + objn->offset); + u16 id = getProfileId2ForName(buf + objn->offset); dStageMgr_c::GetInstance()->addActorId(id); objn++; } diff --git a/src/d/lyt/d_lyt_bird_gauge.cpp b/src/d/lyt/d_lyt_bird_gauge.cpp index 9ed904f1..cb8f2e08 100644 --- a/src/d/lyt/d_lyt_bird_gauge.cpp +++ b/src/d/lyt/d_lyt_bird_gauge.cpp @@ -1,7 +1,7 @@ #include "d/lyt/d_lyt_bird_gauge.h" #include "common.h" -#include "toBeSorted/small_sound_mgr.h" +#include "d/snd/d_snd_small_effect_mgr.h" STATE_DEFINE(dLytBirdGaugeMain_c, ModeNone); STATE_DEFINE(dLytBirdGaugeMain_c, ModeIn); @@ -181,7 +181,7 @@ void dLytBirdGaugeMain_c::changeToRecovery() { mAnmGroups[LYT_SKY_GAUGE_MAIN_ANIM_RECOVERY + mNumDisplayedDashes].setAnimEnable(true); mAnmGroups[LYT_SKY_GAUGE_MAIN_ANIM_RECOVERY + mNumDisplayedDashes].setFrame(0.0f); mLyt.calc(); - SmallSoundManager::GetInstance()->playSound(SE_S_BIRD_RECOVER); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_BIRD_RECOVER); mStateMgr.changeState(StateID_ModeRecovery); mIsAnimating = false; mNumDisplayedDashes++; diff --git a/src/d/lyt/d_lyt_common_a_btn.cpp b/src/d/lyt/d_lyt_common_a_btn.cpp index f484e1e5..d32f69c3 100644 --- a/src/d/lyt/d_lyt_common_a_btn.cpp +++ b/src/d/lyt/d_lyt_common_a_btn.cpp @@ -5,7 +5,7 @@ #include "common.h" #include "d/d_sys.h" #include "d/lyt/d2d.h" -#include "toBeSorted/small_sound_mgr.h" +#include "d/snd/d_snd_small_effect_mgr.h" static const d2d::LytBrlanMapping brlanMap[] = { { "aBtn_00_in.brlan", "G_inOut_00"}, @@ -186,9 +186,9 @@ void dLytCommonABtn_c::goToStateDecideOut() { anm.setRate(1.0f); } if (mSoundVariant == VARIANT_NORMAL) { - SmallSoundManager::GetInstance()->playSound(SE_S_WINDOW_PRESS_A); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_WINDOW_PRESS_A); } else { - SmallSoundManager::GetInstance()->playSound(SE_S_TITLE_PRESS_START); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TITLE_PRESS_START); } } } diff --git a/src/d/lyt/d_lyt_common_arrow.cpp b/src/d/lyt/d_lyt_common_arrow.cpp index 1b9d859d..393f5068 100644 --- a/src/d/lyt/d_lyt_common_arrow.cpp +++ b/src/d/lyt/d_lyt_common_arrow.cpp @@ -2,9 +2,9 @@ #include "d/d_cs_base.h" #include "d/d_cursor_hit_check.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "rvl/MTX/mtx.h" #include "toBeSorted/arc_managers/layout_arc_manager.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytCommonArrow_c, None); STATE_DEFINE(dLytCommonArrow_c, In); @@ -262,9 +262,9 @@ void dLytCommonArrow_c::executeState_Wait() { if (field_0x6C0 != 2) { displayElement(field_0x6C0 + ANIM_DECIDE_OFFSET, 0.0f); if (field_0x6C0 == 0) { - SmallSoundManager::GetInstance()->playSound(SE_S_MENU_SELECT_TURN_PAGE_LEFT); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_SELECT_TURN_PAGE_LEFT); } else { - SmallSoundManager::GetInstance()->playSound(SE_S_MENU_SELECT_TURN_PAGE_RIGHT); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_SELECT_TURN_PAGE_RIGHT); } mTimer++; } @@ -287,9 +287,9 @@ void dLytCommonArrow_c::executeState_Wait() { if (field_0x6BC != field_0x6B8 && field_0x6B8 != 2) { if (field_0x6B8 == 0) { - SmallSoundManager::GetInstance()->playSound(SE_S_MENU_POINT_TURN_PAGE_LEFT); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_POINT_TURN_PAGE_LEFT); } else { - SmallSoundManager::GetInstance()->playSound(SE_S_MENU_POINT_TURN_PAGE_RIGHT); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_POINT_TURN_PAGE_RIGHT); } } } diff --git a/src/d/lyt/d_lyt_do_button.cpp b/src/d/lyt/d_lyt_do_button.cpp index 9f4fc89e..c47df16f 100644 --- a/src/d/lyt/d_lyt_do_button.cpp +++ b/src/d/lyt/d_lyt_do_button.cpp @@ -3,12 +3,12 @@ #include "common.h" #include "d/a/d_a_player.h" #include "d/lyt/meter/d_lyt_meter.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "nw4r/lyt/lyt_pane.h" #include "nw4r/lyt/lyt_types.h" #include "nw4r/math/math_types.h" #include "sized_string.h" #include "toBeSorted/event_manager.h" -#include "toBeSorted/small_sound_mgr.h" struct DoButtonClass { DoButtonClass(); @@ -639,7 +639,7 @@ void dLytDobutton_c::realize() { } if (mDoActionToShow == ACT_DO_CATCH) { - SmallSoundManager::GetInstance()->playSound(SE_S_CALL_BIRD_CATCH); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_CALL_BIRD_CATCH); } } diff --git a/src/d/lyt/meter/d_lyt_meter.cpp b/src/d/lyt/meter/d_lyt_meter.cpp index 00789d34..6a565c82 100644 --- a/src/d/lyt/meter/d_lyt_meter.cpp +++ b/src/d/lyt/meter/d_lyt_meter.cpp @@ -31,6 +31,7 @@ #include "d/lyt/d_lyt_sky_gauge.h" #include "d/lyt/msg_window/d_lyt_msg_window.h" #include "d/lyt/msg_window/d_lyt_simple_window.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "f/f_manager.h" #include "f/f_profile_name.h" #include "m/m_vec.h" @@ -40,7 +41,6 @@ #include "toBeSorted/event_manager.h" #include "toBeSorted/minigame_mgr.h" #include "toBeSorted/misc_actor.h" -#include "toBeSorted/small_sound_mgr.h" // clang-format on static dLytMeterConfiguration_c sConf; @@ -207,7 +207,7 @@ bool dLytMeter1Button_c::execute() { if (mAnm[BUTTON_1_ANIM_CALL].isEnabled()) { mAnm[BUTTON_1_ANIM_CALL].play(); if (meter->checkAllFlags(METER_BTN_1) && mCallCount < 3 && mAnm[BUTTON_1_ANIM_CALL].getFrame() == 1.0f) { - SmallSoundManager::GetInstance()->playSound(SE_S_1_BUTTON_BLINK); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_1_BUTTON_BLINK); mCallCount++; } } @@ -384,7 +384,7 @@ bool dLytMeter2Button_c::execute() { if (mAnm[BUTTON_1_ANIM_CALL].isEnabled()) { mAnm[BUTTON_1_ANIM_CALL].play(); if (meter->checkAllFlags(METER_BTN_2) && mCallCount < 3 && mAnm[BUTTON_1_ANIM_CALL].getFrame() == 1.0f) { - SmallSoundManager::GetInstance()->playSound(SE_S_2_BUTTON_BLINK); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_2_BUTTON_BLINK); mCallCount++; } } diff --git a/src/d/lyt/meter/d_lyt_meter_cross_btn.cpp b/src/d/lyt/meter/d_lyt_meter_cross_btn.cpp index c34e4d04..189c41eb 100644 --- a/src/d/lyt/meter/d_lyt_meter_cross_btn.cpp +++ b/src/d/lyt/meter/d_lyt_meter_cross_btn.cpp @@ -7,10 +7,10 @@ #include "d/lyt/d2d.h" #include "d/lyt/d_lyt_unknowns.h" #include "d/lyt/meter/d_lyt_meter.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "toBeSorted/event_manager.h" #include "toBeSorted/fi_context.h" #include "toBeSorted/misc_actor.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytMeterCrossBtnParts_c, Wait); STATE_DEFINE(dLytMeterCrossBtnParts_c, On); @@ -504,7 +504,7 @@ bool dLytMeterCrossBtn_c::execute() { mAnm[CROSS_BTN_ANIM_CALL_0].play(); if (mParts[CROSS_BTN_PART_DOWN].isActive() && mCallCount0 < 3 && mAnm[CROSS_BTN_ANIM_CALL_0].getFrame() == 1.0f) { - SmallSoundManager::GetInstance()->playSound(SE_S_SG_CALL); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SG_CALL); mCallCount0++; } } @@ -525,7 +525,7 @@ bool dLytMeterCrossBtn_c::execute() { mAnm[CROSS_BTN_ANIM_CALL_1].play(); if (mParts[CROSS_BTN_PART_TOP].isActive() && mCallCount1 < 3 && mAnm[CROSS_BTN_ANIM_CALL_1].getFrame() == 1.0f) { - SmallSoundManager::GetInstance()->playSound(SE_S_CATAPULT_READY); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_CATAPULT_READY); mCallCount1++; } } @@ -546,7 +546,7 @@ bool dLytMeterCrossBtn_c::execute() { if (mAnm[CROSS_BTN_ANIM_CALL_2].isEnabled()) { mAnm[CROSS_BTN_ANIM_CALL_2].play(); if (mParts[CROSS_BTN_PART_DOWN].isActive() && mAnm[CROSS_BTN_ANIM_CALL_2].getFrame() == 1.0f) { - SmallSoundManager::GetInstance()->playSound(SE_S_BIRD_CALL); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_BIRD_CALL); } } } diff --git a/src/d/lyt/meter/d_lyt_meter_dowsing.cpp b/src/d/lyt/meter/d_lyt_meter_dowsing.cpp index 65f4905f..a7b426a4 100644 --- a/src/d/lyt/meter/d_lyt_meter_dowsing.cpp +++ b/src/d/lyt/meter/d_lyt_meter_dowsing.cpp @@ -10,6 +10,7 @@ #include "d/lyt/d_lyt_util_items.h" #include "d/lyt/d_window.h" #include "d/lyt/meter/d_lyt_meter.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "m/m_vec.h" #include "nw4r/lyt/lyt_group.h" #include "nw4r/math/math_types.h" @@ -17,7 +18,6 @@ #include "toBeSorted/d_emitter.h" #include "toBeSorted/dowsing_target.h" #include "toBeSorted/file_manager.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytMeterDowsingMenuIcon_c, Wait); STATE_DEFINE(dLytMeterDowsingMenuIcon_c, On); @@ -717,7 +717,7 @@ void dLytMeterDowsing_c::executeState_DemoMove() { nw4r::math::MTX34 mtx = mpPanes[idx]->GetGlobalMtx(); mVec3_c pos(mtx._03, mtx._13, 0.0f); dJEffManager_c::spawnUIEffect(PARTICLE_RESOURCE_ID_MAPPING_970_, pos, nullptr, nullptr, nullptr, nullptr); - SmallSoundManager::GetInstance()->playSound(SE_S_DOWSING_ADD); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_DOWSING_ADD); } } else if (mDemoFrame == 16) { for (int i = 0; i < DOWSING_NUM_ITEMS; i++) { @@ -1010,7 +1010,7 @@ bool dLytMeterDowsing_c::execute() { if (mAnm[DOWSING_ANIM_CALL].isEnabled()) { mAnm[DOWSING_ANIM_CALL].play(); if (dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_C) && mAnm[DOWSING_ANIM_CALL].getFrame() == 1.0f) { - SmallSoundManager::GetInstance()->playSound(SE_S_C_BUTTON_BLINK); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_C_BUTTON_BLINK); } } } else if (field_0x5509 == 1) { diff --git a/src/d/lyt/meter/d_lyt_meter_heart.cpp b/src/d/lyt/meter/d_lyt_meter_heart.cpp index 96b685c2..74e5fc6e 100644 --- a/src/d/lyt/meter/d_lyt_meter_heart.cpp +++ b/src/d/lyt/meter/d_lyt_meter_heart.cpp @@ -5,11 +5,11 @@ #include "d/d_sc_game.h" #include "d/lyt/d2d.h" #include "d/lyt/d_lyt_game_over.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "nw4r/math/math_types.h" #include "toBeSorted/d_emitter.h" #include "toBeSorted/event_manager.h" #include "toBeSorted/file_manager.h" -#include "toBeSorted/small_sound_mgr.h" static const d2d::LytBrlanMapping brlanMap[] = { { "heartAll_00_heat.brlan", "G_heart_00"}, @@ -288,7 +288,7 @@ void dLytMeterHeart_c::executeInternal() { nw4r::math::MTX34 mtx = mpHeartPanes[mEffectHeartIdx]->GetGlobalMtx(); mVec3_c pos(mtx._03, mtx._13, 0.0f); dJEffManager_c::spawnUIEffect(PARTICLE_RESOURCE_ID_MAPPING_972_, pos, nullptr, nullptr, nullptr, nullptr); - SmallSoundManager::GetInstance()->playSound(SE_S_HEART_ADD); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_HEART_ADD); mEffectHeartIdx = -1; } @@ -323,14 +323,14 @@ void dLytMeterHeart_c::executeInternal() { if (mpAlphaPane->IsVisible() && mpAlphaPane->GetGlobalAlpha() != 0 && mStoredHealth % 4 == 0 && (!(dScGame_c::currentSpawnInfo.stageName == "F406") || dScGame_c::currentSpawnInfo.layer != 13) && dLytGameOver_c::GetInstance() == nullptr) { - SmallSoundManager::GetInstance()->playSound(SE_S_HP_GAUGE_UP); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_HP_GAUGE_UP); } } else { if (mStoredHealth - 1 >= current) { mStoredHealth = mStoredHealth - 1; if (EventManager::isInEvent() && !strcmp(EventManager::getCurrentEventName(), ("MoleF202Start")) && mStoredHealth % 4 == 0) { - SmallSoundManager::GetInstance()->playSound(SE_S_HP_GAUGE_DOWN); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_HP_GAUGE_DOWN); } } } diff --git a/src/d/lyt/meter/d_lyt_meter_item_select.cpp b/src/d/lyt/meter/d_lyt_meter_item_select.cpp index 159b5cd0..a8f6452b 100644 --- a/src/d/lyt/meter/d_lyt_meter_item_select.cpp +++ b/src/d/lyt/meter/d_lyt_meter_item_select.cpp @@ -13,6 +13,7 @@ #include "d/lyt/d_lyt_do_button.h" #include "d/lyt/d_lyt_unknowns.h" #include "d/lyt/meter/d_lyt_meter.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "m/m_vec.h" #include "nw4r/lyt/lyt_group.h" #include "nw4r/math/math_types.h" @@ -22,7 +23,6 @@ #include "toBeSorted/event_manager.h" #include "toBeSorted/minigame_mgr.h" #include "toBeSorted/misc_actor.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytMeterItemSelectIcon_c, Wait); STATE_DEFINE(dLytMeterItemSelectIcon_c, On); @@ -1392,7 +1392,7 @@ void dLytMeterItemSelect_c::initializeState_DemoMove() { mAnm[i + ITEM_SELECT_ANIM_HAVE_OFFSET].setAnimEnable(false); } - SmallSoundManager::GetInstance()->playSound(SE_S_GET_ITEM_SET); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_GET_ITEM_SET); } void dLytMeterItemSelect_c::executeState_DemoMove() { @@ -1988,7 +1988,7 @@ bool dLytMeterItemSelect_c::execute() { if (dLytDobutton_c::getField0x47C() == dLytDobutton_c::ACT_DO_SAILCLOTH) { if (field_0x5774 == 0) { - SmallSoundManager::GetInstance()->playSound(SE_S_PARACHUTE_CALL); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_PARACHUTE_CALL); } field_0x5774++; if (field_0x5774 >= mAnm[ITEM_SELECT_ANIM_CALL].getAnimDuration() / 2.0f) { @@ -2058,11 +2058,11 @@ bool dLytMeterItemSelect_c::execute() { mAnm[ITEM_SELECT_ANIM_FULL].setFrame(0.0f); mAnm[ITEM_SELECT_ANIM_FULL].setAnimEnable(true); if (field_0x5797 == I_BOMB_BAG) { - SmallSoundManager::GetInstance()->playSound(SE_S_BM_MAX); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_BM_MAX); } else if (field_0x5797 == I_BOW) { - SmallSoundManager::GetInstance()->playSound(SE_S_AW_MAX); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_AW_MAX); } else if (field_0x5797 == I_SLINGSHOT) { - SmallSoundManager::GetInstance()->playSound(SE_S_PC_MAX); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_PC_MAX); } } field_0x57B7 = false; @@ -2094,7 +2094,7 @@ bool dLytMeterItemSelect_c::execute() { mAnm[ITEM_SELECT_ANIM_CALL].play(); if (dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_B) && mAnm[ITEM_SELECT_ANIM_CALL].getFrame() == 1.0f) { - SmallSoundManager::GetInstance()->playSound(SE_S_B_BUTTON_BLINK); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_B_BUTTON_BLINK); } } b2 = true; @@ -2115,7 +2115,7 @@ bool dLytMeterItemSelect_c::execute() { mAnm[ITEM_SELECT_ANIM_CALL].play(); if (dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_B) && mAnm[ITEM_SELECT_ANIM_CALL].getFrame() == 1.0f) { - SmallSoundManager::GetInstance()->playSound(SE_S_PARACHUTE_CALL); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_PARACHUTE_CALL); } } b2 = true; diff --git a/src/d/lyt/meter/d_lyt_meter_key.cpp b/src/d/lyt/meter/d_lyt_meter_key.cpp index 824d4f10..7cd744d4 100644 --- a/src/d/lyt/meter/d_lyt_meter_key.cpp +++ b/src/d/lyt/meter/d_lyt_meter_key.cpp @@ -5,9 +5,9 @@ #include "d/a/d_a_item.h" #include "d/d_stage_mgr.h" #include "d/lyt/d2d.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "m/m_vec.h" #include "nw4r/lyt/lyt_pane.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytMeterKakeraKey_c, Wait); STATE_DEFINE(dLytMeterKakeraKey_c, On); @@ -87,9 +87,9 @@ void dLytMeterKakeraKey_c::initializeState_Increase() { mAnm[mNextKeyPieceCount - 1 + KEY_KAKERA_ANIM_NUMBER_OFFSET].setFrame(0.0f); mSavedKeyPieceCount = dAcItem_c::getKeyPieceCount(); if (mSavedKeyPieceCount == KEY_KAKERA_NUM_PIECES) { - SmallSoundManager::GetInstance()->playSound(SE_S_KEY_COMPLETE); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_KEY_COMPLETE); } else { - SmallSoundManager::GetInstance()->playSound(SE_S_KEY_PARTS); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_KEY_PARTS); } } void dLytMeterKakeraKey_c::executeState_Increase() { diff --git a/src/d/lyt/meter/d_lyt_meter_minus_btn.cpp b/src/d/lyt/meter/d_lyt_meter_minus_btn.cpp index 9b3147dd..71f7e4dd 100644 --- a/src/d/lyt/meter/d_lyt_meter_minus_btn.cpp +++ b/src/d/lyt/meter/d_lyt_meter_minus_btn.cpp @@ -7,12 +7,12 @@ #include "d/lyt/d_lyt_control_game.h" #include "d/lyt/d_lyt_util_items.h" #include "d/lyt/meter/d_lyt_meter.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "m/m_angle.h" #include "nw4r/lyt/lyt_group.h" #include "nw4r/math/math_types.h" #include "sized_string.h" #include "toBeSorted/file_manager.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytMeterMinusBtnMenuIcon_c, Wait); STATE_DEFINE(dLytMeterMinusBtnMenuIcon_c, On); @@ -635,9 +635,9 @@ void dLytMeterMinusBtn_c::initializeState_DemoMove() { } if (field_0x4E8C == 0) { - SmallSoundManager::GetInstance()->playSound(SE_S_DOGU_PORCH_ADD_FIRST); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_DOGU_PORCH_ADD_FIRST); } else { - SmallSoundManager::GetInstance()->playSound(SE_S_DOGU_PORCH_ADD); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_DOGU_PORCH_ADD); } } void dLytMeterMinusBtn_c::executeState_DemoMove() { @@ -898,7 +898,7 @@ bool dLytMeterMinusBtn_c::execute() { mAnm[MINUS_BTN_ANIM_CALL].play(); if (dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_MINUS) && mAnm[MINUS_BTN_ANIM_CALL].getFrame() == 1.0f) { - SmallSoundManager::GetInstance()->playSound(SE_S_MINUS_BUTTON_BLINK); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MINUS_BUTTON_BLINK); } } } else if (field_0x4EBA == 1) { diff --git a/src/d/lyt/meter/d_lyt_meter_plus_btn.cpp b/src/d/lyt/meter/d_lyt_meter_plus_btn.cpp index ba9c4b7d..fc7f94c1 100644 --- a/src/d/lyt/meter/d_lyt_meter_plus_btn.cpp +++ b/src/d/lyt/meter/d_lyt_meter_plus_btn.cpp @@ -9,11 +9,11 @@ #include "d/lyt/d_lyt_unknowns.h" #include "d/lyt/d_window.h" #include "d/lyt/meter/d_lyt_meter.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "d/t/d_t_map_mark.h" #include "f/f_base.h" #include "f/f_manager.h" #include "f/f_profile_name.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytMeterPlusBtn_c, Wait); STATE_DEFINE(dLytMeterPlusBtn_c, ToUse); @@ -196,7 +196,7 @@ bool dLytMeterPlusBtn_c::execute() { mAnm[PLUS_BTN_ANIM_CALL].play(); if (dLytMeter_c::GetInstance()->checkAllFlags(METER_BTN_PLUS) && mAnm[PLUS_BTN_ANIM_CALL].getFrame() == 1.0f && mCallCount < 3) { - SmallSoundManager::GetInstance()->playSound(SE_S_PLUS_BUTTON_BLINK); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_PLUS_BUTTON_BLINK); mCallCount++; } } diff --git a/src/d/lyt/meter/d_lyt_meter_rupy.cpp b/src/d/lyt/meter/d_lyt_meter_rupy.cpp index 889efecb..9e29ab76 100644 --- a/src/d/lyt/meter/d_lyt_meter_rupy.cpp +++ b/src/d/lyt/meter/d_lyt_meter_rupy.cpp @@ -4,8 +4,8 @@ #include "d/a/d_a_item.h" #include "d/lyt/d2d.h" #include "d/lyt/d_lyt_meter_configuration.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "nw4r/math/math_types.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytMeterRupyStart_c, Wait); STATE_DEFINE(dLytMeterRupyStart_c, Start); @@ -426,9 +426,9 @@ bool dLytMeterRupy_c::updateDisplayedAmount(bool suppressSound) { b = true; if (field_0x8AB) { if (newNumDisplayed == amount) { - SmallSoundManager::GetInstance()->playSound(SE_S_RUPEE_COUNT_DOWN_END); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_RUPEE_COUNT_DOWN_END); } else { - SmallSoundManager::GetInstance()->playSound(SE_S_RUPEE_COUNT_DOWN); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_RUPEE_COUNT_DOWN); } } if (field_0x8AD) { @@ -445,13 +445,13 @@ bool dLytMeterRupy_c::updateDisplayedAmount(bool suppressSound) { b = true; if (field_0x8AB) { if (newNumDisplayed == amount) { - SmallSoundManager::GetInstance()->playSound(SE_S_RUPEE_COUNT_UP_END); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_RUPEE_COUNT_UP_END); if (field_0x8AD) { field_0x890 = 0; field_0x8AD = 0; } } else { - SmallSoundManager::GetInstance()->playSound(SE_S_RUPEE_COUNT_UP); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_RUPEE_COUNT_UP); } } } @@ -511,7 +511,7 @@ bool dLytMeterRupy_c::updateDisplayedAmount(bool suppressSound) { mPrevDigits[2] = mDisplayedDigits[2]; mPrevDigits[3] = mDisplayedDigits[3]; } else if (field_0x8AD && amount == dAcItem_c::getCurrentWalletCapacity()) { - SmallSoundManager::GetInstance()->playSound(SE_S_RUPEE_MAX); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_RUPEE_MAX); field_0x890 = 0; field_0x8AD = 0; } diff --git a/src/d/lyt/meter/d_lyt_meter_shield_gauge.cpp b/src/d/lyt/meter/d_lyt_meter_shield_gauge.cpp index f89e6188..95887258 100644 --- a/src/d/lyt/meter/d_lyt_meter_shield_gauge.cpp +++ b/src/d/lyt/meter/d_lyt_meter_shield_gauge.cpp @@ -5,8 +5,8 @@ #include "d/d_pouch.h" #include "d/lyt/d2d.h" #include "d/lyt/d_lyt_meter_configuration.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "toBeSorted/file_manager.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytMeterShieldGauge_c, Normal); STATE_DEFINE(dLytMeterShieldGauge_c, Use); @@ -181,13 +181,13 @@ bool dLytMeterShieldGauge_c::execute() { if (mCurrentDurability >= mMaxDurability) { if (field_0x31E) { // Unreachable? - SmallSoundManager::GetInstance()->playSoundWithPitch(SE_S_GAUGE_SHIELD_UP_LV, 1.0f); + dSndSmallEffectMgr_c::GetInstance()->playSoundWithPitch(SE_S_GAUGE_SHIELD_UP_LV, 1.0f); } - SmallSoundManager::GetInstance()->playSound(SE_S_GAUGE_SHIELD_UP_MAX); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_GAUGE_SHIELD_UP_MAX); } else { if (field_0x31E) { // Unreachable? - SmallSoundManager::GetInstance()->playSoundWithPitch( + dSndSmallEffectMgr_c::GetInstance()->playSoundWithPitch( SE_S_GAUGE_SHIELD_UP_LV, mCurrentDurability / mMaxDurability ); } diff --git a/src/d/lyt/meter/d_lyt_meter_timer.cpp b/src/d/lyt/meter/d_lyt_meter_timer.cpp index 8362c7f7..7a2af32c 100644 --- a/src/d/lyt/meter/d_lyt_meter_timer.cpp +++ b/src/d/lyt/meter/d_lyt_meter_timer.cpp @@ -10,13 +10,13 @@ #include "d/lyt/d2d.h" #include "d/lyt/d_lyt_drop_line.h" #include "d/lyt/meter/d_lyt_meter.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "d/t/d_t_siren.h" #include "m/m_vec.h" #include "nw4r/lyt/lyt_pane.h" #include "nw4r/math/math_types.h" #include "toBeSorted/d_emitter.h" #include "toBeSorted/event_manager.h" -#include "toBeSorted/small_sound_mgr.h" #include @@ -328,7 +328,7 @@ bool LytMeterTimerPart1_c::incrementTearCount() { startNextFruitAnim(); if (!dLytMeter_c::getfn_800C9FE0()) { createEffect(mActualTearCount - 1); - SmallSoundManager::GetInstance()->playSound(SE_S_SIREN_SHIZUKU_GET_IN); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SIREN_SHIZUKU_GET_IN); } if (mActualTearCount < TIMER_01_NUM_TEARS) { diff --git a/src/d/lyt/meter/d_lyt_meter_z_btn.cpp b/src/d/lyt/meter/d_lyt_meter_z_btn.cpp index 3058e83f..935f78fe 100644 --- a/src/d/lyt/meter/d_lyt_meter_z_btn.cpp +++ b/src/d/lyt/meter/d_lyt_meter_z_btn.cpp @@ -7,8 +7,8 @@ #include "d/lyt/d_lyt_control_game.h" #include "d/lyt/d_lyt_unknowns.h" #include "d/lyt/meter/d_lyt_meter.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "toBeSorted/attention.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytMeterZBtn_c, Wait); STATE_DEFINE(dLytMeterZBtn_c, On); @@ -224,7 +224,7 @@ bool dLytMeterZBtn_c::execute() { if (mAnm[Z_BTN_ANIM_CALL].isEnabled()) { mAnm[Z_BTN_ANIM_CALL].play(); if (dLytMeter_c::GetInstance()->checkAllFlags(0x800) && mAnm[Z_BTN_ANIM_CALL].getFrame() == 1.0f) { - SmallSoundManager::GetInstance()->playSound(SE_S_Z_BUTTON_BLINK); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_Z_BUTTON_BLINK); } } } else if (field_0x1C6 == 1) { 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 3f935e28..0d3d6739 100644 --- a/src/d/lyt/msg_window/d_lyt_msg_window.cpp +++ b/src/d/lyt/msg_window/d_lyt_msg_window.cpp @@ -27,6 +27,7 @@ #include "d/lyt/d_lyt_auto_caption.h" // clang-format on +#include "d/snd/d_snd_small_effect_mgr.h" #include "f/f_base.h" #include "m/m_fader_base.h" #include "m/m_vec.h" @@ -38,7 +39,6 @@ #include "toBeSorted/lyt_related_floats.h" #include "toBeSorted/music_mgrs.h" #include "toBeSorted/other_sound_stuff.h" -#include "toBeSorted/small_sound_mgr.h" #include @@ -308,7 +308,7 @@ void dLytMsgWindow_c::executeState_OutputText() { } else if (mpTagProcessor->getMsgWindowSubtype() <= MSG_WINDOW_1 && oldValue != mpMsgWindowUnk->getField_0x147A()) { u16 a = mpMsgWindowUnk->getField_0x147C(); f32 b = (dTagProcessor_c::fn_800B8040(0, 0) * 100.0f); - SmallSoundManager::GetInstance()->playButtonPressSoundWhenAdvancingTextBoxes(a / b); + dSndSmallEffectMgr_c::GetInstance()->playButtonPressSoundWhenAdvancingTextBoxes(a / b); } if (setTextToDisplay(mpMsgWindowUnk->getProcessedText())) { diff --git a/src/d/lyt/msg_window/d_lyt_msg_window_select_btn.cpp b/src/d/lyt/msg_window/d_lyt_msg_window_select_btn.cpp index 65c97411..6ea90360 100644 --- a/src/d/lyt/msg_window/d_lyt_msg_window_select_btn.cpp +++ b/src/d/lyt/msg_window/d_lyt_msg_window_select_btn.cpp @@ -3,8 +3,8 @@ #include "common.h" #include "d/d_pad.h" #include "d/lyt/d2d.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "toBeSorted/music_mgrs.h" -#include "toBeSorted/small_sound_mgr.h" STATE_DEFINE(dLytMsgWindowSelectBtnParts_c, Wait); @@ -278,11 +278,11 @@ void dLytMsgWindowSelectBtn_c::initializeState_In() { } else { if (field_0x9CF != 0) { if (field_0x9A0 == 1) { - SmallSoundManager::GetInstance()->playSound(SE_S_CHOICE_START); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_CHOICE_START); } else if (field_0x9A0 == 2) { - SmallSoundManager::GetInstance()->playSound(SE_S_CHOICE_START_GAMEOVER); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_CHOICE_START_GAMEOVER); } else { - SmallSoundManager::GetInstance()->playSound(SE_S_TALK_CHOICE_START); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TALK_CHOICE_START); } } mAnm[SELECT_BTN_ANIM_IN].setFrame(0.0f); @@ -323,7 +323,7 @@ void dLytMsgWindowSelectBtn_c::executeState_WaitSelect() { mpWindow->UpdateSize(mpSizeBox, 32.0f); } else if (v == 3) { field_0x9D1 = 1; - SmallSoundManager::GetInstance()->playSound(SE_S_POINTER_RESET); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_POINTER_RESET); mStateMgr.changeState(StateID_In); return; } @@ -334,9 +334,9 @@ void dLytMsgWindowSelectBtn_c::executeState_WaitSelect() { mStateMgr.changeState(StateID_WaitDecide); // TODO if (mpTagProcessor != nullptr) { - SmallSoundManager::GetInstance()->playSound(SE_S_TALK_CURSOR_CANCEL); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TALK_CURSOR_CANCEL); } else { - SmallSoundManager::GetInstance()->playSound(SE_S_TALK_CURSOR_OK); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TALK_CURSOR_OK); } fn_8035E880(BGM_MGR); } else if (dPad::checkButtonBPressed()) { @@ -347,9 +347,9 @@ void dLytMsgWindowSelectBtn_c::executeState_WaitSelect() { mStateMgr.changeState(StateID_WaitCancel); // TODO if (mpTagProcessor != nullptr) { - SmallSoundManager::GetInstance()->playSound(SE_S_TALK_CURSOR_CANCEL); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TALK_CURSOR_CANCEL); } else { - SmallSoundManager::GetInstance()->playSound(SE_S_TALK_CURSOR_OK); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_TALK_CURSOR_OK); } fn_8035E880(BGM_MGR); } diff --git a/src/d/snd/d_snd_3d_actor.cpp b/src/d/snd/d_snd_3d_actor.cpp new file mode 100644 index 00000000..e304d296 --- /dev/null +++ b/src/d/snd/d_snd_3d_actor.cpp @@ -0,0 +1,174 @@ +#include "d/snd/d_snd_3d_actor.h" + +#include "common.h" +#include "d/a/d_a_player.h" +#include "d/snd/d_snd_3d_manager.h" +#include "d/snd/d_snd_checkers.h" +#include "d/snd/d_snd_player_mgr.h" +#include "nw4r/math/math_types.h" + +#include + +dSnd3DActor_c::dSnd3DActor_c(dSndSourceParam *pSourceParam, u8 sourceType) + : nw4r::snd::Sound3DActor( + dSndPlayerMgr_c::GetInstance()->getSoundArchivePlayerForType(sourceType), dSnd3DManager_c::GetInstance()->getManager() + ), + a_field_0x7D(0), + a_field_0x7E(0), + a_field_0x7F(0), + a_field_0x80(0), + a_field_0x84(0.0f), + a_field_0x88(0.0f), + a_field_0x8C(0.0f), + a_field_0x90(INFINITY), + mDistanceToListener(INFINITY), + mCameraDirectionDot(0.0f), + a_field_0x9C(0.0f), + mpSourceParam(pSourceParam), + mFlags(0), + mDistanceToPlayer(INFINITY), + a_field_0xE0(0.0f) { + resetCachedRelativePositions(); + // Portability hazard + SetUserParam(reinterpret_cast(this)); + if (dSndPlayerMgr_c::GetInstance()->canUseThisPlayer(sourceType)) { + a_field_0x7F = 1; + } +} + +void dSnd3DActor_c::d_vt_0x34(const nw4r::math::VEC3 &rPosition) { + SetPosition(rPosition); + // TODO - 0xE0 + mFlags = 0; +} + +void dSnd3DActor_c::updatePositionRelativeToListener() { + if (!checkFlag(0x1)) { + calculatePositionRelativeToListener(); + setFlag(0x1); + } +} + +void dSnd3DActor_c::resetCachedRelativePositions() { + mPositionRelativeToPlayer.x = INFINITY; + mPositionRelativeToPlayer.y = INFINITY; + mPositionRelativeToPlayer.z = INFINITY; + + mPositionRelativeToListener.x = INFINITY; + mPositionRelativeToListener.y = INFINITY; + mPositionRelativeToListener.z = INFINITY; + + mPositionTransformedByListener.x = INFINITY; + mPositionTransformedByListener.y = INFINITY; + mPositionTransformedByListener.z = INFINITY; +} + +void dSnd3DActor_c::calculatePositionRelativeToListener() { + nw4r::math::VEC3Sub( + &mPositionRelativeToListener, &GetPosition(), &dSnd3DManager_c::GetInstance()->getSndListenerPos() + ); +} + +void dSnd3DActor_c::updateDistanceToListener() { + if (!checkFlag(0x2)) { + updatePositionRelativeToListener(); + mDistanceToListener = VEC3Len(&mPositionRelativeToListener); + setFlag(0x2); + } +} + +void dSnd3DActor_c::updatePositionTransformedByListener() { + if (!checkFlag(0x10)) { + MTXMultVec( + dSnd3DManager_c::GetInstance()->getSndListenerMatrix(), GetPosition(), mPositionTransformedByListener + ); + setFlag(0x10); + } +} + +void dSnd3DActor_c::updateCameraDirectionDot() { + if (!checkFlag(0x20)) { + updatePositionRelativeToListener(); + nw4r::math::VEC3 norm; + VECNormalize(mPositionRelativeToListener, norm); + mCameraDirectionDot = nw4r::math::VEC3Dot(&norm, dSnd3DManager_c::GetInstance()->getNrmCameraDirection()); + setFlag(0x20); + } +} + +void dSnd3DActor_c::updatePositionRelativeToCameraTarget() { + if (!checkFlag(0x4)) { + calculatePositionRelativeToCameraTarget(); + setFlag(0x4); + } +} + +void dSnd3DActor_c::calculatePositionRelativeToCameraTarget() { + nw4r::math::VEC3Sub( + &mPositionRelativeToCameraTarget, &GetPosition(), dSnd3DManager_c::GetInstance()->getCameraTargetPos() + ); +} + +void dSnd3DActor_c::updateDistanceToCameraTarget() { + if (!checkFlag(0x8)) { + updatePositionRelativeToCameraTarget(); + mDistanceToCameraTarget = VEC3Len(&mPositionRelativeToCameraTarget); + setFlag(0x8); + } +} + +void dSnd3DActor_c::updatePositionRelativeToPlayer() { + if (!checkFlag(0x40)) { + nw4r::math::VEC3 linkTranslation = dAcPy_c::GetLink()->getCenterTranslation(); + nw4r::math::VEC3 pos = GetPosition(); + nw4r::math::VEC3Sub(&mPositionRelativeToPlayer, &pos, &linkTranslation); + + setFlag(0x40); + } +} + +const nw4r::math::VEC3 &dSnd3DActor_c::getPositionRelativeToPlayer() { + updatePositionRelativeToPlayer(); + return mPositionRelativeToPlayer; +} + +void dSnd3DActor_c::updateDistanceToPlayer() { + if (!checkFlag(0x80)) { + updatePositionRelativeToPlayer(); + nw4r::math::VEC3 linkTranslation = dAcPy_c::GetLink()->getCenterTranslation(); + nw4r::math::VEC3 pos = GetPosition(); + if ((linkTranslation.x == 0.0f && linkTranslation.y == 0.0f && linkTranslation.z == 0.0f) || + (pos.x == 0.0f && pos.y == 0.0f && pos.z == 0.0f)) { + // Don't bother if we received dummy values + mDistanceToPlayer = INFINITY; + } else { + mDistanceToPlayer = nw4r::math::VEC3Len(&mPositionRelativeToPlayer); + } + setFlag(0x80); + } +} + +f32 dSnd3DActor_c::getDistanceToPlayer() { + updateDistanceToPlayer(); + return mDistanceToPlayer; +} + +// here are functions that are probably in part copied from nw4r::snd::Sound3DCalculator + +bool dSnd3DActor_c::hasPlayingSounds() const { + for (int i = 0; i < ACTOR_PLAYER_COUNT; i++) { + if (GetPlayingSoundCount(i) > 0) { + return true; + } + } + return false; +} + +bool dSnd3DActor_c::isPlayingSound(u32 id) { + bool result = false; + + IsCurrentSoundIdChecker handler(id, &result); + ForEachSound(handler, false); + + return result; +} diff --git a/src/d/snd/d_snd_3d_engine.cpp b/src/d/snd/d_snd_3d_engine.cpp new file mode 100644 index 00000000..59605476 --- /dev/null +++ b/src/d/snd/d_snd_3d_engine.cpp @@ -0,0 +1,56 @@ +#include "d/snd/d_snd_3d_engine.h" + +#include "common.h" +#include "nw4r/snd/snd_Sound3DListener.h" + +dSnd3DEngine_c::dSnd3DEngine_c() {} + +static void CalcPitch( + const nw4r::math::VEC3 *vec, f32 mag, const nw4r::snd::Sound3DManager &mgr, + const nw4r::snd::Sound3DListener &listener, const nw4r::snd::Sound3DParam ¶m, f32 *pPitch +); + +void dSnd3DEngine_c::UpdateAmbientParam( + const nw4r::snd::Sound3DManager *mgr, const nw4r::snd::Sound3DParam *param3d, u32 unk, u32 flags, + nw4r::snd::SoundAmbientParam *paramAmb +) { + f32 pitch; + CalcPitch(nullptr, 0.0f, *mgr, mgr->GetListenerList().GetFront(), *param3d, &pitch); +} + +// Largely copied from Sound3DCalculator::CalcPitch +static void CalcPitch( + const nw4r::math::VEC3 *vec, f32 mag, const nw4r::snd::Sound3DManager &mgr, + const nw4r::snd::Sound3DListener &listener, const nw4r::snd::Sound3DParam ¶m, f32 *pPitch +) { + f32 f0 = mgr.GetField0x24(); + if (f0 == 0.0f) { + *pPitch = 1.0f; + return; + } + + nw4r::math::VEC3 relativePos(*vec); + if (mag > 0.0f) { + relativePos /= mag; + } + f32 f3 = param.field_0x1E / 32.0f; + f32 f1, f2; + if (mag > 0.0f) { + f1 = -nw4r::math::VEC3Dot(&relativePos, ¶m.velocity); + f2 = -nw4r::math::VEC3Dot(&relativePos, &listener.GetVelocity()); + } else { + f1 = -nw4r::math::VEC3Len(¶m.velocity); + f2 = nw4r::math::VEC3Len(&listener.GetVelocity()); + } + f32 pitch; + f1 *= f3; + f2 *= f3; + if (f2 > f0) { + pitch = 0.0f; + } else if (f1 >= f0) { + pitch = 65535.0f; + } else { + pitch = (f0 - f2) / (f0 - f1); + } + *pPitch = pitch; +} diff --git a/src/d/snd/d_snd_3d_manager.cpp b/src/d/snd/d_snd_3d_manager.cpp new file mode 100644 index 00000000..ec1d91ce --- /dev/null +++ b/src/d/snd/d_snd_3d_manager.cpp @@ -0,0 +1,137 @@ +#include "d/snd/d_snd_3d_manager.h" + +#include "d/snd/d_snd_3d_engine.h" +#include "d/snd/d_snd_mgr.h" +#include "egg/math/eggMatrix.h" +#include "egg/math/eggVector.h" +#include "nw4r/math/math_arithmetic.h" +#include "nw4r/math/math_types.h" +#include "nw4r/snd/snd_SoundArchive.h" +#include "toBeSorted/music_mgrs.h" + +SND_DISPOSER_DEFINE(dSnd3DManager_c); + +dSnd3DManager_c::dSnd3DManager_c() : mIsSetup(false), mCalculationsFresh(0) { + mCameraPosSqVelocity = 0.0f; + mCameraAtSqVelocity = 0.0f; + mCamDistance = 0.9f; + mTimer = 0; + mpEngine = new dSnd3DEngine_c(); + mCameraDirectionNormalized.x = 0.0f; + mCameraDirectionNormalized.y = 0.0f; + mCameraDirectionNormalized.z = 1.0f; +} + +void dSnd3DManager_c::setup() { + if (mIsSetup) { + return; + } + + nw4r::snd::SoundArchive *archive = dSndMgr_c::GetInstance()->getArchive(); + u32 requiredSize = mManager.GetRequiredMemSize(archive); + void *buf = dSndMgr_c::GetInstance()->getSoundHeap()->Alloc(requiredSize); + mManager.Setup(archive, buf, requiredSize); + mManager.SetEngine(mpEngine); + mManager.SetMaxPriorityReduction(32); + mManager.SetField0x20(0.9f); + mManager.SetField0x24(3400.0f / 3.0f); + mListener.SetMaxVolumeDistance(300.0f); + mListener.SetUnitDistance(1000.0f); + mListener.SetInteriorSize(400.0f); + mManager.SetBiquadFilterType(3); + mListener.SetUnitBiquadFilterMax(0.5f); + mListener.SetUnitBiquadFilterValue(0.2f); + mManager.GetListenerList().Insert(mManager.GetListenerList().GetEndIter(), &mListener); + mIsSetup = true; +} + +void dSnd3DManager_c::resetCamDistance() { + mCamDistance = 0.9f; +} + +void dSnd3DManager_c::setCamDistance(f32 value) { + // @bug ? not actually clamped + (void)nw4r::ut::Clamp(value, -1.0f, 2.0f); + mCamDistance = value; +} + +void dSnd3DManager_c::calc() { + // Don't actually calculate anything, + // but allow re-calculations this frame. + mCalculationsFresh = false; +} + +void dSnd3DManager_c::clearState() { + mCameraPosSqVelocity = 0.0f; + mCameraAtSqVelocity = 0.0f; + mTimer = 0; +} + + +void dSnd3DManager_c::updateFromCamera(EGG::LookAtCamera &camera) { + if (mCalculationsFresh) { + return; + } + + f32 dist = 0.5f; + if (fn_80364DA0(ENEMY_SOUND_MGR)) { + dist = mCamDistance; + f32 prevCameraAtSqVelocity = mCameraAtSqVelocity; + f32 prevCameraPosSqVelocity = mCameraPosSqVelocity; + mCameraAtSqVelocity = VECSquareDistance(camera.mAt, mCamera.mAt); + mCameraPosSqVelocity = VECSquareDistance(camera.mPos, mCamera.mPos); + if (((u32 *)ENEMY_SOUND_MGR)[71] > 30) { + bool bigMovement = false; + bool hugeMovement = false; + if (mTimer > 0) { + mTimer--; + } else { + f32 atAccel = prevCameraAtSqVelocity - mCameraAtSqVelocity; + f32 atAccelAbs = nw4r::math::FAbs(atAccel); + if (mCameraAtSqVelocity > 490000.0f) { + bigMovement = true; + hugeMovement = true; + } else if (atAccelAbs > 10000.0f) { + bigMovement = true; + } + if (!hugeMovement) { + f32 posAccel = prevCameraPosSqVelocity - mCameraPosSqVelocity; + f32 posAccelAbs = nw4r::math::FAbs(posAccel); + if (mCameraPosSqVelocity > 490000.0f) { + bigMovement = true; + hugeMovement = true; + } else if (posAccelAbs > 10000.0f) { + bigMovement = true; + } + if (bigMovement && !hugeMovement && nw4r::math::FAbs(atAccelAbs - posAccelAbs) < 22500.0f) { + nw4r::math::VEC3 myDir = mCamera.getOtherDirection(); + nw4r::math::VEC3 camDir = camera.getOtherDirection(); + VECNormalize(myDir, myDir); + VECNormalize(camDir, camDir); + if (nw4r::math::VEC3Dot(&myDir, &camDir) > 0.99f) { + bigMovement = false; + } + } + } + + if (bigMovement) { + fn_80364D00(ENEMY_SOUND_MGR, -1); + mTimer = 30; + } + } + } + } + + mCamera = camera; + updateListenerPos(dist); + mCalculationsFresh = true; +} + +void dSnd3DManager_c::updateListenerPos(f32 f) { + const EGG::Matrix34f &mtx = mCamera.getViewMatrix(); + mListener.SetMatrix(*mtx); + EGG::Vector3f dir = mCamera.getDirection(); + VECNormalize(dir, mCameraDirectionNormalized); + dir *= f; + mCameraTargetPosition = mCamera.mPos + dir; +} diff --git a/src/d/snd/d_snd_actor.cpp b/src/d/snd/d_snd_actor.cpp new file mode 100644 index 00000000..114bb03f --- /dev/null +++ b/src/d/snd/d_snd_actor.cpp @@ -0,0 +1,12 @@ +#include "d/snd/d_snd_actor.h" + +#include "d/snd/d_snd_checkers.h" +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_SoundArchivePlayer.h" + +dSndActor_c::dSndActor_c(nw4r::snd::SoundArchivePlayer &rStartable) : nw4r::snd::SoundActor(rStartable) {} + +void dSndActor_c::doesSomethingWithForeachSound() { + SoundPropertiesChecker checker; + ForEachSound(checker, false); +} diff --git a/src/d/snd/d_snd_area_sound.cpp b/src/d/snd/d_snd_area_sound.cpp new file mode 100644 index 00000000..27033adf --- /dev/null +++ b/src/d/snd/d_snd_area_sound.cpp @@ -0,0 +1,61 @@ +#include "d/snd/d_snd_area_sound.h" + +#include "common.h" +#include "d/snd/d_snd_sound.h" + +dSndAreaSound_c::dSndAreaSound_c() + : field_0xF0(false), mpCalcCallback(nullptr), field_0xF8(nullptr), field_0xFC(nullptr), field_0x100(nullptr) {} + +void dSndAreaSound_c::cancel() { + dSndSound_c::cancel(); + field_0xF0 = false; +} + +void dSndAreaSound_c::calc() { + if (isFadingOut() && mPauseFlag) { + if (GetRemainingFadeFrames() <= 0) { + Stop(0); + cancel(); + } + } + + dSndSound_c::calc(); + if (mpCalcCallback != nullptr) { + (mpCalcCallback)(*this); + } +} + +void dSndAreaSound_c::fadeIn(u32 id, s32 fadeFrames) { + dSndSound_c::fadeIn(id, fadeFrames); + initCallback(id); +} + +void dSndAreaSound_c::pause(s32 fadeFrames) { + if (isRunning()) { + if (fadeFrames != 0) { + pause(true, fadeFrames); + mIsFadingOut = true; + } else { + Stop(fadeFrames); + cancel(); + } + } else { + cancel(); + } +} + +void dSndAreaSound_c::unpause(s32 fadeFrames) { + if (isFadingOut()) { + pause(false, fadeFrames); + mIsFadingOut = false; + } +} + +void dSndAreaSound_c::initCallback(u32 id) { + Callback cb = nullptr; + mpCalcCallback = nullptr; + field_0xF8 = nullptr; + field_0xFC = nullptr; + field_0x100 = nullptr; + field_0x104 = nullptr; +} diff --git a/src/d/snd/d_snd_area_sound_effect_mgr.cpp b/src/d/snd/d_snd_area_sound_effect_mgr.cpp new file mode 100644 index 00000000..95114462 --- /dev/null +++ b/src/d/snd/d_snd_area_sound_effect_mgr.cpp @@ -0,0 +1,75 @@ +#include "d/snd/d_snd_area_sound_effect_mgr.h" + +#include "common.h" +#include "d/d_sc_game.h" +#include "d/snd/d_snd_mgr.h" +#include "d/snd/d_snd_player_mgr.h" +#include "d/snd/d_snd_util.h" +#include "nw4r/snd/snd_SoundStartable.h" + +SND_DISPOSER_DEFINE(dSndAreaSoundEffectMgr_c); + +dSndAreaSoundEffectMgr_c::dSndAreaSoundEffectMgr_c() + : field_0x328(0), + field_0x32C(1.0f), + field_0x330(1.0f), + mActor(*dSndMgr_c::GetInstance()->getPlayer()), + field_0x388(1.0f) {} + +void dSndAreaSoundEffectMgr_c::calc() { + for (int i = 0; i < 3; i++) { + mSounds[i].calc(); + } +} + +bool dSndAreaSoundEffectMgr_c::startSound(u32 soundId, u32 handleIdx) { + if (dSndPlayerMgr_c::GetInstance()->checkFlag(0x2)) { + return false; + } + + if (isPlayingSound(soundId)) { + return false; + } + + if (handleIdx > 2) { + return false; + } + + if (dScGame_c::currentSpawnInfo.getTrial() == SpawnInfo::TRIAL) { + return false; + } + + dSndAreaSound_c *snd = &mSounds[handleIdx]; + nw4r::snd::SoundStartable::StartResult res = mActor.detail_StartSound(snd, soundId, nullptr); + if (res == nw4r::snd::SoundStartable::START_SUCCESS) { + snd->fadeIn(soundId, 30); + } + + // @bug should probably be `res != nw4r::snd::SoundStartable::START_SUCCESS` + // all callers seem to ignore return value though + return res; +} + +void dSndAreaSoundEffectMgr_c::stopSounds(s32 fadeFrames) { + for (u32 i = 0; i < 3; i++) { + mSounds[i].stop(fadeFrames); + } +} + +bool dSndAreaSoundEffectMgr_c::isPlayingAnySound() const { + for (int i = 0; i < 3; i++) { + if (mSounds[i].IsAttachedSound()) { + return true; + } + } + return false; +} + +bool dSndAreaSoundEffectMgr_c::isPlayingSound(u32 soundId) const { + for (int i = 0; i < 3; i++) { + if (mSounds[i].GetId() == soundId) { + return true; + } + } + return false; +} diff --git a/src/d/snd/d_snd_control_player.cpp b/src/d/snd/d_snd_control_player.cpp new file mode 100644 index 00000000..824f327a --- /dev/null +++ b/src/d/snd/d_snd_control_player.cpp @@ -0,0 +1,68 @@ +#include "d/snd/d_snd_control_player.h" + +#include "common.h" +#include "d/snd/d_snd_control_player_mgr.h" +#include "d/snd/d_snd_sound.h" +#include "nw4r/snd/snd_SoundPlayer.h" +#include "nw4r/snd/snd_global.h" + +dSndControlPlayerVolumeBase_c::dSndControlPlayerVolumeBase_c() : dSndControlPlayer_c(1.0f, 0.0f, 1.0f) { + mpPlayer = nullptr; + mIndex = 0; +} + +void dSndControlPlayer_c::reset() { + dSndControl_c::reset(); + apply(); +} + +void dSndControlPlayer_c::setIndex1(u32 idx) { + mpPlayer = dSndControlPlayerMgr_c::GetInstance()->getPlayer1(idx); + mIndex = idx; +} + +void dSndControlPlayer_c::setIndex2(u32 idx) { + mpPlayer = dSndControlPlayerMgr_c::GetInstance()->getPlayer2(idx); + mIndex = idx; +} + +void dSndControlPlayer_c::stop() { + mCurrValue = getAppliedValue(); + dSndControl_c::stop(); +} + +void dSndControlPlayerVolume_c::apply() { + mpPlayer->SetVolume(mCurrValue); +} + +f32 dSndControlPlayerVolume_c::getAppliedValue() { + return mpPlayer->GetVolume(); +} + +void dSndControlPlayerLpfFreq_c::apply() { + mpPlayer->SetLpfFreq(mCurrValue); +} + +f32 dSndControlPlayerLpfFreq_c::getAppliedValue() { + return mpPlayer->GetLpfFreq(); +} + +void dSndControlPlayerFxSend_c::apply() { + if (mCurrValue < mMin) { + mCurrValue = mMin; + } + if (mCurrValue >= mMax) { + mCurrValue = mMax; + } + mpPlayer->SetFxSend(nw4r::snd::AUX_B, mCurrValue); +} + +extern "C" bool fn_8035F030(s32); + +f32 dSndControlPlayerFxSend_c::getAppliedValue() { + int auxBus = nw4r::snd::AUX_A; + if (fn_8035F030(mIndex)) { + auxBus = nw4r::snd::AUX_B; + } + return mpPlayer->GetFxSend(auxBus); +} diff --git a/src/d/snd/d_snd_control_player_mgr.cpp b/src/d/snd/d_snd_control_player_mgr.cpp new file mode 100644 index 00000000..22223c98 --- /dev/null +++ b/src/d/snd/d_snd_control_player_mgr.cpp @@ -0,0 +1,403 @@ +#include "d/snd/d_snd_control_player_mgr.h" + +#include "common.h" +#include "d/snd/d_snd_control_player.h" +#include "d/snd/d_snd_mgr.h" +#include "d/snd/d_snd_player_mgr.h" +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/ut/ut_list.h" +#include "toBeSorted/music_mgrs.h" + +struct FanfareMuteFlagsApplier { + ~FanfareMuteFlagsApplier() {} + virtual void operator()(nw4r::snd::SoundHandle &handle) { + // The logic here is inverted compared to the others - Fanfares seem to + // mute things by default unless otherwise speciefied + u32 id = handle.GetId(); + if (fn_803733B0(FANFARE_SOUND_MGR, id)) { + u32 userParam = dSndMgr_c::GetInstance()->getArchive()->GetSoundUserParam(id); + if (!(userParam & dSndPlayerMgr_c::FANFARE_UNMUTE_BGM)) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_BGM, dSndControlPlayerMgr_c::MUTE_FULL + ); + dSndControlPlayerMgr_c::GetInstance()->setBgmVolumeDecreaseSpeed(0.2f); + } + + if (fn_80364DA0(ENEMY_SOUND_MGR)) { + if (!(userParam & dSndPlayerMgr_c::FANFARE_UNMUTE_STAGE_EFFECTS)) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_STAGE_EFFECTS, dSndControlPlayerMgr_c::MUTE_FULL + ); + } + if (!(userParam & dSndPlayerMgr_c::FANFARE_UNMUTE_ENEMY)) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_ENEMY, dSndControlPlayerMgr_c::MUTE_FULL + ); + } + if (!(userParam & dSndPlayerMgr_c::FANFARE_UNMUTE_OBJECTS)) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_OBJECTS, dSndControlPlayerMgr_c::MUTE_FULL + ); + } + } + } + }; +}; + +struct SmallMuteFlagsApplier { + ~SmallMuteFlagsApplier() {} + virtual void operator()(nw4r::snd::SoundHandle &handle) { + u32 userParam = dSndMgr_c::GetInstance()->getArchive()->GetSoundUserParam(handle.GetId()); + + if (userParam & dSndPlayerMgr_c::MUTE_BGM_FULL) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_BGM, dSndControlPlayerMgr_c::MUTE_FULL + ); + } else if (userParam & dSndPlayerMgr_c::MUTE_BGM_PART) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_BGM, dSndControlPlayerMgr_c::MUTE_PARTIAL + ); + } + + if (userParam & dSndPlayerMgr_c::MUTE_STAGE_EFFECTS_FULL) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_STAGE_EFFECTS, dSndControlPlayerMgr_c::MUTE_FULL + ); + } else if (userParam & dSndPlayerMgr_c::MUTE_STAGE_EFFECTS_PART) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_STAGE_EFFECTS, dSndControlPlayerMgr_c::MUTE_PARTIAL + ); + } + + if (userParam & dSndPlayerMgr_c::MUTE_ENEMY_FULL) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_ENEMY, dSndControlPlayerMgr_c::MUTE_FULL + ); + } else if (userParam & dSndPlayerMgr_c::MUTE_ENEMY_PART) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_ENEMY, dSndControlPlayerMgr_c::MUTE_PARTIAL + ); + } + + if (userParam & dSndPlayerMgr_c::MUTE_OBJECTS_FULL) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_OBJECTS, dSndControlPlayerMgr_c::MUTE_FULL + ); + } else if (userParam & dSndPlayerMgr_c::MUTE_OBJECTS_PART) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_OBJECTS, dSndControlPlayerMgr_c::MUTE_PARTIAL + ); + } + }; +}; + +struct EventMuteFlagsApplier { + ~EventMuteFlagsApplier() {} + virtual void operator()(nw4r::snd::SoundHandle &handle) { + u32 userParam = dSndPlayerMgr_c::GetInstance()->getEventMuteMask(handle.GetId()); + + if (userParam & dSndPlayerMgr_c::MUTE_BGM_FULL) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_BGM, dSndControlPlayerMgr_c::MUTE_FULL + ); + } else if (userParam & dSndPlayerMgr_c::MUTE_BGM_PART) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_BGM, dSndControlPlayerMgr_c::MUTE_PARTIAL + ); + } + + if (userParam & dSndPlayerMgr_c::MUTE_STAGE_EFFECTS_FULL) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_STAGE_EFFECTS, dSndControlPlayerMgr_c::MUTE_FULL + ); + } else if (userParam & dSndPlayerMgr_c::MUTE_STAGE_EFFECTS_PART) { + dSndControlPlayerMgr_c::GetInstance()->setGroupVolumeFlag( + dSndControlPlayerMgr_c::CTRL_GROUP_STAGE_EFFECTS, dSndControlPlayerMgr_c::MUTE_PARTIAL + ); + } + }; +}; + +static FanfareMuteFlagsApplier fanfareApplier; +static SmallMuteFlagsApplier smallApplier; +static EventMuteFlagsApplier eventApplier; + +SND_DISPOSER_DEFINE(dSndControlPlayerMgr_c); + +dSndControlPlayerMgr_c::dSndControlPlayerMgr_c() : mOverrideVolumeMask(0) { + // TODO offsetof + nw4r::ut::List_Init(&mActiveControls, 0x24); + + mpCtrls[CTRL_VOLUME] = new dSndControlPlayerVolume_c[sNumPlayers](); + mpCtrls[CTRL_LPF_FREQ] = new dSndControlPlayerLpfFreq_c[sNumPlayers](); + mpCtrls[CTRL_FX_SEND] = new dSndControlPlayerFxSend_c[sNumPlayers](); + + mpSavedVolumes = new f32[sNumPlayers]; + mpTargetVolumes = new f32[sNumPlayers]; + mpMaxVolumeDecreases = new f32[sNumPlayers]; + mpMaxVolumeIncreases = new f32[sNumPlayers]; +} + +void dSndControlPlayerMgr_c::calc() { + calcMuteFlags(); + calcVolumes(); + executeControls(); +} + +void dSndControlPlayerMgr_c::executeControls() { + dSndControlPlayer_c *next; + dSndControlPlayer_c *iter = static_cast(nw4r::ut::List_GetFirst(&mActiveControls)); + while (iter != nullptr) { + next = static_cast(nw4r::ut::List_GetNext(&mActiveControls, iter)); + iter->calc(); + iter->apply(); + if (iter->isFinished()) { + unlinkCtrl(iter); + } + iter = next; + } +} + +void dSndControlPlayerMgr_c::calcVolumes() { + for (int i = 0; i < sNumPlayers; i++) { + if ((mOverrideVolumeMask & (1 << i)) != 0) { + // overridden volume + mpTargetVolumes[i] = mpSavedVolumes[i]; + } else { + // not overridden. + f32 currentVolume = getAppliedPlayerVolume(i); + f32 targetVolume = mpTargetVolumes[i]; + f32 maxVolumeDecrease = mpMaxVolumeDecreases[i]; + f32 maxVolumeIncrease = mpMaxVolumeIncreases[i]; + + if (currentVolume != targetVolume) { + if (currentVolume - targetVolume > maxVolumeDecrease) { + targetVolume = currentVolume - maxVolumeDecrease; + } else if (targetVolume - currentVolume > maxVolumeIncrease) { + targetVolume = currentVolume + maxVolumeIncrease; + } + // @bug not actually clamped + (void)nw4r::ut::Clamp(targetVolume, 0.0f, 2.0f); + setVolume(i, targetVolume, 0); + } + mpTargetVolumes[i] = 1.0f; + mpMaxVolumeDecreases[i] = 0.1f; + mpMaxVolumeIncreases[i] = 0.025f; + } + } +} + +void dSndControlPlayerMgr_c::calcMuteFlags() { + getPlayer1(dSndPlayerMgr_c::PLAYER_FAN)->ForEachSound(fanfareApplier, false); + getPlayer1(dSndPlayerMgr_c::PLAYER_SMALL_IMPORTANT)->ForEachSound(smallApplier, false); + getPlayer1(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL)->ForEachSound(smallApplier, false); + getPlayer1(dSndPlayerMgr_c::PLAYER_EVENT)->ForEachSound(eventApplier, false); + + f32 volumesByGroup[CTRL_GROUP_MAX]; + for (int i = 0; i < CTRL_GROUP_MAX; i++) { + volumesByGroup[i] = 1.0f; + if (mTimersForGroupVolume[i][MUTE_PARTIAL] > 0) { + mTimersForGroupVolume[i][MUTE_PARTIAL]--; + volumesByGroup[i] = 0.3f; + } + + if (mTimersForGroupVolume[i][MUTE_FULL] > 0) { + mTimersForGroupVolume[i][MUTE_FULL]--; + volumesByGroup[i] = 0.0f; + } + } + + if (volumesByGroup[CTRL_GROUP_BGM] < 1.0f) { + setBgmMuteVolume(volumesByGroup[CTRL_GROUP_BGM]); + } + + if (volumesByGroup[CTRL_GROUP_STAGE_EFFECTS] < 1.0f) { + setStageEffectsMuteVolume(volumesByGroup[CTRL_GROUP_STAGE_EFFECTS]); + } + + if (volumesByGroup[CTRL_GROUP_ENEMY] < 1.0f) { + setEnemyMuteVolume(volumesByGroup[CTRL_GROUP_ENEMY]); + } + + if (volumesByGroup[CTRL_GROUP_OBJECTS] < 1.0f) { + setObjectMuteVolume(volumesByGroup[CTRL_GROUP_OBJECTS]); + } +} + +void dSndControlPlayerMgr_c::linkCtrl(dSndControlPlayer_c *ctrl) { + if (ctrl == nullptr) { + return; + } + if (ctrl->isLinked()) { + return; + } + ctrl->setLinked(true); + nw4r::ut::List_Append(&mActiveControls, ctrl); +} + +void dSndControlPlayerMgr_c::unlinkCtrl(dSndControlPlayer_c *ctrl) { + if (ctrl == nullptr) { + return; + } + if (!ctrl->isLinked()) { + return; + } + ctrl->setLinked(false); + nw4r::ut::List_Remove(&mActiveControls, ctrl); +} + +void dSndControlPlayerMgr_c::setVolume(u32 playerIdx, f32 value, s32 frames) { + if (playerIdx >= sNumPlayers) { + return; + } + + u32 mask = (1 << playerIdx); + if ((mOverrideVolumeMask & mask) != 0) { + // Volume is overridden, set saved volume as to not interrupt override + mpSavedVolumes[playerIdx] = value; + setPlayerVolumeInternal(playerIdx, value); + } else { + // Volume is not overridden, set volume normally + setControlValue(CTRL_VOLUME, playerIdx, value, frames); + mpSavedVolumes[playerIdx] = getControlTarget(CTRL_VOLUME, playerIdx); + } +} + +void dSndControlPlayerMgr_c::overrideVolume(u32 playerIdx, f32 volume, s32 frames) { + if (playerIdx >= sNumPlayers) { + return; + } + u32 mask = (1 << playerIdx); + if ((mOverrideVolumeMask & mask) == 0) { + mpSavedVolumes[playerIdx] = getControlTarget(CTRL_VOLUME, playerIdx); + mOverrideVolumeMask |= mask; + } + setControlValue(CTRL_VOLUME, playerIdx, volume, frames); +} + +void dSndControlPlayerMgr_c::restoreVolume(u32 playerIdx, s32 frames) { + if (playerIdx >= sNumPlayers) { + return; + } + u32 mask = (1 << playerIdx); + if ((mOverrideVolumeMask & mask) == 0) { + return; + } + mOverrideVolumeMask &= ~mask; + setControlValue(CTRL_VOLUME, playerIdx, mpSavedVolumes[playerIdx], frames); +} + +void dSndControlPlayerMgr_c::setLpfFreq(u32 playerIdx, f32 value, s32 frames) { + if (playerIdx < sNumPlayers) { + setControlValue(CTRL_LPF_FREQ, playerIdx, value, frames); + } +} + +void dSndControlPlayerMgr_c::setFxSend(u32 playerIdx, f32 value, s32 frames) { + if (playerIdx < sNumPlayers) { + setControlValue(CTRL_FX_SEND, playerIdx, value, frames); + } +} + +void dSndControlPlayerMgr_c::setControlValue(PlayerCtrl_e ctrlType, u32 playerIdx, f32 value, s32 frames) { + if (ctrlType < CTRL_MAX && playerIdx < sNumPlayers) { + dSndControlPlayer_c *ctrl = &mpCtrls[ctrlType][playerIdx]; + ctrl->set(value, frames); + if (ctrl->isFinished()) { + unlinkCtrl(ctrl); + } else { + linkCtrl(ctrl); + } + ctrl->apply(); + } +} + +void dSndControlPlayerMgr_c::resetControls() { + for (s32 i = 0; i < sNumPlayers; i++) { + for (s32 ty = 0; ty < CTRL_MAX; ty++) { + mpCtrls[ty][i].reset(); + } + mpSavedVolumes[i] = 1.0f; + } + mOverrideVolumeMask = 0; +} + +f32 dSndControlPlayerMgr_c::getAppliedPlayerVolume(u32 playerIdx) const { + if (playerIdx >= sNumPlayers) { + return 0.0f; + } + return getPlayer1(playerIdx)->GetVolume(); +} + +f32 dSndControlPlayerMgr_c::getControlTarget(PlayerCtrl_e ctrlType, u32 playerIdx) const { + if (ctrlType >= CTRL_MAX) { + return 1.0f; + } + if (playerIdx >= sNumPlayers) { + return 1.0f; + } + return mpCtrls[ctrlType][playerIdx].getTargetValue(); +} + +void dSndControlPlayerMgr_c::setGroupVolumeFlag(VolumeControlGroup group, MuteLevel level) { + if (group >= CTRL_GROUP_MAX) { + return; + } + + if (level >= MUTE_MAX) { + return; + } + + mTimersForGroupVolume[group][level] = 5; +} + +void dSndControlPlayerMgr_c::setPlayerVolumeInternal(u32 playerIdx, f32 volume) { + if (playerIdx >= sNumPlayers) { + return; + } + // @bug not actually clamped + (void)nw4r::ut::Clamp(volume, 0.0f, 2.0f); + + if (mpTargetVolumes[playerIdx] > volume) { + mpTargetVolumes[playerIdx] = volume; + } + + u32 mask = (1 << playerIdx); + if ((mOverrideVolumeMask & mask) != 0) { + mpSavedVolumes[playerIdx] = mpTargetVolumes[playerIdx]; + } +} + +void dSndControlPlayerMgr_c::setBgmMuteVolume(f32 volume) { + for (u32 i = dSndPlayerMgr_c::PLAYER_BGM; i < dSndPlayerMgr_c::PLAYER_BGM_BOSS + 1; i++) { + setPlayerVolumeInternal(i, volume); + } +} + +void dSndControlPlayerMgr_c::setBgmVolumeDecreaseSpeed(f32 decrease) {} + +void dSndControlPlayerMgr_c::setStageEffectsVolume(f32 volume, s32 fadeFrames) { + for (u32 i = dSndPlayerMgr_c::PLAYER_TG_SOUND; i <= dSndPlayerMgr_c::PLAYER_AREA_IN_WATER_LV; i++) { + setVolume(i, volume, fadeFrames); + } +} + +void dSndControlPlayerMgr_c::setStageEffectsMuteVolume(f32 volume) { + for (u32 i = dSndPlayerMgr_c::PLAYER_TG_SOUND; i <= dSndPlayerMgr_c::PLAYER_AREA_IN_WATER_LV; i++) { + setPlayerVolumeInternal(i, volume); + } +} + +void dSndControlPlayerMgr_c::setEnemyMuteVolume(f32 volume) { + for (u32 i = dSndPlayerMgr_c::PLAYER_ENEMY; i < dSndPlayerMgr_c::PLAYER_ENEMY_FOOTSTEP + 1; i++) { + setPlayerVolumeInternal(i, volume); + } +} + +void dSndControlPlayerMgr_c::setObjectMuteVolume(f32 volume) { + for (u32 i = dSndPlayerMgr_c::PLAYER_OBJECT_1; i < dSndPlayerMgr_c::PLAYER_TG_SOUND + 1; i++) { + if (i != dSndPlayerMgr_c::PLAYER_NPC_VOICE) { + setPlayerVolumeInternal(i, volume); + } + } +} diff --git a/src/d/snd/d_snd_control_sound.cpp b/src/d/snd/d_snd_control_sound.cpp new file mode 100644 index 00000000..d6ab1bac --- /dev/null +++ b/src/d/snd/d_snd_control_sound.cpp @@ -0,0 +1,99 @@ + +#include "common.h" +#include "d/snd/d_snd_calc_pitch.h" +#include "d/snd/d_snd_sound.h" +#include "nw4r/snd/snd_SeqSoundHandle.h" +#include "nw4r/snd/snd_StrmSoundHandle.h" + +// I'm not super happy with these base class function in a separate file, +// but either we add another intermediate class or this is ok. It's weird +// that d_snd_sound has dSndControl_c::configure though + +void dSndControl_c::reset() { + mCurrValue = mResetValue; + mStartValue = mResetValue; + mTargetValue = mResetValue; + mDuration = 0; + mTimer = 0; +} + +void dSndControl_c::stop() { + mStartValue = mCurrValue; + mTargetValue = mCurrValue; + mDuration = 0; + mTimer = 0; +} + +void dSndControl_c::set(f32 value, s32 frames) { + stop(); + f32 clamped = value; + if (clamped > mMax) { + clamped = mMax; + } else if (clamped < mMin) { + clamped = mMin; + } + if (clamped != mCurrValue) { + mTargetValue = clamped; + if (frames == 0) { + mCurrValue = clamped; + } else { + mDuration = frames; + mTimer = 0; + } + } +} + +void dSndControl_c::calc() { + if (mTimer < mDuration) { + mTimer++; + if (mTimer == mDuration) { + mCurrValue = mTargetValue; + } else { + mCurrValue = mStartValue + (mTimer * (mTargetValue - mStartValue) / mDuration); + } + } +} + +void dSndControlSoundVolume_c::apply(dSndSound_c *sound) { + sound->SetVolume(mCurrValue, 0); +} + +void dSndControlSoundPitch_c::apply(dSndSound_c *sound) { + sound->SetPitch(mCurrValue); +} + +void d_snd_control_sound_float_order() { + -24.0f; + 24.0f; +} + +dSndControlSoundPitchLinear_c::dSndControlSoundPitchLinear_c() : dSndControlSound_c(0.0f, -24.0f, 24.0f) { + mpOtherControl = nullptr; +} + +void dSndControlSoundPitchLinear_c::set(f32 value, s32 frames) { + if (mpOtherControl != nullptr) { + mCurrValue = pitchIdxTenthsForPitchScale(mpOtherControl->getCurrentValue()); + } + + dSndControlSound_c::set(value, frames); +} + +void dSndControlSoundPitchLinear_c::apply(dSndSound_c *pHandle) { + pHandle->setPitchRelated(pitchScaleForPitchIdxTenths(mCurrValue), 0); +} + +void dSndControlSoundSeqTempoRatio_c::apply(dSndSound_c *sound) { + nw4r::snd::SeqSoundHandle handle(sound); + handle.SetTempoRatio(mCurrValue); +} + +void dSndControlSoundSeqTrackVolume_c::apply(dSndSound_c *sound) { + nw4r::snd::SeqSoundHandle handle(sound); + handle.SetVolume(mMask, mCurrValue); +} + +void dSndControlSoundStrmTrackVolume_c::apply(dSndSound_c *sound) { + nw4r::snd::StrmSoundHandle handle(sound); + handle.SetVolume(mMask, mCurrValue, 0); +} diff --git a/src/d/snd/d_snd_mgr.cpp b/src/d/snd/d_snd_mgr.cpp new file mode 100644 index 00000000..b2ee2279 --- /dev/null +++ b/src/d/snd/d_snd_mgr.cpp @@ -0,0 +1,57 @@ +#include "d/snd/d_snd_mgr.h" + +#include "d/snd/d_snd_3d_manager.h" +#include "d/snd/d_snd_area_sound_effect_mgr.h" +#include "d/snd/d_snd_control_player_mgr.h" +#include "d/snd/d_snd_player_mgr.h" +#include "d/snd/d_snd_small_effect_mgr.h" +#include "d/snd/d_snd_source_mgr.h" +#include "egg/audio/eggAudioRmtSpeakerMgr.h" +#include "egg/audio/eggAudioUtility.h" + +extern "C" void initEnemySoundMgr(); +extern "C" void initFanfareSoundMgr(); +extern "C" void initSomeUnusedSoundMgr(); +extern "C" void fn_80393530(); +extern "C" void fn_80394830(); +extern "C" void fn_8037F940(); +extern "C" void fn_80399600(); +extern "C" void fn_80399C20(); + +dSndMgr_c *dSndMgr_c::sInstance; + +dSndMgr_c::dSndMgr_c(): field_0x6CC(0) { + sInstance = this; + dSndPlayerMgr_c::create(); + dSndControlPlayerMgr_c::create(); + initEnemySoundMgr(); + dSnd3DManager_c::create(); + initFanfareSoundMgr(); + initSomeUnusedSoundMgr(); + dSndSmallEffectMgr_c::create(); + dSndAreaSoundEffectMgr_c::create(); + dSndSourceMgr_c::create(); + fn_80393530(); + fn_80394830(); + fn_8037F940(); + fn_80399600(); + fn_80399C20(); + + initHbm(9); +} + +void dSndMgr_c::initialize(EGG::Heap *heap, u32 size) {} + +void dSndMgr_c::initHbm(u32 frame) { + EGG::AudioUtility::HBM::init(this, restoreEffectsCallback, frame); +} + +void dSndMgr_c::calc() { + if (field_0x6CC) { + EGG::SimpleAudioMgr::calc(); + EGG::AudioRmtSpeakerMgr::calc(); + dSndPlayerMgr_c::GetInstance()->calc(); + } +} + +void dSndMgr_c::restoreEffectsCallback() {} diff --git a/src/d/snd/d_snd_player_mgr.cpp b/src/d/snd/d_snd_player_mgr.cpp new file mode 100644 index 00000000..4851d179 --- /dev/null +++ b/src/d/snd/d_snd_player_mgr.cpp @@ -0,0 +1,170 @@ + +#include "d/snd/d_snd_player_mgr.h" + +#include "common.h" +#include "d/snd/d_snd_control_player_mgr.h" +#include "d/snd/d_snd_mgr.h" +#include "d/snd/d_snd_small_effect_mgr.h" +#include "d/snd/d_snd_source_enums.h" +#include "d/snd/d_snd_wzsound.h" +#include "egg/core/eggDvdRipper.h" +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/snd/snd_SoundStartable.h" +#include "sized_string.h" + +const char *dSndPlayerMgr_c::getSoundArchivePath() { + return "Sound/WZSound.brsar"; +} + +SND_DISPOSER_DEFINE(dSndPlayerMgr_c); + +dSndPlayerMgr_c::dSndPlayerMgr_c() + : field_0x010(0), field_0x011(0), field_0x014(-1), field_0x018(-1), field_0x01C(-1), mFlags(0) {} + +void dSndPlayerMgr_c::enterPauseState() { + dSndControlPlayerMgr_c::GetInstance()->setVolume(PLAYER_FAN, 0.3f, 5); + dSndControlPlayerMgr_c::GetInstance()->setVolume(PLAYER_AREA, 0.3f, 5); + dSndControlPlayerMgr_c::GetInstance()->setVolume(PLAYER_AREA_IN_WATER_LV, 0.3f, 5); + // has other effects, such as reducing BGM volume + onFlag(MGR_PAUSE); +} + +u32 dSndPlayerMgr_c::getFreeSize() { + return dSndMgr_c::GetInstance()->getSoundHeap()->GetFreeSize(); +} + +void dSndPlayerMgr_c::leavePauseState() { + dSndControlPlayerMgr_c::GetInstance()->setVolume(PLAYER_FAN, 1.0f, 5); + dSndControlPlayerMgr_c::GetInstance()->setVolume(PLAYER_AREA, 1.0f, 5); + dSndControlPlayerMgr_c::GetInstance()->setVolume(PLAYER_AREA_IN_WATER_LV, 1.0f, 5); + offFlag(MGR_PAUSE); +} + +void dSndPlayerMgr_c::enterMenu() { + enterPauseState(); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_IN); +} + +void dSndPlayerMgr_c::leaveMenu() { + leavePauseState(); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MENU_OUT); +} + +void dSndPlayerMgr_c::enterMap() { + enterPauseState(); + onFlag(MGR_MAP); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_OPEN); +} + +void dSndPlayerMgr_c::leaveMap() { + leavePauseState(); + offFlag(MGR_MAP); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_MAP_CLOSE); +} + +void dSndPlayerMgr_c::enterHelp() { + onFlag(MGR_HELP); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_HELP_IN); +} + +void dSndPlayerMgr_c::leaveHelp() { + offFlag(MGR_HELP); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_HELP_OUT); +} + +nw4r::snd::SoundStartable::StartResult dSndPlayerMgr_c::startSound( + nw4r::snd::SoundHandle *pHandle, u32 soundId, const nw4r::snd::SoundStartable::StartInfo *pStartInfo +) { + if (checkFlag(MGR_UNK_0x2)) { + return nw4r::snd::SoundStartable::START_ERR_USER; + } + + nw4r::snd::SoundHandle handle; + if (pHandle == nullptr) { + pHandle = &handle; + } + nw4r::snd::SoundStartable::StartResult res; + if (pStartInfo != nullptr) { + res = dSndMgr_c::getPlayer()->detail_StartSound(pHandle, soundId, pStartInfo); + } else { + res = dSndMgr_c::getPlayer()->detail_StartSound(pHandle, soundId, nullptr); + } + return res; +} + +nw4r::snd::SoundStartable::StartResult dSndPlayerMgr_c::startSound( + nw4r::snd::SoundHandle *pHandle, const char *soundLabel, const nw4r::snd::SoundStartable::StartInfo *pStartInfo +) { + u32 id = dSndPlayerMgr_c::GetInstance()->convertLabelStringToSoundId(soundLabel); + return startSound(pHandle, id, pStartInfo); +} + +u32 dSndPlayerMgr_c::convertLabelStringToSoundId(const char *label) const { + return dSndMgr_c::GetInstance()->changeNameToId(label); +} + +nw4r::snd::SoundArchivePlayer &dSndPlayerMgr_c::getSoundArchivePlayerForType(u8 sourceType) { + if (canUseThisPlayer(sourceType)) { + return mSoundArchivePlayer; + } + return *dSndMgr_c::getPlayer(); +} + +bool dSndPlayerMgr_c::canUseThisPlayer(u8 sourceType) const { + if (!mSoundArchivePlayer.IsAvailable()) { + return false; + } + + switch (sourceType) { + case SND_SOURCE_PLAYER: + case SND_SOURCE_PLAYER_HEAD: + case SND_SOURCE_58: + return true; + default: + return false; + } +} + +bool dSndPlayerMgr_c::loadDemoArchive(const char *demoArchiveName) { + if (demoArchiveName == nullptr) { + return false; + } + + int stateId = dSndMgr_c::GetInstance()->saveState(); + SizedString<64> path; + path.sprintf("Sound/demo/%s.brsar", demoArchiveName); + void *buf = dSndMgr_c::GetInstance()->getSoundHeap()->Alloc(getFreeSize() - 0x40000); + if (buf == nullptr) { + return false; + } + bool ok = false; + u32 amountRead = 0; + u32 fileSize = 0; + EGG::DvdRipper::Arg arg(path, (u8 *)buf, nullptr, EGG::DvdRipper::ALLOC_DIR_TOP, 0, &amountRead, &fileSize); + void *ptr = EGG::DvdRipper::loadToMainRAM(arg); + if (ptr != nullptr) { + ok = mSoundArchive.Setup(ptr); + if (ok) { + u32 size = mSoundArchivePlayer.GetRequiredMemSize(&mSoundArchive); + void *buf2 = dSndMgr_c::GetInstance()->getSoundHeap()->Alloc(size); + if (buf2 != nullptr) { + ok = mSoundArchivePlayer.Setup(&mSoundArchive, buf2, size, nullptr, 0); + } + } + } + if (!ok) { + dSndMgr_c::GetInstance()->loadState(stateId); + } + return ok; +} + +void dSndPlayerMgr_c::shutdown() { + mSoundArchivePlayer.Shutdown(); + mSoundArchive.Shutdown(); +} + +void dSndPlayerMgr_c::calc() { + if (mSoundArchivePlayer.IsAvailable()) { + mSoundArchivePlayer.Update(); + } +} diff --git a/src/d/snd/d_snd_small_effect_mgr.cpp b/src/d/snd/d_snd_small_effect_mgr.cpp new file mode 100644 index 00000000..1dca1655 --- /dev/null +++ b/src/d/snd/d_snd_small_effect_mgr.cpp @@ -0,0 +1,193 @@ +#include "d/snd/d_snd_small_effect_mgr.h" + +#include "common.h" +#include "d/snd/d_snd_checkers.h" +#include "d/snd/d_snd_control_player_mgr.h" +#include "d/snd/d_snd_player_mgr.h" +#include "d/snd/d_snd_source.h" +#include "d/snd/d_snd_source_if.h" +#include "d/snd/d_snd_util.h" +#include "d/snd/d_snd_wzsound.h" +#include "nw4r/snd/snd_SeqSoundHandle.h" +#include "rvl/OS/OSFastCast.h" +#include "toBeSorted/music_mgrs.h" + +SND_DISPOSER_DEFINE(dSndSmallEffectMgr_c) + +dSndSmallEffectMgr_c::dSndSmallEffectMgr_c() : mTextboxAdvanceSound(-1), field_0x40(0), field_0x42(0), field_0x44(0) { + // probably arrays + field_0x28 = -1; + field_0x30 = 0; + field_0x2C = -1; + field_0x34 = 0; +} + +bool dSndSmallEffectMgr_c::playSound(u32 soundId) { + if (soundId >= SE_S_BUTTON_CALL_L && soundId <= SE_S_PLAY_GUIDE_BUTTON_BLINK) { + soundId = SE_S_BUTTON_CALL_L; + } else if (soundId >= SE_S_BUTTON_CALL_R && soundId <= SE_S_2_BUTTON_BLINK) { + soundId = SE_S_BUTTON_CALL_R; + } else { + switch (soundId) { + case SE_S_BOSS_KEY_TRANS: { + stopSounds(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_BOSS_KEY_TRANS_OFF, 5); + break; + } + case SE_S_BOSS_KEY_TRANS_OFF: { + stopSounds(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_BOSS_KEY_TRANS, 5); + break; + } + case SE_S_HP_GAUGE_UP: { + if (isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_HEART_PIECE_GET)) { + return false; + } + break; + } + case SE_S_HEART_PIECE_GET: { + if (isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_HP_GAUGE_UP)) { + return false; + } + break; + } + case SE_S_MAP_OPEN: + case SE_S_MENU_IN: { + stopSounds(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_HELP_OUT, 1); + break; + } + case SE_S_HELP_OUT: { + if (isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_MENU_IN) || + isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_MAP_OPEN)) { + return false; + } + break; + } + case SE_S_MENU_SELECT_TURN_PAGE_LEFT: { + if (isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_SHOP_STK_STOCK_SELECT_TURN_PAGE_LEFT)) { + return false; + } + break; + } + case SE_S_MENU_SELECT_TURN_PAGE_RIGHT: { + if (isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_SHOP_STK_STOCK_SELECT_TURN_PAGE_RIGHT)) { + return false; + } + break; + } + case SE_S_ITEM_SELECT_START: { + if (isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_BM_KEEP_ERROR)) { + soundId = SE_S_ITEM_SELECT_START_WAIT; + } + break; + } + case SE_S_SKIP: { + if (fn_80364DA0(ENEMY_SOUND_MGR)) { + fn_80365020(ENEMY_SOUND_MGR); + } + break; + } + case SE_S_WINDOW_PRESS_A: { + if (isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_IMPORTANT, SE_S_POINTER_OK)) { + return false; + } + break; + } + case SE_S_MENU_P1_HOLD_POINTER: { + stopSounds(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_MENU_P1_POINT_ITEM, 0); + break; + } + case SE_S_MENU_P1_POINT_ITEM: { + if (isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_MENU_P1_HOLD_POINTER)) { + return false; + } + break; + } + case SE_S_FIRST_PERSON_ON: + case SE_S_FIRST_PERSON_OFF: { + if (!isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_DOWSING_SELECT_START)) { + playSound(SE_S_DOWSING_SELECT_START); + } + break; + } + case SE_S_DOWSING_WAIT: + if (isPlayingSound(dSndPlayerMgr_c::PLAYER_SMALL_NORMAL, SE_S_FIRST_PERSON_ON)) { + return false; + } + break; + } + } + + return playSoundInternal(soundId); +} + +bool dSndSmallEffectMgr_c::playSoundWithPan(u32 soundId, f32 pan) { + bool ok = playSoundInternal(soundId); + if (ok) { + if (pan > 1.0f) { + pan = 1.0f; + } else if (pan < -1.0f) { + pan = -1.0f; + } + mNormalSound.SetPan(pan); + } + return ok; +} + +void dSndSmallEffectMgr_c::stopSounds(u32 playerIdx, u32 soundId, s32 fadeFrames) { + SoundStopper stopper(soundId, fadeFrames); + dSndControlPlayerMgr_c::GetInstance()->getPlayer1(playerIdx)->ForEachSound(stopper, false); +} + +void dSndSmallEffectMgr_c::stopSounds(u32 soundId, s32 fadeFrames) { + for (s32 playerId = dSndPlayerMgr_c::PLAYER_SMALL_IMPORTANT; playerId <= dSndControlPlayerMgr_c::sPlayerMax; + playerId++) { + stopSounds(playerId, soundId, fadeFrames); + } +} + +bool dSndSmallEffectMgr_c::isPlayingSound(u32 playerIdx, u32 soundId) { + bool isPlaying = false; + IsCurrentSoundIdChecker check(soundId, &isPlaying); + dSndControlPlayerMgr_c::GetInstance()->getPlayer1(playerIdx)->ForEachSound(check, false); + return isPlaying; +} + +bool dSndSmallEffectMgr_c::isPlayingSound(u32 soundId) { + for (s32 playerId = dSndPlayerMgr_c::PLAYER_SMALL_IMPORTANT; playerId <= dSndControlPlayerMgr_c::sPlayerMax; + playerId++) { + if (isPlayingSound(playerId, soundId)) { + return true; + } + } + return false; +} + +bool dSndSmallEffectMgr_c::playButtonPressSoundWhenAdvancingTextBoxes(f32 ratio) { + if (mTextboxAdvanceSound == -1) { + return false; + } + + bool ok = playSound(mTextboxAdvanceSound); + if (ok) { + s16 varValue; + f32 value = ratio * 100.0f; + OSf32tos16(&value, &varValue); + nw4r::snd::SeqSoundHandle handle(&mNormalSound); + handle.WriteVariable(10, varValue); + } + + return ok; +} + +void dSndSmallEffectMgr_c::resetButtonPressSound() { + mTextboxAdvanceSound = -1; +} + +void dSndSmallEffectMgr_c::setButtonPressSound(dSoundSource_c *source) { + resetButtonPressSound(); + if (source != nullptr) { + mTextboxAdvanceSound = dSoundSource_c::getCharacterTalkSoundId(SE_S_TALK_CHAR, source); + if (mTextboxAdvanceSound == SE_S_TALK_CHAR) { + resetButtonPressSound(); + } + } +} diff --git a/src/d/snd/d_snd_sound.cpp b/src/d/snd/d_snd_sound.cpp new file mode 100644 index 00000000..39354783 --- /dev/null +++ b/src/d/snd/d_snd_sound.cpp @@ -0,0 +1,396 @@ +#include "d/snd/d_snd_sound.h" + +#include "common.h" +#include "d/snd/d_snd_mgr.h" +#include "d/snd/d_snd_player_mgr.h" +#include "nw4r/snd/snd_SeqSoundHandle.h" +#include "nw4r/snd/snd_SoundArchive.h" +#include "nw4r/snd/snd_SoundStartable.h" +#include "nw4r/ut/ut_list.h" +#include "toBeSorted/music_mgrs.h" + +dSndSound_c::dSndSound_c() + : mPrevStartOffset(0), mIsPreparing(false), mPauseFlag(false), mIsRunning(false), mIsFadingOut(false) { + nw4r::ut::List_Init(&mList, 0x24); + + mpCtrlSeqTrackVolume = new dSndControlSoundSeqTrackVolume_c[16](); + for (int i = 0; i < 16; i++) { + mpCtrlSeqTrackVolume[i].setMask(1 << i); + } + + mpCtrlStrmTrackVolume = new dSndControlSoundStrmTrackVolume_c[3](); + // @bug should be 3, not 16 + for (int i = 0; i < 16; i++) { + mpCtrlStrmTrackVolume[i].setMask(1 << i); + } + + mLinearPitch.setControl(&mCtrlPitch); + resetControls(); +} + +dSndSound_c::~dSndSound_c() { + if (mpCtrlSeqTrackVolume != nullptr) { + delete[] mpCtrlSeqTrackVolume; + } + if (mpCtrlStrmTrackVolume != nullptr) { + delete[] mpCtrlStrmTrackVolume; + } +} + +void dSndSound_c::cancel() { + if (canCancel()) { + resetControls(); + mIsRunning = false; + mIsFadingOut = false; + mIsPreparing = false; + mPrevStartOffset = 0; + fn_80373900(FANFARE_SOUND_MGR, this); + } +} + +void dSndSound_c::resetControls() { + mCtrlVolume.reset(); + mCtrlVolume.apply(this); + mCtrlPitch.reset(); + mCtrlPitch.apply(this); + mLinearPitch.reset(); + mLinearPitch.apply(this); + mpCtrlSeqTempoRatio.reset(); + mpCtrlSeqTempoRatio.apply(this); + mPauseFlag = 0; + resetTrackVolumes(); +} + +void dSndSound_c::calc() { + if (mIsRunning && !IsAttachedSound()) { + cancel(); + } + + dSndControlSound_c *next; + dSndControlSound_c *iter = static_cast(nw4r::ut::List_GetFirst(&mList)); + while (iter != nullptr) { + next = static_cast(nw4r::ut::List_GetNext(&mList, iter)); + iter->calc(); + iter->apply(this); + if (iter->isFinished()) { + unlinkCtrl(iter); + } + iter = next; + } +} + +void dSndSound_c::fadeIn(u32 id, s32 fadeFrames) { + if (id != -1) { + if (fadeFrames != 0) { + FadeIn(fadeFrames); + } + cancel(); + mIsRunning = true; + } +} + +void dSndSound_c::stop(s32 fadeFrames) { + if (isRunning()) { + Stop(fadeFrames); + + if (fadeFrames != 0) { + mIsFadingOut = true; + } else { + cancel(); + } + } else { + if (!isPreparing()) { + cancel(); + } + } +} + +void dSndSound_c::pause(bool pauseFlag, s32 fadeFrames) { + if (!IsAttachedSound()) { + return; + } + + if ((pauseFlag && !IsPause()) || (!pauseFlag && IsPause())) { + Pause(pauseFlag, fadeFrames); + mPauseFlag = pauseFlag; + } +} + +bool dSndSound_c::isStrmSound() { + if (!IsAttachedSound()) { + return false; + } + return dSndMgr_c::GetInstance()->getArchive()->GetSoundType(GetId()) == nw4r::snd::SoundArchive::SOUND_TYPE_STRM; +} + +bool dSndSound_c::isWaveSound() { + if (!IsAttachedSound()) { + return false; + } + return dSndMgr_c::GetInstance()->getArchive()->GetSoundType(GetId()) == nw4r::snd::SoundArchive::SOUND_TYPE_WAVE; +} + +bool dSndSound_c::isSeqSound() { + if (!IsAttachedSound()) { + return false; + } + return dSndMgr_c::GetInstance()->getArchive()->GetSoundType(GetId()) == nw4r::snd::SoundArchive::SOUND_TYPE_SEQ; +} + +void dSndSound_c::linkCtrl(dSndControlSound_c *ctrl) { + if (ctrl == nullptr) { + return; + } + if (ctrl->isLinked()) { + return; + } + ctrl->setLinked(true); + nw4r::ut::List_Append(&mList, ctrl); +} + +void dSndSound_c::unlinkCtrl(dSndControlSound_c *ctrl) { + if (ctrl == nullptr) { + return; + } + if (!ctrl->isLinked()) { + return; + } + ctrl->setLinked(false); + nw4r::ut::List_Remove(&mList, ctrl); +} + +s16 dSndSound_c::readSeqTrackVariable(int varNo) { + if (!isSeqSound()) { + return -1; + } + s16 val = -1; + nw4r::snd::SeqSoundHandle handle(this); + handle.ReadVariable(varNo, &val); + return val; +} + +void dSndSound_c::writeSeqTrackVariable(int varNo, s16 value) { + if (!isSeqSound()) { + return; + } + nw4r::snd::SeqSoundHandle handle(this); + handle.WriteVariable(varNo, value); +} + +void dSndSound_c::setControlValue(dSndControlSound_c *ctrl, f32 value, s32 frames) { + ctrl->set(value, frames); + + if (ctrl->isFinished()) { + unlinkCtrl(ctrl); + } else { + linkCtrl(ctrl); + } + + ctrl->apply(this); +} + +void dSndSound_c::setVolume(f32 volume, s32 frames) { + if (IsAttachedSound()) { + setControlValue(&mCtrlVolume, volume, frames); + } +} + +void dSndSound_c::setPitchRelated(f32 pitch, s32 frames) { + if (IsAttachedSound()) { + setControlValue(&mCtrlPitch, pitch, frames); + } +} + +void dSndSound_c::setLinearPitch(f32 pitch, s32 frames) { + if (IsAttachedSound()) { + setControlValue(&mLinearPitch, pitch, frames); + } +} + +void dSndSound_c::resetTrackVolumes() { + if (mpCtrlSeqTrackVolume != nullptr) { + for (int i = 0; i < 16; i++) { + mpCtrlSeqTrackVolume[i].reset(); + mpCtrlSeqTrackVolume[i].apply(this); + } + } + + if (mpCtrlStrmTrackVolume != nullptr) { + for (int i = 0; i < 3; i++) { + mpCtrlStrmTrackVolume[i].reset(); + mpCtrlStrmTrackVolume[i].apply(this); + } + } +} + +void dSndSound_c::setTrackVolume(u32 trackFlags, f32 volume, s32 frames) { + if (trackFlags != 0 && IsAttachedSound()) { + switch (dSndMgr_c::GetInstance()->getArchive()->GetSoundType(GetId())) { + case nw4r::snd::SoundArchive::SOUND_TYPE_SEQ: { + for (int i = 0; i < 16; i++) { + if ((trackFlags & (u16)(1 << i)) != 0) { + setControlValue(&mpCtrlSeqTrackVolume[i], volume, frames); + } + } + break; + } + case nw4r::snd::SoundArchive::SOUND_TYPE_STRM: { + for (int i = 0; i < 3; i++) { + if ((trackFlags & (u16)(1 << i)) != 0) { + setControlValue(&mpCtrlStrmTrackVolume[i], volume, frames); + } + } + } + default: break; + } + } +} + +void dSndSound_c::setStrmTrackVolume(u32 trackFlags, f32 volume, s32 frames) { + if (trackFlags != 0 && IsAttachedSound()) { + switch (dSndMgr_c::GetInstance()->getArchive()->GetSoundType(GetId())) { + case nw4r::snd::SoundArchive::SOUND_TYPE_STRM: { + for (int i = 0; i < 3; i++) { + if ((trackFlags & (u16)(1 << i)) != 0) { + setControlValue(&mpCtrlStrmTrackVolume[i], volume, frames); + } + } + } + default: break; + } + } +} + +void dSndSound_c::setSingleSeqTrackVolume(u16 index, f32 volume, s32 frames) { + if (IsAttachedSound() && index < 16) { + switch (dSndMgr_c::GetInstance()->getArchive()->GetSoundType(GetId())) { + case nw4r::snd::SoundArchive::SOUND_TYPE_SEQ: { + setControlValue(&mpCtrlSeqTrackVolume[index], volume, frames); + } + default: break; + } + } +} + +void dSndSound_c::setSingleStrmTrackVolume(u16 index, f32 volume, s32 frames) { + if (IsAttachedSound() && index < 3) { + switch (dSndMgr_c::GetInstance()->getArchive()->GetSoundType(GetId())) { + case nw4r::snd::SoundArchive::SOUND_TYPE_STRM: { + setControlValue(&mpCtrlStrmTrackVolume[index], volume, frames); + } + default: break; + } + } +} + +void dSndSound_c::setEachSeqTrackVolume(u32 trackFlags, f32 frames) { + for (int i = 0; i < 16; i++) { + if ((trackFlags & (u16)(1 << i)) != 0) { + setSingleSeqTrackVolume(i, 1.0f, (u32)frames); + } else { + setSingleSeqTrackVolume(i, 0.0f, (u32)frames); + } + } +} + +void dSndSound_c::setEachStrmTrackVolume(u32 trackFlags, f32 frames) { + for (int i = 0; i < 3; i++) { + if ((trackFlags & (u16)(1 << i)) != 0) { + setSingleStrmTrackVolume(i, 1.0f, (u32)frames); + } else { + setSingleStrmTrackVolume(i, 0.0f, (u32)frames); + } + } +} + +f32 dSndSound_c::getCurrentStrmTrackVolume(u32 index) const { + if (index >= 3) { + return 0.0f; + } + return mpCtrlStrmTrackVolume[index].getCurrentValue(); +} + +void dSndSound_c::setSeqTempoRatio(f32 ratio, s32 frames) { + if (isSeqSound()) { + setControlValue(&mpCtrlSeqTempoRatio, ratio, frames); + } +} + +void dSndSound_c::setSeqTrackMute(u32 trackFlags, nw4r::snd::SeqMute mute) { + if (isSeqSound()) { + nw4r::snd::SeqSoundHandle handle(this); + handle.SetTrackMute(trackFlags, mute); + } +} + +nw4r::snd::SoundStartable::StartResult dSndSound_c::prepareSound(u32 soundId, u32 startOffset) { + if (soundId == -1) { + return nw4r::snd::SoundStartable::START_ERR_USER; + } + + if (cannotStart()) { + return nw4r::snd::SoundStartable::START_ERR_USER; + } + + if (isPreparingSoundId(soundId)) { + if (mPrevStartOffset == startOffset) { + return nw4r::snd::SoundStartable::START_ERR_USER; + } + forceStop(); + } else { + if (isPreparing()) { + forceStop(); + } else { + fn_80372920(FANFARE_SOUND_MGR); + } + } + + nw4r::snd::SoundStartable::StartResult res; + if (startOffset == 0) { + res = dSndMgr_c::GetInstance()->getPlayer()->detail_PrepareSound(this, soundId, nullptr); + } else { + nw4r::snd::SoundStartable::StartInfo info; + info.enableFlag |= nw4r::snd::SoundStartable::StartInfo::ENABLE_START_OFFSET; + info.startOffsetType = nw4r::snd::SoundStartable::StartInfo::START_OFFSET_TYPE_MILLISEC; + info.startOffset = startOffset; + res = dSndMgr_c::GetInstance()->getPlayer()->detail_PrepareSound(this, soundId, &info); + } + + if (res == nw4r::snd::SoundStartable::START_SUCCESS) { + onPreparing(soundId, startOffset); + } else { + cancel(); + } + + return res; +} + +nw4r::snd::SoundStartable::StartResult dSndSound_c::prepareSound(const char *label, u32 startOffset) { + u32 id = dSndPlayerMgr_c::GetInstance()->convertLabelStringToSoundId(label); + return prepareSound(id, startOffset); +} + +void dSndSound_c::onPreparing(u32 soundId, u32 startOffset) { + if (soundId != -1) { + cancel(); + mPrevStartOffset = startOffset; + mIsPreparing = true; + fn_803738B0(FANFARE_SOUND_MGR, this); + } +} + +void dSndSound_c::forceStop() { + cancel(); + Stop(0); +} + +// Might be a separate file +void dSndControl_c::configure(f32 value, f32 min, f32 max) { + mResetValue = value; + mMin = min; + mMax = max; + mCurrValue = value; + mStartValue = value; + mTargetValue = value; + reset(); +} diff --git a/src/d/snd/d_snd_source.cpp b/src/d/snd/d_snd_source.cpp new file mode 100644 index 00000000..5ed288b8 --- /dev/null +++ b/src/d/snd/d_snd_source.cpp @@ -0,0 +1,129 @@ +#include "d/snd/d_snd_source.h" + +#include "common.h" +#include "d/snd/d_snd_3d_actor.h" +#include "d/snd/d_snd_3d_manager.h" +#include "d/snd/d_snd_mgr.h" +#include "d/snd/d_snd_player_mgr.h" +#include "d/snd/d_snd_source_group.h" +#include "d/snd/d_snd_source_mgr.h" +#include "nw4r/snd/snd_SoundStartable.h" +#include "nw4r/ut/ut_list.h" +#include "sized_string.h" + +struct d_snd_mgr_unk_6_sinit { + d_snd_mgr_unk_6_sinit() : field_0x00(0), field_0x04(0.0f) {} + + u32 field_0x00; + f32 field_0x04; +}; + +d_snd_mgr_unk_6_sinit d_snd_mgr_unk_6_sinit_instance; + +const char *help_i_need_data() { + return "%s_%s_%d"; +} + +dSoundSource_c::dSoundSource_c(u8 sourceType, dAcBase_c *player, const char *name, dSndSourceGroup_c *pOwnerGroup) + : dSnd3DActor_c(pOwnerGroup->getAmbientParam(), sourceType), + mpName(name), + field_0x0F4(0), + mpPlayer(player), + mSourceType(sourceType), + field_0x0FE(0), + field_0x0FF(0), + field_0x100(0), + field_0x101(0), + field_0x102(0), + field_0x104(0), + field_0x108(0), + field_0x10C(0), + field_0x11C(0), + mpOwnerGroup(pOwnerGroup), + field_0x154(0), + field_0x158(-1), + field_0x15A(-1) { + mSourceCategory = dSndSourceMgr_c::getSourceCategoryForSourceType(sourceType, name); + // TODO: Offsetof + nw4r::ut::List_Init(&field_0x110, 0xEC); + nw4r::ut::List_Init(&field_0x120, 0x04); + nw4r::ut::List_Init(&field_0x12C, 0x04); + pOwnerGroup->registerSource(this); +} + +dSoundSource_c::~dSoundSource_c() { + SetUserParam(0); + vt_0x44(); + d_s_vt_0x1BC(); + dSndSourceMgr_c::GetInstance()->unregisterSource(this); + mpOwnerGroup->unregisterSource(this); +} + +const nw4r::math::VEC3 &dSoundSource_c::getListenerPosition() const { + return dSnd3DManager_c::GetInstance()->getSndListenerPos(); +} + +bool dSoundSource_c::hasPlayingSounds() const { + return dSnd3DActor_c::hasPlayingSounds(); +} + +bool dSoundSource_c::isPlayingSound(u32 soundId) { + return dSnd3DActor_c::isPlayingSound(soundId); +} + +bool dSoundSource_c::isPlayingSound(const char *soundId) { + return isPlayingSound(soundLabelToSoundId(soundId)); +} + +void dSoundSource_c::d_vt_0x38(bool flag, int fadeFrames) { + if (flag == 0) { + PauseAllSound(flag, fadeFrames); + d_s_vt_0x1C4(flag, fadeFrames); + a_field_0x80 = 0; + } else if (a_field_0x7E == 0) { + PauseAllSound(flag, fadeFrames); + d_s_vt_0x1C4(flag, fadeFrames); + a_field_0x80 = 1; + } +} + +nw4r::snd::SoundStartable::StartResult +dSoundSource_c::SetupSound(nw4r::snd::SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void *) { + // TODO + return START_SUCCESS; +} + +void dSoundSource_c::d_vt_0x58() { + // noop +} + +void dSoundSource_c::d_vt_0x5C() { + // noop +} + +u32 dSoundSource_c::getCharacterTalkSoundId(u32 baseSoundId, dSoundSource_c *source) { + if (baseSoundId != -1 && source != nullptr) { + SizedString<64> label; + + // maybe an inline + const char *baseLabel = nullptr; + if (dSndMgr_c::GetInstance()->getArchive() != nullptr) { + baseLabel = dSndMgr_c::GetInstance()->getArchive()->GetSoundLabelString(baseSoundId); + } + + const char *charLabel = source->getName(); + label.sprintf("%s_%s", baseLabel, charLabel); + u32 newLabel = dSndPlayerMgr_c::GetInstance()->convertLabelStringToSoundId(label); + if (newLabel != -1) { + return newLabel; + } + } + return baseSoundId; +} + +u32 dSoundSource_c::getRemoConSoundVariant(u32 soundId) const { + const char *label = soundIdToSoundLabel(soundId); + SizedString<64> str; + str.sprintf("%s_RC", label); + return soundLabelToSoundId(str); +} diff --git a/src/d/snd/d_snd_source_group.cpp b/src/d/snd/d_snd_source_group.cpp new file mode 100644 index 00000000..d973deaa --- /dev/null +++ b/src/d/snd/d_snd_source_group.cpp @@ -0,0 +1,170 @@ + +#include "d/snd/d_snd_source_group.h" + +#include "common.h" +#include "d/snd/d_snd_source.h" +#include "d/snd/d_snd_source_enums.h" +#include "nw4r/ut/ut_list.h" + +#include + +extern "C" bool isInStage(const char *stageName); + +void dSndSourceGroup_c::set(s32 sourceType, const char *name) { + resetSoundSourceParam(); + bool assignedParam = false; + + switch (mSourceCategory) { + case SND_SOURCE_CATEGORY_PLAYER: { + assignedParam = true; + mParam.field_0x10 = INFINITY; + break; + } + case SND_SOURCE_CATEGORY_EQUIPMENT: + if (sourceType == SND_SOURCE_ARROW) { + assignedParam = true; + mParam.field_0x00 = 1500.0f; + mParam.field_0x10 = INFINITY; + } + break; + } + + if (!assignedParam && (sourceType == SND_SOURCE_KENSEI || sourceType == SND_SOURCE_58)) { + assignedParam = true; + mParam.field_0x10 = INFINITY; + } + + if (!assignedParam) { + assignedParam = setParamFromName(name); + } + + if (!assignedParam) { + switch (sourceType) { + case SND_SOURCE_NPC_NRM: { + mParam.field_0x00 = 300.0f; + mParam.field_0x04 = 800.0; + mParam.field_0x10 = 2200.0; + break; + } + case SND_SOURCE_NPC_48: { + if (isInStage("F401")) { + mParam.field_0x00 = 500.0f; + mParam.field_0x04 = 4000.0; + } else if (isInStage("F402")) { + mParam.field_0x00 = 400.0f; + mParam.field_0x04 = 3500.0; + } else { + mParam.field_0x00 = 300.0f; + mParam.field_0x04 = 800.0; + mParam.field_0x10 = 2200.0; + } + + mParam.field_0x10 = INFINITY; + } + } + } +} + +void dSndSourceGroup_c::resetSoundSourceParam() { + mParam.reset(); +} + +dSndSourceGroup_c::dSndSourceGroup_c() + : mSubtype(0), + field_0x1C(0), + field_0x1D(0), + mName(""), + field_0x40(0), + mpCachedClosestSourceToListener(nullptr), + mpCachedClosestSourceToPlayer(nullptr), + mCalculatedClosestToListener(false), + mCalculatedClosestToPlayer(false) { + // TODO offsetof + nw4r::ut::List_Init(&mSourceList, 0x138); + resetSoundSourceParam(); +} + +dSndSourceGroup_c::~dSndSourceGroup_c() { + clearList(); +} + +void dSndSourceGroup_c::calc() { + // Reset freshness flags, computed on-demand + mCalculatedClosestToPlayer = false; + mCalculatedClosestToListener = false; +} + +s32 dSndSourceGroup_c::getNumSources() const { + return nw4r::ut::List_GetSize(&mSourceList); +} + +void dSndSourceGroup_c::registerSource(dSoundSource_c *source) { + if (source != nullptr) { + nw4r::ut::List_Append(&mSourceList, source); + } +} + +void dSndSourceGroup_c::unregisterSource(dSoundSource_c *source) { + if (source != nullptr) { + nw4r::ut::List_Remove(&mSourceList, source); + } +} + +void dSndSourceGroup_c::clearList() { + dSoundSource_c *source = static_cast(nw4r::ut::List_GetFirst(&mSourceList)); + while (source != nullptr) { + nw4r::ut::List_Remove(&mSourceList, source); + source = static_cast(nw4r::ut::List_GetFirst(&mSourceList)); + } +} + +dSoundSource_c *dSndSourceGroup_c::getSourceClosestToListener() { + if (mCalculatedClosestToListener) { + return mpCachedClosestSourceToListener; + } + + mpCachedClosestSourceToListener = nullptr; + f32 closest = INFINITY; + for (dSoundSource_c *source = static_cast(nw4r::ut::List_GetFirst(&mSourceList)); + source != nullptr; source = static_cast(nw4r::ut::List_GetNext(&mSourceList, source))) { + if (source->getActorType() != SND_SOURCE_PLAYER_HEAD && source->getActorType() != SND_SOURCE_NPC_48) { + f32 dist = source->getDistanceToListener(); + if (dist < closest) { + closest = dist; + mpCachedClosestSourceToListener = source; + } + } + } + mCalculatedClosestToListener = true; + return mpCachedClosestSourceToListener; +} + +dSoundSource_c *dSndSourceGroup_c::getSourceClosestToPlayer() { + if (mCalculatedClosestToPlayer) { + return mpCachedClosestSourceToPlayer; + } + + if ((s32)nw4r::ut::List_GetSize(&mSourceList) <= 1) { + return static_cast(nw4r::ut::List_GetFirst(&mSourceList)); + } + + mpCachedClosestSourceToPlayer = nullptr; + f32 closest = INFINITY; + for (dSoundSource_c *source = static_cast(nw4r::ut::List_GetFirst(&mSourceList)); + source != nullptr; source = static_cast(nw4r::ut::List_GetNext(&mSourceList, source))) { + if (source->getActorType() != 1 && source->getActorType() != 48) { + f32 dist = source->getDistanceToPlayer(); + if (dist < closest) { + closest = dist; + mpCachedClosestSourceToPlayer = source; + } + } + } + mCalculatedClosestToPlayer = true; + return mpCachedClosestSourceToPlayer; +} + +bool dSndSourceGroup_c::setParamFromName(const char*) { + // TODO + return false; +} diff --git a/src/d/snd/d_snd_source_mgr.cpp b/src/d/snd/d_snd_source_mgr.cpp new file mode 100644 index 00000000..0e5eb9ae --- /dev/null +++ b/src/d/snd/d_snd_source_mgr.cpp @@ -0,0 +1,182 @@ +#include "d/snd/d_snd_source_mgr.h" + +#include "common.h" +#include "d/snd/d_snd_source.h" +#include "d/snd/d_snd_source_enums.h" +#include "nw4r/ut/ut_list.h" + +#include + +s32 dSndSourceMgr_c::getSourceCategoryForSourceType(s32 sourceType, const char *name) { + // This might be a full-on switch statement but I don't want to write out + // all the unknown entries yet and this matches anyway + + if (sourceType >= SND_SOURCE_PLAYER && sourceType <= SND_SOURCE_PLAYER_HEAD) { + return SND_SOURCE_CATEGORY_PLAYER; + } + + if (sourceType >= SND_SOURCE_NET && sourceType <= SND_SOURCE_HOOKSHOT) { + return SND_SOURCE_CATEGORY_EQUIPMENT; + } + + if (sourceType >= SND_SOURCE_ENEMY_10 && sourceType <= SND_SOURCE_ENEMY_31) { + return SND_SOURCE_CATEGORY_ENEMY; + } + + if (sourceType >= SND_SOURCE_OBJECT && sourceType <= SND_SOURCE_OBJECT_42) { + return SND_SOURCE_CATEGORY_OBJECT; + } + + if (sourceType >= SND_SOURCE_NPC_43 && sourceType <= SND_SOURCE_NPC_DRAGON) { + return SND_SOURCE_CATEGORY_NPC; + } + + if (sourceType == SND_SOURCE_TG_SOUND) { + return SND_SOURCE_CATEGORY_TG_SOUND; + } + + if (sourceType >= SND_SOURCE_54 && sourceType <= SND_SOURCE_57) { + return SND_SOURCE_CATEGORY_6; + } + + switch (sourceType) { + case SND_SOURCE_58: + return SND_SOURCE_CATEGORY_7; + case SND_SOURCE_59: + return SND_SOURCE_CATEGORY_9; + default: + return -1; + } +} + +SND_DISPOSER_DEFINE(dSndSourceMgr_c); + +dSndSourceMgr_c::dSndSourceMgr_c() + : field_0x0010(0), + field_0x0011(0), + field_0x0012(0), + field_0x0013(0), + field_0x3860(0), + field_0x3864(0), + field_0x3868(0), + field_0x386C(INFINITY), + mpPlayerSource(nullptr), + mpKenseiSource(nullptr), + mpBoomerangSource(nullptr), + mpTBoatSource(nullptr), + field_0x3880(nullptr), + field_0x3884(nullptr) { + // TODO offsetof + nw4r::ut::List_Init(&mGroupList1, 0); + nw4r::ut::List_Init(&mGroupList2, 0); + + // TODO figure out what these are for + nw4r::ut::List_Init(&mGroupList3, 8); + nw4r::ut::List_Init(&mAllSources, 0xE8); + nw4r::ut::List_Init(&field_0x3848, 0x15C); + nw4r::ut::List_Init(&field_0x3854, 0x160); + + mpDefaultGroup = new dSndSourceGroup_c(-1, "Default", 0, 0); + + for (dSndSourceGroup_c *group = &mGroups[0]; group < &mGroups[NUM_GROUPS]; group++) { + nw4r::ut::List_Append(&mGroupList2, group); + } +} + +void dSndSourceMgr_c::registerSource(dSoundSource_c *source) { + if (source != nullptr) { + nw4r::ut::List_Append(&mAllSources, source); + switch (source->getCategory()) { + case SND_SOURCE_CATEGORY_PLAYER: { + if (source->getActorType() == SND_SOURCE_PLAYER && mpPlayerSource == nullptr) { + mpPlayerSource = source; + } + break; + } + case SND_SOURCE_CATEGORY_EQUIPMENT: { + if (source->getActorType() == SND_SOURCE_BOOMERANG) { + mpBoomerangSource = source; + } + break; + } + case SND_SOURCE_CATEGORY_ENEMY: { + if (isCertainEnemyType(source)) { + nw4r::ut::List_Append(&field_0x3848, source); + } + break; + } + case SND_SOURCE_CATEGORY_6: { + nw4r::ut::List_Append(&field_0x3854, source); + break; + } + case SND_SOURCE_CATEGORY_OBJECT: { + if (source->isName("TBoat") && mpTBoatSource == nullptr) { + mpTBoatSource = source; + } + break; + } + case SND_SOURCE_CATEGORY_NPC: { + if (source->getActorType() == SND_SOURCE_KENSEI) { + mpKenseiSource = source; + } + break; + } + } + } +} + +void dSndSourceMgr_c::unregisterSource(dSoundSource_c *source) { + if (source != nullptr) { + removeSourceFromList(source, &mAllSources); + removeSourceFromList(source, &field_0x3848); + removeSourceFromList(source, &field_0x3854); + if (source == mpPlayerSource) { + mpPlayerSource = nullptr; + } else if (source == mpKenseiSource) { + mpKenseiSource = nullptr; + } else if (source == mpBoomerangSource) { + mpBoomerangSource = nullptr; + } + + if (mpTBoatSource == source) { + mpTBoatSource = nullptr; + } + } +} + +void dSndSourceMgr_c::removeSourceFromList(dSoundSource_c *source, nw4r::ut::List *list) { + if (source != nullptr && list != nullptr) { + // This removal code appears to be needlessly defensive + dSoundSource_c *sourceIter = static_cast(nw4r::ut::List_GetFirst(list)); + while (sourceIter != nullptr) { + if (field_0x3880 == source) { + // why in here???? + field_0x3880 = nullptr; + } + + if (sourceIter == source) { + nw4r::ut::List_Remove(list, sourceIter); + sourceIter = nullptr; + } else { + sourceIter = static_cast(nw4r::ut::List_GetNext(list, sourceIter)); + } + } + } +} + +void dSndSourceMgr_c::clearSourceLists() { + clearSourceList(&mAllSources); + clearSourceList(&field_0x3848); + clearSourceList(&field_0x3854); + mpPlayerSource = nullptr; +} + +void dSndSourceMgr_c::clearSourceList(nw4r::ut::List *list) { + if (list != nullptr) { + dSoundSource_c *sourceIter = static_cast(nw4r::ut::List_GetFirst(list)); + while (sourceIter != nullptr) { + nw4r::ut::List_Remove(list, sourceIter); + sourceIter = static_cast(nw4r::ut::List_GetFirst(list)); + } + } +} diff --git a/src/d/snd/mgr/d_snd_mgr_unk_11.cpp b/src/d/snd/mgr/d_snd_mgr_unk_11.cpp new file mode 100644 index 00000000..5ad3cddc --- /dev/null +++ b/src/d/snd/mgr/d_snd_mgr_unk_11.cpp @@ -0,0 +1,36 @@ + +#include "d/snd/d_snd_util.h" + +class SndClass80399a40 { +public: + SndClass80399a40(); + virtual ~SndClass80399a40() {} + + /* 0x04 */ u8 _0x04[0x18 - 0x04]; +}; + +// This is a test for SndMgrDisposer, since this +// class has the disposer at 0x18, which is interesting + +class SndMgr80399c20; + +extern template class SndMgrDisposer; + +class SndMgr80399c20 : SndClass80399a40 { +public: + SndMgrDisposer *GetDisposer() { + return &mDisposer; + } + + static SndMgr80399c20 *GetInstance() { + return sInstance; + } + + static SndMgr80399c20 *sInstance; + static SndMgrDisposer *sDisposer; + +private: + SndMgrDisposer mDisposer; +}; + +template class SndMgrDisposer; diff --git a/src/egg/math/eggQuat.cpp b/src/egg/math/eggQuat.cpp index 0ccb90b1..93f06377 100644 --- a/src/egg/math/eggQuat.cpp +++ b/src/egg/math/eggQuat.cpp @@ -96,7 +96,7 @@ void Quatf::normalise() { } /* 8049b500 */ -Quatf Quatf::conjugate() { +Quatf Quatf::conjugate() const { Quatf q; q.w = w; q.v = -1.0f * v; @@ -211,7 +211,7 @@ void Quatf::limitSlerpTo(const Quatf &q2, f32 t, f32 t2, Quatf &out) const { } /* 8049bbb0 */ -void Quatf::makeVectorRotation(Vector3f &from, Vector3f &to) { +void Quatf::makeVectorRotation(const Vector3f &from, const Vector3f &to) { Vector3f cross = from.cross(to); f32 t0 = (from.dot(to) + 1) * 2.0f; diff --git a/src/nw4r/snd/snd_AnimSound.cpp b/src/nw4r/snd/snd_AnimSound.cpp index de514c8b..91f80368 100644 --- a/src/nw4r/snd/snd_AnimSound.cpp +++ b/src/nw4r/snd/snd_AnimSound.cpp @@ -1,10 +1,488 @@ /* Only implemented to the extent necessary to match data sections. */ +#include "nw4r/snd/snd_AnimSound.h" + #include "common.h" // nullptr -#include +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_SeqSound.h" +#include "nw4r/snd/snd_SeqSoundHandle.h" +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/snd/snd_SoundStartable.h" -#include "nw4r/snd/snd_Util.h" +#include -DECOMP_FORCE(nw4r::snd::detail::Util::GetDataRefAddress0( - *static_cast const *>(nullptr), - nullptr)); +namespace nw4r { +namespace snd { +namespace detail { + +AnimSoundImpl::AnimSoundImpl(SoundStartable &startable, AnimEventPlayer *player, int numSounds) + : mStartable(startable), + mpSounds(player), + mNumSounds(numSounds), + field_0x0C(0.0f), + mIsActive(false), + field_0x19(0), + field_0x1A(0), + field_0x1C(0), + mCallback(NULL), + field_0x28(1.0f) {} + +AnimSoundImpl::~AnimSoundImpl() { + Shutdown(); +} + +bool AnimSoundImpl::Setup(const void *data) { + Shutdown(); + if (!mReader.Setup(data)) { + return false; + } + + field_0x19 = 1; + mIsActive = true; + field_0x0C = 0.0f; + field_0x1C = 0; + return true; +} + +void AnimSoundImpl::Shutdown() { + if (mIsActive) { + for (int i = 0; i < mNumSounds; i++) { + if (mpSounds[i].GetHandle()->IsAttachedSound() && mpSounds[i].IsRunning()) { + mpSounds[i].GetHandle()->Stop(0); + } + } + + mReader.Shutdown(); + mIsActive = false; + } +} + +void AnimSoundImpl::ResetFrame(f32 f, int i) { + field_0x0C = f; + field_0x1C = i; + field_0x1A = 1; + field_0x19 = 0; +} + +void AnimSoundImpl::UpdateFrame(f32 frame, PlayDirection dir) { + for (int i = 0; i < mNumSounds; i++) { + mpSounds[i].UpdateFrame(); + } + + if (field_0x19) { + if (dir == FORWARD) { + ResetFrame(0.0f, 0); + } else { + u32 duration = mReader.GetAnimDuration(); + ResetFrame(duration - 1.0f, 0); + } + field_0x19 = false; + } + + mVariableValue = (frame - field_0x0C) / field_0x28; + if (dir == FORWARD) { + UpdateForward(frame); + } else { + UpdateBackward(frame); + } + field_0x0C = frame; + field_0x1A = false; +} + +void AnimSoundImpl::UpdateForward(f32 frame) { + s32 duration = std::floorf(field_0x0C); + s32 iFrame = std::floorf(frame); + + if (field_0x1A && field_0x0C == duration) { + duration -= 1; + } + + if (duration == iFrame) { + return; + } + + s32 loopFrame = duration + 1; + while (true) { + if (loopFrame == mReader.GetAnimDuration()) { + loopFrame -= mReader.GetAnimDuration(); + field_0x1C++; + } + + UpdateOneFrame(loopFrame, FORWARD); + + if (loopFrame == iFrame) { + break; + } + loopFrame++; + } +} + +void AnimSoundImpl::UpdateBackward(f32 frame) { + s32 duration = std::ceilf(field_0x0C); + s32 iFrame = std::ceilf(frame); + + if (duration >= mReader.GetAnimDuration()) { + duration -= mReader.GetAnimDuration(); + } + + if (iFrame >= mReader.GetAnimDuration()) { + iFrame -= mReader.GetAnimDuration(); + } + + if (field_0x1A && field_0x0C == duration) { + duration += 1; + } + + if (duration == iFrame) { + return; + } + + s32 loopFrame = duration - 1; + while (true) { + if (loopFrame == -1) { + loopFrame += mReader.GetAnimDuration(); + field_0x1C--; + } + + UpdateOneFrame(loopFrame, BACKWARD); + + if (loopFrame == iFrame) { + break; + } + loopFrame--; + } +} + +void AnimSoundImpl::UpdateOneFrame(s32 duration, PlayDirection direction) { + for (u32 eventIdx = 0; eventIdx < mReader.GetEventCount(); eventIdx++) { + const AnimEventRef *ref = mReader.GetEventRef(eventIdx); + if (ref == NULL) { + continue; + } + if (IsPlayableLoopCount(ref->mInfo)) { + if ((ref->mInfo.flags) & 1) { + UpdateTrigger(ref, duration, direction); + } else { + if (direction == FORWARD) { + UpdateForwardRange(ref, duration); + } else { + UpdateBackwardRange(ref, duration); + } + } + } + } +} + +void AnimSoundImpl::UpdateTrigger(const AnimEventRef *ref, s32 frame, PlayDirection direction) { + const AnimEvent *event = mReader.GetEvent(ref); + if (event == NULL) { + return; + } + + if (ref->mInfo.flags & 4) { + return; + } + + if (!event->MatchesDirection(direction)) { + return; + } + + if ((ref->mInfo.flags & 2)) { + if (ref->mInfo.field_0x00 == frame) { + StopEvent(event); + if (mCallback != NULL) { + (mCallback)(0, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + StartEvent(event, true); + } + } else { + if (ref->mInfo.field_0x00 == frame) { + StopEvent(event); + if (mCallback != NULL) { + (mCallback)(0, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + StartEvent(event, true); + } + + s32 u; + if (direction == FORWARD) { + u = ref->mInfo.field_0x04; + } else { + u = ut::Max(ref->mInfo.field_0x00 * 2 - ref->mInfo.field_0x04, 0); + } + + if (u == frame) { + if (mCallback != NULL) { + (mCallback)(1, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + StopEvent(event); + } + } +} + +void AnimSoundImpl::UpdateForwardRange(const AnimEventRef *ref, s32 frame) { + const AnimEvent *event = mReader.GetEvent(ref); + if (event == NULL) { + return; + } + + if (ref->mInfo.flags & 4 && ref->mInfo.flags & 2) { + HoldEvent(event, true); + return; + } + + if (ref->mInfo.flags & 4) { + if (ref->mInfo.field_0x04 == frame && mCallback != NULL) { + (mCallback)(3, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + if (field_0x1C < ref->mInfo.field_0x09) { + HoldEvent(event, true); + } else if (field_0x1C == ref->mInfo.field_0x09) { + if (frame < ref->mInfo.field_0x04) { + HoldEvent(event, true); + } else { + StopEvent(event); + } + } + } else if ((ref->mInfo.flags & 2)) { + if (ref->mInfo.field_0x00 == frame && mCallback != NULL) { + (mCallback)(2, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + if (field_0x1C > ref->mInfo.field_0x09) { + HoldEvent(event, true); + } else if (field_0x1C == ref->mInfo.field_0x09 && ref->mInfo.field_0x00 <= frame) { + HoldEvent(event, true); + } + } else { + if (ref->mInfo.field_0x00 == frame && mCallback != NULL) { + (mCallback)(2, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + if (ref->mInfo.field_0x04 == frame && mCallback != NULL) { + (mCallback)(3, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + if (ref->mInfo.field_0x00 <= frame && frame < ref->mInfo.field_0x04) { + HoldEvent(event, true); + } else { + StopEvent(event); + } + } +} + +void AnimSoundImpl::UpdateBackwardRange(const AnimEventRef *ref, s32 frame) { + const AnimEvent *event = mReader.GetEvent(ref); + if (event == NULL) { + return; + } + + if (ref->mInfo.flags & 4 && ref->mInfo.flags & 2) { + HoldEvent(event, true); + return; + } + + if (ref->mInfo.flags & 4) { + if (ref->mInfo.field_0x04 == frame && mCallback != NULL) { + (mCallback)(2, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + if (field_0x1C < ref->mInfo.field_0x09) { + HoldEvent(event, true); + } else if (field_0x1C == ref->mInfo.field_0x09 && frame <= ref->mInfo.field_0x04) { + HoldEvent(event, true); + } + } else if ((ref->mInfo.flags & 2)) { + if (ref->mInfo.field_0x00 == frame && mCallback != NULL) { + (mCallback)(3, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + if (field_0x1C > ref->mInfo.field_0x09) { + HoldEvent(event, true); + } else if (field_0x1C == ref->mInfo.field_0x09) { + if (ref->mInfo.field_0x00 < frame) { + HoldEvent(event, true); + } else { + StopEvent(event); + } + } + } else { + if (ref->mInfo.field_0x00 == frame && mCallback != NULL) { + (mCallback)(3, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + if (ref->mInfo.field_0x04 == frame && mCallback != NULL) { + (mCallback)(2, frame, event->GetSoundLabel(), event->field_0x1C, field_0x24); + } + if (ref->mInfo.field_0x00 < frame && frame <= ref->mInfo.field_0x04) { + HoldEvent(event, true); + } else { + StopEvent(event); + } + } +} + +void AnimSoundImpl::StartEvent(const AnimEvent *event, bool b) { + int leastPriority = 0x80; + int leastPriorityIdx = -1; + int i = 0; + for (; i < mNumSounds; i++) { + if (!mpSounds[i].IsAttachedSound()) { + break; + } + int priority = mpSounds[i].GetPriority(); + if (leastPriority > priority) { + leastPriorityIdx = i; + leastPriority = priority; + } + } + + if (i == mNumSounds) { + mpSounds[leastPriorityIdx].ForceStop(); + i = leastPriorityIdx; + } + + mpSounds[i].StartEvent(event, &mStartable, b); + + u32 varNo = 0; + if (event->GetVarNo(&varNo)) { + mpSounds[i].SetVariable(event, varNo, mVariableValue); + } +} + +void AnimSoundImpl::HoldEvent(const AnimEvent *event, bool b) { + int leastPriority = 0x80; + int leastPriorityIdx = -1; + int i = 0; + for (; i < mNumSounds; i++) { + if (mpSounds[i].IsCurrentEvent(event)) { + return; + } + if (!mpSounds[i].IsAttachedSound()) { + leastPriorityIdx = i; + leastPriority = -1; + } else { + int priority = mpSounds[i].GetPriority(); + if (leastPriority > priority) { + leastPriorityIdx = i; + leastPriority = priority; + } + } + } + + if (i == mNumSounds) { + mpSounds[leastPriorityIdx].ForceStop(); + i = leastPriorityIdx; + } + + mpSounds[i].HoldEvent(event, &mStartable, b); + + u32 varNo = 0; + if (event->GetVarNo(&varNo)) { + mpSounds[i].SetVariable(event, varNo, mVariableValue); + } +} + +void AnimSoundImpl::StopEvent(const AnimEvent *event) { + for (int i = 0; i < mNumSounds; i++) { + mpSounds[i].StopEvent(event); + } +} + +bool AnimSoundImpl::IsPlayableLoopCount(const nw4r::snd::detail::AnimEventFrameInfo &ref) { + if (!(ref.flags & 1) && (ref.flags & 4 || ref.flags & 2)) { + return true; + } + int i1 = ut::Max((int)ref.field_0x09, 0); + int i2 = ut::Abs(field_0x1C); + if (ref.field_0x0A == 0) { + if (i2 < i1) { + return false; + } + } else { + if (i2 < i1) { + return false; + } + if ((i2 - i1) % ref.field_0x0A != 0) { + return false; + } + } + + return true; +} + +void AnimEventPlayer::SetVolumePitch(const AnimEvent *event, bool b) { + if (event->volume < 128) { + SetVolume(event->volume / 128.0f); + } + if (event->pitch != 1.0f) { + SetPitch(event->pitch); + } + + mpEvent = event; + if (b) { + b = !event->ShouldPreventStart(); + } + mIsRunning = b; +} + +void AnimEventPlayer::SetVariable(const AnimEvent *event, u32 varNo, f32 f) { + if (varNo < 16) { + if (GetHandle()->IsAttachedSound()) { + SeqSoundHandle handle(GetHandle()); + int iVal = f * 100.0f; + handle.WriteVariable(varNo, ut::Clamp(iVal, -0x8000, 0x7FFF)); + } + } else if (varNo < 32) { + int iVal = f * 100.0f; + SeqSound::WriteGlobalVariable(varNo - 16, ut::Clamp(iVal, -0x8000, 0x7FFF)); + } +} + +AnimEventPlayer::AnimEventPlayer() : mpEvent(NULL), mIsRunning(false) {} + +AnimEventPlayer::~AnimEventPlayer() { + if (mHandle.IsAttachedSound() && IsRunning()) { + mHandle.Stop(0); + } +} + +void AnimEventPlayer::StartEvent(const AnimEvent *event, SoundStartable *startable, bool b) { + if (event->soundId == 0xFFFFFFFF) { + if (!startable->StartSound(GetHandle(), event->GetSoundLabel())) { + return; + } + } else { + if (!startable->StartSound(GetHandle(), event->soundId)) { + return; + } + } + + SetVolumePitch(event, b); +} + +void AnimEventPlayer::HoldEvent(const AnimEvent *event, SoundStartable *startable, bool b) { + if (event->soundId == 0xFFFFFFFF) { + if (!startable->HoldSound(GetHandle(), event->GetSoundLabel())) { + return; + } + } else { + if (!startable->HoldSound(GetHandle(), event->soundId)) { + return; + } + } + + GetHandle()->detail_GetAttachedSound()->SetAutoStopCounter(0); + SetVolumePitch(event, b); +} + +void AnimEventPlayer::ForceStop() { + if (IsAttachedSound()) { + mHandle.detail_GetAttachedSound()->Stop(0); + } + mpEvent = 0; +} + +void AnimEventPlayer::UpdateFrame() { + if (!mHandle.IsAttachedSound()) { + mpEvent = 0; + } +} + +} // namespace detail +} // namespace snd +} // namespace nw4r diff --git a/src/nw4r/snd/snd_AnimSoundReader.cpp b/src/nw4r/snd/snd_AnimSoundReader.cpp new file mode 100644 index 00000000..a003139d --- /dev/null +++ b/src/nw4r/snd/snd_AnimSoundReader.cpp @@ -0,0 +1,74 @@ +/* Only implemented to the extent necessary to match data sections. */ + +#include "nw4r/snd/snd_AnimSound.h" + +#include "common.h" // nullptr +#include "nw4r/snd/snd_Util.h" +#include "nw4r/ut/ut_binaryFileFormat.h" + +namespace nw4r { +namespace snd { +namespace detail { + +bool IsValidFileHeader(const void *data) { + ut::BinaryFileHeader const *fileHeader = static_cast(data); + + if (fileHeader->signature != AnimSoundFile::SIGNATURE_FILE) { + return false; + } + + if (fileHeader->version < AnimSoundFile::FILE_VERSION) { + return false; + } + + if (fileHeader->version > AnimSoundFile::FILE_VERSION) { + return false; + } + + return true; +} + +AnimSoundFileReader::AnimSoundFileReader() : mpHeader(NULL) {} + +bool AnimSoundFileReader::Setup(const void *buf) { + if (!IsValidFileHeader(buf)) { + return false; + } + mpHeader = static_cast(buf); + mpBlock = static_cast(ut::AddOffsetToPtr(buf, mpHeader->blockOffset)); + return true; +} + +void AnimSoundFileReader::Shutdown() { + mpHeader = NULL; + mpBlock = NULL; +} + +u32 AnimSoundFileReader::GetEventCount() const { + const AnimSoundFile::EventTable *event = GetEventTable(); + return event->eventRef.count; +} + +const AnimEventRef *AnimSoundFileReader::GetEventRef(u32 id) const { + const AnimSoundFile::EventTable *event = GetEventTable(); + return &event->eventRef.item[id]; +} + +const AnimSoundFile::EventTable *AnimSoundFileReader::GetEventTable() const { + if (mpBlock == NULL) { + return NULL; + } + return Util::GetDataRefAddress0(mpBlock->eventTable, &mpBlock->duration); +} + +const AnimEvent *AnimSoundFileReader::GetEvent(const AnimEventRef *ref) const { + if (ref == NULL) { + return NULL; + } + const AnimSoundFile::EventTable *event = GetEventTable(); // unused + return Util::GetDataRefAddress0(ref->event, &mpBlock->duration); +} + +} // namespace detail +} // namespace snd +} // namespace nw4r diff --git a/src/nw4r/snd/snd_AxManager.cpp b/src/nw4r/snd/snd_AxManager.cpp index 1cb2c4b1..1a944bac 100644 --- a/src/nw4r/snd/snd_AxManager.cpp +++ b/src/nw4r/snd/snd_AxManager.cpp @@ -68,7 +68,8 @@ AxManager::AxManager() : mInitialized (false), mUpdateVoicePrioFlag (true), mOldAidCallback (nullptr), - mResetReadyCounter (-1) + mResetReadyCounter (-1), + mSrcType(AxVoice::SRC_4TAP_AUTO) { mMainOutVolume.InitValue(1.0f); mMasterVolume.InitValue(1.0f); @@ -307,7 +308,10 @@ OutputMode AxManager::GetOutputMode() } void AxManager::SetMasterVolume(f32 volume, int frame) { - mMasterVolume.SetTarget(ut::Clamp(volume, 0.0f, 1.0f), (frame + 2) / 3); + if (volume < 0.0f) { + volume = 0.0f; + } + mMasterVolume.SetTarget(volume, (frame + 2) / 3); if (frame == 0) { VoiceManager::GetInstance().UpdateAllVoicesSync(Voice::SYNC_AX_VE); @@ -395,6 +399,9 @@ bool AxManager::AppendEffect(AuxBus bus, FxBase* pFx) { void AxManager::ClearEffect(AuxBus bus, int frame) { if (frame == 0) { ShutdownEffect(bus); + if (!mAuxFadeVolume[bus].IsFinished()) { + mAuxFadeVolume[bus].SetTarget(0.0f, 0); + } return; } @@ -447,6 +454,8 @@ void AxManager::AuxCallbackFunc(void* pChans, void* pContext) { void** ppChans = static_cast(pChans); AuxBus bus = static_cast(reinterpret_cast(pContext)); + int tick = OSGetTick(); + if (GetInstance().GetOutputMode() == OUTPUT_MODE_DPL2) { num = AX_DPL2_MAX; @@ -468,10 +477,12 @@ void AxManager::AuxCallbackFunc(void* pChans, void* pContext) { for (int i = 0; i < num; i++) { std::memset(buffer[i], 0, FX_BUFFER_SIZE); } + GetInstance().mEffectProcessTick[bus] = OSGetTick() - tick; } else if (GetInstance().GetEffectList(bus).IsEmpty()) { for (int i = 0; i < num; i++) { std::memset(buffer[i], 0, FX_BUFFER_SIZE); } + GetInstance().mEffectProcessTick[bus] = OSGetTick() - tick; } else { for (FxBase::LinkList::Iterator it = GetInstance().GetEffectList(bus).GetBeginIter(); @@ -480,6 +491,7 @@ void AxManager::AuxCallbackFunc(void* pChans, void* pContext) { it->UpdateBuffer(num, buffer, FX_BUFFER_SIZE, FX_SAMPLE_FORMAT, FX_SAMPLE_RATE, GetInstance().GetOutputMode()); } + GetInstance().mEffectProcessTick[bus] = OSGetTick() - tick; } } diff --git a/src/nw4r/snd/snd_AxVoice.cpp b/src/nw4r/snd/snd_AxVoice.cpp index be050bd3..656786d6 100644 --- a/src/nw4r/snd/snd_AxVoice.cpp +++ b/src/nw4r/snd/snd_AxVoice.cpp @@ -302,6 +302,10 @@ void AxVoice::SetVoiceType(VoiceType type) mVpb.SetVoiceType(type); } +void AxVoice::EnableRemote(bool enable) { + mVpb.SetVoiceRmtOn(enable); +} + void AxVoice::ResetDelta() { ut::AutoInterruptLock lock; @@ -674,6 +678,37 @@ bool AxVoice::SetMix(MixParam const ¶m) return needUpdateFlag; } +void AxVoice::SetRmtMix(const RemoteMixParam& rParam) { + AXPBRMTMIX mix; + + mix.vMain0 = rParam.vMain0; + mix.vDeltaMain0 = 0; + + mix.vAux0 = rParam.vAux0; + mix.vDeltaAux0 = 0; + + mix.vMain1 = rParam.vMain1; + mix.vDeltaMain1 = 0; + + mix.vAux1 = rParam.vAux1; + mix.vDeltaAux1 = 0; + + mix.vMain2 = rParam.vMain2; + mix.vDeltaMain2 = 0; + + mix.vAux2 = rParam.vAux2; + mix.vDeltaAux2 = 0; + + mix.vMain3 = rParam.vMain3; + mix.vDeltaMain3 = 0; + + mix.vAux3 = rParam.vAux3; + mix.vDeltaAux3 = 0; + + mVpb.SetVoiceRmtMix(mix); +} + + void AxVoice::SetSrc(f32 ratio, bool initialUpdate) { ut::AutoInterruptLock lock; @@ -713,8 +748,12 @@ void AxVoice::SetVe(f32 volume, f32 initVolume) if (!mVpb.IsAvailable()) return; - mVpb.SetVoiceVe(volume * (AX_MAX_VOLUME - 1), - initVolume * (AX_MAX_VOLUME - 1)); + int v = volume * (AX_MAX_VOLUME - 1); + int iv = initVolume * (AX_MAX_VOLUME - 1); + v = ut::Clamp(v, 0, 0xFFFF); + iv = ut::Clamp(iv, 0, 0xFFFF); + + mVpb.SetVoiceVe(v, iv); } void AxVoice::SetLpf(u16 freq) @@ -847,7 +886,7 @@ void AxVoice::SetRemoteFilter(u8 filter) } void AxVoice::CalcOffsetAdpcmParam(u16 *outPredScale, u16 *outYn1, u16 *outYn2, - u32 offset, void *dataAddr, + u32 offset, const void *dataAddr, AdpcmParam const &adpcmParam) { AXPBADPCM adpcm; @@ -921,10 +960,10 @@ void AxVoiceParamBlock::Sync() mVpb->pb.ve.currentDelta = -mPrevVeSetting.currentVolume / AX_SAMPLES_PER_FRAME; } - else if (nextVolume > 32767) + else if (nextVolume > 65535) { mVpb->pb.ve.currentDelta = - (32767 - mPrevVeSetting.currentVolume) / AX_SAMPLES_PER_FRAME; + (65535 - mPrevVeSetting.currentVolume) / AX_SAMPLES_PER_FRAME; } if (mVpb->pb.ve.currentDelta == 0 && mPrevVeSetting.currentDelta == 0) @@ -1277,6 +1316,102 @@ void AxVoiceParamBlock::SetVoiceBiquadCoefs(u16 b0, u16 b1, u16 b2, u16 a1, mSync |= AX_VPB_SYNC_FLAG_BIQUAD_COEFS; } +void AxVoiceParamBlock::SetVoiceRmtOn(u16 on) { + ut::AutoInterruptLock lock; + + if (!IsAvailable()) { + return; + } + + mVpb->pb.remote = on; + mSync |= AX_VPB_SYNC_FLAG_RMT_ON; +} + +void AxVoiceParamBlock::SetVoiceRmtMix(_AXPBRMTMIX const &rMix) +{ + ut::AutoInterruptLock lock; + + if (!IsAvailable()) { + return; + } + + u16* pDst = reinterpret_cast(&mVpb->pb.rmtMix); + const u16* pSrc = reinterpret_cast(&rMix); + + u16 ctrl = 0; + + // vMain0 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_M0; + } + // vDeltaMain0 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_DELTA_M0; + } + // vAux0 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_A0; + } + // vDeltaAux0 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_DELTA_A0; + } + + // vMain1 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_M1; + } + // vDeltaMain1 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_DELTA_M1; + } + // vAux1 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_A1; + } + // vDeltaAux1 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_DELTA_A1; + } + + // vMain2 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_M2; + } + // vDeltaMain2 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_DELTA_M2; + } + // vAux2 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_A2; + } + // vDeltaAux2 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_DELTA_A2; + } + + // vMain3 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_M3; + } + // vDeltaMain3 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_DELTA_M3; + } + // vAux3 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_A3; + } + // vDeltaAux3 + if ((*pDst++ = *pSrc++) != 0) { + ctrl |= AX_MIXER_CTRL_RMT_DELTA_A3; + } + + mVpb->pb.rmtMixerCtrl = ctrl; + mSync |= AX_VPB_SYNC_FLAG_RMT_MIXER_CTRL | AX_VPB_SYNC_FLAG_RMT_MIX; +} + void AxVoiceParamBlock::SetVoiceRmtIIR(__AXPBRMTIIR const &iir) { ut::AutoInterruptLock lock; diff --git a/src/nw4r/snd/snd_AxfxImpl.cpp b/src/nw4r/snd/snd_AxfxImpl.cpp index ba4a6394..4e757cfb 100644 --- a/src/nw4r/snd/snd_AxfxImpl.cpp +++ b/src/nw4r/snd/snd_AxfxImpl.cpp @@ -10,6 +10,11 @@ AxfxImpl* AxfxImpl::mCurrentFx = NULL; u32 AxfxImpl::mAllocatedSize = 0; bool AxfxImpl::CreateHeap(void* pBuffer, u32 size) { + if (pBuffer == NULL || size == 0) + { + mHeap = NULL; + return false; + } mHeap = MEMCreateFrmHeap(pBuffer, size); return mHeap != NULL; } @@ -17,6 +22,7 @@ bool AxfxImpl::CreateHeap(void* pBuffer, u32 size) { void AxfxImpl::DestroyHeap() { if (mHeap != NULL) { MEMDestroyFrmHeap(mHeap); + mHeap = NULL; } } @@ -24,11 +30,13 @@ void AxfxImpl::HookAlloc(AXFXAllocHook* pAllocHook, AXFXFreeHook* pFreeHook) { AXFXGetHooks(pAllocHook, pFreeHook); AXFXSetHooks(Alloc, Free); mCurrentFx = this; + mAllocatedSize = 0; } -void AxfxImpl::RestoreAlloc(AXFXAllocHook allocHook, AXFXFreeHook freeHook) { +u32 AxfxImpl::RestoreAlloc(AXFXAllocHook allocHook, AXFXFreeHook freeHook) { AXFXSetHooks(allocHook, freeHook); mCurrentFx = NULL; + return mAllocatedSize; } void* AxfxImpl::Alloc(u32 size) { diff --git a/src/nw4r/snd/snd_BasicPlayer.cpp b/src/nw4r/snd/snd_BasicPlayer.cpp index e5695e31..4045f4b8 100644 --- a/src/nw4r/snd/snd_BasicPlayer.cpp +++ b/src/nw4r/snd/snd_BasicPlayer.cpp @@ -41,6 +41,9 @@ void PlayerParamSet::Init() for (int i = 0; i < AUX_BUS_NUM; i++) fxSend[i] = 0.0f; + for (int i = 0; i < 4; i++) + remoteOutVolume[i] = 1.0f; + for (int i = 0; i < (int)ARRAY_LENGTH(voiceOutParam); i++) { VoiceOutParam *param = &voiceOutParam[i]; @@ -99,4 +102,14 @@ void BasicPlayer::SetRemoteFilter(int filter) mPlayerParamSet.remoteFilter = filter; } +void BasicPlayer::SetRemoteOutVolume(int remote, f32 volume) +{ + mPlayerParamSet.remoteOutVolume[remote] = volume; +} + +f32 BasicPlayer::GetRemoteOutVolume(int remote) const +{ + return mPlayerParamSet.remoteOutVolume[remote]; +} + }}} // namespace nw4r::snd::detail diff --git a/src/nw4r/snd/snd_BasicSound.cpp b/src/nw4r/snd/snd_BasicSound.cpp index 0aacd888..d6e29c09 100644 --- a/src/nw4r/snd/snd_BasicSound.cpp +++ b/src/nw4r/snd/snd_BasicSound.cpp @@ -56,8 +56,8 @@ BasicSound::BasicSound(int priority, int ambientPriority) : mSoundPlayer (nullptr), mSoundActor (nullptr), mExtSoundPlayer (nullptr), - mId (INVALID_ID), - mPauseNestCounter (0) + mId (INVALID_ID) + // mPauseNestCounter (0) { // specifically not the source variant NW4RAssertHeaderClampedLRValue_Line(53, priority, PRIORITY_MIN, @@ -108,6 +108,9 @@ void BasicSound::InitParam() for (int i = 0; i < AUX_BUS_NUM; i++) mFxSend[i] = 0.0f; + for (int i = 0; i < 4; i++) + mRemoteOutVolume[i] = 1.0f; + mAmbientParam.volume = 1.0f; mAmbientParam.pitch = 1.0f; mAmbientParam.pan = 0.0f; @@ -118,7 +121,7 @@ void BasicSound::InitParam() mAmbientParam.biquadFilterType = 0; mAmbientParam.priority = 0; - mPauseNestCounter = 0; + // mPauseNestCounter = 0; } void BasicSound::StartPrepared() @@ -155,7 +158,7 @@ void BasicSound::Pause(bool flag, int fadeFrames) if (flag) { - mPauseNestCounter++; + // mPauseNestCounter++; switch (mPauseState) { @@ -183,8 +186,8 @@ void BasicSound::Pause(bool flag, int fadeFrames) } else { - if (mPauseNestCounter && --mPauseNestCounter) - return; +// if (mPauseNestCounter && --mPauseNestCounter) +// return; switch (mPauseState) { @@ -218,7 +221,16 @@ void BasicSound::SetAutoStopCounter(int count) mAutoStopFlag = count > 0; } -bool BasicSound::IsPaused() const +void BasicSound::FadeIn(int fadeFrames) +{ + if (!mFadeOutFlag) + { + int duration = fadeFrames * (1.0f - mFadeVolume.GetValue()); + mFadeVolume.SetTarget(1.0f, duration); + } +} + +bool BasicSound::IsPause() const { return mPauseState == PAUSE_STATE_PAUSING || mPauseState == PAUSE_STATE_PAUSED; @@ -289,7 +301,28 @@ void BasicSound::Update() { SoundAmbientParam ambientParam; - mAmbientInfo.paramUpdateCallback->at_0x0c( + if (mUpdateCounter != 0) + { + ambientParam.volume = mAmbientParam.volume; + ambientParam.pitch = mAmbientParam.pitch; + ambientParam.pan = mAmbientParam.pan; + ambientParam.surroundPan = mAmbientParam.surroundPan; + ambientParam.fxSend = mAmbientParam.fxSend; + ambientParam.lpf = mAmbientParam.lpf; + ambientParam.biquadFilterValue = mAmbientParam.biquadFilterValue; + ambientParam.biquadFilterType = mAmbientParam.biquadFilterType; + ambientParam.priority = mAmbientParam.priority; + ambientParam.field_0x24 = mAmbientParam.field_0x24; + } + else + { + ambientParam.field_0x24 = 0; + } + + for (int i = 0; i < mVoiceOutCount; i++) + ambientParam.voiceOutParam[i] = basicPlayer.GetVoiceOutParam(i); + + mAmbientInfo.paramUpdateCallback->detail_UpdateAmbientParam( mAmbientInfo.arg, mId, mVoiceOutCount, &ambientParam); mAmbientParam.volume = ambientParam.volume; @@ -301,10 +334,11 @@ void BasicSound::Update() mAmbientParam.biquadFilterValue = ambientParam.biquadFilterValue; mAmbientParam.biquadFilterType = ambientParam.biquadFilterType; mAmbientParam.priority = ambientParam.priority; + mAmbientParam.field_0x24 = ambientParam.field_0x24; for (int i = 0; i < mVoiceOutCount; i++) basicPlayer.SetVoiceOutParam(i, ambientParam.voiceOutParam[i]); - } + } if (mSoundActor) mActorParam = mSoundActor->detail_GetActorParam(); @@ -410,6 +444,13 @@ void BasicSound::UpdateParam() mainOutVolume *= mMainOutVolume; mainOutVolume *= GetSoundPlayer()->GetMainOutVolume(); + f32 remoteOutVolume[4]; + for (int i = 0; i < 4; i++) { + remoteOutVolume[i] = 1.0f; + remoteOutVolume[i] *= GetSoundPlayer()->GetRemoteOutVolume(i); + remoteOutVolume[i] *= mRemoteOutVolume[i]; + } + f32 mainSend = 0.0f; mainSend += mMainSend; mainSend += GetSoundPlayer()->GetMainSend(); @@ -434,6 +475,10 @@ void BasicSound::UpdateParam() basicPlayer.SetOutputLine(outputLineFlag); basicPlayer.SetMainOutVolume(mainOutVolume); + for (int i = 0; i < 4; i++) { + basicPlayer.SetRemoteOutVolume(i, remoteOutVolume[i]); + } + basicPlayer.SetMainSend(mainSend); for (int i = 0; i < AUX_BUS_NUM; i++) @@ -474,7 +519,7 @@ void BasicSound::Shutdown() if (mAmbientInfo.argAllocaterCallback) { - mAmbientInfo.argAllocaterCallback->at_0x10(mAmbientInfo.arg, this); + mAmbientInfo.argAllocaterCallback->detail_FreeAmbientArg(mAmbientInfo.arg, this); mAmbientInfo.arg = nullptr; } @@ -547,6 +592,11 @@ void BasicSound::DetachExternalSoundPlayer(ExternalSoundPlayer *extPlayer) mExtSoundPlayer = nullptr; } +int BasicSound::GetRemainingFadeFrames() const +{ + return mPauseFadeVolume.GetRemainingTime(); +} + int BasicSound::GetVoiceOutCount() const { return mVoiceOutCount; @@ -569,15 +619,21 @@ void BasicSound::SetPlayerPriority(int priority) void BasicSound::SetInitialVolume(f32 volume) { NW4RAssert_Line(818, volume >= 0.0f); + if (volume < 0.0f) { + volume = 0.0f; + } - mInitVolume = ut::Clamp(volume, 0.0f, 1.0f); + mInitVolume = mInitVolume = volume; } void BasicSound::SetVolume(f32 volume, int frames) { NW4RAssert_Line(833, volume >= 0.0f); + if (volume < 0.0f) { + volume = 0.0f; + } - mExtMoveVolume.SetTarget(ut::Clamp(volume, 0.0f, 1.0f), frames); + mExtMoveVolume.SetTarget(volume, frames); } void BasicSound::SetPitch(f32 pitch) @@ -587,12 +643,32 @@ void BasicSound::SetPitch(f32 pitch) mExtPitch = pitch; } +void BasicSound::SetPan(f32 pan) +{ + mExtPan = pan; +} + +void BasicSound::SetSurroundPan(f32 pan) +{ + mExtSurroundPan = pan; +} + +void BasicSound::SetLpfFreq(f32 freq) +{ + mLpfFreq = freq; +} + +void BasicSound::SetOutputLineFlag(int flag) +{ + mOutputLineFlag = flag; +} + void BasicSound::SetFxSend(AuxBus bus, f32 send) { // specifically not the source variant NW4RAssertHeaderClampedLValue_Line(979, bus, AUX_A, AUX_BUS_NUM); - GetBasicPlayer().SetFxSend(bus, send); + mFxSend[bus] = send; } void BasicSound::SetRemoteFilter(int filter) @@ -615,7 +691,7 @@ void BasicSound::SetAmbientInfo(AmbientInfo const &ambientArgInfo) NW4RAssertPointerNonnull_Line(1090, ambientArgInfo.argAllocaterCallback); void *ambientArg = - ambientArgInfo.argAllocaterCallback->at_0x0c(ambientArgInfo.argSize); + ambientArgInfo.argAllocaterCallback->detail_AllocAmbientArg(ambientArgInfo.argSize); if (!ambientArg) { NW4RCheckMessage_Line(1093, ambientArg, "Failed to alloc AmbientArg."); @@ -629,7 +705,7 @@ void BasicSound::SetAmbientInfo(AmbientInfo const &ambientArgInfo) if (ambientArgInfo.paramUpdateCallback) { int voiceOutCount = - mAmbientInfo.paramUpdateCallback->at_0x14(mAmbientInfo.arg, mId); + mAmbientInfo.paramUpdateCallback->detail_GetRequiredVoiceOutCount(mAmbientInfo.arg, mId); if (voiceOutCount > 4) voiceOutCount = 4; @@ -644,7 +720,7 @@ int BasicSound::GetAmbientPriority(AmbientInfo const &ambientInfo, u32 soundId) return PRIORITY_MIN; int priority = - ambientInfo.paramUpdateCallback->at_0x10(ambientInfo.arg, soundId); + ambientInfo.paramUpdateCallback->detail_GetAmbientPriority(ambientInfo.arg, soundId); return priority; } diff --git a/src/nw4r/snd/snd_Channel.cpp b/src/nw4r/snd/snd_Channel.cpp index c55d4321..3d3456d8 100644 --- a/src/nw4r/snd/snd_Channel.cpp +++ b/src/nw4r/snd/snd_Channel.cpp @@ -150,6 +150,9 @@ void Channel::InitParam(Callback *callback, u32 callbackData) for (int i = 0; i < AUX_BUS_NUM; i++) mFxSend[i] = 0.0f; + for (int i = 0; i < 4; i++) + mRemoteOutVolume[i] = 1.0f; + mSilenceVolume.InitValue(SILENCE_VOLUME_MAX); mSweepPitch = 0.0f; @@ -252,6 +255,12 @@ void Channel::Update(bool doPeriodicProc) fxSend[i] += mFxSend[i]; } + f32 remoteOutVolume[4]; + for (int i = 0; i < 4; i++) { + remoteOutVolume[i] = 1.0f; + remoteOutVolume[i] *= mRemoteOutVolume[i]; + } + if (doPeriodicProc) { if (mAutoSweep) @@ -287,6 +296,10 @@ void Channel::Update(bool doPeriodicProc) for (int i = 0; i < AUX_BUS_NUM; i++) mVoice->SetFxSend(static_cast(i), fxSend[i]); + + for (int i = 0; i < 4; i++) { + mVoice->SetRemoteOutVolume(i, remoteOutVolume[i]); + } } } diff --git a/src/nw4r/snd/snd_DisposeCallbackManager.cpp b/src/nw4r/snd/snd_DisposeCallbackManager.cpp index 060bc6fc..d10c2a5b 100644 --- a/src/nw4r/snd/snd_DisposeCallbackManager.cpp +++ b/src/nw4r/snd/snd_DisposeCallbackManager.cpp @@ -55,8 +55,7 @@ void DisposeCallbackManager::Dispose(void *mem, u32 size, void *arg ATTR_UNUSED) { decltype(itr) curItr = itr++; - // the post-increment is in ketteiban - curItr++->InvalidateData(start, end); + curItr->InvalidateData(start, end); } } @@ -73,7 +72,7 @@ void DisposeCallbackManager::DisposeWave(void *mem, u32 size, { decltype(itr) curItr = itr++; - curItr++->InvalidateWaveData(start, end); + curItr->InvalidateWaveData(start, end); } } diff --git a/src/nw4r/snd/snd_DvdSoundArchive.cpp b/src/nw4r/snd/snd_DvdSoundArchive.cpp index 43a69d2e..ff98e4e4 100644 --- a/src/nw4r/snd/snd_DvdSoundArchive.cpp +++ b/src/nw4r/snd/snd_DvdSoundArchive.cpp @@ -56,8 +56,10 @@ bool DvdSoundArchive::Open(const char* pPath) { char extRoot[FILE_PATH_MAX]; for (int i = std::strlen(pPath) - 1; i >= 0; i--) { - if (pPath[i] == '/' || pPath[i] == '\\') { - // @bug Long path can overflow extRoot buffer + if ((pPath[i] == '/' || pPath[i] == '\\')) { + if (i >= FILE_PATH_MAX + 1) { + return false; + } std::strncpy(extRoot, pPath, i); extRoot[i] = '\0'; @@ -70,8 +72,10 @@ bool DvdSoundArchive::Open(const char* pPath) { } void DvdSoundArchive::Close() { - DVDClose(&mFileInfo); - mOpen = false; + if (mOpen) { + DVDClose(&mFileInfo); + mOpen = false; + } Shutdown(); } @@ -115,7 +119,7 @@ bool DvdSoundArchive::LoadFileHeader() { u8 headerArea[detail::SoundArchiveFile::HEADER_AREA_SIZE]; static const u32 headerAlignSize = - ut::RoundUp(sizeof(detail::SoundArchiveFile::Header), 32); + ROUND_UP(sizeof(detail::SoundArchiveFile::Header), 32); void* pFile = ut::RoundUp(headerArea, 32); @@ -173,9 +177,6 @@ bool DvdSoundArchive::LoadLabelStringData(void* pBuffer, u32 size) { DvdSoundArchive::DvdFileStream::DvdFileStream(const DVDFileInfo* pFileInfo, u32 offset, u32 size) : DvdLockedFileStream(pFileInfo, false), mOffset(offset), mSize(size) { - if (mSize == 0) { - mSize = ut::DvdFileStream::GetSize(); - } ut::DvdFileStream::Seek(mOffset, SEEKORG_BEG); } @@ -183,9 +184,6 @@ DvdSoundArchive::DvdFileStream::DvdFileStream(const DVDFileInfo* pFileInfo, DvdSoundArchive::DvdFileStream::DvdFileStream(s32 entrynum, u32 offset, u32 size) : DvdLockedFileStream(entrynum), mOffset(offset), mSize(size) { - if (mSize == 0) { - mSize = ut::DvdFileStream::GetSize(); - } ut::DvdFileStream::Seek(mOffset, SEEKORG_BEG); } diff --git a/src/nw4r/snd/snd_ExternalSoundPlayer.cpp b/src/nw4r/snd/snd_ExternalSoundPlayer.cpp index 2cd0c7e7..7f0b1d5a 100644 --- a/src/nw4r/snd/snd_ExternalSoundPlayer.cpp +++ b/src/nw4r/snd/snd_ExternalSoundPlayer.cpp @@ -42,10 +42,37 @@ ExternalSoundPlayer::~ExternalSoundPlayer() { } } +#if 0 // not sure which one uses this exactly, maybe StopAllSound? DECOMP_FORCE_CLASS_METHOD( BasicSound::ExtSoundPlayerPlayLinkList, GetPointerFromNode(static_cast(nullptr))); +#endif + +void ExternalSoundPlayer::StopAllSound(int fadeFrames) +{ + NW4R_RANGE_FOR_NO_AUTO_INC(it, mSoundList) + { + it++->Stop(fadeFrames); + } +} + +void ExternalSoundPlayer::PauseAllSound(bool flag, int fadeFrames) +{ + NW4R_RANGE_FOR_NO_AUTO_INC(it, mSoundList) + { + it++->Pause(flag, fadeFrames); + } +} + +void ExternalSoundPlayer::DetachSoundActorAll(SoundActor *sound) +{ + NW4R_RANGE_FOR_NO_AUTO_INC(it, mSoundList) + { + it++->DetachSoundActor(sound); + } +} + bool ExternalSoundPlayer::AppendSound(BasicSound *sound) { diff --git a/src/nw4r/snd/snd_FrameHeap.cpp b/src/nw4r/snd/snd_FrameHeap.cpp index 5c67fdad..31202906 100644 --- a/src/nw4r/snd/snd_FrameHeap.cpp +++ b/src/nw4r/snd/snd_FrameHeap.cpp @@ -63,10 +63,11 @@ void* FrameHeap::Alloc(u32 size, FreeCallback pCallback, void* pCallbackArg) { return NULL; } - Block* pBlock = new (pBuffer) Block(size, pCallback, pCallbackArg); + void *pBuffer2 = ut::AddOffsetToPtr(pBuffer, BLOCK_BUFFER_SIZE); + Block* pBlock = new (pBuffer) Block(pBuffer2, size, pCallback, pCallbackArg); mSectionList.GetBack().AppendBlock(pBlock); - return pBlock->GetBufferAddr(); + return pBuffer2; } int FrameHeap::SaveState() { @@ -106,11 +107,11 @@ int FrameHeap::GetCurrentLevel() const { u32 FrameHeap::GetFreeSize() const { u32 freeSize = MEMGetAllocatableSizeForFrmHeapEx(mHandle, HEAP_ALIGN); - if (freeSize < BLOCK_BUFFER_SIZE) { + if (freeSize < sizeof(Block)) { return 0; } - return ut::RoundDown(freeSize - BLOCK_BUFFER_SIZE, HEAP_ALIGN); + return ut::RoundDown(freeSize - sizeof(Block), HEAP_ALIGN); } bool FrameHeap::NewSection() { diff --git a/src/nw4r/snd/snd_FxReverbStdDpl2.cpp b/src/nw4r/snd/snd_FxReverbStdDpl2.cpp index ed62b7ac..8cf03423 100644 --- a/src/nw4r/snd/snd_FxReverbStdDpl2.cpp +++ b/src/nw4r/snd/snd_FxReverbStdDpl2.cpp @@ -1 +1,186 @@ -// #include "nw4r/snd/snd_FxReverbStdDpl2.h" +#include "nw4r/snd/snd_FxReverbStdDpl2.h" + +#include "common.h" +#include "nw4r/snd/snd_AxManager.h" +#include "nw4r/snd/snd_global.h" +#include "nw4r/ut/ut_algorithm.h" + +namespace nw4r { +namespace snd { + +FxReverbStdDpl2::FxReverbStdDpl2() : mIsActive(0) { + detail::FxReverbStdParam p; + SetParam(p); +} + +u32 FxReverbStdDpl2::GetRequiredMemSize() { + return ut::Max( + ut::RoundUp(AXFXReverbStdExpGetMemSizeDpl2(&mAxfxParamDpl) + detail::AxfxImpl::HEAP_SIZE_MIN, 32), + ut::RoundUp(AXFXReverbStdExpGetMemSize(&mAxfxParam) + detail::AxfxImpl::HEAP_SIZE_MIN, 32) + ); +} + +bool FxReverbStdDpl2::AssignWorkBuffer(void *pBuffer, u32 size) { + return mImpl.CreateHeap(pBuffer, size); +} + +void FxReverbStdDpl2::ReleaseWorkBuffer() { + mImpl.DestroyHeap(); +} + +bool FxReverbStdDpl2::StartUp() { + u32 memSize = GetRequiredMemSize(); + if (memSize > mImpl.GetHeapTotalSize()) { + return false; + } + + AXFXAllocHook allocHook; + AXFXFreeHook freeHook; + BOOL success; + switch (detail::AxManager::GetInstance().GetOutputMode()) { + case OUTPUT_MODE_DPL2: { + mOutputMode = 1; + + mImpl.HookAlloc(&allocHook, &freeHook); + success = AXFXReverbStdExpInitDpl2(&mAxfxParamDpl); + mImpl.RestoreAlloc(allocHook, freeHook); + + (void)AXFXReverbStdExpGetMemSizeDpl2(&mAxfxParamDpl); // debug leftover + break; + } + default: { + mOutputMode = 0; + + mImpl.HookAlloc(&allocHook, &freeHook); + success = AXFXReverbStdExpInit(&mAxfxParam); + mImpl.RestoreAlloc(allocHook, freeHook); + + (void)AXFXReverbStdExpGetMemSize(&mAxfxParam); // debug leftover + break; + } + } + + mIsActive = 1; + + return success; +} + +void FxReverbStdDpl2::Shutdown() { + if (!mIsActive) { + return; + } + AXFXAllocHook allocHook; + AXFXFreeHook freeHook; + mIsActive = 0; + mImpl.HookAlloc(&allocHook, &freeHook); + + switch (mOutputMode) { + case 1: { + AXFXReverbStdExpShutdownDpl2(&mAxfxParamDpl); + break; + } + default: { + AXFXReverbStdExpShutdown(&mAxfxParam); + break; + } + } + mImpl.RestoreAlloc(allocHook, freeHook); +} + +bool FxReverbStdDpl2::SetParam(const detail::FxReverbStdParam &rParam) { + mParam = rParam; + + f32 f1 = ut::Max(rParam.field_0x18, 0.0f); + bool b = f1 != mAxfxParam.field_0xB8; + + mAxfxParam.field_0xB4 = mAxfxParamDpl.field_0xD0 = rParam.field_0x14; + mAxfxParam.field_0xB8 = mAxfxParamDpl.field_0xD4 = f1; + + mAxfxParam.field_0xBC = mAxfxParamDpl.field_0xD8 = ut::Clamp(rParam.field_0x00, 0.0f, rParam.field_0x18); + mAxfxParam.field_0xC0 = mAxfxParamDpl.field_0xDC = rParam.field_0x1C; + mAxfxParam.field_0xC4 = mAxfxParamDpl.field_0xE0 = ut::Max(rParam.field_0x04, 0.0f); + mAxfxParam.field_0xC8 = mAxfxParamDpl.field_0xE4 = ut::Clamp(rParam.field_0x08, 0.0f, 1.0f); + mAxfxParam.field_0xCC = mAxfxParamDpl.field_0xE8 = ut::Clamp(rParam.field_0x0C, 0.0f, 1.0f); + mAxfxParam.field_0xD0 = mAxfxParamDpl.field_0xEC = ut::Clamp(rParam.field_0x20, 0.0f, 1.0f); + mAxfxParam.field_0xD4 = mAxfxParamDpl.field_0xF0 = ut::Clamp(rParam.field_0x24, 0.0f, 1.0f); + mAxfxParam.field_0xE0 = mAxfxParamDpl.field_0xFC = ut::Clamp(rParam.field_0x10, 0.0f, 1.0f); + + mAxfxParam.field_0xD8 = 0; + mAxfxParam.field_0xDC = 0; + mAxfxParam.field_0xE4 = 0.0f; + + mAxfxParamDpl.field_0xF4 = 0; + mAxfxParamDpl.field_0xF8 = 0; + mAxfxParamDpl.field_0x100 = 0.0f; + + if (!mIsActive) { + return true; + } + + u32 memSize = GetRequiredMemSize(); + if (memSize > mImpl.GetHeapTotalSize()) { + return false; + } + + AXFXAllocHook allocHook; + AXFXFreeHook freeHook; + BOOL success; + if (b) { + mImpl.HookAlloc(&allocHook, &freeHook); + switch (mOutputMode) { + case 1: success = AXFXReverbStdExpSettingsDpl2(&mAxfxParamDpl); break; + default: success = AXFXReverbStdExpSettings(&mAxfxParam); break; + } + + mImpl.RestoreAlloc(allocHook, freeHook); + } else { + switch (mOutputMode) { + case 1: success = AXFXReverbStdExpSettingsUpdateDpl2(&mAxfxParamDpl); break; + default: success = AXFXReverbStdExpSettingsUpdate(&mAxfxParam); break; + } + } + + return success; +} + +void FxReverbStdDpl2::UpdateBuffer( + int channels, void **ppBuffer, u32 size, SampleFormat sampleFormat, f32 sampleRate, OutputMode outputMode +) { + if (!mIsActive) { + return; + } + + if ((outputMode == OUTPUT_MODE_DPL2) != mOutputMode) { + return; + } + + switch (mOutputMode) { + case 1: { + void *chans[AX_DPL2_MAX]; + chans[AX_DPL2_L] = ppBuffer[AX_DPL2_L]; + chans[AX_DPL2_R] = ppBuffer[AX_DPL2_R]; + chans[AX_DPL2_LS] = ppBuffer[AX_DPL2_LS]; + chans[AX_DPL2_RS] = ppBuffer[AX_DPL2_RS]; + AXFXReverbStdExpCallbackDpl2(chans, &mAxfxParamDpl); + break; + } + default: { + void *chans[3]; + chans[0] = ppBuffer[0]; + chans[1] = ppBuffer[1]; + chans[2] = ppBuffer[2]; + AXFXReverbStdExpCallback(chans, &mAxfxParam); + break; + } + } +} + +void FxReverbStdDpl2::OnChangeOutputMode() { + if (mOutputMode != (detail::AxManager::GetInstance().GetOutputMode() == OUTPUT_MODE_DPL2)) { + Shutdown(); + StartUp(); + } +} + +} // namespace snd +} // namespace nw4r diff --git a/src/nw4r/snd/snd_MemorySoundArchive.cpp b/src/nw4r/snd/snd_MemorySoundArchive.cpp index 5faa944c..45dbe9ab 100644 --- a/src/nw4r/snd/snd_MemorySoundArchive.cpp +++ b/src/nw4r/snd/snd_MemorySoundArchive.cpp @@ -176,7 +176,7 @@ void MemorySoundArchive::MemoryFileStream::Seek(s32 offset, u32 origin) default: NW4RPanicMessage_Line(234, "Unsupported Seek origin"); - break; + return; } } diff --git a/src/nw4r/snd/snd_MmlParser.cpp b/src/nw4r/snd/snd_MmlParser.cpp index d481920f..18b4537a 100644 --- a/src/nw4r/snd/snd_MmlParser.cpp +++ b/src/nw4r/snd/snd_MmlParser.cpp @@ -159,7 +159,7 @@ MmlSeqTrack::ParseResult MmlParser::Parse(MmlSeqTrack *track, s32 commandArg1 = 0; s32 commandArg2 = 0; - switch (static_cast(cmd & MML_CMD_SET_MASK)) + switch (cmd & MML_CMD_SET_MASK) { case 0x80: { @@ -410,7 +410,7 @@ void MmlParser::CommandProc(MmlSeqTrack *track, u32 command, s32 commandArg1, break; case MML_SET_PITCH_BEND: - trackParam.pitchBend = commandArg1; + trackParam.pitchBend.SetTarget(commandArg1, commandArg2); break; case MML_SET_BEND_RANGE: diff --git a/src/nw4r/snd/snd_NandSoundArchive.cpp b/src/nw4r/snd/snd_NandSoundArchive.cpp index e37db9d9..0dfef853 100644 --- a/src/nw4r/snd/snd_NandSoundArchive.cpp +++ b/src/nw4r/snd/snd_NandSoundArchive.cpp @@ -47,22 +47,48 @@ bool NandSoundArchive::Open(const char* pPath) { return false; } - char currentDir[64]; - NANDGetCurrentDir(currentDir); - u32 currDirLen = std::strlen(currentDir); - char extRoot[FILE_PATH_MAX]; - std::strncpy(extRoot, currentDir, currDirLen + 1); - - for (int i = std::strlen(pPath) - 1; i >= 0; i--) { - if (pPath[i] == '/' || pPath[i] == '\\') { - // @bug Long path can overflow extRoot buffer - std::strncat(extRoot, pPath, i); - extRoot[currDirLen + i] = '\0'; - break; + char *pExtRoot = extRoot; + // UB: (?) Array index 256 is past the end of the array + char *pEnd = &extRoot[FILE_PATH_MAX + 1]; + if (pPath[0] != '/' && pPath[0] != '\\') { + char currentDir[64]; + if (NANDGetCurrentDir(currentDir) != NAND_RESULT_OK) { + return false; } + + char *pCurrentDir = currentDir; + while (*pCurrentDir != '\0') { + if (pExtRoot >= pEnd) { + return false; + } + *pExtRoot++ = *pCurrentDir++; + } + if (pExtRoot >= pEnd) { + return false; + } + *pExtRoot++ = '/'; } + const char *pPath2 = pPath; + const char *p3 = pPath; + while (*pPath2 != '\0') { + if (*pPath2 == '/' || *pPath2 == '\\') { + while (p3 < pPath2) { + if (pExtRoot >= pEnd) { + return false; + } + *pExtRoot++ = *p3++; + } + } + pPath2++; + } + + + if (pExtRoot >= pEnd) { + return false; + } + *pExtRoot = '\0'; SetExternalFileRoot(extRoot); return true; } @@ -193,9 +219,6 @@ NandSoundArchive::NandFileStream::NandFileStream(const NANDFileInfo* pFileInfo, mSize(size) { if (IsAvailable()) { - if (mSize == 0) { - mSize = ut::NandFileStream::GetSize(); - } ut::NandFileStream::Seek(mOffset, SEEKORG_BEG); } @@ -208,9 +231,6 @@ NandSoundArchive::NandFileStream::NandFileStream(const char* pPath, u32 offset, mSize(size) { if (IsAvailable()) { - if (mSize == 0) { - mSize = ut::NandFileStream::GetSize(); - } ut::NandFileStream::Seek(mOffset, SEEKORG_BEG); } diff --git a/src/nw4r/snd/snd_RemoteSpeaker.cpp b/src/nw4r/snd/snd_RemoteSpeaker.cpp index 9f97bd70..74a7357d 100644 --- a/src/nw4r/snd/snd_RemoteSpeaker.cpp +++ b/src/nw4r/snd/snd_RemoteSpeaker.cpp @@ -58,8 +58,8 @@ bool RemoteSpeaker::Setup(WPADCallback pCallback) { mValidCallbackFlag = false; } - mWpadCallback = pCallback; mUserCommand = COMMAND_SPEAKER_ON; + mWpadCallback = pCallback; mInitFlag = true; return true; @@ -357,7 +357,7 @@ void RemoteSpeaker::ContinueAlarmHandler(OSAlarm* pAlarm, OSContext* pCtx) { RemoteSpeaker* p = static_cast(OSGetAlarmUserData(pAlarm)); // p->mForceResumeFlag = true; - p->mContinueFlag = false; + // p->mContinueFlag = false; } void RemoteSpeaker::IntervalAlarmHandler(OSAlarm* pAlarm, OSContext* pCtx) { diff --git a/src/nw4r/snd/snd_SeqPlayer.cpp b/src/nw4r/snd/snd_SeqPlayer.cpp index 10264746..ed40614c 100644 --- a/src/nw4r/snd/snd_SeqPlayer.cpp +++ b/src/nw4r/snd/snd_SeqPlayer.cpp @@ -238,8 +238,10 @@ void SeqPlayer::Skip(OffsetType offsetType, int offset) } } +#if 0 // SeqPlayer::SetTempoRatio ([R89JEL]:/bin/RVL/Debug/mainD.MAP:13781) DECOMP_FORCE(NW4RAssert_String(tempoRatio >= 0.0f)); +#endif void SeqPlayer::SetTempoRatio(f32 tempo) { mTempoRatio = tempo; @@ -284,6 +286,31 @@ void SeqPlayer::CallSeqUserprocCallback(u16 procId, SeqTrack *track) trackParam.cmpFlag = param.cmpFlag; } +s16 SeqPlayer::GetLocalVariable(int varNo) const { + return mLocalVariable[varNo]; +} + +void SeqPlayer::SetLocalVariable(int varNo, s16 value) { + mLocalVariable[varNo] = value; +} + +void SeqPlayer::SetGlobalVariable(int varNo, s16 value) { + mGlobalVariable[varNo] = value; +} + +void SeqPlayer::SetTrackMute(u32 trackFlags, SeqMute mute) { + SetTrackParam(trackFlags, &SeqTrack::SetMute, mute); +} + +void SeqPlayer::SetTrackSilence(u32 trackFlags, bool silence, int fadeFrames) { + SetTrackParam(trackFlags, &SeqTrack::SetSilence, silence, fadeFrames); +} + +void SeqPlayer::SetTrackVolume(u32 trackFlags, f32 volume) { + SetTrackParam(trackFlags, &SeqTrack::SetVolume, volume); +} + +#if 0 // SeqPlayer::GetLocalVariable? maybe all of them? DECOMP_FORCE(NW4RAssertHeaderClampedLValue_String(varNo)); @@ -321,6 +348,7 @@ DECOMP_FORCE(&SeqTrack::SetModDepth); // SeqPlayer::SetTrackModSpeed ([R89JEL]:/bin/RVL/Debug/mainD.MAP:13801) DECOMP_FORCE(&SeqTrack::SetModSpeed); +#endif void SeqPlayer::InvalidateData(void const *start, void const *end) { diff --git a/src/nw4r/snd/snd_SeqSound.cpp b/src/nw4r/snd/snd_SeqSound.cpp index 9b68e1f5..ca752f8b 100644 --- a/src/nw4r/snd/snd_SeqSound.cpp +++ b/src/nw4r/snd/snd_SeqSound.cpp @@ -17,6 +17,7 @@ #include "nw4r/snd/snd_SeqFile.h" #include "nw4r/snd/snd_SeqPlayer.h" #include "nw4r/snd/snd_SeqSoundHandle.h" +#include "nw4r/snd/snd_SeqTrack.h" #include "nw4r/snd/snd_SoundInstanceManager.h" #include "nw4r/snd/snd_TaskManager.h" @@ -165,9 +166,10 @@ void SeqSound::Shutdown() BasicSound::Shutdown(); mManager->Free(this); } - +#if 0 // SeqSound::SetTempoRatio ([R89JEL]:/bin/RVL/Debug/mainD.MAP:13849) DECOMP_FORCE(NW4RAssert_String(tempoRatio >= 0.0f)); +#endif void SeqSound::SetTempoRatio(f32 tempo) { mSeqPlayer.SetTempoRatio(tempo); @@ -197,6 +199,60 @@ void SeqSound::OnUpdatePlayerPriority() mManager->UpdatePriority(this, CalcCurrentPlayerPriority()); } +void SeqSound::SetTrackMute(u32 trackFlags, SeqMute mute) +{ + mSeqPlayer.SetTrackMute(trackFlags, mute); +} + +void SeqSound::SetTrackSilence(u32 trackFlags, bool silence, int fadeFrames) +{ + mSeqPlayer.SetTrackSilence(trackFlags, silence, fadeFrames); +} + +void SeqSound::SetTrackVolume(u32 trackFlags, f32 volume) +{ + mSeqPlayer.SetTrackVolume(trackFlags, volume); +} + +bool SeqSound::ReadVariable(int varNo, s16 *value) const +{ + if (!GetStartedFlag()) { + *value = -1; + } else { + *value = mSeqPlayer.GetLocalVariable(varNo); + } + return true; +} + +bool SeqSound::WriteVariable(int varNo, s16 value) +{ + mSeqPlayer.SetLocalVariable(varNo, value); + return true; +} + +bool SeqSound::WriteGlobalVariable(int varNo, s16 value) +{ + SeqPlayer::SetGlobalVariable(varNo, value); + return true; +} + +bool SeqSound::WriteTrackVariable(int trackNo, int varNo, s16 value) +{ + SeqTrack *track = mSeqPlayer.GetPlayerTrack(trackNo); + if (track == NULL) + return false; + + track->SetTrackVariable(varNo, value); + return true; +} + +u32 SeqSound::GetTick() const +{ + return !GetStartedFlag() ? 0 : mSeqPlayer.GetTickCounter(); +} + + +#if 0 // SeqSound::SetTrackVolume ([R89JEL]:/bin/RVL/Debug/mainD.MAP:13857) DECOMP_FORCE(NW4RAssert_String(volume >= 0.0f)); @@ -211,7 +267,7 @@ DECOMP_FORCE(NW4RAssertHeaderClampedLValue_String(varNo)); // SeqSound::ReadTrackVariable? maybe both of them? DECOMP_FORCE(NW4RAssertHeaderClampedLValue_String(trackNo)); - +#endif bool SeqSound::IsAttachedTempSpecialHandle() { return mTempSpecialHandle != nullptr; diff --git a/src/nw4r/snd/snd_SeqSoundHandle.cpp b/src/nw4r/snd/snd_SeqSoundHandle.cpp index b5562bd7..a30d8f39 100644 --- a/src/nw4r/snd/snd_SeqSoundHandle.cpp +++ b/src/nw4r/snd/snd_SeqSoundHandle.cpp @@ -12,6 +12,8 @@ #include "common.h" // nullptr #include "nw4r/snd/snd_SeqSound.h" +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/ut/ut_RuntimeTypeInfo.h" /******************************************************************************* * functions @@ -19,6 +21,29 @@ namespace nw4r { namespace snd { +SeqSoundHandle::SeqSoundHandle(SoundHandle *handle) : + mSound (nullptr) +{ + if (!handle) + return; + + detail::BasicSound *basicSound = handle->detail_GetAttachedSound(); + if (!basicSound) + return; + + if (detail::SeqSound *sound = + ut::DynamicCast(basicSound)) + { + + mSound = sound; + + if (mSound->IsAttachedTempSpecialHandle()) + mSound->DetachTempSpecialHandle(); + + mSound->mTempSpecialHandle = this; + } +} + void SeqSoundHandle::DetachSound() { if (IsAttachedSound()) diff --git a/src/nw4r/snd/snd_SeqTrack.cpp b/src/nw4r/snd/snd_SeqTrack.cpp index 81b2cb69..217925e6 100644 --- a/src/nw4r/snd/snd_SeqTrack.cpp +++ b/src/nw4r/snd/snd_SeqTrack.cpp @@ -83,7 +83,7 @@ void SeqTrack::InitParam() mParserTrackParam.surroundPan.InitValue(0); mParserTrackParam.volume2 = 127; mParserTrackParam.velocityRange = 127; - mParserTrackParam.pitchBend = 0; + mParserTrackParam.pitchBend.InitValue(0); mParserTrackParam.bendRange = DEFAULT_BENDRANGE; mParserTrackParam.initPan = 0; mParserTrackParam.transpose = 0; @@ -172,6 +172,7 @@ int SeqTrack::ParseNextTick(bool doNoteOn) mParserTrackParam.volume.Update(); mParserTrackParam.pan.Update(); mParserTrackParam.surroundPan.Update(); + mParserTrackParam.pitchBend.Update(); if (mParserTrackParam.noteFinishWait) { @@ -277,7 +278,7 @@ void SeqTrack::UpdateChannelParam() volume *= mSeqPlayer->GetVolume(); f32 pitch = - mParserTrackParam.pitchBend / 128.0f * mParserTrackParam.bendRange; + mParserTrackParam.pitchBend.GetValue() / 128.0f * mParserTrackParam.bendRange; f32 pitchRatio = 1.0f; pitchRatio *= mSeqPlayer->GetPitch(); @@ -339,13 +340,17 @@ void SeqTrack::UpdateChannelParam() channel->SetOutputLine(mSeqPlayer->GetOutputLine()); channel->SetMainOutVolume(mSeqPlayer->GetMainOutVolume()); channel->SetMainSend(mainSend); - + for (int i = 0; i < AUX_BUS_NUM; i++) { AuxBus bus = static_cast(i); channel->SetFxSend(bus, fxSend[i]); } + for (int i = 0; i < 4; i++) { + channel->SetRemoteOutVolume(i, mSeqPlayer->GetRemoteOutVolume(i)); + } + for (int i = 0; i < mSeqPlayer->GetVoiceOutCount(); i++) channel->SetVoiceOutParam(i, mSeqPlayer->GetVoiceOutParam(i)); @@ -500,8 +505,14 @@ void SeqTrack::SetModSpeed(f32 modSpeed) mParserTrackParam.lfoParam.speed = modSpeed; } +#if 0 // SeqTrack::GetTrackVariable? maybe both? DECOMP_FORCE(NW4RAssertHeaderClampedLValue_String(varNo)); +#endif + +void SeqTrack::SetTrackVariable(int variable, s16 value) { + mTrackVariable[variable] = value; +} s16 volatile *SeqTrack::GetVariablePtr(int varNo) { diff --git a/src/nw4r/snd/snd_Sound3DActor.cpp b/src/nw4r/snd/snd_Sound3DActor.cpp index 5dc4b760..f5e30860 100644 --- a/src/nw4r/snd/snd_Sound3DActor.cpp +++ b/src/nw4r/snd/snd_Sound3DActor.cpp @@ -1 +1,87 @@ #include "nw4r/snd/snd_Sound3DActor.h" + +#include "nw4r/snd/snd_BasicSound.h" +#include "nw4r/snd/snd_ExternalSoundPlayer.h" +#include "nw4r/snd/snd_Sound3DManager.h" +#include "nw4r/snd/snd_SoundArchive.h" +#include "nw4r/snd/snd_SoundArchivePlayer.h" +#include "nw4r/snd/snd_SoundHandle.h" +#include "nw4r/snd/snd_SoundStartable.h" +#include "nw4r/snd/snd_global.h" + +namespace nw4r { +namespace snd { + +Sound3DActor::Sound3DActor(SoundArchivePlayer &rPlayer, Sound3DManager &rManager) + : SoundActor(rPlayer), + m3DManager(rManager), + mSoundArchivePlayer(&rPlayer), + mUserParam(0), + mPosition(0.0f, 0.0f, 0.0f), + mVelocity(0.0f, 0.0f, 0.0f), + mSkipVelocityUpdate(true) {} + + +Sound3DActor::~Sound3DActor() { + ForEachSound(ClearUpdateCallback, false); +} + +SoundStartable::StartResult +Sound3DActor::SetupSound(SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void *pArg) { + Sound3DParam param; + param.position = mPosition; + param.velocity = mVelocity; + param.userParam = mUserParam; + + if (mSoundArchivePlayer != NULL) { + const SoundArchive &archive = mSoundArchivePlayer->GetSoundArchive(); + nw4r::snd::SoundArchive::Sound3DParam arParam; + if (archive.detail_ReadSound3DParam(soundId, &arParam)) { + param.field_0x18 = arParam.flags; + param.decayRatio = arParam.decayRatio; + param.field_0x1E = arParam.field_0x06; + switch (arParam.decayCurve) { + case 1: param.decayCurve = 1; break; + case 2: param.decayCurve = 2; break; + default: param.decayCurve = 1; break; + } + } + param.field_0x24 = archive.GetSoundUserParam(soundId); + } + + detail::BasicSound::AmbientInfo info = { + &m3DManager, this, &m3DManager, ¶m, sizeof(Sound3DParam), + + }; + SoundStartable::StartResult result = + SoundActor::detail_SetupSoundWithAmbientInfo(pHandle, soundId, pStartInfo, &info, pArg); + if (pHandle->detail_GetAttachedSound() != NULL) { + pHandle->detail_GetAttachedSound()->SetPanCurve(PAN_CURVE_SINCOS); + } + return result; +} + +void Sound3DActor::SetPosition(const math::VEC3 &position) { + if (!mSkipVelocityUpdate) { + VEC3Sub(&mVelocity, &position, &mPosition); + } + + mPosition = position; + mSkipVelocityUpdate = 0; +} + +void Sound3DActor::at_0x0c(void *arg, detail::BasicSound *sound) { + Sound3DParam *p = static_cast(arg); + p->position = mPosition; + p->velocity = mVelocity; + p->userParam = mUserParam; +} + +void Sound3DActor::ClearUpdateCallback(SoundHandle& rHandle) { + if (rHandle.IsAttachedSound()) { + rHandle.detail_GetAttachedSound()->ClearAmbientArgUpdateCallback(); + } +} + +} // namespace snd +} // namespace nw4r diff --git a/src/nw4r/snd/snd_Sound3DCalculator.cpp b/src/nw4r/snd/snd_Sound3DCalculator.cpp index e061638f..8c1c1b9d 100644 --- a/src/nw4r/snd/snd_Sound3DCalculator.cpp +++ b/src/nw4r/snd/snd_Sound3DCalculator.cpp @@ -1 +1,286 @@ -// #include "nw4r/snd/snd_Sound3DCalculator.h" +#include "nw4r/snd/snd_Sound3DCalculator.h" + +#include "nw4r/snd/snd_AxManager.h" +#include "nw4r/snd/snd_Sound3DListener.h" +#include "nw4r/snd/snd_Sound3DManager.h" + +#include + +namespace nw4r { + +namespace snd { + +namespace { + +/** + * Solves the linear equation: + * a*x + b*y + c = d + * + * Where: + * a = dFactor - cFactor + * b = dAngle - cAngle + * c = cAngle * cFactor + * d = dAngle * dFactor + */ +inline f32 SolveLinerFunction(f32 x, f32 dAngle, f32 cAngle, f32 dFactor, + f32 cFactor) { // @typo + if (dAngle == cAngle) { + return (dFactor + cFactor) / 2; + } + + f32 b = dAngle - cAngle; + + return x * (cFactor - dFactor) / b + (dAngle * dFactor - cAngle * cFactor) / b; +} + +} // namespace + +void Sound3DCalculator::CalcVolumeAndPriority( + const nw4r::snd::Sound3DManager &mgr, const nw4r::snd::Sound3DListener &listener, + const nw4r::snd::Sound3DParam ¶m, f32 *pVolume, int *pPriority +) { + math::VEC3 relativePos; + math::VEC3Sub(&relativePos, ¶m.position, &listener.GetPosition()); + + f32 distance = VEC3Len(&relativePos); + f32 decayRatio = param.decayRatio / 256.0f; + f32 maxVolumeDistance = listener.GetMaxVolumeDistance(); + f32 unitDistance = listener.GetUnitDistance(); + s32 maxPriorityReduction = mgr.GetMaxPriorityReduction(); + u8 decayCurve = param.decayCurve; + + f32 volume = 1.0f; + if (distance > maxVolumeDistance) { + switch (decayCurve) { + case Sound3DManager::DECAY_CURVE_LOGARITHMIC: { + f32 units = (distance - maxVolumeDistance) / unitDistance; + + volume = std::pow(decayRatio, units); + break; + } + + case Sound3DManager::DECAY_CURVE_LINEAR: { + f32 units = (distance - maxVolumeDistance) / unitDistance * (1.0f - decayRatio); + + volume = 1.0f - units; + if (volume < 0.0f) { + volume = 0.0f; + } + break; + } + } + } + *pVolume = volume; + *pPriority = -static_cast((1.0f - volume) * maxPriorityReduction); +} + +inline void CalcPanInline( + const nw4r::math::VEC3 &relativePos, f32 speakerAngleStereo, f32 interiorSize, f32 distance, f32 panRange, + f32 frontSpeakerAngleDpl2, f32 rearSpeakerAngleDpl2, f32 initPan, f32 *pan, f32 *surroundPan +) { + switch (detail::AxManager::GetInstance().GetOutputMode()) { + case OUTPUT_MODE_SURROUND: + case OUTPUT_MODE_DPL2: + Sound3DCalculator::CalcPanDpl2( + relativePos, interiorSize, distance, panRange, frontSpeakerAngleDpl2, rearSpeakerAngleDpl2, initPan, + pan, surroundPan + ); + break; + case OUTPUT_MODE_STEREO: + Sound3DCalculator::CalcPanStereo( + relativePos, interiorSize, distance, panRange, speakerAngleStereo, pan, surroundPan + ); + break; + default: + *pan = 0.0f; + *surroundPan = 0.0f; + break; + } +} + +void Sound3DCalculator::CalcPan( + const Sound3DManager &mgr, const Sound3DListener &listener, const Sound3DParam ¶m, + const Sound3DCalculator::CalcPanParam &panParam, f32 *pan, f32 *surroundPan +) { + math::VEC3 relativePos; + VEC3Transform(&relativePos, &listener.GetMatrix(), ¶m.position); + f32 distance = math::VEC3Len(&relativePos); + + CalcPanInline( + relativePos, panParam.speakerAngleStereo, listener.GetInteriorSize(), distance, mgr.GetField0x20(), panParam.frontSpeakerAngleDpl2, + panParam.rearSpeakerAngleDpl2, panParam.initPan, pan, surroundPan + ); +} + +void Sound3DCalculator::CalcPitch( + const nw4r::snd::Sound3DManager &mgr, const nw4r::snd::Sound3DListener &listener, + const nw4r::snd::Sound3DParam ¶m, f32 *pPitch +) { + f32 f0 = mgr.GetField0x24(); + if (f0 == 0.0f) { + *pPitch = 1.0f; + return; + } + + math::VEC3 relativePos; + math::VEC3Sub(&relativePos, ¶m.position, &listener.GetPosition()); + f32 distance = VEC3Len(&relativePos); + if (distance > 0.0f) { + relativePos /= distance; + } + f32 f3 = param.field_0x1E / 32.0f; + f32 f1, f2; + if (distance > 0.0f) { + f1 = -math::VEC3Dot(&relativePos, ¶m.velocity); + f2 = -math::VEC3Dot(&relativePos, &listener.GetVelocity()); + } else { + f1 = -math::VEC3Len(¶m.velocity); + f2 = math::VEC3Len(&listener.GetVelocity()); + } + f32 pitch; + f1 *= f3; + f2 *= f3; + if (f2 > f0) { + pitch = 0.0f; + } else if (f1 >= f0) { + pitch = 65535.0f; + } else { + pitch = (f0 - f2) / (f0 - f1); + } + *pPitch = pitch; +} + +void Sound3DCalculator::CalcBiquadFilterValue( + const nw4r::snd::Sound3DManager &mgr, const nw4r::snd::Sound3DListener &listener, + const nw4r::snd::Sound3DParam ¶m, f32 *pBiquadValue +) { + math::VEC3 relativePos; + math::VEC3Sub(&relativePos, ¶m.position, &listener.GetPosition()); + f32 distance = VEC3Len(&relativePos); + + f32 value = 0.0f; + f32 maxVolumeDistance = listener.GetMaxVolumeDistance(); + f32 maxValue = listener.GetUnitBiquadFilterMax(); + + if (distance > maxVolumeDistance) { + value = ((distance - maxVolumeDistance) / listener.GetUnitDistance()) * listener.GetUnitBiquadFilterValue(); + if (value > maxValue) { + value = maxValue; + } + } + *pBiquadValue = value; +} + +void Sound3DCalculator::CalcPanDpl2( + const nw4r::math::VEC3 &relativePos, f32 interiorSize, f32 distance, f32 mPanRange, f32 mFrontSpeakerAngleDpl2, + f32 mRearSpeakerAngleDpl2, f32 mInitPan, f32 *pan, f32 *surroundPan +) { + f32 angle, distanceNrm; + CalcAngleAndDistance(relativePos, distance, interiorSize, &angle, &distanceNrm); + + f32 panLR, panFR; + + f32 angleRearLeft = -mRearSpeakerAngleDpl2; + f32 angleFrontLeft = -mFrontSpeakerAngleDpl2; + f32 angleFrontRight = mFrontSpeakerAngleDpl2; + f32 angleRearRight = mRearSpeakerAngleDpl2; + + // clang-format off + if (angle < angleRearLeft) { + panLR = SolveLinerFunction(angle, -NW4R_MATH_PI, angleRearLeft, -1.0f, 0.0f); + panFR = 1.0f; + } else if (angle < -NW4R_MATH_PI / 2) { + panLR = -1.0f; + panFR = SolveLinerFunction(angle, angleRearLeft, -NW4R_MATH_PI / 2, 0.0f, 1.0f); + } else if (angle < angleFrontLeft) { + panLR = -1.0f; + panFR = SolveLinerFunction(angle, -NW4R_MATH_PI / 2, angleFrontLeft, -1.0f, 0.0f); + } else if (angle < angleFrontRight) { + panLR = SolveLinerFunction(angle, angleFrontLeft, angleFrontRight, 1.0f, -1.0f); + panFR = -1.0f; + } else if (angle < NW4R_MATH_PI / 2) { + panLR = 1.0f; + panFR = SolveLinerFunction(angle, angleFrontRight, NW4R_MATH_PI / 2, 0.0f, -1.0f); + } else if (angle < angleRearRight) { + panLR = 1.0f; + panFR = SolveLinerFunction(angle, NW4R_MATH_PI / 2, angleRearRight, 1.0f, 0.0f); + } else { + panLR = SolveLinerFunction(angle, angleRearRight, NW4R_MATH_PI, 0.0f, 1.0f); + panFR = 1.0f; + } + // clang-format on + + f32 cosAvg = (std::cosf(mFrontSpeakerAngleDpl2) + std::cosf(mRearSpeakerAngleDpl2)) / 2.0f; + + f32 rearFactor = cosAvg / (cosAvg + -std::cosf(mRearSpeakerAngleDpl2)); + + panLR *= mPanRange; + panFR *= mPanRange; + + *pan = panLR * distanceNrm; + + *surroundPan = mInitPan + (1.0f + (panFR * distanceNrm + rearFactor * (1.0f - distanceNrm))); +} + +void Sound3DCalculator::CalcPanStereo( + const nw4r::math::VEC3 &relativePos, f32 interiorSize, f32 distance, f32 panRange, f32 speakerAngleStereo, + f32 *surroundPan, f32 *pan +) { + f32 angle, distanceNrm; + CalcAngleAndDistance(relativePos, distance, interiorSize, &angle, &distanceNrm); + + f32 factor; + + f32 angleRearLeft = -NW4R_MATH_PI + speakerAngleStereo; + f32 angleFrontLeft = -speakerAngleStereo; + f32 angleFrontRight = speakerAngleStereo; + f32 angleRearRight = NW4R_MATH_PI - speakerAngleStereo; + + if (angle < angleRearLeft) { + factor = SolveLinerFunction(angle, -NW4R_MATH_PI, angleRearLeft, -1.0f, 0.0f); + } else if (angle < angleFrontLeft) { + factor = -1.0f; + } else if (angle < angleFrontRight) { + factor = SolveLinerFunction(angle, angleFrontLeft, angleFrontRight, 1.0f, -1.0f); + } else if (angle < angleRearRight) { + factor = 1.0f; + } else { + factor = SolveLinerFunction(angle, angleRearRight, NW4R_MATH_PI, 0.0f, 1.0f); + } + + factor *= panRange; + + *surroundPan = factor * distanceNrm; + *pan = 0.0f; +} + +void Sound3DCalculator::CalcAngleAndDistance( + const nw4r::math::VEC3 &relativePos, f32 distance, f32 interiorSize, f32 *pAngle, f32 *pDistance +) { + math::VEC3 adjustedPos; + + if (0.0f == distance) { + adjustedPos.z = 0.0f; + adjustedPos.y = 0.0f; + adjustedPos.x = 0.0f; + } else { + math::VEC3 relativeXZ(relativePos.x, 0.0f, relativePos.z); + + f32 distanceXZ = VEC3Len(&relativeXZ); + if (distanceXZ > interiorSize) { + relativeXZ.x *= interiorSize / distanceXZ; + relativeXZ.z *= interiorSize / distanceXZ; + } + + f32 ratioXZ = VEC3Len(&relativeXZ); + adjustedPos.x = relativePos.x * ratioXZ / distance; + adjustedPos.y = 0.0f; + adjustedPos.z = relativePos.z * ratioXZ / distance; + } + + *pAngle = atan2(adjustedPos.x, -adjustedPos.z); + *pDistance = VEC3Len(&adjustedPos) / interiorSize; +} + +} // namespace snd +} // namespace nw4r diff --git a/src/nw4r/snd/snd_Sound3DEngine.cpp b/src/nw4r/snd/snd_Sound3DEngine.cpp index e6ddfd4d..7f4f79e7 100644 --- a/src/nw4r/snd/snd_Sound3DEngine.cpp +++ b/src/nw4r/snd/snd_Sound3DEngine.cpp @@ -1 +1,110 @@ -// #include "nw4r/snd/snd_Sound3DEngine.h" +#include "nw4r/snd/snd_Sound3DEngine.h" + +#include "nw4r/snd/snd_Sound3DCalculator.h" +#include "nw4r/snd/snd_Sound3DListener.h" +#include "nw4r/snd/snd_Sound3DManager.h" +#include "nw4r/snd/snd_global.h" + +namespace nw4r { +namespace snd { + +Sound3DEngine::Sound3DEngine() {} + +void Sound3DEngine::UpdateAmbientParam( + const Sound3DManager *mgr, const Sound3DParam *pParam, u32, u32 flags, SoundAmbientParam *pAmbientParam +) { + if (flags & 1) { + pAmbientParam->volume = 0.0f; + } + + if (flags & 8) { + pAmbientParam->priority = -mgr->GetMaxPriorityReduction(); + } + + if (mgr->GetListenerList().GetSize() > 1) { + flags &= -0x17; + } + + NW4R_RANGE_FOR(it, mgr->GetListenerList()) { + const Sound3DListener &listener = *it; + if (flags & 9) { + f32 volume; + int priority; + Sound3DCalculator::CalcVolumeAndPriority(*mgr, listener, *pParam, &volume, &priority); + if (flags & 1) { + pAmbientParam->volume = ut::Max(volume, pAmbientParam->volume); + } + + if (flags & 8) { + pAmbientParam->priority = ut::Max(priority, pAmbientParam->priority); + } + } + if (flags & 6) { + f32 pan, surroundPan; + Sound3DCalculator::CalcPan(*mgr, listener, *pParam, mPanParam, &pan, &surroundPan); + if (flags & 2) { + pAmbientParam->pan = pan; + } + if (flags & 4) { + pAmbientParam->surroundPan = surroundPan; + } + } + + if (flags & 0x10) { + f32 pitch; + Sound3DCalculator::CalcPitch(*mgr, listener, *pParam, &pitch); + pAmbientParam->pitch = pitch; + } + + if (flags & 0x20) { + f32 biquadFilterValue; + Sound3DCalculator::CalcBiquadFilterValue(*mgr, listener, *pParam, &biquadFilterValue); + pAmbientParam->biquadFilterType = mgr->GetBiquadFilterType(); + pAmbientParam->biquadFilterValue = ut::Min(biquadFilterValue, pAmbientParam->biquadFilterValue); + } + } +} + +void Sound3DEngine::UpdateAmbientParam( + const Sound3DManager *mgr, const Sound3DParam *param, u32 unused1, int unused2, SoundAmbientParam *pAmbientParam +) { + u32 flags = 0x1F; + if (param->field_0x18 & 1) { + flags &= ~1; + } + if (param->field_0x18 & 2) { + flags &= ~2; + } + if (param->field_0x18 & 4) { + flags &= ~4; + } + if (param->field_0x18 & 8) { + flags &= ~8; + } + if (!param->field_0x1E) { + flags &= ~0x10; + } + if (param->field_0x18 & 0x10) { + flags |= 0x20; + } + UpdateAmbientParam(mgr, param, unused1, flags, pAmbientParam); +} + +s32 Sound3DEngine::GetAmbientPriority(const Sound3DManager *mgr, const Sound3DParam *param, u32 arg) { + u32 flags = 0x1000008; + if (param->field_0x18 & 8) { + flags &= ~8; + } + + SoundAmbientParam ambientParam; + + UpdateAmbientParam(mgr, param, arg, flags, &ambientParam); + return ambientParam.priority; +} + +s32 Sound3DEngine::GetRequiredVoiceOutCount(const Sound3DManager *, const Sound3DParam *, u32) { + return 1; +} + +} // namespace snd +} // namespace nw4r diff --git a/src/nw4r/snd/snd_Sound3DListener.cpp b/src/nw4r/snd/snd_Sound3DListener.cpp index 9d6a9533..1ec06b11 100644 --- a/src/nw4r/snd/snd_Sound3DListener.cpp +++ b/src/nw4r/snd/snd_Sound3DListener.cpp @@ -1 +1,56 @@ #include "nw4r/snd/snd_Sound3DListener.h" + +namespace nw4r { +namespace snd { + +Sound3DListener::Sound3DListener() + : mPosition(0.0f, 0.0f, 0.0f), + mVelocity(0.0f, 0.0f, 0.0f), + mInteriorSize(1.0f), + mMaxVolumeDistance(1.0f), + mUnitDistance(1.0f), + field_0x54(0), + mSkipVelocityUpdate(1), + mUnitBiquadFilterValue(0.5f), + mUnitBiquadFilterMax(1.0f) { + math::MTX34Zero(&mMtx); +} + +void Sound3DListener::SetMatrix(const math::MTX34 &mtx) { + math::VEC3 prevPosition = mPosition; + + mPosition.x = -(mtx._00 * mtx._03 + mtx._10 * mtx._13 + mtx._20 * mtx._23); + mPosition.y = -(mtx._01 * mtx._03 + mtx._11 * mtx._13 + mtx._21 * mtx._23); + mPosition.z = -(mtx._02 * mtx._03 + mtx._12 * mtx._13 + mtx._22 * mtx._23); + + if (mSkipVelocityUpdate) { + mMtx = mtx; + mSkipVelocityUpdate = 0; + } else { + mMtx = mtx; + VEC3Sub(&mVelocity, &mPosition, &prevPosition); + } +} + +void Sound3DListener::SetInteriorSize(f32 size) { + mInteriorSize = size; +} + +void Sound3DListener::SetMaxVolumeDistance(f32 distance) { + mMaxVolumeDistance = distance; +} + +void Sound3DListener::SetUnitDistance(f32 distance) { + mUnitDistance = distance; +} + +void Sound3DListener::SetUnitBiquadFilterValue(f32 value) { + mUnitBiquadFilterValue = value; +} + +void Sound3DListener::SetUnitBiquadFilterMax(f32 value) { + mUnitBiquadFilterMax = value; +} + +} // namespace snd +} // namespace nw4r diff --git a/src/nw4r/snd/snd_Sound3DManager.cpp b/src/nw4r/snd/snd_Sound3DManager.cpp index 8a75b573..5a65c99a 100644 --- a/src/nw4r/snd/snd_Sound3DManager.cpp +++ b/src/nw4r/snd/snd_Sound3DManager.cpp @@ -1,5 +1,7 @@ #include "nw4r/snd/snd_Sound3DManager.h" + #include "nw4r/snd/snd_AxManager.h" +#include "nw4r/snd/snd_Sound3DEngine.h" #include "nw4r/snd/snd_Sound3DListener.h" #include "nw4r/snd/snd_SoundHandle.h" @@ -11,39 +13,14 @@ namespace nw4r { namespace snd { namespace { -/** - * Solves the linear equation: - * a*x + b*y + c = d - * - * Where: - * a = dFactor - cFactor - * b = dAngle - cAngle - * c = cAngle * cFactor - * d = dAngle * dFactor - */ -inline f32 SolveLinerFunction(f32 x, f32 dAngle, f32 cAngle, f32 dFactor, - f32 cFactor) { // @typo - if (dAngle == cAngle) { - return (dFactor + cFactor) / 2; - } - - f32 b = dAngle - cAngle; - - return x * (cFactor - dFactor) / b + - (dAngle * dFactor - cAngle * cFactor) / b; -} +static Sound3DEngine sEngine; } // namespace Sound3DManager::Sound3DManager() - : mMaxPriorityReduction(32), - mSpeakerAngleStereo(NW4R_MATH_PI / 4), - mFrontSpeakerAngleDpl2(NW4R_MATH_PI / 6), - mRearSpeakerAngleDpl2(2 * NW4R_MATH_PI / 3), - mInitPan(0.0f), - mPanRange(0.9f) {} + : mpEngine(&sEngine), mMaxPriorityReduction(32), field_0x20(0.9f), field_0x24(0.0f), mBiquadFilterType(0) {} -u32 Sound3DManager::GetRequiredMemSize(const SoundArchive* pArchive) { +u32 Sound3DManager::GetRequiredMemSize(const SoundArchive *pArchive) { u32 numParam = 0; SoundArchive::SoundArchivePlayerInfo playerInfo; @@ -53,241 +30,72 @@ u32 Sound3DManager::GetRequiredMemSize(const SoundArchive* pArchive) { numParam += playerInfo.waveSoundCount; } - return numParam * sizeof(Sound3DActorParam); + return numParam * sizeof(Sound3DParam); } -bool Sound3DManager::Setup(const SoundArchive* pArchive, void* pBuffer, - u32 size) { +bool Sound3DManager::Setup(const SoundArchive *pArchive, void *pBuffer, u32 size) { #pragma unused(pArchive) mParamPool.Create(pBuffer, size); return true; } -void Sound3DManager::detail_Update(SoundParam* pParam, u32 id, - detail::BasicSound* pSound, const void* pArg, - u32 flags) { - SoundHandle handle; - if (pSound != NULL) { - handle.detail_AttachSoundAsTempHandle(pSound); - } - - Update(pParam, id, pSound != NULL ? &handle : NULL, pArg, flags); +void Sound3DManager::SetEngine(Sound3DEngine *engine) { + mpEngine = engine; } -void Sound3DManager::Update(SoundParam* pParam, u32 id, SoundHandle* pHandle, - const void* pArg, u32 flags) { -#pragma unused(id) -#pragma unused(pHandle) - - f32 angle; - f32 panLR, panFR; - f32 pan, surroundPan; - - const Sound3DActorParam* pActorParam = - static_cast(pArg); - - Sound3DListener* pListener = GetListener(); - if (pListener == NULL) { - pParam->volume = 0.0f; - return; - } - - math::VEC3 relativePos; - VEC3Transform(&relativePos, &pListener->GetMatrix(), - &pActorParam->position); - - f32 distance = VEC3Len(&relativePos); - f32 volume = 1.0f; - - if ((flags & (PARAM_UPDATE_VOLUME | PARAM_UPDATE_PRIORITY)) && - distance > pListener->GetMaxVolumeDistance()) { - - switch (pActorParam->soundParam.decayCurve) { - case DECAY_CURVE_LOGARITHMIC: { - f32 units = (distance - pListener->GetMaxVolumeDistance()) / - pListener->GetUnitDistance(); - - volume = - std::pow(pActorParam->soundParam.decayRatio / 256.0f, units); - break; - } - - case DECAY_CURVE_LINEAR: { - f32 units = (distance - pListener->GetMaxVolumeDistance()) / - pListener->GetUnitDistance() * - pActorParam->soundParam.decayRatio; - - units = units / 256.0f; - volume = ut::Max(0.0f, 1.0f - units); - break; - } - } - } - - if ((flags & PARAM_UPDATE_VOLUME) && - !(pActorParam->soundParam.flags & PARAM_UPDATE_VOLUME)) { - - pParam->volume = volume; - } - - if (flags & (PARAM_UPDATE_PAN | PARAM_UPDATE_SURROUND_PAN)) { - math::VEC3 adjustedPos; - - if (0.0f == distance) { - adjustedPos.z = 0.0f; - adjustedPos.y = 0.0f; - adjustedPos.x = 0.0f; - } else { - math::VEC3 relativeXZ(relativePos.x, 0.0f, relativePos.z); - - f32 distanceXZ = VEC3Len(&relativeXZ); - if (distanceXZ > pListener->GetInteriorSize()) { - relativeXZ.x *= pListener->GetInteriorSize() / distanceXZ; - relativeXZ.z *= pListener->GetInteriorSize() / distanceXZ; - } - - f32 ratioXZ = VEC3Len(&relativeXZ); - adjustedPos.x = relativePos.x * ratioXZ / distance; - adjustedPos.y = 0.0f; - adjustedPos.z = relativePos.z * ratioXZ / distance; - } - - angle = atan2(adjustedPos.x, -adjustedPos.z); - f32 distanceNrm = VEC3Len(&adjustedPos) / pListener->GetInteriorSize(); - - switch (detail::AxManager::GetInstance().GetOutputMode()) { - case OUTPUT_MODE_SURROUND: - case OUTPUT_MODE_DPL2: { - static f32 angleRearLeft = -mRearSpeakerAngleDpl2; - static f32 angleFrontLeft = -mFrontSpeakerAngleDpl2; - static f32 angleFrontRight = mFrontSpeakerAngleDpl2; - static f32 angleRearRight = mRearSpeakerAngleDpl2; - - // clang-format off - if (angle < angleRearLeft) { - panLR = SolveLinerFunction(angle, -NW4R_MATH_PI, angleRearLeft, -1.0f, 0.0f); - panFR = 1.0f; - } else if (angle < -NW4R_MATH_PI / 2) { - panLR = -1.0f; - panFR = SolveLinerFunction(angle, angleRearLeft, -NW4R_MATH_PI / 2, 0.0f, 1.0f); - } else if (angle < angleFrontLeft) { - panLR = -1.0f; - panFR = SolveLinerFunction(angle, -NW4R_MATH_PI / 2, angleFrontLeft, -1.0f, 0.0f); - } else if (angle < angleFrontRight) { - panLR = SolveLinerFunction(angle, angleFrontLeft, angleFrontRight, 1.0f, -1.0f); - panFR = -1.0f; - } else if (angle < NW4R_MATH_PI / 2) { - panLR = 1.0f; - panFR = SolveLinerFunction(angle, angleFrontRight, NW4R_MATH_PI / 2, 0.0f, -1.0f); - } else if (angle < angleRearRight) { - panLR = 1.0f; - panFR = SolveLinerFunction(angle, NW4R_MATH_PI / 2, angleRearRight, 1.0f, 0.0f); - } else { - panLR = SolveLinerFunction(angle, angleRearRight, NW4R_MATH_PI, 0.0f, 1.0f); - panFR = 1.0f; - } - // clang-format on - - f32 cosAvg = (std::cosf(mFrontSpeakerAngleDpl2) + - std::cosf(mRearSpeakerAngleDpl2)) / - 2.0f; - - f32 rearFactor = - cosAvg / (cosAvg + -std::cosf(mRearSpeakerAngleDpl2)); - - panLR *= mPanRange; - panFR *= mPanRange; - - pan = panLR * distanceNrm; - - surroundPan = - mInitPan + (1.0f + (panFR * distanceNrm + - rearFactor * (1.0f - distanceNrm))); - break; - } - - case OUTPUT_MODE_STEREO: { - static f32 angleRearLeft = -NW4R_MATH_PI + mSpeakerAngleStereo; - static f32 angleFrontLeft = -mSpeakerAngleStereo; - static f32 angleFrontRight = mSpeakerAngleStereo; - static f32 angleRearRight = NW4R_MATH_PI - mSpeakerAngleStereo; - - // clang-format off - if (angle < angleRearLeft) { - panLR = SolveLinerFunction(angle, -NW4R_MATH_PI, angleRearLeft, -1.0f, 0.0f); - panFR = 1.0f; - } else if (angle < angleFrontLeft) { - panLR = -1.0f; - panFR = SolveLinerFunction(angle, angleRearLeft, angleFrontLeft, -1.0f, 1.0f); - } else if (angle < angleFrontRight) { - panLR = SolveLinerFunction(angle, angleFrontLeft, angleFrontRight, 1.0f, -1.0f); - panFR = -1.0f; - } else if (angle < angleRearRight) { - panLR = 1.0f; - panFR = SolveLinerFunction(angle, angleFrontRight, angleRearRight, 1.0f, -1.0f); - } else { - panLR = SolveLinerFunction(angle, angleRearRight, NW4R_MATH_PI, 0.0f, 1.0f); - panFR = 1.0f; - } - // clang-format on - - panLR *= mPanRange; - panFR *= mPanRange; - - surroundPan = 1.0f + panFR * distanceNrm; - pan = panLR * distanceNrm; - break; - } - - case OUTPUT_MODE_MONO: - default: { - pan = 0.0f; - surroundPan = 0.0f; - break; - } - } - } - - if ((flags & PARAM_UPDATE_PAN) && - !(pActorParam->soundParam.flags & PARAM_UPDATE_PAN)) { - - pParam->pan = pan; - } - - if ((flags & PARAM_UPDATE_SURROUND_PAN) && - !(pActorParam->soundParam.flags & PARAM_UPDATE_SURROUND_PAN)) { - - pParam->surroundPan = surroundPan; - } - - if ((flags & PARAM_UPDATE_PRIORITY) && - !(pActorParam->soundParam.flags & PARAM_UPDATE_PRIORITY)) { - - pParam->priority = - -static_cast((1.0f - volume) * GetMaxPriorityReduction()); +void Sound3DManager::detail_UpdateAmbientParam( + const void *param, u32 unused1, int unused2, SoundAmbientParam *ambientParam +) { + const Sound3DParam *p = static_cast(param); + if (mpEngine != NULL) { + mpEngine->UpdateAmbientParam(this, p, unused1, unused2, ambientParam); } } -void* Sound3DManager::detail_AllocAmbientArg(u32 size) { - if (size != sizeof(Sound3DActorParam)) { +int Sound3DManager::detail_GetAmbientPriority(const void *param, u32 arg) { + int result = 0; + if (mpEngine != NULL) { + const Sound3DParam *p = static_cast(param); + result = mpEngine->GetAmbientPriority(this, p, arg); + } + return result; +} + +int Sound3DManager::detail_GetRequiredVoiceOutCount(const void *param, u32 arg) { + int result = 1; + if (mpEngine != NULL) { + const Sound3DParam *p = static_cast(param); + result = mpEngine->GetRequiredVoiceOutCount(this, p, arg); + } + return result; +} + +void *Sound3DManager::detail_AllocAmbientArg(u32 size) { + if (size != sizeof(Sound3DParam)) { return NULL; } return mParamPool.Alloc(); } -void Sound3DManager::detail_FreeAmbientArg(void* pArg, - const detail::BasicSound* pSound) { +void Sound3DManager::detail_FreeAmbientArg(void *pArg, const detail::BasicSound *pSound) { #pragma unused(pSound) - mParamPool.Free(static_cast(pArg)); + mParamPool.Free(static_cast(pArg)); } -Sound3DManager::Sound3DActorParam::Sound3DActorParam() : userParam(-1) { - soundParam.flags = 0; - soundParam.decayCurve = DECAY_CURVE_LOGARITHMIC; - soundParam.decayRatio = 128; +void Sound3DManager::SetBiquadFilterType(int type) { + mBiquadFilterType = type; +} + +Sound3DParam::Sound3DParam() { + field_0x18 = 0; + decayCurve = Sound3DManager::DECAY_CURVE_LOGARITHMIC; + decayRatio = 128; + field_0x1E = 0; + userParam = 0; + field_0x24 = 0; } } // namespace snd diff --git a/src/nw4r/snd/snd_SoundActor.cpp b/src/nw4r/snd/snd_SoundActor.cpp index c390dc15..6c286dc9 100644 --- a/src/nw4r/snd/snd_SoundActor.cpp +++ b/src/nw4r/snd/snd_SoundActor.cpp @@ -8,9 +8,65 @@ #include "nw4r/snd/snd_SoundArchivePlayer.h" -nw4r::snd::SoundActor::SoundActor() : - mSoundArchivePlayer (*new SoundArchivePlayer) +namespace nw4r { namespace snd { + +SoundActor::SoundActor(SoundArchivePlayer &player) : + mSoundArchivePlayer (player) { - // DECOMP_FORCE_CLASS_METHOD - (void)mSoundArchivePlayer.detail_ConvertLabelStringToSoundId(nullptr); + + for (int i = 0; i < ACTOR_PLAYER_COUNT; i++) + { + mActorPlayer[i].SetPlayableSoundCount(i == 0 ? INT_MAX : 1); + } } + +SoundActor::~SoundActor() +{ + for (int i = 0; i < ACTOR_PLAYER_COUNT; i++) + { + mActorPlayer[i].DetachSoundActorAll(this); + } +} + +void SoundActor::StopAllSound(int fadeFrames) +{ + for (int i = 0; i < ACTOR_PLAYER_COUNT; i++) + { + mActorPlayer[i].StopAllSound(fadeFrames); + } +} + +void SoundActor::PauseAllSound(bool flag, int fadeFrames) +{ + for (int i = 0; i < ACTOR_PLAYER_COUNT; i++) + { + mActorPlayer[i].PauseAllSound(flag, fadeFrames); + } +} + +int SoundActor::GetPlayingSoundCount(int playerId) const +{ + return mActorPlayer[playerId].GetPlayingSoundCount(); +} + +SoundStartable::StartResult SoundActor::SetupSound(SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void* arg) +{ + return mSoundArchivePlayer.detail_SetupSoundImpl(pHandle, soundId, nullptr, this, *(bool*)arg, pStartInfo); +} + +SoundStartable::StartResult SoundActor::detail_SetupSoundWithAmbientInfo(SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, detail::BasicSound::AmbientInfo *pAmbientInfo, void* arg) +{ + return mSoundArchivePlayer.detail_SetupSoundImpl(pHandle, soundId, pAmbientInfo, this, *(bool*)arg, pStartInfo); +} + +SoundStartable::StartResult SoundActor::detail_SetupSound(SoundHandle *pHandle, u32 soundId, bool holdFlag, const StartInfo *pStartInfo) +{ + return SetupSound(pHandle, soundId, pStartInfo, &holdFlag); +} + +u32 SoundActor::detail_ConvertLabelStringToSoundId(const char* label) +{ + return mSoundArchivePlayer.detail_ConvertLabelStringToSoundId(label); +} + +}} diff --git a/src/nw4r/snd/snd_SoundArchive.cpp b/src/nw4r/snd/snd_SoundArchive.cpp index e00a0f08..fd6a8fef 100644 --- a/src/nw4r/snd/snd_SoundArchive.cpp +++ b/src/nw4r/snd/snd_SoundArchive.cpp @@ -89,6 +89,10 @@ u32 SoundArchive::ConvertLabelStringToGroupId(const char* pLabel) const { return mFileReader->ConvertLabelStringToGroupId(pLabel); } +u32 SoundArchive::ConvertLabelStringToBankId(const char* pLabel) const { + return mFileReader->ConvertLabelStringToBankId(pLabel); +} + u32 SoundArchive::GetSoundUserParam(u32 id) const { return mFileReader->GetSoundUserParam(id); } @@ -131,6 +135,11 @@ bool SoundArchive::ReadSoundArchivePlayerInfo( return mFileReader->ReadSoundArchivePlayerInfo(info); } +bool SoundArchive::detail_ReadSound3DParam(u32 soundId, nw4r::snd::SoundArchive::Sound3DParam* info) const +{ + return mFileReader->ReadSound3DParam(soundId, info); +} + bool SoundArchive::ReadBankInfo(u32 bankId, BankInfo *info) const { return mFileReader->ReadBankInfo(bankId, info); diff --git a/src/nw4r/snd/snd_SoundArchiveFile.cpp b/src/nw4r/snd/snd_SoundArchiveFile.cpp index 802422aa..e202a085 100644 --- a/src/nw4r/snd/snd_SoundArchiveFile.cpp +++ b/src/nw4r/snd/snd_SoundArchiveFile.cpp @@ -200,12 +200,30 @@ bool SoundArchiveFileReader::ReadSoundInfo(u32 soundId, return true; } - +#if 0 /* SoundArchiveFileReader::ReadSound3DParam * ([R89JEL]:/bin/RVL/Debug/mainD.MAP:14110) */ DECOMP_FORCE(Util::GetDataRefAddress0( *(Util::DataRef *)(nullptr), nullptr)); +#endif + +bool SoundArchiveFileReader::ReadSound3DParam(u32 soundId, SoundArchive::Sound3DParam *param) const { + SoundArchiveFile::SoundCommonInfo const *src = impl_GetSoundInfo(soundId); + if (!src) + return false; + + SoundArchiveFile::Sound3DParam const *arParam = + Util::GetDataRefAddress0(src->param3dRef, mInfo); + if (!arParam) + return false; + + param->flags = arParam->flags; + param->decayCurve = arParam->decayCurve; + param->decayRatio = arParam->decayRatio; + param->field_0x06 = arParam->field_0x06; + return true; +} bool SoundArchiveFileReader::ReadSeqSoundInfo( u32 soundId, SoundArchive::SeqSoundInfo *info) const @@ -374,11 +392,21 @@ bool SoundArchiveFileReader::ReadSoundArchivePlayerInfo( return true; } +u32 SoundArchiveFileReader::GetSoundStringId(u32 id) const { + const SoundArchiveFile::SoundCommonInfo* pInfo = impl_GetSoundInfo(id); + + if (pInfo == NULL) { + return SoundArchive::INVALID_ID; + } + + return pInfo->stringId; +} + u32 SoundArchiveFileReader::GetPlayerCount() const { SoundArchiveFile::PlayerInfoTable const *table = Util::GetDataRefAddress0(mInfo->playerTableRef, mInfo); - if (!table) + if (table == NULL) return false; return table->count; @@ -388,21 +416,37 @@ u32 SoundArchiveFileReader::GetGroupCount() const { SoundArchiveFile::GroupInfoTable const *table = Util::GetDataRefAddress0(mInfo->groupTableRef, mInfo); - if (!table) + if (table == NULL) return false; // TODO: why - 1? return table->count - 1; } +#if 0 DECOMP_FORCE(Util::GetDataRefAddress0( *(Util::DataRef *)(nullptr), nullptr)); +#endif + +const char* SoundArchiveFileReader::GetSoundLabelString(u32 id) const { + return GetString(GetSoundStringId(id)); +} + +u32 SoundArchiveFileReader::GetSoundUserParam(u32 id) const { + const SoundArchiveFile::SoundCommonInfo* pInfo = impl_GetSoundInfo(id); + + if (pInfo == NULL) { + return 0; + } + + return pInfo->userParam[0]; +} u32 SoundArchiveFileReader::GetFileCount() const { SoundArchiveFile::FileInfoTable const *table = Util::GetDataRefAddress0(mInfo->fileTableRef, mInfo); - if (!table) + if (table == NULL) return false; return table->count; diff --git a/src/nw4r/snd/snd_SoundArchiveLoader.cpp b/src/nw4r/snd/snd_SoundArchiveLoader.cpp index 57c8b893..c7b726e8 100644 --- a/src/nw4r/snd/snd_SoundArchiveLoader.cpp +++ b/src/nw4r/snd/snd_SoundArchiveLoader.cpp @@ -2,6 +2,9 @@ #include "nw4r/snd/snd_SoundArchive.h" #include "nw4r/snd/snd_SoundMemoryAllocatable.h" +#include "nw4r/types_nw4r.h" +#include "nw4r/ut/ut_FileStream.h" +#include "rvl/OS/OSMutex.h" namespace nw4r { namespace snd { @@ -134,6 +137,46 @@ void* SoundArchiveLoader::LoadGroup(u32 id, return pGroupBuffer; } +s32 SoundArchiveLoader::ReadFile(u32 id, void *dst, s32 size, s32 offset) { + ut::detail::AutoLock lock(mMutex); + + FileStreamHandle fileHandle(mArc.detail_OpenFileStream(id, mStreamArea, sizeof(mStreamArea))); + if (!fileHandle) + return -1; + + if (!fileHandle->CanSeek() || !fileHandle->CanRead()) + return -1; + + fileHandle->Seek(offset, ut::FileStream::SEEKORG_BEG); + mStream = fileHandle.GetFileStream(); + s32 read = mStream->Read(dst, ut::RoundUp(size, 32)); + mStream = NULL; + if (read < 0) + return -1; + + return size; +} + +void *SoundArchiveLoader::LoadFile(u32 id, SoundMemoryAllocatable* pAllocatable) { + SoundArchive::FileInfo info; + if (!mArc.detail_ReadFileInfo(id, &info)) + return NULL; + + u32 size = info.fileSize; + if (size == 0) + return NULL; + + void *buf = pAllocatable->Alloc(size); + if (buf == NULL) + return NULL; + + if (ReadFile(id, buf, size, 0) != size) { + return NULL; + } + DCStoreRange(buf, size); + return buf; +} + } // namespace detail } // namespace snd } // namespace nw4r diff --git a/src/nw4r/snd/snd_SoundArchivePlayer.cpp b/src/nw4r/snd/snd_SoundArchivePlayer.cpp index 8e9019d6..93996870 100644 --- a/src/nw4r/snd/snd_SoundArchivePlayer.cpp +++ b/src/nw4r/snd/snd_SoundArchivePlayer.cpp @@ -517,16 +517,18 @@ SoundPlayer &SoundArchivePlayer::GetSoundPlayer(u32 playerId) return mSoundPlayers[playerId]; } +#if 0 /* SoundArchivePlayer::GetSoundPlayer(char const *) * ([R89JEL]:/bin/RVL/Debug/mainD.MAP:14216) */ DECOMP_FORCE(NW4RAssertPointerNonnull_String(mSoundArchive)); +#endif void const *SoundArchivePlayer::detail_GetFileAddress(u32 fileId) const { if (mFileManager) { - if (void const *addr = mFileManager->at_0x08(fileId)) + if (void const *addr = mFileManager->GetFileAddress(fileId)) return addr; } @@ -567,7 +569,7 @@ void const *SoundArchivePlayer::detail_GetFileWaveDataAddress(u32 fileId) const { if (mFileManager) { - if (void const *addr = mFileManager->at_0x0c(fileId)) + if (void const *addr = mFileManager->GetFileWaveDataAddress(fileId)) return addr; } @@ -621,9 +623,19 @@ void const *SoundArchivePlayer::GetGroupAddress(u32 groupId) const return mGroupTable->item[groupId].address; } +#if 0 // SoundArchivePlayer::SetGroupAddress ([R89JEL]:/bin/RVL/Debug/mainD.MAP:14220) DECOMP_FORCE("Failed to SoundArchivePlayer::SetGroupAddress because group " "table is not allocated.\n"); +#endif + +void SoundArchivePlayer::SetGroupAddress(u32 id, const void* pAddr) +{ + if (mGroupTable == NULL) + return; + + mGroupTable->item[id].address = pAddr; +} void const *SoundArchivePlayer::GetGroupWaveDataAddress(u32 groupId) const { @@ -643,6 +655,15 @@ void const *SoundArchivePlayer::GetGroupWaveDataAddress(u32 groupId) const return mGroupTable->item[groupId].waveDataAddress; } +void SoundArchivePlayer::SetGroupWaveDataAddress(u32 id, const void* pAddr) +{ + if (mGroupTable == NULL) + return; + + mGroupTable->item[id].waveDataAddress = pAddr; +} + +#if 0 /* SoundArchivePlayer::SetGroupWaveDataAddress * ([R89JEL]:/bin/RVL/Debug/mainD.MAP:14222) */ @@ -660,6 +681,7 @@ DECOMP_FORCE("Failed to SoundArchivePlayer::SetFileAddress because file table " DECOMP_FORCE(NW4RAssertHeaderClampedLValue_String(fileId)); DECOMP_FORCE("Failed to SoundArchivePlayer::SetFileWaveDataAddress because " "file table is not allocated.\n"); +#endif void const *SoundArchivePlayer::GetFileAddress(u32 fileId) const { @@ -1323,10 +1345,12 @@ void SoundArchivePlayer::UpdateCommonSoundParam( sound->SetPanCurve(commonInfo->panCurve); } +#if 0 /* SoundArchivePlayer::LoadGroup(u32, SoundMemoryAllocatable *, u32) * ([R89JEL]:/bin/RVL/Debug/mainD.MAP:14234) */ DECOMP_FORCE(NW4RAssertAligned_String(loadBlockSize, 32)); +#endif bool SoundArchivePlayer::LoadGroup(u32 id, SoundMemoryAllocatable* pAllocatable, u32 blockSize) { @@ -1373,6 +1397,12 @@ bool SoundArchivePlayer::LoadGroup(const char* pLabel, return LoadGroup(id, pAllocatable, blockSize); } +bool SoundArchivePlayer::IsLoadedGroup(u32 groupId) const +{ + void const *groupAddress = GetGroupAddress(groupId); + return groupAddress != NULL; +} + void SoundArchivePlayer::InvalidateData(void const *start, void const *end) { if (mFileTable) diff --git a/src/nw4r/snd/snd_SoundHandle.cpp b/src/nw4r/snd/snd_SoundHandle.cpp index bc785840..7998d007 100644 --- a/src/nw4r/snd/snd_SoundHandle.cpp +++ b/src/nw4r/snd/snd_SoundHandle.cpp @@ -28,9 +28,11 @@ void SoundHandle::detail_AttachSoundAsTempHandle(detail::BasicSound* pSound) { mSound->DetachTempGeneralHandle(); } + /* if (mSound->IsAttachedTempSpecialHandle()) { mSound->DetachTempSpecialHandle(); } + */ mSound->mTempGeneralHandle = this; } diff --git a/src/nw4r/snd/snd_SoundPlayer.cpp b/src/nw4r/snd/snd_SoundPlayer.cpp index 81e1f800..112135ec 100644 --- a/src/nw4r/snd/snd_SoundPlayer.cpp +++ b/src/nw4r/snd/snd_SoundPlayer.cpp @@ -40,8 +40,12 @@ SoundPlayer::SoundPlayer() : mBiquadValue (0.0f), mMainSend (0.0f) { + for (int i = 0; i < 4; i++) + mRemoteOutVolume[i] = 1.0f; + for (int i = 0; i < AUX_BUS_NUM; i++) mFxSend[i] = 0.0f; + } SoundPlayer::~SoundPlayer() @@ -87,6 +91,30 @@ void SoundPlayer::PauseAllSound(bool flag, int fadeFrames) } } +void SoundPlayer::SetVolume(f32 volume) +{ + if (volume < 0.0f) + volume = 0.0f; + + mVolume = volume; +} + +void SoundPlayer::SetLpfFreq(f32 freq) +{ + mLpfFreq = freq; +} + +f32 SoundPlayer::GetRemoteOutVolume(int remote) const +{ + return mRemoteOutVolume[remote]; +} + +void SoundPlayer::SetFxSend(AuxBus bus, f32 send) +{ + mFxSend[bus] = send; +} + +#if 0 // SoundPlayer::SetVolume ([R89JEL]:/bin/RVL/Debug/mainD.MAP:14397) /* also __FILE__ because this is the first assert in the file so it needs to * reference that first as well @@ -96,6 +124,7 @@ DECOMP_FORCE(NW4RAssert_String(volume >= 0.0f)); // SoundPlayer::SetFxSend ([R89JEL]:/bin/RVL/Debug/mainD.MAP:14405) DECOMP_FORCE(NW4RAssertHeaderClampedLValue_String(bus)); +#endif void SoundPlayer::RemoveSoundList(detail::BasicSound *sound) { diff --git a/src/nw4r/snd/snd_SoundStartable.cpp b/src/nw4r/snd/snd_SoundStartable.cpp index 4488ef60..f098d1d8 100644 --- a/src/nw4r/snd/snd_SoundStartable.cpp +++ b/src/nw4r/snd/snd_SoundStartable.cpp @@ -31,6 +31,16 @@ SoundStartable::StartResult SoundStartable::detail_StartSound( return START_SUCCESS; } +SoundStartable::StartResult SoundStartable::detail_StartSound( + SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo) +{ + u32 soundId = detail_ConvertLabelStringToSoundId(label); + if (soundId == -1) + return START_ERR_INVALID_LABEL_STRING; + + return detail_StartSound(pHandle, soundId, pStartInfo); +} + SoundStartable::StartResult SoundStartable::detail_HoldSound( SoundHandle *handle, u32 soundId, StartInfo const *startInfo) { @@ -49,4 +59,32 @@ SoundStartable::StartResult SoundStartable::detail_HoldSound( return START_SUCCESS; } +SoundStartable::StartResult SoundStartable::detail_HoldSound( + SoundHandle *pHandle, const char *label, const StartInfo *pStartInfo) +{ + u32 soundId = detail_ConvertLabelStringToSoundId(label); + if (soundId == -1) + return START_ERR_INVALID_LABEL_STRING; + + return detail_HoldSound(pHandle, soundId, pStartInfo); +} + +SoundStartable::StartResult SoundStartable::detail_PrepareSound( + SoundHandle *pHandle, u32 id, + const StartInfo *pStartInfo) +{ + return detail_SetupSound(pHandle, id, false, pStartInfo); +} + +SoundStartable::StartResult SoundStartable::detail_PrepareSound( + SoundHandle *pHandle, const char *label, + const StartInfo *pStartInfo) +{ + u32 soundId = detail_ConvertLabelStringToSoundId(label); + if (soundId == -1) + return START_ERR_INVALID_LABEL_STRING; + + return detail_PrepareSound(pHandle, soundId, pStartInfo); +} + }} // namespace nw4r::snd diff --git a/src/nw4r/snd/snd_SoundSystem.cpp b/src/nw4r/snd/snd_SoundSystem.cpp index ef27f5a5..9a13738c 100644 --- a/src/nw4r/snd/snd_SoundSystem.cpp +++ b/src/nw4r/snd/snd_SoundSystem.cpp @@ -15,6 +15,7 @@ #include "nw4r/snd/snd_AxVoiceManager.h" #include "nw4r/snd/snd_AxManager.h" #include "nw4r/snd/snd_Channel.h" // ChannelManager +#include "nw4r/snd/snd_RemoteSpeakerManager.h" #include "nw4r/snd/snd_global.h" #include "nw4r/snd/snd_SeqPlayer.h" #include "nw4r/snd/snd_SoundThread.h" @@ -37,9 +38,9 @@ #define BUILDSTAMP_LIB_NAME "SND" // You probably want to change these -#define BUILDSTAMP_BUILD_TYPE "release" -#define BUILDSTAMP_DATE __DATE__ -#define BUILDSTAMP_TIME __TIME__ +#define BUILDSTAMP_BUILD_TYPE "final " +#define BUILDSTAMP_DATE "Sep 25 2011" +#define BUILDSTAMP_TIME "05:32:58" #define BUILDSTAMP_CW_MAJOR_REV STR(__CWCC__) #define BUILDSTAMP_CW_MINOR_REV STR(__CWBUILD__) @@ -159,6 +160,8 @@ void SoundSystem::InitSoundSystem(SoundSystemParam const ¶m, void *workMem, break; } + detail::RemoteSpeakerManager::GetInstance().Setup(); + byte_t *ptr = static_cast(workMem); void *dvdThreadStack = ptr; @@ -245,7 +248,9 @@ void SoundSystem::WaitForResetReady() { } } } +#if 0 // SoundSystem::WaitForResetReady ([R89JEL]:/bin/RVL/Debug/mainD.MAP:14493) DECOMP_FORCE("SoundSystem::WaitForResetReady is TIME OUT.\n"); +#endif }} // namespace nw4r::snd diff --git a/src/nw4r/snd/snd_SoundThread.cpp b/src/nw4r/snd/snd_SoundThread.cpp index 2a8ca309..571458af 100644 --- a/src/nw4r/snd/snd_SoundThread.cpp +++ b/src/nw4r/snd/snd_SoundThread.cpp @@ -35,7 +35,8 @@ namespace nw4r { namespace snd { namespace detail { SoundThread::SoundThread() : mStackEnd (nullptr), - mCreateFlag (false) + mCreateFlag (false), + field_0x395 (false) { OSInitMessageQueue(&mMsgQueue, mMsgBuffer, THREAD_MESSAGE_BUFSIZE); OSInitThreadQueue(&mThreadQueue); @@ -96,8 +97,10 @@ void SoundThread::AxCallbackFunc() void SoundThread::AxCallbackProc() { - BOOL result ATTR_UNUSED = - OSSendMessageAny(&mMsgQueue, MESSAGE_AX_CALLBACK, OS_MESSAGE_NO_FLAGS); + if (!field_0x395) { + BOOL result ATTR_UNUSED = + OSSendMessageAny(&mMsgQueue, MESSAGE_AX_CALLBACK, OS_MESSAGE_NO_FLAGS); + } NW4R_RANGE_FOR_NO_AUTO_INC(itr, mPlayerCallbackList) { @@ -123,6 +126,7 @@ void *SoundThread::SoundThreadFunc(void *arg) return nullptr; } +#if 0 /* SoundThread::RegisterSoundFrameCallback * ([R89JEL]:/bin/RVL/Debug/mainD.MAP:14509) */ @@ -134,6 +138,7 @@ DECOMP_FORCE_CLASS_METHOD(SoundThread::SoundFrameCallback::LinkList, */ DECOMP_FORCE_CLASS_METHOD(SoundThread::SoundFrameCallback::LinkList, Erase(nullptr)); +#endif void SoundThread::RegisterPlayerCallback(PlayerCallback *callback) { @@ -159,42 +164,7 @@ void SoundThread::SoundThreadProc() if (reinterpret_cast(message) == MESSAGE_AX_CALLBACK) { - ut::detail::AutoLock lock(mMutex); - - NW4R_RANGE_FOR_NO_AUTO_INC(itr, mSoundFrameCallbackList) - { - decltype(itr) curItr = itr++; - - curItr->at_0x0c(); - } - - OSTick tick = OSGetTick(); - - { - // Sound frame - AxVoiceManager::GetInstance().FreeAllReservedAxVoice(); - AxManager::GetInstance().Update(); - - NW4R_RANGE_FOR_NO_AUTO_INC(itr, mPlayerCallbackList) - { - decltype(itr) curItr = itr++; - - curItr->OnUpdateFrameSoundThread(); - } - - ChannelManager::GetInstance().UpdateAllChannel(); - (void)Util::CalcRandom(); // ? - VoiceManager::GetInstance().UpdateAllVoices(); - } - - mProcessTick = OSGetTick() - tick; - - NW4R_RANGE_FOR_NO_AUTO_INC(itr, mSoundFrameCallbackList) - { - decltype(itr) curItr = itr++; - - curItr->at_0x10(); - } + FrameProcess(); } else if (reinterpret_cast(message) == MESSAGE_SHUTDOWN) { @@ -212,4 +182,44 @@ void SoundThread::SoundThreadProc() } } +void SoundThread::FrameProcess() +{ + ut::detail::AutoLock lock(mMutex); + + NW4R_RANGE_FOR_NO_AUTO_INC(itr, mSoundFrameCallbackList) + { + decltype(itr) curItr = itr++; + + curItr->at_0x0c(); + } + + OSTick tick = OSGetTick(); + + { + // Sound frame + AxVoiceManager::GetInstance().FreeAllReservedAxVoice(); + AxManager::GetInstance().Update(); + + NW4R_RANGE_FOR_NO_AUTO_INC(itr, mPlayerCallbackList) + { + decltype(itr) curItr = itr++; + + curItr->OnUpdateFrameSoundThread(); + } + + ChannelManager::GetInstance().UpdateAllChannel(); + (void)Util::CalcRandom(); // ? + VoiceManager::GetInstance().UpdateAllVoices(); + } + + mProcessTick = OSGetTick() - tick; + + NW4R_RANGE_FOR_NO_AUTO_INC(itr, mSoundFrameCallbackList) + { + decltype(itr) curItr = itr++; + + curItr->at_0x10(); + } +} + }}} // namespace nw4r::snd::detail diff --git a/src/nw4r/snd/snd_StrmPlayer.cpp b/src/nw4r/snd/snd_StrmPlayer.cpp index 0a6f74d1..6833aca5 100644 --- a/src/nw4r/snd/snd_StrmPlayer.cpp +++ b/src/nw4r/snd/snd_StrmPlayer.cpp @@ -48,7 +48,7 @@ namespace nw4r { namespace snd { namespace detail { // .bss - byte_t StrmPlayer::sLoadBuffer[LOAD_BUFFER_SIZE]; + byte_t ALIGN_DECL(32) StrmPlayer::sLoadBuffer[LOAD_BUFFER_SIZE]; OSMutex StrmPlayer::sLoadBufferMutex; // .sbss @@ -375,10 +375,61 @@ void StrmPlayer::Pause(bool flag) UpdatePauseStatus(); } +void float_order_snd_StrmPlayer() { + 0.0f; + int zero = 0; + unsigned uzero = 0; + f32 z = zero; + z = uzero; +} +#if 0 // Some functions in between idk DECOMP_FORCE(0.0f); DECOMP_FORCE(SI2D_CONSTANT); DECOMP_FORCE(UI2D_CONSTANT); +#endif + +bool StrmPlayer::ReadStrmDataInfo(StrmDataInfo* info) const +{ + SoundThread::AutoLock lock; + + if (!mPreparedFlag) + return false; + + info->loopFlag = mStrmInfo.loopFlag != 0; + info->sampleRate = mStrmInfo.sampleRate; + info->loopStart = mStrmInfo.loopStart; + info->loopEnd = mStrmInfo.loopEnd; + + return true; +} + +u32 StrmPlayer::GetPlaySamplePosition() const +{ + SoundThread::AutoLock lock; + + if (!mActiveFlag) + return -1; + + if (!mTracks[0].mActiveFlag) + return -1; + + if (!mPreparedFlag) + return 0; + + u32 sample = 0; + u32 t1; + { + ut::AutoInterruptLock lock2; + + if (mTracks[0].mVoice) + sample = mTracks[0].mVoice->GetCurrentPlayingSample(); + + t1 = mPlayingDataBlockIndex - mPlayingBufferBlockIndex; + } + u32 t2 = t1 * mStrmInfo.blockSamples; + return t2 + sample; +} void StrmPlayer::InitParam() { @@ -836,6 +887,10 @@ void StrmPlayer::UpdateVoiceParams(StrmTrack *track) fxsend[i] += GetFxSend(static_cast(i)); } + f32 remoteOutVolume[4]; + for (int i = 0; i < 4; i++) + remoteOutVolume[i] = GetRemoteOutVolume(i); + ut::AutoInterruptLock lock; if (Voice *voice = track->mVoice) @@ -857,6 +912,9 @@ void StrmPlayer::UpdateVoiceParams(StrmTrack *track) voice->SetFxSend(bus, fxsend[i]); } + for (int i = 0; i < 4; i++) + voice->SetRemoteOutVolume(i, remoteOutVolume[i]); + for (int i = 0; i < mVoiceOutCount; i++) voice->SetVoiceOutParam(i, GetVoiceOutParam(i)); } @@ -893,6 +951,9 @@ void StrmPlayer::UpdateBuffer() if (!voice) return; + if (!voice->IsRun()) + return; + if (CheckDiskDriveError()) { mLoadWaitFlag = true; diff --git a/src/nw4r/snd/snd_StrmSound.cpp b/src/nw4r/snd/snd_StrmSound.cpp index 480e0957..25ea0a38 100644 --- a/src/nw4r/snd/snd_StrmSound.cpp +++ b/src/nw4r/snd/snd_StrmSound.cpp @@ -17,6 +17,7 @@ #include "nw4r/snd/snd_StrmSoundHandle.h" #include "nw4r/snd/snd_MoveValue.h" +#include "nw4r/ut/ut_Lock.h" #include "nw4r/ut/ut_RuntimeTypeInfo.h" #include "nw4r/NW4RAssert.hpp" @@ -116,6 +117,22 @@ void StrmSound::UpdateParam() } } +void StrmSound::SetTrackVolume(u32 trackFlags, f32 volume, int fadeFrames) +{ + ut::AutoInterruptLock lock; + for (int trackNo = 0; trackNo < (int)ARRAY_LENGTH(mTrackVolume) && trackFlags != 0; trackNo++, trackFlags >>= 1) + { + StrmPlayer::StrmTrack *track = mStrmPlayer.GetPlayerTrack(trackNo); + if (track != NULL && ((trackFlags & 1) != 0)) + { + if (volume < 0.0f) + volume = 0.0f; + + mTrackVolume[trackNo].SetTarget(volume, fadeFrames); + } + } +} + void StrmSound::Shutdown() { BasicSound::Shutdown(); diff --git a/src/nw4r/snd/snd_StrmSoundHandle.cpp b/src/nw4r/snd/snd_StrmSoundHandle.cpp index 09c687d8..63c59b7b 100644 --- a/src/nw4r/snd/snd_StrmSoundHandle.cpp +++ b/src/nw4r/snd/snd_StrmSoundHandle.cpp @@ -11,7 +11,9 @@ #include "common.h" // nullptr +#include "nw4r/snd/snd_SoundHandle.h" #include "nw4r/snd/snd_StrmSound.h" +#include "nw4r/ut/ut_RuntimeTypeInfo.h" /******************************************************************************* * functions @@ -19,6 +21,29 @@ namespace nw4r { namespace snd { +StrmSoundHandle::StrmSoundHandle(SoundHandle* handle) + : mSound(nullptr) +{ + if (!handle) + return; + + detail::BasicSound *basicSound = handle->detail_GetAttachedSound(); + if (!basicSound) + return; + + if (detail::StrmSound *sound = + ut::DynamicCast(basicSound)) + { + + mSound = sound; + + if (mSound->IsAttachedTempSpecialHandle()) + mSound->DetachTempSpecialHandle(); + + mSound->mTempSpecialHandle = this; + } +} + void StrmSoundHandle::DetachSound() { if (IsAttachedSound()) diff --git a/src/nw4r/snd/snd_TaskManager.cpp b/src/nw4r/snd/snd_TaskManager.cpp index cebd4dfb..6edd03c3 100644 --- a/src/nw4r/snd/snd_TaskManager.cpp +++ b/src/nw4r/snd/snd_TaskManager.cpp @@ -57,7 +57,7 @@ void TaskManager::AppendTask(Task *task, TaskPriority priority) } // TaskManager::FindTask, probably -DECOMP_FORCE_CLASS_METHOD(Task::LinkList::Iterator, operator *()); +// DECOMP_FORCE_CLASS_METHOD(Task::LinkList::Iterator, operator *()); Task *TaskManager::GetNextTask(TaskPriority priority, bool doRemove) { diff --git a/src/nw4r/snd/snd_Voice.cpp b/src/nw4r/snd/snd_Voice.cpp index dde56c19..b422b842 100644 --- a/src/nw4r/snd/snd_Voice.cpp +++ b/src/nw4r/snd/snd_Voice.cpp @@ -136,6 +136,9 @@ void Voice::InitParam(int channelCount, int voiceOutCount, Callback *callback, for (int i = 0; i < AUX_BUS_NUM; i++) mFxSend[i] = 0.0f; + for (int i = 0; i < 4; i++) + mRemoteOutVolume[i] = 1.0f; + mPitch = 1.0f; mRemoteFilter = 0; mPanMode = PAN_MODE_DUAL; @@ -417,7 +420,7 @@ void Voice::Setup(WaveInfo const &waveParam, u32 startOffset) &waveParam.channelParam[channelIndex].adpcmLoopParam); } - axVoice->SetSrcType(AxVoice::SRC_4TAP_AUTO, mPitch); + axVoice->SetSrcType(AxManager::GetInstance().GetSrcType(), mPitch); axVoice->SetVoiceType(AxVoice::VOICE_TYPE_NORMAL); } } @@ -486,7 +489,8 @@ SampleFormat Voice::GetFormat() const void Voice::SetVolume(f32 volume) { - volume = ut::Clamp(volume, VOLUME_MIN, VOLUME_MAX); + if (volume < 0.0f) + volume = 0.0f; if (volume != mVolume) { @@ -498,8 +502,10 @@ void Voice::SetVolume(f32 volume) void Voice::SetVeVolume(f32 targetVolume, f32 initVolume) { - targetVolume = ut::Clamp(targetVolume, VOLUME_MIN, VOLUME_MAX); - initVolume = ut::Clamp(initVolume, VOLUME_MIN, VOLUME_MAX); + if (targetVolume < 0.0f) + targetVolume = 0.0f; + if (initVolume < 0.0f) + initVolume = 0.0f; if (initVolume < 0.0f) { @@ -632,7 +638,8 @@ void Voice::SetOutputLine(int lineFlag) void Voice::SetMainOutVolume(f32 volume) { - volume = ut::Clamp(volume, VOLUME_MIN, VOLUME_MAX); + if (volume < 0.0f) + volume = 0.0f; if (volume != mMainOutVolume) { @@ -645,7 +652,8 @@ void Voice::SetMainOutVolume(f32 volume) void Voice::SetMainSend(f32 send) { send += 1.0f; - send = ut::Clamp(send, SEND_MIN, SEND_MAX); + if (send < SEND_MIN) + send = SEND_MIN; if (send != mMainSend) { @@ -660,7 +668,8 @@ void Voice::SetFxSend(AuxBus bus, f32 send) // specifically not the source variant NW4RAssertHeaderClampedLValue_Line(748, bus, 0, AUX_BUS_NUM); - send = ut::Clamp(send, SEND_MIN, SEND_MAX); + if (send < SEND_MIN) + send = SEND_MIN; if (send != mFxSend[bus]) { @@ -670,6 +679,18 @@ void Voice::SetFxSend(AuxBus bus, f32 send) } } +void Voice::SetRemoteOutVolume(int remote, f32 volume) +{ + if (volume < 0.0f) + volume = 0.0f; + + if (mRemoteOutVolume[remote] == volume) + return; + + mRemoteOutVolume[remote] = volume; + mSyncFlag |= UPDATE_MIX; +} + void Voice::SetVoiceOutParam(int voiceOutIndex, VoiceOutParam const &voiceOutParam) { @@ -719,9 +740,10 @@ void Voice::UpdateVoicesPriority() } } } - +#if 0 // Voice::GetAxVoice ([R89JEL]:/bin/RVL/Debug/mainD.MAP:14824) DECOMP_FORCE(NW4RAssert_String(channelIndex < CHANNEL_MAX)); +#endif void Voice::SetAdpcmLoop(int channelIndex, AdpcmLoopParam const *param) { @@ -839,7 +861,7 @@ bool Voice::CalcAxMix() /* The address is taken and the members are set, but the members aren't used * after that */ - AxVoice::RemoteMixParam rmtmix ATTR_UNUSED; + AxVoice::RemoteMixParam rmtmix; for (int channelIndex = 0; channelIndex < mChannelCount; channelIndex++) { @@ -851,6 +873,12 @@ bool Voice::CalcAxMix() CalcMixParam(channelIndex, voiceOutIndex, &mix, &rmtmix); nextUpdateFlag |= axVoice->SetMix(mix); + if (mOutputLineFlag == 0 || mOutputLineFlag == 1) { + axVoice->EnableRemote(false); + } else { + axVoice->EnableRemote(true); + axVoice->SetRmtMix(rmtmix); + } } } } @@ -1054,17 +1082,31 @@ void Voice::CalcMixParam(int channelIndex, int voiceOutIndex, mainVolume = mMainOutVolume; mainSend = mMainSend; - fxSendA = - ut::Clamp(mFxSend[AUX_A] + mVoiceOutParam[voiceOutIndex].fxSend, - SEND_MIN, SEND_MAX); + fxSendA = mFxSend[AUX_A] + mVoiceOutParam[voiceOutIndex].fxSend; + if (fxSendA < SEND_MIN) { + fxSendA = SEND_MIN; + } fxSendB = mFxSend[AUX_B]; fxSendC = mFxSend[AUX_C]; } - f32 main = mainVolume * mainSend; - f32 fx_a = mainVolume * fxSendA; - f32 fx_b = mainVolume * fxSendB; - f32 fx_c = mainVolume * fxSendC; + f32 main = mainVolume * nw4r::ut::Clamp(mainSend, 0.0f, 1.0f); + f32 fx_a = mainVolume * nw4r::ut::Clamp(fxSendA, 0.0f, 1.0f); + f32 fx_b = mainVolume * nw4r::ut::Clamp(fxSendB, 0.0f, 1.0f); + f32 fx_c = mainVolume * nw4r::ut::Clamp(fxSendC, 0.0f, 1.0f); + + f32 remoteOutVolumeOrig[4]; + for (int i = 0; i < 4; i++) + { + if (mOutputLineFlag & (2 << i)) + { + remoteOutVolumeOrig[i] = mRemoteOutVolume[i]; + } + else + { + remoteOutVolumeOrig[i] = 0.0f; + } + } f32 left, right, surround, lrMixed; f32 front, rear; @@ -1302,6 +1344,10 @@ void Voice::CalcMixParam(int channelIndex, int voiceOutIndex, break; } + f32 remoteOutVolume[4]; + for (int i = 0; i < 4; i++) + remoteOutVolume[i] = lrMixed * remoteOutVolumeOrig[i]; + mix->vL = CalcMixVolume(m_l); mix->vR = CalcMixVolume(m_r); mix->vS = CalcMixVolume(m_s); @@ -1315,13 +1361,13 @@ void Voice::CalcMixParam(int channelIndex, int voiceOutIndex, mix->vAuxCR = CalcMixVolume(c_r); mix->vAuxCS = CalcMixVolume(c_s); - rmtmix->vMain0 = 0; + rmtmix->vMain0 = CalcMixVolume(remoteOutVolume[0]); rmtmix->vAux0 = 0; - rmtmix->vMain1 = 0; + rmtmix->vMain1 = CalcMixVolume(remoteOutVolume[1]); rmtmix->vAux1 = 0; - rmtmix->vMain2 = 0; + rmtmix->vMain2 = CalcMixVolume(remoteOutVolume[2]); rmtmix->vAux2 = 0; - rmtmix->vMain3 = 0; + rmtmix->vMain3 = CalcMixVolume(remoteOutVolume[3]); rmtmix->vAux3 = 0; } diff --git a/src/nw4r/snd/snd_WaveArchive.cpp b/src/nw4r/snd/snd_WaveArchive.cpp index e3255fe6..52ab01ba 100644 --- a/src/nw4r/snd/snd_WaveArchive.cpp +++ b/src/nw4r/snd/snd_WaveArchive.cpp @@ -9,7 +9,7 @@ #include "nw4r/snd/snd_Util.h" #include "nw4r/snd/snd_WaveFile.h" -#include "nw4r/ut/binaryFileFormat.h" // ut::BinaryFileHeader +#include "nw4r/ut/ut_binaryFileFormat.h" // ut::BinaryFileHeader #include "nw4r/ut/ut_algorithm.h" // ut::AddOffsetToPtr #include diff --git a/src/nw4r/snd/snd_WsdPlayer.cpp b/src/nw4r/snd/snd_WsdPlayer.cpp index c7f60adc..2b4734c6 100644 --- a/src/nw4r/snd/snd_WsdPlayer.cpp +++ b/src/nw4r/snd/snd_WsdPlayer.cpp @@ -141,6 +141,23 @@ void WsdPlayer::InvalidateData(void const *start, void const *end) } } +bool WsdPlayer::ReadWsdDataInfo(WsdDataInfo *info) const +{ + SoundThread::AutoLock lock; + + WaveSoundInfo wsInfo; + WaveSoundNoteInfo wsNoteInfo; + WaveInfo waveInfo; + bool result = mCallback->GetWaveSoundData(&wsInfo, &wsNoteInfo, &waveInfo, mWsdData, mWsdIndex, 0, mCallbackData); + if (result) { + info->loopFlag = waveInfo.loopFlag != false; + info->sampleRate = waveInfo.sampleRate; + info->loopStart = waveInfo.loopStart; + info->loopEnd = waveInfo.loopEnd; + } + return result; +} + void WsdPlayer::FinishPlayer() { SoundThread::AutoLock lock; @@ -349,6 +366,9 @@ void WsdPlayer::UpdateChannel() mChannel->SetFxSend(bus, fxSend[i]); } + for (int i = 0; i < 4; i++) + mChannel->SetRemoteOutVolume(i, GetRemoteOutVolume(i)); + for (int i = 0; i < mVoiceOutCount; i++) mChannel->SetVoiceOutParam(i, GetVoiceOutParam(i)); diff --git a/src/toBeSorted/actor_info.cpp b/src/toBeSorted/actor_info.cpp new file mode 100644 index 00000000..341d7775 --- /dev/null +++ b/src/toBeSorted/actor_info.cpp @@ -0,0 +1,872 @@ +#include "toBeSorted/actor_info.h" + +#include "common.h" +#include "d/snd/d_snd_source_enums.h" +#include "f/f_profile_name.h" + +#include + +#pragma push +#pragma readonly_strings on +// sorted alphabetically to facilitate binary search +static const ActorInfo sInfos[] = { + { "$act01", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 1}, + { "$act02", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 2}, + { "$act03", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 3}, + { "$act04", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 4}, + { "$act05", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 5}, + { "$act06", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 6}, + { "$act07", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 7}, + { "$act08", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 8}, + { "$act09", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 9}, + { "$act10", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 10}, + { "$act11", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 11}, + { "$act12", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 12}, + { "$act13", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 13}, + { "$act14", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 14}, + { "$act15", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 15}, + { "$act16", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 16}, + { "$act17", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 17}, + { "$act18", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 18}, + { "$act19", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 19}, + { "$act20", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 20}, + { "$act21", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 21}, + { "$act22", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 22}, + { "$act23", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 23}, + { "$act24", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 24}, + { "$act25", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 25}, + { "$act26", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 26}, + { "$act27", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 27}, + { "$act28", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 28}, + { "$act29", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 29}, + { "$act30", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 30}, + { "$act31", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 31}, + { "$act32", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 32}, + { "$act33", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 33}, + { "$act34", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 34}, + { "$act35", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 35}, + { "$act36", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 36}, + { "$act37", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 37}, + { "$act38", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 38}, + { "$act39", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 39}, + { "$act40", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 40}, + { "$act41", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 41}, + { "$act42", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 42}, + { "$act43", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 43}, + { "$act44", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 44}, + { "$act45", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 45}, + { "$act46", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 46}, + { "$act47", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 47}, + { "$act48", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 48}, + { "$act49", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 49}, + { "$act50", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 50}, + { "$act51", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 51}, + { "$act52", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 52}, + { "$act53", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 53}, + { "$act54", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 54}, + { "$act55", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 55}, + { "$act56", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 56}, + { "$act57", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 57}, + { "$act58", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 58}, + { "$act59", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 59}, + { "$act60", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 60}, + { "$act61", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 61}, + { "$act62", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 62}, + { "$act63", fProfile::JSTUDIO_ACTOR, fProfile::JSTUDIO_ACTOR, 0xFFFF, 0xFF, 63}, + { "$snd", fProfile::JSTUDIO_SYSOBJ, fProfile::JSTUDIO_SYSOBJ, 0xFFFF, 0xFF, 1}, + { "$sys", fProfile::JSTUDIO_SYSOBJ, fProfile::JSTUDIO_SYSOBJ, 0xFFFF, 0xFF, 0}, + { "AFlw", fProfile::OBJ_FLOWER_ANCIENT, fProfile::OBJ_FLOWER_ANCIENT, 0xFFFF, SND_SOURCE_ITEM, 0}, + { "ActTag", fProfile::ACTION_TAG, fProfile::ACTION_TAG, 0xFFFF, 0xFF, 0}, + { "Amber", fProfile::OBJ_AMBER, fProfile::OBJ_AMBER, 0xFFFF, 0xFF, 0}, + {"AncJwls", fProfile::OBJ_ANCIENT_JEWELS, fProfile::OBJ_ANCIENT_JEWELS, 0xFFFF, SND_SOURCE_ITEM, 0}, + { "Ant", fProfile::INSECT_ANT, fProfile::INSECT_ANT, 774, SND_SOURCE_INSECT, 0}, + {"ApBridg", fProfile::OBJ_APPEAR_BRIDGE, fProfile::OBJ_APPEAR_BRIDGE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Arrow", fProfile::ARROW, fProfile::ARROW, 0xFFFF, SND_SOURCE_ARROW, 0}, + {"ArrowSW", fProfile::OBJ_ARROW_SWITCH, fProfile::OBJ_ARROW_SWITCH, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "AsuArm", fProfile::ASURA_ARM, fProfile::ASURA_ARM, 0xFFFF, 15, 0}, + { "AsuFoo", fProfile::ASURA_FOOT, fProfile::ASURA_FOOT, 0xFFFF, 15, 0}, + { "AsuraB", fProfile::ASURA_BULLET, fProfile::ASURA_BULLET, 0xFFFF, SND_SOURCE_BULLET, 0}, + { "AsuraP", fProfile::ASURA_PILLAR, fProfile::ASURA_PILLAR, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "AsuraS", fProfile::ASURA_SWORD, fProfile::ASURA_SWORD, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "AttTag", fProfile::ATT_TAG, fProfile::ATT_TAG, 0xFFFF, 0xFF, 0}, + {"AutoMes", fProfile::TAG_AUTO_MESSAGE, fProfile::TAG_AUTO_MESSAGE, 0xFFFF, 0xFF, 0}, + {"B300Snd", fProfile::OBJ_B300_SAND, fProfile::OBJ_B300_SAND, 0xFFFF, 0xFF, 0}, + { "BAsura", fProfile::B_ASURA, fProfile::B_ASURA, 48, 19, 0}, + { "BBObjs", fProfile::OBJ_BB_OBJECTS, fProfile::OBJ_BB_OBJECTS, 0xFFFF, 0xFF, 0}, + {"BBParts", fProfile::OBJ_BB_BROKEN_PARTS, fProfile::OBJ_BB_BROKEN_PARTS, 0xFFFF, 0xFF, 0}, + {"BBQuake", fProfile::T_QUAKE, fProfile::T_QUAKE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BBbrg", fProfile::OBJ_BB_BRIDGE, fProfile::OBJ_BB_BRIDGE, 0xFFFF, 0xFF, 0}, + {"BBigBo2", fProfile::B_BIGBOSS2, fProfile::B_BIGBOSS2, 53, SND_SOURCE_BIGBOSS, 0}, + {"BBigBo3", fProfile::B_BIGBOSS3, fProfile::B_BIGBOSS3, 54, SND_SOURCE_BIGBOSS, 0}, + {"BBigBoB", fProfile::B_BIGBOSS_BASE, fProfile::B_BIGBOSS_BASE, 0xFFFF, 0xFF, 0}, + {"BBigBos", fProfile::B_BIGBOSS, fProfile::B_BIGBOSS, 52, SND_SOURCE_BIGBOSS, 0}, + {"BBigShc", fProfile::B_BBSHWV, fProfile::B_BBSHWV, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BBombf", fProfile::OBJ_BIGBOMB_FLOWER, fProfile::OBJ_BIGBOMB_FLOWER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"BDrD101", fProfile::OBJ_DOOR_BOSSD101, fProfile::OBJ_DOOR_BOSSD101, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BGh", fProfile::B_GIRAHIMU, fProfile::B_GIRAHIMU, 49, 19, 0}, + { "BGh2", fProfile::B_GIRAHIMU2, fProfile::B_GIRAHIMU2, 50, 19, 0}, + { "BGh3B", fProfile::B_GIRAHIMU3_BASE, fProfile::B_GIRAHIMU3_BASE, 0xFFFF, 0xFF, 0}, + {"BGh3Fst", fProfile::B_GIRAHIMU3_FIRST, fProfile::B_GIRAHIMU3_FIRST, 51, SND_SOURCE_GIRAHUMU_3, 0}, + {"BGh3Snd", fProfile::B_GIRAHIMU3_SECOND, fProfile::B_GIRAHIMU3_SECOND, 89, SND_SOURCE_GIRAHUMU_3, 0}, + {"BGh3Trd", fProfile::B_GIRAHIMU3_THIRD, fProfile::B_GIRAHIMU3_THIRD, 90, SND_SOURCE_GIRAHUMU_3, 0}, + { "BGhB", fProfile::B_GIRAHIMU_BASE, fProfile::B_GIRAHIMU_BASE, 0xFFFF, 0xFF, 0}, + { "BKr", fProfile::B_KR, fProfile::B_KR, 77, 22, 0}, + { "BKrA", fProfile::B_KRA, fProfile::B_KRA, 77, 15, 0}, + { "BKrH", fProfile::B_KRH, fProfile::B_KRH, 77, 15, 0}, + {"BLasBos", fProfile::B_LASTBOSS, fProfile::B_LASTBOSS, 0xFFFF, 19, 0}, + { "BMg", fProfile::B_MG, fProfile::B_MG, 10, 21, 0}, + { "BSpUp", fProfile::OBJ_BIRD_SP_UP, fProfile::OBJ_BIRD_SP_UP, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Bamboo", fProfile::OBJ_BAMBOO, fProfile::OBJ_BAMBOO, 533, SND_SOURCE_BAMBOO, 0}, + {"BarPsTg", fProfile::TAG_BARREL_POS, fProfile::TAG_BARREL_POS, 0xFFFF, 0xFF, 0}, + { "Barrel", fProfile::OBJ_BARREL, fProfile::OBJ_BARREL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"BarrlTg", fProfile::TAG_BARREL, fProfile::TAG_BARREL, 0xFFFF, 0xFF, 0}, + {"BcAlArr", fProfile::E_BCALARROW, fProfile::E_BCALARROW, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"BcArrow", fProfile::E_BCARROW, fProfile::E_BCARROW, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BcZTag", fProfile::BCZ_TAG, fProfile::BCZ_TAG, 0xFFFF, 0xFF, 0}, + { "Bee", fProfile::NPC_BEE, fProfile::NPC_BEE, 776, 15, 0}, + { "Beetle", fProfile::INSECT_BEETLE, fProfile::INSECT_BEETLE, 768, SND_SOURCE_INSECT, 0}, + { "Bell", fProfile::OBJ_BELL, fProfile::OBJ_BELL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"BeltCvr", fProfile::OBJ_BELT_CVR, fProfile::OBJ_BELT_CVR, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"BigTubo", fProfile::OBJ_TUBO_BIG, fProfile::OBJ_TUBO_BIG, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BirdB", fProfile::AVATER_BULLET, fProfile::AVATER_BULLET, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BirdKA", fProfile::BIRD_KOBUNA, fProfile::BIRD_KOBUNA, 0xFFFF, 43, 0}, + { "BirdKB", fProfile::BIRD_KOBUNB, fProfile::BIRD_KOBUNB, 0xFFFF, 43, 0}, + {"BirdNpc", fProfile::BIRD_NPC, fProfile::BIRD_NPC, 0xFFFF, 43, 0}, + { "BirdR", fProfile::BIRD_RIVAL, fProfile::BIRD_RIVAL, 0xFFFF, 43, 0}, + {"BirdSta", fProfile::OBJ_BIRD_STATUE, fProfile::OBJ_BIRD_STATUE, 0xFFFF, 0xFF, 0}, + { "BirdT", fProfile::BIRD_TARGET, fProfile::BIRD_TARGET, 0xFFFF, 43, 0}, + { "BirdZT", fProfile::BIRD_ZELDA_TRAINING, fProfile::BIRD_ZELDA_TRAINING, 0xFFFF, 43, 0}, + { "Blade", fProfile::OBJ_BLADE, fProfile::OBJ_BLADE, 0xFFFF, 0xFF, 0}, + {"BlkRope", fProfile::OBJ_BLOCK_ROPE, fProfile::OBJ_BLOCK_ROPE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"BlockUg", fProfile::OBJ_BLOCK_UNDERGROUND, fProfile::OBJ_BLOCK_UNDERGROUND, 0xFFFF, 0xFF, 0}, + {"BlsRock", fProfile::OBJ_BLAST_ROCK, fProfile::OBJ_BLAST_ROCK, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Blst", fProfile::OBJ_BALLISTA, fProfile::OBJ_BALLISTA, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BlstF3", fProfile::OBJ_BALLISTA_F3, fProfile::OBJ_BALLISTA_F3, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BlstH", fProfile::OBJ_BALLISTA_HANDLE, fProfile::OBJ_BALLISTA_HANDLE, 0xFFFF, 0xFF, 0}, + {"BltObsT", fProfile::TAG_BELT_OBSTACLE, fProfile::TAG_BELT_OBSTACLE, 0xFFFF, 59, 0}, + {"BlwCoal", fProfile::OBJ_BLOW_COAL, fProfile::OBJ_BLOW_COAL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Boat", fProfile::OBJ_BOAT, fProfile::OBJ_BOAT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Bomb", fProfile::BOMB, fProfile::BOMB, 0xFFFF, SND_SOURCE_BOMB, 0}, + { "Bombf", fProfile::BOMBF, fProfile::BOMBF, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Boom", fProfile::BOOMERANG, fProfile::BOOMERANG, 0xFFFF, SND_SOURCE_BOOMERANG, 0}, + {"BoxCage", fProfile::OBJ_BOXCAGE_F300, fProfile::OBJ_BOXCAGE_F300, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BrdMob", fProfile::BIRD_MOB, fProfile::BIRD_MOB, 0xFFFF, 0xFF, 0}, + { "BrgBn", fProfile::OBJ_BRIDGE_BONE, fProfile::OBJ_BRIDGE_BONE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"BrgFall", fProfile::OBJ_BRIDGE_FALL, fProfile::OBJ_BRIDGE_FALL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BrgStp", fProfile::OBJ_BRIDGE_STEP, fProfile::OBJ_BRIDGE_STEP, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BrgTs", fProfile::OBJ_BRIDGE_TIME, fProfile::OBJ_BRIDGE_TIME, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"BridgeB", fProfile::OBJ_BRIDGE_BUILDING, fProfile::OBJ_BRIDGE_BUILDING, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"BridgeS", fProfile::OBJ_BRIDGE_STRETCH, fProfile::OBJ_BRIDGE_STRETCH, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Bstone", fProfile::OBJ_BSTONE, fProfile::OBJ_BSTONE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BtlTg", fProfile::BEETLE_TAG, fProfile::BEETLE_TAG, 0xFFFF, 0xFF, 0}, + { "BtlTgA", fProfile::BEETLE_TAG, fProfile::BEETLE_TAG, 0xFFFF, 0xFF, 1}, + { "BtlTgB", fProfile::BEETLE_TAG, fProfile::BEETLE_TAG, 0xFFFF, 0xFF, 2}, + { "BtlTgC", fProfile::BEETLE_TAG, fProfile::BEETLE_TAG, 0xFFFF, 0xFF, 3}, + { "Bubble", fProfile::OBJ_BUBBLE, fProfile::OBJ_BUBBLE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "BulbSW", fProfile::OBJ_BULB_SWITCH, fProfile::OBJ_BULB_SWITCH, 524, SND_SOURCE_OBJECT, 0}, + { "Bullet", fProfile::COMMON_BULLET, fProfile::COMMON_BULLET, 0xFFFF, SND_SOURCE_BULLET, 0}, + {"Butrfly", fProfile::INSECT_BUTTERFLY, fProfile::INSECT_BUTTERFLY, 777, SND_SOURCE_INSECT, 0}, + { "Bvd", fProfile::B_VD, fProfile::B_VD, 65, 19, 0}, + {"CBomSld", fProfile::COL_BOMSLD, fProfile::COL_BOMSLD, 0xFFFF, 0xFF, 0}, + {"Cam2Tag", fProfile::CAMERA2_TAG, fProfile::CAMERA2_TAG, 0xFFFF, 0xFF, 0}, + { "CamTag", fProfile::CAMERA_TAG, fProfile::CAMERA_TAG, 0xFFFF, 0xFF, 0}, + { "Cannon", fProfile::OBJ_CANNON, fProfile::OBJ_CANNON, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"CannonC", fProfile::OBJ_CANNON_COVER, fProfile::OBJ_CANNON_COVER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"Chandel", fProfile::OBJ_CHANDELIER, fProfile::OBJ_CHANDELIER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Char", fProfile::OBJ_CHAIR, fProfile::OBJ_CHAIR, 0xFFFF, SND_SOURCE_OBJECT, 5}, + { "CharA", fProfile::OBJ_CHAIR, fProfile::OBJ_CHAIR, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "CharB", fProfile::OBJ_CHAIR, fProfile::OBJ_CHAIR, 0xFFFF, SND_SOURCE_OBJECT, 1}, + { "CharC", fProfile::OBJ_CHAIR, fProfile::OBJ_CHAIR, 0xFFFF, SND_SOURCE_OBJECT, 2}, + { "CharD", fProfile::OBJ_CHAIR, fProfile::OBJ_CHAIR, 0xFFFF, SND_SOURCE_OBJECT, 3}, + { "CharE", fProfile::OBJ_CHAIR, fProfile::OBJ_CHAIR, 0xFFFF, SND_SOURCE_OBJECT, 4}, + { "Cicada", fProfile::INSECT_CICADA, fProfile::INSECT_CICADA, 770, SND_SOURCE_INSECT, 0}, + { "City", fProfile::OBJ_CITY, fProfile::OBJ_CITY, 0xFFFF, 0xFF, 0}, + {"CityWtr", fProfile::OBJ_CITY_WATER, fProfile::OBJ_CITY_WATER, 0xFFFF, 0xFF, 0}, + {"ClawSTg", fProfile::OBJ_CLAW_SHOT_TG, fProfile::OBJ_CLAW_SHOT_TG, 0xFFFF, 33, 0}, + { "Clef", fProfile::OBJ_CLEF, fProfile::OBJ_CLEF, 0xFFFF, SND_SOURCE_CLEF, 0}, + {"CloudSD", fProfile::OBJ_CLOUD_DIVE, fProfile::OBJ_CLOUD_DIVE, 0xFFFF, 0xFF, 0}, + {"ClrWall", fProfile::OBJ_CLEARNESS_WALL, fProfile::OBJ_CLEARNESS_WALL, 0xFFFF, 0xFF, 0}, + {"CmCloud", fProfile::OBJ_CUMUL_CLOUD, fProfile::OBJ_CUMUL_CLOUD, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "CoTest", fProfile::CO_TEST, fProfile::CO_TEST, 0xFFFF, 0xFF, 0}, + { "Col", fProfile::OBJ_COL, fProfile::OBJ_COL, 0xFFFF, 0xFF, 0}, + { "ColStp", fProfile::COL_STP, fProfile::COL_STP, 0xFFFF, 0xFF, 0}, + {"CtrlPnl", fProfile::OBJ_CONTROL_PANEL, fProfile::OBJ_CONTROL_PANEL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "CupA00", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 1}, + { "CupA01", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 2}, + { "CupA02", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 3}, + { "CupB00", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 4}, + { "CupB01", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 5}, + { "CupB02", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 6}, + {"CyStone", fProfile::OBJ_CARRY_STONE, fProfile::OBJ_CARRY_STONE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "D2Mtr", fProfile::OBJ_DESERT_METER, fProfile::OBJ_DESERT_METER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"D300Obj", fProfile::OBJ_D300, fProfile::OBJ_D300, 0xFFFF, 0xFF, 0}, + {"D3Dummy", fProfile::OBJ_D3_DUMMY, fProfile::OBJ_D3_DUMMY, 0xFFFF, 0xFF, 0}, + { "DNdl", fProfile::OBJ_NEEDLE_DESERT, fProfile::OBJ_NEEDLE_DESERT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "DNight", fProfile::OBJ_DAYNIGHT, fProfile::OBJ_DAYNIGHT, 0xFFFF, 0xFF, 0}, + {"DStartT", fProfile::START_TAG, fProfile::START_TAG, 0xFFFF, 0xFF, 0}, + {"DbidNpc", fProfile::DEMO_NPC_BIRD, fProfile::DEMO_NPC_BIRD, 0xFFFF, 43, 0}, + { "Debris", fProfile::OBJ_STAGE_DEBRIS, fProfile::OBJ_STAGE_DEBRIS, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "DecoA", fProfile::OBJ_DECOA, fProfile::OBJ_DECOA, 0xFFFF, 0xFF, 0}, + { "DecoB", fProfile::OBJ_DECOB, fProfile::OBJ_DECOB, 0xFFFF, 0xFF, 0}, + {"DemoPds", fProfile::OBJ_UTA_DEMO_PEDEST, fProfile::OBJ_UTA_DEMO_PEDEST, 0xFFFF, 0xFF, 0}, + {"DiOnNbs", fProfile::OBJ_DISPLAY_ONLY_NBS, fProfile::OBJ_DISPLAY_ONLY_NBS, 0xFFFF, 0xFF, 0}, + { "DieTag", fProfile::ALLDIE_TAG, fProfile::ALLDIE_TAG, 0xFFFF, 0xFF, 0}, + {"DisShip", fProfile::OBJ_DIS_SHIP, fProfile::OBJ_DIS_SHIP, 0xFFFF, 0xFF, 0}, + {"DivCrst", fProfile::OBJ_DIVINER_CRYSTAL, fProfile::OBJ_DIVINER_CRYSTAL, 551, SND_SOURCE_OBJECT, 0}, + {"DmtGate", fProfile::OBJ_DORMITORY_GATE, fProfile::OBJ_DORMITORY_GATE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Door", fProfile::OBJ_DOOR, fProfile::OBJ_DOOR, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"Door200", fProfile::OBJ_DOOR_DUNGEON_D200, fProfile::OBJ_DOOR_DUNGEON_D200, 0xFFFF, 42, 0}, + { "DoorBs", fProfile::OBJ_DOOR_BOSS, fProfile::OBJ_DOOR_BOSS, 0xFFFF, 42, 0}, + {"DoorDun", fProfile::OBJ_DOOR_DUNGEON, fProfile::OBJ_DOOR_DUNGEON, 0xFFFF, 42, 0}, + {"Dowsing", fProfile::T_DOWSING, fProfile::T_DOWSING, 0xFFFF, 0xFF, 0}, + {"Drgnfly", fProfile::INSECT_DRAGONFLY, fProfile::INSECT_DRAGONFLY, 778, SND_SOURCE_INSECT, 0}, + { "Drum", fProfile::OBJ_DRUM, fProfile::OBJ_DRUM, 0xFFFF, 0xFF, 0}, + {"DrumTag", fProfile::TAG_DRUM, fProfile::TAG_DRUM, 0xFFFF, 0xFF, 0}, + {"DstDbrs", fProfile::OBJ_DESERT_DEBRIS, fProfile::OBJ_DESERT_DEBRIS, 0xFFFF, 0xFF, 0}, + {"DwnLava", fProfile::OBJ_DOWN_LAVA, fProfile::OBJ_DOWN_LAVA, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "EAm", fProfile::E_AM, fProfile::E_AM, 69, 10, 0}, + { "EBc", fProfile::E_BC, fProfile::E_BC, 18, 10, 0}, + { "EBcZ", fProfile::E_BCZ, fProfile::E_BCZ, 43, 16, 0}, + { "EBcaL", fProfile::E_BCAL, fProfile::E_BCAL, 29, 10, 0}, + { "EBce", fProfile::E_BCE, fProfile::E_BCE, 18, 10, 0}, + {"EBeamos", fProfile::E_BEAMOS, fProfile::E_BEAMOS, 70, 10, 0}, + { "EBfish", fProfile::E_BFISH, fProfile::E_BFISH, 73, 10, 0}, + { "EBs", fProfile::E_BS, fProfile::E_BS, 0xFFFF, 10, 0}, + {"ECactus", fProfile::E_CACTUS, fProfile::E_CACTUS, 531, 40, 0}, + {"EChaser", fProfile::E_TN2, fProfile::E_TN2, 0xFFFF, 18, 0}, + { "EChb", fProfile::E_CHB, fProfile::E_CHB, 0xFFFF, 18, 0}, + { "ECptn", fProfile::E_CAPTAIN, fProfile::E_CAPTAIN, 47, 19, 0}, + { "EEye", fProfile::E_EYE, fProfile::E_EYE, 517, 15, 0}, + { "EGe", fProfile::E_GE, fProfile::E_GE, 0xFFFF, 10, 0}, + { "EGeko", fProfile::E_GEKO, fProfile::E_GEKO, 72, 15, 0}, + {"EGerock", fProfile::E_GEROCK, fProfile::E_GEROCK, 17, 10, 0}, + { "EGue", fProfile::E_GUE, fProfile::E_GUE, 15, 10, 0}, + {"EGumarm", fProfile::E_GUMARM, fProfile::E_GUMARM, 66, 10, 0}, + { "EGunho", fProfile::E_GUNHO, fProfile::E_GUNHO, 71, 10, 0}, + {"EGunhob", fProfile::E_GUNHOB, fProfile::E_GUNHOB, 87, 15, 0}, + { "EHidoK", fProfile::E_HIDOKARI, fProfile::E_HIDOKARI, 63, 10, 0}, + { "EHidoS", fProfile::E_HIDOKARIS, fProfile::E_HIDOKARIS, 63, SND_SOURCE_OBJECT, 0}, + {"EHidory", fProfile::E_HIDORY, fProfile::E_HIDORY, 16, 10, 0}, + { "EHoc", fProfile::E_HOC, fProfile::E_HOC, 20, 10, 0}, + { "EHp", fProfile::E_HP, fProfile::E_HP, 0xFFFF, 10, 0}, + { "EHydra", fProfile::E_HYDRA, fProfile::E_HYDRA, 44, 10, 0}, + { "EKGira", fProfile::E_KGIRA, fProfile::E_KGIRA, 0xFFFF, 19, 0}, + { "EKg", fProfile::E_KG, fProfile::E_KG, 8, 15, 0}, + { "EKs", fProfile::E_KS, fProfile::E_KS, 11, 10, 0}, + {"ELiTail", fProfile::E_LIZA_TAIL, fProfile::E_LIZA_TAIL, 0xFFFF, SND_SOURCE_ITEM, 0}, + {"ELizaru", fProfile::E_LIZARUFOS, fProfile::E_LIZARUFOS, 41, 13, 0}, + { "EMagma", fProfile::E_MAGMA, fProfile::E_MAGMA, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"EMagupp", fProfile::E_MAGUPPO, fProfile::E_MAGUPPO, 74, 12, 0}, + { "EMr", fProfile::E_MR, fProfile::E_MR, 36, 10, 0}, + {"EMrTate", fProfile::E_MR_SHIELD, fProfile::E_MR_SHIELD, 0xFFFF, 15, 0}, + { "EOc", fProfile::E_OC, fProfile::E_OC, 18, 10, 0}, + { "EOr", fProfile::E_OR, fProfile::E_OR, 57, 10, 0}, + {"EOrCann", fProfile::E_OR_CANNON, fProfile::E_OR_CANNON, 3, 10, 0}, + { "EPh", fProfile::E_PH, fProfile::E_PH, 81, 15, 0}, + { "EPo", fProfile::E_PO, fProfile::E_PO, 0xFFFF, 18, 0}, + { "ERemly", fProfile::E_REMLY, fProfile::E_REMLY, 0, 15, 0}, + {"ERupGue", fProfile::E_RUPEE_GUE, fProfile::E_RUPEE_GUE, 4, 10, 0}, + { "ESf", fProfile::E_SF, fProfile::E_SF, 45, 19, 0}, + { "ESf4", fProfile::E_SF4, fProfile::E_SF4, 46, 19, 0}, + { "ESiren", fProfile::E_SIREN, fProfile::E_SIREN, 0xFFFF, 18, 0}, + { "ESktl", fProfile::E_SKYTAIL, fProfile::E_SKYTAIL, 2, 10, 0}, + { "ESm", fProfile::E_SM, fProfile::E_SM, 59, 11, 0}, + { "ESpark", fProfile::E_SPARK, fProfile::E_SPARK, 67, 17, 0}, + { "ESyako", fProfile::E_SYAKOMAITO, fProfile::E_SYAKOMAITO, 68, 10, 0}, + { "EWs", fProfile::E_WS, fProfile::E_WS, 6, 15, 0}, + { "Eel", fProfile::EEL, fProfile::EEL, 0xFFFF, 0xFF, 0}, + { "EffGnT", fProfile::EFFECT_GEN_TAG, fProfile::EFFECT_GEN_TAG, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Ehb", fProfile::E_HB, fProfile::E_HB, 78, 10, 0}, + {"EhbLeaf", fProfile::E_HB_LEAF, fProfile::E_HB_LEAF, 0xFFFF, 0xFF, 0}, + {"ElLight", fProfile::OBJ_ELECTRIC_LIGHT, fProfile::OBJ_ELECTRIC_LIGHT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "EnCl", fProfile::ENEMY_CONTROL, fProfile::ENEMY_CONTROL, 0xFFFF, 0xFF, 0}, + { "Est", fProfile::E_ST, fProfile::E_ST, 7, 10, 0}, + {"Estwire", fProfile::E_ST_WIRE, fProfile::E_ST_WIRE, 0xFFFF, 0xFF, 0}, + { "EvfTag", fProfile::EVENTF_TAG, fProfile::EVENTF_TAG, 0xFFFF, 0xFF, 0}, + {"EvilFld", fProfile::OBJ_EVIL_FIELD, fProfile::OBJ_EVIL_FIELD, 0xFFFF, 0xFF, 0}, + {"EvntTag", fProfile::EVENT_TAG, fProfile::EVENT_TAG, 0xFFFF, 0xFF, 0}, + { "F302Lt", fProfile::OBJ_F302_LIGHT, fProfile::OBJ_F302_LIGHT, 0xFFFF, 0xFF, 0}, + {"F400GaS", fProfile::OBJ_F400_GATE_SEAL, fProfile::OBJ_F400_GATE_SEAL, 0xFFFF, 0xFF, 0}, + {"F400Gat", fProfile::OBJ_F400_GATE_LEAF, fProfile::OBJ_F400_GATE_LEAF, 0xFFFF, 0xFF, 0}, + {"FShutte", fProfile::OBJ_SHUTTER_FENCE, fProfile::OBJ_SHUTTER_FENCE, 0xFFFF, SND_SOURCE_SHUTTER, 0}, + { "FWall", fProfile::OBJ_FIREWALL, fProfile::OBJ_FIREWALL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Fairy", fProfile::OBJ_FAIRY, fProfile::OBJ_FAIRY, 546, SND_SOURCE_OBJECT, 0}, + {"FairyTa", fProfile::T_FAIRY, fProfile::T_FAIRY, 0xFFFF, 0xFF, 0}, + { "Fence", fProfile::OBJ_FENCE, fProfile::OBJ_FENCE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"FenceB2", fProfile::OBJ_FENCE_BOKO2, fProfile::OBJ_FENCE_BOKO2, 0xFFFF, 0xFF, 0}, + {"FenceBk", fProfile::OBJ_FENCE_BOKO, fProfile::OBJ_FENCE_BOKO, 0xFFFF, 0xFF, 0}, + {"FenceFo", fProfile::TAG_SHUTTER_FENCE_FORBIDDANCE, fProfile::TAG_SHUTTER_FENCE_FORBIDDANCE, 0xFFFF, 0xFF, 0}, + {"FenceIr", fProfile::OBJ_FENCE_IRON, fProfile::OBJ_FENCE_IRON, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"FenceKs", fProfile::OBJ_FENCE_KONSAI, fProfile::OBJ_FENCE_KONSAI, 0xFFFF, 0xFF, 0}, + {"FencePe", fProfile::TAG_SHUTTER_FENCE_PERMISSION, fProfile::TAG_SHUTTER_FENCE_PERMISSION, 0xFFFF, 0xFF, 0}, + { "Fire", fProfile::OBJ_FIRE, fProfile::OBJ_FIRE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"FireObs", fProfile::OBJ_FIRE_OBSTACLE, fProfile::OBJ_FIRE_OBSTACLE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"FirePil", fProfile::OBJ_FIRE_PILLAR, fProfile::OBJ_FIRE_PILLAR, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"Firefly", fProfile::INSECT_FIREFLY, fProfile::INSECT_FIREFLY, 779, SND_SOURCE_INSECT, 0}, + { "Fish", fProfile::FISH, fProfile::FISH, 0xFFFF, 0xFF, 0}, + { "Flag", fProfile::OBJ_FLAG, fProfile::OBJ_FLAG, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "FlvsA", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 13}, + { "FlvsB", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 14}, + { "FlvsC", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 15}, + {"FlySlrb", fProfile::FLY_SLB, fProfile::FLY_SLB, 0xFFFF, 43, 0}, + {"FlyingC", fProfile::OBJ_FLYING_CLAWSHOT_TARGET, fProfile::OBJ_FLYING_CLAWSHOT_TARGET, 0xFFFF, 0xFF, 0}, + { "Fmaker", fProfile::FISH_MGR, fProfile::FISH_MGR, 0xFFFF, 0xFF, 0}, + {"ForceGT", fProfile::TAG_FORCE_GET_FLAG, fProfile::TAG_FORCE_GET_FLAG, 0xFFFF, 0xFF, 0}, + { "ForceS", fProfile::OBJ_FORCE_SIGN, fProfile::OBJ_FORCE_SIGN, 0xFFFF, 0xFF, 0}, + {"Fortune", fProfile::OBJ_FORTUNE_RING, fProfile::OBJ_FORTUNE_RING, 0xFFFF, 0xFF, 0}, + {"FrmLand", fProfile::OBJ_FARMLAND, fProfile::OBJ_FARMLAND, 0xFFFF, 0xFF, 0}, + {"FrtTree", fProfile::OBJ_FRUIT_TREE, fProfile::OBJ_FRUIT_TREE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "FruitA", fProfile::OBJ_FRUIT, fProfile::OBJ_FRUIT, 0xFFFF, SND_SOURCE_OBJECT, 1}, + { "FruitB", fProfile::OBJ_FRUIT_B, fProfile::OBJ_FRUIT_B, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"GateGnd", fProfile::GATE2GND_TAG, fProfile::GATE2GND_TAG, 0xFFFF, 0xFF, 0}, + { "Gcoil", fProfile::OBJ_GRASS_COIL, fProfile::OBJ_GRASS_COIL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Gear", fProfile::OBJ_GEAR, fProfile::OBJ_GEAR, 525, SND_SOURCE_OBJECT, 0}, + {"GekoTag", fProfile::GEKO_TAG, fProfile::GEKO_TAG, 0xFFFF, 0xFF, 0}, + {"GenkiDT", fProfile::TAG_GENKI_DOWSING_TARGET, fProfile::TAG_GENKI_DOWSING_TARGET, 0xFFFF, 0xFF, 0}, + { "GhFlr", fProfile::OBJ_GIRAHIMU_FLOOR, fProfile::OBJ_GIRAHIMU_FLOOR, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"GhSBeam", fProfile::GH_SWORD_BEAM, fProfile::GH_SWORD_BEAM, 0xFFFF, SND_SOURCE_BULLET, 0}, + {"GiraFot", fProfile::OBJ_GIRAHIM_FOOT, fProfile::OBJ_GIRAHIM_FOOT, 0xFFFF, 0xFF, 0}, + {"GkMgTag", fProfile::GENKI_MGR_TAG, fProfile::GENKI_MGR_TAG, 0xFFFF, 0xFF, 0}, + {"GodCube", fProfile::OBJ_GODDESS_CUBE, fProfile::OBJ_GODDESS_CUBE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"GodMark", fProfile::OBJ_GOD_MARK, fProfile::OBJ_GOD_MARK, 0xFFFF, 0xFF, 0}, + {"GrCover", fProfile::OBJ_GROUND_COVER, fProfile::OBJ_GROUND_COVER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Grave", fProfile::OBJ_GRAVE, fProfile::OBJ_GRAVE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "GroupS", fProfile::GROUP_SUMMON, fProfile::GROUP_SUMMON, 0xFFFF, 0xFF, 0}, + { "GroupT", fProfile::GROUP_TEST, fProfile::GROUP_TEST, 0xFFFF, 0xFF, 0}, + { "Grshpr", fProfile::INSECT_GRASSHOPPER, fProfile::INSECT_GRASSHOPPER, 772, SND_SOURCE_INSECT, 0}, + {"GuardLg", fProfile::OBJ_GUARD_LOG, fProfile::OBJ_GUARD_LOG, 544, SND_SOURCE_OBJECT, 0}, + { "GueB", fProfile::GUE_BULLET, fProfile::GUE_BULLET, 0xFFFF, 42, 0}, + {"HdrFire", fProfile::HIDORY_FIRE, fProfile::HIDORY_FIRE, 16, SND_SOURCE_OBJECT, 0}, + {"HeartCo", fProfile::OBJ_ITEM_HEART_CONTAINER, fProfile::OBJ_ITEM_HEART_CONTAINER, 0xFFFF, SND_SOURCE_ITEM, 0}, + { "Heartf", fProfile::HEART_FLOWER, fProfile::HEART_FLOWER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"HeatRst", fProfile::TAG_HEAT_RESIST, fProfile::TAG_HEAT_RESIST, 0xFFFF, 0xFF, 0}, + { "Himo", fProfile::OBJ_HIMO, fProfile::OBJ_HIMO, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"HitLVSW", fProfile::OBJ_HIT_LEVER_SW, fProfile::OBJ_HIT_LEVER_SW, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "HnComb", fProfile::NPC_HONEYCOMB, fProfile::NPC_HONEYCOMB, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"HoleMNG", fProfile::OBJ_HOLE_MINIGAME, fProfile::OBJ_HOLE_MINIGAME, 0xFFFF, 0xFF, 0}, + {"HolyWtr", fProfile::TAG_HOLY_WATER, fProfile::TAG_HOLY_WATER, 0xFFFF, 0xFF, 0}, + {"HrpHint", fProfile::OBJ_HARP_HINT, fProfile::OBJ_HARP_HINT, 555, SND_SOURCE_OBJECT, 0}, + { "HrpTg", fProfile::HARP_TAG, fProfile::HARP_TAG, 0xFFFF, 57, 0}, + {"ImpaDor", fProfile::OBJ_IMPA_DOOR, fProfile::OBJ_IMPA_DOOR, 0xFFFF, 0xFF, 0}, + { "InHole", fProfile::OBJ_INTO_HOLE, fProfile::OBJ_INTO_HOLE, 0xFFFF, 33, 0}, + {"InsctTg", fProfile::TAG_INSECT, fProfile::TAG_INSECT, 0xFFFF, 0xFF, 0}, + { "Invisi", fProfile::INVISIBLE, fProfile::INVISIBLE, 0xFFFF, 0xFF, 0}, + {"IronStg", fProfile::OBJ_IRON_STAGE, fProfile::OBJ_IRON_STAGE, 0xFFFF, 0xFF, 0}, + {"IslBamb", fProfile::OBJ_BAMBOO_ISLAND, fProfile::OBJ_BAMBOO_ISLAND, 0xFFFF, 0xFF, 0}, + { "IslIns", fProfile::OBJ_INSECT_ISLAND, fProfile::OBJ_INSECT_ISLAND, 0xFFFF, 0xFF, 0}, + { "IslLOD", fProfile::OBJ_ISLAND_LOD, fProfile::OBJ_ISLAND_LOD, 0xFFFF, 0xFF, 0}, + {"IslMegm", fProfile::OBJ_MEGAMI_ISLAND, fProfile::OBJ_MEGAMI_ISLAND, 0xFFFF, 0xFF, 0}, + {"IslNusi", fProfile::OBJ_ISLAND_NUSI, fProfile::OBJ_ISLAND_NUSI, 0xFFFF, 0xFF, 0}, + {"IslTery", fProfile::OBJ_TERRY_ISLAND, fProfile::OBJ_TERRY_ISLAND, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"IslTreB", fProfile::OBJ_TREASURE_ISLAND_B, fProfile::OBJ_TREASURE_ISLAND_B, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"IslTrea", fProfile::OBJ_TREASURE_ISLAND, fProfile::OBJ_TREASURE_ISLAND, 0xFFFF, 0xFF, 0}, + { "Item", fProfile::ITEM, fProfile::ITEM, 0xFFFF, SND_SOURCE_ITEM, 0}, + {"IvyRope", fProfile::OBJ_IVY_ROPE, fProfile::OBJ_IVY_ROPE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "J_Test", fProfile::J_TEST, fProfile::J_TEST, 0xFFFF, 0xFF, 0}, + {"JunkRep", fProfile::OBJ_JUNK_REPAIR, fProfile::OBJ_JUNK_REPAIR, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Kanban", fProfile::KANBAN, fProfile::KANBAN, 513, SND_SOURCE_OBJECT, 0}, + {"KanbanS", fProfile::OBJ_KANBAN_STONE, fProfile::OBJ_KANBAN_STONE, 514, 0xFF, 0}, + { "Kibako", fProfile::OBJ_KIBAKO, fProfile::OBJ_KIBAKO, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"KiesuTa", fProfile::KIESU_TAG, fProfile::KIESU_TAG, 0xFFFF, 15, 0}, + { "Kinoko", fProfile::OBJ_MUSHROOM, fProfile::OBJ_MUSHROOM, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"KinokoA", fProfile::OBJ_MUSHROOM, fProfile::OBJ_MUSHROOM, 0xFFFF, SND_SOURCE_OBJECT, 1}, + {"KinokoB", fProfile::OBJ_MUSHROOM, fProfile::OBJ_MUSHROOM, 0xFFFF, SND_SOURCE_OBJECT, 2}, + {"KinokoC", fProfile::OBJ_MUSHROOM, fProfile::OBJ_MUSHROOM, 0xFFFF, SND_SOURCE_OBJECT, 3}, + {"KinokoD", fProfile::OBJ_MUSHROOM, fProfile::OBJ_MUSHROOM, 0xFFFF, SND_SOURCE_OBJECT, 4}, + {"KmtWall", fProfile::OBJ_KUMITE_WALL, fProfile::OBJ_KUMITE_WALL, 0xFFFF, 0xFF, 0}, + {"KndBird", fProfile::KNIGHT_LEADER_BIRD, fProfile::KNIGHT_LEADER_BIRD, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"Kuwagat", fProfile::INSECT_BEETLE, fProfile::INSECT_BEETLE, 771, SND_SOURCE_INSECT, 1}, + { "Kytag", fProfile::KYTAG_TAG, fProfile::KYTAG_TAG, 0xFFFF, 0xFF, 0}, + { "LBird", fProfile::LITTLE_BIRD, fProfile::LITTLE_BIRD, 479, 43, 0}, + {"LBmaker", fProfile::LITTLE_BIRD_MGR, fProfile::LITTLE_BIRD_MGR, 0xFFFF, 59, 0}, + { "LHHarp", fProfile::OBJ_LIGHTHOUSE_HARP, fProfile::OBJ_LIGHTHOUSE_HARP, 0xFFFF, 0xFF, 0}, + {"LHLight", fProfile::OBJ_LIGHTHOUSE_LIGHT, fProfile::OBJ_LIGHTHOUSE_LIGHT, 0xFFFF, 0xFF, 0}, + { "LSEff", fProfile::TAG_LIGHT_SHAFT_EFF, fProfile::TAG_LIGHT_SHAFT_EFF, 0xFFFF, 0xFF, 0}, + {"Ladybug", fProfile::INSECT_LADYBUG, fProfile::INSECT_LADYBUG, 769, SND_SOURCE_INSECT, 0}, + { "LampA", fProfile::OBJ_LAMP, fProfile::OBJ_LAMP, 0xFFFF, 0xFF, 1}, + { "LampB", fProfile::OBJ_LAMP, fProfile::OBJ_LAMP, 0xFFFF, 0xFF, 2}, + { "LampC", fProfile::OBJ_LAMP, fProfile::OBJ_LAMP, 0xFFFF, 0xFF, 3}, + { "LampD", fProfile::OBJ_LAMP, fProfile::OBJ_LAMP, 0xFFFF, 0xFF, 6}, + { "LampE", fProfile::OBJ_LAMP, fProfile::OBJ_LAMP, 0xFFFF, 0xFF, 4}, + { "LampF", fProfile::OBJ_LAMP, fProfile::OBJ_LAMP, 0xFFFF, 0xFF, 5}, + {"LavF200", fProfile::OBJ_LAVA_F200, fProfile::OBJ_LAVA_F200, 0xFFFF, 0xFF, 0}, + {"LbTnder", fProfile::LBTHUNDER_TAG, fProfile::LBTHUNDER_TAG, 0xFFFF, 0xFF, 0}, + {"LeafGut", fProfile::OBJ_FRUIT_GUTS_LEAF, fProfile::OBJ_FRUIT_GUTS_LEAF, 0xFFFF, 0xFF, 0}, + {"LeafSwg", fProfile::OBJ_LEAF_SWING, fProfile::OBJ_LEAF_SWING, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"Light00", fProfile::OBJ_BUILDING, fProfile::OBJ_BUILDING, 0xFFFF, 0xFF, 1}, + {"LightLi", fProfile::OBJ_LIGHT_LINE, fProfile::OBJ_LIGHT_LINE, 0xFFFF, 41, 0}, + { "Link", fProfile::PLAYER, fProfile::PLAYER, 0xFFFF, SND_SOURCE_PLAYER, 0}, + { "Log", fProfile::OBJ_LOG, fProfile::OBJ_LOG, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "LogWtr", fProfile::OBJ_LOG_WATER, fProfile::OBJ_LOG_WATER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Lotus", fProfile::OBJ_LOTUS, fProfile::OBJ_LOTUS, 521, SND_SOURCE_OBJECT, 0}, + { "LtSftS", fProfile::OBJ_LIGHT_SHAFT_SMALL, fProfile::OBJ_LIGHT_SHAFT_SMALL, 0xFFFF, 41, 0}, + {"LtsFlwr", fProfile::OBJ_LOTUS_FLOWER, fProfile::OBJ_LOTUS_FLOWER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"LtsSeed", fProfile::OBJ_LOTUS_SEED, fProfile::OBJ_LOTUS_SEED, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "LvD201", fProfile::OBJ_LAVA_D201, fProfile::OBJ_LAVA_D201, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "LvPlt", fProfile::OBJ_LAVA_PLATE, fProfile::OBJ_LAVA_PLATE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "MDvTg", fProfile::MEGAMI_DIVING_TAG, fProfile::MEGAMI_DIVING_TAG, 0xFFFF, 0xFF, 0}, + {"MagBoat", fProfile::OBJ_ROCK_BOAT, fProfile::OBJ_ROCK_BOAT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "MagpB", fProfile::MAGUPPO_BULLET, fProfile::MAGUPPO_BULLET, 0xFFFF, 30, 0}, + { "Mantis", fProfile::INSECT_GRASSHOPPER, fProfile::INSECT_GRASSHOPPER, 773, SND_SOURCE_INSECT, 1}, + {"MapArea", fProfile::MAP_AREA_TAG, fProfile::MAP_AREA_TAG, 0xFFFF, 0xFF, 0}, + {"MapInst", fProfile::TAG_MAP_INST, fProfile::TAG_MAP_INST, 0xFFFF, 0xFF, 0}, + {"MapMark", fProfile::T_MAP_MARK, fProfile::T_MAP_MARK, 0xFFFF, 0xFF, 0}, + {"MassTag", fProfile::MASS_OBJ_TAG, fProfile::MASS_OBJ_TAG, 0xFFFF, 0xFF, 0}, + {"Message", fProfile::MESSAGE_ACTOR, fProfile::MESSAGE_ACTOR, 0xFFFF, 0xFF, 0}, + {"MgPmpkn", fProfile::OBJ_MG_PUMPKIN, fProfile::OBJ_MG_PUMPKIN, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "MistTg", fProfile::MIST_TAG, fProfile::MIST_TAG, 0xFFFF, 0xFF, 0}, + {"MoMgTag", fProfile::MOLE_MGR_TAG, fProfile::MOLE_MGR_TAG, 0xFFFF, 0xFF, 0}, + { "MoSoil", fProfile::OBJ_MOLE_SOIL, fProfile::OBJ_MOLE_SOIL, 0xFFFF, 0xFF, 0}, + {"MoleCvr", fProfile::OBJ_MOLE_COVER, fProfile::OBJ_MOLE_COVER, 0xFFFF, 0xFF, 0}, + {"MoleTag", fProfile::MOLE_PROHIBIT_TAG, fProfile::MOLE_PROHIBIT_TAG, 0xFFFF, 0xFF, 0}, + {"MpParts", fProfile::OBJ_MAPPARTS, fProfile::OBJ_MAPPARTS, 0xFFFF, 0xFF, 0}, + {"MssbTag", fProfile::TAG_MUSASABI, fProfile::TAG_MUSASABI, 0xFFFF, 0xFF, 0}, + {"Musasab", fProfile::OBJ_MUSASABI, fProfile::OBJ_MUSASABI, 321, SND_SOURCE_OBJECT, 0}, + { "MvElc", fProfile::OBJ_MOVE_ELEC, fProfile::OBJ_MOVE_ELEC, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"MvLiftV", fProfile::OBJ_MOVE_LIFT_VOL, fProfile::OBJ_MOVE_LIFT_VOL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "NpcAdr", fProfile::NPC_ADR, fProfile::NPC_ADR, 310, SND_SOURCE_NPC_DRAGON, 0}, + {"NpcAkuH", fProfile::NPC_AKU_HUMAN, fProfile::NPC_AKU_HUMAN, 346, SND_SOURCE_NPC_NRM, 0}, + {"NpcAkum", fProfile::NPC_AKUMAKUN, fProfile::NPC_AKUMAKUN, 279, SND_SOURCE_NPC_NRM, 0}, + {"NpcAzFa", fProfile::NPC_AZUKARIYA_FATHER, fProfile::NPC_AZUKARIYA_FATHER, 298, SND_SOURCE_NPC_NRM, 0}, + {"NpcAzNi", fProfile::NPC_AZUKARIYA_NIGHT, fProfile::NPC_AZUKARIYA_NIGHT, 464, SND_SOURCE_NPC_NRM, 0}, + {"NpcBRvl", fProfile::NPC_BBRVL, fProfile::NPC_BBRVL, 261, 50, 0}, + {"NpcBdsw", fProfile::NPC_BDSW, fProfile::NPC_BDSW, 0xFFFF, 50, 0}, + { "NpcBdz", fProfile::NPC_BDZ, fProfile::NPC_BDZ, 0xFFFF, 43, 0}, + { "NpcBgr", fProfile::NPC_BGR, fProfile::NPC_BGR, 298, SND_SOURCE_NPC_NRM, 0}, + {"NpcBird", fProfile::NPC_BIRD, fProfile::NPC_BIRD, 0xFFFF, 43, 0}, + {"NpcCbFd", fProfile::NPC_CE_FRIEND, fProfile::NPC_CE_FRIEND, 278, SND_SOURCE_NPC_NRM, 0}, + {"NpcCbLd", fProfile::NPC_CE_LADY, fProfile::NPC_CE_LADY, 285, SND_SOURCE_NPC_NRM, 0}, + {"NpcChef", fProfile::NPC_CHEF, fProfile::NPC_CHEF, 299, SND_SOURCE_NPC_NRM, 0}, + {"NpcDgJg", fProfile::NPC_DIVE_GAME_JUDGE, fProfile::NPC_DIVE_GAME_JUDGE, 272, SND_SOURCE_NPC_NRM, 0}, + {"NpcDoML", fProfile::NPC_DOUGUYA_MOTHER_LOD, fProfile::NPC_DOUGUYA_MOTHER_LOD, 294, SND_SOURCE_NPC_NRM, 0}, + {"NpcDoMo", fProfile::NPC_DOUGUYA_MOTHER, fProfile::NPC_DOUGUYA_MOTHER, 294, SND_SOURCE_NPC_NRM, 0}, + {"NpcDoNi", fProfile::NPC_DOUGUYA_NIGHT, fProfile::NPC_DOUGUYA_NIGHT, 462, SND_SOURCE_NPC_NRM, 0}, + { "NpcDrb", fProfile::NPC_DRB, fProfile::NPC_DRB, 319, 43, 0}, + {"NpcDrbC", fProfile::NPC_DRBC, fProfile::NPC_DRBC, 320, 43, 0}, + { "NpcDsk", fProfile::NPC_DSK, fProfile::NPC_DSK, 258, SND_SOURCE_NPC_NRM, 0}, + {"NpcDskN", fProfile::NPC_DAISHINKAN_N, fProfile::NPC_DAISHINKAN_N, 340, SND_SOURCE_NPC_NRM, 0}, + { "NpcFdr", fProfile::NPC_FDR, fProfile::NPC_FDR, 318, SND_SOURCE_NPC_DRAGON, 0}, + { "NpcGhm", fProfile::NPC_GHM, fProfile::NPC_GHM, 323, 50, 0}, + {"NpcGost", fProfile::NPC_TOILET_GHOST, fProfile::NPC_TOILET_GHOST, 300, SND_SOURCE_NPC_NRM, 0}, + { "NpcGra", fProfile::NPC_GRA, fProfile::NPC_GRA, 302, SND_SOURCE_NPC_NRM, 0}, + { "NpcGrc", fProfile::NPC_GRC, fProfile::NPC_GRC, 330, SND_SOURCE_NPC_NRM, 0}, + { "NpcGrd", fProfile::NPC_GRD, fProfile::NPC_GRD, 331, 50, 0}, + { "NpcGzl", fProfile::NPC_GZL, fProfile::NPC_GZL, 257, SND_SOURCE_NPC_NRM, 0}, + {"NpcIcgK", fProfile::NPC_ICGK, fProfile::NPC_ICGK, 460, SND_SOURCE_NPC_NRM, 0}, + { "NpcInv", fProfile::NPC_INV, fProfile::NPC_INV, 0xFFFF, 0xFF, 0}, + {"NpcJkML", fProfile::NPC_JUNK_MOTHER_LOD, fProfile::NPC_JUNK_MOTHER_LOD, 295, SND_SOURCE_NPC_NRM, 0}, + {"NpcJkMo", fProfile::NPC_JUNK_MOTHER, fProfile::NPC_JUNK_MOTHER, 295, SND_SOURCE_NPC_NRM, 0}, + {"NpcJkNi", fProfile::NPC_JUNK_NIGHT, fProfile::NPC_JUNK_NIGHT, 463, SND_SOURCE_NPC_NRM, 0}, + {"NpcKb2N", fProfile::NPC_KOBUN_B_NIGHT, fProfile::NPC_KOBUN_B_NIGHT, 459, SND_SOURCE_NPC_NRM, 0}, + { "NpcKbn", fProfile::NPC_KBN, fProfile::NPC_KBN, 262, SND_SOURCE_NPC_NRM, 0}, + {"NpcKbn2", fProfile::NPC_KBN2, fProfile::NPC_KBN2, 263, SND_SOURCE_NPC_NRM, 0}, + { "NpcKen", fProfile::NPC_KENSEI, fProfile::NPC_KENSEI, 0xFFFF, SND_SOURCE_KENSEI, 0}, + {"NpcKenT", fProfile::NPC_TALK_KENSEI, fProfile::NPC_TALK_KENSEI, 0xFFFF, SND_SOURCE_KENSEI, 0}, + {"NpcKnld", fProfile::NPC_KNIGHT_LEADER, fProfile::NPC_KNIGHT_LEADER, 271, SND_SOURCE_NPC_NRM, 0}, + {"NpcKyuE", fProfile::NPC_KYUI_ELDER, fProfile::NPC_KYUI_ELDER, 307, SND_SOURCE_NPC_NRM, 0}, + {"NpcKyuW", fProfile::NPC_KYUI_WIZARD, fProfile::NPC_KYUI_WIZARD, 308, SND_SOURCE_NPC_NRM, 0}, + {"NpcMHNi", fProfile::NPC_MED_HUS_NIGHT, fProfile::NPC_MED_HUS_NIGHT, 466, SND_SOURCE_NPC_NRM, 0}, + {"NpcMWNi", fProfile::NPC_MED_WIFE_NIGHT, fProfile::NPC_MED_WIFE_NIGHT, 465, SND_SOURCE_NPC_NRM, 0}, + {"NpcMlMg", fProfile::NPC_MOLE_MG, fProfile::NPC_MOLE_MG, 313, 50, 0}, + {"NpcMoEN", fProfile::NPC_MOLE_ES_NML, fProfile::NPC_MOLE_ES_NML, 345, 50, 0}, + {"NpcMoEl", fProfile::NPC_MOLE_ELDER, fProfile::NPC_MOLE_ELDER, 317, 50, 0}, + { "NpcMoN", fProfile::NPC_MOLE_NORMAL, fProfile::NPC_MOLE_NORMAL, 312, 50, 0}, + {"NpcMoN2", fProfile::NPC_MOLE_NORMAL2, fProfile::NPC_MOLE_NORMAL2, 312, 50, 0}, + { "NpcMoS", fProfile::NPC_MOLE_SAL, fProfile::NPC_MOLE_SAL, 474, 50, 0}, + { "NpcMoT", fProfile::NPC_MOLE_TACKLE, fProfile::NPC_MOLE_TACKLE, 315, 50, 0}, + {"NpcMoT2", fProfile::NPC_MOLE_TACKLE2, fProfile::NPC_MOLE_TACKLE2, 316, 50, 0}, + {"NpcMole", fProfile::NPC_MOLE, fProfile::NPC_MOLE, 345, 50, 0}, + { "NpcOim", fProfile::NPC_OIM, fProfile::NPC_OIM, 301, SND_SOURCE_NPC_NRM, 0}, + {"NpcOkyu", fProfile::NPC_ORD_KYUI, fProfile::NPC_ORD_KYUI, 304, SND_SOURCE_NPC_NRM, 0}, + { "NpcPcs", fProfile::NPC_PCS, fProfile::NPC_PCS, 469, SND_SOURCE_NPC_NRM, 0}, + { "NpcPdu", fProfile::NPC_PDU, fProfile::NPC_PDU, 274, SND_SOURCE_NPC_NRM, 0}, + { "NpcPma", fProfile::NPC_PMA, fProfile::NPC_PMA, 273, SND_SOURCE_NPC_NRM, 0}, + {"NpcResc", fProfile::NPC_RESCUE, fProfile::NPC_RESCUE, 291, SND_SOURCE_NPC_NRM, 0}, + { "NpcRvl", fProfile::NPC_RVL, fProfile::NPC_RVL, 261, SND_SOURCE_NPC_NRM, 0}, + {"NpcRvlL", fProfile::NPC_RIVAL_LOD, fProfile::NPC_RIVAL_LOD, 261, SND_SOURCE_NPC_NRM, 0}, + {"NpcRvlR", fProfile::NPC_REGRET_RIVAL, fProfile::NPC_REGRET_RIVAL, 261, SND_SOURCE_NPC_NRM, 0}, + {"NpcSAML", fProfile::NPC_SENPAIA_MOTHER_LOD, fProfile::NPC_SENPAIA_MOTHER_LOD, 296, SND_SOURCE_NPC_NRM, 0}, + {"NpcSAMo", fProfile::NPC_SENPAIA_MOTHER, fProfile::NPC_SENPAIA_MOTHER, 296, SND_SOURCE_NPC_NRM, 0}, + {"NpcSMnD", fProfile::NPC_SORAJIMA_MAN_D, fProfile::NPC_SORAJIMA_MAN_D, 297, SND_SOURCE_NPC_NRM, 0}, + {"NpcSMnE", fProfile::NPC_SORAJIMA_MAN_E, fProfile::NPC_SORAJIMA_MAN_E, 336, SND_SOURCE_NPC_NRM, 0}, + {"NpcSalS", fProfile::NPC_SALESMAN_S, fProfile::NPC_SALESMAN_S, 265, SND_SOURCE_NPC_NRM, 0}, + {"NpcSenb", fProfile::NPC_SENPAI_B, fProfile::NPC_SENPAI_B, 277, SND_SOURCE_NPC_NRM, 0}, + {"NpcSenp", fProfile::NPC_SENPAI, fProfile::NPC_SENPAI, 276, SND_SOURCE_NPC_NRM, 0}, + { "NpcSha", fProfile::NPC_SHA, fProfile::NPC_SHA, 275, SND_SOURCE_NPC_NRM, 0}, + { "NpcSkn", fProfile::NPC_SKN, fProfile::NPC_SKN, 259, SND_SOURCE_NPC_NRM, 0}, + {"NpcSkn2", fProfile::NPC_SKN2, fProfile::NPC_SKN2, 260, SND_SOURCE_NPC_NRM, 0}, + {"NpcSlFB", fProfile::NPC_SLFB, fProfile::NPC_SLFB, 0xFFFF, 43, 0}, + {"NpcSlFl", fProfile::NPC_SLFL, fProfile::NPC_SLFL, 0xFFFF, 43, 0}, + {"NpcSlKy", fProfile::NPC_SALBAGE_MORRY, fProfile::NPC_SALBAGE_MORRY, 304, SND_SOURCE_NPC_NRM, 0}, + {"NpcSlRp", fProfile::NPC_SLRP, fProfile::NPC_SLRP, 477, 43, 0}, + {"NpcSlb2", fProfile::NPC_SLB2, fProfile::NPC_SLB2, 354, 43, 0}, + {"NpcSlrb", fProfile::NPC_SLB, fProfile::NPC_SLB, 0xFFFF, 43, 0}, + {"NpcSltk", fProfile::NPC_SLTK, fProfile::NPC_SLTK, 0xFFFF, 0xFF, 0}, + {"NpcSma2", fProfile::NPC_SMA2, fProfile::NPC_SMA2, 286, SND_SOURCE_NPC_NRM, 0}, + {"NpcSma3", fProfile::NPC_SMA3, fProfile::NPC_SMA3, 287, SND_SOURCE_NPC_NRM, 0}, + {"NpcSoBo", fProfile::NPC_SORAJIMA_BOY, fProfile::NPC_SORAJIMA_BOY, 284, SND_SOURCE_NPC_NRM, 0}, + {"NpcSoFa", fProfile::NPC_SORAJIMA_FATHER, fProfile::NPC_SORAJIMA_FATHER, 282, SND_SOURCE_NPC_NRM, 0}, + { "NpcSoG", fProfile::NPC_SORAJIMA_GIRL, fProfile::NPC_SORAJIMA_GIRL, 288, SND_SOURCE_NPC_NRM, 0}, + {"NpcSoMo", fProfile::NPC_SORAJIMA_MOTHER, fProfile::NPC_SORAJIMA_MOTHER, 283, SND_SOURCE_NPC_NRM, 0}, + {"NpcSoma", fProfile::NPC_SORAJIMA_MALE, fProfile::NPC_SORAJIMA_MALE, 281, SND_SOURCE_NPC_NRM, 0}, + {"NpcSowo", fProfile::NPC_SORAJIMA_FEMALE, fProfile::NPC_SORAJIMA_FEMALE, 280, SND_SOURCE_NPC_NRM, 0}, + { "NpcStr", fProfile::NPC_STR, fProfile::NPC_STR, 0xFFFF, 0xFF, 0}, + { "NpcSui", fProfile::NPC_SUISEI, fProfile::NPC_SUISEI, 344, 43, 0}, + {"NpcSuiN", fProfile::NPC_SUISEI_NORMAL, fProfile::NPC_SUISEI_NORMAL, 309, 50, 0}, + {"NpcSuiS", fProfile::NPC_SUISEI_SUB, fProfile::NPC_SUISEI_SUB, 309, 43, 0}, + { "NpcTdr", fProfile::NPC_TDR, fProfile::NPC_TDR, 322, SND_SOURCE_NPC_DRAGON, 0}, + {"NpcTdrB", fProfile::NPC_TDRB, fProfile::NPC_TDRB, 322, SND_SOURCE_OBJECT, 0}, + { "NpcTds", fProfile::NPC_TDS, fProfile::NPC_TDS, 478, 0xFF, 0}, + { "NpcTer", fProfile::NPC_TERRY, fProfile::NPC_TERRY, 264, SND_SOURCE_NPC_NRM, 0}, + { "NpcTke", fProfile::NPC_TKE, fProfile::NPC_TKE, 0xFFFF, 0xFF, 0}, + { "NpcTmn", fProfile::NPC_TMN, fProfile::NPC_TMN, 0xFFFF, 0xFF, 0}, + { "NpcYim", fProfile::NPC_YIM, fProfile::NPC_YIM, 311, SND_SOURCE_NPC_NRM, 0}, + { "NpcZld", fProfile::NPC_ZLD, fProfile::NPC_ZLD, 256, SND_SOURCE_NPC_NRM, 0}, + {"Npckyu1", fProfile::NPC_KYUI_FIRST, fProfile::NPC_KYUI_FIRST, 303, SND_SOURCE_NPC_NRM, 0}, + {"Npckyu3", fProfile::NPC_KYUI_THIRD, fProfile::NPC_KYUI_THIRD, 305, SND_SOURCE_NPC_NRM, 0}, + {"Npckyu4", fProfile::NPC_KYUI4, fProfile::NPC_KYUI4, 306, SND_SOURCE_NPC_NRM, 0}, + { "NusiB", fProfile::B_NUSI, fProfile::B_NUSI, 0xFFFF, 23, 0}, + { "NusiBt", fProfile::B_NUSI_BULLET, fProfile::B_NUSI_BULLET, 0xFFFF, SND_SOURCE_BULLET, 0}, + {"NusiNpc", fProfile::NUSI_NPC, fProfile::NUSI_NPC, 0xFFFF, 46, 0}, + { "NusiS", fProfile::NUSI_BASE, fProfile::NUSI_BASE, 0xFFFF, 0xFF, 0}, + { "NusiT", fProfile::B_NUSI_TENTAKLE, fProfile::B_NUSI_TENTAKLE, 5, 19, 0}, + {"OBBLBom", fProfile::OBJ_BBLARGEBOMB, fProfile::OBJ_BBLARGEBOMB, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "OBBStn", fProfile::OBJ_BSTN, fProfile::OBJ_BSTN, 557, 0xFF, 0}, + {"ODesert", fProfile::OBJ_DESERT, fProfile::OBJ_DESERT, 0xFFFF, 0xFF, 0}, + { "OGhKf", fProfile::OBJ_GH_KNIFE, fProfile::OBJ_GH_KNIFE, 0xFFFF, SND_SOURCE_BULLET, 0}, + { "OGhSwL", fProfile::OBJ_GH_SW_L, fProfile::OBJ_GH_SW_L, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "OHole", fProfile::OBJ_HOLE, fProfile::OBJ_HOLE, 0xFFFF, 0xFF, 0}, + { "OPipe", fProfile::OBJ_PIPE, fProfile::OBJ_PIPE, 0xFFFF, SND_SOURCE_ITEM, 0}, + { "ORing", fProfile::OBJ_RING, fProfile::OBJ_RING, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "ObjBg", fProfile::OBJ_BG, fProfile::OBJ_BG, 0xFFFF, 0xFF, 0}, + { "ObjBld", fProfile::OBJ_BUILDING, fProfile::OBJ_BUILDING, 0xFFFF, 0xFF, 0}, + {"Obstacl", fProfile::OBJ_BELT_OBSTACLE, fProfile::OBJ_BELT_OBSTACLE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "OcGrs", fProfile::OBJ_OCT_GRASS, fProfile::OBJ_OCT_GRASS, 0xFFFF, 0xFF, 0}, + { "OcGrsL", fProfile::OBJ_OCT_GRASS_LEAF, fProfile::OBJ_OCT_GRASS_LEAF, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"OrCaBul", fProfile::OR_CANN_BULLET, fProfile::OR_CANN_BULLET, 0xFFFF, SND_SOURCE_BULLET, 0}, + { "Paint", fProfile::OBJ_PAINT, fProfile::OBJ_PAINT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"Pinwhel", fProfile::OBJ_PINWHEEL, fProfile::OBJ_PINWHEEL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Piston", fProfile::OBJ_PISTON, fProfile::OBJ_PISTON, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "PlCock", fProfile::OBJ_POOL_COCK, fProfile::OBJ_POOL_COCK, 0xFFFF, 0xFF, 0}, + {"PlRsTag", fProfile::PL_RESTART, fProfile::PL_RESTART, 0xFFFF, 0xFF, 0}, + { "Plight", fProfile::PLIGHT_TAG, fProfile::PLIGHT_TAG, 0xFFFF, 0xFF, 0}, + {"PlntA00", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 16}, + {"PlntA01", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 17}, + { "PlntB", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 18}, + {"PlntC00", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 19}, + {"PlntC01", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 20}, + { "PltA00", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 7}, + { "PltA01", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 8}, + { "PltA02", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 9}, + { "PltB00", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 10}, + { "PltB01", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 11}, + { "PltB02", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 12}, + { "PltChg", fProfile::PLTCHG_TAG, fProfile::PLTCHG_TAG, 0xFFFF, 0xFF, 0}, + {"PmpknBd", fProfile::PUMPKIN, fProfile::PUMPKIN, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"PmpknDe", fProfile::PUMPKIN, fProfile::PUMPKIN, 0xFFFF, 0xFF, 0}, + {"PoleStn", fProfile::OBJ_POLE_STONY, fProfile::OBJ_POLE_STONY, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "PotSal", fProfile::OBJ_POT_SAL, fProfile::OBJ_POT_SAL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"Propera", fProfile::OBJ_PROPERA, fProfile::OBJ_PROPERA, 539, SND_SOURCE_OBJECT, 0}, + {"PrpLift", fProfile::OBJ_PROPELLER_LIFT, fProfile::OBJ_PROPELLER_LIFT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"PumpBar", fProfile::OBJ_PUMPKIN_BAR, fProfile::OBJ_PUMPKIN_BAR, 0xFFFF, 0xFF, 0}, + {"Pumpkin", fProfile::OBJ_PUMPKIN_LEAF, fProfile::OBJ_PUMPKIN_LEAF, 0xFFFF, 0xFF, 0}, + {"PushBlk", fProfile::OBJ_PUSH_BLOCK, fProfile::OBJ_PUSH_BLOCK, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "PyBird", fProfile::BIRD, fProfile::BIRD, 0xFFFF, SND_SOURCE_PLAYER_BIRD, 0}, + {"PzlLand", fProfile::OBJ_PUZZLE_ISLAND, fProfile::OBJ_PUZZLE_ISLAND, 0xFFFF, 0xFF, 0}, + {"RRckTag", fProfile::RIDE_ROCK_SET_TAG, fProfile::RIDE_ROCK_SET_TAG, 0xFFFF, 0xFF, 0}, + { "RaceM", fProfile::AVATER_RACE_MNG, fProfile::AVATER_RACE_MNG, 0xFFFF, 0xFF, 0}, + {"RailEnd", fProfile::OBJ_RAIL_END, fProfile::OBJ_RAIL_END, 0xFFFF, 0xFF, 0}, + {"RailPst", fProfile::OBJ_RAIL_POST, fProfile::OBJ_RAIL_POST, 0xFFFF, 0xFF, 0}, + {"RidRock", fProfile::OBJ_RIDE_ROCK, fProfile::OBJ_RIDE_ROCK, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "RkDrgn", fProfile::OBJ_ROCK_DRAGON, fProfile::OBJ_ROCK_DRAGON, 0xFFFF, 42, 0}, + {"RoAtLog", fProfile::TAG_ROLL_ATTACK_LOG, fProfile::TAG_ROLL_ATTACK_LOG, 0xFFFF, 0xFF, 0}, + {"RoAtTag", fProfile::RO_AT_TAR_MANAGER_TAG, fProfile::RO_AT_TAR_MANAGER_TAG, 0xFFFF, 0xFF, 0}, + {"RoAtTar", fProfile::OBJ_RO_AT_TARGET, fProfile::OBJ_RO_AT_TARGET, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"RoLight", fProfile::OBJ_ROTATION_LIGHT, fProfile::OBJ_ROTATION_LIGHT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"RockSky", fProfile::OBJ_ROCK_SKY, fProfile::OBJ_ROCK_SKY, 0xFFFF, 0xFF, 0}, + {"RolRock", fProfile::OBJ_ROLL_ROCK, fProfile::OBJ_ROLL_ROCK, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"RopeBas", fProfile::OBJ_ROPE_BASE, fProfile::OBJ_ROPE_BASE, 0xFFFF, 0xFF, 0}, + {"RopeIga", fProfile::OBJ_ROPE_IGAIGA, fProfile::OBJ_ROPE_IGAIGA, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"RouletC", fProfile::OBJ_ROULETTE_ISLAND_C, fProfile::OBJ_ROULETTE_ISLAND_C, 0xFFFF, 0xFF, 0}, + {"RouletR", fProfile::OBJ_ROULETTE_ISLAND_R, fProfile::OBJ_ROULETTE_ISLAND_R, 0xFFFF, 0xFF, 0}, + {"Roulete", fProfile::OBJ_ROULETTE, fProfile::OBJ_ROULETTE, 540, SND_SOURCE_OBJECT, 0}, + {"RuinSav", fProfile::OBJ_RUINED_SAVE, fProfile::OBJ_RUINED_SAVE, 0xFFFF, 0xFF, 0}, + {"SKinoko", fProfile::OBJ_MUSHROOM, fProfile::OBJ_MUSHROOM, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"SStatue", fProfile::OBJ_STEP_STATUE, fProfile::OBJ_STEP_STATUE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"STCover", fProfile::OBJ_STAGE_COVER, fProfile::OBJ_STAGE_COVER, 0xFFFF, 0xFF, 0}, + {"STCrack", fProfile::OBJ_STAGE_CRACK, fProfile::OBJ_STAGE_CRACK, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"STKraPt", fProfile::OBJ_STAGE_KRAKEN_PARTS, fProfile::OBJ_STAGE_KRAKEN_PARTS, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"STKrake", fProfile::OBJ_STAGE_KRAKEN, fProfile::OBJ_STAGE_KRAKEN, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "STSink", fProfile::OBJ_STAGE_SINK, fProfile::OBJ_STAGE_SINK, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"STWater", fProfile::OBJ_STAGE_WATER, fProfile::OBJ_STAGE_WATER, 0xFFFF, 0xFF, 0}, + { "Sail", fProfile::OBJ_SAIL, fProfile::OBJ_SAIL, 0xFFFF, 0xFF, 0}, + {"Sandbag", fProfile::OBJ_SANDBAG, fProfile::OBJ_SANDBAG, 0xFFFF, 0xFF, 0}, + {"ScChang", fProfile::SC_CHANGE_TAG, fProfile::SC_CHANGE_TAG, 0xFFFF, 0xFF, 0}, + { "Scarab", fProfile::INSECT_SCARAB, fProfile::INSECT_SCARAB, 775, SND_SOURCE_INSECT, 0}, + { "SdCdl", fProfile::OBJ_SWORD_CANDLE, fProfile::OBJ_SWORD_CANDLE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"SeaF301", fProfile::OBJ_SEA_F301, fProfile::OBJ_SEA_F301, 0xFFFF, 0xFF, 0}, + { "Shed", fProfile::OBJ_SHED, fProfile::OBJ_SHED, 0xFFFF, 0xFF, 0}, + {"ShipFld", fProfile::TAG_SHIP_FLOOD, fProfile::TAG_SHIP_FLOOD, 0xFFFF, 0xFF, 0}, + {"ShipSlp", fProfile::TAG_SHIP_SLOPE, fProfile::TAG_SHIP_SLOPE, 0xFFFF, 0xFF, 0}, + {"ShipWin", fProfile::OBJ_SHIP_WINDOW, fProfile::OBJ_SHIP_WINDOW, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"ShpSmpl", fProfile::SHOP_SAMPLE, fProfile::SHOP_SAMPLE, 553, 0xFF, 0}, + {"ShriAft", fProfile::OBJ_SHRINE_AFTER, fProfile::OBJ_SHRINE_AFTER, 0xFFFF, 0xFF, 0}, + {"ShriBef", fProfile::OBJ_SHRINE_BEFORE, fProfile::OBJ_SHRINE_BEFORE, 0xFFFF, 0xFF, 0}, + {"ShriIns", fProfile::OBJ_SHRINE_BEF_INSIDE, fProfile::OBJ_SHRINE_BEF_INSIDE, 0xFFFF, 0xFF, 0}, + { "ShtCS", fProfile::OBJ_SHUTTER_CHANGE_SCENE, fProfile::OBJ_SHUTTER_CHANGE_SCENE, 0xFFFF, SND_SOURCE_SHUTTER, 0}, + {"ShtrWtr", fProfile::OBJ_SHUTTER_WATER_D101, fProfile::OBJ_SHUTTER_WATER_D101, 0xFFFF, SND_SOURCE_SHUTTER, 0}, + { "SideST", fProfile::OBJ_SIDE_SHUTTER, fProfile::OBJ_SIDE_SHUTTER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"Siren2D", fProfile::OBJ_SIREN_2DMAP, fProfile::OBJ_SIREN_2DMAP, 0xFFFF, 0xFF, 0}, + {"SirenTg", fProfile::SIREN_TAG, fProfile::SIREN_TAG, 0xFFFF, 0xFF, 0}, + {"SkEnmyT", fProfile::SKYENEMY_T, fProfile::SKYENEMY_T, 0xFFFF, 59, 0}, + {"SldDoor", fProfile::OBJ_SEALED_DOOR, fProfile::OBJ_SEALED_DOOR, 0xFFFF, 0xFF, 0}, + {"SliceLg", fProfile::OBJ_SLICE_LOG, fProfile::OBJ_SLICE_LOG, 543, SND_SOURCE_OBJECT, 0}, + {"SlicePt", fProfile::OBJ_SLICE_LOG_PARTS, fProfile::OBJ_SLICE_LOG_PARTS, 543, SND_SOURCE_OBJECT, 0}, + { "Smoke", fProfile::OBJ_SMOKE, fProfile::OBJ_SMOKE, 0xFFFF, 0xFF, 0}, + {"SnLight", fProfile::OBJ_SUN_LIGHT, fProfile::OBJ_SUN_LIGHT, 0xFFFF, 0xFF, 0}, + {"SndD301", fProfile::OBJ_SAND_D301, fProfile::OBJ_SAND_D301, 0xFFFF, 0xFF, 0}, + { "SndStn", fProfile::OBJ_STONE_STAND, fProfile::OBJ_STONE_STAND, 558, SND_SOURCE_OBJECT, 0}, + { "SngGS", fProfile::OBJ_GODDESS_STATUE, fProfile::OBJ_GODDESS_STATUE, 0xFFFF, 0xFF, 0}, + {"SnkFlrF", fProfile::OBJ_SINK_FLOOR_F, fProfile::OBJ_SINK_FLOOR_F, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Soil", fProfile::OBJ_SOIL, fProfile::OBJ_SOIL, 0xFFFF, 33, 0}, + {"SpWinTg", fProfile::TAG_SHIP_WINDOW, fProfile::TAG_SHIP_WINDOW, 0xFFFF, 0xFF, 0}, + {"SparkTg", fProfile::SPARKS_TAG, fProfile::SPARKS_TAG, 0xFFFF, 0xFF, 0}, + {"SpiderL", fProfile::OBJ_SPIDER_LINE, fProfile::OBJ_SPIDER_LINE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Spike", fProfile::OBJ_SPIKE, fProfile::OBJ_SPIKE, 0xFFFF, 0xFF, 0}, + { "SpkTg2", fProfile::SPARKS2_TAG, fProfile::SPARKS2_TAG, 0xFFFF, 0xFF, 0}, + { "Spore", fProfile::OBJ_SPORE, fProfile::OBJ_SPORE, 0xFFFF, 0xFF, 0}, + {"SporeTg", fProfile::SPORE_TAG, fProfile::SPORE_TAG, 0xFFFF, 0xFF, 0}, + { "SrnSk", fProfile::OBJ_SIREN_BARRIER, fProfile::OBJ_SIREN_BARRIER, 0xFFFF, 0xFF, 0}, + { "StepTS", fProfile::OBJ_STEP_TIME_SLIP, fProfile::OBJ_STEP_TIME_SLIP, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"StgBgTs", fProfile::OBJ_TIME_STAGE_BG, fProfile::OBJ_TIME_STAGE_BG, 0xFFFF, 0xFF, 0}, + { "StpGm", fProfile::OBJ_STEP_GUMARM, fProfile::OBJ_STEP_GUMARM, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"StpRope", fProfile::OBJ_STOPPING_ROPE, fProfile::OBJ_STOPPING_ROPE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "StprRc", fProfile::OBJ_STOPPER_ROCK, fProfile::OBJ_STOPPER_ROCK, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"StrLava", fProfile::OBJ_STREAM_LAVA, fProfile::OBJ_STREAM_LAVA, 0xFFFF, 0xFF, 0}, + {"StreamT", fProfile::TAG_STREAM, fProfile::TAG_STREAM, 0xFFFF, 0xFF, 0}, + { "Sw", fProfile::OBJ_SW, fProfile::OBJ_SW, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"SwAreaT", fProfile::SW_AREA_TAG, fProfile::SW_AREA_TAG, 0xFFFF, 0xFF, 0}, + { "SwBnk", fProfile::OBJ_SW_BANK, fProfile::OBJ_SW_BANK, 527, SND_SOURCE_OBJECT, 0}, + { "SwBnkS", fProfile::OBJ_SW_BANK_SMALL, fProfile::OBJ_SW_BANK_SMALL, 528, SND_SOURCE_OBJECT, 0}, + { "SwDir", fProfile::OBJ_SW_DIR, fProfile::OBJ_SW_DIR, 536, SND_SOURCE_OBJECT, 0}, + { "SwDir2", fProfile::OBJ_SW_DIR_DOOR, fProfile::OBJ_SW_DIR_DOOR, 516, SND_SOURCE_OBJECT, 0}, + { "SwHrp", fProfile::OBJ_SW_HARP, fProfile::OBJ_SW_HARP, 548, SND_SOURCE_SW_HARP, 0}, + { "SwSB", fProfile::OBJ_SW_SWORD_BEAM, fProfile::OBJ_SW_SWORD_BEAM, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "SwTag", fProfile::SW_TAG, fProfile::SW_TAG, 0xFFFF, 0xFF, 0}, + { "SwWall", fProfile::OBJ_SWITCH_WALL, fProfile::OBJ_SWITCH_WALL, 519, SND_SOURCE_OBJECT, 0}, + { "SwdStb", fProfile::OBJ_SWORD_STAB, fProfile::OBJ_SWORD_STAB, 0xFFFF, 0xFF, 0}, + { "Swhit", fProfile::OBJ_SWHIT, fProfile::OBJ_SWHIT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"SwrdPrj", fProfile::OBJ_SWRD_PRJ, fProfile::OBJ_SWRD_PRJ, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "SwrdSt", fProfile::OBJ_SEAT_SWORD, fProfile::OBJ_SEAT_SWORD, 0xFFFF, 0xFF, 0}, + { "TAgo", fProfile::OBJ_DESERT_AGO, fProfile::OBJ_DESERT_AGO, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "TBcal", fProfile::T_BCAL, fProfile::T_BCAL, 0xFFFF, 0xFF, 0}, + { "TBoat", fProfile::OBJ_TIME_BOAT, fProfile::OBJ_TIME_BOAT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "TBoatB", fProfile::OBJ_TIME_BOAT_BULLET, fProfile::OBJ_TIME_BOAT_BULLET, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "TBox", fProfile::TBOX, fProfile::TBOX, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "TChk", fProfile::TAG_TIME_AREA_CHECK, fProfile::TAG_TIME_AREA_CHECK, 0xFFFF, 0xFF, 0}, + { "TDoor", fProfile::OBJ_TIME_DOOR, fProfile::OBJ_TIME_DOOR, 0xFFFF, 42, 0}, + { "TDoorB", fProfile::OBJ_TIME_DOOR_BEFORE, fProfile::OBJ_TIME_DOOR_BEFORE, 556, 0xFF, 0}, + {"TGrD101", fProfile::OBJ_TOWER_GEAR_D101, fProfile::OBJ_TOWER_GEAR_D101, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"TKumite", fProfile::T_KUMITE, fProfile::T_KUMITE, 0xFFFF, 0xFF, 0}, + { "TPole", fProfile::OBJ_TARZAN_POLE, fProfile::OBJ_TARZAN_POLE, 523, SND_SOURCE_OBJECT, 0}, + { "TRail", fProfile::OBJ_TENI_RAIL, fProfile::OBJ_TENI_RAIL, 0xFFFF, 0xFF, 0}, + {"TRalPst", fProfile::OBJ_TENI_RAIL_POST, fProfile::OBJ_TENI_RAIL_POST, 0xFFFF, 0xFF, 0}, + { "TSBase", fProfile::OBJ_TIME_BASE, fProfile::OBJ_TIME_BASE, 0xFFFF, 0xFF, 0}, + { "TSBlk", fProfile::OBJ_TIME_BLOCK, fProfile::OBJ_TIME_BLOCK, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "TWeed", fProfile::OBJ_TUMBLE_WEED, fProfile::OBJ_TUMBLE_WEED, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Tckl", fProfile::OBJ_TACKLE, fProfile::OBJ_TACKLE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"TerBike", fProfile::OBJ_TERRY_BIKE, fProfile::OBJ_TERRY_BIKE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"TerrGmk", fProfile::OBJ_TERRY_GIMMICK, fProfile::OBJ_TERRY_GIMMICK, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"TerrHol", fProfile::OBJ_TERRY_HOLE, fProfile::OBJ_TERRY_HOLE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "TerrSw", fProfile::OBJ_TERRY_SWITCH, fProfile::OBJ_TERRY_SWITCH, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "TgClay", fProfile::TAG_PUMPKIN_CLAY, fProfile::TAG_PUMPKIN_CLAY, 0xFFFF, 0xFF, 0}, + {"TgClefG", fProfile::TAG_CLEF_GAME, fProfile::TAG_CLEF_GAME, 0xFFFF, 0xFF, 0}, + {"TgClefM", fProfile::TAG_CLEF_MANAGER, fProfile::TAG_CLEF_MANAGER, 0xFFFF, 0xFF, 0}, + {"TgD3Chg", fProfile::TAG_D3_SCENE_CHANGE, fProfile::TAG_D3_SCENE_CHANGE, 0xFFFF, 0xFF, 0}, + {"TgDefea", fProfile::TAG_DEFEAT_BOSS, fProfile::TAG_DEFEAT_BOSS, 0xFFFF, 0xFF, 0}, + {"TgFence", fProfile::TAG_FENCE_SYNCHRONIZER, fProfile::TAG_FENCE_SYNCHRONIZER, 0xFFFF, 0xFF, 0}, + {"TgMICap", fProfile::TAG_MINIGAME_INSECT_CAPTURE, fProfile::TAG_MINIGAME_INSECT_CAPTURE, 0xFFFF, 0xFF, 0}, + { "TgMien", fProfile::TAG_MIECHAN, fProfile::TAG_MIECHAN, 0xFFFF, 0xFF, 0}, + {"TgNoEff", fProfile::TAG_NOEFFECT_AREA, fProfile::TAG_NOEFFECT_AREA, 0xFFFF, 0xFF, 0}, + {"TgRBoat", fProfile::TAG_ROCK_BOAT, fProfile::TAG_ROCK_BOAT, 0xFFFF, 0xFF, 0}, + {"TgReact", fProfile::TAG_REACTION, fProfile::TAG_REACTION, 0xFFFF, 0xFF, 0}, + {"TgRstTs", fProfile::TAG_RESTART_TIME_STONE, fProfile::TAG_RESTART_TIME_STONE, 0xFFFF, 0xFF, 0}, + { "TgSBG", fProfile::TAG_SWORD_BATTLE_GAME, fProfile::TAG_SWORD_BATTLE_GAME, 0xFFFF, 0xFF, 0}, + { "TgSTA", fProfile::TAG_SIREN_TIME_ATTACK, fProfile::TAG_SIREN_TIME_ATTACK, 0xFFFF, 0xFF, 0}, + {"TgSndAr", fProfile::TAG_SOUND_AREA, fProfile::TAG_SOUND_AREA, 0xFFFF, 0xFF, 0}, + {"TgSndMg", fProfile::SOUND_AREA_MGR, fProfile::SOUND_AREA_MGR, 0xFFFF, 0xFF, 0}, + {"TgSound", fProfile::SOUND_TAG, fProfile::SOUND_TAG, 0xFFFF, 0xFF, 0}, + { "TgTDB", fProfile::TAG_TIME_DOOR_BEAM, fProfile::TAG_TIME_DOOR_BEAM, 0xFFFF, 0xFF, 0}, + { "TgTckl", fProfile::TACKLE_TAG, fProfile::TACKLE_TAG, 0xFFFF, 0xFF, 0}, + {"TgTimer", fProfile::TAG_TIMER, fProfile::TAG_TIMER, 0xFFFF, 0xFF, 0}, + { "TgTrap", fProfile::OBJ_TOGE_TRAP, fProfile::OBJ_TOGE_TRAP, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "TgTw", fProfile::TUMBLE_WEED_TAG, fProfile::TUMBLE_WEED_TAG, 0xFFFF, 59, 0}, + { "TimeIs", fProfile::OBJ_TENIJIMA, fProfile::OBJ_TENIJIMA, 0xFFFF, 0xFF, 0}, + {"TimeStn", fProfile::OBJ_TIME_STONE, fProfile::OBJ_TIME_STONE, 0xFFFF, SND_SOURCE_TIME_STONE, 0}, + { "TkEvnt", fProfile::TAG_TKEVNT, fProfile::TAG_TKEVNT, 0xFFFF, 0xFF, 0}, + { "TlpTag", fProfile::TLP_TAG, fProfile::TLP_TAG, 0xFFFF, 0xFF, 0}, + {"ToD3Stn", fProfile::OBJ_TOD3_STONE, fProfile::OBJ_TOD3_STONE, 537, 0xFF, 0}, + {"Tornado", fProfile::OBJ_TORNADO, fProfile::OBJ_TORNADO, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"TouchTa", fProfile::TOUCH_TAG, fProfile::TOUCH_TAG, 0xFFFF, 0xFF, 0}, + { "TowerB", fProfile::OBJ_TOWER_BOMB, fProfile::OBJ_TOWER_BOMB, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"TowerHa", fProfile::OBJ_TOWER_HAND_D101, fProfile::OBJ_TOWER_HAND_D101, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"TrRaiCo", fProfile::OBJ_TRUCK_RAIL_COL, fProfile::OBJ_TRUCK_RAIL_COL, 0xFFFF, 0xFF, 0}, + {"TrShtCs", fProfile::OBJ_TR_SHUTTER_CS, fProfile::OBJ_TR_SHUTTER_CS, 0xFFFF, SND_SOURCE_SHUTTER, 0}, + {"TrapRc1", fProfile::OBJ_TRAP_ROCK_1, fProfile::OBJ_TRAP_ROCK_1, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"TriForc", fProfile::OBJ_TRIFORCE, fProfile::OBJ_TRIFORCE, 0xFFFF, 0xFF, 0}, + {"TrpBrdW", fProfile::OBJ_TRAP_BIRD_WOOD, fProfile::OBJ_TRAP_BIRD_WOOD, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"TruRail", fProfile::TRUCK_RAIL, fProfile::TRUCK_RAIL, 0xFFFF, 0xFF, 0}, + { "Truck", fProfile::OBJ_TRUCK, fProfile::OBJ_TRUCK, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"TrukStp", fProfile::OBJ_TRUCK_STOPPER, fProfile::OBJ_TRUCK_STOPPER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Tshop", fProfile::OBJ_TERRY_SHOP, fProfile::OBJ_TERRY_SHOP, 0xFFFF, SND_SOURCE_TERRY_SHOP, 0}, + {"TstShtr", fProfile::SHUTTER, fProfile::SHUTTER, 0xFFFF, SND_SOURCE_SHUTTER, 0}, + { "Tubo", fProfile::OBJ_TUBO, fProfile::OBJ_TUBO, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "UDLava", fProfile::OBJ_UPDOWN_LAVA, fProfile::OBJ_UPDOWN_LAVA, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"UdCloud", fProfile::OBJ_UNDER_CLOUD, fProfile::OBJ_UNDER_CLOUD, 0xFFFF, 0xFF, 0}, + {"UgSwitc", fProfile::OBJ_UG_SWITCH, fProfile::OBJ_UG_SWITCH, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"Uground", fProfile::OBJ_UNDERGROUND, fProfile::OBJ_UNDERGROUND, 0xFFFF, 59, 0}, + {"UtaLand", fProfile::OBJ_UTAJIMA_ISLAND, fProfile::OBJ_UTAJIMA_ISLAND, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "UtaLv2", fProfile::OBJ_UTAJIMA_LV2, fProfile::OBJ_UTAJIMA_LV2, 0xFFFF, 0xFF, 0}, + {"UtaMain", fProfile::OBJ_UTAJIMA_MAIN_MECHA, fProfile::OBJ_UTAJIMA_MAIN_MECHA, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"UtaPeds", fProfile::OBJ_UTAJIMA_PEDESTAL, fProfile::OBJ_UTAJIMA_PEDESTAL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"UtaStop", fProfile::OBJ_UTAJIMA_STOPPER, fProfile::OBJ_UTAJIMA_STOPPER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"Utajima", fProfile::OBJ_UTAJIMA, fProfile::OBJ_UTAJIMA, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "V_Clip", fProfile::VIEW_CLIP_TAG, fProfile::VIEW_CLIP_TAG, 0xFFFF, 0xFF, 0}, + {"VacuDsP", fProfile::OBJ_VACU_DUST_PARTS, fProfile::OBJ_VACU_DUST_PARTS, 0xFFFF, 0xFF, 0}, + {"VacuDst", fProfile::OBJ_VACU_DUST, fProfile::OBJ_VACU_DUST, 0xFFFF, 0xFF, 0}, + { "Vdb", fProfile::OBJ_VDB, fProfile::OBJ_VDB, 0xFFFF, SND_SOURCE_BULLET, 0}, + {"VentFan", fProfile::OBJ_VENT_FAN, fProfile::OBJ_VENT_FAN, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Vortex", fProfile::OBJ_VORTEX, fProfile::OBJ_VORTEX, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Vrbox", fProfile::VRBOX_TAG, fProfile::VRBOX_TAG, 0xFFFF, 0xFF, 0}, + { "WFF102", fProfile::OBJ_WATERFALL_F102, fProfile::OBJ_WATERFALL_F102, 0xFFFF, 0xFF, 0}, + { "Warp", fProfile::TIME_AREA, fProfile::TIME_AREA, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "WarpH", fProfile::OBJ_WARP_HOLE, fProfile::OBJ_WARP_HOLE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"WarpObj", fProfile::OBJ_WARP, fProfile::OBJ_WARP, 547, SND_SOURCE_OBJECT_WARP, 0}, + {"WaterSW", fProfile::OBJ_WATER_SWITCH, fProfile::OBJ_WATER_SWITCH, 526, SND_SOURCE_OBJECT, 0}, + {"WaterSf", fProfile::OBJ_WATER_SURFACE, fProfile::OBJ_WATER_SURFACE, 0xFFFF, 0xFF, 0}, + {"WaterSp", fProfile::OBJ_WATER_SPOUT, fProfile::OBJ_WATER_SPOUT, 0xFFFF, 0xFF, 0}, + {"WatrIga", fProfile::OBJ_WATER_IGAIGA, fProfile::OBJ_WATER_IGAIGA, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"WdBoard", fProfile::OBJ_WOOD_BOARD, fProfile::OBJ_WOOD_BOARD, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Wind", fProfile::OBJ_WIND, fProfile::OBJ_WIND, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Wind02", fProfile::OBJ_WIND02, fProfile::OBJ_WIND02, 0xFFFF, 0xFF, 0}, + { "Wind03", fProfile::OBJ_WIND03, fProfile::OBJ_WIND03, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "Wind04", fProfile::OBJ_WIND04, fProfile::OBJ_WIND04, 0xFFFF, 0xFF, 0}, + {"Windmil", fProfile::OBJ_WINDMILL, fProfile::OBJ_WINDMILL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"WnLeafA", fProfile::OBJ_WATER_NUT_LEAF, fProfile::OBJ_WATER_NUT_LEAF, 542, SND_SOURCE_OBJECT, 1}, + {"WnLeafB", fProfile::OBJ_WATER_NUT_LEAF, fProfile::OBJ_WATER_NUT_LEAF, 0xFFFF, SND_SOURCE_OBJECT, 2}, + {"WnLeafC", fProfile::OBJ_WATER_NUT_LEAF, fProfile::OBJ_WATER_NUT_LEAF, 542, SND_SOURCE_OBJECT, 3}, + {"WnLeafD", fProfile::OBJ_WATER_NUT_LEAF, fProfile::OBJ_WATER_NUT_LEAF, 0xFFFF, SND_SOURCE_OBJECT, 4}, + {"WndMilD", fProfile::OBJ_WINDMILL_DESERT, fProfile::OBJ_WINDMILL_DESERT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"WoodTag", fProfile::WOODAREA_TAG, fProfile::WOODAREA_TAG, 0xFFFF, 0xFF, 1}, + {"WoodTg2", fProfile::WOODAREA_TAG, fProfile::WOODAREA_TAG, 0xFFFF, 0xFF, 2}, + {"WtFD100", fProfile::OBJ_WATERFALL_D100, fProfile::OBJ_WATERFALL_D100, 0xFFFF, 0xFF, 0}, + {"WtrF100", fProfile::OBJ_WATER_F100, fProfile::OBJ_WATER_F100, 0xFFFF, 0xFF, 0}, + { "WtrJar", fProfile::OBJ_WATER_JAR, fProfile::OBJ_WATER_JAR, 552, 0xFF, 0}, + { "WtrMrk", fProfile::OBJ_WATER_MARK, fProfile::OBJ_WATER_MARK, 0xFFFF, 0xFF, 0}, + {"WtrShld", fProfile::OBJ_WATER_SHIELD, fProfile::OBJ_WATER_SHIELD, 0xFFFF, 0xFF, 0}, + { "chest", fProfile::OBJ_CHEST, fProfile::OBJ_CHEST, 0xFFFF, 42, 0}, + { "d2ship", fProfile::OBJ_DUNGEON_SHIP, fProfile::OBJ_DUNGEON_SHIP, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "fruit", fProfile::OBJ_FRUIT, fProfile::OBJ_FRUIT, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "ftower", fProfile::OBJ_TOWER_D101, fProfile::OBJ_TOWER_D101, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "lock", fProfile::OBJ_SHUTTER_LOCK, fProfile::OBJ_SHUTTER_LOCK, 0xFFFF, SND_SOURCE_SHUTTER, 0}, + {"needleU", fProfile::OBJ_NEEDLE_UNDERGROUND, fProfile::OBJ_NEEDLE_UNDERGROUND, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"rpiller", fProfile::OBJ_ROLL_PILLAR, fProfile::OBJ_ROLL_PILLAR, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "sandD1", fProfile::OBJ_SAND_FLOOR, fProfile::OBJ_SAND_FLOOR, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"sandflr", fProfile::OBJ_SAND_FLOOR, fProfile::OBJ_SAND_FLOOR, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"saveObj", fProfile::OBJ_SAVE, fProfile::OBJ_SAVE, 515, 0xFF, 0}, + { "skull", fProfile::OBJ_SKULL, fProfile::OBJ_SKULL, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"sw_whip", fProfile::OBJ_SW_WHIPLEVER, fProfile::OBJ_SW_WHIPLEVER, 522, SND_SOURCE_OBJECT, 0}, + { "swsht", fProfile::OBJ_SWITCH_SHUTTER, fProfile::OBJ_SWITCH_SHUTTER, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"swsyako", fProfile::OBJ_SW_SYAKO, fProfile::OBJ_SW_SYAKO, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"syashtr", fProfile::OBJ_SYAKO_SHUTTER, fProfile::OBJ_SYAKO_SHUTTER, 0xFFFF, SND_SOURCE_SHUTTER, 0}, + {"trlshut", fProfile::OBJ_TROLLEY_SHUTTER, fProfile::OBJ_TROLLEY_SHUTTER, 0xFFFF, SND_SOURCE_SHUTTER, 0}, + {"trolley", fProfile::OBJ_TROLLEY, fProfile::OBJ_TROLLEY, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "tware", fProfile::OBJ_TABLEWARE, fProfile::OBJ_TABLEWARE, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "vmSand", fProfile::OBJ_VSD, fProfile::OBJ_VSD, 0xFFFF, SND_SOURCE_OBJECT, 0}, + {"weather", fProfile::WEATHER_TAG, fProfile::WEATHER_TAG, 0xFFFF, 0xFF, 0}, + { "wfall", fProfile::OBJ_WATERFALL_D101, fProfile::OBJ_WATERFALL_D101, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "wnleaf", fProfile::OBJ_WATER_NUT_LEAF, fProfile::OBJ_WATER_NUT_LEAF, 0xFFFF, SND_SOURCE_OBJECT, 0}, + { "wnut", fProfile::OBJ_WATER_NUT, fProfile::OBJ_WATER_NUT, 0xFFFF, SND_SOURCE_OBJECT, 0}, +}; + +#pragma pop + +const ActorInfo *getActorInfoByName(const char *name) { + // binary search + int left = 0; + int right = ARRAY_LENGTH(sInfos) - 1; + do { + int mid = (right + left) / 2; + const ActorInfo *info = &sInfos[mid]; + int res = std::strncmp(name, info->name, 7); + if (res == 0) { + return info; + } + if (res < 0) { + right = mid - 1; + } + if (res >= 0) { + left = mid + 1; + } + } while (left <= right); + return nullptr; +} + +u16 getProfileIdForName(const char *name) { + const ActorInfo *info = getActorInfoByName(name); + if (info == nullptr) { + return fProfile::PROFILE_MAX; + } + return info->profileId; +} + +u16 getProfileId2ForName(const char *name) { + const ActorInfo *info = getActorInfoByName(name); + if (info == nullptr) { + return fProfile::PROFILE_MAX; + } + return info->profileId2; +} + +const char *getNameForProfileId(u32 profileId) { + const ActorInfo *info = &sInfos[0]; + for (int i = 0; i < ARRAY_LENGTH(sInfos); i++) { + if (profileId == info->profileId) { + return info->name; + } + info++; + } + + return nullptr; +} + +const char *getActorName(const ActorInfo *actorInfo) { + if (actorInfo != nullptr) { + return actorInfo->name; + } + return nullptr; +} + +const ActorInfo *getActorInfoByProfileAndSubtype(u32 profileId, u32 subtype) { + if (profileId == fProfile::PROFILE_MAX) { + return nullptr; + } + + const ActorInfo *info = &sInfos[0]; + for (int i = 0; i < ARRAY_LENGTH(sInfos); i++) { + if (profileId == info->profileId && subtype == info->subtype) { + return info; + } + info++; + } + + return nullptr; +} + +s32 getSoundSourceTypeForName(const char *name) { + const ActorInfo *info = getActorInfoByName(name); + if (info != nullptr) { + return info->soundSourceType; + } + return -1; +} diff --git a/src/toBeSorted/blur_and_palette_manager.cpp b/src/toBeSorted/blur_and_palette_manager.cpp deleted file mode 100644 index 54a233b4..00000000 --- a/src/toBeSorted/blur_and_palette_manager.cpp +++ /dev/null @@ -1,189 +0,0 @@ -#include "toBeSorted/blur_and_palette_manager.h" - -#include "m/m_color.h" - -BlurAndPaletteManager BlurAndPaletteManager::sInstance; -BlurAndPaletteManager *BlurAndPaletteManager::sPInstance; - -TList sPlayingEffectsList; - -mColor BlurAndPaletteManager::combineColors(const mColor &c1, const mColor &c2, f32 ratio) { - mColor result; - result.Set(0xff, 0xff, 0xff, 0xff); - result.r = (c1.r + ratio * ((f32)c2.r - (f32)c1.r)); - result.g = (c1.g + ratio * ((f32)c2.g - (f32)c1.g)); - result.b = (c1.b + ratio * ((f32)c2.b - (f32)c1.b)); - result.a = (c1.a + ratio * ((f32)c2.a - (f32)c1.a)); - return result; -} - -Spf::Spf() {} - -Sff::Sff() {} - -BlurAndPaletteManager::BlurAndPaletteManager() { - mColor grey_aaaaaa = mColor(0xaa, 0xaa, 0xaa, 0xff); - mColor white_ffffff = mColor(0xff, 0xff, 0xff, 0xff); - mColor cream_ffffc0 = mColor(0xff, 0xff, 0xc0, 0xff); - mColor grey_808080 = mColor(0x80, 0x80, 0x80, 0xff); - mColor grey_787878 = mColor(0x78, 0x78, 0x78, 0xff); - mColor white2_ffffff = mColor(0xff, 0xff, 0xff, 0xff); - mColor grey_7f7f7f = mColor(0x7f, 0x7f, 0x7f, 0xff); - mColor yellow_ffd86b = mColor(0xff, 0xd8, 0x6b, 0xff); - mColor sea_blue_29424e = mColor(0x29, 0x42, 0x4e, 0xff); - mColor seafoam_green_b9d8b7 = mColor(0xb9, 0xd8, 0xb7, 0xff); - mColor white3_ffffff = mColor(0xff, 0xff, 0xff, 0xff); - mColor black_000000 = mColor(0x00, 0x00, 0x00, 0xff); - mColor pastel_orange_ffb787 = mColor(0xff, 0xb7, 0x87, 0xff); - mColor lightblue_aad2ff = mColor(0xaa, 0xd2, 0xff, 0xff); - mVec3_c v1(0.0f, 1.0f, 0.0f); - mColor white4_ffffff = mColor(0xff, 0xff, 0xff, 0xff); - f32 f1 = 2000.0f; - f32 f2 = 10000.0f; - mVec3_c v2(0.0f, 0.0f, 0.0f); - mVec3_c v3(1.0f, 1.0f, 1.0f); - mColor white5_ffffff = mColor(0xff, 0xff, 0xff, 0xff); - mColor pastel_yellow_fffb04 = mColor(0xff, 0xf0, 0xb4, 0xff); - mColor grey_3c3c3c = mColor(0x3c, 0x3c, 0x3c, 0xff); - mColor grey_a0a091 = mColor(0xa0, 0xa0, 0x91, 0xff); - mColor magenta_7d0091 = mColor(0x7d, 0x00, 0x91, 0xff); - mColor sand_ffebb4 = mColor(0xff, 0xeb, 0xb4, 0xff); - - sPInstance = this; - - currentSpf.grey_aaaaaa = grey_aaaaaa; - currentSpf.white_ffffff = white_ffffff; - currentSpf.grey_808080 = grey_808080; - currentSpf.cream_ffffc0 = cream_ffffc0; - currentSpf.grey2_aaaaaa = grey_aaaaaa; - currentSpf.white2_ffffff = white_ffffff; - currentSpf.field_0x18 = 0.6f; - currentSpf.pastel_orange_ffb787 = pastel_orange_ffb787; - currentSpf.field_0x24 = 195.0f; - currentSpf.field_0x20 = 0.5f; - currentSpf.black_000000 = black_000000; - currentSpf.black2_000000 = black_000000; - currentSpf.mSub.grey_787878 = grey_787878; - currentSpf.mSub.white3_ffffff.field_0x00 = white2_ffffff; - currentSpf.mSub.field_0x014.field_0x00 = grey_7f7f7f; - currentSpf.mSub.field_0x060.field_0x00 = grey_7f7f7f; - currentSpf.mSub.field_0x0AC.field_0x00 = grey_7f7f7f; - currentSpf.mSub.field_0x0F8.field_0x00 = grey_7f7f7f; - currentSpf.mCloudColor = yellow_ffd86b; - currentSpf.mSkyColor = sea_blue_29424e; - currentSpf.seafoam_green_b9d8b7 = seafoam_green_b9d8b7; - currentSpf.white3_ffffff = white3_ffffff; - currentSpf.field_0x18C = v2; - currentSpf.field_0x198 = v3; - currentSpf.mSub.field_0x000 = 0.0625f; - currentSpf.mSub.field_0x05C = 0.0625f; - currentSpf.mSub.field_0x0A8 = 0.0625f; - currentSpf.mSub.field_0x0F4 = 0.0625f; - - currentSpf.grey_787878 = grey_787878; - currentSpf.grey2_787878 = grey_787878; - currentSpf.grey3_787878 = grey_787878; - currentSpf.MAO5_kColor3.field_0x00 = white4_ffffff; - currentSpf.MAO5_kColor3.field_0x04 = f1; - currentSpf.MAO5_kColor3.field_0x08 = f2; - currentSpf.mSub.white3_ffffff.field_0x04 = 45.0f; - currentSpf.mSub.white3_ffffff.field_0x08 = 180.0f; - - for (int i = 0; i < 5; i++) { - currentSpf.mSub.field_0x020[i] = black_000000; - field_0x2E08[i] = v1; - currentSpf.mSub.field_0x014.field_0x04[i] = 0; - currentSpf.mSub.field_0x034[i] = 0.0f; - currentSpf.mSub.field_0x048[i] = 0.0f; - - currentSpf.mSub.field_0x06C[i] = black_000000; - field_0x2E44[i] = v1; - currentSpf.mSub.field_0x060.field_0x04[i] = 0; - currentSpf.mSub.field_0x080[i] = 0.0f; - currentSpf.mSub.field_0x094[i] = 0.0f; - - currentSpf.mSub.field_0x0B8[i] = black_000000; - field_0x2E80[i] = v1; - currentSpf.mSub.field_0x0AC.field_0x04[i] = 0; - currentSpf.mSub.field_0x0CC[i] = 0.0f; - currentSpf.mSub.field_0x0E0[i] = 0.0f; - - currentSpf.mSub.field_0x104[i] = black_000000; - field_0x2EBC[i] = v1; - currentSpf.mSub.field_0x0F8.field_0x04[i] = 0; - currentSpf.mSub.field_0x118[i] = 0.0f; - currentSpf.mSub.field_0x12C[i] = 0.0f; - } - - currentSpf.field_0x1B0.x = 0.55f; - currentSpf.field_0x1B0.y = 1.0f; - currentSpf.field_0x1B0.z = 0.0f; - currentSpf.field_0x1BC = 0; - currentSpf.field_0x1C0 = 1.0f; - currentSpf.field_0x1C4 = 0.5f; - currentSpf.field_0x1C8 = 0; - currentSpf.field_0x1CC = 0.5f; - currentSpf.field_0x1D0 = 0.0f; - currentSpf.field_0x1D4 = 0; - currentSpf.field_0x1D5 = pastel_yellow_fffb04; - currentSpf.field_0x1D9 = 1; - currentSpf.field_0x1DC = 3300.0f; - currentSpf.field_0x1E0 = 3300.0f; - currentSpf.field_0x1E4 = 1000.0f; - currentSpf.field_0x1E8 = 500.0f; - currentSpf.field_0x1EC = 0xFF; - currentSpf.field_0x1ED = 1; - currentSpf.field_0x1EE = 0; - currentSpf.field_0x1F0 = 0.0f; - currentSpf.field_0x1F4 = 0.0f; - currentSpf.field_0x1F8 = 6.93359f; - currentSpf.field_0x1FC = 8.0f; - currentSpf.black3_000000 = black_000000; - currentSpf.black4_000000 = black_000000; - - for (int i = 0; i < 3; i++) { - currentSff.field_0x00[i].field_0x00 = white4_ffffff; - currentSff.field_0x00[i].field_0x04 = f1; - currentSff.field_0x00[i].field_0x08 = f2; - } - - for (int i = 0; i < 20; i++) { - spfs[i] = currentSpf; - sffs[i] = currentSff; - } - - field_0x2DEC = lightblue_aad2ff; - field_0x2EF8 = grey_a0a091; - field_0x2EFC = grey_3c3c3c; - field_0x2F00 = v1; - - field_0x2F0C = 30000; - field_0x2F0E = -8000; - field_0x2F10 = 0; - field_0x2DF8 = v1; - - for (int i = 0; i < 32; i++) { - for (int j = 0; j < 8; j++) { - field_0x38E4.field_0x00[i].field_0x00[j].field_0x00 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x38E4.field_0x00[i].field_0x00[j].field_0x04 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x38E4.field_0x00[i].field_0x00[j].field_0x08 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x38E4.field_0x00[i].field_0x00[j].field_0x0C = mColor(0xff, 0xff, 0xff, 0xff); - field_0x48E4.field_0x00[i].field_0x00[j].field_0x00 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x48E4.field_0x00[i].field_0x00[j].field_0x04 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x48E4.field_0x00[i].field_0x00[j].field_0x08 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x48E4.field_0x00[i].field_0x00[j].field_0x0C = mColor(0xff, 0xff, 0xff, 0xff); - field_0x48E4.field_0x00[i].field_0x00[j].field_0x10 = 0; - } - } - - - field_0x5CE4.MA00_kColor3 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x5CE4.MA01_tevReg1 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x5CE4.MA01_kColor2 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x5CE4.MA02_tevReg1 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x5CE4.MA02_kColor2 = mColor(0xff, 0xff, 0xff, 0xff); - field_0x5CE4.MA03_kColor3 = mColor(0xff, 0xff, 0xff, 0xff); - - field_0x5D04.field_0x00 = field_0x5CE4; - field_0x5D04.field_0x20 = field_0x5CE4; -} diff --git a/src/toBeSorted/d_d3d.cpp b/src/toBeSorted/d_d3d.cpp index 8f62c595..3b38c67f 100644 --- a/src/toBeSorted/d_d3d.cpp +++ b/src/toBeSorted/d_d3d.cpp @@ -2,6 +2,7 @@ #include "common.h" #include "d/a/obj/d_a_obj_base.h" +#include "d/d_light_env.h" #include "d/d_sc_game.h" #include "d/t/d_t_siren.h" #include "egg/gfx/eggCpuTexture.h" @@ -20,7 +21,7 @@ #include "rvl/GX/GXTypes.h" #include "rvl/VI/vi.h" #include "sized_string.h" -#include "toBeSorted/blur_and_palette_manager.h" + namespace d3d { @@ -31,10 +32,10 @@ AnmMdlWrapper::AnmMdlWrapper() : mpSoundSource(nullptr), mpSoundData(nullptr) {} AnmMdlWrapper::~AnmMdlWrapper() { if (mpSoundSource != nullptr) { - if (mpSoundSource->shutdown()) { + if (mpSoundSource->hasPlayingSounds()) { do { VIWaitForRetrace(); - } while (mpSoundSource->shutdown()); + } while (mpSoundSource->hasPlayingSounds()); } } } @@ -119,7 +120,7 @@ void AnmMdlWrapper::setRate(f32 rate) { setSoundRate(rate); } -void AnmMdlWrapper::setSoundSource(SoundSource *pSource) { +void AnmMdlWrapper::setSoundSource(dSoundSourceIf_c *pSource) { mpSoundSource = pSource; } @@ -232,8 +233,8 @@ void clearList() { // More screen / list stuff... -void unk2(nw4r::g3d::ResMat &mat, nw4r::g3d::ResMatTevColor &clr, LightingInfo *info) { - BlurAndPaletteManager &pllt = BlurAndPaletteManager::GetInstance(); +void unk2(nw4r::g3d::ResMat &mat, nw4r::g3d::ResMatTevColor &clr, ActorLighting *info) { + dLightEnv_c &pllt = dLightEnv_c::GetInstance(); const char *name = mat.GetName(); if (name != nullptr && name[0] == 'M' && name[1] == 'A' && name[2] == '0') { char idx = name[3]; @@ -285,7 +286,7 @@ void unk2(nw4r::g3d::ResMat &mat, nw4r::g3d::ResMatTevColor &clr, LightingInfo * } void setRoomTevColors(nw4r::g3d::ResMdl mdl, int b1, bool bUnk) { - BlurAndPaletteManager &pllt = BlurAndPaletteManager::GetInstance(); + dLightEnv_c &pllt = dLightEnv_c::GetInstance(); SpawnInfo &spawn = dScGame_c::currentSpawnInfo; for (u32 i = 0; i < mdl.GetResMatNumEntries(); i++) { diff --git a/src/toBeSorted/d_emitter.cpp b/src/toBeSorted/d_emitter.cpp index f4d133ee..a8b0379f 100644 --- a/src/toBeSorted/d_emitter.cpp +++ b/src/toBeSorted/d_emitter.cpp @@ -16,6 +16,7 @@ #include "d/a/obj/d_a_obj_base.h" #include "d/d_base.h" #include "d/d_heap.h" +#include "d/d_light_env.h" #include "d/d_stage.h" #include "d/d_stage_mgr.h" #include "egg/core/eggHeap.h" @@ -36,7 +37,6 @@ #include "nw4r/math/math_arithmetic.h" #include "sized_string.h" #include "toBeSorted/arc_managers/oarc_manager.h" -#include "toBeSorted/blur_and_palette_manager.h" #include "toBeSorted/d_d3d.h" #include "toBeSorted/d_particle.h" #include "toBeSorted/event_manager.h" @@ -45,6 +45,7 @@ #include "rvl/GX.h" #include "rvl/MTX.h" + void float_ordering_1(s32 a) { (f32) a; } @@ -1029,7 +1030,7 @@ bool dJEffManager_c::createMassObjEffect( void dEmitterBase_c::loadColors( JPABaseEmitter *emitter, const GXColor *color1, const GXColor *color2, s32 plltIdx1, s32 plltIdx2 ) { - BlurAndPaletteManager &mgr = BlurAndPaletteManager::GetInstance(); + dLightEnv_c &mgr = dLightEnv_c::GetInstance(); u8 r1 = 0xFF; u8 g1 = 0xFF; u8 b1 = 0xFF; @@ -1038,8 +1039,8 @@ void dEmitterBase_c::loadColors( u8 b2 = 0xFF; u8 r, g, b; - mColor c1 = mgr.GetCurrentSph().black3_000000; - mColor c2 = mgr.GetCurrentSph().black4_000000; + const mColor c1 = mgr.GetCurrentSpf().mParticleTransparentClr; + const mColor c2 = mgr.GetCurrentSpf().mParticleSolidClr; u32 flags = emitter->getDynResUserWork(); u32 factor = flags >> 24; @@ -1059,7 +1060,6 @@ void dEmitterBase_c::loadColors( scaleG = 1.0f - (1.0f - (c1.g / 255.0f)) * fFactor; scaleB = 1.0f - (1.0f - (c1.b / 255.0f)) * fFactor; } else { - const mColor &c = mgr.GetCurrentSph().black4_000000; scaleR = 1.0f - (1.0f - (c2.r / 255.0f)) * fFactor; scaleG = 1.0f - (1.0f - (c2.g / 255.0f)) * fFactor; scaleB = 1.0f - (1.0f - (c2.b / 255.0f)) * fFactor; diff --git a/src/toBeSorted/d_scn_callback.cpp b/src/toBeSorted/d_scn_callback.cpp index 3b1cc927..a304f8da 100644 --- a/src/toBeSorted/d_scn_callback.cpp +++ b/src/toBeSorted/d_scn_callback.cpp @@ -1,6 +1,7 @@ #include "common.h" #include "d/a/obj/d_a_obj_base.h" #include "d/d_bzs_types.h" +#include "d/d_light_env.h" #include "m/m3d/m3d.h" #include "nw4r/g3d/g3d_camera.h" #include "nw4r/g3d/g3d_scnmdl.h" @@ -14,8 +15,9 @@ #include "toBeSorted/d_d3d.h" #include "toBeSorted/stage_render_stuff.h" + void dScnCallback_c::ExecCallback_CALC_MAT(nw4r::g3d::ScnObj::Timing, nw4r::g3d::ScnObj *obj, u32 param, void *pObj) { - const LightingInfo &info = mpActor->mLightingInfo; + const ActorLighting &info = mpActor->mLightingInfo; mColor tev0 = info.mTev0Color; mColor tev1 = info.mTev1Color; mColor tev2 = info.mTev2Color; diff --git a/src/toBeSorted/d_unk_mdl_stuff_2.cpp b/src/toBeSorted/d_unk_mdl_stuff_2.cpp index 25a8d887..92843022 100644 --- a/src/toBeSorted/d_unk_mdl_stuff_2.cpp +++ b/src/toBeSorted/d_unk_mdl_stuff_2.cpp @@ -3,6 +3,7 @@ #include "common.h" #include "d/col/bg/d_bg_s.h" +#include "d/d_light_env.h" #include "egg/gfx/eggLightManager.h" #include "m/m3d/m3d.h" #include "m/m3d/m_proc.h" @@ -17,7 +18,7 @@ #include "rvl/GX/GXTev.h" #include "rvl/GX/GXTypes.h" #include "rvl/MTX/mtx.h" -#include "toBeSorted/blur_and_palette_manager.h" + bool dShpProcBase_c::init(nw4r::g3d::ResMat mat, nw4r::g3d::ResShp shp, s32 count, bool xlu, u32 *pSize) { mCount = count; @@ -62,18 +63,18 @@ void dShpProcBase_c::draw(mVec3_c *pos) { ); setupLight(); if (!field_0x2C) { - BlurAndPaletteManager &mgr = BlurAndPaletteManager::GetInstance(); + dLightEnv_c &mgr = dLightEnv_c::GetInstance(); u32 code = 0xFF; if (pos != nullptr) { pos->y += 100.0f; code = dBgS::GetInstance()->GetLightingCode(pos); } if (code != 0) { - GXSetTevColor(GX_TEVREG0, BlurAndPaletteManager::getLightColor1()); - GXSetTevKColor(GX_KCOLOR0, BlurAndPaletteManager::getLightColor2()); + GXSetTevColor(GX_TEVREG0, ActorLighting::getLightTev0Color()); + GXSetTevKColor(GX_KCOLOR0, ActorLighting::getLightTevKColor()); } else { - GXSetTevColor(GX_TEVREG0, mgr.GetCurrentSph().white2_ffffff); - GXSetTevKColor(GX_KCOLOR0, mgr.GetCurrentSph().grey2_aaaaaa); + GXSetTevColor(GX_TEVREG0, mgr.GetCurrentSpf().mActorPalette.mDarkLightClr); + GXSetTevKColor(GX_KCOLOR0, mgr.GetCurrentSpf().mActorPalette.mDarkShadowClr); } } } @@ -93,8 +94,9 @@ void dShpProcBase_c::doEntry(s32 lightSetId) { entry(); } - -bool dShpProc1_c::create(nw4r::g3d::ResMat mat, nw4r::g3d::ResShp shp, s32 count, mHeapAllocator_c *alloc, bool xlu, u32 *pSize) { +bool dShpProc1_c::create( + nw4r::g3d::ResMat mat, nw4r::g3d::ResShp shp, s32 count, mHeapAllocator_c *alloc, bool xlu, u32 *pSize +) { if (!m3d::proc_c::create(alloc, pSize)) { return false; } diff --git a/src/toBeSorted/save_manager.cpp b/src/toBeSorted/save_manager.cpp index 78c2ca0c..4c9b9210 100644 --- a/src/toBeSorted/save_manager.cpp +++ b/src/toBeSorted/save_manager.cpp @@ -11,6 +11,7 @@ #include "d/d_sys.h" #include "d/lyt/d_lyt_save_msg_window.h" #include "d/lyt/d_lyt_system_window.h" +#include "d/snd/d_snd_small_effect_mgr.h" #include "egg/core/eggHeap.h" #include "m/m_pad.h" #include "toBeSorted/arc_managers/layout_arc_manager.h" @@ -18,7 +19,6 @@ #include "toBeSorted/nand_request_thread.h" #include "toBeSorted/nand_result_tracker.h" #include "toBeSorted/reload_color_fader.h" -#include "toBeSorted/small_sound_mgr.h" #include "rvl/NAND.h" #include "rvl/TPL.h" @@ -511,7 +511,7 @@ void SaveMgr::executeSaveBanner() { if (b == 1) { if (!dDvdUnk::FontUnk::GetInstance()->getField_0x28()) { - SmallSoundManager::GetInstance()->playSound(SE_S_SAVE_FINISH); + dSndSmallEffectMgr_c::GetInstance()->playSound(SE_S_SAVE_FINISH); } mDelayTimer = 0; mStep++; diff --git a/src/toBeSorted/sound_info.cpp b/src/toBeSorted/sound_info.cpp index 585f35ce..98f7c6ea 100644 --- a/src/toBeSorted/sound_info.cpp +++ b/src/toBeSorted/sound_info.cpp @@ -1,6 +1,6 @@ #include "d/a/d_a_base.h" -extern "C" SoundSource *soundForActorInitRelated_803889c0(int, fBase_c *, char *, u8); +extern "C" dSoundSourceIf_c *soundForActorInitRelated_803889c0(int, fBase_c *, char *, u8); extern "C" bool fn_8002C250(SoundInfo *p1, int someNum, char *name, mVec3_c *position) { p1->sound_source = soundForActorInitRelated_803889c0(someNum, p1->actor, name, 0);