mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-08 17:44:56 +00:00
Amuse API changes
This commit is contained in:
@@ -25,13 +25,13 @@ public:
|
||||
|
||||
class CMidiWrapper
|
||||
{
|
||||
std::shared_ptr<amuse::Sequencer> x0_sequencer;
|
||||
amuse::ObjToken<amuse::Sequencer> x0_sequencer;
|
||||
//CSfxHandle x4_handle;
|
||||
u16 x8_songId;
|
||||
bool xa_available = true;
|
||||
public:
|
||||
const std::shared_ptr<amuse::Sequencer>& GetAudioSysHandle() const { return x0_sequencer; }
|
||||
void SetAudioSysHandle(const std::shared_ptr<amuse::Sequencer>& sequencer) { x0_sequencer = sequencer; }
|
||||
amuse::ObjToken<amuse::Sequencer> GetAudioSysHandle() const { return x0_sequencer; }
|
||||
void SetAudioSysHandle(amuse::ObjToken<amuse::Sequencer> sequencer) { x0_sequencer = sequencer; }
|
||||
//const CSfxHandle& GetManagerHandle() const { return x4_handle; }
|
||||
//void SetMidiHandle(const CSfxHandle& handle) { x4_handle = handle; }
|
||||
bool IsAvailable() const { return xa_available; }
|
||||
|
||||
@@ -37,7 +37,7 @@ bool CSfxManager::m_auxProcessingEnabled = false;
|
||||
float CSfxManager::m_reverbAmount = 1.f;
|
||||
CSfxManager::EAuxEffect CSfxManager::m_activeEffect = CSfxManager::EAuxEffect::None;
|
||||
CSfxManager::EAuxEffect CSfxManager::m_nextEffect = CSfxManager::EAuxEffect::None;
|
||||
std::shared_ptr<amuse::Listener> CSfxManager::m_listener;
|
||||
amuse::ObjToken<amuse::Listener> CSfxManager::m_listener;
|
||||
|
||||
u16 CSfxManager::kMaxPriority;
|
||||
u16 CSfxManager::kMedPriority;
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
virtual void Stop()=0;
|
||||
virtual bool Ready()=0;
|
||||
virtual ESfxAudibility GetAudible(const zeus::CVector3f&)=0;
|
||||
virtual const std::shared_ptr<amuse::Voice>& GetVoice() const=0;
|
||||
virtual amuse::ObjToken<amuse::Voice> GetVoice() const=0;
|
||||
virtual u16 GetSfxId() const=0;
|
||||
virtual void UpdateEmitterSilent()=0;
|
||||
virtual void UpdateEmitter()=0;
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
{
|
||||
float x1a_reverb;
|
||||
CAudioSys::C3DEmitterParmData x24_parmData;
|
||||
std::shared_ptr<amuse::Emitter> x50_emitterHandle;
|
||||
amuse::ObjToken<amuse::Emitter> x50_emitterHandle;
|
||||
bool x54_ready = true;
|
||||
float x55_cachedMaxVol;
|
||||
public:
|
||||
@@ -141,14 +141,14 @@ public:
|
||||
void Stop();
|
||||
bool Ready();
|
||||
ESfxAudibility GetAudible(const zeus::CVector3f&);
|
||||
const std::shared_ptr<amuse::Voice>& GetVoice() const { return x50_emitterHandle->getVoice(); }
|
||||
amuse::ObjToken<amuse::Voice> GetVoice() const { return x50_emitterHandle->getVoice(); }
|
||||
u16 GetSfxId() const;
|
||||
void UpdateEmitterSilent();
|
||||
void UpdateEmitter();
|
||||
void SetReverb(float rev);
|
||||
CAudioSys::C3DEmitterParmData& GetEmitterData() { return x24_parmData; }
|
||||
|
||||
const std::shared_ptr<amuse::Emitter>& GetHandle() const { return x50_emitterHandle; }
|
||||
amuse::ObjToken<amuse::Emitter> GetHandle() const { return x50_emitterHandle; }
|
||||
|
||||
CSfxEmitterWrapper(bool looped, s16 prio, const CAudioSys::C3DEmitterParmData& data,
|
||||
/*const CSfxHandle& handle,*/ bool useAcoustics, TAreaId area)
|
||||
@@ -161,7 +161,7 @@ public:
|
||||
class CSfxWrapper : public CBaseSfxWrapper
|
||||
{
|
||||
u16 x18_sfxId;
|
||||
std::shared_ptr<amuse::Voice> x1c_voiceHandle;
|
||||
amuse::ObjToken<amuse::Voice> x1c_voiceHandle;
|
||||
float x20_vol;
|
||||
float x22_pan;
|
||||
bool x24_ready = true;
|
||||
@@ -171,7 +171,7 @@ public:
|
||||
void Stop();
|
||||
bool Ready();
|
||||
ESfxAudibility GetAudible(const zeus::CVector3f&) { return ESfxAudibility::Aud3; }
|
||||
const std::shared_ptr<amuse::Voice>& GetVoice() const { return x1c_voiceHandle; }
|
||||
amuse::ObjToken<amuse::Voice> GetVoice() const { return x1c_voiceHandle; }
|
||||
u16 GetSfxId() const;
|
||||
void UpdateEmitterSilent();
|
||||
void UpdateEmitter();
|
||||
@@ -196,7 +196,7 @@ public:
|
||||
static float m_reverbAmount;
|
||||
static EAuxEffect m_activeEffect;
|
||||
static EAuxEffect m_nextEffect;
|
||||
static std::shared_ptr<amuse::Listener> m_listener;
|
||||
static amuse::ObjToken<amuse::Listener> m_listener;
|
||||
|
||||
static u16 kMaxPriority;
|
||||
static u16 kMedPriority;
|
||||
|
||||
@@ -70,11 +70,11 @@ private:
|
||||
std::vector<zeus::CMatrix3f> x50_parentMatrices;
|
||||
std::vector<std::array<float, 8>> x60_advValues;
|
||||
|
||||
u32 x70_internalStartFrame = 0;
|
||||
u32 x74_curFrame = 0;
|
||||
int x70_internalStartFrame = 0;
|
||||
int x74_curFrame = 0;
|
||||
double x78_curSeconds = 0.f;
|
||||
float x80_timeDeltaScale;
|
||||
u32 x84_prevFrame = -1;
|
||||
int x84_prevFrame = -1;
|
||||
bool x88_particleEmission = true;
|
||||
float x8c_generatorRemainder = 0.f;
|
||||
int x90_MAXP = 0;
|
||||
|
||||
@@ -24,7 +24,7 @@ bool CMVEImplosion::GetValue(int frame, zeus::CVector3f& pVel, zeus::CVector3f&
|
||||
float d;
|
||||
x10_minMag->GetValue(frame, d);
|
||||
if (x14_enableMinMag && dvm < d)
|
||||
return false;
|
||||
return true;
|
||||
|
||||
if (0.f == dvm)
|
||||
return false;
|
||||
@@ -51,7 +51,7 @@ bool CMVEExponentialImplosion::GetValue(int frame, zeus::CVector3f& pVel, zeus::
|
||||
float d;
|
||||
x10_minMag->GetValue(frame, d);
|
||||
if (x14_enableMinMag && dvm < d)
|
||||
return false;
|
||||
return true;
|
||||
|
||||
if (0.f == dvm)
|
||||
return false;
|
||||
@@ -78,7 +78,7 @@ bool CMVELinearImplosion::GetValue(int frame, zeus::CVector3f& pVel, zeus::CVect
|
||||
float d;
|
||||
x10_minMag->GetValue(frame, d);
|
||||
if (x14_enableMinMag && dvm < d)
|
||||
return false;
|
||||
return true;
|
||||
|
||||
if (0.f == dvm)
|
||||
return false;
|
||||
|
||||
@@ -37,8 +37,9 @@ public:
|
||||
{
|
||||
float lt = g_ParticleLifetime != 0.0f ? g_ParticleLifetime : 1.0f;
|
||||
g_ParticleLifetimePercentageReal = 100.0f * frame / lt;
|
||||
g_ParticleLifetimePercentage = g_ParticleLifetimePercentageReal;
|
||||
g_ParticleLifetimePercentage = int(g_ParticleLifetimePercentageReal);
|
||||
g_ParticleLifetimePercentageRemainder = g_ParticleLifetimePercentageReal - g_ParticleLifetimePercentage;
|
||||
g_ParticleLifetimePercentage = zeus::clamp(0, g_ParticleLifetimePercentage, 100);
|
||||
}
|
||||
|
||||
static const std::array<float, 8>* g_particleAccessParameters;
|
||||
|
||||
@@ -65,8 +65,6 @@ zeus::CVector3f CScriptDoor::GetOrbitPosition(const CStateManager& /*mgr*/) cons
|
||||
/* ORIGINAL 0-00 OFFSET: 8007E550 */
|
||||
void CScriptDoor::AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId uid, CStateManager &mgr)
|
||||
{
|
||||
if (msg == EScriptObjectMessage::Start)
|
||||
printf("");
|
||||
switch (msg)
|
||||
{
|
||||
case EScriptObjectMessage::Close:
|
||||
|
||||
Reference in New Issue
Block a user