mirror of
https://github.com/GTAmodding/re3.git
synced 2024-11-17 03:29:00 +00:00
mark some audio stuff and fix frameCounter
This commit is contained in:
parent
96f36d16ae
commit
e34261d3ef
3 changed files with 35 additions and 51 deletions
|
@ -46,16 +46,6 @@ const int channels = ARRAY_SIZE(cAudioManager::m_asActiveSamples);
|
||||||
const int policeChannel = channels + 1;
|
const int policeChannel = channels + 1;
|
||||||
const int allChannels = channels + 2;
|
const int allChannels = channels + 2;
|
||||||
|
|
||||||
uint32 gPornNextTime;
|
|
||||||
uint32 gSawMillNextTime;
|
|
||||||
uint32 gShopNextTime;
|
|
||||||
uint32 gAirportNextTime;
|
|
||||||
uint32 gCinemaNextTime;
|
|
||||||
uint32 gDocksNextTime;
|
|
||||||
uint32 gHomeNextTime;
|
|
||||||
uint32 gCellNextTime;
|
|
||||||
uint32 gNextCryTime;
|
|
||||||
|
|
||||||
enum PLAY_STATUS : uint8 { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED };
|
enum PLAY_STATUS : uint8 { PLAY_STATUS_STOPPED = 0, PLAY_STATUS_PLAYING, PLAY_STATUS_FINISHED };
|
||||||
enum LOADING_STATUS : uint8 { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED };
|
enum LOADING_STATUS : uint8 { LOADING_STATUS_NOT_LOADED = 0, LOADING_STATUS_LOADED, LOADING_STATUS_FAILED };
|
||||||
|
|
||||||
|
@ -187,7 +177,11 @@ cAudioManager::PostInitialiseGameSpecificSetup()
|
||||||
field_5538 = 127;
|
field_5538 = 127;
|
||||||
|
|
||||||
ResetAudioLogicTimers(CTimer::GetTimeInMilliseconds());
|
ResetAudioLogicTimers(CTimer::GetTimeInMilliseconds());
|
||||||
|
m_bIsPlayerShutUp = false;
|
||||||
|
m_nPlayerMood = 0;
|
||||||
|
m_nPlayerMoodTimer = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
cAudioManager::PreTerminateGameSpecificShutdown()
|
cAudioManager::PreTerminateGameSpecificShutdown()
|
||||||
{
|
{
|
||||||
|
@ -240,15 +234,6 @@ cAudioManager::PostTerminateGameSpecificShutdown()
|
||||||
void
|
void
|
||||||
cAudioManager::ResetAudioLogicTimers(uint32 timer)
|
cAudioManager::ResetAudioLogicTimers(uint32 timer)
|
||||||
{
|
{
|
||||||
gPornNextTime = timer;
|
|
||||||
gNextCryTime = timer;
|
|
||||||
gSawMillNextTime = timer;
|
|
||||||
gCellNextTime = timer;
|
|
||||||
gShopNextTime = timer;
|
|
||||||
gHomeNextTime = timer;
|
|
||||||
gAirportNextTime = timer;
|
|
||||||
gDocksNextTime = timer;
|
|
||||||
gCinemaNextTime = timer;
|
|
||||||
for (int32 i = 0; i < m_nAudioEntitiesTotal; i++) {
|
for (int32 i = 0; i < m_nAudioEntitiesTotal; i++) {
|
||||||
if (m_asAudioEntities[m_anAudioEntityIndices[i]].m_nType == AUDIOTYPE_PHYSICAL) {
|
if (m_asAudioEntities[m_anAudioEntityIndices[i]].m_nType == AUDIOTYPE_PHYSICAL) {
|
||||||
CPed *ped = (CPed *)m_asAudioEntities[m_anAudioEntityIndices[i]].m_pEntity;
|
CPed *ped = (CPed *)m_asAudioEntities[m_anAudioEntityIndices[i]].m_pEntity;
|
||||||
|
|
|
@ -432,7 +432,7 @@ cAudioManager::IsAudioInitialised() const
|
||||||
void
|
void
|
||||||
cAudioManager::ServiceSoundEffects()
|
cAudioManager::ServiceSoundEffects()
|
||||||
{
|
{
|
||||||
field_5554++;
|
m_FrameCounter++;
|
||||||
m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0;
|
m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0;
|
||||||
if (m_nUserPause && !m_nPreviousUserPause) {
|
if (m_nUserPause && !m_nPreviousUserPause) {
|
||||||
for (int32 i = 0; i < allChannels; i++)
|
for (int32 i = 0; i < allChannels; i++)
|
||||||
|
@ -771,7 +771,7 @@ cAudioManager::ProcessActiveQueues()
|
||||||
sample.m_nSampleIndex == m_asActiveSamples[j].m_nSampleIndex) {
|
sample.m_nSampleIndex == m_asActiveSamples[j].m_nSampleIndex) {
|
||||||
if (sample.m_nLoopCount) {
|
if (sample.m_nLoopCount) {
|
||||||
|
|
||||||
if (field_5554 & 1) {
|
if (m_FrameCounter & 1) {
|
||||||
if (!(j & 1)) {
|
if (!(j & 1)) {
|
||||||
flag = false;
|
flag = false;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -226,14 +226,13 @@ public:
|
||||||
uint8 m_nUserPause;
|
uint8 m_nUserPause;
|
||||||
uint8 m_nPreviousUserPause;
|
uint8 m_nPreviousUserPause;
|
||||||
uint32 m_FrameCounter;
|
uint32 m_FrameCounter;
|
||||||
uint32 field_5554;
|
|
||||||
|
|
||||||
cAudioManager();
|
cAudioManager();
|
||||||
~cAudioManager();
|
~cAudioManager();
|
||||||
|
|
||||||
// getters
|
// getters
|
||||||
uint32 GetFrameCounter() const { return m_FrameCounter; }
|
uint32 GetFrameCounter() const { return m_FrameCounter; } // done
|
||||||
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; }
|
float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } // done
|
||||||
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
|
int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; }
|
||||||
int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; }
|
int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; }
|
||||||
bool IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; }
|
bool IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; }
|
||||||
|
@ -250,7 +249,7 @@ public:
|
||||||
void CalculateDistance(bool &condition, float dist); // done
|
void CalculateDistance(bool &condition, float dist); // done
|
||||||
bool CheckForAnAudioFileOnCD() const; // done
|
bool CheckForAnAudioFileOnCD() const; // done
|
||||||
void ClearActiveSamples(); // done
|
void ClearActiveSamples(); // done
|
||||||
void ClearMissionAudio(uint8 slot); // done
|
void ClearMissionAudio(uint8 slot); // done (inlined in vc)
|
||||||
void ClearRequestedQueue(); // done (inlined in vc)
|
void ClearRequestedQueue(); // done (inlined in vc)
|
||||||
uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const; // done
|
uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const; // done
|
||||||
int32 ComputePan(float, CVector *); // done
|
int32 ComputePan(float, CVector *); // done
|
||||||
|
@ -266,7 +265,7 @@ public:
|
||||||
// TODO: miami
|
// TODO: miami
|
||||||
// end of functions returning talk sfx
|
// end of functions returning talk sfx
|
||||||
|
|
||||||
void GenerateIntegerRandomNumberTable();
|
void GenerateIntegerRandomNumberTable(); // done
|
||||||
char *Get3DProviderName(uint8 id) const;
|
char *Get3DProviderName(uint8 id) const;
|
||||||
uint8 GetCDAudioDriveLetter() const;
|
uint8 GetCDAudioDriveLetter() const;
|
||||||
int8 GetCurrent3DProviderIndex() const;
|
int8 GetCurrent3DProviderIndex() const;
|
||||||
|
@ -290,24 +289,24 @@ public:
|
||||||
void InitialisePoliceRadio();
|
void InitialisePoliceRadio();
|
||||||
void InitialisePoliceRadioZones();
|
void InitialisePoliceRadioZones();
|
||||||
void InterrogateAudioEntities(); // done
|
void InterrogateAudioEntities(); // done
|
||||||
bool IsAudioInitialised() const;
|
bool IsAudioInitialised() const; // done
|
||||||
bool IsMissionAudioSampleFinished(uint8 slot);
|
bool IsMissionAudioSampleFinished(uint8 slot); // done
|
||||||
bool IsMP3RadioChannelAvailable() const; // done
|
bool IsMP3RadioChannelAvailable() const; // done
|
||||||
|
|
||||||
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const;
|
bool MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done
|
||||||
|
|
||||||
void PlayLoadedMissionAudio(uint8 slot); // done
|
void PlayLoadedMissionAudio(uint8 slot); // done
|
||||||
void PlayOneShot(int32 index, int16 sound, float vol); // done
|
void PlayOneShot(int32 index, int16 sound, float vol); // done
|
||||||
void PlaySuspectLastSeen(float x, float y, float z); //
|
void PlaySuspectLastSeen(float x, float y, float z); //
|
||||||
void PlayerJustGotInCar() const; // done
|
void PlayerJustGotInCar() const; // done
|
||||||
void PlayerJustLeftCar() const; // done
|
void PlayerJustLeftCar() const; // done
|
||||||
void PostInitialiseGameSpecificSetup(); //
|
void PostInitialiseGameSpecificSetup(); // done
|
||||||
void PostTerminateGameSpecificShutdown(); // done
|
void PostTerminateGameSpecificShutdown(); // done
|
||||||
void PreInitialiseGameSpecificSetup() const; // done
|
void PreInitialiseGameSpecificSetup() const; // done
|
||||||
void PreloadMissionAudio(uint8 slot, Const char *name); // done
|
void PreloadMissionAudio(uint8 slot, Const char *name); // done
|
||||||
void PreTerminateGameSpecificShutdown(); // done
|
void PreTerminateGameSpecificShutdown(); // done
|
||||||
/// processX - main logic of adding new sounds
|
/// processX - main logic of adding new sounds
|
||||||
void ProcessActiveQueues(); //done
|
void ProcessActiveQueues(); // done
|
||||||
bool ProcessAirBrakes(cVehicleParams *params);
|
bool ProcessAirBrakes(cVehicleParams *params);
|
||||||
bool ProcessBoatEngine(cVehicleParams *params);
|
bool ProcessBoatEngine(cVehicleParams *params);
|
||||||
bool ProcessBoatMovingOverWater(cVehicleParams *params);
|
bool ProcessBoatMovingOverWater(cVehicleParams *params);
|
||||||
|
@ -355,32 +354,32 @@ public:
|
||||||
#ifdef GTA_TRAIN
|
#ifdef GTA_TRAIN
|
||||||
bool ProcessTrainNoise(cVehicleParams *params);
|
bool ProcessTrainNoise(cVehicleParams *params);
|
||||||
#endif
|
#endif
|
||||||
void ProcessVehicle(CVehicle *vehicle); //done, but need add model functions
|
void ProcessVehicle(CVehicle *vehicle); // done, but need add model functions
|
||||||
bool ProcessVehicleDoors(cVehicleParams *params); //done
|
bool ProcessVehicleDoors(cVehicleParams *params); // done
|
||||||
void ProcessVehicleEngine(cVehicleParams *params); //done
|
void ProcessVehicleEngine(cVehicleParams *params); // done
|
||||||
void UpdateGasPedalAudio(CVehicle* veh, int vehType); //done
|
void UpdateGasPedalAudio(CVehicle* veh, int vehType); // done
|
||||||
void ProcessVehicleHorn(cVehicleParams *params);
|
void ProcessVehicleHorn(cVehicleParams *params); //
|
||||||
void ProcessVehicleOneShots(cVehicleParams *params);
|
void ProcessVehicleOneShots(cVehicleParams *params); //
|
||||||
bool ProcessVehicleReverseWarning(cVehicleParams *params);
|
bool ProcessVehicleReverseWarning(cVehicleParams *params); //
|
||||||
bool ProcessVehicleRoadNoise(cVehicleParams *params);
|
bool ProcessVehicleRoadNoise(cVehicleParams *params); //
|
||||||
bool ProcessVehicleSirenOrAlarm(cVehicleParams *params);
|
bool ProcessVehicleSirenOrAlarm(cVehicleParams *params); //
|
||||||
bool ProcessVehicleSkidding(cVehicleParams *params);
|
bool ProcessVehicleSkidding(cVehicleParams *params); //
|
||||||
void ProcessWaterCannon(int32);
|
void ProcessWaterCannon(int32); //
|
||||||
void ProcessWeather(int32 id); //done
|
void ProcessWeather(int32 id); // done
|
||||||
bool ProcessWetRoadNoise(cVehicleParams *params);
|
bool ProcessWetRoadNoise(cVehicleParams *params); //
|
||||||
void ProcessEscalators(); //done
|
void ProcessEscalators(); // done
|
||||||
void ProcessExtraSounds(); //done
|
void ProcessExtraSounds(); // done
|
||||||
|
|
||||||
int32 RandomDisplacement(uint32 seed) const;
|
int32 RandomDisplacement(uint32 seed) const; //
|
||||||
void ReacquireDigitalHandle() const; // done
|
void ReacquireDigitalHandle() const; // done
|
||||||
void ReleaseDigitalHandle() const; // done
|
void ReleaseDigitalHandle() const; // done
|
||||||
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); // done
|
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); // done
|
||||||
void ReportCrime(int32 crime, const CVector *pos); // done
|
void ReportCrime(int32 crime, const CVector *pos); // done
|
||||||
void ResetAudioLogicTimers(uint32 timer);
|
void ResetAudioLogicTimers(uint32 timer); // done
|
||||||
void ResetPoliceRadio();
|
void ResetPoliceRadio(); //
|
||||||
void ResetTimers(uint32 time);
|
void ResetTimers(uint32 time); //
|
||||||
|
|
||||||
void Service();
|
void Service(); //done
|
||||||
void ServiceCollisions();
|
void ServiceCollisions();
|
||||||
void ServicePoliceRadio();
|
void ServicePoliceRadio();
|
||||||
void ServicePoliceRadioChannel(int32 wantedLevel);
|
void ServicePoliceRadioChannel(int32 wantedLevel);
|
||||||
|
|
Loading…
Reference in a new issue