summaryrefslogtreecommitdiffstats
path: root/src/modelinfo/VehicleModelInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/modelinfo/VehicleModelInfo.h')
-rw-r--r--src/modelinfo/VehicleModelInfo.h49
1 files changed, 41 insertions, 8 deletions
diff --git a/src/modelinfo/VehicleModelInfo.h b/src/modelinfo/VehicleModelInfo.h
index c7a41126..6f2cea3c 100644
--- a/src/modelinfo/VehicleModelInfo.h
+++ b/src/modelinfo/VehicleModelInfo.h
@@ -3,8 +3,8 @@
#include "ClumpModelInfo.h"
enum {
- NUM_FIRST_MATERIALS = 24,
- NUM_SECOND_MATERIALS = 20,
+ NUM_FIRST_MATERIALS = 25,
+ NUM_SECOND_MATERIALS = 25,
NUM_VEHICLE_COLOURS = 8,
};
@@ -31,6 +31,7 @@ enum eVehicleType {
VEHICLE_TYPE_HELI,
VEHICLE_TYPE_PLANE,
VEHICLE_TYPE_BIKE,
+ VEHICLE_TYPE_FERRY,
NUM_VEHICLE_TYPES
};
@@ -48,6 +49,18 @@ enum eBoatPositions
BOAT_POS_FRONTSEAT
};
+enum eFerryPositions
+{
+ FERRY_POS_LIGHT_FRONT,
+ FERRY_POS_LIGHT_REAR,
+ FERRY_POS_CHIM_LEFT,
+ FERRY_POS_PED_POINT,
+ FERRY_POS_CAR1,
+ FERRY_POS_CAR2,
+ FERRY_POS_CAR3,
+ FERRY_POS_CAR4
+};
+
enum eTrainPositions
{
TRAIN_POS_LIGHT_FRONT,
@@ -97,19 +110,30 @@ public:
uint8 m_lastColorVariation;
uint8 m_currentColour1;
uint8 m_currentColour2;
- RpAtomic *m_comps[6];
+ RpAtomic **m_comps;
+ float m_normalSplay;
// This is stupid, CClumpModelInfo already has it!
union {
int32 m_animFileIndex;
char *m_animFileName;
};
- static int8 ms_compsToUse[2];
- static int8 ms_compsUsed[2];
- static RwRGBA ms_vehicleColourTable[256];
- static RwTexture *ms_colourTextureTable[256];
+ static base::cRelocatableChunkClassInfo msClassInfo;
+ static CVehicleModelInfo msClassInstance;
+
+ struct Statics {
+ void *unknown; // unused too it seems
+ RwRGBA ms_vehicleColourTable[256];
+ int8 ms_compsUsed[2];
+ int8 ms_compsToUse[2];
+ };
+ //static RwTexture *ms_colourTextureTable[256];
+ static Statics *mspInfo;
static RwObjectNameIdAssocation *ms_vehicleDescs[NUM_VEHICLE_TYPES];
+ static void Load(void *inst);
+ static void *WriteStaticInfo(base::cRelocatableChunkWriter &writer);
+
CVehicleModelInfo(void);
void DeleteRwObject(void);
RwObject *CreateInstance(void);
@@ -118,6 +142,12 @@ public:
void ConvertAnimFileIndex(void);
int GetAnimFileIndex(void) { return m_animFileIndex; }
+ virtual void LoadModel(void *model, const void *chunk);
+ virtual void Write(base::cRelocatableChunkWriter &writer);
+ virtual void *WriteModel(base::cRelocatableChunkWriter &writer);
+ virtual void RcWriteThis(base::cRelocatableChunkWriter &writer);
+ virtual void RcWriteEmpty(base::cRelocatableChunkWriter &writer);
+
static RwFrame *CollapseFramesCB(RwFrame *frame, void *data);
static RwObject *MoveObjectsCB(RwObject *object, void *data);
static RpAtomic *HideDamagedAtomicCB(RpAtomic *atomic, void *data);
@@ -127,13 +157,16 @@ public:
static RpAtomic *SetAtomicRendererCB(RpAtomic *atomic, void *data);
static RpAtomic *SetAtomicRendererCB_BigVehicle(RpAtomic *atomic, void *data);
static RpAtomic *SetAtomicRendererCB_Train(RpAtomic *atomic, void *data);
+ static RpAtomic *SetAtomicRendererCB_Ferry(RpAtomic *atomic, void *data);
static RpAtomic *SetAtomicRendererCB_Boat(RpAtomic *atomic, void *data);
+ static RpAtomic *SetAtomicRendererCB_Boat_Far(RpAtomic *atomic, void *data);
static RpAtomic *SetAtomicRendererCB_Heli(RpAtomic *atomic, void *data);
static RpAtomic *SetAtomicRendererCB_RealHeli(RpAtomic *atomic, void *data);
void SetAtomicRenderCallbacks(void);
static RwObject *SetAtomicFlagCB(RwObject *object, void *data);
static RwObject *ClearAtomicFlagCB(RwObject *atomic, void *data);
+ void RemoveWheels(void);
void SetVehicleComponentFlags(RwFrame *frame, uint32 flags);
void PreprocessHierarchy(void);
void GetWheelPosn(int32 n, CVector &pos);
@@ -159,7 +192,7 @@ public:
static void ShutdownEnvironmentMaps(void);
static int GetMaximumNumberOfPassengersFromNumberOfDoors(int id);
- static void SetComponentsToUse(int8 c1, int8 c2) { ms_compsToUse[0] = c1; ms_compsToUse[1] = c2; }
+ static void SetComponentsToUse(int8 c1, int8 c2) { mspInfo->ms_compsToUse[0] = c1; mspInfo->ms_compsToUse[1] = c2; }
};
extern bool gbBlackCars;