2022-10-21 21:40:29 +00:00
|
|
|
#ifndef _CSCRIPTMIDI
|
|
|
|
#define _CSCRIPTMIDI
|
|
|
|
|
|
|
|
#include "MetroidPrime/CEntity.hpp"
|
|
|
|
|
|
|
|
#include "Kyoto/Audio/CMidiManager.hpp"
|
|
|
|
|
|
|
|
class CScriptMidi : public CEntity {
|
|
|
|
public:
|
|
|
|
CScriptMidi(TUniqueId id, const CEntityInfo& info, const rstl::string& name, bool active,
|
|
|
|
CAssetId csng, float, float, int);
|
2023-02-06 17:01:01 +00:00
|
|
|
~CScriptMidi() override;
|
2022-10-21 21:40:29 +00:00
|
|
|
|
|
|
|
void Stop(CStateManager& mgr, float fadeTime);
|
|
|
|
void Play(CStateManager& mgr, float fadeTime);
|
2023-02-06 17:01:01 +00:00
|
|
|
void Accept(IVisitor& visitor) override;
|
|
|
|
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override;
|
2022-10-21 21:40:29 +00:00
|
|
|
|
|
|
|
private:
|
|
|
|
TToken< CMidiManager::CMidiData > x34_song;
|
|
|
|
CSfxHandle x3c_handle;
|
|
|
|
float x40_fadeInTime;
|
|
|
|
float x44_fadeOutTime;
|
|
|
|
ushort x48_volume;
|
|
|
|
|
|
|
|
void StopInternal(float fadeTime);
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _CSCRIPTMIDI
|