2022-12-22 14:19:00 +00:00
|
|
|
#ifndef _CSCRIPTSTREAMEDAUDIO
|
|
|
|
#define _CSCRIPTSTREAMEDAUDIO
|
|
|
|
|
|
|
|
#include "MetroidPrime/CEntity.hpp"
|
|
|
|
|
|
|
|
class CScriptStreamedMusic : public CEntity {
|
|
|
|
public:
|
|
|
|
CScriptStreamedMusic(TUniqueId id, const CEntityInfo& info, const rstl::string& name, bool active,
|
|
|
|
const rstl::string& fileName, bool noStopOnDeactivate, float fadeIn,
|
|
|
|
float fadeOut, uint volume, bool loop, bool music);
|
|
|
|
~CScriptStreamedMusic() {}
|
|
|
|
|
|
|
|
void Stop(CStateManager& mgr);
|
|
|
|
void Play(CStateManager& mgr);
|
2023-02-06 07:21:28 +00:00
|
|
|
void Accept(IVisitor& visitor);
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr);
|
2022-12-22 14:19:00 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
rstl::string x34_fileName;
|
|
|
|
bool x44_noStopOnDeactivate;
|
|
|
|
bool x45_fileIsDsp; // As opposed to .adp for DTK streaming
|
|
|
|
bool x46_loop;
|
|
|
|
bool x47_music;
|
|
|
|
float x48_fadeIn;
|
|
|
|
float x4c_fadeOut;
|
|
|
|
uint x50_volume;
|
|
|
|
|
|
|
|
static bool IsDSPFile(const rstl::string& fileName);
|
|
|
|
static int IsOneShot(bool);
|
|
|
|
void StopStream(CStateManager& mgr);
|
|
|
|
void StartStream(CStateManager& mgr);
|
|
|
|
void TweakOverride(CStateManager& mgr);
|
2023-01-05 17:06:10 +00:00
|
|
|
|
|
|
|
void sub_8020c3f0(CStateManager& mgr);
|
|
|
|
void sub_8020c414(CStateManager& mgr);
|
2023-01-06 12:30:08 +00:00
|
|
|
void sub_8020be90();
|
2022-12-22 14:19:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _CSCRIPTSTREAMEDAUDIO
|