mirror of
https://github.com/zeldaret/ss
synced 2026-08-21 22:40:29 -04:00
Actor sound source cleanup
This commit is contained in:
+19
-25
@@ -9,18 +9,10 @@
|
||||
#include "m/m_vec.h"
|
||||
#include "toBeSorted/actor_info.h"
|
||||
#include "toBeSorted/raii_ptr.h"
|
||||
#include "toBeSorted/tlist.h"
|
||||
#include "toBeSorted/sound_info.h"
|
||||
|
||||
class dAcBase_c;
|
||||
struct cBgS_PolyInfo;
|
||||
|
||||
struct SoundInfo {
|
||||
dAcBase_c *actor;
|
||||
dSoundSourceIf_c *sound_source;
|
||||
mVec3_c *obj_pos;
|
||||
TListNode<SoundInfo> mLink;
|
||||
};
|
||||
|
||||
/**
|
||||
* A list node that will automatically unlink upon destruction.
|
||||
*/
|
||||
@@ -67,10 +59,12 @@ public:
|
||||
// non-official name
|
||||
class dAcBase_c : public dBase_c {
|
||||
public:
|
||||
typedef TList<SoundInfo, 12> SoundInfoList;
|
||||
|
||||
/* 0x68 */ mHeapAllocator_c heap_allocator;
|
||||
/* 0x84 */ const ActorInfo *mpActorInfo;
|
||||
/* 0x88 */ TList<SoundInfo, 12> sound_list;
|
||||
/* 0x94 */ RaiiPtr<dSoundSourceIf_c> sound_source;
|
||||
/* 0x88 */ SoundInfoList sound_list;
|
||||
/* 0x94 */ RaiiPtr<dSoundSourceIf_c> mpSoundSource;
|
||||
/* 0x98 */ mVec3_c *obj_pos;
|
||||
/* 0x9C */ mVec3_c pos_copy;
|
||||
/* 0xA8 */ u32 params2;
|
||||
@@ -213,21 +207,21 @@ public:
|
||||
/* 8002d540 */ bool isRoomFlags_0x6_Set();
|
||||
|
||||
// Start of SoundSource stuff
|
||||
/* 8002d590 */ void FUN_8002d590();
|
||||
/* 8002d590 */ void setSoundSourceSubtype(u8 subType);
|
||||
/* 8002d5b0 */ void FUN_8002d5b0();
|
||||
/* 8002d5d0 */ void playSound(u16 effect);
|
||||
/* 8002d600 */ void FUN_8002d600();
|
||||
/* 8002d630 */ void FUN_8002d630();
|
||||
/* 8002d6d0 */ void FUN_8002d6d0();
|
||||
/* 8002d710 */ void playSoundEffect1(u16 effect);
|
||||
/* 8002d740 */ void FUN_8002d740();
|
||||
/* 8002d770 */ void FUN_8002d770(u16, f32);
|
||||
/* 8002d7a0 */ void FUN_8002d7a0();
|
||||
/* 8002d7d0 */ void FUN_8002d7d0();
|
||||
/* 8002d7f0 */ void FUN_8002d7f0();
|
||||
/* 8002d810 */ void FUN_8002d810();
|
||||
/* 8002d830 */ void FUN_8002d830();
|
||||
/* 8002d860 */ void FUN_8002d860(UNKWORD val);
|
||||
/* 8002d5d0 */ bool startSound(u32 soundId);
|
||||
/* 8002d600 */ bool startSoundWithFloatParam(u32 soundId, f32 param);
|
||||
/* 8002d630 */ bool startBgHitSound(u32 soundId, const cBgS_PolyInfo &info, const mVec3_c *position);
|
||||
/* 8002d6d0 */ bool startSoundAtPosition(u32 soundId, const mVec3_c *position);
|
||||
/* 8002d710 */ bool holdSound(u32 soundId);
|
||||
/* 8002d740 */ bool holdSoundWithIntParam(u32 soundId, s32 param);
|
||||
/* 8002d770 */ bool holdSoundWithFloatParam(u32 soundId, f32 param);
|
||||
/* 8002d7a0 */ bool holdSoundWithParams(u32 soundId, f32 fValue, s32 value);
|
||||
/* 8002d7d0 */ void onSoundSourceFlag2(u32 mask);
|
||||
/* 8002d7f0 */ void onSoundSourceFlag1(u32 mask);
|
||||
/* 8002d810 */ void offSoundSourceFlag1(u32 mask);
|
||||
/* 8002d830 */ bool isPlayingSound(u32 soundId);
|
||||
/* 8002d860 */ void setBattleBgmRelated(UNKWORD val);
|
||||
/* 8002d880 */ dSoundSourceIf_c *getSoundSource();
|
||||
// End of SoundSource stuff
|
||||
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
#ifndef SOUND_INFO_H
|
||||
#define SOUND_INFO_H
|
||||
|
||||
#include "m/m_vec.h"
|
||||
#include "d/snd/d_snd_source_if.h"
|
||||
#include "toBeSorted/raii_ptr.h"
|
||||
#include "toBeSorted/tlist.h"
|
||||
|
||||
class dAcBase_c;
|
||||
class cBgS_PolyInfo;
|
||||
|
||||
class SoundInfo {
|
||||
private:
|
||||
/* 0x00 */ dAcBase_c *mpActor;
|
||||
/* 0x04 */ RaiiPtr<dSoundSourceIf_c> mpSource;
|
||||
/* 0x08 */ const mVec3_c *mpPosPtr;
|
||||
/* 0x0C */ TListNode<SoundInfo> mLink;
|
||||
|
||||
public:
|
||||
SoundInfo(dAcBase_c *ac);
|
||||
/* vtable at 0x14 */
|
||||
virtual ~SoundInfo();
|
||||
|
||||
dSoundSourceIf_c *getSource() {
|
||||
return mpSource.get();
|
||||
}
|
||||
|
||||
void calc() {
|
||||
mpSource->calc(*mpPosPtr);
|
||||
}
|
||||
|
||||
bool initSource(u8 sourceType, const char *name, const mVec3_c *posPtr);
|
||||
bool startBgHitSound(u32 soundId, const cBgS_PolyInfo &info, const mVec3_c *position);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user