d_snd_mgr OK

This commit is contained in:
robojumper
2025-07-10 23:21:46 +02:00
parent 84538b4ce0
commit ba3092ca92
25 changed files with 347 additions and 116 deletions
+4 -1
View File
@@ -2742,7 +2742,7 @@ d/snd/d_snd_small_effect_mgr.cpp:
.sbss start:0x80575D98 end:0x80575DA0
.sdata2 start:0x8057DA80 end:0x8057DAD0
d/snd/d_snd_harp_mgr.cpp:
d/snd/d_snd_harp_song_mgr.cpp:
.text start:0x8037F8C0 end:0x80382150 align:16
.rodata start:0x804F38C8 end:0x804F38E0
.data start:0x805491D0 end:0x805491E0
@@ -2911,9 +2911,12 @@ d/snd/d_snd_sound_tgsound_callbacks.cpp:
d/snd/d_snd_mgr_unk_17.cpp:
.text start:0x80399430 end:0x80399574 align:16
.data start:0x8054D740 end:0x8054D760
d/snd/d_snd_fi_vocal_mgr.cpp:
.text start:0x80399580 end:0x80399A3C align:16
.data start:0x8054D760 end:0x8054D7A8
.sbss start:0x80575DE0 end:0x80575DE8
d/snd/d_snd_rng.cpp:
.text start:0x80399A40 end:0x80399BA0 align:16
+61 -61
View File
@@ -10736,7 +10736,7 @@ fn_8019E450 = .text:0x8019E450; // type:function size:0x7C
fn_8019E4D0 = .text:0x8019E4D0; // type:function size:0x5C
fn_8019E530 = .text:0x8019E530; // type:function size:0x130
fn_8019E660 = .text:0x8019E660; // type:function size:0x8
fn_8019E670 = .text:0x8019E670; // type:function size:0x8
getUnderwaterDepth__9dCamera_cCFv = .text:0x8019E670; // type:function size:0x8
fn_8019E680 = .text:0x8019E680; // type:function size:0x1D8
fn_8019E860 = .text:0x8019E860; // type:function size:0x1C
fn_8019E880 = .text:0x8019E880; // type:function size:0x8
@@ -19806,34 +19806,34 @@ fn_80359C50 = .text:0x80359C50; // type:function size:0x1C
fn_80359C70 = .text:0x80359C70; // type:function size:0x8
fn_80359C80 = .text:0x80359C80; // type:function size:0xA0
__ct__9dSndMgr_cFv = .text:0x80359D20; // type:function size:0x9C
initialize__9dSndMgr_cFPQ23EGG4HeapUl = .text:0x80359DC0; // type:function size:0xEC
setup__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
holdSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUl = .text:0x8035A180; // type:function size:0x34
holdSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUi = .text:0x8035A1C0; // type:function size:0x34
holdSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandlePCc = .text:0x8035A200; // type:function size:0x70
prepareSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUl = .text:0x8035A270; // type:function size:0x34
prepareSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUi = .text:0x8035A2B0; // type:function size:0x34
prepareSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandlePCc = .text:0x8035A2F0; // type:function size:0x70
startSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUl = .text:0x8035A360; // type:function size:0x34
startSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUi = .text:0x8035A3A0; // type:function size:0x34
startSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandlePCc = .text:0x8035A3E0; // type:function size:0x70
setupMemoryArchive__Q23EGG9ArcPlayerFPCvPQ34nw4r3snd9SoundHeapl = .text:0x8035A450; // type:function size:0x10
__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
@248@loadGroup__Q23EGG14SimpleAudioMgrFPCcPQ34nw4r3snd9SoundHeapUl = .text:0x8035A500; // type:function size:0x8
@248@closeArchive__Q23EGG14SimpleAudioMgrFv = .text:0x8035A510; // 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
@248@__dt__9dSndMgr_cFv = .text:0x8035A550; // type:function size:0x8
stateProc__Q23EGG12SoundHeapMgrFv = .text:0x80359FB0; // type:function size:0xD4 scope:weak
loadState__Q23EGG12SoundHeapMgrFl = .text:0x8035A090; // type:function size:0x8C scope:weak
getCurrentLevel__Q23EGG12SoundHeapMgrFv = .text:0x8035A120; // type:function size:0x54 scope:weak
holdSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUl = .text:0x8035A180; // type:function size:0x34 scope:weak
holdSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUi = .text:0x8035A1C0; // type:function size:0x34 scope:weak
holdSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandlePCc = .text:0x8035A200; // type:function size:0x70 scope:weak
prepareSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUl = .text:0x8035A270; // type:function size:0x34 scope:weak
prepareSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUi = .text:0x8035A2B0; // type:function size:0x34 scope:weak
prepareSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandlePCc = .text:0x8035A2F0; // type:function size:0x70 scope:weak
startSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUl = .text:0x8035A360; // type:function size:0x34 scope:weak
startSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandleUi = .text:0x8035A3A0; // type:function size:0x34 scope:weak
startSound__Q23EGG9ArcPlayerFPQ34nw4r3snd11SoundHandlePCc = .text:0x8035A3E0; // type:function size:0x70 scope:weak
setupMemoryArchive__Q23EGG9ArcPlayerFPCvPQ34nw4r3snd9SoundHeapl = .text:0x8035A450; // type:function size:0x10 scope:weak
__dt__9dSndMgr_cFv = .text:0x8035A460; // type:function size:0x58 scope:weak
@248@calc__9dSndMgr_cFv = .text:0x8035A4C0; // type:function size:0x8 scope:weak
@248@loadGroup__Q23EGG14SimpleAudioMgrFUiPQ34nw4r3snd9SoundHeapUl = .text:0x8035A4D0; // type:function size:0x8 scope:weak
@248@loadGroup__Q23EGG14SimpleAudioMgrFiPQ34nw4r3snd9SoundHeapUl = .text:0x8035A4E0; // type:function size:0x8 scope:weak
@248@loadGroup__Q23EGG14SimpleAudioMgrFUlPQ34nw4r3snd9SoundHeapUl = .text:0x8035A4F0; // type:function size:0x8 scope:weak
@248@loadGroup__Q23EGG14SimpleAudioMgrFPCcPQ34nw4r3snd9SoundHeapUl = .text:0x8035A500; // type:function size:0x8 scope:weak
@248@closeArchive__Q23EGG14SimpleAudioMgrFv = .text:0x8035A510; // type:function size:0x8 scope:weak
@248@setupMemoryArchive__Q23EGG14SimpleAudioMgrFPCvPQ34nw4r3snd9SoundHeap = .text:0x8035A520; // type:function size:0x8 scope:weak
@248@openNandArchive__Q23EGG14SimpleAudioMgrFPCcPQ34nw4r3snd9SoundHeap = .text:0x8035A530; // type:function size:0x8 scope:weak
@248@openDvdArchive__Q23EGG14SimpleAudioMgrFPCcPQ34nw4r3snd9SoundHeap = .text:0x8035A540; // type:function size:0x8 scope:weak
@248@__dt__9dSndMgr_cFv = .text:0x8035A550; // type:function size:0x8 scope:weak
__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 scope:weak
@@ -19924,10 +19924,10 @@ __dt__33SndMgrDisposer<15dSndPlayerMgr_c>Fv = .text:0x8035DAA0; // type:function
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
setup__15dSndPlayerMgr_cFv = .text:0x8035DC00; // type:function size:0x44
initialize__15dSndPlayerMgr_cFv = .text:0x8035DC50; // type:function size:0x8C
createFileManager__15dSndPlayerMgr_cFv = .text:0x8035DCE0; // type:function size:0x38
fn_8035DD20 = .text:0x8035DD20; // type:function size:0x4
calcActive__15dSndPlayerMgr_cFv = .text:0x8035DD20; // type:function size:0x4
fn_8035DD30 = .text:0x8035DD30; // type:function size:0x10
setupState0__15dSndPlayerMgr_cFv = .text:0x8035DD40; // type:function size:0xC0
popToState0__15dSndPlayerMgr_cFv = .text:0x8035DE00; // type:function size:0x54
@@ -20071,7 +20071,7 @@ fn_803624F0 = .text:0x803624F0; // type:function size:0xF4
fn_803625F0 = .text:0x803625F0; // type:function size:0x140
fn_80362730 = .text:0x80362730; // type:function size:0x8
fn_80362740 = .text:0x80362740; // type:function size:0x59C
EnemySoundMgr__update = .text:0x80362CE0; // type:function size:0xFC
calc__14dSndStateMgr_cFv = .text:0x80362CE0; // type:function size:0xFC
EnemySoundMgr__enemyMusicRelated = .text:0x80362DE0; // type:function size:0x154
setEvent__14dSndStateMgr_cFPCc = .text:0x80362F40; // type:function size:0x770
initializeEventCallbacks__14dSndStateMgr_cFPCc = .text:0x803636B0; // type:function size:0xCC
@@ -20079,7 +20079,7 @@ convertSeLabelToSoundId__14dSndStateMgr_cFPCc = .text:0x80363780; // type:functi
fn_80363850 = .text:0x80363850; // type:function size:0xA8
fn_80363900 = .text:0x80363900; // type:function size:0xA8
doLabelSuffix__14dSndStateMgr_cFPCc = .text:0x803639B0; // type:function size:0xA8
fn_80363A60 = .text:0x80363A60; // type:function size:0x5C
getSeCameraId__14dSndStateMgr_cFv = .text:0x80363A60; // type:function size:0x5C
fn_80363AC0 = .text:0x80363AC0; // type:function size:0x60
fn_80363B20 = .text:0x80363B20; // type:function size:0x54
fn_80363B80 = .text:0x80363B80; // type:function size:0x5C
@@ -20119,15 +20119,15 @@ onMsgWaitStart__14dSndStateMgr_cFv = .text:0x80364EC0; // type:function size:0x9
onMsgWaitEnd__14dSndStateMgr_cFv = .text:0x80364F50; // type:function size:0x7C
setFlowEvent__14dSndStateMgr_cFUl = .text:0x80364FD0; // type:function size:0x50
onSkipEvent__14dSndStateMgr_cCFv = .text:0x80365020; // type:function size:0x84
fn_803650B0 = .text:0x803650B0; // type:function size:0x6C
onLinkDie__14dSndStateMgr_cFv = .text:0x803650B0; // type:function size:0x6C
getStageMusicDemoName = .text:0x80365120; // type:function size:0x28
getCurrentStageMusicDemoName__14dSndStateMgr_cCFv = .text:0x80365150; // type:function size:0x8
fn_80365160 = .text:0x80365160; // type:function size:0x24
fn_80365190 = .text:0x80365190; // type:function size:0x8
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
setStbEventName__14dSndStateMgr_cFPCc = .text:0x80365190; // type:function size:0x8
calcRoomId__14dSndStateMgr_cFv = .text:0x803651A0; // type:function size:0xA0
setRoomId__14dSndStateMgr_cFl = .text:0x80365240; // type:function size:0x1F8
calcTgSnd__14dSndStateMgr_cFv = .text:0x80365440; // type:function size:0x10C
calcFilters__14dSndStateMgr_cFv = .text:0x80365550; // type:function size:0x1A8
setFiltersIfUnderwater__14dSndStateMgr_cFv = .text:0x80365700; // type:function size:0xCC
setBgmLpfAndFxSendIfUnderwater__14dSndStateMgr_cFv = .text:0x803657D0; // type:function size:0x78
resetLpfAndFxSend__14dSndStateMgr_cFv = .text:0x80365850; // type:function size:0x70
@@ -20410,8 +20410,8 @@ __dt__30SndMgrDisposer<12dSndBgmMgr_c>Fv = .text:0x8036C730; // type:function si
create__30SndMgrDisposer<12dSndBgmMgr_c>Fv = .text:0x8036C7B0; // type:function size:0x48
remove__30SndMgrDisposer<12dSndBgmMgr_c>Fv = .text:0x8036C800; // type:function size:0x10
__ct__12dSndBgmMgr_cFv = .text:0x8036C810; // type:function size:0x204
fn_8036CA20 = .text:0x8036CA20; // type:function size:0xF0
fn_8036CB10 = .text:0x8036CB10; // type:function size:0x54
setup__12dSndBgmMgr_cFPQ23EGG4Heap = .text:0x8036CA20; // type:function size:0xF0
calc__12dSndBgmMgr_cFv = .text:0x8036CB10; // type:function size:0x54
calcLists__12dSndBgmMgr_cFv = .text:0x8036CB70; // type:function size:0x19C
fn_8036CD10 = .text:0x8036CD10; // type:function size:0x34
fn_8036CD50 = .text:0x8036CD50; // type:function size:0x88
@@ -20773,7 +20773,7 @@ remove__37SndMgrDisposer<19dSndBgmSeqDataMgr_c>Fv = .text:0x8037BB40; // type:fu
__ct__19dSndBgmSeqDataMgr_cFv = .text:0x8037BB50; // type:function size:0x6C
getDataPrefix__19dSndBgmSeqDataMgr_cFv = .text:0x8037BBC0; // type:function size:0x8
getDataPrefixLength__19dSndBgmSeqDataMgr_cFv = .text:0x8037BBD0; // type:function size:0x24
initialize__19dSndBgmSeqDataMgr_cFv = .text:0x8037BC00; // type:function size:0x4
setup__19dSndBgmSeqDataMgr_cFv = .text:0x8037BC00; // type:function size:0x4
setupState0__19dSndBgmSeqDataMgr_cFv = .text:0x8037BC10; // type:function size:0xC0
getHarpMgrForSoundId__19dSndBgmSeqDataMgr_cFUl = .text:0x8037BCD0; // type:function size:0x54
fn_8037BD30 = .text:0x8037BD30; // type:function size:0x4C
@@ -20879,19 +20879,19 @@ playBattleHitSound__20dSndSmallEffectMgr_cFQ220dSndSmallEffectMgr_c16BattleHitSo
getName__14dSoundSource_cCFv = .text:0x8037F820; // type:function size:0x8
getSourceType__14dSoundSource_cCFv = .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
fn_8037F990 = .text:0x8037F990; // type:function size:0x10
fn_8037F9A0 = .text:0x8037F9A0; // type:function size:0x144
__dt__35SndMgrDisposer<17dSndHarpSongMgr_c>Fv = .text:0x8037F8C0; // type:function size:0x78
create__35SndMgrDisposer<17dSndHarpSongMgr_c>Fv = .text:0x8037F940; // type:function size:0x48
remove__35SndMgrDisposer<17dSndHarpSongMgr_c>Fv = .text:0x8037F990; // type:function size:0x10
__ct__17dSndHarpSongMgr_cFv = .text:0x8037F9A0; // type:function size:0x144
fn_8037FAF0 = .text:0x8037FAF0; // type:function size:0x80
fn_8037FB70 = .text:0x8037FB70; // type:function size:0x58
fn_8037FBD0 = .text:0x8037FBD0; // type:function size:0x58
fn_8037FC30 = .text:0x8037FC30; // type:function size:0x4
setup__17dSndHarpSongMgr_cFv = .text:0x8037FC30; // type:function size:0x4
fn_8037FC40 = .text:0x8037FC40; // type:function size:0xA8
fn_8037FCF0 = .text:0x8037FCF0; // type:function size:0x6C
putHarpAway = .text:0x8037FD60; // type:function size:0x74
fn_8037FDE0 = .text:0x8037FDE0; // type:function size:0x58
fn_8037FE40 = .text:0x8037FE40; // type:function size:0x220
calc__17dSndHarpSongMgr_cFv = .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
@@ -20964,7 +20964,7 @@ __dt__33SndMgrDisposer<15dSndSourceMgr_c>Fv = .text:0x80383A30; // type:function
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
setup__15dSndSourceMgr_cFv = .text:0x80383C50; // type:function size:0x78
fn_80383CD0 = .text:0x80383CD0; // type:function size:0x4C
fn_80383D20 = .text:0x80383D20; // type:function size:0x44
fn_80383D70 = .text:0x80383D70; // type:function size:0x44
@@ -21447,7 +21447,7 @@ create__45SndMgrDisposer<27dSndDistantSoundActorPool_c>Fv = .text:0x80393530; //
remove__45SndMgrDisposer<27dSndDistantSoundActorPool_c>Fv = .text:0x80393580; // type:function size:0x10 scope:weak
__ct__27dSndDistantSoundActorPool_cFv = .text:0x80393590; // type:function size:0xA0
__dt__23dSndDistantSoundActor_cFv = .text:0x80393630; // type:function size:0x70 scope:weak
initialize__27dSndDistantSoundActorPool_cFv = .text:0x803936A0; // type:function size:0x7C
setup__27dSndDistantSoundActorPool_cFv = .text:0x803936A0; // type:function size:0x7C
calc__27dSndDistantSoundActorPool_cFv = .text:0x80393720; // type:function size:0xBC
acquireActor__27dSndDistantSoundActorPool_cFUlPCQ34nw4r4math4VEC3P14dSoundSource_c = .text:0x803937E0; // type:function size:0x158
addToActiveList__27dSndDistantSoundActorPool_cFP23dSndDistantSoundActor_cUl = .text:0x80393940; // type:function size:0x4C
@@ -21611,12 +21611,12 @@ fn_80399430 = .text:0x80399430; // type:function size:0x3C
fn_80399470 = .text:0x80399470; // type:function size:0x6C
fn_803994E0 = .text:0x803994E0; // type:function size:0x78
fn_80399560 = .text:0x80399560; // type:function size:0x14
fn_80399580 = .text:0x80399580; // type:function size:0x78
fn_80399600 = .text:0x80399600; // type:function size:0x48
fn_80399650 = .text:0x80399650; // type:function size:0x10
fn_80399660 = .text:0x80399660; // type:function size:0x44
fn_803996B0 = .text:0x803996B0; // type:function size:0x1EC
fn_803998A0 = .text:0x803998A0; // type:function size:0x4
__dt__34SndMgrDisposer<16dSndFiVocalMgr_c>Fv = .text:0x80399580; // type:function size:0x78
create__34SndMgrDisposer<16dSndFiVocalMgr_c>Fv = .text:0x80399600; // type:function size:0x48
remove__34SndMgrDisposer<16dSndFiVocalMgr_c>Fv = .text:0x80399650; // type:function size:0x10
__ct__16dSndFiVocalMgr_cFv = .text:0x80399660; // type:function size:0x44
fiSpeak__16dSndFiVocalMgr_cFPCcUsl = .text:0x803996B0; // type:function size:0x1EC
executeOutputText__16dSndFiVocalMgr_cFUsUs = .text:0x803998A0; // type:function size:0x4
fn_803998B0 = .text:0x803998B0; // type:function size:0x120
fn_803999D0 = .text:0x803999D0; // type:function size:0x6C
__ct__9dSndRng_cFv = .text:0x80399A40; // type:function size:0x50
@@ -37946,7 +37946,7 @@ __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
__vt__9dSndMgr_c = .data:0x805485D0; // type:object size:0xA8
__vt__9dSndMgr_c = .data:0x805485D0; // type:object size:0xA4
__vt__22SoundPropertiesChecker = .data:0x80548678; // type:object size:0xC scope:weak
__vt__11dSndActor_c = .data:0x80548684; // type:object size:0x1C scope:weak
__vt__23IsCurrentSoundIdChecker = .data:0x805486A0; // type:object size:0x10
@@ -38050,7 +38050,7 @@ lbl_80549198 = .data:0x80549198; // type:object size:0x10
__vt__22dSndBgmMmlParserHarp_c = .data:0x805491A8; // type:object size:0x10
__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
__vt__35SndMgrDisposer<17dSndHarpSongMgr_c> = .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
lbl_80549214 = .data:0x80549214; // type:object size:0x14 data:4byte
@@ -38120,7 +38120,7 @@ lbl_8054D730 = .data:0x8054D730; // type:object size:0x10
lbl_8054D740 = .data:0x8054D740; // type:object size:0x20
lbl_8054D760 = .data:0x8054D760; // type:object size:0xC
jumptable_8054D76C = .data:0x8054D76C; // type:object size:0x30 scope:local
lbl_8054D79C = .data:0x8054D79C; // type:object size:0xC
__vt__34SndMgrDisposer<16dSndFiVocalMgr_c> = .data:0x8054D79C; // type:object size:0xC
__vt__9dSndRng_c = .data:0x8054D7A8; // type:object size:0x10
__vt__12dSndRngMgr_c = .data:0x8054D7B8; // type:object size:0xC scope:weak
__vt__30SndMgrDisposer<12dSndRngMgr_c> = .data:0x8054D7C4; // type:object size:0xC scope:weak
@@ -42277,7 +42277,7 @@ 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
sInstance__9dSndMgr_c = .sbss:0x80575D30; // type:object size:0x8 data:4byte
sInstance__9dSndMgr_c = .sbss:0x80575D30; // type:object size:0x4 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
@@ -42301,8 +42301,8 @@ sInstance__19dSndBgmSeqDataMgr_c = .sbss:0x80575D90; // type:object size:0x4 dat
sDisposer__19dSndBgmSeqDataMgr_c = .sbss:0x80575D94; // 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
sInstance__17dSndHarpSongMgr_c = .sbss:0x80575DA0; // type:object size:0x4 data:4byte
sDisposer__17dSndHarpSongMgr_c = .sbss:0x80575DA4; // 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
sCtxParams = .sbss:0x80575DB0; // type:object size:0x8 scope:local data:4byte
@@ -42314,8 +42314,8 @@ sInstance__27dSndDistantSoundActorPool_c = .sbss:0x80575DD0; // type:object size
sDisposer__27dSndDistantSoundActorPool_c = .sbss:0x80575DD4; // type:object size:0x4 data:4byte
sInstance__17dSndSeSoundPool_c = .sbss:0x80575DD8; // type:object size:0x4 data:4byte
sDisposer__17dSndSeSoundPool_c = .sbss:0x80575DDC; // type:object size:0x4 data:4byte
lbl_80575DE0 = .sbss:0x80575DE0; // type:object size:0x4 data:4byte
lbl_80575DE4 = .sbss:0x80575DE4; // type:object size:0x4 data:4byte
sInstance__16dSndFiVocalMgr_c = .sbss:0x80575DE0; // type:object size:0x4 data:4byte
sDisposer__16dSndFiVocalMgr_c = .sbss:0x80575DE4; // type:object size:0x4 data:4byte
sInstance__12dSndRngMgr_c = .sbss:0x80575DE8; // type:object size:0x4 data:4byte
sDisposer__12dSndRngMgr_c = .sbss:0x80575DEC; // type:object size:0x4 data:4byte
kprProcDeadKeysFP = .sbss:0x80575DF0; // type:object size:0x4 data:4byte
+2 -2
View File
@@ -735,7 +735,7 @@ config.libs = [
"progress_category": "game",
"host": False,
"objects": [
Object(NonMatching, "d/snd/d_snd_mgr.cpp"),
Object(Matching, "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"),
@@ -766,7 +766,7 @@ config.libs = [
Object(Matching, "d/snd/d_snd_bgm_mml_parser_base.cpp"),
Object(NonMatching, "d/snd/d_snd_bgm_mml_parsers.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_harp_song_mgr.cpp"),
Object(Matching, "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"),
+1
View File
@@ -34,6 +34,7 @@ public:
}
bool isUnderwater() const;
f32 getUnderwaterDepth() const;
private:
/* 0x068 */ u8 _0x068[0x6C - 0x068];
+16
View File
@@ -29,6 +29,8 @@ public:
};
dSndBgmMgr_c();
void calc();
void setup(EGG::Heap *heap);
void restoreEffects();
@@ -102,6 +104,20 @@ public:
field_0x306 = val;
}
void setField_0x307(u8 val) {
field_0x307 = val;
}
u8 getField_0x308() const {
return field_0x308;
}
void updateField_0x2F4(f32 value) {
if (field_0x2F4 > value) {
field_0x2F4 = value;
}
}
private:
dSndBgmBattleSound_c *getBgmBattleSound();
+1 -1
View File
@@ -19,7 +19,7 @@ public:
static u32 getDataPrefixLength();
dSndBgmSoundHarpMgr_c *getHarpMgrForSoundId(u32 soundId);
void initialize();
void setup();
void setupState0();
private:
@@ -30,7 +30,7 @@ public:
return sParam;
}
void initialize();
void setup();
void calc();
void onChangeStage();
+22
View File
@@ -0,0 +1,22 @@
#ifndef D_SND_FI_VOCAL_MGR_H
#define D_SND_FI_VOCAL_MGR_H
#include "d/snd/d_snd_util.h"
#include "nw4r/snd/snd_SoundHandle.h"
SND_DISPOSER_FORWARD_DECL(dSndFiVocalMgr_c);
class dSndFiVocalMgr_c {
SND_DISPOSER_MEMBERS(dSndFiVocalMgr_c)
public:
dSndFiVocalMgr_c();
void fiSpeak(const char *, u16, s32);
void executeOutputText(u16, u16);
private:
/* 0x10 */ nw4r::snd::SoundHandle mHandle;
};
#endif
+20
View File
@@ -0,0 +1,20 @@
#ifndef D_SND_HARP_SONG_MGR_H
#define D_SND_HARP_SONG_MGR_H
#include "d/snd/d_snd_util.h"
SND_DISPOSER_FORWARD_DECL(dSndHarpSongMgr_c);
class dSndHarpSongMgr_c {
SND_DISPOSER_MEMBERS(dSndHarpSongMgr_c)
public:
dSndHarpSongMgr_c();
void setup();
void calc();
private:
};
#endif
+4 -3
View File
@@ -4,6 +4,7 @@
#include "common.h"
#include "egg/audio/eggAudioMgr.h"
#include "nw4r/snd/snd_SoundArchivePlayer.h"
#include "nw4r/snd/snd_global.h"
/** The core audio manager used for most sounds. */
class dSndMgr_c : public EGG::SimpleAudioMgr {
@@ -11,7 +12,7 @@ public:
dSndMgr_c();
virtual void calc() override;
void initialize(EGG::Heap *heap, u32 size);
void setup(EGG::Heap *heap, u32 size);
void initHbm(u32 frame);
static void restoreEffectsCallback();
@@ -46,8 +47,8 @@ public:
private:
static dSndMgr_c *sInstance;
/* 0x6C8 */ u8 _0x6C8[0x6CC - 0x6C8];
/* 0x6CC */ u8 field_0x6CC;
/* 0x6C8 */ nw4r::snd::OutputMode mOutputMode;
/* 0x6CC */ bool mIsInitialized;
};
#endif
+6
View File
@@ -29,8 +29,10 @@ public:
void setup(s32 channel);
void shutdown(s32 channel);
void setup();
void shutdown();
void calc();
void calcActive();
void enterMenu();
void leaveMenu();
@@ -100,6 +102,10 @@ public:
MGR_CAUTION = 0x80,
};
bool isInit() const {
return mState0 > 0;
}
bool checkFlag(u32 mask) const {
return mFlags & mask;
}
+1
View File
@@ -15,6 +15,7 @@ class dSndSourceMgr_c {
public:
dSndSourceMgr_c();
void setup();
static dSoundSourceIf_c *createSource(s32 sourceType, dAcBase_c *actor, const char *name, u8 subtype);
+30 -8
View File
@@ -52,7 +52,7 @@ public:
dSndStateMgr_c();
void setup(EGG::Heap *pHeap);
void onStageOrLayerUpdate();
void calc();
void restoreEffects();
static bool isInStage(const char *stageName);
@@ -69,8 +69,8 @@ public:
return field_0x044;
}
s32 getField_0x058() const {
return field_0x058;
s32 getLayer() const {
return mLayer;
}
u32 getFrameCounter() const {
@@ -87,11 +87,23 @@ public:
bool checkFlag0x18(u32 mask);
bool checkFlag0x258(u32 mask) const {
bool checkFlag0x258(u32 mask) {
return field_0x258 & mask;
}
bool checkFlag0x10(u32 mask) const {
void resetFlag0x258() {
field_0x258 = 0;
}
void onFlag0x258(u32 mask) {
field_0x258 |= mask;
}
void offFlag0x258(u32 mask) {
field_0x258 &= ~mask;
}
bool checkFlag0x10(u32 mask) {
return field_0x010 & mask;
}
@@ -122,6 +134,7 @@ public:
return getCurrentStageMusicDemoName() != nullptr;
}
void setStbEventName(const char *eventName);
void setEvent(const char *eventName);
// not sure, subtype is unused
bool isActiveDemoMaybe(s32 subtype) const;
@@ -135,8 +148,12 @@ public:
void onMsgWaitStart();
void onMsgWaitEnd();
void onLinkDie();
f32 getUserParamVolume(u32 userParam);
void onStageOrLayerUpdate();
// TODO better names
static const char *getStageName(s32 id);
const char *getStageName4(s32 id);
@@ -179,6 +196,11 @@ private:
bool handleStageEvent(const char *name);
void handleDemoEvent(const char *name);
void calcRoomId();
void setRoomId(s32 roomId);
void calcTgSnd();
void calcFilters();
u32 convertSeLabelToSoundId(const char *label);
u32 convertBgmLabelToSoundId(const char *label);
@@ -229,8 +251,8 @@ private:
/* 0x048 */ u8 _0x048[0x050 - 0x048];
/* 0x050 */ s32 mPreviousStageId;
/* 0x054 */ UNKWORD field_0x054;
/* 0x058 */ UNKWORD field_0x058;
/* 0x05C */ s32 mLayer;
/* 0x058 */ s32 mLayer;
/* 0x05C */ s32 mRoomId;
/* 0x060 */ UNKWORD field_0x060;
/* 0x064 */ u8 field_0x064;
/* 0x065 */ bool field_0x065;
@@ -250,7 +272,7 @@ private:
/* 0x094 */ u32 mEventFlags;
/* 0x098 */ SizedString<64> mEventName;
/* 0x0D8 */ SizedString<64> mPrevEventName;
/* 0x118 */ const char *field_0x118;
/* 0x118 */ const char *mpStbEventName;
/* 0x11C */ u32 mFrameCounter;
/* 0x120 */ u32 mCameraCutFrameCounter;
/* 0x124 */ u32 mMsgFrameCounter;
+3 -3
View File
@@ -26,7 +26,7 @@ public:
struct Arg {
Arg();
/* 0x00 */ EGG::Heap *heap;
/* 0x04 */ char *soundFileName;
/* 0x04 */ const char *soundFileName;
/* 0x08 */ int sndThreadPriority;
/* 0x0C */ int dvdThreadPriority;
/* 0x10 */ int sndThreadStackSize;
@@ -40,7 +40,7 @@ public:
field_0x04 = false;
}
virtual UNKTYPE initialize(Arg *) {}
virtual void initialize(Arg *) {}
virtual UNKTYPE calc() = 0;
bool field_0x04;
@@ -55,7 +55,7 @@ public:
SimpleAudioMgr();
virtual ~SimpleAudioMgr();
void initialize(EGG::IAudioMgr::Arg *) override;
virtual void initialize(EGG::IAudioMgr::Arg *) override;
virtual void calc() override;
virtual UNKTYPE *openDvdArchive(const char *, nw4r::snd::SoundHeap *) override; // at 0x10
+3
View File
@@ -72,6 +72,9 @@ namespace nw4r { namespace snd
detail::AxManager::GetInstance().PrepareReset();
}
static OutputMode GetOutputMode() {
return detail::AxManager::GetInstance().GetOutputMode();
}
static void SetOutputMode(OutputMode mode) {
detail::AxManager::GetInstance().SetOutputMode(mode);
-10
View File
@@ -1,10 +0,0 @@
#ifndef OTHER_SOUND_STUFF_H
#define OTHER_SOUND_STUFF_H
#include "common.h"
extern "C" void *lbl_80575DE0;
extern "C" void fn_803996B0(void *, const char *msgLabelName, u16, s32);
extern "C" void fn_803998A0(void *, u16, u16);
#endif
+2 -2
View File
@@ -9,8 +9,8 @@
#include "d/d_lyt_hio.h"
#include "d/lyt/d_textbox.h"
#include "d/lyt/msg_window/d_lyt_msg_window.h"
#include "d/snd/d_snd_fi_vocal_mgr.h"
#include "m/m_vec.h"
#include "toBeSorted/other_sound_stuff.h"
TextWindowUnk::TextWindowUnk(dTagProcessor_c *c) {
mpTagProcessor = c;
@@ -45,7 +45,7 @@ bool TextWindowUnk::fn_800B2130(const char *label, dTextBox_c *textBox, dLytMsgW
mpTextBox, mRawTextBuffer, mUnkBuffer, field_0x1458, &field_0x1478, mpCharacterData
);
if (mpTagProcessor->getMsgWindowSubtype() == dLytMsgWindow_c::MSG_WINDOW_SWORD_FI) {
fn_803996B0(lbl_80575DE0, field_0x1402, field_0x1478, mpTagProcessor->getField_0x824());
dSndFiVocalMgr_c::GetInstance()->fiSpeak(field_0x1402, field_0x1478, mpTagProcessor->getField_0x824());
}
}
+4 -2
View File
@@ -28,6 +28,7 @@
// clang-format on
#include "d/d_gfx.h"
#include "d/snd/d_snd_fi_vocal_mgr.h"
#include "d/snd/d_snd_player_mgr.h"
#include "d/snd/d_snd_small_effect_mgr.h"
#include "f/f_base.h"
@@ -38,7 +39,6 @@
#include "toBeSorted/d_d3d.h"
#include "toBeSorted/event_manager.h"
#include "toBeSorted/fi_context.h"
#include "toBeSorted/other_sound_stuff.h"
#include <cstring>
@@ -309,7 +309,9 @@ void dLytMsgWindow_c::executeState_OutputText() {
if (mpTagProcessor->getMsgWindowSubtype() >= MSG_WINDOW_SWORD_FI &&
mpTagProcessor->getMsgWindowSubtype() < MSG_WINDOW_SWORD_FI + 3) {
fn_803998A0(lbl_80575DE0, mpMsgWindowUnk->getField_0x147A(), mpMsgWindowUnk->getField_0x147C());
dSndFiVocalMgr_c::GetInstance()->executeOutputText(
mpMsgWindowUnk->getField_0x147A(), mpMsgWindowUnk->getField_0x147C()
);
} 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);
+1 -1
View File
@@ -23,7 +23,7 @@ u32 dSndBgmSeqDataMgr_c::getDataPrefixLength() {
return std::strlen(getDataPrefix());
}
void dSndBgmSeqDataMgr_c::initialize() {
void dSndBgmSeqDataMgr_c::setup() {
// no-op
}
+1 -1
View File
@@ -19,7 +19,7 @@ dSndDistantSoundActorPool_c::dSndDistantSoundActorPool_c() {
sParam.reset(INFINITY);
}
void dSndDistantSoundActorPool_c::initialize() {
void dSndDistantSoundActorPool_c::setup() {
field_0x4210 = 0;
for (int i = 0; i < POOL_SIZE; i++) {
mSounds[i].loadDefaultParam();
+7
View File
@@ -0,0 +1,7 @@
#include "d/snd/d_snd_fi_vocal_mgr.h"
#include "d/snd/d_snd_util.h"
SND_DISPOSER_DEFINE(dSndFiVocalMgr_c);
dSndFiVocalMgr_c::dSndFiVocalMgr_c() {}
+7
View File
@@ -0,0 +1,7 @@
#include "d/snd/d_snd_harp_song_mgr.h"
#include "d/snd/d_snd_util.h"
SND_DISPOSER_DEFINE(dSndHarpSongMgr_c);
dSndHarpSongMgr_c::dSndHarpSongMgr_c() {}
+48 -8
View File
@@ -1,11 +1,14 @@
#include "d/snd/d_snd_mgr.h"
#include "common.h"
#include "d/snd/d_snd_3d_manager.h"
#include "d/snd/d_snd_area_sound_effect_mgr.h"
#include "d/snd/d_snd_bgm_mgr.h"
#include "d/snd/d_snd_bgm_seq_data_mgr.h"
#include "d/snd/d_snd_control_player_mgr.h"
#include "d/snd/d_snd_distant_sound_actor_pool.h"
#include "d/snd/d_snd_fi_vocal_mgr.h"
#include "d/snd/d_snd_harp_song_mgr.h"
#include "d/snd/d_snd_player_mgr.h"
#include "d/snd/d_snd_rng_mgr.h"
#include "d/snd/d_snd_se_sound_pool.h"
@@ -14,13 +17,11 @@
#include "d/snd/d_snd_state_mgr.h"
#include "egg/audio/eggAudioRmtSpeakerMgr.h"
#include "egg/audio/eggAudioUtility.h"
extern "C" void fn_8037F940();
extern "C" void fn_80399600();
#include "nw4r/snd/snd_SoundSystem.h"
dSndMgr_c *dSndMgr_c::sInstance;
dSndMgr_c::dSndMgr_c() : field_0x6CC(0) {
dSndMgr_c::dSndMgr_c() : mIsInitialized(false) {
sInstance = this;
dSndPlayerMgr_c::create();
dSndControlPlayerMgr_c::create();
@@ -33,24 +34,63 @@ dSndMgr_c::dSndMgr_c() : field_0x6CC(0) {
dSndSourceMgr_c::create();
dSndDistantSoundActorPool_c::create();
dSndSeSoundPool_c::create();
fn_8037F940();
fn_80399600();
dSndHarpSongMgr_c::create();
dSndFiVocalMgr_c::create();
dSndRngMgr_c::create();
initHbm(9);
}
void dSndMgr_c::initialize(EGG::Heap *heap, u32 size) {}
void dSndMgr_c::setup(EGG::Heap *heap, u32 size) {
if (mIsInitialized) {
return;
}
SimpleAudioMgrArg arg;
arg.heap = heap;
arg.soundFileName = dSndPlayerMgr_c::GetInstance()->getSoundArchivePath();
// TODO - how is this calculated?
arg.field_0x1C = size + 0x1400;
arg.blocks = 2;
initialize(&arg);
mOutputMode = nw4r::snd::SoundSystem::GetOutputMode();
dSndPlayerMgr_c::GetInstance()->setup();
dSndStateMgr_c::GetInstance()->setup(heap);
dSndBgmMgr_c::GetInstance()->setup(heap);
dSndBgmSeqDataMgr_c::GetInstance()->setup();
dSndDistantSoundActorPool_c::GetInstance()->setup();
dSndHarpSongMgr_c::GetInstance()->setup();
dSndSourceMgr_c::GetInstance()->setup();
EGG::AudioRmtSpeakerMgr::setup(0, nullptr);
mIsInitialized = true;
}
void dSndMgr_c::initHbm(u32 frame) {
EGG::AudioUtility::HBM::init(this, restoreEffectsCallback, frame);
}
void dSndMgr_c::calc() {
if (field_0x6CC) {
if (mIsInitialized) {
EGG::SimpleAudioMgr::calc();
EGG::AudioRmtSpeakerMgr::calc();
dSndPlayerMgr_c::GetInstance()->calc();
if (dSndPlayerMgr_c::GetInstance()->isInit()) {
dSndSmallEffectMgr_c::GetInstance()->calcTimer();
if (!dSndPlayerMgr_c::GetInstance()->checkFlag(dSndPlayerMgr_c::MGR_HBM)) {
dSndControlPlayerMgr_c::GetInstance()->calc();
if (!dSndPlayerMgr_c::GetInstance()->checkFlag(dSndPlayerMgr_c::MGR_CAUTION)) {
dSndStateMgr_c::GetInstance()->calc();
dSndPlayerMgr_c::GetInstance()->calcActive();
dSnd3DManager_c::GetInstance()->calc();
dSndSmallEffectMgr_c::GetInstance()->calc();
dSndBgmMgr_c::GetInstance()->calc();
dSndAreaSoundEffectMgr_c::GetInstance()->calc();
dSndHarpSongMgr_c::GetInstance()->calc();
dSndSeSoundPool_c::GetInstance()->calc();
}
}
}
}
}
+1 -1
View File
@@ -17,7 +17,7 @@ void dSndSourceObj_c::postSetup() {
}
if ((isName("TDoor") || isName("Wind") || isName("Flag")) &&
dSndStateMgr_c::GetInstance()->getField_0x058() >= 13) {
dSndStateMgr_c::GetInstance()->getLayer() >= 13) {
setVolumeFade(0.0f, 0);
}
}
+101 -11
View File
@@ -1,6 +1,7 @@
#include "d/snd/d_snd_state_mgr.h"
#include "common.h"
#include "d/a/d_a_player.h"
#include "d/d_camera.h"
#include "d/d_sc_game.h"
#include "d/snd/d_snd_area_sound_effect_mgr.h"
@@ -10,9 +11,11 @@
#include "d/snd/d_snd_event.h"
#include "d/snd/d_snd_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 "d/snd/d_snd_stage_data.h"
#include "d/snd/d_snd_util.h"
#include "d/snd/d_snd_wzsound.h"
#include "egg/core/eggHeap.h"
#include "nw4r/snd/snd_FxReverbStdDpl2.h"
#include "nw4r/snd/snd_SeqSoundHandle.h"
@@ -34,8 +37,8 @@ dSndStateMgr_c::dSndStateMgr_c()
mStageId(0xAC),
mPreviousStageId(0xAC),
field_0x054(0),
field_0x058(0),
mLayer(-1),
mLayer(0),
mRoomId(-1),
field_0x060(0),
field_0x064(0),
field_0x065(false),
@@ -53,7 +56,7 @@ dSndStateMgr_c::dSndStateMgr_c()
mSoundEventId(SND_EVENT_0x89),
mCameraCutCounter(0),
mEventFlags(0),
field_0x118(nullptr),
mpStbEventName(nullptr),
mFrameCounter(0),
mCameraCutFrameCounter(0),
mMsgFrameCounter(0),
@@ -243,12 +246,12 @@ void dSndStateMgr_c::setEvent(const char *eventName) {
field_0x238 = -1;
if (streq(mEventName, "STB")) {
if (field_0x118 != nullptr) {
mEventName = field_0x118;
if (mpStbEventName != nullptr) {
mEventName = mpStbEventName;
}
onEventFlag(EVENT_DEMO);
} else {
field_0x118 = nullptr;
mpStbEventName = nullptr;
}
if (!checkFlag0x10(0x04)) {
@@ -273,13 +276,13 @@ void dSndStateMgr_c::setEvent(const char *eventName) {
s32 i3 = 0;
SizedString<64> eventLabel;
if (mSoundEventId == SND_EVENT_JMAP) {
s32 roomId = EventManager::getCurrentEventRoomId();
s32 eventRoomId = EventManager::getCurrentEventRoomId();
// UB: Cannot pass object of non-POD type 'SizedString<32>' through variadic method
eventLabel.sprintf("%s_R%d_JMAP_%d", mStageName, mLayer, roomId);
eventLabel.sprintf("%s_R%d_JMAP_%d", mStageName, mRoomId, eventRoomId);
} else if (mSoundEventId == SND_EVENT_JMAPAllMove) {
s32 roomId = EventManager::getCurrentEventRoomId();
s32 eventRoomId = EventManager::getCurrentEventRoomId();
// UB: Cannot pass object of non-POD type 'SizedString<32>' through variadic method
eventLabel.sprintf("%s_R%d_JMAPAllMove_%d", mStageName, mLayer, roomId);
eventLabel.sprintf("%s_R%d_JMAPAllMove_%d", mStageName, mRoomId, eventRoomId);
} else {
eventLabel.sprintf("%s", &mEventName);
}
@@ -418,7 +421,8 @@ bool dSndStateMgr_c::finalizeEvent(bool skipped) {
SoundStopperIfParamFlag20 stopper;
p->ForEachSound(stopper, false);
}
// TODO ...
// ...
return false;
}
@@ -490,6 +494,92 @@ void dSndStateMgr_c::onMsgWaitEnd() {
doLabelSuffix(label);
}
void dSndStateMgr_c::onLinkDie() {
if (!checkFlag0x10(0x8)) {
onFlag0x10(0x8);
dSndBgmMgr_c::GetInstance()->stopAllBgm(15);
dSndSmallEffectMgr_c::GetInstance()->stopAllSoundExceptEffectOrLink(15);
if (field_0x065 == 0) {
dSndBgmMgr_c::GetInstance()->prepareFanSound(FAN_GAMEOVER);
}
}
}
void dSndStateMgr_c::setStbEventName(const char *eventName) {
mpStbEventName = eventName;
}
void dSndStateMgr_c::calcRoomId() {
if (checkFlag0x10(4)) {
if (field_0x060 > 0) {
field_0x060--;
} else {
if (mRoomId == -1) {
field_0x060 = 30;
}
s32 newRoom = dSndSourceMgr_c::GetInstance()->getPlayerSourceRoomId();
if (mRoomId != newRoom) {
setRoomId(newRoom);
} else if (newRoom != -1 && !checkFlag0x10(0x10)) {
setRoomId(newRoom);
}
}
}
}
void dSndStateMgr_c::setRoomId(s32 roomId) {
// ...
}
void dSndStateMgr_c::calcTgSnd() {
// ...
}
void dSndStateMgr_c::calcFilters() {
dCamera_c *cam = dScGame_c::getCamera(0);
if (cam != nullptr && !checkFlag0x258(0x2)) {
if (cam->isUnderwater()) {
if (!checkFlag0x258(0x1)) {
resetFlag0x258();
onFlag0x258(1);
setFiltersIfUnderwater();
}
f32 depth = cam->getUnderwaterDepth();
dSndAreaSoundEffectMgr_c::GetInstance()->holdInWaterLvSound(depth);
f32 maxDepth = isInStage("F103") ? 5000.0f : 1000.0f;
f32 unk = isInStage("F103") ? 0.5f : 0.3f;
if (depth < maxDepth) {
f32 tmp = (1.0f - unk);
f32 tmp2 = (depth / maxDepth);
unk = 1.0f - tmp2 * tmp;
}
dSndBgmMgr_c::GetInstance()->updateField_0x2F4(unk);
} else {
if (checkFlag0x258(0x1)) {
offFlag0x258(1);
resetLpfAndFxSend();
}
if (dAcPy_c::GetLink()->checkActionFlagsCont(0x400000)) {
if (!checkFlag0x258(0x4)) {
resetFlag0x258();
onFlag0x258(0x4);
setBgmAndStageEffectLpf();
dSndBgmMgr_c::GetInstance()->setField_0x307(0);
}
} else {
if (checkFlag0x258(0x4)) {
offFlag0x258(0x4);
resetBgmAndStageEffectLpf();
if (dSndBgmMgr_c::GetInstance()->getField_0x308() != 0) {
dSndBgmMgr_c::GetInstance()->setField_0x307(1);
}
}
}
}
}
}
void dSndStateMgr_c::setFiltersIfUnderwater() {
dCamera_c *cam = dScGame_c::getCamera(0);
if (cam == nullptr || cam->isUnderwater()) {