1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-11-14 06:49:15 +00:00
re3/src/audio/MusicManager.h

90 lines
1.9 KiB
C
Raw Normal View History

#pragma once
2019-10-26 12:39:10 +00:00
#include "audio_enums.h"
2019-06-15 22:20:55 +00:00
2020-02-06 17:35:24 +00:00
class tStreamedSample
{
2019-06-15 22:20:55 +00:00
public:
uint32 m_nLength;
uint32 m_nPosition;
uint32 m_nLastPosCheckTimer;
};
2020-02-06 17:35:24 +00:00
class CVehicle;
class cMusicManager
{
public:
2019-06-16 22:16:38 +00:00
bool m_bIsInitialised;
2020-02-06 17:35:24 +00:00
bool m_bDisabled;
2019-06-15 22:20:55 +00:00
uint8 m_nMusicMode;
uint8 m_nCurrentStreamedSound;
uint8 m_nPreviousStreamedSound;
2020-02-06 17:35:24 +00:00
bool m_bFrontendTrackFinished;
bool m_bPlayInFrontend;
bool m_bSetNextStation;
uint8 m_nAnnouncement;
2019-06-16 22:16:38 +00:00
bool m_bPreviousPlayerInCar;
bool m_bPlayerInCar;
bool m_bAnnouncementInProgress;
2020-02-06 17:35:24 +00: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-16 22:16:38 +00:00
bool m_bRadioSetByScript;
2019-06-15 22:20:55 +00:00
uint8 m_nRadioStation;
2020-02-06 17:35:24 +00:00
int32 m_nRadioPosition;
uint8 m_nRadioInCar;
2019-06-15 22:20:55 +00:00
public:
2020-02-06 17:35:24 +00:00
cMusicManager();
2019-08-02 20:20:12 +00:00
bool IsInitialised() { return m_bIsInitialised; }
uint32 GetMusicMode() { return m_nMusicMode; }
uint8 GetCurrentTrack() { return m_nCurrentStreamedSound; }
2020-02-06 17:35:24 +00:00
bool Initialise();
2019-07-05 19:15:32 +00:00
void Terminate();
2020-02-06 17:35:24 +00:00
void ChangeMusicMode(uint8 mode);
2019-07-16 15:03:37 +00:00
void StopFrontEndTrack();
2019-06-15 22:20:55 +00:00
bool PlayerInCar();
void DisplayRadioStationName();
2019-08-29 22:44:57 +00:00
void PlayAnnouncement(uint8);
void PlayFrontEndTrack(uint8, uint8);
void PreloadCutSceneMusic(uint8);
2019-08-15 01:43:00 +00:00
void PlayPreloadedCutSceneMusic(void);
void StopCutSceneMusic(void);
2020-02-06 17:35:24 +00:00
uint8 GetRadioInCar(void);
void SetRadioInCar(uint32);
void SetRadioChannelByScript(uint8, int32);
2019-08-29 22:44:57 +00:00
void ResetMusicAfterReload();
2019-09-21 20:10:35 +00:00
void ResetTimers(int32);
void Service();
2020-02-06 17:35:24 +00: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-15 22:20:55 +00:00
VALIDATE_SIZE(cMusicManager, 0x95C);
2019-06-15 22:20:55 +00:00
2020-04-16 08:50:45 +00:00
extern cMusicManager MusicManager;