re3-wiiu/src/audio/MusicManager.h

90 lines
1.9 KiB
C
Raw Normal View History

#pragma once
2019-10-26 14:39:10 +02:00
#include "audio_enums.h"
2019-06-16 00:20:55 +02:00
2020-02-06 18:35:24 +01:00
class tStreamedSample
{
2019-06-16 00:20:55 +02:00
public:
uint32 m_nLength;
uint32 m_nPosition;
uint32 m_nLastPosCheckTimer;
};
2020-02-06 18:35:24 +01:00
class CVehicle;
class cMusicManager
{
public:
2019-06-17 00:16:38 +02:00
bool m_bIsInitialised;
2020-02-06 18:35:24 +01:00
bool m_bDisabled;
2019-06-16 00:20:55 +02:00
uint8 m_nMusicMode;
uint8 m_nCurrentStreamedSound;
uint8 m_nPreviousStreamedSound;
2020-02-06 18:35:24 +01:00
bool m_bFrontendTrackFinished;
bool m_bPlayInFrontend;
bool m_bSetNextStation;
uint8 m_nAnnouncement;
2019-06-17 00:16:38 +02:00
bool m_bPreviousPlayerInCar;
bool m_bPlayerInCar;
bool m_bAnnouncementInProgress;
2020-02-06 18:35:24 +01:00
tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
bool m_bResetTimers;
uint32 m_nResetTime;
uint32 m_nLastTrackServiceTime;
uint32 m_nTimer;
bool m_bDoTrackService;
bool m_bIgnoreTimeDelay;
bool m_bDontServiceAmbienceTrack;
2019-06-17 00:16:38 +02:00
bool m_bRadioSetByScript;
2019-06-16 00:20:55 +02:00
uint8 m_nRadioStation;
2020-02-06 18:35:24 +01:00
int32 m_nRadioPosition;
uint8 m_nRadioInCar;
2019-06-16 00:20:55 +02:00
public:
2020-02-06 18:35:24 +01:00
cMusicManager();
2019-08-02 22:20:12 +02:00
bool IsInitialised() { return m_bIsInitialised; }
uint32 GetMusicMode() { return m_nMusicMode; }
uint8 GetCurrentTrack() { return m_nCurrentStreamedSound; }
2020-02-06 18:35:24 +01:00
bool Initialise();
2019-07-05 21:15:32 +02:00
void Terminate();
2020-02-06 18:35:24 +01:00
void ChangeMusicMode(uint8 mode);
2019-07-16 17:03:37 +02:00
void StopFrontEndTrack();
2019-06-16 00:20:55 +02:00
bool PlayerInCar();
void DisplayRadioStationName();
2019-08-30 00:44:57 +02:00
void PlayAnnouncement(uint8);
void PlayFrontEndTrack(uint8, uint8);
void PreloadCutSceneMusic(uint8);
2019-08-15 03:43:00 +02:00
void PlayPreloadedCutSceneMusic(void);
void StopCutSceneMusic(void);
2020-02-06 18:35:24 +01:00
uint8 GetRadioInCar(void);
void SetRadioInCar(uint32);
void SetRadioChannelByScript(uint8, int32);
2019-08-30 00:44:57 +02:00
void ResetMusicAfterReload();
2019-09-21 22:10:35 +02:00
void ResetTimers(int32);
void Service();
2020-02-06 18:35:24 +01:00
void ServiceFrontEndMode();
void ServiceGameMode();
void ServiceAmbience();
void ServiceTrack();
bool UsesPoliceRadio(CVehicle *veh);
uint32 GetTrackStartPos(uint8);
void ComputeAmbienceVol(uint8 reset, uint8& outVolume);
bool ServiceAnnouncement();
uint8 GetCarTuning();
uint8 GetNextCarTuning();
bool ChangeRadioChannel();
};
2019-06-16 00:20:55 +02:00
static_assert(sizeof(cMusicManager) == 0x95C, "cMusicManager: error");
extern cMusicManager &MusicManager;