diff options
| author | robojumper <robojumper@gmail.com> | 2025-07-04 22:45:02 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-09-13 10:59:39 +0200 |
| commit | 35b3d2a787d05b152d14c71f20baa444493cb3c4 (patch) | |
| tree | 11d0696902de3a9d74857ec3bff8e79206c29dee /include/d | |
| parent | a8690716e6079a878f1c208bf167aaf2f651fc67 (diff) | |
A few funcs
Diffstat (limited to 'include/d')
| -rw-r--r-- | include/d/snd/d_snd_control_player_mgr.h | 4 | ||||
| -rw-r--r-- | include/d/snd/d_snd_player_mgr.h | 16 | ||||
| -rw-r--r-- | include/d/snd/d_snd_state_mgr.h | 23 |
3 files changed, 40 insertions, 3 deletions
diff --git a/include/d/snd/d_snd_control_player_mgr.h b/include/d/snd/d_snd_control_player_mgr.h index bf28f647..e5cfed54 100644 --- a/include/d/snd/d_snd_control_player_mgr.h +++ b/include/d/snd/d_snd_control_player_mgr.h @@ -45,6 +45,9 @@ public: void muteAllWorldSounds(s32 fadeFrames); void unmuteAllWorldSounds(s32 fadeFrames); + void muteScenePlayers(s32 frames); + void unmuteScenePlayers(s32 frames); + enum MuteLevel { MUTE_FULL = 0, MUTE_PARTIAL = 1, @@ -75,6 +78,7 @@ public: void setPlayerVolumeInternal(u32 playerIdx, f32 volume); private: + void unmutePlayer(u32 playerIdx, s32 frames); void resetControls(); void calcVolumes(); void calcMuteFlags(); diff --git a/include/d/snd/d_snd_player_mgr.h b/include/d/snd/d_snd_player_mgr.h index f5c9a9ee..d25f9e95 100644 --- a/include/d/snd/d_snd_player_mgr.h +++ b/include/d/snd/d_snd_player_mgr.h @@ -58,6 +58,13 @@ public: void enterMsgWait(); void leaveMsgWait(); + void setupState0(); + void popToState0(); + void saveState1(); + void popToState1(); + void saveState2(); + void popToState2(); + u32 getFreeSize(); bool loadDemoArchive(const char *demoArchiveName); const char *getSoundArchivePath(); @@ -180,15 +187,18 @@ public: private: /* 0x010 */ u8 field_0x010; /* 0x011 */ u8 field_0x011; - /* 0x014 */ s32 field_0x014; - /* 0x018 */ s32 field_0x018; - /* 0x01C */ s32 field_0x01C; + /* 0x014 */ s32 mState0; + /* 0x018 */ s32 mState1; + /* 0x01C */ s32 mState2; /* 0x020 */ u32 mFlags; // system menu, inventory, map void enterPauseState(); void leavePauseState(); + void initialize(); + void createFileManager(); + virtual nw4r::snd::SoundStartable::StartResult startSound(nw4r::snd::SoundHandle *pHandle, u32 soundId, const nw4r::snd::SoundStartable::StartInfo *pStartInfo); virtual nw4r::snd::SoundStartable::StartResult startSound( diff --git a/include/d/snd/d_snd_state_mgr.h b/include/d/snd/d_snd_state_mgr.h index 36bff333..9479620e 100644 --- a/include/d/snd/d_snd_state_mgr.h +++ b/include/d/snd/d_snd_state_mgr.h @@ -110,6 +110,29 @@ public: void doMsgWaitStart(); void doMsgWaitEnd(); + // TODO better names + static const char *getStageName(s32 id); + const char *getStageName4(s32 id); + const char *getCurrentStageName4(); + + static s32 getSndStageId(const char *stageName, s32 layer); + static s32 getSndStageId3(const char *stageName, s32 layer); + static s32 getSndStageId4(const char *stageName, s32 layer); + + static s32 getSndStageId2(s32 id); + static s32 getSndStageId4(s32 id); + + static s32 getNextSndStageId(s32 id); + static bool specialLayerVersionExists(const char *stageName, s32 layer); + + enum SoundIdLookup_e { + LOOKUP_BGM, + LOOKUP_BGM_MAIN, + LOOKUP_SE_A, + }; + + u32 getSoundIdForStageAndLayer(SoundIdLookup_e lookup, const char *stageName, s32 layer, s32 stageId); + private: void resetOverrides(); void initializeEventCallbacks(const char *name); |
