2022-10-09 05:13:17 +00:00
|
|
|
#ifndef _CSFXMANAGER
|
|
|
|
#define _CSFXMANAGER
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-08-15 04:51:06 +00:00
|
|
|
#include "Kyoto/Audio/CSfxHandle.hpp"
|
|
|
|
|
2022-10-05 23:34:32 +00:00
|
|
|
class CVector3f;
|
2022-04-10 00:17:06 +00:00
|
|
|
class CSfxManager {
|
|
|
|
public:
|
2022-10-09 05:37:23 +00:00
|
|
|
static void Update(float dt);
|
2022-08-15 04:51:06 +00:00
|
|
|
static void RemoveEmitter(CSfxHandle handle);
|
2022-10-03 16:23:22 +00:00
|
|
|
static void UpdateEmitter(CSfxHandle handle, const CVector3f& pos, const CVector3f& dir,
|
2022-10-02 10:13:35 +00:00
|
|
|
uchar maxVol);
|
2022-10-05 00:16:03 +00:00
|
|
|
|
2022-10-09 05:37:23 +00:00
|
|
|
static const short kMaxPriority; // 0xFF
|
|
|
|
static const short kMedPriority; // 0x7F
|
|
|
|
static const ushort kInternalInvalidSfxId; // 0xFFFF
|
|
|
|
static const int kAllAreas; // 0xFFFFFFFF
|
|
|
|
static CSfxHandle AddEmitter(ushort id, const CVector3f& pos, const CVector3f& dir,
|
|
|
|
bool useAcoustics, bool looped, short prio = kMedPriority,
|
2022-10-05 00:16:03 +00:00
|
|
|
int areaId = kAllAreas);
|
2022-10-09 05:37:23 +00:00
|
|
|
static CSfxHandle AddEmitter(ushort id, const CVector3f& pos, const CVector3f& dir, uchar vol,
|
|
|
|
bool useAcoustics, bool looped, short prio = kMedPriority,
|
2022-10-05 00:16:03 +00:00
|
|
|
int areaId = kAllAreas);
|
2022-10-01 06:19:09 +00:00
|
|
|
static void Shutdown();
|
2022-10-09 05:37:23 +00:00
|
|
|
static ushort TranslateSFXID(ushort);
|
2022-10-02 10:13:35 +00:00
|
|
|
|
2022-10-03 16:04:56 +00:00
|
|
|
static void PitchBend(CSfxHandle handle, int pitch);
|
2022-10-06 14:24:38 +00:00
|
|
|
|
2022-10-09 05:37:23 +00:00
|
|
|
static CSfxHandle SfxStart(ushort id, uchar vol, uchar pan, bool useAcoustics, short prio,
|
|
|
|
bool looped, int areaId);
|
2022-10-06 19:38:21 +00:00
|
|
|
static bool IsPlaying(const CSfxHandle& handle);
|
2022-04-10 00:17:06 +00:00
|
|
|
};
|
|
|
|
|
2022-10-09 05:13:17 +00:00
|
|
|
#endif // _CSFXMANAGER
|