diff --git a/config/SOUE01/splits.txt b/config/SOUE01/splits.txt index 2f5c9380..524925c8 100644 --- a/config/SOUE01/splits.txt +++ b/config/SOUE01/splits.txt @@ -2770,12 +2770,13 @@ d/snd/d_snd_source_py_bird.cpp: .data start:0x8054C5A0 end:0x8054C7B8 .sdata start:0x805747E8 end:0x80574800 -d/snd/d_snd_mgr_unk_18.cpp: +d/snd/d_snd_source_demo.cpp: .text start:0x80390510 end:0x80390A20 align:16 .ctors start:0x804DB92C end:0x804DB930 -d/snd/d_snd_mgr_unk_10.cpp: +d/snd/d_snd_source_harp_related.cpp: .text start:0x80390A20 end:0x80392E38 align:16 + .data start:0x8054C9C0 end:0x8054D1C0 d/snd/d_snd_source_tg_sound.cpp: .text start:0x80392E40 end:0x80393008 align:16 diff --git a/config/SOUE01/symbols.txt b/config/SOUE01/symbols.txt index b7282a9e..e91e2481 100644 --- a/config/SOUE01/symbols.txt +++ b/config/SOUE01/symbols.txt @@ -1237,7 +1237,7 @@ fn_80032950 = .text:0x80032950; // type:function size:0x8 fn_80032960 = .text:0x80032960; // type:function size:0x94 fn_80032A00 = .text:0x80032A00; // type:function size:0x44 fn_80032A50 = .text:0x80032A50; // type:function size:0x9C -fn_80032AF0 = .text:0x80032AF0; // type:function size:0x4 +d_s_npc_vt_0x1EC__15dSndSourceNpc_cFP15dSndSourceNpc_c = .text:0x80032AF0; // type:function size:0x4 fn_80032B00 = .text:0x80032B00; // type:function size:0x138 fn_80032C40 = .text:0x80032C40; // type:function size:0xE4 fn_80032D30 = .text:0x80032D30; // type:function size:0xAC @@ -20895,7 +20895,7 @@ fn_8037FE40 = .text:0x8037FE40; // type:function size:0x220 fn_80380060 = .text:0x80380060; // type:function size:0x130 fn_80380190 = .text:0x80380190; // type:function size:0x44 fn_803801E0 = .text:0x803801E0; // type:function size:0x2F4 -fn_803804E0 = .text:0x803804E0; // type:function size:0x8 +d_s_harp_vt_0x1EC__23dSndSourceHarpRelated_cCFv = .text:0x803804E0; // type:function size:0x8 fn_803804F0 = .text:0x803804F0; // type:function size:0x150 fn_80380640 = .text:0x80380640; // type:function size:0x40C fn_80380A50 = .text:0x80380A50; // type:function size:0x350 @@ -20942,7 +20942,7 @@ setFrame__15dSndAnimSound_cFf = .text:0x80382210; // type:function size:0xE8 setRate__15dSndAnimSound_cFf = .text:0x80382300; // type:function size:0x28 resetFrame__15dSndAnimSound_cFf = .text:0x80382330; // type:function size:0x7C animCallback__15dSndAnimSound_cFilPCciPv = .text:0x803823B0; // type:function size:0x18 -onAnimSoundEvent__14dSoundSource_cFi = .text:0x803823D0; // type:function size:0x8 scope:weak +onAnimSoundEvent__14dSoundSource_cFl = .text:0x803823D0; // type:function size:0x8 scope:weak setCallback__15dSndAnimSound_cFP14dSoundSource_c = .text:0x803823E0; // type:function size:0x14 setCallback__15dSndAnimSound_cFPFilPCciPv_vPv = .text:0x80382400; // type:function size:0xC fn_80382410 = .text:0x80382410; // type:function size:0xC0 @@ -20951,15 +20951,15 @@ isSwOrEOc__15dSndSourceMgr_cFPCc = .text:0x80382500; // type:function size:0x90 getSourceCategoryForSourceType__15dSndSourceMgr_cFlPCc = .text:0x80382590; // type:function size:0xB0 createSource__15dSndSourceMgr_cFUlP9dAcBase_cPCcUc = .text:0x80382640; // type:function size:0xFD8 __dt__25dSndSourceEnemyAnimBase_cFv = .text:0x80383620; // type:function size:0x94 -fn_803836C0 = .text:0x803836C0; // type:function size:0x98 +__dt__26dSndSourceEnemyMultiBase_cFv = .text:0x803836C0; // type:function size:0x98 __dt__15dSndSourceObj_cFv = .text:0x80383760; // type:function size:0x58 -fn_803837C0 = .text:0x803837C0; // type:function size:0x9C +__dt__23dSndSourceObjAnimBase_cFv = .text:0x803837C0; // type:function size:0x9C __dt__21dSndSourceAnimSound_cFv = .text:0x80383860; // type:function size:0x94 -fn_80383900 = .text:0x80383900; // type:function size:0x58 -fn_80383960 = .text:0x80383960; // type:function size:0x9C +__dt__15dSndSourceNpc_cFv = .text:0x80383900; // type:function size:0x58 +__dt__23dSndSourceNpcAnimBase_cFv = .text:0x80383960; // type:function size:0x9C d_s_vt_0x180__14dSoundSource_cFUl = .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 +isMultiSource__14dSoundSource_cCFv = .text:0x80383A10; // type:function size:0x8 +registerAdditionalSource__14dSoundSource_cFP14dSoundSource_c = .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 @@ -21043,26 +21043,26 @@ vt_0x020__14dSoundSource_cFv = .text:0x80385B90; // type:function size:0x4 setSubtype__14dSoundSource_cFUc = .text:0x80385BA0; // type:function size:0x8 isSourceType__14dSoundSource_cCFl = .text:0x80385BB0; // type:function size:0x14 isCategory__14dSoundSource_cCFl = .text:0x80385BD0; // type:function size:0x14 -fn_80385BF0 = .text:0x80385BF0; // type:function size:0xC +d_s_vt_0x1E8__15dSndSourceNpc_cFUl = .text:0x80385BF0; // type:function size:0xC d_s_vt_0x1E8__15dSndSourceObj_cFUl = .text:0x80385C00; // type:function size:0xC d_s_vt_0x1E8__17dSndSourceEnemy_cFUl = .text:0x80385C10; // type:function size:0xC setBattleBgmRelated__17dSndSourceEnemy_cFi = .text:0x80385C20; // type:function size:0x8 hasAnimSound__18dSndSourceESpark_cFv = .text:0x80385C30; // type:function size:0x8 -fn_80385C40 = .text:0x80385C40; // type:function size:0x90 -fn_80385CD0 = .text:0x80385CD0; // type:function size:0x8 -fn_80385CE0 = .text:0x80385CE0; // type:function size:0xDC -fn_80385DC0 = .text:0x80385DC0; // type:function size:0x8 -fn_80385DD0 = .text:0x80385DD0; // type:function size:0x8 -fn_80385DE0 = .text:0x80385DE0; // type:function size:0x5C -fn_80385E40 = .text:0x80385E40; // type:function size:0x8 -fn_80385E50 = .text:0x80385E50; // type:function size:0x8 -fn_80385E60 = .text:0x80385E60; // type:function size:0x4 -fn_80385E70 = .text:0x80385E70; // type:function size:0x8 -fn_80385E80 = .text:0x80385E80; // type:function size:0x8 -fn_80385E90 = .text:0x80385E90; // type:function size:0x5C -fn_80385EF0 = .text:0x80385EF0; // type:function size:0x8 -fn_80385F00 = .text:0x80385F00; // type:function size:0x8 -fn_80385F10 = .text:0x80385F10; // type:function size:0x4 +registerAdditionalSource__26dSndSourceEnemyMultiBase_cFP14dSoundSource_c = .text:0x80385C40; // type:function size:0x90 +isMultiSource__26dSndSourceEnemyMultiBase_cCFv = .text:0x80385CD0; // type:function size:0x8 +SetupSound__26dSndSourceEnemyMultiBase_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x80385CE0; // type:function size:0xDC +hasAnimSound__23dSndSourceNpcAnimBase_cFv = .text:0x80385DC0; // type:function size:0x8 +load__23dSndSourceNpcAnimBase_cFPvPCc = .text:0x80385DD0; // type:function size:0x8 +setFrame__23dSndSourceNpcAnimBase_cFf = .text:0x80385DE0; // type:function size:0x5C +setRate__23dSndSourceNpcAnimBase_cFf = .text:0x80385E40; // type:function size:0x8 +getAnimSound__23dSndSourceNpcAnimBase_cFv = .text:0x80385E50; // type:function size:0x8 +SetupSound__23dSndSourceNpcAnimBase_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x80385E60; // type:function size:0x4 +hasAnimSound__23dSndSourceObjAnimBase_cFv = .text:0x80385E70; // type:function size:0x8 +load__23dSndSourceObjAnimBase_cFPvPCc = .text:0x80385E80; // type:function size:0x8 +setFrame__23dSndSourceObjAnimBase_cFf = .text:0x80385E90; // type:function size:0x5C +setRate__23dSndSourceObjAnimBase_cFf = .text:0x80385EF0; // type:function size:0x8 +getAnimSound__23dSndSourceObjAnimBase_cFv = .text:0x80385F00; // type:function size:0x8 +SetupSound__23dSndSourceObjAnimBase_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x80385F10; // type:function size:0x4 hasAnimSound__25dSndSourceEnemyAnimBase_cFv = .text:0x80385F20; // type:function size:0x8 load__25dSndSourceEnemyAnimBase_cFPvPCc = .text:0x80385F30; // type:function size:0x8 setFrame__25dSndSourceEnemyAnimBase_cFf = .text:0x80385F40; // type:function size:0x5C @@ -21076,11 +21076,11 @@ setRate__21dSndSourceAnimSound_cFf = .text:0x80386050; // type:function size:0x8 getAnimSound__21dSndSourceAnimSound_cFv = .text:0x80386060; // type:function size:0x8 SetupSound__21dSndSourceAnimSound_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x80386070; // type:function size:0x4 __dt__18dSndSourceESpark_cFv = .text:0x80386080; // type:function size:0x58 -fn_803860E0 = .text:0x803860E0; // type:function size:0xA0 -fn_80386180 = .text:0x80386180; // type:function size:0x5C -fn_803861E0 = .text:0x803861E0; // type:function size:0xA0 -fn_80386280 = .text:0x80386280; // type:function size:0x58 -fn_803862E0 = .text:0x803862E0; // type:function size:0x4 +__dt__19dSndSourceObjAnim_cFv = .text:0x803860E0; // type:function size:0xA0 +__dt__19dSndSourceObjClef_cFv = .text:0x80386180; // type:function size:0x5C +__dt__19dSndSourceNpcAnim_cFv = .text:0x803861E0; // type:function size:0xA0 +__dt__18dSndSourceHarpTg_cFv = .text:0x80386280; // type:function size:0x58 +__sinit_\d_snd_source_mgr_cpp = .text:0x803862E0; // type:function size:0x4 scope:local @88@__dt__18dSndSourceESpark_cFv = .text:0x803862F0; // type:function size:0x8 @4@__dt__18dSndSourceESpark_cFv = .text:0x80386300; // type:function size:0x8 @88@__dt__21dSndSourceAnimSound_cFv = .text:0x80386310; // type:function size:0x8 @@ -21089,28 +21089,28 @@ fn_803862E0 = .text:0x803862E0; // type:function size:0x4 @88@__dt__25dSndSourceEnemyAnimBase_cFv = .text:0x80386340; // type:function size:0x8 @4@SetupSound__25dSndSourceEnemyAnimBase_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x80386350; // type:function size:0x8 @4@__dt__25dSndSourceEnemyAnimBase_cFv = .text:0x80386360; // type:function size:0x8 -fn_80386370 = .text:0x80386370; // type:function size:0x8 -fn_80386380 = .text:0x80386380; // type:function size:0x8 -fn_80386390 = .text:0x80386390; // type:function size:0x8 -fn_803863A0 = .text:0x803863A0; // type:function size:0x8 -fn_803863B0 = .text:0x803863B0; // type:function size:0x8 -fn_803863C0 = .text:0x803863C0; // type:function size:0x8 -fn_803863D0 = .text:0x803863D0; // type:function size:0x8 -fn_803863E0 = .text:0x803863E0; // type:function size:0x8 -fn_803863F0 = .text:0x803863F0; // type:function size:0x8 -fn_80386400 = .text:0x80386400; // type:function size:0x8 -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 +@88@__dt__26dSndSourceEnemyMultiBase_cFv = .text:0x80386370; // type:function size:0x8 +@4@SetupSound__26dSndSourceEnemyMultiBase_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x80386380; // type:function size:0x8 +@4@__dt__26dSndSourceEnemyMultiBase_cFv = .text:0x80386390; // type:function size:0x8 +@88@__dt__23dSndSourceObjAnimBase_cFv = .text:0x803863A0; // type:function size:0x8 +@4@__dt__23dSndSourceObjAnimBase_cFv = .text:0x803863B0; // type:function size:0x8 +@88@__dt__19dSndSourceObjAnim_cFv = .text:0x803863C0; // type:function size:0x8 +@4@SetupSound__23dSndSourceObjAnimBase_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x803863D0; // type:function size:0x8 +@4@__dt__19dSndSourceObjAnim_cFv = .text:0x803863E0; // type:function size:0x8 +@88@__dt__19dSndSourceObjClef_cFv = .text:0x803863F0; // type:function size:0x8 +@4@__dt__19dSndSourceObjClef_cFv = .text:0x80386400; // type:function size:0x8 +@88@__dt__23dSndSourceNpcAnimBase_cFv = .text:0x80386410; // type:function size:0x8 +@4@__dt__23dSndSourceNpcAnimBase_cFv = .text:0x80386420; // type:function size:0x8 +@88@__dt__19dSndSourceNpcAnim_cFv = .text:0x80386430; // type:function size:0x8 +@4@SetupSound__23dSndSourceNpcAnimBase_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x80386440; // type:function size:0x8 @4@setPause__14dSoundSource_cFbi = .text:0x80386450; // type:function size:0x8 -fn_80386460 = .text:0x80386460; // type:function size:0x8 -fn_80386470 = .text:0x80386470; // type:function size:0x8 +@4@__dt__19dSndSourceNpcAnim_cFv = .text:0x80386460; // type:function size:0x8 +@88@__dt__18dSndSourceHarpTg_cFv = .text:0x80386470; // type:function size:0x8 @4@SetupSound__14dSoundSource_cFPQ34nw4r3snd11SoundHandleUlPCQ44nw4r3snd14SoundStartable9StartInfoPv = .text:0x80386480; // type:function size:0x8 @4@postHoldSound__14dSoundSource_cFRQ34nw4r3snd11SoundHandleP13dSndSeSound_cUli = .text:0x80386490; // type:function size:0x8 @4@postStartSound__14dSoundSource_cFRQ34nw4r3snd11SoundHandleP13dSndSeSound_cUl = .text:0x803864A0; // type:function size:0x8 -fn_803864B0 = .text:0x803864B0; // type:function size:0x8 -fn_803864C0 = .text:0x803864C0; // type:function size:0x8 +@4@setPause__23dSndSourceHarpRelated_cFbi = .text:0x803864B0; // type:function size:0x8 +@4@__dt__18dSndSourceHarpTg_cFv = .text:0x803864C0; // type:function size:0x8 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 @@ -21294,19 +21294,19 @@ vt_0x020__17dSndSourceEnemy_cFv = .text:0x8038E140; // type:function size:0xC checkBattleBgmRelated__17dSndSourceEnemy_cFv = .text:0x8038E150; // type:function size:0xA4 overrideStartSoundId__17dSndSourceEnemy_cFUl = .text:0x8038E200; // type:function size:0xBC overrideHoldSoundId__17dSndSourceEnemy_cFUlb = .text:0x8038E2C0; // type:function size:0x48 -fn_8038E310 = .text:0x8038E310; // type:function size:0xE0 -fn_8038E3F0 = .text:0x8038E3F0; // type:function size:0x2C -fn_8038E420 = .text:0x8038E420; // type:function size:0x198 +overrideStartSoundId__21dSndSourceEnemyAnim_cFUl = .text:0x8038E310; // type:function size:0xE0 +overrideHoldSoundId__21dSndSourceEnemyAnim_cFUlb = .text:0x8038E3F0; // type:function size:0x2C +postCalc__22dSndSourceEnemyMulti_cFv = .text:0x8038E420; // type:function size:0x198 fn_8038E5C0 = .text:0x8038E5C0; // type:function size:0x74 fn_8038E640 = .text:0x8038E640; // type:function size:0x74 -fn_8038E6C0 = .text:0x8038E6C0; // type:function size:0x98 -fn_8038E760 = .text:0x8038E760; // type:function size:0x9C +__dt__21dSndSourceEnemyAnim_cFv = .text:0x8038E6C0; // type:function size:0x98 +__dt__22dSndSourceEnemyMulti_cFv = .text:0x8038E760; // type:function size:0x9C @88@__dt__17dSndSourceEnemy_cFv = .text:0x8038E800; // type:function size:0x8 @4@__dt__17dSndSourceEnemy_cFv = .text:0x8038E810; // type:function size:0x8 -fn_8038E820 = .text:0x8038E820; // type:function size:0x8 -fn_8038E830 = .text:0x8038E830; // type:function size:0x8 -fn_8038E840 = .text:0x8038E840; // type:function size:0x8 -fn_8038E850 = .text:0x8038E850; // type:function size:0x8 +@88@__dt__21dSndSourceEnemyAnim_cFv = .text:0x8038E820; // type:function size:0x8 +@4@__dt__21dSndSourceEnemyAnim_cFv = .text:0x8038E830; // type:function size:0x8 +@88@__dt__22dSndSourceEnemyMulti_cFv = .text:0x8038E840; // type:function size:0x8 +@4@__dt__22dSndSourceEnemyMulti_cFv = .text:0x8038E850; // type:function size:0x8 postSetup__15dSndSourceObj_cFv = .text:0x8038E860; // type:function size:0x130 setPosition__25dSndSourceObjLightShaft_cFRCQ34nw4r4math4VEC3 = .text:0x8038E990; // type:function size:0x98 __dt__25dSndSourceObjLightShaft_cFv = .text:0x8038EA30; // type:function size:0x5C scope:weak @@ -21376,23 +21376,23 @@ fn_803909C0 = .text:0x803909C0; // type:function size:0x24 fn_803909F0 = .text:0x803909F0; // type:function size:0x8 fn_80390A00 = .text:0x80390A00; // type:function size:0x8 fn_80390A10 = .text:0x80390A10; // type:function size:0x8 -fn_80390A20 = .text:0x80390A20; // type:function size:0x108 -fn_80390B30 = .text:0x80390B30; // type:function size:0xA8 -fn_80390BE0 = .text:0x80390BE0; // type:function size:0x2F8 -fn_80390EE0 = .text:0x80390EE0; // type:function size:0xFC +__ct__23dSndSourceHarpRelated_cFUcP9dAcBase_cPCcP17dSndSourceGroup_c = .text:0x80390A20; // type:function size:0x108 +__dt__23dSndSourceHarpRelated_cFv = .text:0x80390B30; // type:function size:0xA8 +postCalc__23dSndSourceHarpRelated_cFv = .text:0x80390BE0; // type:function size:0x2F8 +setPause__23dSndSourceHarpRelated_cFbi = .text:0x80390EE0; // type:function size:0xFC fn_80390FE0 = .text:0x80390FE0; // type:function size:0x5C -fn_80391040 = .text:0x80391040; // type:function size:0xA8 +d_s_harp_vt_0x1F0__23dSndSourceHarpRelated_cFv = .text:0x80391040; // type:function size:0xA8 fn_803910F0 = .text:0x803910F0; // type:function size:0x7C fn_80391170 = .text:0x80391170; // type:function size:0xA0 fn_80391210 = .text:0x80391210; // type:function size:0x84 fn_803912A0 = .text:0x803912A0; // type:function size:0xA4 -fn_80391350 = .text:0x80391350; // type:function size:0x58 +d_s_harp_vt_0x1F4__23dSndSourceHarpRelated_cFv = .text:0x80391350; // type:function size:0x58 fn_803913B0 = .text:0x803913B0; // type:function size:0xBC fn_80391470 = .text:0x80391470; // type:function size:0x174 fn_803915F0 = .text:0x803915F0; // type:function size:0x6C fn_80391660 = .text:0x80391660; // type:function size:0x44 fn_803916B0 = .text:0x803916B0; // type:function size:0x20C -fn_803918C0 = .text:0x803918C0; // type:function size:0x20 +d_s_harp_vt_0x1F8__23dSndSourceHarpRelated_cFv = .text:0x803918C0; // type:function size:0x20 fn_803918E0 = .text:0x803918E0; // type:function size:0x68 fn_80391950 = .text:0x80391950; // type:function size:0x134 fn_80391A90 = .text:0x80391A90; // type:function size:0x108 @@ -21418,8 +21418,8 @@ fn_80392C90 = .text:0x80392C90; // type:function size:0x8 fn_80392CA0 = .text:0x80392CA0; // type:function size:0x58 fn_80392D00 = .text:0x80392D00; // type:function size:0x58 fn_80392D60 = .text:0x80392D60; // type:function size:0x58 -fn_80392DC0 = .text:0x80392DC0; // type:function size:0x8 -fn_80392DD0 = .text:0x80392DD0; // type:function size:0x8 +@88@__dt__23dSndSourceHarpRelated_cFv = .text:0x80392DC0; // type:function size:0x8 +@4@__dt__23dSndSourceHarpRelated_cFv = .text:0x80392DD0; // type:function size:0x8 fn_80392DE0 = .text:0x80392DE0; // type:function size:0x8 fn_80392DF0 = .text:0x80392DF0; // type:function size:0x8 fn_80392E00 = .text:0x80392E00; // type:function size:0x8 @@ -21591,10 +21591,10 @@ fn_80398AE0 = .text:0x80398AE0; // type:function size:0xC4 fn_80398BB0 = .text:0x80398BB0; // type:function size:0xCC fn_80398C80 = .text:0x80398C80; // type:function size:0x68 cbPyBirdGlide__18dSndSourcePyBird_cFP13dSndSeSound_cP14dSoundSource_cRQ34nw4r3snd11SoundHandle = .text:0x80398CF0; // type:function size:0x80 -fn_80398D70 = .text:0x80398D70; // type:function size:0x64 +postSetupSound__15dSndSourceNpc_cFUlUlP13dSndSeSound_c = .text:0x80398D70; // type:function size:0x64 postSetupSound__18dSndSourcePyBird_cFUlUlP13dSndSeSound_c = .text:0x80398DE0; // type:function size:0x18 -fn_80398E00 = .text:0x80398E00; // type:function size:0x8 -fn_80398E10 = .text:0x80398E10; // type:function size:0x8 +@88@__dt__15dSndSourceNpc_cFv = .text:0x80398E00; // type:function size:0x8 +@4@__dt__15dSndSourceNpc_cFv = .text:0x80398E10; // type:function size:0x8 fn_80398E20 = .text:0x80398E20; // type:function size:0x4C fn_80398E70 = .text:0x80398E70; // type:function size:0x84 fn_80398F00 = .text:0x80398F00; // type:function size:0x5C @@ -38045,13 +38045,13 @@ lbl_80549200 = .data:0x80549200; // type:object size:0x14 data:4byte lbl_80549214 = .data:0x80549214; // type:object size:0x14 data:4byte jumptable_80549228 = .data:0x80549228; // type:object size:0xF0 scope:local lbl_80549318 = .data:0x80549318; // type:object size:0xC -lbl_80549324 = .data:0x80549324; // type:object size:0x1FC -lbl_80549520 = .data:0x80549520; // type:object size:0x1F0 -lbl_80549710 = .data:0x80549710; // type:object size:0x1F0 -lbl_80549900 = .data:0x80549900; // type:object size:0x1EC -lbl_80549AEC = .data:0x80549AEC; // type:object size:0x1EC -lbl_80549CD8 = .data:0x80549CD8; // type:object size:0x1EC -lbl_80549EC4 = .data:0x80549EC4; // type:object size:0x1EC +__vt__18dSndSourceHarpTg_c = .data:0x80549324; // type:object size:0x1FC +__vt__19dSndSourceNpcAnim_c = .data:0x80549520; // type:object size:0x1F0 +__vt__23dSndSourceNpcAnimBase_c = .data:0x80549710; // type:object size:0x1F0 +__vt__19dSndSourceObjClef_c = .data:0x80549900; // type:object size:0x1EC +__vt__19dSndSourceObjAnim_c = .data:0x80549AEC; // type:object size:0x1EC +__vt__23dSndSourceObjAnimBase_c = .data:0x80549CD8; // type:object size:0x1EC +__vt__26dSndSourceEnemyMultiBase_c = .data:0x80549EC4; // type:object size:0x1EC __vt__25dSndSourceEnemyAnimBase_c = .data:0x8054A0B0; // type:object size:0x1EC __vt__21dSndSourceAnimSound_c = .data:0x8054A29C; // type:object size:0x1EC __vt__18dSndSourceESpark_c = .data:0x8054A488; // type:object size:0x1EC @@ -38066,8 +38066,8 @@ jumptable_8054AF18 = .data:0x8054AF18; // type:object size:0xA8 scope:local lbl_8054AFC0 = .data:0x8054AFC0; // type:object size:0x1F8 lbl_8054B1B8 = .data:0x8054B1B8; // type:object size:0xC lbl_8054B1C4 = .data:0x8054B1C4; // type:object size:0xC -lbl_8054B1D0 = .data:0x8054B1D0; // type:object size:0x1EC -lbl_8054B3BC = .data:0x8054B3BC; // type:object size:0x1EC +__vt__22dSndSourceEnemyMulti_c = .data:0x8054B1D0; // type:object size:0x1EC +__vt__21dSndSourceEnemyAnim_c = .data:0x8054B3BC; // type:object size:0x1EC __vt__17dSndSourceEnemy_c = .data:0x8054B5A8; // type:object size:0x1EC __vt__25dSndSourceObjLightShaft_c = .data:0x8054B798; // type:object size:0x1F0 __vt__15dSndSourceObj_c = .data:0x8054B988; // type:object size:0x1EC @@ -38091,7 +38091,7 @@ lbl_8054C9C0 = .data:0x8054C9C0; // type:object size:0x10 lbl_8054C9D0 = .data:0x8054C9D0; // type:object size:0x1FC lbl_8054CBCC = .data:0x8054CBCC; // type:object size:0x1FC lbl_8054CDC8 = .data:0x8054CDC8; // type:object size:0x1FC -lbl_8054CFC4 = .data:0x8054CFC4; // type:object size:0x1FC +__vt__23dSndSourceHarpRelated_c = .data:0x8054CFC4; // type:object size:0x1FC lbl_8054D1C0 = .data:0x8054D1C0; // type:object size:0x1F0 lbl_8054D3B0 = .data:0x8054D3B0; // type:object size:0xC lbl_8054D3BC = .data:0x8054D3BC; // type:object size:0x44 @@ -38104,7 +38104,7 @@ __vt__35SndMgrDisposer<17dSndSeSoundPool_c> = .data:0x8054D4B8; // type:object s lbl_8054D4C8 = .data:0x8054D4C8; // type:object size:0x58 lbl_8054D520 = .data:0x8054D520; // type:object size:0x10 data:string lbl_8054D530 = .data:0x8054D530; // type:object size:0x10 -lbl_8054D540 = .data:0x8054D540; // type:object size:0x1F0 +__vt__15dSndSourceNpc_c = .data:0x8054D540; // type:object size:0x1F0 lbl_8054D730 = .data:0x8054D730; // type:object size:0x10 lbl_8054D740 = .data:0x8054D740; // type:object size:0x20 lbl_8054D760 = .data:0x8054D760; // type:object size:0xC diff --git a/configure.py b/configure.py index df04a038..2e490ffa 100644 --- a/configure.py +++ b/configure.py @@ -775,8 +775,8 @@ config.libs = [ Object(NonMatching, "d/snd/d_snd_mgr_unk_8.cpp"), Object(NonMatching, "d/snd/d_snd_mgr_unk_9.cpp"), Object(Matching, "d/snd/d_snd_source_py_bird.cpp"), - Object(NonMatching, "d/snd/d_snd_mgr_unk_18.cpp"), - Object(NonMatching, "d/snd/d_snd_mgr_unk_10.cpp"), + Object(NonMatching, "d/snd/d_snd_source_demo.cpp"), + Object(NonMatching, "d/snd/d_snd_source_harp_related.cpp"), # sound source subclasses end Object(NonMatching, "d/snd/d_snd_source_tg_sound.cpp"), Object(NonMatching, "d/snd/d_snd_id_mappers.cpp"), diff --git a/include/d/snd/d_snd_source.h b/include/d/snd/d_snd_source.h index 2fa02f3d..5a85e8da 100644 --- a/include/d/snd/d_snd_source.h +++ b/include/d/snd/d_snd_source.h @@ -78,14 +78,14 @@ public: /* 0x1D4 */ virtual dSndAnimSound_c *getAnimSound() { return nullptr; } - /* 0x1D8 */ virtual void d_s_vt_0x1D8() { + /* 0x1D8 */ virtual void registerAdditionalSource(dSoundSource_c *other) { return; } - /* 0x1DC */ virtual UNKWORD d_s_vt_0x1DC() { + /* 0x1DC */ virtual bool isMultiSource() const { return 0; } - /* 0x1E0 */ virtual void onAnimSoundEvent(UNKWORD arg) { - field_0x154 = arg; + /* 0x1E0 */ virtual void onAnimSoundEvent(s32 arg) { + mAnimEventValue = arg; } /* 0x1E4 */ virtual void d_s_vt_0x1E4_noop(); /* 0x1E8 */ virtual u32 d_s_vt_0x1E8(u32 soundId); @@ -209,6 +209,7 @@ public: protected: StartResult setupSoundCommon(nw4r::snd::SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void *arg); void setVolumeFade(f32 volume, u32 fadeFrames); + nw4r::snd::SoundStartable::StartResult onSetupError(); private: /** @@ -225,7 +226,6 @@ private: dSndDistantSoundActor_c *startBaseSoundAtPosition(u32 baseSoundId, const nw4r::math::VEC3 *position, f32 volume); nw4r::snd::SoundHandle *startBaseSound(u32 baseSoundId, f32 volume); - nw4r::snd::SoundStartable::StartResult onSetupError(); nw4r::snd::SoundStartable::StartResult startSound(u32 soundId, nw4r::snd::SoundHandle *handle, nw4r::snd::SoundHandle **pOutHandle); @@ -283,8 +283,8 @@ protected: /* 0x140 */ dSndSourceGroup_c *mpOwnerGroup; /* 0x144 */ f32 mVolumeFadeTarget; /* 0x148 */ f32 mVolumeFadeStepSize; - /* 0x150 */ u8 _0x14C[0x154 - 0x14C]; - /* 0x154 */ UNKWORD field_0x154; + /* 0x14C */ nw4r::ut::Node mSubSourceLink; // node for list in dSndSourceEnemyMultiBase_c + /* 0x154 */ s32 mAnimEventValue; /* 0x158 */ s16 mPolyAttr0; /* 0x15A */ s16 mPolyAttr1; }; diff --git a/include/d/snd/d_snd_source_anim_sound.h b/include/d/snd/d_snd_source_anim_sound.h index 20f016e5..e890d5b2 100644 --- a/include/d/snd/d_snd_source_anim_sound.h +++ b/include/d/snd/d_snd_source_anim_sound.h @@ -9,8 +9,6 @@ public: dSndSourceAnimSound_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) : dSoundSource_c(sourceType, ac, name, pOwnerGroup), mAnimSound(this) {} - virtual ~dSndSourceAnimSound_c() {} - /* 0x1A8 */ virtual StartResult SetupSound(nw4r::snd::SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void *arg) override { return setupSoundCommon(pHandle, soundId, pStartInfo, arg); diff --git a/include/d/snd/d_snd_source_e_spark.h b/include/d/snd/d_snd_source_e_spark.h index f2f5255e..9012e949 100644 --- a/include/d/snd/d_snd_source_e_spark.h +++ b/include/d/snd/d_snd_source_e_spark.h @@ -8,8 +8,6 @@ public: dSndSourceESpark_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) : dSoundSource_c(sourceType, ac, name, pOwnerGroup) {} - virtual ~dSndSourceESpark_c() {} - // okay virtual bool hasAnimSound() override { return true; diff --git a/include/d/snd/d_snd_source_enemy.h b/include/d/snd/d_snd_source_enemy.h index 2fdf63d2..299ac98f 100644 --- a/include/d/snd/d_snd_source_enemy.h +++ b/include/d/snd/d_snd_source_enemy.h @@ -1,8 +1,10 @@ #ifndef D_SND_SOURCE_ENEMY_H #define D_SND_SOURCE_ENEMY_H +#include "common.h" #include "d/snd/d_snd_anim_sound.h" #include "d/snd/d_snd_source.h" +#include "d/snd/d_snd_util.h" #include "nw4r/ut/ut_list.h" class dSndSourceEnemy_c : public dSoundSource_c { @@ -74,8 +76,94 @@ public: mAnimSound.setRate(frame); } -private: +protected: /* 0x16C */ dSndAnimSound_c mAnimSound; }; +class dSndSourceEnemyAnim_c : public dSndSourceEnemyAnimBase_c { +public: + dSndSourceEnemyAnim_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) + : dSndSourceEnemyAnimBase_c(sourceType, ac, name, pOwnerGroup) {} + + /* 0x194 */ virtual u32 overrideStartSoundId(u32 soundId) override; + /* 0x1A0 */ virtual u32 overrideHoldSoundId(u32 soundId, bool initial) override; + +private: +}; + +class dSndSourceEnemyMultiBase_c : public dSndSourceEnemyAnimBase_c { +public: + dSndSourceEnemyMultiBase_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) + : dSndSourceEnemyAnimBase_c(sourceType, ac, name, pOwnerGroup) { + nw4r::ut::List_Init(&mSubSourceList, 0x14C); + mAnimSound.setCallback(this); + } + + /* 0x1A8 */ virtual StartResult + SetupSound(nw4r::snd::SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void *arg) override { + bool bHoldFlag = *(bool*)arg; + if (!bHoldFlag && (mAnimEventValue & 0xF) > 0) { + dSoundSource_c *otherSource; + s32 idx = (mAnimEventValue & 0xF) - 1; + if (idx < 0) { + otherSource = nullptr; + } else if (idx >= nw4r::ut::List_GetSize(&mSubSourceList)) { + otherSource = nullptr; + } else { + otherSource = getSubSourceFirst(); + while (idx > 0) { + otherSource = getSubSourceNext(otherSource); + idx--; + } + } + if (otherSource != nullptr) { + otherSource->startSound(soundId, pHandle); + return onSetupError(); + } + } + + return setupSoundCommon(pHandle, soundId, pStartInfo, arg); + } + + /* 0x1D8 */ virtual void registerAdditionalSource(dSoundSource_c *other) override { + if (other == this) { + return; + } + + if (other == nullptr) { + return; + } + if (!hasSubSource(other)) { + appendSubSource(other); + } + } + /* 0x1DC */ virtual bool isMultiSource() const override { + return true; + } + +private: + // TODO: maybe created by the macro below + bool hasSubSource(dSoundSource_c *other) { + for (dSoundSource_c *it = getSubSourceFirst(); it != nullptr; it = getSubSourceNext(it)) { + if (it == other) { + return true; + } + } + return false; + } + + /* 0x210 */ LIST_MEMBER(dSoundSource_c, SubSource); // -> dSoundSource_c::mSubSourceLink +}; + +class dSndSourceEnemyMulti_c : public dSndSourceEnemyMultiBase_c { +public: + dSndSourceEnemyMulti_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) + : dSndSourceEnemyMultiBase_c(sourceType, ac, name, pOwnerGroup) {} + + /* 0x18C */ virtual void postCalc() override; + +private: + +}; + #endif diff --git a/include/d/snd/d_snd_source_enums.h b/include/d/snd/d_snd_source_enums.h index 7cb7ad7a..d503f3af 100644 --- a/include/d/snd/d_snd_source_enums.h +++ b/include/d/snd/d_snd_source_enums.h @@ -19,10 +19,12 @@ enum SoundSourceType_e { // 10-31: Enemy? (2) SND_SOURCE_ENEMY_10 = 10, + SND_SOURCE_MAGUPPO = 12, SND_SOURCE_LIZARUFOS = 13, SND_SOURCE_BC_Z = 16, SND_SOURCE_SPARK = 17, SND_SOURCE_BIGBOSS = 20, + SND_SOURCE_BOSS_NUSI = 23, SND_SOURCE_GIRAHUMU_3 = 24, SND_SOURCE_ENEMY_28 = 28, SND_SOURCE_BULLET = 29, @@ -45,6 +47,7 @@ enum SoundSourceType_e { SND_SOURCE_NPC_43 = 43, SND_SOURCE_KENSEI = 44, SND_SOURCE_PLAYER_BIRD = 45, + SND_SOURCE_NPC_NUSI = 46, SND_SOURCE_NPC_HEAD = 48, SND_SOURCE_INSECT = 49, SND_SOURCE_NPC_NRM = 51, diff --git a/include/d/snd/d_snd_source_harp_related.h b/include/d/snd/d_snd_source_harp_related.h new file mode 100644 index 00000000..747c694b --- /dev/null +++ b/include/d/snd/d_snd_source_harp_related.h @@ -0,0 +1,33 @@ +#ifndef D_SND_SOURCE_HARP_RELATED_H +#define D_SND_SOURCE_HARP_RELATED_H + +#include "d/snd/d_snd_source.h" + +class dSndSourceHarpRelated_c : public dSoundSource_c { +public: + dSndSourceHarpRelated_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup); + virtual ~dSndSourceHarpRelated_c(); + + /* 0x18C */ virtual void postCalc() override; + /* 0x1D0 */ virtual void setPause(bool flag, int fadeFrames) override; + + /* 0x1EC */ virtual UNKWORD d_s_harp_vt_0x1EC() const { + return 0; + } + + /* 0x1F0 */ virtual void d_s_harp_vt_0x1F0(); + /* 0x1F4 */ virtual void d_s_harp_vt_0x1F4(); + /* 0x1F8 */ virtual void d_s_harp_vt_0x1F8(); + +private: +}; + +class dSndSourceHarpTg_c : public dSndSourceHarpRelated_c { +public: + dSndSourceHarpTg_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) + : dSndSourceHarpRelated_c(sourceType, ac, name, pOwnerGroup) {} + +private: +}; + +#endif diff --git a/include/d/snd/d_snd_source_npc.h b/include/d/snd/d_snd_source_npc.h new file mode 100644 index 00000000..a9323774 --- /dev/null +++ b/include/d/snd/d_snd_source_npc.h @@ -0,0 +1,68 @@ +#ifndef D_SND_SOURCE_NPC_H +#define D_SND_SOURCE_NPC_H + +#include "d/snd/d_snd_anim_sound.h" +#include "d/snd/d_snd_source.h" + +// vtable at 8054d540 - placed by implementation of postSetupSound, +// so this is the base class and also instantiated in createSource +class dSndSourceNpc_c : public dSoundSource_c { +public: + dSndSourceNpc_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) + : dSoundSource_c(sourceType, ac, name, pOwnerGroup) {} + + /* 0x1CC */ virtual void postSetupSound(u32 playingId, u32 requestedId, dSndSeSound_c *seSound) override; + + /* 0x1E8 */ virtual u32 d_s_vt_0x1E8(u32 soundId) override { + return specializeBgHitSoundId(soundId, mPolyAttr0, mPolyAttr1); + } + // at 80032af0, explicitly called by dAcNpc_c + /* 0x1EC */ virtual void d_s_npc_vt_0x1EC(dSndSourceNpc_c *source) {} + +private: +}; + +class dSndSourceNpcAnimBase_c : public dSndSourceNpc_c { +public: + dSndSourceNpcAnimBase_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) + : dSndSourceNpc_c(sourceType, ac, name, pOwnerGroup), mAnimSound(this) {} + + /* 0x1A8 */ virtual StartResult + SetupSound(nw4r::snd::SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void *arg) override { + return setupSoundCommon(pHandle, soundId, pStartInfo, arg); + } + + /* 0x1D4 */ virtual dSndAnimSound_c *getAnimSound() override { + return &mAnimSound; + } + + /* 0x100 */ virtual bool hasAnimSound() override { + return true; + } + /* 0x104 */ virtual void load(void *data, const char *name) override { + mAnimSound.setData(data, name); + } + /* 0x108 */ virtual void setFrame(f32 frame) override { + if (isInaudibleInternal()) { + mAnimSound.resetFrame(frame); + } else { + mAnimSound.setFrame(frame); + } + } + /* 0x10C */ virtual void setRate(f32 frame) override { + mAnimSound.setRate(frame); + } + +private: + /* 0x15C */ dSndAnimSound_c mAnimSound; +}; + +class dSndSourceNpcAnim_c : public dSndSourceNpcAnimBase_c { +public: + dSndSourceNpcAnim_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) + : dSndSourceNpcAnimBase_c(sourceType, ac, name, pOwnerGroup) {} + +private: +}; + +#endif diff --git a/include/d/snd/d_snd_source_obj.h b/include/d/snd/d_snd_source_obj.h index bb0bff7f..0f79d93d 100644 --- a/include/d/snd/d_snd_source_obj.h +++ b/include/d/snd/d_snd_source_obj.h @@ -1,6 +1,7 @@ #ifndef D_SND_SOURCE_OBJ_H #define D_SND_SOURCE_OBJ_H +#include "d/snd/d_snd_anim_sound.h" #include "d/snd/d_snd_source.h" #include "d/snd/d_snd_util.h" #include "nw4r/math/math_types.h" @@ -34,4 +35,45 @@ public: /* 0x1EC */ virtual void setPosition(const nw4r::math::VEC3 &position) override; }; +class dSndSourceObjAnimBase_c : public dSndSourceObj_c { +public: + dSndSourceObjAnimBase_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) + : dSndSourceObj_c(sourceType, ac, name, pOwnerGroup), mAnimSound(this) {} + + /* 0x1A8 */ virtual StartResult + SetupSound(nw4r::snd::SoundHandle *pHandle, u32 soundId, const StartInfo *pStartInfo, void *arg) override { + return setupSoundCommon(pHandle, soundId, pStartInfo, arg); + } + + /* 0x1D4 */ virtual dSndAnimSound_c *getAnimSound() override { + return &mAnimSound; + } + + /* 0x100 */ virtual bool hasAnimSound() override { + return true; + } + /* 0x104 */ virtual void load(void *data, const char *name) override { + mAnimSound.setData(data, name); + } + /* 0x108 */ virtual void setFrame(f32 frame) override { + if (isInaudibleInternal()) { + mAnimSound.resetFrame(frame); + } else { + mAnimSound.setFrame(frame); + } + } + /* 0x10C */ virtual void setRate(f32 frame) override { + mAnimSound.setRate(frame); + } + +protected: + /* 0x15C */ dSndAnimSound_c mAnimSound; +}; + +class dSndSourceObjAnim_c : public dSndSourceObjAnimBase_c { +public: + dSndSourceObjAnim_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) + : dSndSourceObjAnimBase_c(sourceType, ac, name, pOwnerGroup) {} +}; + #endif diff --git a/include/d/snd/d_snd_source_py_bird.h b/include/d/snd/d_snd_source_py_bird.h index 7a3c9405..fb134e50 100644 --- a/include/d/snd/d_snd_source_py_bird.h +++ b/include/d/snd/d_snd_source_py_bird.h @@ -8,8 +8,6 @@ public: dSndSourcePyBird_c(u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup) : dSndSourceAnimSound_c(sourceType, ac, name, pOwnerGroup), mSeqVarValue(0) {} - virtual ~dSndSourcePyBird_c() {} - /* 0x104 */ virtual void load(void *data, const char *name) override; /* 0x1CC */ virtual void postSetupSound(u32 playingId, u32 requestedId, dSndSeSound_c *seSound) override; diff --git a/src/d/snd/d_snd_sound_npc_callbacks.cpp b/src/d/snd/d_snd_sound_npc_callbacks.cpp index 8f8e06de..e809927f 100644 --- a/src/d/snd/d_snd_sound_npc_callbacks.cpp +++ b/src/d/snd/d_snd_sound_npc_callbacks.cpp @@ -1,5 +1,6 @@ #include "d/snd/d_snd_se_sound.h" #include "d/snd/d_snd_source_py_bird.h" +#include "d/snd/d_snd_source_npc.h" #include "d/snd/d_snd_state_mgr.h" #include "d/snd/d_snd_wzsound.h" #include "nw4r/snd/snd_SeqSoundHandle.h" @@ -14,6 +15,10 @@ void dSndSourcePyBird_c::cbPyBirdGlide(dSndSeSound_c *sound, dSoundSource_c *sou seqHandle.WriteVariable(10, var); } +void dSndSourceNpc_c::postSetupSound(u32 playingId, u32 requestedId, dSndSeSound_c *seSound) { + // TODO +} + void dSndSourcePyBird_c::postSetupSound(u32 playingId, u32 requestedId, dSndSeSound_c *seSound) { if (requestedId == SE_PyBird_GLIDE) { seSound->setCallback2(&cbPyBirdGlide); diff --git a/src/d/snd/d_snd_source.cpp b/src/d/snd/d_snd_source.cpp index 3795fef7..67aab65e 100644 --- a/src/d/snd/d_snd_source.cpp +++ b/src/d/snd/d_snd_source.cpp @@ -53,7 +53,7 @@ dSoundSource_c::dSoundSource_c(u8 sourceType, dAcBase_c *actor, const char *name mpCtxParam(nullptr), field_0x11C(0), mpOwnerGroup(pOwnerGroup), - field_0x154(0), + mAnimEventValue(0), mPolyAttr0(-1), mPolyAttr1(-1) { mSourceCategory = dSndSourceMgr_c::getSourceCategoryForSourceType(sourceType, name); @@ -706,7 +706,7 @@ nw4r::snd::SoundHandle *dSoundSource_c::continueHoldingSound( ok = HoldSound(handle, actualSoundId); } field_0x11C = 0; - field_0x154 = 0; + mAnimEventValue = 0; if (ok) { seHandle->setField0x130(1); postHoldSound(*handle, seHandle, soundId, 0); @@ -916,7 +916,7 @@ void dSoundSource_c::resetTempParams() { sCtxParams.floatParam = 0.0f; sCtxParams.intParam = 0; field_0x11C = 0; - field_0x154 = 0; + mAnimEventValue = 0; } nw4r::snd::SoundStartable::StartResult dSoundSource_c::onSetupError() { diff --git a/src/d/snd/d_snd_source_enemy.cpp b/src/d/snd/d_snd_source_enemy.cpp index 437edff9..3a093810 100644 --- a/src/d/snd/d_snd_source_enemy.cpp +++ b/src/d/snd/d_snd_source_enemy.cpp @@ -121,3 +121,18 @@ u32 dSndSourceEnemy_c::overrideHoldSoundId(u32 soundId, bool initial) { } return soundId; } + +u32 dSndSourceEnemyAnim_c::overrideStartSoundId(u32 soundId) { + // TODO + return soundId; +} + +u32 dSndSourceEnemyAnim_c::overrideHoldSoundId(u32 soundId, bool initial) { + // TODO + return soundId; +} + + +void dSndSourceEnemyMulti_c::postCalc() { + // TODO - Nusi +} diff --git a/src/d/snd/d_snd_source_harp_related.cpp b/src/d/snd/d_snd_source_harp_related.cpp new file mode 100644 index 00000000..04ec7469 --- /dev/null +++ b/src/d/snd/d_snd_source_harp_related.cpp @@ -0,0 +1,22 @@ +#include "d/snd/d_snd_source_harp_related.h" + +#include "d/snd/d_snd_source.h" + +dSndSourceHarpRelated_c::dSndSourceHarpRelated_c( + u8 sourceType, dAcBase_c *ac, const char *name, dSndSourceGroup_c *pOwnerGroup +) + : dSoundSource_c(sourceType, ac, name, pOwnerGroup) { + // TODO +} + +dSndSourceHarpRelated_c::~dSndSourceHarpRelated_c() { + // TODO +} + +void dSndSourceHarpRelated_c::postCalc() { + // TODO +} + +void dSndSourceHarpRelated_c::setPause(bool flag, int fadeFrames) { + // TODO +} diff --git a/src/d/snd/d_snd_source_mgr.cpp b/src/d/snd/d_snd_source_mgr.cpp index e963f112..11065802 100644 --- a/src/d/snd/d_snd_source_mgr.cpp +++ b/src/d/snd/d_snd_source_mgr.cpp @@ -2,10 +2,18 @@ #include "common.h" #include "d/snd/d_snd_source.h" + +// clang-format off #include "d/snd/d_snd_source_e_spark.h" #include "d/snd/d_snd_source_enums.h" #include "d/snd/d_snd_source_py_bird.h" #include "d/snd/d_snd_source_enemy.h" +#include "d/snd/d_snd_source_obj_clef.h" +#include "d/snd/d_snd_source_obj.h" +#include "d/snd/d_snd_source_npc.h" +#include "d/snd/d_snd_source_harp_related.h" +// clang-format on + #include "d/snd/d_snd_util.h" #include "nw4r/ut/ut_list.h" @@ -52,9 +60,16 @@ s32 dSndSourceMgr_c::getSourceCategoryForSourceType(s32 sourceType, const char * dSoundSource_c *dSndSourceMgr_c::createSource(u32 id, dAcBase_c *actor, const char *name, u8 subtype) { // TODO - new dSndSourcePyBird_c(0, actor, name, nullptr); new dSndSourceESpark_c(0, actor, name, nullptr); - new dSndSourceEnemyAnimBase_c(0, actor, name, nullptr); + new dSndSourceEnemyAnim_c(0, actor, name, nullptr); + new dSndSourceEnemyMulti_c(0, actor, name, nullptr); + new dSndSourceObjAnim_c(0, actor, name, nullptr); + new dSndSourceObjClef_c(0, actor, name, nullptr); + new dSndSourcePyBird_c(0, actor, name, nullptr); + new dSndSourceNpc_c(0, actor, name, nullptr); + new dSndSourceNpcAnimBase_c(0, actor, name, nullptr); + new dSndSourceNpcAnim_c(0, actor, name, nullptr); + new dSndSourceHarpTg_c(0, actor, name, nullptr); return nullptr; } @@ -207,3 +222,10 @@ s32 dSndSourceMgr_c::getPlayerSourceRoomId() const { } return mpPlayerSource->getRoomId(); } + + +struct dSndSourceMgrEmptySinit { + dSndSourceMgrEmptySinit() {} +}; + +dSndSourceMgrEmptySinit emptySinit; diff --git a/src/toBeSorted/actor_info.cpp b/src/toBeSorted/actor_info.cpp index 2058dfb0..da78fbfc 100644 --- a/src/toBeSorted/actor_info.cpp +++ b/src/toBeSorted/actor_info.cpp @@ -256,7 +256,7 @@ static const ActorInfo sInfos[] = { {"ELiTail", fProfile::E_LIZA_TAIL, fProfile::E_LIZA_TAIL, 0xFFFF, SND_SOURCE_ITEM, 0}, {"ELizaru", fProfile::E_LIZARUFOS, fProfile::E_LIZARUFOS, 41, SND_SOURCE_LIZARUFOS, 0}, { "EMagma", fProfile::E_MAGMA, fProfile::E_MAGMA, 0xFFFF, SND_SOURCE_OBJECT, 0}, - {"EMagupp", fProfile::E_MAGUPPO, fProfile::E_MAGUPPO, 74, 12, 0}, + {"EMagupp", fProfile::E_MAGUPPO, fProfile::E_MAGUPPO, 74, SND_SOURCE_MAGUPPO, 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}, @@ -525,9 +525,9 @@ static const ActorInfo sInfos[] = { {"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}, + { "NusiB", fProfile::B_NUSI, fProfile::B_NUSI, 0xFFFF, SND_SOURCE_BOSS_NUSI, 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}, + {"NusiNpc", fProfile::NUSI_NPC, fProfile::NUSI_NPC, 0xFFFF, SND_SOURCE_NPC_NUSI, 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},