d_snd_id_mappers OK

This commit is contained in:
robojumper
2025-07-05 12:27:21 +02:00
parent 35b3d2a787
commit 794c7e35b6
13 changed files with 373 additions and 28 deletions
+1
View File
@@ -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);
+5
View File
@@ -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
+16
View File
@@ -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
+4
View File
@@ -196,6 +196,10 @@ public:
return mIsRunning || mIsPreparing || IsAttachedSound();
}
bool isPaused() const {
return mPauseFlag;
}
protected:
bool isRunning() const {
return mIsRunning && IsAttachedSound();
+10 -2
View File
@@ -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;