summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/audio/AudioLogic.cpp8
-rw-r--r--src/audio/AudioManager.cpp3
-rw-r--r--src/audio/AudioManager.h7
-rw-r--r--src/audio/DMAudio.cpp2
-rw-r--r--src/audio/MusicManager.cpp18
-rw-r--r--src/audio/PoliceRadio.cpp563
-rw-r--r--src/audio/oal/stream.cpp2
-rw-r--r--src/audio/soundlist.h157
-rw-r--r--src/control/Script.cpp32
-rw-r--r--src/core/Pad.h4
-rw-r--r--src/core/TempColModels.cpp18
-rw-r--r--src/core/Timer.cpp4
-rw-r--r--src/core/Zones.h2
-rw-r--r--src/core/config.h2
-rw-r--r--src/core/main.cpp104
-rw-r--r--src/modelinfo/PedModelInfo.cpp27
-rw-r--r--src/objects/ObjectData.cpp73
-rw-r--r--src/peds/EmergencyPed.cpp48
-rw-r--r--src/peds/PedDebug.cpp57
-rw-r--r--src/skel/crossplatform.cpp43
-rw-r--r--src/text/Messages.cpp10
-rw-r--r--src/vehicles/Train.cpp2
22 files changed, 615 insertions, 571 deletions
diff --git a/src/audio/AudioLogic.cpp b/src/audio/AudioLogic.cpp
index 6ea93f6d..d4ddbda8 100644
--- a/src/audio/AudioLogic.cpp
+++ b/src/audio/AudioLogic.cpp
@@ -5085,7 +5085,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
static uint8 iSound = 0;
switch (sound) {
- case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_S:
+ /*case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_S:
case SCRIPT_SOUND_INJURED_PED_MALE_OUCH_L:
male.m_pPed = nil;
male.m_bDistanceCalculated = false;
@@ -5113,7 +5113,7 @@ cAudioManager::ProcessOneShotScriptObject(uint8 sound)
m_sQueueSample.m_bIs2D = false;
m_sQueueSample.m_bRequireReflection = true;
emittingVolume = RandomDisplacement(10) + 50;
- break;
+ break;*/
case SCRIPT_SOUND_BULLET_HIT_GROUND_1:
case SCRIPT_SOUND_BULLET_HIT_GROUND_2:
case SCRIPT_SOUND_BULLET_HIT_GROUND_3:
@@ -5328,7 +5328,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
float distSquared;
switch (sound) {
- case SCRIPT_SOUND_PARTY_1_LOOP_S:
+ /*case SCRIPT_SOUND_PARTY_1_LOOP_S:
m_sQueueSample.m_fSoundIntensity = SCRIPT_OBJECT_INTENSITY_S;
m_sQueueSample.m_nSampleIndex = SFX_CLUB_1;
m_sQueueSample.m_nBankIndex = SFX_BANK_0;//SAMPLEBANK_BUILDING_CLUB_1;
@@ -5427,7 +5427,7 @@ cAudioManager::ProcessLoopingScriptObject(uint8 sound)
m_sQueueSample.m_nReleasingVolumeModificator = 8;
m_sQueueSample.m_nReleasingVolumeDivider = 10;
m_sQueueSample.m_fSpeedMultiplier = 2.0f;
- break;
+ break;*/
default:
return;
}
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index d36316eb..4b7039c6 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -437,7 +437,6 @@ cAudioManager::IsAudioInitialised() const
void
cAudioManager::ServiceSoundEffects()
{
- field_5554++;
m_bFifthFrameFlag = (m_FrameCounter++ % 5) == 0;
if (m_nUserPause && !m_nPreviousUserPause) {
for (int32 i = 0; i < allChannels; i++)
@@ -838,7 +837,7 @@ cAudioManager::ProcessActiveQueues()
sample.m_nSampleIndex == m_asActiveSamples[j].m_nSampleIndex) {
if (sample.m_nLoopCount) {
- if (field_5554 & 1) {
+ if (m_FrameCounter & 1) {
if (!(j & 1)) {
flag = false;
} else {
diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h
index ae130b85..d7a744cd 100644
--- a/src/audio/AudioManager.h
+++ b/src/audio/AudioManager.h
@@ -76,6 +76,8 @@ public:
uint8 m_nIndexMap[NUM_PED_COMMENTS_BANKS][NUM_PED_COMMENTS_SLOTS];
uint8 m_nCommentsInBank[NUM_PED_COMMENTS_BANKS];
uint8 m_nActiveBank;
+ bool m_bDelay;
+ uint32 m_nDelayTimer;
cPedComments()
{
@@ -221,7 +223,6 @@ public:
uint8 m_nUserPause;
uint8 m_nPreviousUserPause;
uint32 m_FrameCounter;
- uint32 field_5554;
cAudioManager();
~cAudioManager();
@@ -370,7 +371,7 @@ public:
void ReacquireDigitalHandle() const; // done
void ReleaseDigitalHandle() const; // done
void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); // done
- void ReportCrime(int32 crime, const CVector *pos); // done
+ void ReportCrime(eCrimeType crime, const CVector &pos); // done
void ResetAudioLogicTimers(uint32 timer);
void ResetPoliceRadio();
void ResetTimers(uint32 time);
@@ -378,7 +379,7 @@ public:
void Service();
void ServiceCollisions();
void ServicePoliceRadio();
- void ServicePoliceRadioChannel(int32 wantedLevel);
+ void ServicePoliceRadioChannel(uint8 wantedLevel);
void ServiceSoundEffects();
int8 SetCurrent3DProvider(uint8 which);
void SetDynamicAcousticModelingStatus(uint8 status);
diff --git a/src/audio/DMAudio.cpp b/src/audio/DMAudio.cpp
index a4db2862..ade53d9b 100644
--- a/src/audio/DMAudio.cpp
+++ b/src/audio/DMAudio.cpp
@@ -190,7 +190,7 @@ cDMAudio::IsAudioInitialised(void)
void
cDMAudio::ReportCrime(eCrimeType crime, const CVector &pos)
{
- AudioManager.ReportCrime(crime, &pos);
+ AudioManager.ReportCrime(crime, pos);
}
int32
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index fde92590..adae2708 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -374,7 +374,7 @@ cMusicManager::Service()
field_399A = true;
if (!field_3999 && !AudioManager.m_nUserPause && AudioManager.m_nPreviousUserPause)
field_3999 = true;
- if (AudioManager.field_5554 % 4 == 0) {
+ if (AudioManager.m_FrameCounter % 4 == 0) {
gNumRetunePresses = 0;
gRetuneCounter = 0;
field_2 = false;
@@ -422,7 +422,7 @@ cMusicManager::ServiceFrontEndMode()
m_nPlayingTrack = NO_TRACK;
}
- if (AudioManager.field_5554 % 4 != 0) return;
+ if (AudioManager.m_FrameCounter % 4 != 0) return;
if (!field_398F && !field_3995) {
m_nStreamedTrack = m_nFrontendTrack;
@@ -893,7 +893,7 @@ cMusicManager::ServiceTrack(CVehicle *veh, CPed *ped)
{
field_398F = true;
SampleManager.SetStreamedVolumeAndPan(0, 63, 0, 0);
- if (!(AudioManager.field_5554 & 1)) {
+ if (!(AudioManager.m_FrameCounter & 1)) {
if (field_3995 || !SampleManager.IsStreamPlaying(0)) {
bRadioStatsRecorded2 = false;
if (SampleManager.IsStreamPlaying(0)) {
@@ -1160,13 +1160,13 @@ cMusicManager::SetMalibuClubTrackPos(uint8 scriptObject)
if (m_nStreamedTrack != STREAMED_SOUND_MALIBU_AMBIENT && m_nPlayingTrack != STREAMED_SOUND_MALIBU_AMBIENT) {
switch (scriptObject)
{
- case SCRIPT_SOUND_MALIBU_1:
+ case SCRIPT_SOUND_NEW_BUILDING_MALIBU_1:
m_aTracks[STREAMED_SOUND_MALIBU_AMBIENT].m_nPosition = (AudioManager.m_anRandomTable[0] % 128) + 8640;
break;
- case SCRIPT_SOUND_MALIBU_2:
+ case SCRIPT_SOUND_NEW_BUILDING_MALIBU_2:
m_aTracks[STREAMED_SOUND_MALIBU_AMBIENT].m_nPosition = (AudioManager.m_anRandomTable[0] % 128) + 286720;
break;
- case SCRIPT_SOUND_MALIBU_3:
+ case SCRIPT_SOUND_NEW_BUILDING_MALIBU_3:
m_aTracks[STREAMED_SOUND_MALIBU_AMBIENT].m_nPosition = (AudioManager.m_anRandomTable[0] % 128) + 509120;
break;
}
@@ -1183,13 +1183,13 @@ cMusicManager::SetStripClubTrackPos(uint8 scriptObject)
{
switch (scriptObject)
{
- case SCRIPT_SOUND_STRIPCLUB_1:
+ case SCRIPT_SOUND_NEW_BUILDING_STRIP_1:
m_aTracks[STREAMED_SOUND_STRIPCLUB_AMBIENT].m_nPosition = AudioManager.m_anRandomTable[0] % 128;
break;
- case SCRIPT_SOUND_STRIPCLUB_2:
+ case SCRIPT_SOUND_NEW_BUILDING_STRIP_2:
m_aTracks[STREAMED_SOUND_STRIPCLUB_AMBIENT].m_nPosition = (AudioManager.m_anRandomTable[0] % 128) + 320200;
break;
- case SCRIPT_SOUND_STRIPCLUB_3:
+ case SCRIPT_SOUND_NEW_BUILDING_STRIP_3:
m_aTracks[STREAMED_SOUND_STRIPCLUB_AMBIENT].m_nPosition = (AudioManager.m_anRandomTable[0] % 128) + 672000;
break;
}
diff --git a/src/audio/PoliceRadio.cpp b/src/audio/PoliceRadio.cpp
index bd29ad4b..781040d6 100644
--- a/src/audio/PoliceRadio.cpp
+++ b/src/audio/PoliceRadio.cpp
@@ -65,7 +65,7 @@ cAudioManager::InitialisePoliceRadio()
m_sPoliceRadioQueue.policeChannelTimerSeconds = 0;
m_sPoliceRadioQueue.policeChannelCounterSeconds = 0;
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++)
- m_sPoliceRadioQueue.crimes[i].type = 0;
+ m_sPoliceRadioQueue.crimes[i].type = CRIME_NONE;
SampleManager.SetChannelReverbFlag(policeChannel, 0);
gSpecialSuspectLastSeenReport = false;
@@ -128,20 +128,23 @@ cAudioManager::ServicePoliceRadio()
if(!m_bIsInitialised) return;
- if(!m_nUserPause) {
+ if(m_nUserPause == 0) {
bool crimeReport = SetupCrimeReport();
#ifdef FIX_BUGS // Crash at 0x5fe6ef
if(CReplay::IsPlayingBack() || !FindPlayerPed() || !FindPlayerPed()->m_pWanted)
return;
#endif
- wantedLevel = FindPlayerPed()->m_pWanted->m_nWantedLevel;
- if(!crimeReport) {
- if(wantedLevel) {
- if(nLastSeen) {
- --nLastSeen;
- } else {
- nLastSeen = m_anRandomTable[1] % 1000 + 2000;
- SetupSuspectLastSeenReport();
+ CPlayerPed *playerPed = FindPlayerPed();
+ if (playerPed) {
+ wantedLevel = playerPed->m_pWanted->m_nWantedLevel;
+ if (!crimeReport) {
+ if (wantedLevel != 0) {
+ if (nLastSeen != 0)
+ --nLastSeen;
+ else {
+ nLastSeen = m_anRandomTable[1] % 1000 + 2000;
+ SetupSuspectLastSeenReport();
+ }
}
}
}
@@ -150,7 +153,7 @@ cAudioManager::ServicePoliceRadio()
}
void
-cAudioManager::ServicePoliceRadioChannel(int32 wantedLevel)
+cAudioManager::ServicePoliceRadioChannel(uint8 wantedLevel)
{
bool processed = false;
uint32 sample;
@@ -159,18 +162,18 @@ cAudioManager::ServicePoliceRadioChannel(int32 wantedLevel)
static int cWait = 0;
static bool bChannelOpen = false;
static uint8 bMissionAudioPhysicalPlayingStatus = 0;
- static int32 PoliceChannelFreq = 5500;
+ static int32 PoliceChannelFreq = 22050;
if (!m_bIsInitialised) return;
- if (m_nUserPause) {
+ if (m_nUserPause != 0) {
if (SampleManager.GetChannelUsedFlag(policeChannel)) SampleManager.StopChannel(policeChannel);
- if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && bMissionAudioPhysicalPlayingStatus == 1 &&
+ if (g_nMissionAudioSfx != NO_SAMPLE && bMissionAudioPhysicalPlayingStatus == 1 &&
SampleManager.IsStreamPlaying(1)) {
SampleManager.PauseStream(1, 1);
}
} else {
- if (m_nPreviousUserPause && g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES &&
+ if (m_nPreviousUserPause && g_nMissionAudioSfx != NO_SAMPLE &&
bMissionAudioPhysicalPlayingStatus == 1) {
SampleManager.PauseStream(0, 1);
}
@@ -179,7 +182,7 @@ cAudioManager::ServicePoliceRadioChannel(int32 wantedLevel)
--cWait;
return;
}
- if (g_nMissionAudioSfx != TOTAL_AUDIO_SAMPLES && !bChannelOpen) {
+ if (g_nMissionAudioSfx != NO_SAMPLE && !bChannelOpen) {
if (g_nMissionAudioPlayingStatus) {
if (g_nMissionAudioPlayingStatus == 1 && !bMissionAudioPhysicalPlayingStatus &&
SampleManager.IsStreamPlaying(1)) {
@@ -191,7 +194,7 @@ cAudioManager::ServicePoliceRadioChannel(int32 wantedLevel)
} else {
bMissionAudioPhysicalPlayingStatus = 2;
g_nMissionAudioPlayingStatus = 2;
- g_nMissionAudioSfx = TOTAL_AUDIO_SAMPLES;
+ g_nMissionAudioSfx = NO_SAMPLE;
cWait = 30;
}
return;
@@ -206,24 +209,24 @@ cAudioManager::ServicePoliceRadioChannel(int32 wantedLevel)
}
}
if (bChannelOpen) DoPoliceRadioCrackle();
- if ((g_nMissionAudioSfx == TOTAL_AUDIO_SAMPLES || g_nMissionAudioPlayingStatus != 1) &&
+ if ((g_nMissionAudioSfx == NO_SAMPLE || g_nMissionAudioPlayingStatus != 1) &&
!SampleManager.GetChannelUsedFlag(policeChannel) && m_sPoliceRadioQueue.policeChannelTimer) {
if (m_sPoliceRadioQueue.policeChannelTimer) {
sample = m_sPoliceRadioQueue.crimesSamples[m_sPoliceRadioQueue.policeChannelCounterSeconds];
m_sPoliceRadioQueue.policeChannelTimer--;
m_sPoliceRadioQueue.policeChannelCounterSeconds = (m_sPoliceRadioQueue.policeChannelCounterSeconds + 1) % 60;
} else {
- sample = TOTAL_AUDIO_SAMPLES;
+ sample = NO_SAMPLE;
}
- if (!wantedLevel) {
+ if (wantedLevel == 0) {
if (gSpecialSuspectLastSeenReport) {
gSpecialSuspectLastSeenReport = 0;
- } else if (sample == SFX_POLICE_RADIO_MESSAGE_NOISE_1 || sample == TOTAL_AUDIO_SAMPLES) {
+ } else if (sample == SFX_POLICE_RADIO_MESSAGE_NOISE_1) {
bChannelOpen = false;
processed = true;
}
}
- if (sample == TOTAL_AUDIO_SAMPLES) {
+ if (sample == NO_SAMPLE) {
if (!processed) cWait = 30;
} else {
SampleManager.InitialiseChannel(policeChannel, sample, 0);
@@ -281,17 +284,28 @@ cAudioManager::SetupCrimeReport()
for (int j = 0; j < NUMAUDIOZONES; j++) {
if (strcmp(zone->name, ZoneSfx[j].m_aName) == 0) {
sampleIndex = ZoneSfx[j].m_nSampleIndex;
- m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
+ m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_WEVE_GOT);
m_sPoliceRadioQueue.Add(SFX_A_10);
switch (m_sPoliceRadioQueue.crimes[i].type) {
- case CRIME_PED_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_PED; break;
- case CRIME_COP_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_COP; break;
+ case CRIME_PED_BURNED:
+ case CRIME_HIT_PED_NASTYWEAPON:
+ m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_PED;
+ break;
+ case CRIME_COP_BURNED:
+ case CRIME_HIT_COP_NASTYWEAPON:
+ m_sPoliceRadioQueue.crimes[i].type = CRIME_HIT_COP;
+ break;
case CRIME_VEHICLE_BURNED: m_sPoliceRadioQueue.crimes[i].type = CRIME_STEAL_CAR; break;
case CRIME_DESTROYED_CESSNA: m_sPoliceRadioQueue.crimes[i].type = CRIME_SHOOT_HELI; break;
+ case CRIME_EXPLOSION: m_sPoliceRadioQueue.crimes[i].type = CRIME_STEAL_CAR; break; // huh?
default: break;
}
+#ifdef FIX_BUGS
m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1 - 1);
+#else
+ m_sPoliceRadioQueue.Add(m_sPoliceRadioQueue.crimes[i].type + SFX_CRIME_1);
+#endif
m_sPoliceRadioQueue.Add(SFX_IN);
rangeX = zone->maxx - zone->minx;
rangeY = zone->maxy - zone->miny;
@@ -316,8 +330,8 @@ cAudioManager::SetupCrimeReport()
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
m_sPoliceRadioQueue.Add(sampleIndex);
- m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
- m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
+ m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
+ m_sPoliceRadioQueue.Add(NO_SAMPLE);
break;
}
}
@@ -339,161 +353,105 @@ cAudioManager::SetupSuspectLastSeenReport()
int32 color_post_modifier;
const int32 gCarColourTable[][3] = {
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLACK, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_WHITE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLACK, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_WHITE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {SFX_POLICE_RADIO_BRIGHT, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
{SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, SFX_POLICE_RADIO_GREY},
-#ifdef FIX_BUGS
- {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
-#else
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
-#endif
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
-#ifdef FIX_BUGS
- {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_RED, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
-#else
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
-#endif
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
-#ifdef FIX_BUGS
- {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_ORANGE, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
-#else
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
-#endif
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
-#ifdef FIX_BUGS
- {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_YELLOW, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
-#else
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
-#endif
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
-#ifdef FIX_BUGS
- {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_GREEN, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
-#else
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
-#endif
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
-#ifdef FIX_BUGS
- {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_BLUE, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, SFX_POLICE_RADIO_BLUE},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
-#else
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
-#endif
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
-#ifdef FIX_BUGS
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, SFX_POLICE_RADIO_GREY},
-#else
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
-#endif
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
-#ifdef FIX_BUGS
- {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_PURPLE, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
-#else
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
-#endif
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
-#ifdef FIX_BUGS
- {SFX_POLICE_RADIO_LIGHT, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
-#else
- {TOTAL_AUDIO_SAMPLES, SFX_POLICE_RADIO_SILVER, TOTAL_AUDIO_SAMPLES},
-#endif
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_LIGHT, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES},
- {SFX_POLICE_RADIO_DARK, TOTAL_AUDIO_SAMPLES, TOTAL_AUDIO_SAMPLES}
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_RED, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_ORANGE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_YELLOW, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_GREEN, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_BLUE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_PURPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {NO_SAMPLE, SFX_POLICE_RADIO_SILVER, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_LIGHT, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE},
+ {SFX_POLICE_RADIO_DARK, NO_SAMPLE, NO_SAMPLE}
};
if (MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE) {
- veh = FindPlayerVehicle();
+ veh = FindVehicleOfPlayer();
if (veh != nil) {
if (60 - m_sPoliceRadioQueue.policeChannelTimer > 9) {
color1 = veh->m_currentColour1;
@@ -504,156 +462,213 @@ cAudioManager::SetupSuspectLastSeenReport()
color_pre_modifier = gCarColourTable[color1][0];
color_post_modifier = gCarColourTable[color1][2];
switch (veh->GetModelIndex()) {
-// TODO(MIAMI): just making this compile
-#ifdef FIX_BUGS
- // case MI_COLUMB:
- // main_color = SFX_POLICE_RADIO_BLUE;
- // color_pre_modifier = color_post_modifier = TOTAL_AUDIO_SAMPLES;
-#endif
case MI_LANDSTAL:
- // case MI_BLISTA:
- sample = SFX_POLICE_RADIO_CRUISER; break;
-#ifdef FIX_BUGS
- // case MI_YARDIE:
- // color_pre_modifier = TOTAL_AUDIO_SAMPLES;
- // main_color = SFX_POLICE_RADIO_RED;
- // color_post_modifier = SFX_POLICE_RADIO_YELLOW;
- // sample = SFX_POLICE_RADIO_CONVERTIBLE; break;
- // case MI_DIABLOS:
- // main_color = SFX_POLICE_RADIO_BLACK;
-#endif
+ case MI_PATRIOT:
+ case MI_RANCHER:
+ case MI_FBIRANCH:
+ case MI_SANDKING:
+ sample = SFX_POLICE_RADIO_OFFROAD;
+ break;
case MI_IDAHO:
- // case MI_STALLION: sample = SFX_POLICE_RADIO_CONVERTIBLE; break;
-#ifdef FIX_BUGS
- // case MI_YAKUZA:
- // color_pre_modifier = TOTAL_AUDIO_SAMPLES;
- // main_color = SFX_POLICE_RADIO_SILVER;
- // color_post_modifier = SFX_POLICE_RADIO_RED;
-#endif
+ case MI_MANANA:
+ case MI_ESPERANT:
+ case MI_CUBAN:
+ case MI_STALLION:
+ case MI_SABRE:
+ case MI_SABRETUR:
+ case MI_VIRGO:
+ case MI_BLISTAC:
+ sample = SFX_POLICE_RADIO_2_DOOR;
+ break;
case MI_STINGER:
case MI_INFERNUS:
case MI_CHEETAH:
- case MI_BANSHEE: sample = SFX_POLICE_RADIO_SPORTS_CAR; break;
-#ifdef FIX_BUGS
- // case MI_MAFIA:
- // color_pre_modifier = color_post_modifier = TOTAL_AUDIO_SAMPLES;
- // main_color = SFX_POLICE_RADIO_GREY;
- case MI_WASHING:
-#endif
+ case MI_BANSHEE:
+ case MI_PHEONIX:
+ case MI_COMET:
+ case MI_DELUXO:
+ case MI_HOTRING:
+ sample = SFX_POLICE_RADIO_SPORTS_CAR;
+ break;
+ case MI_LINERUN:
+ sample = SFX_POLICE_RADIO_RIG;
+ break;
case MI_PEREN:
+ case MI_REGINA:
+ sample = SFX_POLICE_RADIO_STATION_WAGON;
+ break;
case MI_SENTINEL:
- // case MI_FBICAR: sample = SFX_POLICE_RADIO_SALOON; break;
- case MI_PATRIOT:
- case MI_BOBCAT: sample = SFX_POLICE_RADIO_PICKUP; break;
- case MI_FIRETRUCK: sample = SFX_POLICE_RADIO_FIRE_TRUCK; break;
-#ifdef FIX_BUGS
- case MI_LINERUN:
- case MI_FLATBED:
-#endif
+ case MI_FBICAR:
+ case MI_WASHING:
+ case MI_SENTXS:
+ case MI_ADMIRAL:
+ case MI_GLENDALE:
+ case MI_OCEANIC:
+ case MI_HERMES:
+ case MI_GREENWOO:
+ sample = SFX_POLICE_RADIO_SEDAN;
+ break;
+ case MI_RIO:
+ sample = SFX_POLICE_RADIO_CRUISER;
+ break;
+ case MI_FIRETRUCK:
+ sample = SFX_POLICE_RADIO_FIRE_TRUCK;
+ break;
case MI_TRASH:
- case MI_BARRACKS: sample = SFX_POLICE_RADIO_TRUCK; break;
- // case MI_STRETCH: sample = SFX_POLICE_RADIO_LIMO; break;
- case MI_MANANA:
- case MI_ESPERANT: sample = SFX_POLICE_RADIO_2_DOOR; break;
-#ifdef FIX_BUGS
- // case MI_HOODS:
- // color_pre_modifier = TOTAL_AUDIO_SAMPLES;
- // main_color = SFX_POLICE_RADIO_BLUE;
- // color_post_modifier = SFX_POLICE_RADIO_GREEN;
- // case MI_BELLYUP:
- case MI_YANKEE:
- case MI_TOPFUN:
- // case MI_MRWONGS:
- // case MI_PANLANT:
-#endif
+ sample = SFX_POLICE_RADIO_GARBAGE_TRUCK;
+ break;
+ case MI_STRETCH:
+ case MI_LOVEFIST:
+ sample = SFX_POLICE_RADIO_STRETCH;
+ break;
+ case MI_VOODOO:
+ sample = SFX_POLICE_RADIO_LOWRIDER;
+ break;
case MI_PONY:
- case MI_MULE:
case MI_MOONBEAM:
- case MI_ENFORCER:
case MI_SECURICA:
- case MI_RUMPO: sample = SFX_POLICE_RADIO_VAN; break;
- case MI_AMBULAN: sample = SFX_POLICE_RADIO_AMBULANCE; break;
+ case MI_RUMPO:
+ case MI_GANGBUR:
+ case MI_YANKEE:
+ case MI_TOPFUN:
+ case MI_BURRITO:
+ case MI_SPAND:
+ sample = SFX_POLICE_RADIO_VAN;
+ break;
+ case MI_MULE:
+ case MI_BARRACKS:
+ case MI_PACKER:
+ case MI_FLATBED:
+ sample = SFX_POLICE_RADIO_TRUCK;
+ break;
+ case MI_AMBULAN:
+ sample = SFX_POLICE_RADIO_AMBULANCE;
+ break;
case MI_TAXI:
case MI_CABBIE:
- case MI_ZEBRA: sample = SFX_POLICE_RADIO_TAXI; break;
- case MI_KAUFMAN: sample = SFX_POLICE_RADIO_TAXI; break;
+ case MI_ZEBRA:
+ case MI_KAUFMAN:
+ sample = SFX_POLICE_RADIO_TAXI;
+ break;
+ case MI_BOBCAT:
+ case MI_WALTON:
+ sample = SFX_POLICE_RADIO_PICKUP;
+ break;
case MI_MRWHOOP:
sample = SFX_POLICE_RADIO_ICE_CREAM_VAN;
break;
- case MI_BFINJECT: sample = SFX_POLICE_RADIO_BUGGY; break;
- case MI_POLICE: sample = SFX_POLICE_RADIO_POLICE_CAR; break;
-#ifdef FIX_BUGS
+ case MI_BFINJECT:
+ sample = SFX_POLICE_RADIO_BUGGY;
+ break;
+ case MI_HUNTER:
+ case MI_CHOPPER:
+ case MI_SEASPAR:
+ case MI_SPARROW:
+ case MI_MAVERICK:
+ case MI_VCNMAV:
+ case MI_POLMAV:
+ sample = SFX_POLICE_RADIO_HELICOPTER;
+ break;
+ case MI_POLICE:
+ sample = SFX_POLICE_RADIO_POLICE_CAR;
+ break;
+ case MI_ENFORCER:
+ sample = SFX_POLICE_RADIO_SWAT_VAN;
+ break;
+ case MI_PREDATOR:
+ case MI_SQUALO:
case MI_SPEEDER:
- case MI_REEFER:
- // case MI_GHOST:
-#endif
- case MI_PREDATOR: sample = SFX_POLICE_RADIO_BOAT; break;
+ sample = SFX_POLICE_RADIO_SPEEDBOAT;
+ break;
case MI_BUS:
- case MI_COACH: sample = SFX_POLICE_RADIO_BUS; break;
+ sample = SFX_POLICE_RADIO_BUS;
+ break;
case MI_RHINO:
sample = SFX_POLICE_RADIO_TANK;
- main_color = TOTAL_AUDIO_SAMPLES;
- color_post_modifier = TOTAL_AUDIO_SAMPLES;
break;
- // case MI_TRAIN:
- // sample = SFX_POLICE_RADIO_SUBWAY_CAR;
- // main_color = TOTAL_AUDIO_SAMPLES;
- // color_post_modifier = TOTAL_AUDIO_SAMPLES;
-
- // break;
+ case MI_ANGEL:
+ case MI_PCJ600:
+ case MI_FREEWAY:
+ case MI_SANCHEZ:
+ sample = SFX_POLICE_RADIO_MOTOBIKE;
+ break;
+ case MI_COACH:
+ sample = SFX_POLICE_RADIO_COACH;
+ break;
+ case MI_ROMERO:
+ sample = SFX_POLICE_RADIO_HEARSE;
+ break;
+ case MI_PIZZABOY:
+ case MI_FAGGIO:
+ sample = SFX_POLICE_RADIO_MOPED;
+ break;
+ case MI_DEADDODO:
+ case MI_SKIMMER:
+ sample = SFX_POLICE_RADIO_PLANE;
+ break;
+ case MI_REEFER:
+ case MI_TROPIC:
+ case MI_COASTG:
+ case MI_MARQUIS:
+ case MI_JETMAX:
+ sample = SFX_POLICE_RADIO_BOAT;
+ break;
+ case MI_CADDY:
+ sample = SFX_POLICE_RADIO_GOLF_CART;
+ break;
+ case MI_DINGHY:
+ sample = SFX_POLICE_RADIO_DINGHY;
+ break;
default:
- debug("\n *** UNKNOWN CAR MODEL INDEX %d *** ", veh->GetModelIndex());
+ //debug("\n *** UNKNOWN CAR MODEL INDEX %d *** ", veh->GetModelIndex());
return;
}
- m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
+ m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
if (m_anRandomTable[3] % 2)
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN);
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_IN_A);
- if (color_pre_modifier != TOTAL_AUDIO_SAMPLES)
+ if (color_pre_modifier != NO_SAMPLE)
m_sPoliceRadioQueue.Add(color_pre_modifier);
- if (main_color != TOTAL_AUDIO_SAMPLES)
+ if (main_color != NO_SAMPLE)
m_sPoliceRadioQueue.Add(main_color);
- if (color_post_modifier != TOTAL_AUDIO_SAMPLES)
+ if (color_post_modifier != NO_SAMPLE)
m_sPoliceRadioQueue.Add(color_post_modifier);
m_sPoliceRadioQueue.Add(sample);
- m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
- m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
+ m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
+ m_sPoliceRadioQueue.Add(NO_SAMPLE);
}
}
} else if (60 - m_sPoliceRadioQueue.policeChannelTimer > 4) {
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_ON_FOOT);
- m_sPoliceRadioQueue.Add(m_anRandomTable[0] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
- m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
+ m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
+ m_sPoliceRadioQueue.Add(NO_SAMPLE);
}
}
}
-
-
void
-cAudioManager::ReportCrime(int32 type, const CVector *pos)
+cAudioManager::ReportCrime(eCrimeType type, const CVector &pos)
{
int32 lastCrime = ARRAY_SIZE(m_sPoliceRadioQueue.crimes);
if (m_bIsInitialised && MusicManager.m_nMusicMode != MUSICMODE_CUTSCENE && FindPlayerPed()->m_pWanted->m_nWantedLevel > 0 &&
(type > CRIME_NONE || type < NUM_CRIME_TYPES) && m_FrameCounter >= gMinTimeToNextReport[type]) {
for (int32 i = 0; i < ARRAY_SIZE(m_sPoliceRadioQueue.crimes); i++) {
- if (m_sPoliceRadioQueue.crimes[i].type) {
+ if (m_sPoliceRadioQueue.crimes[i].type != CRIME_NONE) {
if (m_sPoliceRadioQueue.crimes[i].type == type) {
- m_sPoliceRadioQueue.crimes[i].position = *pos;
+ m_sPoliceRadioQueue.crimes[i].position = pos;
m_sPoliceRadioQueue.crimes[i].timer = 0;
return;
}
- } else {
+ } else
lastCrime = i;
- }
}
if (lastCrime < ARRAY_SIZE(m_sPoliceRadioQueue.crimes)) {
m_sPoliceRadioQueue.crimes[lastCrime].type = type;
- m_sPoliceRadioQueue.crimes[lastCrime].position = *pos;
+ m_sPoliceRadioQueue.crimes[lastCrime].position = pos;
m_sPoliceRadioQueue.crimes[lastCrime].timer = 0;
gMinTimeToNextReport[type] = m_FrameCounter + 500;
}
@@ -684,7 +699,7 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
for (int i = 0; i < NUMAUDIOZONES; i++) {
if (strcmp(zone->name, ZoneSfx[i].m_aName) == 0) {
sample = ZoneSfx[i].m_nSampleIndex;
- m_sPoliceRadioQueue.Add(m_anRandomTable[4] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
+ m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_SUSPECT);
m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_LAST_SEEN);
m_sPoliceRadioQueue.Add(SFX_IN);
@@ -710,8 +725,8 @@ cAudioManager::PlaySuspectLastSeen(float x, float y, float z)
else if (!processed)
m_sPoliceRadioQueue.Add(SFX_CENTRAL);
m_sPoliceRadioQueue.Add(sample);
- m_sPoliceRadioQueue.Add(m_anRandomTable[2] % 3 + SFX_POLICE_RADIO_MESSAGE_NOISE_1);
- m_sPoliceRadioQueue.Add(TOTAL_AUDIO_SAMPLES);
+ m_sPoliceRadioQueue.Add(SFX_POLICE_RADIO_MESSAGE_NOISE_1);
+ m_sPoliceRadioQueue.Add(NO_SAMPLE);
gSpecialSuspectLastSeenReport = true;
break;
}
diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp
index 58b5dc02..06a38c29 100644
--- a/src/audio/oal/stream.cpp
+++ b/src/audio/oal/stream.cpp
@@ -202,7 +202,7 @@ public:
if (m_FileH) {
m_nChannels = op_head(m_FileH, 0)->channel_count;
- m_nRate = op_head(m_FileH, 0)->input_sample_rate;
+ m_nRate = 48000;
const OpusTags *tags = op_tags(m_FileH, 0);
for (int i = 0; i < tags->comments; i++) {
if (strncmp(tags->user_comments[i], "SAMPLERATE", sizeof("SAMPLERATE")-1) == 0)
diff --git a/src/audio/soundlist.h b/src/audio/soundlist.h
index bc5d3ba9..973a1585 100644
--- a/src/audio/soundlist.h
+++ b/src/audio/soundlist.h
@@ -142,7 +142,7 @@ enum eSound : uint16
SOUND_PED_TAXI_WAIT,
SOUND_PED_ATTACK,
SOUND_PED_DEFEND,
- SOUND_140,
+ SOUND_PED_HEALING,
SOUND_PED_LEAVE_VEHICLE,
SOUND_PED_EVADE,
SOUND_PED_FLEE_RUN,
@@ -212,123 +212,63 @@ enum eSound : uint16
enum eScriptSounds : uint16 {
- SCRIPT_SOUND_0 = 0,
- SCRIPT_SOUND_1,
- SCRIPT_SOUND_2,
- SCRIPT_SOUND_3,
- SCRIPT_SOUND_PARTY_1_LOOP_S,
- SCRIPT_SOUND_PARTY_1_LOOP_L,
- SCRIPT_SOUND_PARTY_2_LOOP_S,
- SCRIPT_SOUND_PARTY_2_LOOP_L,
- SCRIPT_SOUND_PARTY_3_LOOP_S,
- SCRIPT_SOUND_PARTY_3_LOOP_L,
- SCRIPT_SOUND_PARTY_4_LOOP_S,
- SCRIPT_SOUND_PARTY_4_LOOP_L,
- SCRIPT_SOUND_PARTY_5_LOOP_S,
- SCRIPT_SOUND_PARTY_5_LOOP_L,
- SCRIPT_SOUND_PARTY_6_LOOP_S,
- SCRIPT_SOUND_PARTY_6_LOOP_L,
- SCRIPT_SOUND_PARTY_7_LOOP_S,
- SCRIPT_SOUND_PARTY_7_LOOP_L,
- SCRIPT_SOUND_PARTY_8_LOOP_S,
- SCRIPT_SOUND_PARTY_8_LOOP_L,
- SCRIPT_SOUND_PARTY_9_LOOP_S,
- SCRIPT_SOUND_PARTY_9_LOOP_L,
- SCRIPT_SOUND_PARTY_10_LOOP_S,
- SCRIPT_SOUND_PARTY_10_LOOP_L,
- SCRIPT_SOUND_PARTY_11_LOOP_S,
- SCRIPT_SOUND_PARTY_11_LOOP_L,
- SCRIPT_SOUND_PARTY_12_LOOP_S,
- SCRIPT_SOUND_PARTY_12_LOOP_L,
- SCRIPT_SOUND_PARTY_13_LOOP_S,
- SCRIPT_SOUND_PARTY_13_LOOP_L,
- SCRIPT_SOUND_STRIP_CLUB_LOOP_1_S,
- SCRIPT_SOUND_STRIP_CLUB_LOOP_1_L,
- SCRIPT_SOUND_STRIP_CLUB_LOOP_2_S,
- SCRIPT_SOUND_STRIP_CLUB_LOOP_2_L,
- SCRIPT_SOUND_WORK_SHOP_LOOP_S,
- SCRIPT_SOUND_WORK_SHOP_LOOP_L,
- SCRIPT_SOUND_SAWMILL_LOOP_S,
- SCRIPT_SOUND_SAWMILL_LOOP_L,
- SCRIPT_SOUND_38,
- SCRIPT_SOUND_39,
-
- // MIAMI: only these are true so far
- SCRIPT_SOUND_MALIBU_1,
- SCRIPT_SOUND_MALIBU_2,
- SCRIPT_SOUND_MALIBU_3,
- SCRIPT_SOUND_STRIPCLUB_1,
- SCRIPT_SOUND_STRIPCLUB_2,
- SCRIPT_SOUND_STRIPCLUB_3,
-
- SCRIPT_SOUND_46_S,
- SCRIPT_SOUND_47_L,
- SCRIPT_SOUND_MARCO_BISTRO_S,
- SCRIPT_SOUND_MARCO_BISTRO_L,
- SCRIPT_SOUND_AIRPORT_LOOP_S,
- SCRIPT_SOUND_AIRPORT_LOOP_L,
- SCRIPT_SOUND_SHOP_LOOP_S,
- SCRIPT_SOUND_SHOP_LOOP_L,
- SCRIPT_SOUND_CINEMA_LOOP_S,
- SCRIPT_SOUND_CINEMA_LOOP_L,
- SCRIPT_SOUND_DOCKS_LOOP_S,
- SCRIPT_SOUND_DOCKS_LOOP_L,
- SCRIPT_SOUND_HOME_LOOP_S,
- SCRIPT_SOUND_HOME_LOOP_L,
- SCRIPT_SOUND_FRANKIE_PIANO,
- SCRIPT_SOUND_PARTY_1_LOOP,
- SCRIPT_SOUND_PORN_CINEMA_1_S,
- SCRIPT_SOUND_PORN_CINEMA_1_L,
- SCRIPT_SOUND_PORN_CINEMA_2_S,
- SCRIPT_SOUND_PORN_CINEMA_2_L,
- SCRIPT_SOUND_PORN_CINEMA_3_S,
- SCRIPT_SOUND_PORN_CINEMA_3_L,
- SCRIPT_SOUND_BANK_ALARM_LOOP_S,
- SCRIPT_SOUND_BANK_ALARM_LOOP_L,
- SCRIPT_SOUND_POLICE_BALL_LOOP_S,
- SCRIPT_SOUND_POLICE_BALL_LOOP_L,
- SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_S,
- SCRIPT_SOUND_RAVE_LOOP_INDUSTRIAL_L,
- SCRIPT_SOUND_74,
- SCRIPT_SOUND_75,
- SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_S,
- SCRIPT_SOUND_POLICE_CELL_BEATING_LOOP_L,
- SCRIPT_SOUND_INJURED_PED_MALE_OUCH_S,
- SCRIPT_SOUND_INJURED_PED_MALE_OUCH_L,
- SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_S,
- SCRIPT_SOUND_INJURED_PED_FEMALE_OUCH_L,
- SCRIPT_SOUND_EVIDENCE_PICKUP,
- SCRIPT_SOUND_UNLOAD_GOLD,
- SCRIPT_SOUND_RAVE_1_LOOP_S,
- SCRIPT_SOUND_RAVE_1_LOOP_L,
- SCRIPT_SOUND_RAVE_2_LOOP_S,
- SCRIPT_SOUND_RAVE_2_LOOP_L,
- SCRIPT_SOUND_RAVE_3_LOOP_S,
- SCRIPT_SOUND_RAVE_3_LOOP_L,
- SCRIPT_SOUND_MISTY_SEX_S,
- SCRIPT_SOUND_MISTY_SEX_L,
- SCRIPT_SOUND_GATE_START_CLUNK,
- SCRIPT_SOUND_GATE_STOP_CLUNK,
+ SCRIPT_SOUND_BANK_ALARM_LOOP = 0,
SCRIPT_SOUND_PART_MISSION_COMPLETE,
- SCRIPT_SOUND_CHUNKY_RUN_SHOUT,
- SCRIPT_SOUND_SECURITY_GUARD_AWAY_SHOUT,
+ SCRIPT_SOUND_POLICE_CELL_DOOR_SLIDING_LOOP,
+ SCRIPT_SOUND_POLICE_CELL_DOOR_CLUNK,
+ SCRIPT_SOUND_GARAGE_DOOR_SLIDING_LOOP,
+ SCRIPT_SOUND_GARAGE_DOOR_CLUNK,
+ SCRIPT_SOUND_SNORING_LOOP,
SCRIPT_SOUND_RACE_START_3,
SCRIPT_SOUND_RACE_START_2,
SCRIPT_SOUND_RACE_START_1,
SCRIPT_SOUND_RACE_START_GO,
- SCRIPT_SOUND_SWAT_PED_SHOUT,
- SCRIPT_SOUND_PRETEND_FIRE_LOOP,
- SCRIPT_SOUND_AMMUNATION_CHAT_1,
- SCRIPT_SOUND_AMMUNATION_CHAT_2,
- SCRIPT_SOUND_AMMUNATION_CHAT_3,
+ SCRIPT_SOUND_SHOOTING_RANGE_TARGET_MOVING_LOOP,
+ SCRIPT_SOUND_SHOOTING_RANGE_TARGET_HIT,
+ SCRIPT_SOUND_AMMUNATION_BUY_WEAPON,
+ SCRIPT_SOUND_AMMUNATION_BUY_WEAPON_DENIED,
+ SCRIPT_SOUND_WMYCW_TICKET_SPEECH,
+ SCRIPT_SOUND_IMRAN_ARM_BOMB,
+ SCRIPT_SOUND_ANDY_SNIPER_SHOT,
+ SCRIPT_SOUND_WILLIE_CARD_SWIPE,
+ SCRIPT_SOUND_MALE_AMBULANCE_OUCH,
+ SCRIPT_SOUND_FEMALE_AMBULANCE_OUCH,
+ SCRIPT_SOUND_BUILDING_BAR_1,
+ SCRIPT_SOUND_BUILDING_BAR_2,
+ SCRIPT_SOUND_BUILDING_BAR_3,
+ SCRIPT_SOUND_BUILDING_BAR_4,
+ SCRIPT_SOUND_BUILDING_BIKER_BAR,
+ SCRIPT_SOUND_BUILDING_CHURCH,
+ SCRIPT_SOUND_BUILDING_CLUB,
+ SCRIPT_SOUND_BUILDING_CUBA_1,
+ SCRIPT_SOUND_BUILDING_CUBA_2,
+ SCRIPT_SOUND_BUILDING_VOODOO,
+ SCRIPT_SOUND_BUILDING_MUSIC_SHOP,
+ SCRIPT_SOUND_BUILDING_STRIPCLUB_1,
+ SCRIPT_SOUND_BUILDING_STRIPCLUB_2,
+ SCRIPT_SOUND_BUILDING_SUPERSWEEP,
+ SCRIPT_SOUND_SEAPLANE_LOW_FUEL,
+ SCRIPT_SOUND_NEW_BUILDING_BAR_1,
+ SCRIPT_SOUND_NEW_BUILDING_BAR_2,
+ SCRIPT_SOUND_NEW_BUILDING_BAR_3,
+ SCRIPT_SOUND_NEW_BUILDING_BAR_4,
+ SCRIPT_SOUND_NEW_BUILDING_MALIBU_1,
+ SCRIPT_SOUND_NEW_BUILDING_MALIBU_2,
+ SCRIPT_SOUND_NEW_BUILDING_MALIBU_3,
+ SCRIPT_SOUND_NEW_BUILDING_STRIP_1,
+ SCRIPT_SOUND_NEW_BUILDING_STRIP_2,
+ SCRIPT_SOUND_NEW_BUILDING_STRIP_3,
+ SCRIPT_SOUND_NEW_BUILDING_CHURCH,
+ SCRIPT_SOUND_NEW_BUILDING_FAN_1,
+ SCRIPT_SOUND_NEW_BUILDING_FAN_2,
+ SCRIPT_SOUND_NEW_BUILDING_INSECT_1,
+ SCRIPT_SOUND_NEW_BUILDING_INSECT_2,
+ SCRIPT_SOUND_NEW_WATERFALL,
SCRIPT_SOUND_BULLET_HIT_GROUND_1,
SCRIPT_SOUND_BULLET_HIT_GROUND_2,
SCRIPT_SOUND_BULLET_HIT_GROUND_3,
SCRIPT_SOUND_BULLET_HIT_WATER, // no sound
- SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_1,
- SCRIPT_SOUND_TRAIN_ANNOUNCEMENT_2,
SCRIPT_SOUND_PAYPHONE_RINGING,
- SCRIPT_SOUND_113,
SCRIPT_SOUND_GLASS_BREAK_L,
SCRIPT_SOUND_GLASS_BREAK_S,
SCRIPT_SOUND_GLASS_CRACK,
@@ -337,6 +277,7 @@ enum eScriptSounds : uint16 {
SCRIPT_SOUND_BOX_DESTROYED_2,
SCRIPT_SOUND_METAL_COLLISION,
SCRIPT_SOUND_TIRE_COLLISION,
+ SCRIPT_SOUND_HIT_BALL,
SCRIPT_SOUND_GUNSHELL_DROP,
SCRIPT_SOUND_GUNSHELL_DROP_SOFT,
SCRIPT_SOUND_TOTAL,
diff --git a/src/control/Script.cpp b/src/control/Script.cpp
index 8b046bf2..86c9e86e 100644
--- a/src/control/Script.cpp
+++ b/src/control/Script.cpp
@@ -1817,7 +1817,7 @@ void CMissionCleanup::Process()
CStreaming::SetMissionDoesntRequireModel(MI_CUTOBJ01 + i);
CStreaming::ms_disableStreaming = false;
CHud::m_ItemToFlash = -1;
- CHud::SetHelpMessage(nil, false); // TODO(MIAMI): third parameter is false
+ CHud::SetHelpMessage(nil, false);
CUserDisplay::OnscnTimer.m_bDisabled = false;
CTheScripts::RemoveScriptTextureDictionary();
CWorld::Players[0].m_pPed->m_pWanted->m_bIgnoredByCops = false;
@@ -5387,22 +5387,7 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
case COMMAND_ADD_ONE_OFF_SOUND:
{
CollectParameters(&m_nIp, 4);
- // TODO(MIAMI)
- // SOUND_PART_MISSION_COMPLETE == 1
- // SOUND_RACE_START_3 == 7
- // SOUND_RACE_START_2 == 8
- // SOUND_RACE_START_1 == 9
- // SOUND_RACE_START_GO == 10
- // SOUND_AMMUNATION_BUY_WEAPON == 13
- // SOUND_AMMUNATION_BUY_WEAPON_DENIED == 14
- // SOUND_AMMUNATION_IMRAN_ARM_BOMB == 16
switch (ScriptParams[3]) {
- case SCRIPT_SOUND_EVIDENCE_PICKUP:
- DMAudio.PlayFrontEndSound(SOUND_EVIDENCE_PICKUP, 0);
- return 0;
- case SCRIPT_SOUND_UNLOAD_GOLD:
- DMAudio.PlayFrontEndSound(SOUND_UNLOAD_GOLD, 0);
- return 0;
case SCRIPT_SOUND_PART_MISSION_COMPLETE:
DMAudio.PlayFrontEndSound(SOUND_PART_MISSION_COMPLETE, 0);
return 0;
@@ -5418,6 +5403,15 @@ int8 CRunningScript::ProcessCommands300To399(int32 command)
case SCRIPT_SOUND_RACE_START_GO:
DMAudio.PlayFrontEndSound(SOUND_RACE_START_GO, 0);
return 0;
+ case SCRIPT_SOUND_AMMUNATION_BUY_WEAPON:
+ DMAudio.PlayFrontEndSound(SOUND_PICKUP_WEAPON_BOUGHT, 0);
+ return 0;
+ case SCRIPT_SOUND_AMMUNATION_BUY_WEAPON_DENIED:
+ DMAudio.PlayFrontEndSound(SOUND_GARAGE_NO_MONEY, 0);
+ return 0;
+ case SCRIPT_SOUND_IMRAN_ARM_BOMB:
+ DMAudio.PlayFrontEndSound(SOUND_AMMUNATION_IMRAN_ARM_BOMB, 0);
+ return 0;
default:
break;
}
@@ -8763,11 +8757,11 @@ int8 CRunningScript::ProcessCommands800To899(int32 command)
}
case COMMAND_INDUSTRIAL_PASSED:
CStats::IndustrialPassed = true;
- DMAudio.PlayRadioAnnouncement(13); //TODO: enum?
+ DMAudio.PlayRadioAnnouncement(STREAMED_SOUND_ANNOUNCE_COMMERCIAL_OPEN);
return 0;
case COMMAND_COMMERCIAL_PASSED:
CStats::CommercialPassed = true;
- DMAudio.PlayRadioAnnouncement(14); //TODO: enum?
+ DMAudio.PlayRadioAnnouncement(STREAMED_SOUND_ANNOUNCE_SUBURBAN_OPEN);
return 0;
case COMMAND_SUBURBAN_PASSED:
CStats::SuburbanPassed = true;
@@ -12909,7 +12903,7 @@ int8 CRunningScript::ProcessCommands1200To1299(int32 command)
case COMMAND_PRINT_HELP_FOREVER:
{
wchar* text = CTheScripts::GetTextByKeyFromScript(&m_nIp);
- CHud::SetHelpMessage(text, false); // TODO(MIAMI): third param is true
+ CHud::SetHelpMessage(text, false, true);
return 0;
}
//case COMMAND_PRINT_HELP_FOREVER_WITH_NUMBER:
diff --git a/src/core/Pad.h b/src/core/Pad.h
index 01f5bb9b..9f9f81b6 100644
--- a/src/core/Pad.h
+++ b/src/core/Pad.h
@@ -436,6 +436,7 @@ public:
bool GetLeftShockJustDown() { return !!(NewState.LeftShock && !OldState.LeftShock); }
bool GetRightShockJustDown() { return !!(NewState.RightShock && !OldState.RightShock); }
bool GetStartJustDown() { return !!(NewState.Start && !OldState.Start); }
+ bool GetSelectJustDown() { return !!(NewState.Select && !OldState.Select); }
bool GetLeftStickXJustDown() { return !!(NewState.LeftStickX && !OldState.LeftStickX); }
bool GetLeftStickYJustDown() { return !!(NewState.LeftStickY && !OldState.LeftStickY); }
@@ -461,6 +462,7 @@ public:
bool GetRightShoulder1(void) { return !!NewState.RightShoulder1; }
bool GetRightShoulder2(void) { return !!NewState.RightShoulder2; }
bool GetStart() { return !!NewState.Start; }
+ bool GetSelect() { return !!NewState.Select; }
int16 GetLeftStickX(void) { return NewState.LeftStickX; }
int16 GetLeftStickY(void) { return NewState.LeftStickY; }
int16 GetRightStickX(void) { return NewState.RightStickX; }
@@ -478,4 +480,4 @@ public:
};
VALIDATE_SIZE(CPad, 0xFC);
-extern CPad Pads[MAX_PADS]; \ No newline at end of file
+extern CPad Pads[MAX_PADS];
diff --git a/src/core/TempColModels.cpp b/src/core/TempColModels.cpp
index e12b48dd..203d24d0 100644
--- a/src/core/TempColModels.cpp
+++ b/src/core/TempColModels.cpp
@@ -22,7 +22,11 @@ CColModel CTempColModels::ms_colModelWeapon;
CColSphere s_aPedSpheres[3];
CColSphere s_aPed2Spheres[3];
CColSphere s_aPedGSpheres[4];
+#ifdef FIX_BUGS
+CColSphere s_aDoorSpheres[3];
+#else
CColSphere s_aDoorSpheres[4];
+#endif
CColSphere s_aBumperSpheres[4];
CColSphere s_aPanelSpheres[4];
CColSphere s_aBonnetSpheres[4];
@@ -130,7 +134,11 @@ CTempColModels::Initialise(void)
s_aDoorSpheres[1].center = CVector(0.0f, -0.95f, -0.35f);
s_aDoorSpheres[2].center = CVector(0.0f, -0.6f, 0.25f);
+#ifdef FIX_BUGS
for (i = 0; i < ARRAY_SIZE(s_aDoorSpheres); i++) {
+#else
+ for (i = 0; i < ARRAY_SIZE(s_aPed2Spheres); i++) {
+#endif
s_aDoorSpheres[i].surface = SURFACE_CAR_PANEL;
s_aDoorSpheres[i].piece = 0;
}
@@ -286,9 +294,13 @@ CTempColModels::Initialise(void)
SET_COLMODEL_SPHERES(ms_colModelBodyPart2, s_aBodyPartSpheres2);
-
- ms_colModelWeapon.boundingSphere.Set(0.25f, CVector(0.0f, 0.0f, 0.0f));
- ms_colModelWeapon.boundingBox.Set(CVector(-0.25f, -0.25, -0.25f), CVector(0.25f, 0.25, 0.25f));
+ ms_colModelWeapon.boundingSphere.radius = 0.25f;
+ ms_colModelWeapon.boundingBox.min.x = -0.25f;
+ ms_colModelWeapon.boundingBox.min.y = -0.25f;
+ ms_colModelWeapon.boundingBox.min.z = -0.25f;
+ ms_colModelWeapon.boundingBox.max.x = 0.25f;
+ ms_colModelWeapon.boundingBox.max.y = 0.25f;
+ ms_colModelWeapon.boundingBox.max.z = 0.25f;
#undef SET_COLMODEL_SPHERES
}
diff --git a/src/core/Timer.cpp b/src/core/Timer.cpp
index 5adc36b5..bdef6187 100644
--- a/src/core/Timer.cpp
+++ b/src/core/Timer.cpp
@@ -7,6 +7,8 @@
#include "Timer.h"
#include "SpecialFX.h"
+// --MIAMI: file done
+
uint32 CTimer::m_snTimeInMilliseconds;
PauseModeTime CTimer::m_snTimeInMillisecondsPauseMode = 1;
@@ -96,7 +98,7 @@ void CTimer::Update(void)
_oldPerfCounter = pc;
- float updInCyclesScaled = updInCycles * ms_fTimeScale;
+ float updInCyclesScaled = GetIsPaused() ? updInCycles : updInCycles * ms_fTimeScale;
// We need that real frame time to fix transparent menu bug.
#ifndef FIX_HIGH_FPS_BUGS_ON_FRONTEND
diff --git a/src/core/Zones.h b/src/core/Zones.h
index 3a74427d..5306d9f1 100644
--- a/src/core/Zones.h
+++ b/src/core/Zones.h
@@ -77,7 +77,7 @@ public:
static CZone *GetInfoZone(uint16 i) { return &InfoZoneArray[i]; }
static CZone *GetNavigationZone(uint16 i) { return &NavigationZoneArray[i]; }
static CZone *GetMapZone(uint16 i) { return &MapZoneArray[i]; }
- static CZone *GetAudioZone(uint16 i) { return &InfoZoneArray[AudioZoneArray[i]]; }
+ static CZone *GetAudioZone(uint16 i) { return &NavigationZoneArray[AudioZoneArray[i]]; }
static void PostZoneCreation(void);
static void CheckZonesForOverlap(void);
static void InsertZoneIntoZoneHierarchy(CZone *zone);
diff --git a/src/core/config.h b/src/core/config.h
index 770a7c2e..0ef921ca 100644
--- a/src/core/config.h
+++ b/src/core/config.h
@@ -23,7 +23,7 @@ enum Config {
MAXVEHICLESLOADED = 50, // 70 on mobile
- NUMOBJECTINFO = 400, // TODO(MIAMI): fantasy // object.dat
+ NUMOBJECTINFO = 210,
// Pool sizes
NUMPTRNODES = 50000,
diff --git a/src/core/main.cpp b/src/core/main.cpp
index fa5a5000..012dda2e 100644
--- a/src/core/main.cpp
+++ b/src/core/main.cpp
@@ -644,7 +644,7 @@ ProcessSlowMode(void)
do
{
- if ( CPad::GetPad(1)->GetLeftShoulder1JustDown() || CPad::GetPad(1)->GetRightShoulder1() )
+ if ( CPad::GetPad(1)->GetSelectJustDown() || CPad::GetPad(1)->GetStart() )
break;
if ( stop )
@@ -658,10 +658,7 @@ ProcessSlowMode(void)
RwCameraBeginUpdate(Scene.camera);
RwCameraEndUpdate(Scene.camera);
- if ( CPad::GetPad(1)->GetLeftShoulder1JustDown() || CPad::GetPad(1)->GetRightShoulder1() )
- break;
-
- } while (!CPad::GetPad(1)->GetRightShoulder1());
+ } while (!CPad::GetPad(1)->GetSelectJustDown() && !CPad::GetPad(1)->GetStart());
CPad::GetPad(0)->OldState.LeftStickX = lX;
@@ -714,22 +711,32 @@ int32 FrameSamples;
struct tZonePrint
{
- char name[12];
- CRect rect;
+ char name[11];
+ char area[5];
+ CRect rect;
};
tZonePrint ZonePrint[] =
{
- { "suburban", CRect(-1639.4f, 1014.3f, -226.23f, -1347.9f) },
- { "comntop", CRect(-223.52f, 203.62f, 616.79f, -413.6f) },
- { "comnbtm", CRect(-227.24f, -413.6f, 620.51f, -911.84f) },
- { "comse", CRect( 200.35f, -911.84f, 620.51f, -1737.3f) },
- { "comsw", CRect(-223.52f, -911.84f, 200.35f, -1737.3f) },
- { "industsw", CRect( 744.05f, -473.0f, 1067.5f, -1331.5f) },
- { "industne", CRect( 1067.5f, 282.19f, 1915.3f, -473.0f) },
- { "industnw", CRect( 744.05f, 324.95f, 1067.5f, -473.0f) },
- { "industse", CRect( 1070.3f, -473.0f, 1918.1f, -1331.5f) },
- { "no zone", CRect( 0.0f, 0.0f, 0.0f, 0.0f) }
+ { "DOWNTOWN", "GM", CRect(-1500.0f, 1500.0f, -300.0f, 980.0f)},
+ { "DOWNTOWS", "KB", CRect(-1200.0f, 980.0f, -300.0f, 435.0f)},
+ { "GOLF", "NT", CRect(-300.0f, 660.0f, 320.0f, -255.0f)},
+ { "LITTLEHA", "AG", CRect(-1250.0f, -310.0f, -746.0f, -926.0f)},
+ { "HAITI", "CJ", CRect(-1355.0f, 30.0f, -637.0f, -304.0f)},
+ { "HAITIN", "SM", CRect(-1355.0f, 435.0f, -637.0f, 30.0f)},
+ { "DOCKS", "AW", CRect(-1122.0f, -926.0f, -609.0f, -1575.0f)},
+ { "AIRPORT", "NT", CRect(-2000.0f, 200.0f, -871.0f, -2000.0f)},
+ { "STARISL", "CJ", CRect(-724.0f, -320.0f, -40.0f, -380.0f)},
+ { "CENT.ISLA", "NT", CRect(-163.0f, 1260.0f, 120.0f, 830.0f)},
+ { "MALL", "AW", CRect( 300.0f, 1266.0f, 483.0f, 995.0f)},
+ { "MANSION", "KB", CRect(-724.0f, -500.0f, -40.0f, -670.0f)},
+ { "NBEACH", "AS", CRect( 120.0f, 1340.0f, 900.0f, 600.0f)},
+ { "NBEACHBT", "AS", CRect( 200.0f, 680.0f, 660.0f, -50.0f)},
+ { "NBEACHW", "AS", CRect(-93.0f, 80.0f, 410.0f, -680.0f)},
+ { "OCEANDRV", "AC", CRect( 200.0f, -964.0f, 955.0f, -1797.0f)},
+ { "OCEANDN", "WS", CRect( 400.0f, 50.0f, 955.0f, -964.0f)},
+ { "WASHINGTN", "AC", CRect(-320.0f, -487.0f, 500.0f, -1200.0f)},
+ { "WASHINBTM", "AC", CRect(-255.0f, -1200.0f, 500.0f, -1690.0f)}
};
#ifndef MASTER
@@ -737,14 +744,12 @@ void
DisplayGameDebugText()
{
static bool bDisplayPosn = false;
- static bool bDisplayRate = false;
- static bool bDisplayCheatStr = false;
+ static bool bDisplayCheatStr = false; // custom
#ifndef FINAL
{
SETTWEAKPATH("GameDebugText");
TWEAKBOOL(bDisplayPosn);
- TWEAKBOOL(bDisplayRate);
TWEAKBOOL(bDisplayCheatStr);
}
#endif
@@ -777,23 +782,8 @@ DisplayGameDebugText()
FramesPerSecondCounter = 0.0f;
FrameSamples = 0;
}
-
- if ( !TheCamera.WorldViewerBeingUsed
- && CPad::GetPad(1)->GetSquare()
- && CPad::GetPad(1)->GetTriangle()
- && CPad::GetPad(1)->GetLeftShoulder2JustDown() )
- {
- bDisplayPosn = !bDisplayPosn;
- }
- if ( CPad::GetPad(1)->GetSquare()
- && CPad::GetPad(1)->GetTriangle()
- && CPad::GetPad(1)->GetRightShoulder2JustDown() )
- {
- bDisplayRate = !bDisplayRate;
- }
-
- if ( bDisplayPosn || bDisplayRate )
+ if ( bDisplayPosn )
{
CVector pos = FindPlayerCoors();
int32 ZoneId = ARRAY_SIZE(ZonePrint)-1; // no zone
@@ -810,43 +800,42 @@ DisplayGameDebugText()
}
//NOTE: fps should be 30, but its 29 due to different fp2int conversion
- if ( bDisplayRate )
- sprintf(str, "X:%5.1f, Y:%5.1f, Z:%5.1f, F-%d, %s", pos.x, pos.y, pos.z, (int32)FramesPerSecond, ZonePrint[ZoneId].name);
- else
- sprintf(str, "X:%5.1f, Y:%5.1f, Z:%5.1f, %s", pos.x, pos.y, pos.z, ZonePrint[ZoneId].name);
-
+ sprintf(str, "X:%4.0f Y:%4.0f Z:%4.0f F-%d %s-%s", pos.x, pos.y, pos.z, (int32)FramesPerSecond,
+ ZonePrint[ZoneId].name, ZonePrint[ZoneId].area);
+
AsciiToUnicode(str, ustr);
- // Let's not scale those numbers, they look better that way :eyes:
- CFont::SetPropOff();
+ CFont::SetPropOn();
CFont::SetBackgroundOff();
- CFont::SetScale(0.7f, 1.5f);
+ CFont::SetScale(SCREEN_SCALE_X(0.6f), SCREEN_SCALE_Y(0.8f));
CFont::SetCentreOff();
CFont::SetRightJustifyOff();
CFont::SetJustifyOff();
CFont::SetBackGroundOnlyTextOff();
- CFont::SetWrapx(640.0f);
- CFont::SetFontStyle(FONT_HEADING);
-
+ CFont::SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
+ CFont::SetFontStyle(FONT_STANDARD);
+ CFont::SetDropColor(CRGBA(0, 0, 0, 255));
+ CFont::SetDropShadowPosition(2);
CFont::SetColor(CRGBA(0, 0, 0, 255));
- CFont::PrintString(42.0f, 42.0f, ustr);
+ CFont::PrintString(41.0f, 41.0f, ustr);
- CFont::SetColor(CRGBA(255, 108, 0, 255));
+ CFont::SetColor(CRGBA(205, 205, 0, 255));
CFont::PrintString(40.0f, 40.0f, ustr);
}
+ // custom
if (bDisplayCheatStr)
{
sprintf(str, "%s", CPad::KeyBoardCheatString);
AsciiToUnicode(str, ustr);
- CFont::SetPropOff();
+ CFont::SetPropOn();
CFont::SetBackgroundOff();
- CFont::SetScale(0.7f, 1.5f);
+ CFont::SetScale(SCREEN_SCALE_X(0.6f), SCREEN_SCALE_Y(0.8f));
CFont::SetCentreOn();
CFont::SetBackGroundOnlyTextOff();
- CFont::SetWrapx(640.0f);
- CFont::SetFontStyle(FONT_HEADING);
+ CFont::SetWrapx(SCREEN_STRETCH_X(DEFAULT_SCREEN_WIDTH));
+ CFont::SetFontStyle(FONT_STANDARD);
CFont::SetColor(CRGBA(0, 0, 0, 255));
CFont::PrintString(SCREEN_SCALE_X(DEFAULT_SCREEN_WIDTH * 0.5f)+2.f, SCREEN_SCALE_FROM_BOTTOM(20.0f)+2.f, ustr);
@@ -968,7 +957,7 @@ Render2dStuff(void)
CSceneEdit::Draw();
else
CHud::Draw();
- // TODO(Miami)
+
CSpecialFX::Render2DFXs();
CUserDisplay::OnscnTimer.ProcessForDisplay();
CMessages::Display();
@@ -1007,6 +996,9 @@ Render2dStuffAfterFade(void)
DisplayGameDebugText();
#endif
+#ifdef MOBILE_IMPROVEMENTS
+ if (CDraw::FadeValue != 0)
+#endif
CHud::DrawAfterFade();
CFont::DrawFonts();
CCredits::Render();
@@ -1065,9 +1057,7 @@ Idle(void *arg)
if(arg == nil)
return;
- // m_bRenderGameInMenu is there in III PS2 but I don't know about VC PS2.
- if((!FrontEndMenuManager.m_bMenuActive/* || FrontEndMenuManager.m_bRenderGameInMenu*/) &&
- TheCamera.GetScreenFadeStatus() != FADE_2)
+ if(!FrontEndMenuManager.m_bMenuActive && TheCamera.GetScreenFadeStatus() != FADE_2)
{
#ifdef GTA_PC
// This is from SA, but it's nice for windowed mode
diff --git a/src/modelinfo/PedModelInfo.cpp b/src/modelinfo/PedModelInfo.cpp
index e4758a96..bd515391 100644
--- a/src/modelinfo/PedModelInfo.cpp
+++ b/src/modelinfo/PedModelInfo.cpp
@@ -78,7 +78,6 @@ ColNodeInfo m_pColNodeInfos[NUMPEDINFONODES] = {
void
CPedModelInfo::CreateHitColModelSkinned(RpClump *clump)
{
- CVector center;
RpHAnimHierarchy *hier = GetAnimHierarchyFromSkinClump(clump);
CColModel *colmodel = new CColModel;
CColSphere *spheres = (CColSphere*)RwMalloc(NUMPEDINFONODES*sizeof(CColSphere));
@@ -97,23 +96,17 @@ CPedModelInfo::CreateHitColModelSkinned(RpClump *clump)
RwV3d pos = { 0.0f, 0.0f, 0.0f };
RwV3dTransformPoints(&pos, &pos, 1, mat);
- center.x = pos.x + m_pColNodeInfos[i].x;
- center.y = pos.y + 0.0f;
- center.z = pos.z + m_pColNodeInfos[i].z;
- spheres[i].Set(m_pColNodeInfos[i].radius, center, SURFACE_PED, m_pColNodeInfos[i].pieceType);
+ spheres[i].center = pos + CVector(m_pColNodeInfos[i].x, 0.0f, m_pColNodeInfos[i].z);
+ spheres[i].radius = m_pColNodeInfos[i].radius;
+ spheres[i].surface = SURFACE_PED;
+ spheres[i].piece = m_pColNodeInfos[i].pieceType;
}
RwMatrixDestroy(invmat);
RwMatrixDestroy(mat);
colmodel->spheres = spheres;
colmodel->numSpheres = NUMPEDINFONODES;
- center.x = center.y = center.z = 0.0f;
- colmodel->boundingSphere.Set(2.0f, center);
- CVector min, max;
- min.x = min.y = -0.5f;
- min.z = -1.2f;
- max.x = max.y = 0.5f;
- max.z = 1.2f;
- colmodel->boundingBox.Set(min, max);
+ colmodel->boundingSphere.Set(2.0f, CVector(0.0f, 0.0f, 0.0f));
+ colmodel->boundingBox.Set(CVector(-0.5f, -0.5f, -1.2f), CVector(0.5f, 0.5f, 1.2f));
colmodel->level = LEVEL_GENERIC;
m_hitColModel = colmodel;
}
@@ -141,9 +134,7 @@ CPedModelInfo::AnimatePedColModelSkinned(RpClump *clump)
RwV3d pos = { 0.0f, 0.0f, 0.0f };
RwV3dTransformPoints(&pos, &pos, 1, mat);
- spheres[i].center.x = pos.x + m_pColNodeInfos[i].x;
- spheres[i].center.y = pos.y + 0.0f;
- spheres[i].center.z = pos.z + m_pColNodeInfos[i].z;
+ spheres[i].center = pos + CVector(m_pColNodeInfos[i].x, 0.0f, m_pColNodeInfos[i].z);
}
RwMatrixDestroy(invmat);
RwMatrixDestroy(mat);
@@ -167,9 +158,7 @@ CPedModelInfo::AnimatePedColModelSkinnedWorld(RpClump *clump)
RwV3d pos = { 0.0f, 0.0f, 0.0f };
RwV3dTransformPoints(&pos, &pos, 1, mat);
- spheres[i].center.x = pos.x + m_pColNodeInfos[i].x;
- spheres[i].center.y = pos.y + 0.0f;
- spheres[i].center.z = pos.z + m_pColNodeInfos[i].z;
+ spheres[i].center = pos + CVector(m_pColNodeInfos[i].x, 0.0f, m_pColNodeInfos[i].z);
}
return m_hitColModel;
}
diff --git a/src/objects/ObjectData.cpp b/src/objects/ObjectData.cpp
index 589cc3f7..04ac0b9c 100644
--- a/src/objects/ObjectData.cpp
+++ b/src/objects/ObjectData.cpp
@@ -6,6 +6,8 @@
#include "FileMgr.h"
#include "ObjectData.h"
+//--MIAMI: file done
+
CObjectInfo CObjectData::ms_aObjectInfo[NUMOBJECTINFO];
// Another ugly file reader
@@ -18,11 +20,55 @@ CObjectData::Initialise(const char *filename)
float percentSubmerged;
int damageEffect, responseCase, camAvoid;
CBaseModelInfo *mi;
+
+ ms_aObjectInfo[0].m_fMass = 99999.0f;
+ ms_aObjectInfo[0].m_fTurnMass = 99999.0f;
+ ms_aObjectInfo[0].m_fAirResistance = 0.99f;
+ ms_aObjectInfo[0].m_fElasticity = 0.1f;
+ ms_aObjectInfo[0].m_fBuoyancy = GRAVITY * ms_aObjectInfo[0].m_fMass * 2.0f;
+ ms_aObjectInfo[0].m_fUprootLimit = 0.0f;
+ ms_aObjectInfo[0].m_fCollisionDamageMultiplier = 1.0f;
+ ms_aObjectInfo[0].m_nCollisionDamageEffect = 0;
+ ms_aObjectInfo[0].m_nSpecialCollisionResponseCases = 0;
+ ms_aObjectInfo[0].m_bCameraToAvoidThisObject = false;
+
+ ms_aObjectInfo[1].m_fMass = 99999.0f;
+ ms_aObjectInfo[1].m_fTurnMass = 99999.0f;
+ ms_aObjectInfo[1].m_fAirResistance = 0.99f;
+ ms_aObjectInfo[1].m_fElasticity = 0.1f;
+ ms_aObjectInfo[1].m_fBuoyancy = ms_aObjectInfo[0].m_fBuoyancy;
+ ms_aObjectInfo[1].m_fUprootLimit = 0.0f;
+ ms_aObjectInfo[1].m_fCollisionDamageMultiplier = 1.0f;
+ ms_aObjectInfo[1].m_nCollisionDamageEffect = 0;
+ ms_aObjectInfo[1].m_nSpecialCollisionResponseCases = 0;
+ ms_aObjectInfo[1].m_bCameraToAvoidThisObject = true;
+
+ ms_aObjectInfo[2].m_fMass = 99999.0f;
+ ms_aObjectInfo[2].m_fTurnMass = 99999.0f;
+ ms_aObjectInfo[2].m_fAirResistance = 0.99f;
+ ms_aObjectInfo[2].m_fElasticity = 0.1f;
+ ms_aObjectInfo[2].m_fBuoyancy = ms_aObjectInfo[0].m_fBuoyancy;
+ ms_aObjectInfo[2].m_fUprootLimit = 0.0f;
+ ms_aObjectInfo[2].m_fCollisionDamageMultiplier = 1.0f;
+ ms_aObjectInfo[2].m_nCollisionDamageEffect = 0;
+ ms_aObjectInfo[2].m_bCameraToAvoidThisObject = false;
+ ms_aObjectInfo[2].m_nSpecialCollisionResponseCases = 4;
+
+ ms_aObjectInfo[3].m_fMass = 99999.0f;
+ ms_aObjectInfo[3].m_fTurnMass = 99999.0f;
+ ms_aObjectInfo[3].m_fAirResistance = 0.99f;
+ ms_aObjectInfo[3].m_fElasticity = 0.1f;
+ ms_aObjectInfo[3].m_fBuoyancy = ms_aObjectInfo[0].m_fBuoyancy;
+ ms_aObjectInfo[3].m_fUprootLimit = 0.0f;
+ ms_aObjectInfo[3].m_fCollisionDamageMultiplier = 1.0f;
+ ms_aObjectInfo[3].m_nCollisionDamageEffect = 0;
+ ms_aObjectInfo[3].m_nSpecialCollisionResponseCases = 4;
+ ms_aObjectInfo[3].m_bCameraToAvoidThisObject = true;
CFileMgr::SetDir("");
CFileMgr::LoadFile(filename, work_buff, sizeof(work_buff), "r");
- id = 0;
+ id = 4;
p = (char*)work_buff;
while(*p != '*'){
// skip over white space and comments
@@ -44,7 +90,11 @@ CObjectData::Initialise(const char *filename)
}
if(*p == '\n')
p++;
+#ifdef FIX_BUGS
*lp = '\0'; // FIX: game wrote '\n' here
+#else
+ *lp = '\n';
+#endif
assert(id < NUMOBJECTINFO);
sscanf(line, "%s %f %f %f %f %f %f %f %d %d %d", name,
@@ -63,9 +113,23 @@ CObjectData::Initialise(const char *filename)
ms_aObjectInfo[id].m_bCameraToAvoidThisObject = camAvoid;
mi = CModelInfo::GetModelInfo(name, nil);
- if(mi)
- mi->SetObjectID(id++);
- else
+ if (mi) {
+ if (ms_aObjectInfo[0].m_fMass != ms_aObjectInfo[id].m_fMass
+ || ms_aObjectInfo[0].m_fCollisionDamageMultiplier != ms_aObjectInfo[id].m_fCollisionDamageMultiplier
+ || ms_aObjectInfo[0].m_nCollisionDamageEffect != ms_aObjectInfo[id].m_nCollisionDamageEffect
+ || ((ms_aObjectInfo[0].m_nSpecialCollisionResponseCases != ms_aObjectInfo[id].m_nSpecialCollisionResponseCases)
+ && (ms_aObjectInfo[2].m_nSpecialCollisionResponseCases != ms_aObjectInfo[id].m_nSpecialCollisionResponseCases))) {
+ mi->SetObjectID(id++);
+ } else if (ms_aObjectInfo[0].m_nSpecialCollisionResponseCases == ms_aObjectInfo[id].m_nSpecialCollisionResponseCases) {
+ if (ms_aObjectInfo[0].m_bCameraToAvoidThisObject == ms_aObjectInfo[id].m_bCameraToAvoidThisObject)
+ mi->SetObjectID(0);
+ else
+ mi->SetObjectID(1);
+ } else if (ms_aObjectInfo[2].m_bCameraToAvoidThisObject == ms_aObjectInfo[id].m_bCameraToAvoidThisObject)
+ mi->SetObjectID(2);
+ else
+ mi->SetObjectID(3);
+ } else
debug("CObjectData: Cannot find object %s\n", name);
}
}
@@ -92,6 +156,7 @@ CObjectData::SetObjectData(int32 modelId, CObject &object)
object.m_bCameraToAvoidThisObject = objinfo->m_bCameraToAvoidThisObject;
if(object.m_fMass >= 99998.0f){
object.bInfiniteMass = true;
+ object.m_phy_flagA08 = true;
object.bAffectedByGravity = false;
object.bExplosionProof = true;
}
diff --git a/src/peds/EmergencyPed.cpp b/src/peds/EmergencyPed.cpp
index 5b91daad..24d9a6a1 100644
--- a/src/peds/EmergencyPed.cpp
+++ b/src/peds/EmergencyPed.cpp
@@ -9,6 +9,8 @@
#include "CarCtrl.h"
#include "Accident.h"
+// --MIAMI: file done
+
CEmergencyPed::CEmergencyPed(uint32 type) : CPed(type)
{
switch (type){
@@ -97,7 +99,7 @@ CEmergencyPed::FiremanAI(void)
case EMERGENCY_PED_READY:
nearestFire = gFireManager.FindNearestFire(GetPosition(), &fireDist);
if (nearestFire) {
- m_nPedState = PED_NONE;
+ SetPedState(PED_NONE);
SetSeek(nearestFire->m_vecPos, 1.0f);
SetMoveState(PEDMOVE_RUN);
m_nEmergencyPedState = EMERGENCY_PED_DETERMINE_NEXT_STATE;
@@ -110,7 +112,7 @@ CEmergencyPed::FiremanAI(void)
case EMERGENCY_PED_DETERMINE_NEXT_STATE:
nearestFire = gFireManager.FindNearestFire(GetPosition(), &fireDist);
if (nearestFire && nearestFire != m_pAttendedFire) {
- m_nPedState = PED_NONE;
+ SetPedState(PED_NONE);
SetSeek(nearestFire->m_vecPos, 1.0f);
SetMoveState(PEDMOVE_RUN);
#ifdef FIX_BUGS
@@ -149,7 +151,7 @@ CEmergencyPed::FiremanAI(void)
#ifdef FIX_BUGS
bIsRunning = false;
#endif
- m_nPedState = PED_NONE;
+ SetPedState(PED_NONE);
SetWanderPath(CGeneral::GetRandomNumber() & 7);
m_pAttendedFire = nil;
m_nEmergencyPedState = EMERGENCY_PED_READY;
@@ -164,15 +166,20 @@ CEmergencyPed::MedicAI(void)
{
float distToEmergency;
if (!bInVehicle && IsPedInControl()) {
- ScanForThreats();
- if (m_threatEntity && m_threatEntity->IsPed() && ((CPed*)m_threatEntity)->IsPlayer()) {
- if (((CPed*)m_threatEntity)->GetWeapon()->IsTypeMelee()) {
- SetObjective(OBJECTIVE_KILL_CHAR_ON_FOOT, m_threatEntity);
- } else {
- SetFlee(m_threatEntity, 6000);
- Say(SOUND_PED_FLEE_SPRINT);
+ ScanForDelayedResponseThreats();
+ if (m_threatFlags && CTimer::GetTimeInMilliseconds() > m_threatCheckTimer) {
+ CheckThreatValidity();
+ m_threatFlags = 0;
+ m_threatCheckTimer = 0;
+ if (m_threatEntity && m_threatEntity->IsPed() && ((CPed*)m_threatEntity)->IsPlayer()) {
+ if (((CPed*)m_threatEntity)->GetWeapon()->IsTypeMelee()) {
+ SetObjective(OBJECTIVE_KILL_CHAR_ON_FOOT, m_threatEntity);
+ } else {
+ SetFlee(m_threatEntity, 6000);
+ Say(SOUND_PED_FLEE_SPRINT);
+ }
+ return;
}
- return;
}
}
@@ -225,8 +232,7 @@ CEmergencyPed::MedicAI(void)
m_pRevivedPed->RegisterReference((CEntity**)&m_pRevivedPed);
m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&midPos, PED_MID);
m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&headPos, PED_HEAD);
- SetSeek((headPos + midPos) * 0.5f, 1.0f);
- SetObjective(OBJECTIVE_NONE);
+ SetObjective(OBJECTIVE_GOTO_AREA_ON_FOOT, CVector((headPos + midPos) * 0.5f));
bIsRunning = true;
m_nEmergencyPedState = EMERGENCY_PED_DETERMINE_NEXT_STATE;
m_pAttendedAccident = nearestAccident;
@@ -239,6 +245,7 @@ CEmergencyPed::MedicAI(void)
CPed* driver = m_pMyVehicle->pDriver;
if (driver && driver->m_nPedType != PEDTYPE_EMERGENCY && m_objective != OBJECTIVE_KILL_CHAR_ON_FOOT) {
SetObjective(OBJECTIVE_KILL_CHAR_ON_FOOT, driver);
+
} else if (m_objective != OBJECTIVE_ENTER_CAR_AS_DRIVER
&& m_objective != OBJECTIVE_ENTER_CAR_AS_PASSENGER
&& m_objective != OBJECTIVE_KILL_CHAR_ON_FOOT) {
@@ -265,8 +272,7 @@ CEmergencyPed::MedicAI(void)
}
m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&midPos, PED_MID);
m_pRevivedPed->m_pedIK.GetComponentPosition(*(RwV3d *)&headPos, PED_HEAD);
- SetSeek((headPos + midPos) * 0.5f, nearestAccident->m_nMedicsPerformingCPR * 0.5f + 1.0f);
- SetObjective(OBJECTIVE_NONE);
+ SetObjective(OBJECTIVE_GOTO_AREA_ON_FOOT, CVector((headPos + midPos) * 0.5f));
bIsRunning = true;
--m_pAttendedAccident->m_nMedicsAttending;
++nearestAccident->m_nMedicsAttending;
@@ -296,11 +302,11 @@ CEmergencyPed::MedicAI(void)
} else {
m_pRevivedPed->m_bloodyFootprintCountOrDeathTime = CTimer::GetTimeInMilliseconds();
SetMoveState(PEDMOVE_STILL);
- m_nPedState = PED_CPR;
+ SetPedState(PED_CPR);
m_nLastPedState = PED_CPR;
SetLookFlag(m_pRevivedPed, 0);
SetLookTimer(500);
- //Say(SOUND_PED_HEALING);
+ Say(SOUND_PED_HEALING);
if (m_pAttendedAccident->m_nMedicsPerformingCPR) {
SetIdle();
m_nEmergencyPedState = EMERGENCY_PED_STAND_STILL;
@@ -355,12 +361,12 @@ CEmergencyPed::MedicAI(void)
break;
}
m_nEmergencyPedState = EMERGENCY_PED_STOP_CPR;
- m_nPedState = PED_NONE;
+ SetPedState(PED_NONE);
SetMoveState(PEDMOVE_WALK);
m_pVehicleAnim = nil;
if (!m_pRevivedPed->bBodyPartJustCameOff) {
m_pRevivedPed->m_fHealth = 100.0f;
- m_pRevivedPed->m_nPedState = PED_NONE;
+ m_pRevivedPed->SetPedState(PED_NONE);
m_pRevivedPed->m_nLastPedState = PED_WANDER_PATH;
m_pRevivedPed->SetGetUp();
m_pRevivedPed->bUsesCollision = true;
@@ -369,6 +375,8 @@ CEmergencyPed::MedicAI(void)
m_pRevivedPed->bIsPedDieAnimPlaying = false;
m_pRevivedPed->bKnockedUpIntoAir = false;
m_pRevivedPed->m_pCollidingEntity = nil;
+ m_pRevivedPed->bKnockedOffBike = false;
+ m_pRevivedPed->Say(SOUND_PED_ACCIDENTREACTION1);
}
break;
case EMERGENCY_PED_STOP_CPR:
@@ -389,7 +397,7 @@ CEmergencyPed::MedicAI(void)
break;
case EMERGENCY_PED_STOP:
m_bStartedToCPR = false;
- m_nPedState = PED_NONE;
+ SetPedState(PED_NONE);
if (m_pAttendedAccident) {
m_pAttendedAccident->m_pVictim = nil;
--m_pAttendedAccident->m_nMedicsAttending;
diff --git a/src/peds/PedDebug.cpp b/src/peds/PedDebug.cpp
index 0809581b..aed11357 100644
--- a/src/peds/PedDebug.cpp
+++ b/src/peds/PedDebug.cpp
@@ -7,11 +7,10 @@
#include "Sprite.h"
#include "Text.h"
-// TODO(Miami)
static char ObjectiveText[][28] = {
"No Obj",
"Wait on Foot",
- "Wait on Foot For Cop",
+ "Wait on Foot for cop",
"Flee on Foot Till Safe",
"Guard Spot",
"Guard Area",
@@ -22,8 +21,8 @@ static char ObjectiveText[][28] = {
"Flee Char on Foot Till Safe",
"Flee Char on Foot Always",
"GoTo Char on Foot",
- "GoTo Char on Foot Walking",
- "Hassle Char",
+ "GoTo Char on Foot walking",
+ "Hassle char",
"Follow Char in Formation",
"Leave Car",
"Enter Car as Passenger",
@@ -40,14 +39,30 @@ static char ObjectiveText[][28] = {
"Guard Attack",
"Set Leader",
"Follow Route",
- "Solicit",
+ "Solicit vehicle",
"Take Taxi",
"Catch Train",
"Buy IceCream",
"Steal Any Car",
- "Steal Any Mission Car",
+ "Steal any mission car",
"Mug Char",
- "Leave Car and Die",
+ "Lv car die",
+ "Goto seat",
+ "Goto atm",
+ "Flee car",
+ "Sunbathe",
+ "Goto bus stop",
+ "Goto pizza",
+ "Goto shelter",
+ "Aim gun at",
+ "Wander",
+ "Wait on foot at shltr",
+ "Sprint to area",
+ "Kill char on boat",
+ "Solicit ped",
+ "Wait at bus stop",
+ "Goto ice cream van foot",
+ "Wait foot icecream van"
};
static char StateText[][18] = {
@@ -84,11 +99,11 @@ static char StateText[][18] = {
"Investigate",
"Step away",
"On Fire",
- "Sun Bathe",
+ "Bathe",
"Flash",
"Jog",
- "Answer Mobile",
- "Unknown",
+ "Answer mobile",
+ "Hang out",
"STATES_NO_AI",
"Abseil",
"Sit",
@@ -114,7 +129,7 @@ static char StateText[][18] = {
"Exit Car",
"Hands Up",
"Arrested",
- "Deploying Stinger"
+ "Deply stgr"
};
static char PersonalityTypeText[][18] = {
@@ -141,8 +156,7 @@ static char PersonalityTypeText[][18] = {
"Geek Girl",
"Old Girl",
"Tough Girl",
- "Tramp Male",
- "Tramp Female",
+ "Tramp",
"Tourist",
"Prostitute",
"Criminal",
@@ -151,8 +165,6 @@ static char PersonalityTypeText[][18] = {
"Psycho",
"Steward",
"Sports Fan",
- "Shopper",
- "Old Shopper"
};
static char WaitStateText[][16] = {
@@ -177,6 +189,21 @@ static char WaitStateText[][16] = {
"Play HandsCower",
"Play Chat",
"Finish Flee",
+ "Sit down",
+ "Sit down rvrs",
+ "Sit up",
+ "Sit idle",
+ "Use atm",
+ "Sunbth pre",
+ "Sunbth down",
+ "Sunbth idle",
+ "Riot",
+ "Fast fall",
+ "Bomber",
+ "Stripper",
+ "Ground attack",
+ "Lance sitting",
+ "Handsup simple"
};
void
diff --git a/src/skel/crossplatform.cpp b/src/skel/crossplatform.cpp
index ac4bbe85..4b7d3d9a 100644
--- a/src/skel/crossplatform.cpp
+++ b/src/skel/crossplatform.cpp
@@ -26,34 +26,35 @@ void GetLocalTime_CP(SYSTEMTIME *out) {
// Compatible with Linux/POSIX and MinGW on Windows
#ifndef _WIN32
HANDLE FindFirstFile(const char* pathname, WIN32_FIND_DATA* firstfile) {
- char newpathname[32];
-
- strncpy(newpathname, pathname, 32);
- char* path = strtok(newpathname, "*");
+ char pathCopy[MAX_PATH];
+ strcpy(pathCopy, pathname);
+
+ char *folder = strtok(pathCopy, "*");
+ char *extension = strtok(NULL, "*");
+
+ // because strtok doesn't return NULL for last delimiter
+ if (extension - folder == strlen(pathname))
+ extension = nil;
// Case-sensitivity and backslashes...
- char *real = casepath(path);
- if (real) {
- real[strlen(real)] = '*';
- char *extension = strtok(NULL, "*");
- if (extension)
- strcat(real, extension);
-
- strncpy(newpathname, real, 32);
- free(real);
- path = strtok(newpathname, "*");
+ // Will be freed at the bottom
+ char *realFolder = casepath(folder);
+ if (realFolder) {
+ folder = realFolder;
}
-
- strncpy(firstfile->folder, path, sizeof(firstfile->folder));
- // Both w/ extension and w/o extension is ok
- if (strlen(path) + 1 != strlen(pathname))
- strncpy(firstfile->extension, strtok(NULL, "*"), sizeof(firstfile->extension));
+ strncpy(firstfile->folder, folder, sizeof(firstfile->folder));
+
+ if (extension)
+ strncpy(firstfile->extension, extension, sizeof(firstfile->extension));
else
- strncpy(firstfile->extension, "", sizeof(firstfile->extension));
+ firstfile->extension[0] = '\0';
+
+ if (realFolder)
+ free(realFolder);
HANDLE d;
- if ((d = (HANDLE)opendir(path)) == NULL || !FindNextFile(d, firstfile))
+ if ((d = (HANDLE)opendir(firstfile->folder)) == NULL || !FindNextFile(d, firstfile))
return NULL;
return d;
diff --git a/src/text/Messages.cpp b/src/text/Messages.cpp
index 70225860..a2409289 100644
--- a/src/text/Messages.cpp
+++ b/src/text/Messages.cpp
@@ -71,10 +71,7 @@ CMessages::WideStringCompare(wchar *str1, wchar *str2, uint16 size)
if (len1 != len2 && (len1 < size || len2 < size))
return false;
- for (int32 i = 0; i < size; i++) {
- if (FixupChar(str1[i]) == '\0' || i > size)
- break;
-
+ for (int32 i = 0; FixupChar(str1[i]) != '\0' && i < size; i++) {
if (FixupChar(str1[i]) != FixupChar(str2[i]))
return false;
}
@@ -393,12 +390,11 @@ CMessages::InsertNumberInString(wchar *str, int32 n1, int32 n2, int32 n3, int32
if (str[c] == '~' && str[c + 1] == '1' && str[c + 2] == '~') {
#endif
c += 3;
- for (int j=0; j<outLen; j++)
+ for (int j = 0; j < outLen; )
*(outstr++) = wNumStr[j++];
i++;
switch (i) {
- case 0: sprintf(numStr, "%d", n1); break;
case 1: sprintf(numStr, "%d", n2); break;
case 2: sprintf(numStr, "%d", n3); break;
case 3: sprintf(numStr, "%d", n4); break;
@@ -808,7 +804,7 @@ CMessages::ClearThisBigPrint(wchar *str)
}
BIGMessages[style].m_Stack[i].m_pText = nil;
} else {
- BIGMessages[style].m_Stack[0].m_pText = 0;
+ BIGMessages[style].m_Stack[0].m_pText = nil;
i = 0;
while (i < 3) {
if (BIGMessages[style].m_Stack[i + 1].m_pText == nil)
diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp
index 546f72c2..fb8361c5 100644
--- a/src/vehicles/Train.cpp
+++ b/src/vehicles/Train.cpp
@@ -663,6 +663,7 @@ PlayAnnouncement(uint8 sound, uint8 station)
void
ProcessTrainAnnouncements(void)
{
+#ifdef GTA_TRAIN
for (int i = 0; i < ARRAY_SIZE(StationDist); i++) {
for (int j = 0; j < ARRAY_SIZE(EngineTrackPosition); j++) {
if (!bTrainArrivalAnnounced[i]) {
@@ -691,6 +692,7 @@ ProcessTrainAnnouncements(void)
}
}
}
+#endif
}
void