summaryrefslogtreecommitdiff
path: root/src/audio/AudioManager.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-06 19:44:00 +0200
committeraap <aap@papnet.eu>2019-07-06 19:44:00 +0200
commit00461224a94692f5cdafc1b4309923a5539f1113 (patch)
treef3642f0f2cb985c61bb76e5bdb0988e1be1285c5 /src/audio/AudioManager.cpp
parent2b592605ab043be56b5bbbf1ac06f223400dd2ef (diff)
some work on vehicles
Diffstat (limited to 'src/audio/AudioManager.cpp')
-rw-r--r--src/audio/AudioManager.cpp87
1 files changed, 80 insertions, 7 deletions
diff --git a/src/audio/AudioManager.cpp b/src/audio/AudioManager.cpp
index 812c9d62..76ef8244 100644
--- a/src/audio/AudioManager.cpp
+++ b/src/audio/AudioManager.cpp
@@ -1,3 +1,6 @@
+#include "common.h"
+#include "patcher.h"
+
#include "AudioManager.h"
#include "DMAudio.h"
@@ -10,10 +13,80 @@
#include "Vehicle.h"
#include "World.h"
-#include "common.h"
-#include "patcher.h"
-
-#include <cmath>
+// TODO: where is this used? Is this the right file?
+enum eVehicleModel
+{
+ LANDSTAL,
+ IDAHO,
+ STINGER,
+ LINERUN,
+ PEREN,
+ SENTINEL,
+ PATRIOT,
+ FIRETRUK,
+ TRASH,
+ STRETCH,
+ MANANA,
+ INFERNUS,
+ BLISTA,
+ PONY,
+ MULE,
+ CHEETAH,
+ AMBULAN,
+ FBICAR,
+ MOONBEAM,
+ ESPERANT,
+ TAXI,
+ KURUMA,
+ BOBCAT,
+ MRWHOOP,
+ BFINJECT,
+ CORPSE,
+ POLICE,
+ ENFORCER,
+ SECURICA,
+ BANSHEE,
+ PREDATOR,
+ BUS,
+ RHINO,
+ BARRACKS,
+ TRAIN,
+ CHOPPER,
+ DODO,
+ COACH,
+ CABBIE,
+ STALLION,
+ RUMPO,
+ RCBANDIT,
+ BELLYUP,
+ MRWONGS,
+ MAFIA,
+ YARDIE,
+ YAKUZA,
+ DIABLOS,
+ COLUMB,
+ HOODS,
+ AIRTRAIN,
+ DEADDODO,
+ SPEEDER,
+ REEFER,
+ PANLANT,
+ FLATBED,
+ YANKEE,
+ ESCAPE,
+ BORGNINE,
+ TOYZ,
+ GHOST,
+ CAR151,
+ CAR152,
+ CAR153,
+ CAR154,
+ CAR155,
+ CAR156,
+ CAR157,
+ CAR158,
+ CAR159,
+};
cAudioManager &AudioManager = *(cAudioManager *)0x880FC0;
@@ -132,7 +205,7 @@ void
cAudioManager::CalculateDistance(bool *ptr, float dist)
{
if(*ptr == false) {
- m_sQueueSample.m_fDistance = std::sqrt(dist);
+ m_sQueueSample.m_fDistance = sqrt(dist);
*ptr = true;
}
}
@@ -267,14 +340,14 @@ cAudioManager::ClearRequestedQueue()
bool
cAudioManager::UsesReverseWarning(int32 model)
{
- return model == LINERUN || std::abs(model - FIRETRUK) <= 1 || model == BUS ||
+ return model == LINERUN || fabs(model - FIRETRUK) <= 1 || model == BUS ||
model == COACH; // fix
}
bool
cAudioManager::HasAirBrakes(int32 model)
{
- return model == LINERUN || std::abs(model - FIRETRUK) <= 1 || model == BUS ||
+ return model == LINERUN || fabs(model - FIRETRUK) <= 1 || model == BUS ||
model == COACH; // fix
}