summaryrefslogtreecommitdiffstats
path: root/src/modelinfo
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-06-02 23:35:20 +0200
committeraap <aap@papnet.eu>2020-06-02 23:35:20 +0200
commit2ca3c50463eff025b9783930d112dd0c257c040e (patch)
tree1601340bc1b3d51542aad6f448f52c89badfd89d /src/modelinfo
parentfixed radar rendering (diff)
downloadre3-2ca3c50463eff025b9783930d112dd0c257c040e.tar
re3-2ca3c50463eff025b9783930d112dd0c257c040e.tar.gz
re3-2ca3c50463eff025b9783930d112dd0c257c040e.tar.bz2
re3-2ca3c50463eff025b9783930d112dd0c257c040e.tar.lz
re3-2ca3c50463eff025b9783930d112dd0c257c040e.tar.xz
re3-2ca3c50463eff025b9783930d112dd0c257c040e.tar.zst
re3-2ca3c50463eff025b9783930d112dd0c257c040e.zip
Diffstat (limited to 'src/modelinfo')
-rw-r--r--src/modelinfo/VehicleModelInfo.cpp10
-rw-r--r--src/modelinfo/VehicleModelInfo.h31
2 files changed, 36 insertions, 5 deletions
diff --git a/src/modelinfo/VehicleModelInfo.cpp b/src/modelinfo/VehicleModelInfo.cpp
index d80fc4cf..d1994c06 100644
--- a/src/modelinfo/VehicleModelInfo.cpp
+++ b/src/modelinfo/VehicleModelInfo.cpp
@@ -133,11 +133,11 @@ RwObjectNameIdAssocation bikeIds[] = {
{ "wheel_rear", BIKE_WHEEL_REAR, 0 },
{ "mudguard", BIKE_MUDGUARD, 0 },
{ "handlebars", BIKE_HANDLEBARS, 0 },
- { "ped_frontseat", BIKE_POS_FRONTSEAT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
- { "ped_backseat", BIKE_POS_BACKSEAT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
- { "headlights", BIKE_POS_HEADLIGHTS, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
- { "taillights", BIKE_POS_TAILLIGHTS, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
- { "exhaust", BIKE_POS_EXHAUST, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
+ { "ped_frontseat", CAR_POS_FRONTSEAT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
+ { "ped_backseat", CAR_POS_BACKSEAT, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
+ { "headlights", CAR_POS_HEADLIGHTS, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
+ { "taillights", CAR_POS_TAILLIGHTS, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
+ { "exhaust", CAR_POS_EXHAUST, VEHICLE_FLAG_POS | CLUMP_FLAG_NO_HIERID },
{ "extra1", 0, VEHICLE_FLAG_DRAWLAST | VEHICLE_FLAG_COMP | CLUMP_FLAG_NO_HIERID },
{ "extra2", 0, VEHICLE_FLAG_DRAWLAST | VEHICLE_FLAG_COMP | CLUMP_FLAG_NO_HIERID },
{ "extra3", 0, VEHICLE_FLAG_DRAWLAST | VEHICLE_FLAG_COMP | CLUMP_FLAG_NO_HIERID },
diff --git a/src/modelinfo/VehicleModelInfo.h b/src/modelinfo/VehicleModelInfo.h
index 5ee6d263..945bdd92 100644
--- a/src/modelinfo/VehicleModelInfo.h
+++ b/src/modelinfo/VehicleModelInfo.h
@@ -34,6 +34,36 @@ enum eVehicleType {
NUM_VEHICLE_TYPES
};
+enum eCarPositions
+{
+ CAR_POS_HEADLIGHTS,
+ CAR_POS_TAILLIGHTS,
+ CAR_POS_FRONTSEAT,
+ CAR_POS_BACKSEAT,
+ CAR_POS_EXHAUST
+};
+
+enum eBoatPositions
+{
+ BOAT_POS_FRONTSEAT
+};
+
+enum eTrainPositions
+{
+ TRAIN_POS_LIGHT_FRONT,
+ TRAIN_POS_LIGHT_REAR,
+ TRAIN_POS_LEFT_ENTRY,
+ TRAIN_POS_MID_ENTRY,
+ TRAIN_POS_RIGHT_ENTRY
+};
+
+enum ePlanePositions
+{
+ PLANE_POS_LIGHT_LEFT,
+ PLANE_POS_LIGHT_RIGHT,
+ PLANE_POS_LIGHT_TAIL,
+};
+
enum {
NUM_VEHICLE_POSITIONS = 5
};
@@ -107,6 +137,7 @@ public:
void SetVehicleComponentFlags(RwFrame *frame, uint32 flags);
void PreprocessHierarchy(void);
void GetWheelPosn(int32 n, CVector &pos);
+ CVector GetFrontSeatPosn(void) { return m_positions[m_vehicleType == VEHICLE_TYPE_BOAT ? BOAT_POS_FRONTSEAT : CAR_POS_FRONTSEAT]; };
int32 ChooseComponent(void);
int32 ChooseSecondComponent(void);