More structure

This commit is contained in:
robojumper
2025-06-04 10:27:56 +02:00
parent 4e75ae59f5
commit 87cbf6f409
6 changed files with 160 additions and 35 deletions
+3 -3
View File
@@ -13,12 +13,12 @@ public:
virtual void apply() = 0; // vt 0x1C
virtual f32 getAppliedValue() = 0; // vt 0x20
void setIndex1(s32 idx);
void setIndex2(s32 idx);
void setIndex1(u32 idx);
void setIndex2(u32 idx);
protected:
/* 0x30 */ nw4r::snd::SoundPlayer *mpPlayer;
/* 0x34 */ s32 mIndex;
/* 0x34 */ u32 mIndex;
};
class dSndControlPlayerVolumeBase_c : public dSndControlPlayer_c {
+44 -10
View File
@@ -6,6 +6,32 @@
#include "nw4r/snd/snd_SoundPlayer.h"
#include "nw4r/ut/ut_list.h"
/*
Num players: 0x15 = 21
Notes on player groups:
0, 1
9, 10, 11
12, 13, 14, 16, 17
17, 18, 19, 20
0: BGM
3: UI Sfx, confirmation, pointer reset
4: UI SFX, get fruit
5, 7: Player walk
8: Player Equipment
12: bomb explode, refresh fruit sprout
13: environmental sound effects (wind), bomb fuse
14: enemies/bugs
17: TgSound
*/
class dSndControlPlayerMgr_c;
extern template class SndMgrDisposer<dSndControlPlayerMgr_c>;
@@ -40,29 +66,37 @@ public:
static const s32 sNumPlayers;
nw4r::snd::SoundPlayer *getPlayer1(s32);
nw4r::snd::SoundPlayer *getPlayer2(s32);
nw4r::snd::SoundPlayer *getPlayer1(u32) const;
nw4r::snd::SoundPlayer *getPlayer2(u32) const;
void setVolume(u32 playerIdx, f32 value, s32 frames);
void setLpfFreq(u32 playerIdx, f32 value, s32 frames);
void setFxSend(u32 playerIdx, f32 value, s32 frames);
void overrideVolume(u32 playerIdx, f32 volume, s32 frames);
void restoreVolume(u32 playerIdx, s32 frames);
void setShortParameterTo5(s32 idx1, s32 idx2);
private:
void resetControls();
void calcVolumes();
void executeControls();
void linkCtrl(dSndControlPlayer_c *);
void unlinkCtrl(dSndControlPlayer_c *);
void setControlValue(PlayerCtrl_e ctrlType, u32 playerIdx, f32 value, s32 frames);
f32 getTargetValue(PlayerCtrl_e ctrlType, u32 playerIdx) const;
f32 getAppliedPlayerVolume(u32 playerIdx) const;
f32 getControlVolumeTarget(PlayerCtrl_e ctrlType, u32 playerIdx) const;
/* 0x10 */ dSndControlPlayer_c *mpCtrls[CTRL_MAX];
/* 0x1C */ void *field_0x1C;
/* 0x20 */ void *field_0x20;
/* 0x24 */ void *field_0x24;
/* 0x28 */ f32 *field_0x28;
/* 0x2C */ u32 mControlMask;
/* 0x1C */ f32 *mpTargetVolumes;
/* 0x20 */ f32 *mpMaxVolumeDecreases;
/* 0x24 */ f32 *mpMaxVolumeIncreases;
/* 0x28 */ f32 *mpSavedVolumes;
/* 0x2C */ u32 mOverrideVolumeMask;
/* 0x30 */ nw4r::ut::List mActiveControls;
/* 0x3C */ s16 field_0x3C[8];
/* 0x3C */ s16 field_0x3C[4][2];
};
#endif