summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikolay Korolev <nickvnuk@gmail.com>2020-04-07 22:44:30 +0200
committerNikolay Korolev <nickvnuk@gmail.com>2020-04-07 22:44:30 +0200
commit48e13ce6c93e7fc1cf75abbe082f383d28868cb6 (patch)
tree45a06cdca80919cf04ff46163e54675b22d39f3a
parentweather stuff (diff)
parentMerge pull request #386 from erorcun/erorcun (diff)
downloadre3-48e13ce6c93e7fc1cf75abbe082f383d28868cb6.tar
re3-48e13ce6c93e7fc1cf75abbe082f383d28868cb6.tar.gz
re3-48e13ce6c93e7fc1cf75abbe082f383d28868cb6.tar.bz2
re3-48e13ce6c93e7fc1cf75abbe082f383d28868cb6.tar.lz
re3-48e13ce6c93e7fc1cf75abbe082f383d28868cb6.tar.xz
re3-48e13ce6c93e7fc1cf75abbe082f383d28868cb6.tar.zst
re3-48e13ce6c93e7fc1cf75abbe082f383d28868cb6.zip
-rw-r--r--gamefiles/menu.txdbin0 -> 10244648 bytes
-rw-r--r--src/audio/AudioCollision.cpp18
-rw-r--r--src/audio/AudioManager.cpp1205
-rw-r--r--src/audio/AudioManager.h46
-rw-r--r--src/audio/PoliceRadio.cpp8
-rw-r--r--src/core/Camera.cpp42
-rw-r--r--src/core/Camera.h14
-rw-r--r--src/core/Frontend.cpp239
-rw-r--r--src/core/Frontend.h35
-rw-r--r--src/core/MenuScreens.h25
-rw-r--r--src/core/Radar.cpp183
-rw-r--r--src/core/Radar.h10
-rw-r--r--src/core/config.h2
13 files changed, 1124 insertions, 703 deletions
diff --git a/gamefiles/menu.txd b/gamefiles/menu.txd
new file mode 100644
index 00000000..8ca5de16
--- /dev/null
+++ b/gamefiles/menu.txd
Binary files differ
diff --git a/src/audio/AudioCollision.cpp b/src/audio/AudioCollision.cpp
index 850fafda..608b1a8d 100644
--- a/src/audio/AudioCollision.cpp
+++ b/src/audio/AudioCollision.cpp
@@ -154,18 +154,18 @@ cAudioManager::SetUpLoopingCollisionSound(cAudioCollision *col, uint8 counter)
m_sQueueSample.m_counter = counter;
m_sQueueSample.m_vecPos = col->m_vecPosition;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 7;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 7;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 4.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 5;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -274,15 +274,15 @@ cAudioManager::SetUpOneShotCollisionSound(cAudioCollision *col)
if(counter >= 255) counter = 28;
m_sQueueSample.m_vecPos = col->m_vecPosition;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 11;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 11;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.field_48 = 4.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 6df5fd19..b73cf3ca 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -178,37 +178,48 @@ enum eVehicleModel {
CAR159,
};
+enum PLAY_STATUS : uint8 {
+ PLAY_STATUS_STOPPED = 0,
+ PLAY_STATUS_PLAYING = 1,
+ PLAY_STATUS_FINISHED = 2
+};
+
+enum LOADING_STATUS : uint8 {
+ LOADING_STATUS_NOT_LOADED = 0,
+ LOADING_STATUS_LOADED = 1
+};
+
void
cPedComments::Add(tPedComment *com)
{
uint8 index;
- if(nrOfCommentsInBank[activeBank] >= NUM_PED_COMMENTS_SLOTS) {
- index = indexMap[activeBank][NUM_PED_COMMENTS_SLOTS - 1];
- if(m_asPedComments[activeBank][index].m_bVolume > com->m_bVolume) return;
+ if(m_nCommentsInBank[m_nActiveBank] >= NUM_PED_COMMENTS_SLOTS) {
+ index = m_nIndexMap[m_nActiveBank][NUM_PED_COMMENTS_SLOTS - 1];
+ if(m_asPedComments[m_nActiveBank][index].m_bVolume > com->m_bVolume) return;
} else {
- index = nrOfCommentsInBank[activeBank]++;
+ index = m_nCommentsInBank[m_nActiveBank]++;
}
- m_asPedComments[activeBank][index].m_nSampleIndex = com->m_nSampleIndex;
- m_asPedComments[activeBank][index].m_entityIndex = com->m_entityIndex;
- m_asPedComments[activeBank][index].m_vecPos = com->m_vecPos;
- m_asPedComments[activeBank][index].m_fDistance = com->m_fDistance;
- m_asPedComments[activeBank][index].m_bVolume = com->m_bVolume;
+ m_asPedComments[m_nActiveBank][index].m_nSampleIndex = com->m_nSampleIndex;
+ m_asPedComments[m_nActiveBank][index].m_nEntityIndex = com->m_nEntityIndex;
+ m_asPedComments[m_nActiveBank][index].m_vecPos = com->m_vecPos;
+ m_asPedComments[m_nActiveBank][index].m_fDistance = com->m_fDistance;
+ m_asPedComments[m_nActiveBank][index].m_bVolume = com->m_bVolume;
uint32 i = 0;
if(index != 0) {
for(i = 0; i < index; i++) {
- if(m_asPedComments[activeBank][indexMap[activeBank][i]].m_bVolume <
- m_asPedComments[activeBank][index].m_bVolume) {
+ if(m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][i]].m_bVolume <
+ m_asPedComments[m_nActiveBank][index].m_bVolume) {
break;
}
}
- if(i < index) memmove(&indexMap[activeBank][i + 1], &indexMap[activeBank][i], NUM_PED_COMMENTS_SLOTS -1 - i);
+ if(i < index) memmove(&m_nIndexMap[m_nActiveBank][i + 1], &m_nIndexMap[m_nActiveBank][i], NUM_PED_COMMENTS_SLOTS -1 - i);
}
- indexMap[activeBank][i] = index;
+ m_nIndexMap[m_nActiveBank][i] = index;
}
void
@@ -222,25 +233,25 @@ cPedComments::Process()
static const int policeHeliIntensity = 400;
if(!AudioManager.m_bUserPause) {
- if(nrOfCommentsInBank[activeBank]) {
- sampleIndex = m_asPedComments[activeBank][indexMap[activeBank][0]].m_nSampleIndex;
+ if(m_nCommentsInBank[m_nActiveBank]) {
+ sampleIndex = m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nSampleIndex;
if(!SampleManager.IsPedCommentLoaded(sampleIndex)) SampleManager.LoadPedComment(sampleIndex);
AudioManager.m_sQueueSample.m_nEntityIndex =
- m_asPedComments[activeBank][indexMap[activeBank][0]].m_entityIndex;
+ m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_nEntityIndex;
AudioManager.m_sQueueSample.m_counter = 0;
AudioManager.m_sQueueSample.m_nSampleIndex = sampleIndex;
AudioManager.m_sQueueSample.m_bBankIndex = SAMPLEBANK_PED;
- AudioManager.m_sQueueSample.field_16 = 3;
+ AudioManager.m_sQueueSample.m_nReleasingVolumeModificator = 3;
AudioManager.m_sQueueSample.m_bVolume =
- m_asPedComments[activeBank][indexMap[activeBank][0]].m_bVolume;
+ m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_bVolume;
AudioManager.m_sQueueSample.m_fDistance =
- m_asPedComments[activeBank][indexMap[activeBank][0]].m_fDistance;
+ m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_fDistance;
AudioManager.m_sQueueSample.m_nLoopCount = 1;
AudioManager.m_sQueueSample.m_nLoopStart = 0;
AudioManager.m_sQueueSample.m_nLoopEnd = -1;
AudioManager.m_sQueueSample.m_bEmittingVolume = maxVolume;
- AudioManager.m_sQueueSample.field_48 = 3.0f;
+ AudioManager.m_sQueueSample.m_fSpeedMultiplier = 3.0f;
switch(sampleIndex) {
case SFX_POLICE_HELI_1:
case SFX_POLICE_HELI_2:
@@ -249,9 +260,9 @@ cPedComments::Process()
break;
default: AudioManager.m_sQueueSample.m_fSoundIntensity = defaultIntensity; break;
}
- AudioManager.m_sQueueSample.field_56 = 1;
+ AudioManager.m_sQueueSample.m_bReleasingSoundFlag = 1;
AudioManager.m_sQueueSample.m_vecPos =
- m_asPedComments[activeBank][indexMap[activeBank][0]].m_vecPos;
+ m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].m_vecPos;
if(sampleIndex >= SFX_AMMU_D && sampleIndex <= SFX_AMMU_F) {
AudioManager.m_sQueueSample.m_bReverbFlag = false;
@@ -261,33 +272,33 @@ cPedComments::Process()
AudioManager.m_sQueueSample.m_bRequireReflection = true;
}
- AudioManager.m_sQueueSample.m_bIsDistant = false;
+ AudioManager.m_sQueueSample.m_bIs2D = false;
AudioManager.m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(AudioManager.m_sQueueSample.m_nSampleIndex) +
AudioManager.RandomDisplacement(750);
if(CTimer::GetIsSlowMotionActive()) AudioManager.m_sQueueSample.m_nFrequency /= 2;
- m_asPedComments[activeBank][indexMap[activeBank][0]].field_25 = -1;
+ m_asPedComments[m_nActiveBank][m_nIndexMap[m_nActiveBank][0]].field_25 = -1;
AudioManager.AddSampleToRequestedQueue();
}
// Switch bank
- if(activeBank) {
+ if(m_nActiveBank) {
actualUsedBank = SAMPLEBANK_PED;
- activeBank = SAMPLEBANK_MAIN;
+ m_nActiveBank = SAMPLEBANK_MAIN;
} else {
actualUsedBank = SAMPLEBANK_MAIN;
- activeBank = SAMPLEBANK_PED;
+ m_nActiveBank = SAMPLEBANK_PED;
}
comment = m_asPedComments[actualUsedBank];
- for(uint32 i = 0; i < nrOfCommentsInBank[actualUsedBank]; i++) {
- if(m_asPedComments[actualUsedBank][indexMap[actualUsedBank][i]].field_25 > 0) {
- --m_asPedComments[actualUsedBank][indexMap[actualUsedBank][i]].field_25;
- Add(&comment[indexMap[actualUsedBank][i]]);
+ for(uint32 i = 0; i < m_nCommentsInBank[actualUsedBank]; i++) {
+ if(m_asPedComments[actualUsedBank][m_nIndexMap[actualUsedBank][i]].field_25 > 0) {
+ --m_asPedComments[actualUsedBank][m_nIndexMap[actualUsedBank][i]].field_25;
+ Add(&comment[m_nIndexMap[actualUsedBank][i]]);
}
}
- for(uint32 i = 0; i < NUM_PED_COMMENTS_SLOTS; i++) { indexMap[actualUsedBank][i] = NUM_PED_COMMENTS_SLOTS; }
- nrOfCommentsInBank[actualUsedBank] = 0;
+ for(uint32 i = 0; i < NUM_PED_COMMENTS_SLOTS; i++) { m_nIndexMap[actualUsedBank][i] = NUM_PED_COMMENTS_SLOTS; }
+ m_nCommentsInBank[actualUsedBank] = 0;
}
}
@@ -318,21 +329,21 @@ cAudioManager::AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sampl
m_sQueueSample.m_counter = counter;
m_sQueueSample.m_nSampleIndex = sample;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nFrequency = freq;
if(notLooping) {
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_76 = 8;
+ m_sQueueSample.m_nReleasingVolumeDivider = 8;
} else {
m_sQueueSample.m_nLoopCount = 1;
}
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 6.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.field_56 = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -365,7 +376,7 @@ cAudioManager::AddReflectionsToRequestedQueue()
else
m_sQueueSample.m_nFrequency -= noise;
}
- m_sQueueSample.field_16 += 20;
+ m_sQueueSample.m_nReleasingVolumeModificator += 20;
m_sQueueSample.m_vecPos = m_avecReflectionsPos[i];
AddSampleToRequestedQueue();
}
@@ -377,7 +388,7 @@ cAudioManager::AddReflectionsToRequestedQueue()
void
cAudioManager::AddReleasingSounds()
{
- bool toProcess[44];
+ bool toProcess[44]; // why not 27?
int8 queue = m_bActiveSampleQueue == 0;
@@ -400,23 +411,24 @@ cAudioManager::AddReleasingSounds()
}
if(!toProcess[i]) {
if(sample.m_counter <= 255 || !sample.m_bLoopsRemaining) {
- if(!sample.field_76) continue;
+ if(!sample.m_nReleasingVolumeDivider) continue;
if(!sample.m_nLoopCount) {
- if(sample.field_88 == -1) {
- sample.field_88 = sample.m_bVolume / sample.field_76;
- if(sample.field_88 <= 0) sample.field_88 = 1;
+ if(sample.m_nVolumeChange == -1) {
+ sample.m_nVolumeChange = sample.m_bVolume / sample.m_nReleasingVolumeDivider;
+ if(sample.m_nVolumeChange <= 0) sample.m_nVolumeChange = 1;
}
- if(sample.m_bVolume <= sample.field_88) {
- sample.field_76 = 0;
+ if(sample.m_bVolume <= sample.m_nVolumeChange) {
+ sample.m_nReleasingVolumeDivider = 0;
continue;
}
- sample.m_bVolume -= sample.field_88;
+ sample.m_bVolume -= sample.m_nVolumeChange;
}
- --sample.field_76;
- if(field_2) {
- if(sample.field_16 < 20) ++sample.field_16;
+ --sample.m_nReleasingVolumeDivider;
+ if(m_bFifthFrameFlag) {
+ if(sample.m_nReleasingVolumeModificator < 20)
+ ++sample.m_nReleasingVolumeModificator;
}
- sample.field_56 = 0;
+ sample.m_bReleasingSoundFlag = 0;
}
memcpy(&m_sQueueSample, &sample, sizeof(tSound));
AddSampleToRequestedQueue();
@@ -432,7 +444,7 @@ cAudioManager::AddSampleToRequestedQueue()
bool bReflections;
if(m_sQueueSample.m_nSampleIndex < TOTAL_AUDIO_SAMPLES) {
- calculatedVolume = m_sQueueSample.field_16 * (maxVolume - m_sQueueSample.m_bVolume);
+ calculatedVolume = m_sQueueSample.m_nReleasingVolumeModificator * (maxVolume - m_sQueueSample.m_bVolume);
sampleIndex = m_bSampleRequestQueuesStatus[m_bActiveSampleQueue];
if(sampleIndex >= m_bActiveSamples) {
sampleIndex = m_abSampleQueueIndexTable[m_bActiveSampleQueue][m_bActiveSamples - 1];
@@ -442,7 +454,7 @@ cAudioManager::AddSampleToRequestedQueue()
}
m_sQueueSample.calculatedVolume = calculatedVolume;
m_sQueueSample.m_bLoopEnded = 0;
- if(m_sQueueSample.m_bIsDistant) {
+ if(m_sQueueSample.m_bIs2D) {
m_sQueueSample.m_bRequireReflection = false;
m_sQueueSample.m_bLoopsRemaining = 0;
}
@@ -486,8 +498,8 @@ cAudioManager::ClearActiveSamples()
m_asActiveSamples[i].m_counter = 0;
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
m_asActiveSamples[i].m_bBankIndex = SAMPLEBANK_INVALID;
- m_asActiveSamples[i].m_bIsDistant = false;
- m_asActiveSamples[i].field_16 = 5;
+ m_asActiveSamples[i].m_bIs2D = false;
+ m_asActiveSamples[i].m_nReleasingVolumeModificator = 5;
m_asActiveSamples[i].m_nFrequency = 0;
m_asActiveSamples[i].m_bVolume = 0;
m_asActiveSamples[i].m_bEmittingVolume = 0;
@@ -497,13 +509,13 @@ cAudioManager::ClearActiveSamples()
m_asActiveSamples[i].m_nLoopCount = 1;
m_asActiveSamples[i].m_nLoopStart = 0;
m_asActiveSamples[i].m_nLoopEnd = -1;
- m_asActiveSamples[i].field_48 = 0.0f;
+ m_asActiveSamples[i].m_fSpeedMultiplier = 0.0f;
m_asActiveSamples[i].m_fSoundIntensity = 200.0f;
m_asActiveSamples[i].m_bOffset = 63;
- m_asActiveSamples[i].field_56 = 0;
+ m_asActiveSamples[i].m_bReleasingSoundFlag = 0;
m_asActiveSamples[i].calculatedVolume = 0;
- m_asActiveSamples[i].field_76 = 0;
- m_asActiveSamples[i].field_88 = -1;
+ m_asActiveSamples[i].m_nReleasingVolumeDivider = 0;
+ m_asActiveSamples[i].m_nVolumeChange = -1;
m_asActiveSamples[i].m_vecPos = {0.0f, 0.0f, 0.0f};
m_asActiveSamples[i].m_bReverbFlag = false;
m_asActiveSamples[i].m_bLoopsRemaining = 0;
@@ -516,8 +528,8 @@ cAudioManager::ClearMissionAudio()
{
if(m_bIsInitialised) {
m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
- m_sMissionAudio.m_bLoadingStatus = 0;
- m_sMissionAudio.m_bPlayStatus = 0;
+ m_sMissionAudio.m_bLoadingStatus = LOADING_STATUS_NOT_LOADED;
+ m_sMissionAudio.m_bPlayStatus = PLAY_STATUS_STOPPED;
m_sMissionAudio.field_22 = 0;
m_sMissionAudio.m_bIsPlayed = false;
m_sMissionAudio.field_12 = 1;
@@ -542,14 +554,14 @@ cAudioManager::ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1,
if(!TheCamera.Get_Just_Switched_Status() && speedMultiplier != 0.0f) {
float dist = position2 - position1;
if(dist != 0.0f) {
- float speedOfSource = (dist / field_19195) * speedMultiplier;
- if(speedOfSound > Abs(speedOfSource)) {
+ float speedOfSource = (dist / field_19192) * speedMultiplier;
+ if(m_fSpeedOfSound > Abs(speedOfSource)) {
if(speedOfSource < 0.0f) {
speedOfSource = max(speedOfSource, -1.5f);
} else {
speedOfSource = min(speedOfSource, 1.5f);
}
- newFreq = (oldFreq * speedOfSound) / (speedOfSource + speedOfSound);
+ newFreq = (oldFreq * m_fSpeedOfSound) / (speedOfSource + m_fSpeedOfSound);
}
}
}
@@ -2466,7 +2478,7 @@ cAudioManager::IsAudioInitialised() const
bool
cAudioManager::IsMissionAudioSampleFinished()
{
- if(m_bIsInitialised) return m_sMissionAudio.m_bPlayStatus == 2;
+ if(m_bIsInitialised) return m_sMissionAudio.m_bPlayStatus == PLAY_STATUS_FINISHED;
static int32 cPretendFrame = 1;
@@ -2504,7 +2516,7 @@ cAudioManager::MissionScriptAudioUsesPoliceChannel(int32 soundMission) const
void
cAudioManager::PlayLoadedMissionAudio()
{
- if(m_bIsInitialised && m_sMissionAudio.m_nSampleIndex != NO_SAMPLE && m_sMissionAudio.m_bLoadingStatus == 1 &&
+ if(m_bIsInitialised && m_sMissionAudio.m_nSampleIndex != NO_SAMPLE && m_sMissionAudio.m_bLoadingStatus == LOADING_STATUS_LOADED &&
!m_sMissionAudio.m_bPlayStatus) {
m_sMissionAudio.m_bIsPlayed = true;
}
@@ -2601,8 +2613,8 @@ cAudioManager::PostInitialiseGameSpecificSetup()
if(m_nBridgeEntity >= 0) SetEntityStatus(m_nBridgeEntity, 1);
m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
- m_sMissionAudio.m_bLoadingStatus = 0;
- m_sMissionAudio.m_bPlayStatus = 0;
+ m_sMissionAudio.m_bLoadingStatus = LOADING_STATUS_NOT_LOADED;
+ m_sMissionAudio.m_bPlayStatus = PLAY_STATUS_STOPPED;
m_sMissionAudio.field_22 = 0;
m_sMissionAudio.m_bIsPlayed = false;
m_sMissionAudio.field_12 = 1;
@@ -2698,8 +2710,8 @@ cAudioManager::PreloadMissionAudio(const char *name)
int32 missionAudioSfx = FindMissionAudioSfx(name);
if(missionAudioSfx != NO_SAMPLE) {
m_sMissionAudio.m_nSampleIndex = missionAudioSfx;
- m_sMissionAudio.m_bLoadingStatus = 0;
- m_sMissionAudio.m_bPlayStatus = 0;
+ m_sMissionAudio.m_bLoadingStatus = LOADING_STATUS_NOT_LOADED;
+ m_sMissionAudio.m_bPlayStatus = PLAY_STATUS_STOPPED;
m_sMissionAudio.field_22 = 0;
m_sMissionAudio.field_24 =
field_19192 * SampleManager.GetStreamedFileLength(missionAudioSfx) / 1000;
@@ -2710,7 +2722,6 @@ cAudioManager::PreloadMissionAudio(const char *name)
}
}
}
-
void
cAudioManager::PreTerminateGameSpecificShutdown()
{
@@ -2792,9 +2803,9 @@ cAudioManager::ProcessActiveQueues()
}
sample.m_bIsProcessed = 1;
m_asActiveSamples[j].m_bIsProcessed = 1;
- sample.field_88 = -1;
- if (!sample.field_56) {
- if (sample.m_bIsDistant) {
+ sample.m_nVolumeChange = -1;
+ if (!sample.m_bReleasingSoundFlag) {
+ if (sample.m_bIs2D) {
if (field_4) {
emittingVol = 2 * min(63, sample.m_bEmittingVolume);
}
@@ -2809,7 +2820,7 @@ cAudioManager::ProcessActiveQueues()
position2 = sample.m_fDistance;
position1 = m_asActiveSamples[j].m_fDistance;
sample.m_nFrequency = ComputeDopplerEffectedFrequency(
- sample.m_nFrequency, position1, position2, sample.field_48);
+ sample.m_nFrequency, position1, position2, sample.m_fSpeedMultiplier);
if (sample.m_nFrequency != m_asActiveSamples[j].m_nFrequency) {
int32 freq;
if (sample.m_nFrequency <=
@@ -2872,17 +2883,16 @@ cAudioManager::ProcessActiveQueues()
if (m_asActiveSamples[i].m_nSampleIndex != NO_SAMPLE && !m_asActiveSamples[i].m_bIsProcessed) {
SampleManager.StopChannel(i);
m_asActiveSamples[i].m_nSampleIndex = NO_SAMPLE;
- m_asActiveSamples[i].m_nEntityIndex = -5;
+ m_asActiveSamples[i].m_nEntityIndex = AEHANDLE_NONE;
}
}
for (int32 i = 0; i < m_bSampleRequestQueuesStatus[m_bActiveSampleQueue]; ++i) {
-
tSound& sample = m_asSamples[m_bActiveSampleQueue][m_abSampleQueueIndexTable[m_bActiveSampleQueue][i]];
if (!sample.m_bIsProcessed && !sample.m_bLoopEnded &&
m_asAudioEntities[sample.m_nEntityIndex].m_bIsUsed && sample.m_nSampleIndex < NO_SAMPLE) {
if (sample.m_counter > 255 && sample.m_nLoopCount && sample.m_bLoopsRemaining) {
--sample.m_bLoopsRemaining;
- sample.field_76 = 1;
+ sample.m_nReleasingVolumeDivider = 1;
}
else {
for (int32 j = 0; j < m_bActiveSamples; ++j) {
@@ -2892,10 +2902,10 @@ cAudioManager::ProcessActiveQueues()
v29 = sample.m_nLoopCount *
SampleManager.GetSampleLength(sample.m_nSampleIndex);
if (v28 == 0) continue;
- sample.field_76 = v29 / v28 + 1;
+ sample.m_nReleasingVolumeDivider = v29 / v28 + 1;
}
memcpy(&m_asActiveSamples[j], &sample, sizeof(tSound));
- if (!m_asActiveSamples[j].m_bIsDistant)
+ if (!m_asActiveSamples[j].m_bIs2D)
TranslateEntity(&m_asActiveSamples[j].m_vecPos, &position);
if (field_4) {
emittingVol =
@@ -2917,7 +2927,7 @@ cAudioManager::ProcessActiveQueues()
j, m_asActiveSamples[j].m_nLoopCount);
SampleManager.SetChannelReverbFlag(
j, m_asActiveSamples[j].m_bReverbFlag);
- if (m_asActiveSamples[j].m_bIsDistant) {
+ if (m_asActiveSamples[j].m_bIs2D) {
uint8 offset = m_asActiveSamples[j].m_bOffset;
if (offset == 63) {
x = 0.f;
@@ -2946,7 +2956,7 @@ cAudioManager::ProcessActiveQueues()
}
m_asActiveSamples[j].m_bIsProcessed = 1;
sample.m_bIsProcessed = 1;
- sample.field_88 = -1;
+ sample.m_nVolumeChange = -1;
break;
}
}
@@ -2978,15 +2988,15 @@ cAudioManager::ProcessAirBrakes(cVehicleParams *params)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_AIR_BRAKES);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 10;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 10;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bEmittingVolume = rand;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.field_48 = 0.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3022,11 +3032,11 @@ cAudioManager::ProcessAirportScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bEmittingVolume = 110;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -3065,18 +3075,18 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
m_sQueueSample.m_nFrequency = 10386;
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex << 16) % 1000;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 80;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 7;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 7;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3109,17 +3119,17 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
m_sQueueSample.m_nSampleIndex = SFX_POLICE_BOAT_ACCEL;
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex << 16) % 1000;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 7;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 7;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
} else {
@@ -3168,17 +3178,17 @@ cAudioManager::ProcessBoatEngine(cVehicleParams *params)
if(!m_sQueueSample.m_bVolume) return 1;
m_sQueueSample.m_nFrequency += (m_sQueueSample.m_nEntityIndex << 16) % 1000;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 7;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 7;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
}
@@ -3209,17 +3219,17 @@ cAudioManager::ProcessBoatMovingOverWater(cVehicleParams *params)
m_sQueueSample.m_counter = 38;
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = (6050.f * multiplier) + 16000;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = vol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3264,18 +3274,18 @@ cAudioManager::ProcessBridgeMotor()
m_sQueueSample.m_counter = 1;
m_sQueueSample.m_nSampleIndex = SFX_FISHING_BOAT_IDLE; // todo check sfx name
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 1;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = 5500;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = maxVolume;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = bridgeIntensity;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = false;
AddSampleToRequestedQueue();
}
@@ -3308,17 +3318,17 @@ cAudioManager::ProcessBridgeOneShots()
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 2;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 1;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bEmittingVolume = maxVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = bridgeIntensity;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bReverbFlag = false;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3335,18 +3345,18 @@ cAudioManager::ProcessBridgeWarning()
m_sQueueSample.m_counter = 0;
m_sQueueSample.m_nSampleIndex = SFX_BRIDGE_OPEN_WARNING;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 1;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BRIDGE_OPEN_WARNING);
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 100;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 450.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 8;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 8;
m_sQueueSample.m_bReverbFlag = false;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3368,18 +3378,18 @@ cAudioManager::ProcessCarBombTick(cVehicleParams *params)
m_sQueueSample.m_counter = 35;
m_sQueueSample.m_nSampleIndex = SFX_COUNTDOWN;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_COUNTDOWN);
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 60;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 40.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3415,18 +3425,18 @@ cAudioManager::ProcessCesna(cVehicleParams *params)
m_sQueueSample.m_counter = 52;
m_sQueueSample.m_nSampleIndex = SFX_CESNA_IDLE;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nFrequency = 12500;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_76 = 8;
+ m_sQueueSample.m_nReleasingVolumeDivider = 8;
m_sQueueSample.m_bEmittingVolume = 80;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 8.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 8.0f;
m_sQueueSample.m_fSoundIntensity = 200.0f;
- m_sQueueSample.field_56 = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3437,19 +3447,19 @@ cAudioManager::ProcessCesna(cVehicleParams *params)
m_sQueueSample.m_counter = 2;
m_sQueueSample.m_nSampleIndex = SFX_CESNA_REV;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nFrequency = 25000;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_76 = 4;
+ m_sQueueSample.m_nReleasingVolumeDivider = 4;
m_sQueueSample.m_bEmittingVolume = 80;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 8.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 8.0f;
m_sQueueSample.m_fSoundIntensity = 90.0f;
- m_sQueueSample.field_56 = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3489,11 +3499,11 @@ cAudioManager::ProcessCinemaScriptObject(uint8 sound)
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 4);
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bEmittingVolume = rand;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -3526,8 +3536,8 @@ cAudioManager::ProcessCrane()
m_sQueueSample.m_counter = 0;
m_sQueueSample.m_nSampleIndex = SFX_CRANE_MAGNET;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 2;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency = 6000;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 100;
@@ -3535,10 +3545,10 @@ cAudioManager::ProcessCrane()
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 4.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3549,7 +3559,7 @@ cAudioManager::ProcessCrane()
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_COL_CAR_2);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = true;
AddSampleToRequestedQueue();
@@ -3592,11 +3602,11 @@ cAudioManager::ProcessDocksScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOCKS_FOGHORN);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 3);
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bEmittingVolume = rand;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -3624,12 +3634,12 @@ cAudioManager::ProcessEngineDamage(cVehicleParams *params)
if(engineStatus < 225) {
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
emittingVolume = 6;
- m_sQueueSample.field_16 = 7;
+ m_sQueueSample.m_nReleasingVolumeModificator = 7;
m_sQueueSample.m_nFrequency = 40000;
} else {
emittingVolume = 60;
m_sQueueSample.m_nSampleIndex = SFX_CAR_ON_FIRE;
- m_sQueueSample.field_16 = 7;
+ m_sQueueSample.m_nReleasingVolumeModificator = 7;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
}
CalculateDistance(params->m_bDistanceCalculated, params->m_fDistance);
@@ -3637,16 +3647,16 @@ cAudioManager::ProcessEngineDamage(cVehicleParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 28;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = engineDamageIntensity;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3752,14 +3762,14 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_fSoundIntensity = 400.0f;
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 38000;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
break;
case EXPLOSION_MOLOTOV:
m_sQueueSample.m_fSoundIntensity = 200.0f;
m_sQueueSample.m_nSampleIndex = SFX_EXPLOSION_3;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 19000;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
break;
case EXPLOSION_MINE:
@@ -3767,7 +3777,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_fSoundIntensity = 300.0f;
m_sQueueSample.m_nSampleIndex = SFX_ROCKET_LEFT;
m_sQueueSample.m_nFrequency = RandomDisplacement(1000) + 12347;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
break;
default:
@@ -3776,7 +3786,7 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 38000;
if(type == EXPLOSION_HELI)
m_sQueueSample.m_nFrequency = 8 * m_sQueueSample.m_nFrequency / 10;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
break;
}
@@ -3789,10 +3799,10 @@ cAudioManager::ProcessExplosions(int32 explosion)
m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = i;
- m_sQueueSample.field_48 = 2.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bEmittingVolume = maxVolume;
m_sQueueSample.m_nLoopStart = 0;
@@ -3822,18 +3832,18 @@ cAudioManager::ProcessFireHydrant()
m_sQueueSample.m_counter = 0;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 4;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 4;
m_sQueueSample.m_nFrequency = 15591;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 40;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = intensity;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -3859,7 +3869,7 @@ void cAudioManager::ProcessFires(int32)
m_sQueueSample.m_nFrequency =
8 * SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE) / 10;
m_sQueueSample.m_nFrequency += i * ((uint32)m_sQueueSample.m_nFrequency >> 6);
- m_sQueueSample.field_16 = 6;
+ m_sQueueSample.m_nReleasingVolumeModificator = 6;
break;
case ENTITY_TYPE_PED:
m_sQueueSample.m_fSoundIntensity = 25.0f;
@@ -3868,7 +3878,7 @@ void cAudioManager::ProcessFires(int32)
SampleManager.GetSampleBaseFrequency(SFX_PED_ON_FIRE);
emittingVol = 60;
m_sQueueSample.m_nFrequency += i * ((uint32)m_sQueueSample.m_nFrequency >> 6);
- m_sQueueSample.field_16 = 10;
+ m_sQueueSample.m_nReleasingVolumeModificator = 10;
break;
default:
m_sQueueSample.m_fSoundIntensity = 50.0f;
@@ -3877,7 +3887,7 @@ void cAudioManager::ProcessFires(int32)
SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
m_sQueueSample.m_nFrequency += i * ((uint32)m_sQueueSample.m_nFrequency >> 6);
emittingVol = 80;
- m_sQueueSample.field_16 = 8;
+ m_sQueueSample.m_nReleasingVolumeModificator = 8;
}
} else {
m_sQueueSample.m_fSoundIntensity = 50.0f;
@@ -3885,7 +3895,7 @@ void cAudioManager::ProcessFires(int32)
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
m_sQueueSample.m_nFrequency += i * ((uint32)m_sQueueSample.m_nFrequency >> 6);
emittingVol = 80;
- m_sQueueSample.field_16 = 8;
+ m_sQueueSample.m_nReleasingVolumeModificator = 8;
}
m_sQueueSample.m_vecPos = gFireManager.m_aFires[i].m_vecPos;
distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos);
@@ -3896,11 +3906,11 @@ void cAudioManager::ProcessFires(int32)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = i;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.field_48 = 2.0f;
- m_sQueueSample.field_76 = 10;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeDivider = 10;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_56 = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
@@ -4051,10 +4061,10 @@ cAudioManager::ProcessFrontEnd()
m_sQueueSample.m_bVolume = 110;
m_sQueueSample.m_counter = counter++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.field_16 = 0;
- m_sQueueSample.m_bIsDistant = true;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_bIs2D = true;
m_sQueueSample.m_bEmittingVolume = m_sQueueSample.m_bVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -4107,15 +4117,15 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nFrequency = 18000; \
} \
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN; \
- m_sQueueSample.field_16 = 4; \
+ m_sQueueSample.m_nReleasingVolumeModificator = 4; \
m_sQueueSample.m_bEmittingVolume = 60; \
- m_sQueueSample.field_48 = 0.0f; \
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f; \
m_sQueueSample.m_fSoundIntensity = 80.0f; \
- /*m_sQueueSample.field_16 = 4;*/ \
+ /*m_sQueueSample.m_nReleasingVolumeModificator = 4;*/ \
m_sQueueSample.m_bReverbFlag = true; \
/*m_sQueueSample.m_bReverbFlag = true;*/ \
- m_sQueueSample.m_bIsDistant = false; \
- m_sQueueSample.field_56 = 1; \
+ m_sQueueSample.m_bIs2D = false; \
+ m_sQueueSample.m_bReleasingSoundFlag = 1; \
m_sQueueSample.m_nLoopCount = 1; \
m_sQueueSample.m_nLoopStart = 0; \
m_sQueueSample.m_nLoopEnd = -1; \
@@ -4163,12 +4173,12 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nFrequency +=
RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_counter = iSound++;
if(iSound < 32) iSound = 32;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_bEmittingVolume = 90;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(
@@ -4176,7 +4186,7 @@ cAudioManager::ProcessGarages()
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(
m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
@@ -4192,17 +4202,17 @@ cAudioManager::ProcessGarages()
}
m_sQueueSample.m_counter = i;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_56 = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_bEmittingVolume = 90;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_fSoundIntensity = 80.0f;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
@@ -4252,8 +4262,8 @@ cAudioManager::ProcessHelicopter(cVehicleParams *params)
m_sQueueSample.m_counter = i + 65;
m_sQueueSample.m_nSampleIndex = i + SFX_HELI_1;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_nFrequency = 1200 * heli->m_nHeliId + SampleManager.GetSampleBaseFrequency(
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopCount = 0;
@@ -4261,10 +4271,10 @@ cAudioManager::ProcessHelicopter(cVehicleParams *params)
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 6.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = gHeliSfxRanges[i].m_fMaxDistance;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -4306,11 +4316,11 @@ cAudioManager::ProcessHomeScriptObject(uint8 sound)
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 0.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bEmittingVolume = rand;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -4452,11 +4462,11 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_LAUNDERETTE_LOOP);
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_16 = 5;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bEmittingVolume = 45;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
@@ -4472,11 +4482,11 @@ cAudioManager::ProcessLaunderetteScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_LAUNDERETTE_SONG_LOOP);
m_sQueueSample.m_counter = 1;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bEmittingVolume = 110;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
@@ -4501,9 +4511,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_1_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4511,9 +4521,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_2_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4521,9 +4531,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_2_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4531,9 +4541,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_2);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_3_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4541,9 +4551,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_3_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4551,9 +4561,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_3);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_4_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4561,9 +4571,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_4_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4571,9 +4581,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_4);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_5_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4581,9 +4591,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_5);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_5_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4591,9 +4601,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_5);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_6_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4601,9 +4611,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_6);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_6_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4611,9 +4621,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_6);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_7_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4621,9 +4631,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_7);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_7_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4631,9 +4641,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_7);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_8_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4641,9 +4651,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_8);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_8_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4651,9 +4661,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_8);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_9_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4661,9 +4671,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_9);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_9_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4671,9 +4681,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_9);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_10_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4681,9 +4691,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_10);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_10_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4691,9 +4701,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_10);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_11_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4701,9 +4711,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_11);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_11_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4711,9 +4721,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_11);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_12_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4721,9 +4731,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_12);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_12_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4731,9 +4741,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_12);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_13_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4741,9 +4751,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_RAGGA);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_13_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4751,9 +4761,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_RAGGA);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_1_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4761,9 +4771,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_1);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_1_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4771,9 +4781,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_1);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_2_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4781,9 +4791,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_2);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_STRIP_CLUB_LOOP_2_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4791,9 +4801,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_STRIP_CLUB_2);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_WORK_SHOP_LOOP_S:
case SCRIPT_SOUND_WORK_SHOP_LOOP_L: ProcessWorkShopScriptObject(sound); return;
@@ -4805,9 +4815,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOG_FOOD_FACTORY);
- m_sQueueSample.field_16 = 6;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 6;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_39:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4815,9 +4825,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_DOG_FOOD_FACTORY);
- m_sQueueSample.field_16 = 6;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 6;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_LAUNDERETTE_LOOP_S:
case SCRIPT_SOUND_LAUNDERETTE_LOOP_L: ProcessLaunderetteScriptObject(sound); return;
@@ -4827,9 +4837,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_CHINATOWN);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_CHINATOWN_RESTAURANT_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4837,9 +4847,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_CHINATOWN);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_CIPRIANI_RESAURANT_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4847,9 +4857,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_ITALY);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_CIPRIANI_RESAURANT_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4857,9 +4867,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_ITALY);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_46_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4867,9 +4877,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_1);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_47_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4877,9 +4887,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_1);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_MARCO_BISTRO_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4887,9 +4897,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_2);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_MARCO_BISTRO_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4897,9 +4907,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 110;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RESTAURANT_GENERIC_2);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_AIRPORT_LOOP_S:
case SCRIPT_SOUND_AIRPORT_LOOP_L: ProcessAirportScriptObject(sound); return;
@@ -4917,9 +4927,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PIANO_BAR_1);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PARTY_1_LOOP:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4927,9 +4937,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CLUB_1);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PORN_CINEMA_1_S:
case SCRIPT_SOUND_PORN_CINEMA_1_L:
@@ -4945,9 +4955,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BANK_ALARM_1);
- m_sQueueSample.field_16 = 2;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_BANK_ALARM_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4955,9 +4965,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 90;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_BANK_ALARM_1);
- m_sQueueSample.field_16 = 2;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_POLICE_BALL_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4965,9 +4975,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_BALL_1);
- m_sQueueSample.field_16 = 2;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_POLICE_BALL_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4975,9 +4985,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_BALL_1);
- m_sQueueSample.field_16 = 2;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -4985,9 +4995,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_INDUSTRIAL);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -4995,9 +5005,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_INDUSTRIAL);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_S:
case SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_L: ProcessPoliceCellBeatingScriptObject(sound); return;
@@ -5008,9 +5018,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_1_LOOP_L:
case SCRIPT_SOUND_RAVE_2_LOOP_L:
@@ -5019,9 +5029,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_3_LOOP_S:
m_sQueueSample.m_fSoundIntensity = 30.0f;
@@ -5029,9 +5039,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_SUBURBAN);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_RAVE_3_LOOP_L:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -5039,9 +5049,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_RAVE_SUBURBAN);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_76 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
case SCRIPT_SOUND_PRETEND_FIRE_LOOP:
m_sQueueSample.m_fSoundIntensity = 50.0f;
@@ -5049,9 +5059,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_CAR_ON_FIRE);
- m_sQueueSample.field_16 = 8;
- m_sQueueSample.field_76 = 10;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeModificator = 8;
+ m_sQueueSample.m_nReleasingVolumeDivider = 10;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
break;
default: return;
}
@@ -5063,9 +5073,9 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
ComputeVolume(emittingVolume, m_sQueueSample.m_fSoundIntensity, m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_56 = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart =
@@ -5093,12 +5103,12 @@ cAudioManager::ProcessMissionAudio()
if(m_bIsInitialised) {
if(m_sMissionAudio.m_nSampleIndex != NO_SAMPLE) {
switch(m_sMissionAudio.m_bLoadingStatus) {
- case 0:
+ case LOADING_STATUS_NOT_LOADED:
SampleManager.PreloadStreamedFile(m_sMissionAudio.m_nSampleIndex, 1);
- m_sMissionAudio.m_bLoadingStatus = 1;
+ m_sMissionAudio.m_bLoadingStatus = LOADING_STATUS_LOADED;
nFramesUntilFailedLoad = 0;
return;
- case 1:
+ case LOADING_STATUS_LOADED:
if(!m_sMissionAudio.m_bIsPlayed) return;
if(g_bMissionAudioLoadFailed) {
if(m_bTimerJustReset) {
@@ -5109,15 +5119,15 @@ cAudioManager::ProcessMissionAudio()
nFramesUntilFailedLoad = 0;
} else if(!m_bUserPause) {
if(++nFramesForPretendPlaying < 120) {
- m_sMissionAudio.m_bPlayStatus = 1;
+ m_sMissionAudio.m_bPlayStatus = PLAY_STATUS_PLAYING;
} else {
- m_sMissionAudio.m_bPlayStatus = 2;
+ m_sMissionAudio.m_bPlayStatus = PLAY_STATUS_FINISHED;
m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
}
}
} else {
if(m_sMissionAudio.m_bPlayStatus) {
- if(m_sMissionAudio.m_bPlayStatus != 1) return;
+ if(m_sMissionAudio.m_bPlayStatus != PLAY_STATUS_PLAYING) return;
if(m_bTimerJustReset) {
ClearMissionAudio();
SampleManager.StopStreamedFile(1);
@@ -5129,9 +5139,10 @@ cAudioManager::ProcessMissionAudio()
if(nCheckPlayingDelay) {
--nCheckPlayingDelay;
} else if(GetMissionScriptPoliceAudioPlayingStatus() ==
- 2 ||
+ PLAY_STATUS_FINISHED ||
m_sMissionAudio.field_24-- == 0) {
- m_sMissionAudio.m_bPlayStatus = 2;
+ m_sMissionAudio.m_bPlayStatus =
+ PLAY_STATUS_FINISHED;
m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
SampleManager.StopStreamedFile(1);
m_sMissionAudio.field_24 = 0;
@@ -5145,7 +5156,7 @@ cAudioManager::ProcessMissionAudio()
else
SampleManager.PauseStream(0, 1);
} else {
- m_sMissionAudio.m_bPlayStatus = 2;
+ m_sMissionAudio.m_bPlayStatus = PLAY_STATUS_FINISHED;
m_sMissionAudio.m_nSampleIndex = NO_SAMPLE;
SampleManager.StopStreamedFile(1);
m_sMissionAudio.field_24 = 0;
@@ -5184,7 +5195,7 @@ cAudioManager::ProcessMissionAudio()
}
SampleManager.StartPreloadedStreamedFile(1);
}
- m_sMissionAudio.m_bPlayStatus = 1;
+ m_sMissionAudio.m_bPlayStatus = PLAY_STATUS_PLAYING;
nCheckPlayingDelay = 30;
}
}
@@ -5194,7 +5205,7 @@ cAudioManager::ProcessMissionAudio()
nFramesForPretendPlaying = 0;
g_bMissionAudioLoadFailed = 1;
nFramesUntilFailedLoad = 0;
- m_sMissionAudio.m_bLoadingStatus = 1;
+ m_sMissionAudio.m_bLoadingStatus = LOADING_STATUS_LOADED;
}
return;
default: return;
@@ -5235,8 +5246,8 @@ cAudioManager::ProcessModelCarEngine(cVehicleParams *params)
m_sQueueSample.m_counter = 2;
m_sQueueSample.m_nSampleIndex = SFX_REMOTE_CONTROLLED_CAR;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 1;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency =
(11025.f * velocityChange / params->m_pTransmission->fMaxVelocity +
11025.f);
@@ -5246,10 +5257,10 @@ cAudioManager::ProcessModelCarEngine(cVehicleParams *params)
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 3.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -5296,9 +5307,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency = 10600;
else
m_sQueueSample.m_nFrequency = 9000;
- m_sQueueSample.field_16 = 1;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_bRequireReflection = true;
emittingVolume = RandomDisplacement(10) + 50;
break;
@@ -5310,9 +5321,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 5);
- m_sQueueSample.field_16 = 9;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 9;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
emittingVolume = m_anRandomTable[2] % 20 + 90;
break;
case SCRIPT_SOUND_110:
@@ -5323,9 +5334,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = maxVolume;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_TRAIN_STATION_ANNOUNCE);
- m_sQueueSample.field_16 = 0;
- m_sQueueSample.field_48 = 2.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
+ m_sQueueSample.m_bIs2D = false;
break;
case SCRIPT_SOUND_PAYPHONE_RINGING:
m_sQueueSample.m_fSoundIntensity = 80.0f;
@@ -5333,9 +5344,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 80;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_PHONE_RING);
- m_sQueueSample.field_16 = 1;
- m_sQueueSample.field_48 = 2.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_bRequireReflection = false;
break;
case SCRIPT_SOUND_GLASS_BREAK_L:
@@ -5344,9 +5355,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 70;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
break;
case SCRIPT_SOUND_GLASS_BREAK_S:
m_sQueueSample.m_fSoundIntensity = 60.0f;
@@ -5354,9 +5365,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 60;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_SMASH);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
break;
case SCRIPT_SOUND_GLASS_CRACK:
m_sQueueSample.m_fSoundIntensity = 60.0f;
@@ -5364,9 +5375,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
emittingVolume = 70;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_GLASS_CRACK);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_bRequireReflection = true;
break;
case SCRIPT_SOUND_GLASS_LIGHT_BREAK:
@@ -5374,9 +5385,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[4] & 3) + SFX_GLASS_SHARD_1;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = RandomDisplacement(2000) + 19000;
- m_sQueueSample.field_16 = 9;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 9;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
emittingVolume = RandomDisplacement(11) + 25;
break;
case SCRIPT_SOUND_BOX_DESTROYED_1:
@@ -5384,9 +5395,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = SFX_WOODEN_BOX_SMASH;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_bRequireReflection = true;
emittingVolume = m_anRandomTable[2] % 20 + 80;
break;
@@ -5395,9 +5406,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_nSampleIndex = SFX_CARDBOARD_BOX_SMASH;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = RandomDisplacement(1500) + 18600;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_bRequireReflection = true;
emittingVolume = m_anRandomTable[2] % 20 + 80;
break;
@@ -5407,9 +5418,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_bRequireReflection = true;
emittingVolume = m_anRandomTable[2] % 30 + 70;
break;
@@ -5419,9 +5430,9 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_bRequireReflection = true;
emittingVolume = m_anRandomTable[2] % 30 + 60;
break;
@@ -5439,11 +5450,11 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
case SURFACE_HEDGE:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 11000;
- m_sQueueSample.field_16 = 18;
+ m_sQueueSample.m_nReleasingVolumeModificator = 18;
m_sQueueSample.m_fSoundIntensity = 20.0f;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
emittingVolume = m_anRandomTable[2] % 20 + 30;
distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos);
if(distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
@@ -5454,7 +5465,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -5469,21 +5480,21 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
}
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_1;
m_sQueueSample.m_nFrequency = RandomDisplacement(750) + 18000;
- m_sQueueSample.field_16 = 15;
+ m_sQueueSample.m_nReleasingVolumeModificator = 15;
m_sQueueSample.m_fSoundIntensity = 20.0f;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
emittingVolume = m_anRandomTable[2] % 20 + 30;
break;
case SCRIPT_SOUND_GUNSHELL_DROP_SOFT:
m_sQueueSample.m_nSampleIndex = SFX_BULLET_SHELL_HIT_GROUND_2;
m_sQueueSample.m_nFrequency = RandomDisplacement(500) + 11000;
- m_sQueueSample.field_16 = 18;
+ m_sQueueSample.m_nReleasingVolumeModificator = 18;
m_sQueueSample.m_fSoundIntensity = 20.0f;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.field_48 = 0.0f;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
+ m_sQueueSample.m_bIs2D = false;
emittingVolume = m_anRandomTable[2] % 20 + 30;
break;
default: return;
@@ -5497,7 +5508,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = iSound++;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bEmittingVolume = emittingVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -5556,8 +5567,8 @@ cAudioManager::ProcessPedHeadphones(cPedParams *params)
m_sQueueSample.m_counter = 64;
m_sQueueSample.m_nSampleIndex = SFX_HEADPHONES;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 5;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_HEADPHONES);
m_sQueueSample.m_nLoopCount = 0;
@@ -5566,10 +5577,10 @@ cAudioManager::ProcessPedHeadphones(cPedParams *params)
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 4.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 7.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 5;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -6785,11 +6796,11 @@ cAudioManager::ProcessPoliceCellBeatingScriptObject(uint8 sound)
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency / 16);
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 0.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -6866,11 +6877,11 @@ cAudioManager::ProcessPornCinema(uint8 sound)
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bEmittingVolume = maxVolume;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
@@ -6893,11 +6904,11 @@ cAudioManager::ProcessPornCinema(uint8 sound)
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nFrequency += RandomDisplacement(m_sQueueSample.m_nFrequency >> 4);
m_sQueueSample.m_counter = rand + 1;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
- m_sQueueSample.field_16 = 6;
- m_sQueueSample.field_48 = 0.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
+ m_sQueueSample.m_nReleasingVolumeModificator = 6;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bReverbFlag = true;
@@ -6924,7 +6935,7 @@ cAudioManager::ProcessProjectiles()
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_ROCKET_FLY);
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
break;
case WEAPONTYPE_MOLOTOV:
emittingVol = molotovVolume;
@@ -6933,12 +6944,12 @@ cAudioManager::ProcessProjectiles()
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency =
32 * SampleManager.GetSampleBaseFrequency(SFX_PED_ON_FIRE) / 25;
- m_sQueueSample.field_16 = 7;
+ m_sQueueSample.m_nReleasingVolumeModificator = 7;
break;
default: return;
}
- m_sQueueSample.field_48 = 4.0f;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_vecPos = CProjectileInfo::ms_apProjectile[i]->GetPosition();
float distSquared = GetDistanceSquared(&m_sQueueSample.m_vecPos);
if(distSquared < SQR(m_sQueueSample.m_fSoundIntensity)) {
@@ -6947,14 +6958,14 @@ cAudioManager::ProcessProjectiles()
m_sQueueSample.m_fDistance);
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = i;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_56 = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -6986,16 +6997,16 @@ cAudioManager::ProcessRainOnVehicle(cVehicleParams *params)
if(veh->m_bRainSamplesCounter > 4) veh->m_bRainSamplesCounter = 68;
m_sQueueSample.m_nSampleIndex = (m_anRandomTable[1] & 3) + SFX_CAR_RAIN_1;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 9;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 9;
m_sQueueSample.m_nFrequency = m_anRandomTable[1] % 4000 + 28000;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bEmittingVolume = (uint8)emittingVol;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.field_48 = 0.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 0.0f;
m_sQueueSample.m_fSoundIntensity = rainOnVehicleIntensity;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bReverbFlag = false;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -7046,18 +7057,18 @@ cAudioManager::ProcessReverseGear(cVehicleParams *params)
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_GEAR;
}
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = (6000.f * modificator) + 7000;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 3.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = reverseGearIntensity;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 5;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -7089,11 +7100,11 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SAWMILL_LOOP);
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_16 = 5;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bEmittingVolume = 30;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
@@ -7112,11 +7123,11 @@ cAudioManager::ProcessSawMillScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_counter = 1;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
m_sQueueSample.m_bReverbFlag = true;
@@ -7165,11 +7176,11 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_SHOP_LOOP);
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_16 = 5;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bEmittingVolume = 30;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
@@ -7189,11 +7200,11 @@ cAudioManager::ProcessShopScriptObject(uint8 sound)
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_counter = rand + 1;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
- m_sQueueSample.field_16 = 3;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bEmittingVolume = 70;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -7249,8 +7260,8 @@ cAudioManager::ProcessTrainNoise(cVehicleParams *params)
m_sQueueSample.m_counter = 32;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_FAR;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 2;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_TRAIN_FAR);
m_sQueueSample.m_nLoopCount = 0;
@@ -7259,10 +7270,10 @@ cAudioManager::ProcessTrainNoise(cVehicleParams *params)
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 3.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = 300.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -7274,8 +7285,8 @@ cAudioManager::ProcessTrainNoise(cVehicleParams *params)
m_sQueueSample.m_counter = 33;
m_sQueueSample.m_nSampleIndex = SFX_TRAIN_NEAR;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 5;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_nFrequency =
SampleManager.GetSampleBaseFrequency(SFX_TRAIN_NEAR) +
100 * m_sQueueSample.m_nEntityIndex % 987;
@@ -7283,10 +7294,10 @@ cAudioManager::ProcessTrainNoise(cVehicleParams *params)
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 6.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 70.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -7415,15 +7426,15 @@ cAudioManager::ProcessVehicleDoors(cVehicleParams *params)
m_sQueueSample.m_nSampleIndex) +
RandomDisplacement(1000);
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 10;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 10;
m_sQueueSample.m_nLoopCount = 1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
- m_sQueueSample.field_48 = 1.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 1.0f;
m_sQueueSample.m_fSoundIntensity = 40.0f;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = true;
AddSampleToRequestedQueue();
@@ -7571,8 +7582,8 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams* params)
freq = 10000.f * modificator + 22050;
m_sQueueSample.m_counter = 52;
m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency =
freq + 100 * m_sQueueSample.m_nEntityIndex % 1000;
if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_6 ||
@@ -7584,10 +7595,10 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams* params)
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 6.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 8;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 8;
m_sQueueSample.m_bReverbFlag = 1;
m_sQueueSample.m_bRequireReflection = 0;
AddSampleToRequestedQueue();
@@ -7603,8 +7614,8 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams* params)
freq = 10000.f * modificator + 22050;
m_sQueueSample.m_counter = 52;
m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency =
freq + 100 * m_sQueueSample.m_nEntityIndex % 1000;
if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_6 ||
@@ -7616,10 +7627,10 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams* params)
m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 6.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 8;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 8;
m_sQueueSample.m_bReverbFlag = 1;
m_sQueueSample.m_bRequireReflection = 0;
AddSampleToRequestedQueue();
@@ -7630,8 +7641,8 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams* params)
m_sQueueSample.m_nSampleIndex = accelerationSample;
m_sQueueSample.m_counter = 2;
m_sQueueSample.m_bBankIndex = 0;
- m_sQueueSample.m_bIsDistant = 0;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
m_sQueueSample.m_nFrequency = freq + 100 * m_sQueueSample.m_nEntityIndex % 1000;
if (m_sQueueSample.m_nSampleIndex == SFX_CAR_IDLE_6 ||
m_sQueueSample.m_nSampleIndex == SFX_CAR_REV_6)
@@ -7642,12 +7653,12 @@ cAudioManager::ProcessVehicleEngine(cVehicleParams* params)
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 6.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 8;
- m_sQueueSample.m_bReverbFlag = 1;
- m_sQueueSample.m_bRequireReflection = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 8;
+ m_sQueueSample.m_bReverbFlag = true;
+ m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
return;
}
@@ -7679,8 +7690,8 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams *params)
m_sQueueSample.m_counter = 4;
m_sQueueSample.m_nSampleIndex = CarSounds[params->m_nIndex].m_nHornSample;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 2;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency = CarSounds[params->m_nIndex].m_nHornFrequency;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 80;
@@ -7688,10 +7699,10 @@ cAudioManager::ProcessVehicleHorn(cVehicleParams *params)
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 5.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 5.0f;
m_sQueueSample.m_fSoundIntensity = 40.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -7722,8 +7733,8 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams *params)
m_sQueueSample.m_counter = 12;
m_sQueueSample.m_nSampleIndex = SFX_REVERSE_WARNING;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 2;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 2;
m_sQueueSample.m_nFrequency =
(100 * m_sQueueSample.m_nEntityIndex & 1023) +
SampleManager.GetSampleBaseFrequency(SFX_REVERSE_WARNING);
@@ -7732,10 +7743,10 @@ cAudioManager::ProcessVehicleReverseWarning(cVehicleParams *params)
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 3.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = 50.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -7765,8 +7776,8 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams *params)
if(m_sQueueSample.m_bVolume) {
m_sQueueSample.m_counter = 0;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
if(params->m_pVehicle->m_nSurfaceTouched == SURFACE_PUDDLE) {
m_sQueueSample.m_nSampleIndex = SFX_BOAT_WATER_LOOP;
freq = 6050 * emittingVol / 30 + 16000;
@@ -7784,10 +7795,10 @@ cAudioManager::ProcessVehicleRoadNoise(cVehicleParams *params)
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 6.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 95.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 4;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 4;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -7830,17 +7841,17 @@ cAudioManager::ProcessVehicleSirenOrAlarm(cVehicleParams *params)
m_sQueueSample.m_nFrequency = CarSounds[params->m_nIndex].m_nSirenOrAlarmFrequency;
}
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 1;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = 80;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 7.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 7.0f;
m_sQueueSample.m_fSoundIntensity = 110.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 5;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -7926,17 +7937,17 @@ cAudioManager::ProcessVehicleSkidding(cVehicleParams *params)
}
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 8;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 8;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 3.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 3.0f;
m_sQueueSample.m_fSoundIntensity = 40.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -7959,13 +7970,13 @@ void cAudioManager::ProcessWaterCannon(int32)
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = 15591;
- m_sQueueSample.field_16 = 5;
+ m_sQueueSample.m_nReleasingVolumeModificator = 5;
m_sQueueSample.m_counter = i;
- m_sQueueSample.field_48 = 2.0f;
- m_sQueueSample.field_76 = 8;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
+ m_sQueueSample.m_nReleasingVolumeDivider = 8;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_56 = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
m_sQueueSample.m_bEmittingVolume = 50;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
@@ -8002,11 +8013,11 @@ cAudioManager::ProcessWeather(int32 id)
if(TheCamera.SoundDistUp < 20.f) m_sQueueSample.m_bVolume >>= 1;
if(counter == 4) counter = 0;
m_sQueueSample.m_counter = counter++;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_bOffset = (m_anRandomTable[2] & 15) + 55;
- m_sQueueSample.m_bIsDistant = true;
+ m_sQueueSample.m_bIs2D = true;
m_sQueueSample.m_nLoopCount = 1;
- m_sQueueSample.field_56 = 1;
+ m_sQueueSample.m_bReleasingSoundFlag = 1;
m_sQueueSample.m_bEmittingVolume = m_sQueueSample.m_bVolume;
m_sQueueSample.m_nLoopStart = 0;
m_sQueueSample.m_nLoopEnd = -1;
@@ -8021,12 +8032,12 @@ cAudioManager::ProcessWeather(int32 id)
m_sQueueSample.m_bVolume = (int32)(25.f * CWeather::Rain);
m_sQueueSample.m_counter = 4;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.field_16 = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 0;
m_sQueueSample.m_bOffset = 63;
- m_sQueueSample.m_bIsDistant = true;
+ m_sQueueSample.m_bIs2D = true;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 30;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 30;
m_sQueueSample.m_bReverbFlag = false;
m_sQueueSample.m_bEmittingVolume = m_sQueueSample.m_bVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
@@ -8059,8 +8070,8 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams *params)
m_sQueueSample.m_counter = 1;
m_sQueueSample.m_nSampleIndex = SFX_ROAD_NOISE;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 3;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 3;
modificator = m_sQueueSample.m_fDistance / 6.f;
freq = SampleManager.GetSampleBaseFrequency(SFX_ROAD_NOISE);
m_sQueueSample.m_nFrequency = freq + freq * modificator;
@@ -8070,10 +8081,10 @@ cAudioManager::ProcessWetRoadNoise(cVehicleParams *params)
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd =
SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 6.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 6.0f;
m_sQueueSample.m_fSoundIntensity = 30.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 4;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 4;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -8106,11 +8117,11 @@ cAudioManager::ProcessWorkShopScriptObject(uint8 sound)
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_WORKSHOP_1);
m_sQueueSample.m_counter = 0;
- m_sQueueSample.m_bIsDistant = false;
+ m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_nLoopCount = 0;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_16 = 5;
- m_sQueueSample.field_48 = 2.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeModificator = 5;
+ m_sQueueSample.m_fSpeedMultiplier = 2.0f;
m_sQueueSample.m_bEmittingVolume = 30;
m_sQueueSample.m_nLoopStart =
SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
@@ -8223,15 +8234,10 @@ cAudioManager::Service()
void
cAudioManager::ServiceSoundEffects()
{
- uint32 timeOfRecentCrime;
- cAudioScriptObject *object;
-
- timeOfRecentCrime = m_FrameCounter;
- ++m_FrameCounter;
- if(timeOfRecentCrime % 5)
- field_2 = 0;
+ if(m_FrameCounter++ % 5)
+ m_bFifthFrameFlag = false;
else
- field_2 = 1;
+ m_bFifthFrameFlag = true;
if(m_bUserPause && !m_bPreviousUserPause) {
for(int32 i = 0; i < allChannels; i++) SampleManager.StopChannel(i);
@@ -8260,7 +8266,8 @@ cAudioManager::ServiceSoundEffects()
AdjustSamplesVolume();
ProcessActiveQueues();
for(int32 i = 0; i < m_nScriptObjectEntityTotal; ++i) {
- object = (cAudioScriptObject *)m_asAudioEntities[m_anScriptObjectEntityIndices[i]].m_pEntity;
+ cAudioScriptObject *object =
+ (cAudioScriptObject *)m_asAudioEntities[m_anScriptObjectEntityIndices[i]].m_pEntity;
delete object;
m_asAudioEntities[m_anScriptObjectEntityIndices[i]].m_pEntity = nil;
DestroyEntity(m_anScriptObjectEntityIndices[i]);
@@ -8352,17 +8359,17 @@ cAudioManager::SetupJumboEngineSound(uint8 vol, int32 freq)
m_sQueueSample.m_counter = 3;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_ENGINE;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 1;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 4.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 180.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 4;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 4;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -8381,17 +8388,17 @@ cAudioManager::SetupJumboFlySound(uint8 emittingVol)
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_DIST_FLY;
m_sQueueSample.m_counter = 0;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 1;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_DIST_FLY);
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_fSoundIntensity = 440.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_48 = 4.0f;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_bReverbFlag = true;
- m_sQueueSample.field_76 = 5;
+ m_sQueueSample.m_nReleasingVolumeDivider = 5;
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
AddSampleToRequestedQueue();
}
@@ -8409,17 +8416,17 @@ cAudioManager::SetupJumboRumbleSound(uint8 emittingVol)
m_sQueueSample.m_counter = 5;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_RUMBLE;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = true;
- m_sQueueSample.field_16 = 1;
+ m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_JUMBO_RUMBLE);
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 4.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 240.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 12;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 12;
m_sQueueSample.m_bOffset = 0;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
@@ -8447,17 +8454,17 @@ cAudioManager::SetupJumboTaxiSound(uint8 vol)
m_sQueueSample.m_counter = 1;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_TAXI;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 1;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = GetJumboTaxiFreq();
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 4.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 180.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 4;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 4;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -8476,17 +8483,17 @@ cAudioManager::SetupJumboWhineSound(uint8 emittingVol, int32 freq)
m_sQueueSample.m_counter = 2;
m_sQueueSample.m_nSampleIndex = SFX_JUMBO_WHINE;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = false;
- m_sQueueSample.field_16 = 1;
+ m_sQueueSample.m_bIs2D = false;
+ m_sQueueSample.m_nReleasingVolumeModificator = 1;
m_sQueueSample.m_nFrequency = freq;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = emittingVol;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex);
- m_sQueueSample.field_48 = 4.0f;
+ m_sQueueSample.m_fSpeedMultiplier = 4.0f;
m_sQueueSample.m_fSoundIntensity = 170.0f;
- m_sQueueSample.field_56 = 0;
- m_sQueueSample.field_76 = 4;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
+ m_sQueueSample.m_nReleasingVolumeDivider = 4;
m_sQueueSample.m_bReverbFlag = true;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
@@ -8536,7 +8543,7 @@ cAudioManager::SetupPedComments(cPedParams *params, uint32 sound)
ComputeVolume(emittingVol, soundIntensity, m_sQueueSample.m_fDistance);
pedComment.field_25 = 10;
if(m_sQueueSample.m_bVolume) {
- pedComment.m_entityIndex = m_sQueueSample.m_nEntityIndex;
+ pedComment.m_nEntityIndex = m_sQueueSample.m_nEntityIndex;
pedComment.m_vecPos = m_sQueueSample.m_vecPos;
pedComment.m_fDistance = m_sQueueSample.m_fDistance;
pedComment.m_bVolume = m_sQueueSample.m_bVolume;
@@ -8593,7 +8600,7 @@ cAudioManager::SetupPedComments(cPedParams *params, uint32 sound)
ComputeVolume(emittingVol, soundIntensity, m_sQueueSample.m_fDistance);
pedComment.field_25 = 10;
if(m_sQueueSample.m_bVolume) {
- pedComment.m_entityIndex = m_sQueueSample.m_nEntityIndex;
+ pedComment.m_nEntityIndex = m_sQueueSample.m_nEntityIndex;
pedComment.m_vecPos = m_sQueueSample.m_vecPos;
pedComment.m_fDistance = m_sQueueSample.m_fDistance;
pedComment.m_bVolume = m_sQueueSample.m_bVolume;
@@ -8763,7 +8770,7 @@ cAudioManager::AdjustSamplesVolume()
for(int i = 0; i < m_bSampleRequestQueuesStatus[m_bActiveSampleQueue]; i++) {
tSound* pSample = &m_asSamples[m_bActiveSampleQueue][m_abSampleQueueIndexTable[m_bActiveSampleQueue][i] + 1];
- if(!pSample->m_bIsDistant)
+ if(!pSample->m_bIs2D)
pSample->m_bEmittingVolume = ComputeEmittingVolume(
pSample->m_bEmittingVolume, pSample->m_fSoundIntensity, pSample->m_fDistance);
}
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index 0be1e38a..0e656475 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -141,10 +141,10 @@ public:
int32 m_counter;
int32 m_nSampleIndex;
uint8 m_bBankIndex;
- bool m_bIsDistant;
+ bool m_bIs2D;
uint8 field_14;
uint8 field_15;
- int32 field_16;
+ int32 m_nReleasingVolumeModificator;
int32 m_nFrequency;
uint8 m_bVolume;
uint8 field_25;
@@ -158,24 +158,24 @@ public:
uint8 field_45;
uint8 field_46;
uint8 field_47;
- float field_48;
+ float m_fSpeedMultiplier;
float m_fSoundIntensity;
- uint8 field_56;
+ bool m_bReleasingSoundFlag;
uint8 field_57;
uint8 field_58;
uint8 field_59;
CVector m_vecPos;
bool m_bReverbFlag;
uint8 m_bLoopsRemaining;
- bool m_bRequireReflection;
+ bool m_bRequireReflection; // Used for oneshots
uint8 m_bOffset;
- int32 field_76;
+ int32 m_nReleasingVolumeDivider;
uint8 m_bIsProcessed;
uint8 m_bLoopEnded;
uint8 field_82;
uint8 field_83;
int32 calculatedVolume;
- int8 field_88;
+ int8 m_nVolumeChange;
uint8 field_89;
uint8 field_90;
uint8 field_91;
@@ -210,7 +210,7 @@ class tPedComment
{
public:
int32 m_nSampleIndex;
- int32 m_entityIndex;
+ int32 m_nEntityIndex;
CVector m_vecPos;
float m_fDistance;
uint8 m_bVolume;
@@ -226,9 +226,9 @@ class cPedComments
{
public:
tPedComment m_asPedComments[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
- uint8 indexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
- uint8 nrOfCommentsInBank[NUM_PED_COMMENTS_BANKS];
- uint8 activeBank;
+ uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
+ uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
+ uint8 m_nActiveBank;
uint8 gap_1163[1];
// reversed all methods
@@ -289,22 +289,22 @@ class cAudioManager
{
public:
bool m_bIsInitialised;
- uint8 field_1;
- uint8 field_2;
+ uint8 field_1; // unused
+ bool m_bFifthFrameFlag;
uint8 m_bActiveSamples;
- uint8 field_4;
+ uint8 field_4; // unused
bool m_bDynamicAcousticModelingStatus;
- uint8 field_6;
- uint8 field_7;
- float speedOfSound;
+ uint8 field_6; // unused
+ uint8 field_7; // unused
+ float m_fSpeedOfSound;
bool m_bTimerJustReset;
- uint8 field_13;
- uint8 field_14;
- uint8 field_15;
+ uint8 field_13; // unused
+ uint8 field_14; // unused
+ uint8 field_15; // unused
int32 m_nTimer;
tSound m_sQueueSample;
bool m_bActiveSampleQueue;
- uint8 gap_109[3];
+ uint8 gap_109[3]; // unused
tSound m_asSamples[NUM_SOUNDS_SAMPLES_BANKS][NUM_SOUNDS_SAMPLES_SLOTS];
uint8 m_abSampleQueueIndexTable[NUM_SOUNDS_SAMPLES_BANKS][NUM_SOUNDS_SAMPLES_SLOTS];
uint8 m_bSampleRequestQueuesStatus[NUM_SOUNDS_SAMPLES_BANKS];
@@ -328,10 +328,10 @@ public:
int32 m_nBridgeEntity;
cMissionAudio m_sMissionAudio;
int32 m_anRandomTable[5];
- uint8 field_19192;
+ uint8 field_19192; // time?
uint8 m_bUserPause;
uint8 m_bPreviousUserPause;
- uint8 field_19195; // time?
+ uint8 field_19195; // unused
uint32 m_FrameCounter;
// getters
diff --git a/src/audio/PoliceRadio.cpp b/src/audio/PoliceRadio.cpp
index d162ca4c..91312867 100644
--- a/src/audio/PoliceRadio.cpp
+++ b/src/audio/PoliceRadio.cpp
@@ -128,18 +128,18 @@ cAudioManager::DoPoliceRadioCrackle()
m_sQueueSample.m_counter = 0;
m_sQueueSample.m_nSampleIndex = SFX_POLICE_RADIO_CRACKLE;
m_sQueueSample.m_bBankIndex = SAMPLEBANK_MAIN;
- m_sQueueSample.m_bIsDistant = true;
- m_sQueueSample.field_16 = 10;
+ m_sQueueSample.m_bIs2D = true;
+ m_sQueueSample.m_nReleasingVolumeModificator = 10;
m_sQueueSample.m_nFrequency = SampleManager.GetSampleBaseFrequency(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.m_bVolume = m_anRandomTable[2] % 20 + 15;
m_sQueueSample.m_nLoopCount = 0;
m_sQueueSample.m_bEmittingVolume = m_sQueueSample.m_bVolume;
m_sQueueSample.m_nLoopStart = SampleManager.GetSampleLoopStartOffset(SFX_POLICE_RADIO_CRACKLE);
m_sQueueSample.m_nLoopEnd = SampleManager.GetSampleLoopEndOffset(SFX_POLICE_RADIO_CRACKLE);
- m_sQueueSample.field_56 = 0;
+ m_sQueueSample.m_bReleasingSoundFlag = 0;
m_sQueueSample.m_bReverbFlag = false;
m_sQueueSample.m_bOffset = 63;
- m_sQueueSample.field_76 = 3;
+ m_sQueueSample.m_nReleasingVolumeDivider = 3;
m_sQueueSample.m_bRequireReflection = false;
AddSampleToRequestedQueue();
}
diff --git a/src/core/Camera.cpp b/src/core/Camera.cpp
index e5bc09c8..9d927354 100644
--- a/src/core/Camera.cpp
+++ b/src/core/Camera.cpp
@@ -727,12 +727,24 @@ CCamera::CamControl(void)
if(CarZoomIndicator == CAM_ZOOM_1STPRS && !m_bPlayerIsInGarage){
CarZoomValue = 0.0f;
ReqMode = CCam::MODE_1STPERSON;
- }else if(CarZoomIndicator == CAM_ZOOM_1)
- CarZoomValue = 0.05f;
+ }
+#ifdef FREE_CAM
+ else if (bFreeCam) {
+ if (CarZoomIndicator == CAM_ZOOM_1)
+ CarZoomValue = ((CVehicle*)pTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_1 : FREE_CAR_ZOOM_VALUE_1;
+ else if (CarZoomIndicator == CAM_ZOOM_2)
+ CarZoomValue = ((CVehicle*)pTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_2 : FREE_CAR_ZOOM_VALUE_2;
+ else if (CarZoomIndicator == CAM_ZOOM_3)
+ CarZoomValue = ((CVehicle*)pTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_3 : FREE_CAR_ZOOM_VALUE_3;
+ }
+#endif
+ else if(CarZoomIndicator == CAM_ZOOM_1)
+ CarZoomValue = DEFAULT_CAR_ZOOM_VALUE_1;
else if(CarZoomIndicator == CAM_ZOOM_2)
- CarZoomValue = 1.9f;
+ CarZoomValue = DEFAULT_CAR_ZOOM_VALUE_2;
else if(CarZoomIndicator == CAM_ZOOM_3)
- CarZoomValue = 3.9f;
+ CarZoomValue = DEFAULT_CAR_ZOOM_VALUE_3;
+
if(CarZoomIndicator == CAM_ZOOM_TOPDOWN && !m_bPlayerIsInGarage){
CarZoomValue = 1.0f;
ReqMode = CCam::MODE_TOPDOWN;
@@ -2956,11 +2968,23 @@ CCamera::SetZoomValueFollowPedScript(int16 dist)
void
CCamera::SetZoomValueCamStringScript(int16 dist)
{
- switch (dist) {
- case 0: m_fCarZoomValueScript = 0.05f; break;
- case 1: m_fCarZoomValueScript = 1.9f; break;
- case 2: m_fCarZoomValueScript = 3.9f; break;
- default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
+#ifdef FREE_CAM
+ if (bFreeCam) {
+ switch (dist) {
+ case 0: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_1 : FREE_CAR_ZOOM_VALUE_1; break;
+ case 1: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_2 : FREE_CAR_ZOOM_VALUE_2; break;
+ case 2: m_fCarZoomValueScript = ((CVehicle*)Cams[ActiveCam].CamTargetEntity)->IsBoat() ? FREE_BOAT_ZOOM_VALUE_3 : FREE_CAR_ZOOM_VALUE_3; break;
+ default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
+ }
+ } else
+#endif
+ {
+ switch (dist) {
+ case 0: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_1; break;
+ case 1: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_2; break;
+ case 2: m_fCarZoomValueScript = DEFAULT_CAR_ZOOM_VALUE_3; break;
+ default: m_fCarZoomValueScript = m_fCarZoomValueScript; break;
+ }
}
m_bUseScriptZoomValueCar = true;
diff --git a/src/core/Camera.h b/src/core/Camera.h
index f21fe913..c22ba9c8 100644
--- a/src/core/Camera.h
+++ b/src/core/Camera.h
@@ -23,6 +23,20 @@ enum
#define CAM_ZOOM_TOPDOWN (4.0f)
#define CAM_ZOOM_CINEMATIC (5.0f)
+#ifdef FREE_CAM // LCS values
+#define FREE_CAR_ZOOM_VALUE_1 (-1.0f)
+#define FREE_CAR_ZOOM_VALUE_2 (2.0f)
+#define FREE_CAR_ZOOM_VALUE_3 (6.0f)
+
+#define FREE_BOAT_ZOOM_VALUE_1 (-2.41f)
+#define FREE_BOAT_ZOOM_VALUE_2 (6.49f)
+#define FREE_BOAT_ZOOM_VALUE_3 (15.0f)
+#endif
+
+#define DEFAULT_CAR_ZOOM_VALUE_1 (0.05f)
+#define DEFAULT_CAR_ZOOM_VALUE_2 (1.9f)
+#define DEFAULT_CAR_ZOOM_VALUE_3 (3.9f)
+
class CCam
{
public:
diff --git a/src/core/Frontend.cpp b/src/core/Frontend.cpp
index a7851650..98d67fa2 100644
--- a/src/core/Frontend.cpp
+++ b/src/core/Frontend.cpp
@@ -27,12 +27,20 @@
#include "World.h"
#include "Renderer.h"
#include "CdStream.h"
+#include "Radar.h"
#define DONT_USE_SUSPICIOUS_FUNCS 1
#define TIDY_UP_PBP // ProcessButtonPresses
#define MAX_VISIBLE_LIST_ROW 30
#define SCROLLBAR_MAX_HEIGHT 263.0f // actually it's 273. but calculating it from scrollbar drawing code gives 287. i don't know
+#ifdef MENU_MAP
+bool CMenuManager::bMenuMapActive = false;
+float CMenuManager::fMapSize;
+float CMenuManager::fMapCenterY;
+float CMenuManager::fMapCenterX;
+#endif
+
#ifdef PS2_LIKE_MENU
BottomBarOption bbNames[8];
int bbTabCount = 0;
@@ -129,7 +137,22 @@ const char* FrontendFilenames[][2] = {
{"fe_radio7", "" }, // MSX_FM
{"fe_radio8", "" }, // FLASHBACK
{"fe_radio9", "" }, // CHATTERBOX
-};
+};
+
+#ifdef MENU_MAP
+const char* MapFilenames[][2] = {
+ {"mapMid01", "mapMid01A"},
+ {"mapMid02", "mapMid02A"},
+ {"mapMid03", "mapMid03A"},
+ {"mapBot01", "mapBot01A"},
+ {"mapBot02", "mapBot02A"},
+ {"mapBot03", "mapBot03A"},
+ {"mapTop01", "mapTop01A"},
+ {"mapTop02", "mapTop02A"},
+ {"mapTop03", "mapTop03A"},
+};
+CSprite2d CMenuManager::m_aMapSprites[NUM_MAP_SPRITES];
+#endif
// 0x5F3344
const char* MenuFilenames[][2] = {
@@ -362,7 +385,7 @@ void CMenuManager::CentreMousePointer()
{
tagPOINT Point;
- if (SCREEN_WIDTH * 0.5f == 0.0f && 0.0f == SCREEN_HEIGHT * 0.5f) {
+ if (SCREEN_WIDTH * 0.5f != 0.0f && 0.0f != SCREEN_HEIGHT * 0.5f) {
Point.x = SCREEN_WIDTH / 2;
Point.y = SCREEN_HEIGHT / 2;
ClientToScreen(PSGLOBAL(window), &Point);
@@ -562,6 +585,11 @@ void CMenuManager::Draw()
case MENUPAGE_BRIEFS:
PrintBriefs();
break;
+#ifdef MENU_MAP
+ case MENUPAGE_MAP:
+ PrintMap();
+ break;
+#endif
}
// Header height isn't accounted, we will add that later.
@@ -1156,7 +1184,7 @@ void CMenuManager::Draw()
if (m_nCurrScreen == MENUPAGE_CONTROLLER_SETTINGS)
PrintController();
-
+
/* else if (m_nCurrScreen == MENUPAGE_SKIN_SELECT_OLD) {
CSprite2d::DrawRect(CRect(StretchX(180), MENU_Y(98), StretchX(230), MENU_Y(123)), CRGBA(255, 255, 255, FadeIn(255)));
CSprite2d::DrawRect(CRect(StretchX(181), MENU_Y(99), StretchX(229), MENU_Y(233)), CRGBA(Player color from PickNewPlayerColour, FadeIn(255)));
@@ -2570,7 +2598,12 @@ void CMenuManager::LoadAllTextures()
m_aMenuSprites[i].SetTexture(MenuFilenames[i][0], MenuFilenames[i][1]);
m_aMenuSprites[i].SetAddressing(rwTEXTUREADDRESSBORDER);
}
-
+#ifdef MENU_MAP
+ for (int i = 0; i < ARRAY_SIZE(MapFilenames); i++) {
+ m_aMapSprites[i].SetTexture(MapFilenames[i][0], MapFilenames[i][1]);
+ m_aMapSprites[i].SetAddressing(rwTEXTUREADDRESSBORDER);
+ }
+#endif
m_bSpritesLoaded = true;
CTxdStore::PopCurrentTxd();
}
@@ -3756,6 +3789,14 @@ CMenuManager::ProcessButtonPresses(void)
break;
#endif
} else {
+#ifdef MENU_MAP
+ if (aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu == MENUPAGE_MAP) {
+ fMapCenterX = SCREEN_WIDTH / 2;
+ fMapCenterY = SCREEN_HEIGHT / 3;
+ fMapSize = SCREEN_HEIGHT / CDraw::GetAspectRatio();
+ }
+
+#endif
ChangeScreen(aScreens[m_nCurrScreen].m_aEntries[m_nCurrOption].m_TargetMenu, 0, true, true);
}
}
@@ -4428,7 +4469,10 @@ void CMenuManager::UnloadTextures()
printf("REMOVE menu textures\n");
for (int i = 0; i < ARRAY_SIZE(MenuFilenames); ++i)
m_aMenuSprites[i].Delete();
-
+#ifdef MENU_MAP
+ for (int i = 0; i < ARRAY_SIZE(MapFilenames); ++i)
+ m_aMapSprites[i].Delete();
+#endif
int menu = CTxdStore::FindTxdSlot("menu");
CTxdStore::RemoveTxd(menu);
@@ -4674,6 +4718,191 @@ CMenuManager::PrintController(void)
}
}
+#ifdef MENU_MAP
+
+#define ZOOM(x, y, in) \
+ do { \
+ if(fMapSize > SCREEN_WIDTH * 2 && in) \
+ break; \
+ float z2 = in? 1.1f : 1.f/1.1f; \
+ fMapCenterX += (x - fMapCenterX) * (1.0f - z2); \
+ fMapCenterY += (y - fMapCenterY) * (1.0f - z2); \
+ \
+ if (fMapSize < SCREEN_WIDTH / 3 && !in) \
+ break; \
+ \
+ fMapSize *= z2; \
+ } while(0) \
+
+void
+CMenuManager::PrintMap(void)
+{
+ bMenuMapActive = true;
+ CRadar::InitFrontEndMap();
+
+ // Because fMapSize is half of the map length, and map consists of 3x3 tiles.
+ float halfTile = fMapSize / 3.0f;
+
+ // Darken background a bit
+ CSprite2d::DrawRect(CRect(0, 0,
+ SCREEN_WIDTH, SCREEN_HEIGHT),
+ CRGBA(0, 0, 0, FadeIn(128)));
+
+ RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR);
+
+ if (SCREEN_WIDTH >= fMapCenterX - fMapSize || SCREEN_HEIGHT >= fMapCenterY - fMapSize) {
+ m_aMapSprites[MAPTOP1].Draw(CRect(fMapCenterX - fMapSize, fMapCenterY - fMapSize,
+ fMapCenterX - halfTile, fMapCenterY - halfTile), CRGBA(255, 255, 255, FadeIn(255)));
+ }
+
+ if (SCREEN_WIDTH >= fMapCenterX - halfTile || SCREEN_HEIGHT >= fMapCenterY - fMapSize) {
+ m_aMapSprites[MAPTOP2].Draw(CRect(fMapCenterX - halfTile, fMapCenterY - fMapSize,
+ fMapCenterX + halfTile, fMapCenterY - halfTile), CRGBA(255, 255, 255, FadeIn(255)));
+ }
+
+ if (SCREEN_WIDTH >= fMapCenterX - halfTile || SCREEN_HEIGHT >= fMapCenterY - fMapSize) {
+ m_aMapSprites[MAPTOP3].Draw(CRect(fMapCenterX + halfTile, fMapCenterY - fMapSize,
+ fMapCenterX + fMapSize, fMapCenterY - halfTile), CRGBA(255, 255, 255, FadeIn(255)));
+ }
+
+ if (SCREEN_WIDTH >= fMapCenterX - fMapSize || SCREEN_HEIGHT >= fMapCenterY - halfTile) {
+ m_aMapSprites[MAPMID1].Draw(CRect(fMapCenterX - fMapSize, fMapCenterY - halfTile,
+ fMapCenterX - halfTile, fMapCenterY + halfTile), CRGBA(255, 255, 255, FadeIn(255)));
+ }
+
+ if (SCREEN_WIDTH >= fMapCenterX - halfTile || SCREEN_HEIGHT >= fMapCenterY - halfTile) {
+ m_aMapSprites[MAPMID2].Draw(CRect(fMapCenterX - halfTile, fMapCenterY - halfTile,
+ fMapCenterX + halfTile, fMapCenterY + halfTile), CRGBA(255, 255, 255, FadeIn(255)));
+ }
+
+ if (SCREEN_WIDTH >= fMapCenterX - halfTile || SCREEN_HEIGHT >= fMapCenterY - halfTile) {
+ m_aMapSprites[MAPMID3].Draw(CRect(fMapCenterX + halfTile, fMapCenterY - halfTile,
+ fMapCenterX + fMapSize, fMapCenterY + halfTile), CRGBA(255, 255, 255, FadeIn(255)));
+ }
+
+ if (SCREEN_WIDTH >= fMapCenterX - fMapSize || SCREEN_HEIGHT >= fMapCenterY - halfTile) {
+ m_aMapSprites[MAPBOT1].Draw(CRect(fMapCenterX - fMapSize, fMapCenterY + halfTile,
+ fMapCenterX - halfTile, fMapCenterY + fMapSize), CRGBA(255, 255, 255, FadeIn(255)));
+ }
+
+ if (SCREEN_WIDTH >= fMapCenterX - halfTile || SCREEN_HEIGHT >= fMapCenterY - halfTile) {
+ m_aMapSprites[MAPBOT2].Draw(CRect(fMapCenterX - halfTile, fMapCenterY + halfTile,
+ fMapCenterX + halfTile, fMapCenterY + fMapSize), CRGBA(255, 255, 255, FadeIn(255)));
+ }
+
+ if (SCREEN_WIDTH >= fMapCenterX - halfTile || SCREEN_HEIGHT >= fMapCenterY - halfTile) {
+ m_aMapSprites[MAPBOT3].Draw(CRect(fMapCenterX + halfTile, fMapCenterY + halfTile,
+ fMapCenterX + fMapSize, fMapCenterY + fMapSize), CRGBA(255, 255, 255, FadeIn(255)));
+ }
+
+ CRadar::DrawBlips();
+
+ if (CPad::GetPad(0)->GetRightMouseJustDown()) {
+ if (m_nMousePosY > fMapCenterY - fMapSize && m_nMousePosY < fMapCenterY + fMapSize &&
+ m_nMousePosX > fMapCenterX - fMapSize && m_nMousePosX < fMapCenterX + fMapSize) {
+
+ float diffX = fMapCenterX - fMapSize, diffY = fMapCenterY - fMapSize;
+ float x = ((m_nMousePosX - diffX) / (fMapSize * 2)) * 4000.0f - 2000.0f;
+ float y = 2000.0f - ((m_nMousePosY - diffY) / (fMapSize * 2)) * 4000.0f;
+ CRadar::ToggleTargetMarker(x, y);
+ }
+ }
+
+ if (CPad::GetPad(0)->GetCrossJustDown()) {
+ if (SCREEN_HEIGHT / 2 > fMapCenterY - fMapSize && SCREEN_HEIGHT / 2 < fMapCenterY + fMapSize &&
+ SCREEN_WIDTH / 2 > fMapCenterX - fMapSize && SCREEN_WIDTH / 2 < fMapCenterX + fMapSize) {
+
+ float diffX = fMapCenterX - fMapSize, diffY = fMapCenterY - fMapSize;
+ float x = ((SCREEN_WIDTH / 2 - diffX) / (fMapSize * 2)) * 4000.0f - 2000.0f;
+ float y = 2000.0f - ((SCREEN_HEIGHT / 2 - diffY) / (fMapSize * 2)) * 4000.0f;
+ CRadar::ToggleTargetMarker(x, y);
+ }
+ }
+
+ if (CPad::GetPad(0)->GetLeftMouse()) {
+ fMapCenterX += m_nMousePosX - m_nMouseOldPosX;
+ fMapCenterY += m_nMousePosY - m_nMouseOldPosY;
+ } else if (CPad::GetPad(0)->GetLeft() || CPad::GetPad(0)->GetDPadLeft()) {
+ fMapCenterX += 15.0f;
+ } else if (CPad::GetPad(0)->GetRight() || CPad::GetPad(0)->GetDPadRight()) {
+ fMapCenterX -= 15.0f;
+ } else if (CPad::GetPad(0)->GetLeftStickX()) {
+ fMapCenterX -= CPad::GetPad(0)->GetLeftStickX() / 128.0f * 20.0f;
+ }
+
+ if (CPad::GetPad(0)->GetUp() || CPad::GetPad(0)->GetDPadUp()) {
+ fMapCenterY += 15.0f;
+ } else if (CPad::GetPad(0)->GetDown() || CPad::GetPad(0)->GetDPadDown()) {
+ fMapCenterY -= 15.0f;
+ } else if (CPad::GetPad(0)->GetLeftStickY()) {
+ fMapCenterY -= CPad::GetPad(0)->GetLeftStickY() / 128.0f * 20.0f;
+ }
+
+ if (CPad::GetPad(0)->GetMouseWheelDown() || CPad::GetPad(0)->GetPageUp() || CPad::GetPad(0)->GetRightShoulder2()) {
+ if (CPad::GetPad(0)->GetMouseWheelDown())
+ ZOOM(m_nMousePosX, m_nMousePosY, false);
+ else
+ ZOOM(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, false);
+ } else if (CPad::GetPad(0)->GetMouseWheelUp() || CPad::GetPad(0)->GetPageDown() || CPad::GetPad(0)->GetRightShoulder1()) {
+ if (CPad::GetPad(0)->GetMouseWheelUp())
+ ZOOM(m_nMousePosX, m_nMousePosY, true);
+ else
+ ZOOM(SCREEN_WIDTH / 2, SCREEN_HEIGHT / 2, true);
+ }
+
+ if (fMapCenterX - fMapSize > SCREEN_WIDTH / 2)
+ fMapCenterX = fMapSize + SCREEN_WIDTH / 2;
+
+ if (fMapCenterX + fMapSize < SCREEN_WIDTH / 2)
+ fMapCenterX = SCREEN_WIDTH / 2 - fMapSize;
+
+ if (fMapCenterY + fMapSize < SCREEN_HEIGHT - MENU_Y(60.0f))
+ fMapCenterY = SCREEN_HEIGHT - MENU_Y(60.0f) - fMapSize;
+
+ fMapCenterY = min(fMapCenterY, fMapSize); // To not show beyond north border
+
+ bMenuMapActive = false;
+
+ // CFont::SetWrapx(MENU_X_RIGHT_ALIGNED(5.0f)); // From VC
+ // CFont::SetRightJustifyWrap(10.0f);
+
+ CSprite2d::DrawRect(CRect(MENU_X(14.0f), SCREEN_STRETCH_FROM_BOTTOM(95.0f),
+ SCREEN_STRETCH_FROM_RIGHT(11.0f), SCREEN_STRETCH_FROM_BOTTOM(59.0f)),
+ CRGBA(235, 170, 50, 255));
+
+ CFont::SetScale(MENU_X(0.4f), MENU_Y(0.7f));
+ CFont::SetFontStyle(FONT_BANK);
+ CFont::SetColor(CRGBA(0, 0, 0, FadeIn(255)));
+
+ float nextX = MENU_X(30.0f), nextY = 95.0f;
+ wchar *text;
+#define TEXT_PIECE(key,extraSpace) \
+ text = TheText.Get(key); CFont::PrintString(nextX, SCREEN_SCALE_FROM_BOTTOM(nextY), text); nextX += CFont::GetStringWidth(text, true) + MENU_X(extraSpace);
+
+ TEXT_PIECE("FEC_MWF", 3.0f);
+ TEXT_PIECE("FEC_PGD", 1.0f);
+ TEXT_PIECE("FEC_IBT", 1.0f);
+ TEXT_PIECE("FEC_ZIN", 20.0f);
+ TEXT_PIECE("FEC_MWB", 3.0f);
+ TEXT_PIECE("FEC_PGU", 1.0f);
+ TEXT_PIECE("FEC_IBT", 1.0f);
+ CFont::PrintString(nextX, SCREEN_SCALE_FROM_BOTTOM(nextY), TheText.Get("FEC_ZOT")); nextX = MENU_X(30.0f); nextY -= 11.0f;
+ TEXT_PIECE("FEC_UPA", 2.0f);
+ TEXT_PIECE("FEC_DWA", 2.0f);
+ TEXT_PIECE("FEC_LFA", 2.0f);
+ TEXT_PIECE("FEC_RFA", 2.0f);
+ TEXT_PIECE("FEC_MSL", 1.0f);
+ TEXT_PIECE("FEC_IBT", 1.0f);
+ CFont::PrintString(nextX, SCREEN_SCALE_FROM_BOTTOM(nextY), TheText.Get("FEC_MOV")); nextX = MENU_X(30.0f); nextY -= 11.0f;
+ TEXT_PIECE("FEC_MSR", 2.0f);
+ TEXT_PIECE("FEC_IBT", 1.0f);
+ CFont::PrintString(nextX, SCREEN_SCALE_FROM_BOTTOM(nextY), TheText.Get("FEC_TAR"));
+#undef TEXT_PIECE
+}
+
+#undef ZOOM
+#endif
+
#if 0
uint8 CMenuManager::GetNumberOfMenuOptions()
{
diff --git a/src/core/Frontend.h b/src/core/Frontend.h
index 4eee198f..a97afb24 100644
--- a/src/core/Frontend.h
+++ b/src/core/Frontend.h
@@ -109,6 +109,8 @@ enum eFrontendSprites
FE_RADIO7,
FE_RADIO8,
FE_RADIO9,
+
+ NUM_FE_SPRITES
};
enum eMenuSprites
@@ -132,6 +134,8 @@ enum eMenuSprites
MENUSPRITE_UPOFF,
MENUSPRITE_UPON,
MENUSPRITE_GTA3LOGO,
+ MENUSPRITE_UNUSED,
+ NUM_MENU_SPRITES
};
enum eSaveSlot
@@ -149,6 +153,22 @@ enum eSaveSlot
SAVESLOT_LABEL = 36
};
+#ifdef MENU_MAP
+enum MapSprites
+{
+ MAPMID1,
+ MAPMID2,
+ MAPMID3,
+ MAPBOT1,
+ MAPBOT2,
+ MAPBOT3,
+ MAPTOP1,
+ MAPTOP2,
+ MAPTOP3,
+ NUM_MAP_SPRITES
+};
+#endif
+
enum eMenuScreen
{
MENUPAGE_DISABLED = -1,
@@ -211,6 +231,9 @@ enum eMenuScreen
MENUPAGE_MOUSE_CONTROLS = 56,
MENUPAGE_57 = 57,
MENUPAGE_58 = 58,
+#ifdef MENU_MAP
+ MENUPAGE_MAP = 59,
+#endif
MENUPAGES
};
@@ -465,8 +488,8 @@ public:
char field_455;
bool m_bStartWaitingForKeyBind;
bool m_bSpritesLoaded;
- CSprite2d m_aFrontEndSprites[28];
- CSprite2d m_aMenuSprites[20];
+ CSprite2d m_aFrontEndSprites[NUM_FE_SPRITES];
+ CSprite2d m_aMenuSprites[NUM_MENU_SPRITES];
int32 field_518;
int32 m_nMenuFadeAlpha;
bool m_bPressedPgUpOnList;
@@ -532,6 +555,14 @@ public:
static bool m_PrefsDisableTutorials;
#endif // !MASTER
+#ifdef MENU_MAP
+ static bool bMenuMapActive;
+ static float fMapSize;
+ static float fMapCenterY;
+ static float fMapCenterX;
+ static CSprite2d m_aMapSprites[NUM_MAP_SPRITES];
+ void PrintMap();
+#endif
public:
static void BuildStatLine(char *text, void *stat, uint8 aFloat, void *stat2);
diff --git a/src/core/MenuScreens.h b/src/core/MenuScreens.h
index ace6a719..bac8f0a8 100644
--- a/src/core/MenuScreens.h
+++ b/src/core/MenuScreens.h
@@ -7,7 +7,11 @@ const CMenuScreen aScreens[] = {
{ "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0, },
// MENUPAGE_STATS = 1 - Both PrintStats and Draw were printing the page name, so deleted the string Draw looked for.
+#ifdef MENU_MAP
+ { ""/*"FET_STA"*/, MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 5, 3,
+#else
{ ""/*"FET_STA"*/, MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 5, 2,
+#endif
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
},
@@ -20,7 +24,11 @@ const CMenuScreen aScreens[] = {
},
// MENUPAGE_BRIEFS = 3
+#ifdef MENU_MAP
+ { "FET_BRE", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 6, 4,
+#else
{ "FET_BRE", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 6, 3,
+#endif
MENUACTION_CHANGEMENU, "FEDS_TB", SAVESLOT_NONE, MENUPAGE_NONE,
},
@@ -298,7 +306,11 @@ const CMenuScreen aScreens[] = {
},
// MENUPAGE_OPTIONS = 41
+#ifdef MENU_MAP
+ { "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 1, 5,
+#else
{ "FET_OPT", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 1, 4,
+#endif
MENUACTION_CHANGEMENU, "FET_CTL", SAVESLOT_NONE, MENUPAGE_CONTROLLER_PC,
MENUACTION_LOADRADIO, "FET_AUD", SAVESLOT_NONE, MENUPAGE_SOUND_SETTINGS,
MENUACTION_CHANGEMENU, "FET_DIS", SAVESLOT_NONE, MENUPAGE_GRAPHICS_SETTINGS,
@@ -308,7 +320,11 @@ const CMenuScreen aScreens[] = {
},
// MENUPAGE_EXIT = 42
+#ifdef MENU_MAP
+ { "FET_QG", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 2, 6,
+#else
{ "FET_QG", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 2, 5,
+#endif
MENUACTION_LABEL, "FEQ_SRE", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEM_NO", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CANCELGAME, "FEM_YES", SAVESLOT_NONE, MENUPAGE_NONE,
@@ -369,6 +385,9 @@ const CMenuScreen aScreens[] = {
{ "FET_PAU", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
MENUACTION_RESUME, "FEM_RES", SAVESLOT_NONE, MENUPAGE_NONE,
MENUACTION_CHANGEMENU, "FEN_STA", SAVESLOT_NONE, MENUPAGE_NEW_GAME,
+#ifdef MENU_MAP
+ MENUACTION_CHANGEMENU, "FEG_MAP", SAVESLOT_NONE, MENUPAGE_MAP,
+#endif
MENUACTION_CHANGEMENU, "FEP_STA", SAVESLOT_NONE, MENUPAGE_STATS,
MENUACTION_CHANGEMENU, "FEP_BRI", SAVESLOT_NONE, MENUPAGE_BRIEFS,
MENUACTION_CHANGEMENU, "FET_OPT", SAVESLOT_NONE, MENUPAGE_OPTIONS,
@@ -407,4 +426,10 @@ const CMenuScreen aScreens[] = {
{ "", MENUPAGE_DISABLED, MENUPAGE_DISABLED, MENUPAGE_DISABLED, 0, 0,
},
+
+#ifdef MENU_MAP
+ // MENUPAGE_MAP = 59
+ { "FEG_MAP", MENUPAGE_NONE, MENUPAGE_NONE, MENUPAGE_NONE, 5, 2,
+ },
+#endif
};
diff --git a/src/core/Radar.cpp b/src/core/Radar.cpp
index 3824af7d..07ddb5d8 100644
--- a/src/core/Radar.cpp
+++ b/src/core/Radar.cpp
@@ -80,7 +80,7 @@ CRGBA CRadar::ArrowBlipColour1;
CRGBA CRadar::ArrowBlipColour2;
uint16 CRadar::MapLegendCounter;
uint16 CRadar::MapLegendList[NUM_MAP_LEGENDS];
-bool CRadar::bMenuMapActive;
+int CRadar::TargetMarkerId = -1;
#endif
// taken from VC
@@ -89,6 +89,10 @@ float CRadar::cachedSin;
uint8 CRadar::CalculateBlipAlpha(float dist)
{
+#ifdef MENU_MAP
+ if (CMenuManager::bMenuMapActive)
+ return 255;
+#endif
if (dist <= 1.0f)
return 255;
@@ -132,9 +136,12 @@ void CRadar::ClearBlip(int32 i)
if (index != -1) {
SetRadarMarkerState(index, false);
ms_RadarTrace[index].m_bInUse = false;
+#ifndef MENU_MAP
+ // Ssshhh
ms_RadarTrace[index].m_eBlipType = BLIP_NONE;
ms_RadarTrace[index].m_eBlipDisplay = BLIP_DISPLAY_NEITHER;
- ms_RadarTrace[index].m_IconID = RADAR_SPRITE_NONE;
+ ms_RadarTrace[index].m_eRadarSprite = RADAR_SPRITE_NONE;
+#endif
}
}
@@ -146,7 +153,7 @@ void CRadar::ClearBlipForEntity(eBlipType type, int32 id)
ms_RadarTrace[i].m_bInUse = false;
ms_RadarTrace[i].m_eBlipType = BLIP_NONE;
ms_RadarTrace[i].m_eBlipDisplay = BLIP_DISPLAY_NEITHER;
- ms_RadarTrace[i].m_IconID = RADAR_SPRITE_NONE;
+ ms_RadarTrace[i].m_eRadarSprite = RADAR_SPRITE_NONE;
}
};
}
@@ -233,7 +240,7 @@ int CRadar::ClipRadarPoly(CVector2D *poly, const CVector2D *rect)
bool CRadar::DisplayThisBlip(int32 counter)
{
- switch (ms_RadarTrace[counter].m_IconID) {
+ switch (ms_RadarTrace[counter].m_eRadarSprite) {
case RADAR_SPRITE_BOMB:
case RADAR_SPRITE_SPRAY:
case RADAR_SPRITE_WEAPON:
@@ -309,28 +316,39 @@ void CRadar::DrawBlips()
CVector2D in = CVector2D(0.0f, 0.0f);
TransformRadarPointToScreenSpace(out, in);
- float angle;
- if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN)
- angle = PI + FindPlayerHeading();
+#ifdef MENU_MAP
+ if (!CMenuManager::bMenuMapActive) {
+#endif
+ float angle;
+ if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN)
+ angle = PI + FindPlayerHeading();
#ifdef FIX_BUGS
- else if (TheCamera.GetLookDirection() != LOOKING_FORWARD)
- angle = FindPlayerHeading() - (PI + (TheCamera.Cams[TheCamera.ActiveCam].CamTargetEntity->GetPosition() - TheCamera.Cams[TheCamera.ActiveCam].SourceBeforeLookBehind).Heading());
+ else if (TheCamera.GetLookDirection() != LOOKING_FORWARD)
+ angle = FindPlayerHeading() - (PI + (TheCamera.Cams[TheCamera.ActiveCam].CamTargetEntity->GetPosition() - TheCamera.Cams[TheCamera.ActiveCam].SourceBeforeLookBehind).Heading());
#endif
- else
- angle = FindPlayerHeading() - (PI + TheCamera.GetForward().Heading());
+ else
+ angle = FindPlayerHeading() - (PI + TheCamera.GetForward().Heading());
- DrawRotatingRadarSprite(&CentreSprite, out.x, out.y, angle, 255);
+ DrawRotatingRadarSprite(&CentreSprite, out.x, out.y, angle, 255);
- CVector2D vec2d;
- vec2d.x = vec2DRadarOrigin.x;
- vec2d.y = M_SQRT2 * m_radarRange + vec2DRadarOrigin.y;
- TransformRealWorldPointToRadarSpace(in, vec2d);
- LimitRadarPoint(in);
- TransformRadarPointToScreenSpace(out, in);
- DrawRadarSprite(RADAR_SPRITE_NORTH, out.x, out.y, 255);
+ CVector2D vec2d;
+ vec2d.x = vec2DRadarOrigin.x;
+ vec2d.y = M_SQRT2 * m_radarRange + vec2DRadarOrigin.y;
+ TransformRealWorldPointToRadarSpace(in, vec2d);
+ LimitRadarPoint(in);
+ TransformRadarPointToScreenSpace(out, in);
+ DrawRadarSprite(RADAR_SPRITE_NORTH, out.x, out.y, 255);
+#ifdef MENU_MAP
+ }
+#endif
CEntity *blipEntity = nil;
for(int blipId = 0; blipId < NUMRADARBLIPS; blipId++) {
+#ifdef MENU_MAP
+ // A little hack to reuse cleared blips in menu map. hehe
+ if (!CMenuManager::bMenuMapActive || ms_RadarTrace[blipId].m_eBlipType == BLIP_CAR ||
+ ms_RadarTrace[blipId].m_eBlipType == BLIP_CHAR || ms_RadarTrace[blipId].m_eBlipType == BLIP_OBJECT)
+#endif
if (!ms_RadarTrace[blipId].m_bInUse)
continue;
@@ -338,8 +356,8 @@ void CRadar::DrawBlips()
case BLIP_CAR:
case BLIP_CHAR:
case BLIP_OBJECT:
- if (ms_RadarTrace[blipId].m_IconID == RADAR_SPRITE_BOMB || ms_RadarTrace[blipId].m_IconID == RADAR_SPRITE_SAVE
- || ms_RadarTrace[blipId].m_IconID == RADAR_SPRITE_SPRAY || ms_RadarTrace[blipId].m_IconID == RADAR_SPRITE_WEAPON) {
+ if (ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_BOMB || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SAVE
+ || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SPRAY || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_WEAPON) {
switch (ms_RadarTrace[blipId].m_eBlipType) {
case BLIP_CAR:
@@ -372,8 +390,8 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, blipEntity->GetPosition());
float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, in);
- if (ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_NONE) {
- DrawRadarSprite(ms_RadarTrace[blipId].m_IconID, out.x, out.y, CalculateBlipAlpha(dist));
+ if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE) {
+ DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
} else {
#ifdef TRIANGULAR_BLIPS
CVector &pos = FindPlayerCentreOfWorld_NoSniperShift();
@@ -394,8 +412,8 @@ void CRadar::DrawBlips()
break;
case BLIP_COORD:
case BLIP_CONTACT_POINT:
- if ((ms_RadarTrace[blipId].m_IconID == RADAR_SPRITE_BOMB || ms_RadarTrace[blipId].m_IconID == RADAR_SPRITE_SAVE
- || ms_RadarTrace[blipId].m_IconID == RADAR_SPRITE_SPRAY || ms_RadarTrace[blipId].m_IconID == RADAR_SPRITE_WEAPON)
+ if ((ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_BOMB || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SAVE
+ || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_SPRAY || ms_RadarTrace[blipId].m_eRadarSprite == RADAR_SPRITE_WEAPON)
&& (ms_RadarTrace[blipId].m_eBlipType != BLIP_CONTACT_POINT || !CTheScripts::IsPlayerOnAMission())) {
uint32 color = GetRadarTraceColour(ms_RadarTrace[blipId].m_nColor, ms_RadarTrace[blipId].m_bDim);
@@ -411,8 +429,8 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, ms_RadarTrace[blipId].m_vec2DPos);
float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, in);
- if (ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_NONE) {
- DrawRadarSprite(ms_RadarTrace[blipId].m_IconID, out.x, out.y, CalculateBlipAlpha(dist));
+ if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE) {
+ DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
} else {
#ifdef TRIANGULAR_BLIPS
CVector &pos = FindPlayerCentreOfWorld_NoSniperShift();
@@ -442,8 +460,8 @@ void CRadar::DrawBlips()
case BLIP_CAR:
case BLIP_CHAR:
case BLIP_OBJECT:
- if (ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_BOMB && ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_SAVE
- && ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_SPRAY && ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_WEAPON) {
+ if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_BOMB && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SAVE
+ && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SPRAY && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_WEAPON) {
switch (ms_RadarTrace[blipId].m_eBlipType) {
case BLIP_CAR:
@@ -477,8 +495,8 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, blipEntity->GetPosition());
float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, in);
- if (ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_NONE)
- DrawRadarSprite(ms_RadarTrace[blipId].m_IconID, out.x, out.y, CalculateBlipAlpha(dist));
+ if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE)
+ DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
else
#ifdef TRIANGULAR_BLIPS
{
@@ -509,8 +527,8 @@ void CRadar::DrawBlips()
switch (ms_RadarTrace[blipId].m_eBlipType) {
case BLIP_COORD:
case BLIP_CONTACT_POINT:
- if (ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_BOMB && ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_SAVE
- && ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_SPRAY && ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_WEAPON
+ if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_BOMB && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SAVE
+ && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_SPRAY && ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_WEAPON
&& (ms_RadarTrace[blipId].m_eBlipType != BLIP_CONTACT_POINT || !CTheScripts::IsPlayerOnAMission())) {
uint32 color = GetRadarTraceColour(ms_RadarTrace[blipId].m_nColor, ms_RadarTrace[blipId].m_bDim);
@@ -526,8 +544,8 @@ void CRadar::DrawBlips()
TransformRealWorldPointToRadarSpace(in, ms_RadarTrace[blipId].m_vec2DPos);
float dist = LimitRadarPoint(in);
TransformRadarPointToScreenSpace(out, in);
- if (ms_RadarTrace[blipId].m_IconID != RADAR_SPRITE_NONE)
- DrawRadarSprite(ms_RadarTrace[blipId].m_IconID, out.x, out.y, CalculateBlipAlpha(dist));
+ if (ms_RadarTrace[blipId].m_eRadarSprite != RADAR_SPRITE_NONE)
+ DrawRadarSprite(ms_RadarTrace[blipId].m_eRadarSprite, out.x, out.y, CalculateBlipAlpha(dist));
else
#ifdef TRIANGULAR_BLIPS
{
@@ -550,6 +568,14 @@ void CRadar::DrawBlips()
break;
}
}
+#ifdef MENU_MAP
+ if (CMenuManager::bMenuMapActive) {
+ CVector2D in, out;
+ TransformRealWorldPointToRadarSpace(in, FindPlayerCentreOfWorld_NoSniperShift());
+ TransformRadarPointToScreenSpace(out, in);
+ DrawYouAreHereSprite(out.x, out.y);
+ }
+#endif
}
}
@@ -701,8 +727,8 @@ void CRadar::DrawRadarSprite(uint16 sprite, float x, float y, uint8 alpha)
{
RadarSprites[sprite]->Draw(CRect(x - SCREEN_SCALE_X(8.0f), y - SCREEN_SCALE_Y(8.0f), x + SCREEN_SCALE_X(8.0f), y + SCREEN_SCALE_Y(8.0f)), CRGBA(255, 255, 255, alpha));
#ifdef MENU_MAP
- if (bMenuMapActive) {
- bool alreadyThere;
+ if (CMenuManager::bMenuMapActive) {
+ bool alreadyThere = false;
for (int i = 0; i < NUM_MAP_LEGENDS; i++) {
if (MapLegendList[i] == sprite)
alreadyThere = true;
@@ -834,7 +860,7 @@ CRadar::Initialise()
ms_RadarTrace[i].m_bInUse = false;
ms_RadarTrace[i].m_eBlipType = BLIP_NONE;
ms_RadarTrace[i].m_eBlipDisplay = BLIP_DISPLAY_NEITHER;
- ms_RadarTrace[i].m_IconID = RADAR_SPRITE_NONE;
+ ms_RadarTrace[i].m_eRadarSprite = RADAR_SPRITE_NONE;
}
m_radarRange = 350.0f;
@@ -847,6 +873,10 @@ float CRadar::LimitRadarPoint(CVector2D &point)
float dist, invdist;
dist = point.Magnitude();
+#ifdef MENU_MAP
+ if (CMenuManager::bMenuMapActive)
+ return dist;
+#endif
if (dist > 1.0f) {
invdist = 1.0f / dist;
point.x *= invdist;
@@ -930,7 +960,7 @@ void CRadar::SetBlipSprite(int32 i, int32 icon)
{
int index = CRadar::GetActualBlipArrayIndex(i);
if (index != -1) {
- ms_RadarTrace[index].m_IconID = icon;
+ ms_RadarTrace[index].m_eRadarSprite = icon;
}
}
@@ -951,7 +981,7 @@ int CRadar::SetCoordBlip(eBlipType type, CVector pos, int32 color, eBlipDisplay
ms_RadarTrace[nextBlip].m_nEntityHandle = 0;
ms_RadarTrace[nextBlip].m_wScale = 1;
ms_RadarTrace[nextBlip].m_eBlipDisplay = display;
- ms_RadarTrace[nextBlip].m_IconID = RADAR_SPRITE_NONE;
+ ms_RadarTrace[nextBlip].m_eRadarSprite = RADAR_SPRITE_NONE;
return CRadar::GetNewUniqueBlipIndex(nextBlip);
}
@@ -970,7 +1000,7 @@ int CRadar::SetEntityBlip(eBlipType type, int32 handle, int32 color, eBlipDispla
ms_RadarTrace[nextBlip].m_nEntityHandle = handle;
ms_RadarTrace[nextBlip].m_wScale = 1;
ms_RadarTrace[nextBlip].m_eBlipDisplay = display;
- ms_RadarTrace[nextBlip].m_IconID = RADAR_SPRITE_NONE;
+ ms_RadarTrace[nextBlip].m_eRadarSprite = RADAR_SPRITE_NONE;
return GetNewUniqueBlipIndex(nextBlip);
}
@@ -1050,8 +1080,8 @@ void CRadar::ShowRadarTraceWithHeight(float x, float y, uint32 size, uint8 red,
}
#ifdef MENU_MAP
// VC uses -1 for coords and -2 for entities but meh, I don't want to edit DrawBlips
- if (bMenuMapActive) {
- bool alreadyThere;
+ if (CMenuManager::bMenuMapActive) {
+ bool alreadyThere = false;
for (int i = 0; i < NUM_MAP_LEGENDS; i++) {
if (MapLegendList[i] == -1)
alreadyThere = true;
@@ -1156,9 +1186,10 @@ void CRadar::TransformRadarPointToRealWorldSpace(CVector2D &out, const CVector2D
void CRadar::TransformRadarPointToScreenSpace(CVector2D &out, const CVector2D &in)
{
#ifdef MENU_MAP
- if (bMenuMapActive) {
- out.x = MENU_X_LEFT_ALIGNED((0.66193402f * m_nMapNegativePadding * in.x) + (0.2348f * m_nMapNegativePadding) + m_nMapLeftPadding);
- out.y = MENU_Y(m_nMapTopPadding - (0.065807f * m_nMapNegativePadding) - (0.66563499f * m_nMapNegativePadding * in.y));
+ if (CMenuManager::bMenuMapActive) {
+ // fMapSize is actually half map size. Radar range is 1000, so if x is -2000, in.x + 2.0f is 0.
+ out.x = (CMenuManager::fMapCenterX - CMenuManager::fMapSize) + (in.x + 2.0f) * CMenuManager::fMapSize * 2.0f / 4.0f;
+ out.y = (CMenuManager::fMapCenterY - CMenuManager::fMapSize) + (2.0f - in.y) * CMenuManager::fMapSize * 2.0f / 4.0f;
} else
#endif
{
@@ -1331,7 +1362,7 @@ CRadar::CalculateCachedSinCos()
{
if (TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOPDOWN || TheCamera.Cams[TheCamera.ActiveCam].Mode == CCam::MODE_TOP_DOWN_PED
#ifdef MENU_MAP
- || bMenuMapActive
+ || CMenuManager::bMenuMapActive
#endif
) {
cachedSin = 0.0f;
@@ -1361,7 +1392,7 @@ CRadar::InitFrontEndMap()
CalculateCachedSinCos();
vec2DRadarOrigin.x = 0.0f;
vec2DRadarOrigin.y = 0.0f;
- m_radarRange = 1190.0f;
+ m_radarRange = 1000.0f; // doesn't mean anything, just affects the calculation in TransformRadarPointToScreenSpace
for (int i = 0; i < NUM_MAP_LEGENDS; i++) {
MapLegendList[i] = RADAR_SPRITE_NONE;
}
@@ -1369,6 +1400,62 @@ CRadar::InitFrontEndMap()
ArrowBlipColour1 = CRGBA(0, 0, 0, 0);
ArrowBlipColour2 = CRGBA(0, 0, 0, 0);
}
+
+void
+CRadar::DrawYouAreHereSprite(float x, float y)
+{
+ static uint32 lastChange = 0;
+ static bool show = true;
+
+ if (show) {
+ if (CTimer::GetTimeInMillisecondsPauseMode() - lastChange > 500) {
+ lastChange = CTimer::GetTimeInMillisecondsPauseMode();
+ show = !show;
+ }
+ } else {
+ if (CTimer::GetTimeInMillisecondsPauseMode() - lastChange > 200) {
+ lastChange = CTimer::GetTimeInMillisecondsPauseMode();
+ show = !show;
+ }
+ }
+
+ if (show) {
+ float left = x - SCREEN_SCALE_X(12.0f);
+ float top = y - SCREEN_SCALE_Y(2.0f);
+ float right = SCREEN_SCALE_X(12.0) + x;
+ float bottom = y - SCREEN_SCALE_Y(26.0f);
+ CentreSprite.Draw(CRect(left, top, right, bottom), CRGBA(255, 217, 106, 255));
+ }
+ MapLegendList[MapLegendCounter++] = RADAR_SPRITE_CENTRE;
+}
+
+void
+CRadar::ToggleTargetMarker(float x, float y)
+{
+ if (TargetMarkerId == -1) {
+ int nextBlip;
+ for (nextBlip = 0; nextBlip < NUMRADARBLIPS; nextBlip++) {
+ if (!ms_RadarTrace[nextBlip].m_bInUse)
+ break;
+ }
+ ms_RadarTrace[nextBlip].m_eBlipType = BLIP_COORD;
+ ms_RadarTrace[nextBlip].m_nColor = 0x333333FF;
+ ms_RadarTrace[nextBlip].m_bDim = 1;
+ ms_RadarTrace[nextBlip].m_bInUse = 1;
+ ms_RadarTrace[nextBlip].m_Radius = 1.0f;
+ CVector pos(x, y, CWorld::FindGroundZForCoord(x,y));
+ ms_RadarTrace[nextBlip].m_vec2DPos = pos;
+ ms_RadarTrace[nextBlip].m_vecPos = pos;
+ ms_RadarTrace[nextBlip].m_nEntityHandle = 0;
+ ms_RadarTrace[nextBlip].m_wScale = 5;
+ ms_RadarTrace[nextBlip].m_eBlipDisplay = BLIP_DISPLAY_BLIP_ONLY;
+ ms_RadarTrace[nextBlip].m_eRadarSprite = RADAR_SPRITE_NONE;
+ TargetMarkerId = CRadar::GetNewUniqueBlipIndex(nextBlip);
+ } else {
+ ClearBlip(TargetMarkerId);
+ TargetMarkerId = -1;
+ }
+}
#endif
STARTPATCHES
diff --git a/src/core/Radar.h b/src/core/Radar.h
index fb10967b..6d5bb196 100644
--- a/src/core/Radar.h
+++ b/src/core/Radar.h
@@ -69,7 +69,7 @@ struct CBlip
float m_Radius;
int16 m_wScale;
uint16 m_eBlipDisplay; // eBlipDisplay
- uint16 m_IconID; // eRadarSprite
+ uint16 m_eRadarSprite; // eRadarSprite
};
static_assert(sizeof(CBlip) == 0x30, "CBlip: error");
@@ -108,12 +108,16 @@ public:
static float cachedCos;
static float cachedSin;
#ifdef MENU_MAP
+#define NUM_MAP_LEGENDS 75
static CRGBA ArrowBlipColour1;
static CRGBA ArrowBlipColour2;
- static uint16 MapLegendList[75];
- static bool bMenuMapActive;
+ static uint16 MapLegendList[NUM_MAP_LEGENDS];
+ static uint16 MapLegendCounter;
+ static int TargetMarkerId;
static void InitFrontEndMap();
+ static void DrawYouAreHereSprite(float, float);
+ static void ToggleTargetMarker(float, float);
#endif
static uint8 CalculateBlipAlpha(float dist);
static void ChangeBlipBrightness(int32 i, int32 bright);
diff --git a/src/core/config.h b/src/core/config.h
index d813a1f2..75ecbfad 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -192,7 +192,7 @@ enum Config {
#define TRIANGULAR_BLIPS // height indicating triangular radar blips, as in VC
#define PS2_SAVE_DIALOG // PS2 style save dialog with transparent black box
// #define PS2_LIKE_MENU // An effort to recreate PS2 menu, cycling through tabs, different bg etc.
-// #define MENU_MAP // Very WIP
+#define MENU_MAP // VC-like menu map. Make sure you have new menu.txd
// Script
#define USE_DEBUG_SCRIPT_LOADER // makes game load main_freeroam.scm by default