A few more funcs

This commit is contained in:
robojumper
2025-06-28 15:07:05 +02:00
parent ba0f29f410
commit c5a36f88b7
12 changed files with 201 additions and 36 deletions
+1 -2
View File
@@ -64,14 +64,13 @@ public:
void setBgmVolumeDecreaseSpeed(f32 speed);
void setStageEffectsVolume(f32 volume, s32 fadeFrames);
private:
void setBgmMuteVolume(f32 volume);
void setStageEffectsMuteVolume(f32 volume);
void setEnemyMuteVolume(f32 volume);
void setObjectMuteVolume(f32 volume);
void setPlayerVolumeInternal(u32 playerIdx, f32 volume);
private:
void resetControls();
void calcVolumes();
void calcMuteFlags();
+2 -1
View File
@@ -72,9 +72,10 @@ public:
void setButtonPressSound(dSoundSource_c *source);
bool playBattleHitSound(BattleHitSound_e type, dSoundSource_c *source);
bool playSoundInternalChecked(u32 soundId, nw4r::snd::SoundHandle *handle);
private:
bool playSoundInternal(u32 soundId, nw4r::snd::SoundHandle *handle);
bool playSoundInternalChecked(u32 soundId, nw4r::snd::SoundHandle *handle);
bool playSoundInternal(u32 soundId);
void stopSounds(u32 playerIdx, u32 soundId, s32 fadeFrames);
void stopSounds(u32 soundId, s32 fadeFrames);
+4
View File
@@ -21,9 +21,12 @@ enum SoundSourceType_e {
SND_SOURCE_ENEMY_10 = 10,
SND_SOURCE_MAGUPPO = 12,
SND_SOURCE_LIZARUFOS = 13,
SND_SOURCE_ENEMY_14 = 14,
SND_SOURCE_BC_Z = 16,
SND_SOURCE_SPARK = 17,
SND_SOURCE_BIGBOSS = 20,
SND_SOURCE_BOSS_MG = 21,
SND_SOURCE_BOSS_KR = 22,
SND_SOURCE_BOSS_NUSI = 23,
SND_SOURCE_GIRAHUMU_3 = 24,
SND_SOURCE_ENEMY_28 = 28,
@@ -49,6 +52,7 @@ enum SoundSourceType_e {
SND_SOURCE_KENSEI = 44,
SND_SOURCE_PLAYER_BIRD = 45,
SND_SOURCE_NPC_NUSI = 46,
SND_SOURCE_NPC_47 = 47,
SND_SOURCE_NPC_HEAD = 48,
SND_SOURCE_INSECT = 49,
SND_SOURCE_NPC_50 = 50,
+9 -1
View File
@@ -41,6 +41,14 @@ public:
return mName;
}
bool isActive() const {
return mIsActive;
}
void setIsActive(bool active) {
mIsActive = active;
}
private:
bool setParamFromName(const char *name);
void resetSoundSourceParam();
@@ -51,7 +59,7 @@ private:
/* 0x10 */ UNKWORD field_0x10;
/* 0x14 */ s32 mSourceCategory;
/* 0x18 */ s32 mSubtype;
/* 0x1C */ u8 field_0x1C;
/* 0x1C */ bool mIsActive;
/* 0x1D */ u8 field_0x1D;
/* 0x1E */ SizedString<32> mName;
/* 0x40 */ UNKWORD field_0x40;
+13 -6
View File
@@ -58,6 +58,8 @@ public:
}
private:
void calcEnemyObjVolume();
static bool isCertainEnemyType(dSoundSource_c *source);
static bool isAnimSoundSource(s32 sourceType, const char *name);
static bool isMultiSoundSource(s32 sourceType, const char *name);
@@ -66,24 +68,29 @@ private:
void clearSourceLists();
void clearSourceList(nw4r::ut::List *list);
dSndSourceGroup_c *getActiveGroupForName(const char *name);
dSndSourceGroup_c *getInactiveGroup();
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);
void activateGroup(dSndSourceGroup_c *group);
bool isActiveGroup(dSndSourceGroup_c *group) const;
/* 0x0010 */ u8 field_0x0010;
/* 0x0011 */ u8 field_0x0011;
/* 0x0012 */ u8 field_0x0012;
/* 0x0013 */ u8 field_0x0013;
/* 0x0014 */ dSndSourceGroup_c *mpDefaultGroup;
/* 0x0018 */ nw4r::ut::List mGroupList1;
/* 0x0024 */ nw4r::ut::List mGroupList2;
/* 0x0030 */ nw4r::ut::List mGroupList3;
/* 0x0018 */ LIST_MEMBER(dSndSourceGroup_c, Group1);
/* 0x0024 */ LIST_MEMBER(dSndSourceGroup_c, Group2);
/* 0x0030 */ LIST_MEMBER(dSndSourceGroup_c, Group3);
/* 0x003C */ dSndSourceGroup_c mGroups[NUM_GROUPS];
// Not sure what these are for
/* 0x383C */ nw4r::ut::List mAllSources; // node offset 0xE8, -> dSoundSource::mMgrLink
/* 0x3848 */ nw4r::ut::List field_0x3848; // node offset 0x15C, -> dSndSourceEnemy_c::mMgrEnemyLink
/* 0x3854 */ nw4r::ut::List field_0x3854; // node offset 0x160
/* 0x383C */ LIST_MEMBER(dSoundSource_c, AllSources); // node offset 0xE8, -> dSoundSource_c::mMgrLink
/* 0x3848 */ nw4r::ut::List field_0x3848; // node offset 0x15C, -> dSndSourceEnemy_c::mMgrEnemyLink
/* 0x3854 */ LIST_MEMBER(dSndSourceHarpRelated_c, HarpRelated); // node offset 0x160, -> dSndSourceHarpRelated_c
/* 0x3860 */ UNKWORD field_0x3860;
/* 0x3864 */ UNKWORD field_0x3864;
+4
View File
@@ -77,6 +77,10 @@ public:
field_0x010 &= ~mask;
}
bool checkFlag0x94(u32 mask) const {
return field_0x094 & mask;
}
void setFlowEvent(u32 eventId);
const char *getCurrentStageMusicDemoName() const;
+1
View File
@@ -9,6 +9,7 @@ class dSndSourceGroup_c;
class dSndDistantSoundActor_c;
class dSndSourceEnemy_c;
class dSndSourceHarpRelated_c;
class dSndSound_c;