summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/modelinfo/VehicleModelInfo.cpp4
-rw-r--r--src/vehicles/Automobile.cpp4
-rw-r--r--src/vehicles/Bike.cpp6
-rw-r--r--src/vehicles/Boat.cpp6
-rw-r--r--src/vehicles/HandlingMgr.cpp8
-rw-r--r--src/vehicles/HandlingMgr.h16
-rw-r--r--src/vehicles/Heli.cpp2
-rw-r--r--src/vehicles/Plane.cpp2
-rw-r--r--src/vehicles/Train.cpp2
9 files changed, 25 insertions, 25 deletions
diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp
index 5d69a921..f9caffc5 100644
--- a/src/modelinfo/VehicleModelInfo.cpp
+++ b/src/modelinfo/VehicleModelInfo.cpp
@@ -484,7 +484,7 @@ CVehicleModelInfo::SetAtomicRenderCallbacks(void)
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_BigVehicle, nil);
else if(m_vehicleType == VEHICLE_TYPE_BOAT)
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_Boat, m_clump);
- else if(mod_HandlingManager.GetHandlingData((eHandlingId)m_handlingId)->Flags & HANDLING_IS_HELI)
+ else if(mod_HandlingManager.GetHandlingData((tVehicleType)m_handlingId)->Flags & HANDLING_IS_HELI)
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB_RealHeli, m_clump);
else
RpClumpForAllAtomics(m_clump, SetAtomicRendererCB, m_clump);
@@ -614,7 +614,7 @@ CVehicleModelInfo::SetVehicleComponentFlags(RwFrame *frame, uint32 flags)
{
tHandlingData *handling;
- handling = mod_HandlingManager.GetHandlingData((eHandlingId)m_handlingId);
+ handling = mod_HandlingManager.GetHandlingData((tVehicleType)m_handlingId);
#define SETFLAGS(f) RwFrameForAllObjects(frame, SetAtomicFlagCB, (void*)(f))
diff --git a/src/vehicles/Automobile.cpp b/src/vehicles/Automobile.cpp
index e5caa483..251dac30 100644
--- a/src/vehicles/Automobile.cpp
+++ b/src/vehicles/Automobile.cpp
@@ -100,8 +100,8 @@ CAutomobile::CAutomobile(int32 id, uint8 CreatedBy)
break;
}
- pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
- pFlyingHandling = mod_HandlingManager.GetFlyingPointer((eHandlingId)mi->m_handlingId);
+ pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId);
+ pFlyingHandling = mod_HandlingManager.GetFlyingPointer((tVehicleType)mi->m_handlingId);
m_auto_unused1 = 20.0f;
m_auto_unused2 = 0;
diff --git a/src/vehicles/Bike.cpp b/src/vehicles/Bike.cpp
index 62633464..30d63aca 100644
--- a/src/vehicles/Bike.cpp
+++ b/src/vehicles/Bike.cpp
@@ -93,9 +93,9 @@ CBike::CBike(int32 id, uint8 CreatedBy)
SetModelIndex(id);
- pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
- pBikeHandling = mod_HandlingManager.GetBikePointer((eHandlingId)mi->m_handlingId);
- pFlyingHandling = mod_HandlingManager.GetFlyingPointer((eHandlingId)mi->m_handlingId);
+ pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId);
+ pBikeHandling = mod_HandlingManager.GetBikePointer((tVehicleType)mi->m_handlingId);
+ pFlyingHandling = mod_HandlingManager.GetFlyingPointer((tVehicleType)mi->m_handlingId);
m_bike_unused1 = 20.0f;
m_bike_unused2 = 0;
diff --git a/src/vehicles/Boat.cpp b/src/vehicles/Boat.cpp
index 7fea8c6e..14abbfc6 100644
--- a/src/vehicles/Boat.cpp
+++ b/src/vehicles/Boat.cpp
@@ -63,9 +63,9 @@ CBoat::CBoat(int mi, uint8 owner) : CVehicle(owner)
m_nPoliceShoutTimer = CTimer::GetTimeInMilliseconds();
SetModelIndex(mi);
- pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)minfo->m_handlingId);
- pFlyingHandling = mod_HandlingManager.GetFlyingPointer((eHandlingId)minfo->m_handlingId);
- pBoatHandling = mod_HandlingManager.GetBoatPointer((eHandlingId)minfo->m_handlingId);
+ pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)minfo->m_handlingId);
+ pFlyingHandling = mod_HandlingManager.GetFlyingPointer((tVehicleType)minfo->m_handlingId);
+ pBoatHandling = mod_HandlingManager.GetBoatPointer((tVehicleType)minfo->m_handlingId);
minfo->ChooseVehicleColour(m_currentColour1, m_currentColour2);
m_fMass = pHandling->fMass;
diff --git a/src/vehicles/HandlingMgr.cpp b/src/vehicles/HandlingMgr.cpp
index 3d5d4e77..f96835d3 100644
--- a/src/vehicles/HandlingMgr.cpp
+++ b/src/vehicles/HandlingMgr.cpp
@@ -187,7 +187,7 @@ cHandlingDataMgr::LoadHandlingData(void)
handlingId = FindExactWord(word, (const char*)VehicleNames, 14, NUMHANDLINGS);
assert(handlingId >= 0 && handlingId < NUMHANDLINGS);
bikeHandling = GetBikePointer(handlingId);
- bikeHandling->nIdentifier = (eHandlingId)handlingId;
+ bikeHandling->nIdentifier = (tVehicleType)handlingId;
break;
case 2: bikeHandling->fLeanFwdCOM = atof(word); break;
case 3: bikeHandling->fLeanFwdForce = atof(word); break;
@@ -220,7 +220,7 @@ cHandlingDataMgr::LoadHandlingData(void)
handlingId = FindExactWord(word, (const char*)VehicleNames, 14, NUMHANDLINGS);
assert(handlingId >= 0 && handlingId < NUMHANDLINGS);
flyingHandling = GetFlyingPointer(handlingId);
- flyingHandling->nIdentifier = (eHandlingId)handlingId;
+ flyingHandling->nIdentifier = (tVehicleType)handlingId;
break;
case 2: flyingHandling->fThrust = atof(word); break;
case 3: flyingHandling->fThrustFallOff = atof(word); break;
@@ -255,7 +255,7 @@ cHandlingDataMgr::LoadHandlingData(void)
handlingId = FindExactWord(word, (const char*)VehicleNames, 14, NUMHANDLINGS);
assert(handlingId >= 0 && handlingId < NUMHANDLINGS);
boatHandling = GetBoatPointer(handlingId);
- boatHandling->nIdentifier = (eHandlingId)handlingId;
+ boatHandling->nIdentifier = (tVehicleType)handlingId;
break;
case 2: boatHandling->fThrustY = atof(word); break;
case 3: boatHandling->fThrustZ = atof(word); break;
@@ -284,7 +284,7 @@ cHandlingDataMgr::LoadHandlingData(void)
handlingId = FindExactWord(word, (const char*)VehicleNames, 14, NUMHANDLINGS);
assert(handlingId >= 0 && handlingId < NUMHANDLINGS);
handling = &HandlingData[handlingId];
- handling->nIdentifier = (eHandlingId)handlingId;
+ handling->nIdentifier = (tVehicleType)handlingId;
break;
case 1: handling->fMass = atof(word); break;
case 2: handling->Dimension.x = atof(word); break;
diff --git a/src/vehicles/HandlingMgr.h b/src/vehicles/HandlingMgr.h
index e93f7879..52e69441 100644
--- a/src/vehicles/HandlingMgr.h
+++ b/src/vehicles/HandlingMgr.h
@@ -2,7 +2,7 @@
#include "Transmission.h"
-enum eHandlingId
+enum tVehicleType
{
HANDLING_LANDSTAL,
HANDLING_IDAHO,
@@ -154,7 +154,7 @@ enum
struct tHandlingData
{
- eHandlingId nIdentifier;
+ tVehicleType nIdentifier;
float fMass;
float fInvMass;
float fTurnMass;
@@ -187,7 +187,7 @@ struct tHandlingData
struct tBikeHandlingData
{
- eHandlingId nIdentifier;
+ tVehicleType nIdentifier;
float fLeanFwdCOM;
float fLeanFwdForce;
float fLeanBakCOM;
@@ -207,7 +207,7 @@ struct tBikeHandlingData
struct tBoatHandlingData
{
- eHandlingId nIdentifier;
+ tVehicleType nIdentifier;
float fThrustY;
float fThrustZ;
float fThrustAppZ;
@@ -222,7 +222,7 @@ struct tBoatHandlingData
struct tFlyingHandlingData
{
- eHandlingId nIdentifier;
+ tVehicleType nIdentifier;
float fThrust;
float fThrustFallOff;
float fYaw;
@@ -261,11 +261,11 @@ public:
void ConvertDataToGameUnits(tHandlingData *handling);
void ConvertBikeDataToGameUnits(tBikeHandlingData *handling);
int32 GetHandlingId(const char *name);
- tHandlingData *GetHandlingData(eHandlingId id) { return &HandlingData[id]; }
+ tHandlingData *GetHandlingData(tVehicleType id) { return &HandlingData[id]; }
tBikeHandlingData *GetBikePointer(uint8 id) { return &BikeHandlingData[id-HANDLING_BIKE]; }
tFlyingHandlingData *GetFlyingPointer(uint8 id);
tBoatHandlingData *GetBoatPointer(uint8 id);
- bool HasRearWheelDrive(eHandlingId id) { return HandlingData[id].Transmission.nDriveType == 'R'; }
- bool HasFrontWheelDrive(eHandlingId id) { return HandlingData[id].Transmission.nDriveType == 'F'; }
+ bool HasRearWheelDrive(tVehicleType id) { return HandlingData[id].Transmission.nDriveType == 'R'; }
+ bool HasFrontWheelDrive(tVehicleType id) { return HandlingData[id].Transmission.nDriveType == 'F'; }
};
extern cHandlingDataMgr mod_HandlingManager;
diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp
index d6a237e5..644fdde8 100644
--- a/src/vehicles/Heli.cpp
+++ b/src/vehicles/Heli.cpp
@@ -57,7 +57,7 @@ CHeli::CHeli(int32 id, uint8 CreatedBy)
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
m_vehType = VEHICLE_TYPE_HELI;
- pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
+ pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId);
SetModelIndex(id);
m_heliStatus = HELI_STATUS_HOVER;
m_pathState = 0;
diff --git a/src/vehicles/Plane.cpp b/src/vehicles/Plane.cpp
index ffe9ffbf..716ce8d0 100644
--- a/src/vehicles/Plane.cpp
+++ b/src/vehicles/Plane.cpp
@@ -70,7 +70,7 @@ CPlane::CPlane(int32 id, uint8 CreatedBy)
{
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
m_vehType = VEHICLE_TYPE_PLANE;
- pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
+ pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId);
SetModelIndex(id);
m_fMass = 100000000.0f;
diff --git a/src/vehicles/Train.cpp b/src/vehicles/Train.cpp
index fb8361c5..1a4af307 100644
--- a/src/vehicles/Train.cpp
+++ b/src/vehicles/Train.cpp
@@ -44,7 +44,7 @@ CTrain::CTrain(int32 id, uint8 CreatedBy)
#ifdef GTA_TRAIN
CVehicleModelInfo *mi = (CVehicleModelInfo*)CModelInfo::GetModelInfo(id);
m_vehType = VEHICLE_TYPE_TRAIN;
- pHandling = mod_HandlingManager.GetHandlingData((eHandlingId)mi->m_handlingId);
+ pHandling = mod_HandlingManager.GetHandlingData((tVehicleType)mi->m_handlingId);
SetModelIndex(id);
Doors[0].Init(0.8f, 0.0f, 1, 0);