diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-02-15 12:54:46 +0100 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-02-15 12:54:46 +0100 |
commit | a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1 (patch) | |
tree | 147d551bbb7f0de6d6048566405956f18252bfff /src/audio/MusicManager.h | |
parent | script 900-999 (diff) | |
parent | Merge pull request #326 from erorcun/erorcun (diff) | |
download | re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar.gz re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar.bz2 re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar.lz re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar.xz re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.tar.zst re3-a361fc0ff5359cc4e1845cd6b62ee50b4d81a3d1.zip |
Diffstat (limited to 'src/audio/MusicManager.h')
-rw-r--r-- | src/audio/MusicManager.h | 64 |
1 files changed, 36 insertions, 28 deletions
diff --git a/src/audio/MusicManager.h b/src/audio/MusicManager.h index 709fe56a..5c255069 100644 --- a/src/audio/MusicManager.h +++ b/src/audio/MusicManager.h @@ -2,7 +2,7 @@ #include "audio_enums.h" -class tMP3Sample +class tStreamedSample { public: uint32 m_nLength; @@ -10,52 +10,46 @@ public: uint32 m_nLastPosCheckTimer; }; +class CVehicle; + class cMusicManager { public: bool m_bIsInitialised; - uint8 field_1; + bool m_bDisabled; uint8 m_nMusicMode; uint8 m_nCurrentStreamedSound; uint8 m_nPreviousStreamedSound; - uint8 field_5; - uint8 field_6; - uint8 field_7; - bool m_bAnnouncement; + bool m_bFrontendTrackFinished; + bool m_bPlayInFrontend; + bool m_bSetNextStation; + uint8 m_nAnnouncement; bool m_bPreviousPlayerInCar; bool m_bPlayerInCar; bool m_bAnnouncementInProgress; - tMP3Sample m_asMP3Samples[TOTAL_STREAMED_SOUNDS]; - uint8 field_2364; - uint8 field_2365; - uint8 field_2366; - uint8 field_2367; - uint32 field_2368; - uint32 field_2372; - uint32 field_2376; - uint8 field_2380; - uint8 field_2381; - uint8 field_2382; + 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; bool m_bRadioSetByScript; uint8 m_nRadioStation; - uint8 field_2385; - uint8 field_2386; - uint8 field_2387; - uint32 m_nRadioPosition; - bool m_bRadioInCar; - uint8 field_2393; - uint8 field_2394; - uint8 field_2395; + int32 m_nRadioPosition; + uint8 m_nRadioInCar; public: + cMusicManager(); bool IsInitialised() { return m_bIsInitialised; } uint32 GetMusicMode() { return m_nMusicMode; } uint8 GetCurrentTrack() { return m_nCurrentStreamedSound; } - void Initialise(); + bool Initialise(); void Terminate(); - void ChangeMusicMode(int32 mode); + void ChangeMusicMode(uint8 mode); void StopFrontEndTrack(); bool PlayerInCar(); @@ -66,7 +60,7 @@ public: void PreloadCutSceneMusic(uint8); void PlayPreloadedCutSceneMusic(void); void StopCutSceneMusic(void); - int32 GetRadioInCar(void); + uint8 GetRadioInCar(void); void SetRadioInCar(uint32); void SetRadioChannelByScript(uint8, int32); @@ -74,6 +68,20 @@ public: void ResetTimers(int32); void Service(); + 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(); }; static_assert(sizeof(cMusicManager) == 0x95C, "cMusicManager: error"); |