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:
2021-05-22 11:11:50 +02:00
bool8 m_bIsInitialised;
bool8 m_bDisabled;
2019-06-16 00:20:55 +02:00
uint8 m_nMusicMode;
2021-02-03 12:08:28 +01:00
uint8 m_nNextTrack;
uint8 m_nPlayingTrack;
2021-05-22 11:11:50 +02:00
bool8 m_bFrontendTrackFinished;
bool8 m_bPlayInFrontend;
bool8 m_bSetNextStation;
2020-02-06 18:35:24 +01:00
uint8 m_nAnnouncement;
2021-05-22 11:11:50 +02:00
bool8 m_bPreviousPlayerInCar;
bool8 m_bPlayerInCar;
bool8 m_bAnnouncementInProgress;
2020-02-06 18:35:24 +01:00
tStreamedSample m_aTracks[TOTAL_STREAMED_SOUNDS];
2021-05-22 11:11:50 +02:00
bool8 m_bResetTimers;
2020-02-06 18:35:24 +01:00
uint32 m_nResetTime;
uint32 m_nLastTrackServiceTime;
uint32 m_nTimer;
2021-05-22 11:11:50 +02:00
bool8 m_bDoTrackService;
bool8 m_bIgnoreTimeDelay;
bool8 m_bVerifyAmbienceTrackStartedToPlay;
bool8 m_bRadioSetByScript;
2021-02-03 12:08:28 +01:00
uint8 m_nRadioStationScript;
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();
2021-05-22 11:11:50 +02:00
bool8 IsInitialised() { return m_bIsInitialised; }
2019-08-02 22:20:12 +02:00
uint32 GetMusicMode() { return m_nMusicMode; }
2021-02-03 12:08:28 +01:00
uint8 GetNextTrack() { return m_nNextTrack; }
2019-08-02 22:20:12 +02:00
2021-05-22 11:11:50 +02:00
bool8 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();
2021-05-22 11:11:50 +02:00
bool8 PlayerInCar();
2019-06-16 00:20:55 +02:00
void DisplayRadioStationName();
2019-08-30 00:44:57 +02:00
void PlayAnnouncement(uint8);
2021-05-22 11:11:50 +02:00
void PlayFrontEndTrack(uint8, bool8);
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();
2021-05-22 11:11:50 +02:00
bool8 UsesPoliceRadio(CVehicle *veh);
2020-02-06 18:35:24 +01:00
uint32 GetTrackStartPos(uint8);
2021-05-22 11:11:50 +02:00
void ComputeAmbienceVol(bool8 reset, uint8& outVolume);
bool8 ServiceAnnouncement();
2020-02-06 18:35:24 +01:00
uint8 GetCarTuning();
uint8 GetNextCarTuning();
2021-05-22 11:11:50 +02:00
bool8 ChangeRadioChannel();
};
2019-06-16 00:20:55 +02:00
VALIDATE_SIZE(cMusicManager, 0x95C);
2019-06-16 00:20:55 +02:00
2020-04-16 10:50:45 +02:00
extern cMusicManager MusicManager;