diff options
| author | robojumper <robojumper@gmail.com> | 2025-07-06 00:02:11 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-09-13 10:59:40 +0200 |
| commit | 4003e257ace9f20bf605b3c4530f69a6f7ffa225 (patch) | |
| tree | c06df920806a02bd5dc02c72931b8d414cc6f851 /include/d/snd | |
| parent | 413e170796ffbdf17f4da85d6b001f017d86db50 (diff) | |
More funcs
Diffstat (limited to 'include/d/snd')
| -rw-r--r-- | include/d/snd/d_snd_bgm_mgr.h | 2 | ||||
| -rw-r--r-- | include/d/snd/d_snd_player_mgr.h | 9 | ||||
| -rw-r--r-- | include/d/snd/d_snd_source_group.h | 20 | ||||
| -rw-r--r-- | include/d/snd/d_snd_source_mgr.h | 1 |
4 files changed, 25 insertions, 7 deletions
diff --git a/include/d/snd/d_snd_bgm_mgr.h b/include/d/snd/d_snd_bgm_mgr.h index 71af46ca..ea5436fc 100644 --- a/include/d/snd/d_snd_bgm_mgr.h +++ b/include/d/snd/d_snd_bgm_mgr.h @@ -60,6 +60,8 @@ public: dSndBgmSound_c *getBgmSoundByIndex(u32 idx); + bool prepareBossBgm(const char *name); + /** * E.g. Lizalfos fight in ET. Note that in the ET case, this is only called when triggering * the fight without a cutscene, the cutscene code runs through "ELizarufos_c_opening" diff --git a/include/d/snd/d_snd_player_mgr.h b/include/d/snd/d_snd_player_mgr.h index d25f9e95..94aa310c 100644 --- a/include/d/snd/d_snd_player_mgr.h +++ b/include/d/snd/d_snd_player_mgr.h @@ -2,6 +2,7 @@ #define D_SND_PLAYER_MGR_H #include "d/snd/d_snd_mgr.h" +#include "d/snd/d_snd_types.h" #include "d/snd/d_snd_util.h" #include "nw4r/snd/snd_MemorySoundArchive.h" #include "nw4r/snd/snd_SoundArchivePlayer.h" @@ -65,6 +66,14 @@ public: void saveState2(); void popToState2(); + bool loadGroup(u32 groupId); + bool loadFileForSound(u32 soundId); + bool isLoadedFileForSound(u32 soundId); + bool isLoadedFileForBank(u32 bankId); + bool isLoadedBnkSeForGroup(dSndSourceGroup_c *group); + bool isLoadedFileAndWaveForSound(u32 soundId); + bool isLoadedSeFileAndWaveForGroup(dSndSourceGroup_c *group); + u32 getFreeSize(); bool loadDemoArchive(const char *demoArchiveName); const char *getSoundArchivePath(); diff --git a/include/d/snd/d_snd_source_group.h b/include/d/snd/d_snd_source_group.h index aebd402c..4151770b 100644 --- a/include/d/snd/d_snd_source_group.h +++ b/include/d/snd/d_snd_source_group.h @@ -4,6 +4,7 @@ #include "common.h" #include "d/snd/d_snd_misc.h" #include "d/snd/d_snd_types.h" +#include "d/snd/d_snd_util.h" #include "nw4r/ut/ut_list.h" #include "sized_string.h" @@ -20,9 +21,12 @@ class dSndSourceGroup_c { public: dSndSourceGroup_c(); - dSndSourceGroup_c(s32 sourceType, const char *, u32, s32 mSubtype); + dSndSourceGroup_c(s32 sourceType, const char *name, const char *origName, s32 subtype); ~dSndSourceGroup_c(); + void set(s32 sourceType, const char *name, const char *origName, s32 subtype); + void setTemp(s32 sourceType, const char *name, s32 subtype); + void registerSource(dSoundSource_c *); void unregisterSource(dSoundSource_c *); @@ -34,8 +38,10 @@ public: dSoundSource_c *getSourceClosestToPlayer(); s32 getNumSources() const; - void set(s32 type, const char *name); + void setParam(s32 type, const char *name); void calc(); + void clear(); + void clearTemp(); const char *getName() const { return mName; @@ -45,8 +51,8 @@ public: return mpOrigName; } - s32 getField_0x10() const { - return field_0x10; + s32 getSourceType() const { + return mSourceType; } bool isActive() const { @@ -64,14 +70,14 @@ private: /* 0x00 */ nw4r::ut::Node mNode1; /* 0x08 */ nw4r::ut::Node mNode2; - /* 0x10 */ s32 field_0x10; + /* 0x10 */ s32 mSourceType; /* 0x14 */ s32 mSourceCategory; /* 0x18 */ s32 mSubtype; /* 0x1C */ bool mIsActive; - /* 0x1D */ u8 field_0x1D; + /* 0x1D */ bool field_0x1D; /* 0x1E */ SizedString<32> mName; /* 0x40 */ const char *mpOrigName; - /* 0x44 */ nw4r::ut::List mSourceList; + /* 0x44 */ LIST_MEMBER(dSoundSource_c, SubSource); /* 0x50 */ dSndSourceParam mParam; /* 0x64 */ dSoundSource_c *mpCachedClosestSourceToListener; /* 0x68 */ dSoundSource_c *mpCachedClosestSourceToPlayer; diff --git a/include/d/snd/d_snd_source_mgr.h b/include/d/snd/d_snd_source_mgr.h index 41503455..6bcbefad 100644 --- a/include/d/snd/d_snd_source_mgr.h +++ b/include/d/snd/d_snd_source_mgr.h @@ -78,6 +78,7 @@ private: dSndSourceGroup_c *getGroup(s32 sourceType, dAcBase_c *actor, const char *name, const char *origName, u8 subtype); bool fn_803846D0(s32 sourceType, const char *name, u8 subtype); + bool addGroupToLoading(dSndSourceGroup_c *group); void activateGroup(dSndSourceGroup_c *group); bool isActiveGroup(dSndSourceGroup_c *group) const; |
