2019-05-30 21:24:47 +02:00
|
|
|
#pragma once
|
|
|
|
|
2019-10-26 14:39:10 +02:00
|
|
|
#include "audio_enums.h"
|
2019-06-16 00:20:55 +02:00
|
|
|
|
2019-06-17 02:10:55 +02:00
|
|
|
class tMP3Sample
|
|
|
|
{
|
2019-06-16 00:20:55 +02:00
|
|
|
public:
|
|
|
|
uint32 m_nLength;
|
|
|
|
uint32 m_nPosition;
|
|
|
|
uint32 m_nLastPosCheckTimer;
|
|
|
|
};
|
|
|
|
|
2019-05-30 21:24:47 +02:00
|
|
|
class cMusicManager
|
|
|
|
{
|
|
|
|
public:
|
2019-06-17 00:16:38 +02:00
|
|
|
bool m_bIsInitialised;
|
2019-06-16 00:20:55 +02:00
|
|
|
uint8 field_1;
|
|
|
|
uint8 m_nMusicMode;
|
|
|
|
uint8 m_nCurrentStreamedSound;
|
|
|
|
uint8 m_nPreviousStreamedSound;
|
|
|
|
uint8 field_5;
|
|
|
|
uint8 field_6;
|
|
|
|
uint8 field_7;
|
2019-06-17 00:16:38 +02:00
|
|
|
bool m_bAnnouncement;
|
|
|
|
bool m_bPreviousPlayerInCar;
|
|
|
|
bool m_bPlayerInCar;
|
|
|
|
bool m_bAnnouncementInProgress;
|
2019-10-26 14:20:12 +02:00
|
|
|
tMP3Sample m_asMP3Samples[TOTAL_STREAMED_SOUNDS];
|
2019-06-16 00:20:55 +02:00
|
|
|
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;
|
2019-06-17 00:16:38 +02:00
|
|
|
bool m_bRadioSetByScript;
|
2019-06-16 00:20:55 +02:00
|
|
|
uint8 m_nRadioStation;
|
|
|
|
uint8 field_2385;
|
|
|
|
uint8 field_2386;
|
|
|
|
uint8 field_2387;
|
|
|
|
uint32 m_nRadioPosition;
|
2019-06-17 00:16:38 +02:00
|
|
|
bool m_bRadioInCar;
|
2019-06-16 00:20:55 +02:00
|
|
|
uint8 field_2393;
|
|
|
|
uint8 field_2394;
|
|
|
|
uint8 field_2395;
|
|
|
|
|
|
|
|
public:
|
2019-08-02 22:20:12 +02:00
|
|
|
bool IsInitialised() { return m_bIsInitialised; }
|
|
|
|
uint32 GetMusicMode() { return m_nMusicMode; }
|
|
|
|
uint8 GetCurrentTrack() { return m_nCurrentStreamedSound; }
|
|
|
|
|
2019-07-05 21:15:32 +02:00
|
|
|
void Initialise();
|
|
|
|
void Terminate();
|
|
|
|
|
2019-07-16 17:03:37 +02:00
|
|
|
void ChangeMusicMode(int32 mode);
|
|
|
|
void StopFrontEndTrack();
|
|
|
|
|
2019-06-16 00:20:55 +02:00
|
|
|
bool PlayerInCar();
|
|
|
|
void DisplayRadioStationName();
|
2019-08-30 00:44:57 +02:00
|
|
|
|
2019-10-26 14:20:12 +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);
|
|
|
|
int32 GetRadioInCar(void);
|
2019-10-26 14:20:12 +02:00
|
|
|
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();
|
2019-05-30 21:24:47 +02:00
|
|
|
};
|
2019-06-16 00:20:55 +02:00
|
|
|
|
|
|
|
static_assert(sizeof(cMusicManager) == 0x95C, "cMusicManager: error");
|
|
|
|
|
2019-05-30 21:24:47 +02:00
|
|
|
extern cMusicManager &MusicManager;
|