diff options
| author | robojumper <robojumper@gmail.com> | 2025-07-05 12:27:21 +0200 |
|---|---|---|
| committer | robojumper <robojumper@gmail.com> | 2025-09-13 10:59:40 +0200 |
| commit | 794c7e35b6e4e89b2779916b8d67420532d65b7d (patch) | |
| tree | 91f4db906d47b6e5a33dce3e52a928ed10ef38d7 /include | |
| parent | 35b3d2a787d05b152d14c71f20baa444493cb3c4 (diff) | |
d_snd_id_mappers OK
Diffstat (limited to 'include')
| -rw-r--r-- | include/d/snd/d_snd_bgm_mgr.h | 1 | ||||
| -rw-r--r-- | include/d/snd/d_snd_id_mappers.h | 5 | ||||
| -rw-r--r-- | include/d/snd/d_snd_id_mappers_data.h | 16 | ||||
| -rw-r--r-- | include/d/snd/d_snd_sound.h | 4 | ||||
| -rw-r--r-- | include/d/snd/d_snd_source_group.h | 12 |
5 files changed, 36 insertions, 2 deletions
diff --git a/include/d/snd/d_snd_bgm_mgr.h b/include/d/snd/d_snd_bgm_mgr.h index 4b5d01f8..71af46ca 100644 --- a/include/d/snd/d_snd_bgm_mgr.h +++ b/include/d/snd/d_snd_bgm_mgr.h @@ -87,6 +87,7 @@ private: bool stopBgmHandleIdx(u32 handleIdx, s32 fadeFrames); void calcLists(); + void calcStopOldBgmSounds(); void addToBgmSoundList(BgmSoundList_e list, dSndBgmSound_c *sound); void appendToBgmSoundList(BgmSoundList_e list, dSndBgmSound_c *sound); diff --git a/include/d/snd/d_snd_id_mappers.h b/include/d/snd/d_snd_id_mappers.h index 695d7af4..69f482da 100644 --- a/include/d/snd/d_snd_id_mappers.h +++ b/include/d/snd/d_snd_id_mappers.h @@ -2,6 +2,11 @@ #define D_SND_ID_MAPPERS_H #include "common.h" +#include "d/snd/d_snd_types.h" + +u32 getGrpId(dSndSourceGroup_c *pGroup); +u32 getBnkSeId(dSndSourceGroup_c *pGroup); +u32 getSeId(dSndSourceGroup_c *pGroup); // TODO move somewhere else, or maybe remove entirely // could plausibly belong in d/col/bg diff --git a/include/d/snd/d_snd_id_mappers_data.h b/include/d/snd/d_snd_id_mappers_data.h new file mode 100644 index 00000000..047cd1be --- /dev/null +++ b/include/d/snd/d_snd_id_mappers_data.h @@ -0,0 +1,16 @@ +#ifndef D_SND_ID_MAPPERS_DATA_H +#define D_SND_ID_MAPPERS_DATA_H + +#include "common.h" + +struct ActorBaseNamePair { + const char *variant; + const char *base; +}; + +extern const ActorBaseNamePair sActorBaseNamePairs[]; +extern const s32 sNumActorBaseNamePairs; + +extern const char *sSndHitEffects[]; + +#endif diff --git a/include/d/snd/d_snd_sound.h b/include/d/snd/d_snd_sound.h index f83e0ed8..5ef8cc5f 100644 --- a/include/d/snd/d_snd_sound.h +++ b/include/d/snd/d_snd_sound.h @@ -196,6 +196,10 @@ public: return mIsRunning || mIsPreparing || IsAttachedSound(); } + bool isPaused() const { + return mPauseFlag; + } + protected: bool isRunning() const { return mIsRunning && IsAttachedSound(); diff --git a/include/d/snd/d_snd_source_group.h b/include/d/snd/d_snd_source_group.h index 421646c5..aebd402c 100644 --- a/include/d/snd/d_snd_source_group.h +++ b/include/d/snd/d_snd_source_group.h @@ -41,6 +41,14 @@ public: return mName; } + const char *getOrigName() const { + return mpOrigName; + } + + s32 getField_0x10() const { + return field_0x10; + } + bool isActive() const { return mIsActive; } @@ -56,13 +64,13 @@ private: /* 0x00 */ nw4r::ut::Node mNode1; /* 0x08 */ nw4r::ut::Node mNode2; - /* 0x10 */ UNKWORD field_0x10; + /* 0x10 */ s32 field_0x10; /* 0x14 */ s32 mSourceCategory; /* 0x18 */ s32 mSubtype; /* 0x1C */ bool mIsActive; /* 0x1D */ u8 field_0x1D; /* 0x1E */ SizedString<32> mName; - /* 0x40 */ UNKWORD field_0x40; + /* 0x40 */ const char *mpOrigName; /* 0x44 */ nw4r::ut::List mSourceList; /* 0x50 */ dSndSourceParam mParam; /* 0x64 */ dSoundSource_c *mpCachedClosestSourceToListener; |
