Mario Kart 64
vehicles.h
Go to the documentation of this file.
1 #ifndef VEHICLES_H
2 #define VEHICLES_H
3 
4 #include "common_structs.h"
5 
6 #define NUM_1P_PASSENGER_CARS 4
7 #define NUM_2P_PASSENGER_CARS 1
8 #define NUM_PASSENGER_CAR_ENTRIES 5 // Max 16
9 #define NUM_TENDERS 1
10 #define NUM_TRAINS 2
11 #define LOCOMOTIVE_ONLY 0
12 
13 #define NUM_PADDLE_WHEEL_BOATS 1
14 
15 #define NUM_RACE_BOX_TRUCKS 7
16 #define NUM_RACE_SCHOOL_BUSES 7
17 #define NUM_RACE_TANKER_TRUCKS 7
18 #define NUM_RACE_CARS 7
19 
20 #define NUM_TIME_TRIAL_BOX_TRUCKS (NUM_RACE_BOX_TRUCKS + 1)
21 #define NUM_TIME_TRIAL_SCHOOL_BUSES (NUM_RACE_SCHOOL_BUSES + 1)
22 #define NUM_TIME_TRIAL_TANKER_TRUCKS (NUM_RACE_TANKER_TRUCKS + 1)
23 #define NUM_TIME_TRIAL_CARS (NUM_RACE_CARS + 1)
24 
25 typedef struct {
26  /* 0x00 */ s16 isActive; // Only used for Tender and Passenger Cars, unused for Locomotives
27  /* 0x02 */ s16 compilerPadding;
28  /* 0x04 */ Vec3f position;
29  /* 0x10 */ Vec3f velocity;
30  /* 0x1C */ u16 waypointIndex;
31  /* 0x1E */ s16 actorIndex;
32  /* 0x20 */ s32 unused; // Not read or written. Could be padding?
33 } TrainCarStuff; // size = 0x24;
34 
35 typedef struct {
37  /* 0x024 */ TrainCarStuff tender;
38  /* 0x048 */ TrainCarStuff passengerCars[NUM_PASSENGER_CAR_ENTRIES];
39  /* 0x0FC */ f32 someMultiplier;
40  /* 0x100 */ s32 someFlags;
41  /* 0x104 */ s32 numCars; // Non-locomotive car count?
42  /* 0x108 */ s32 unused; // Not read or written. Could be padding?
43 } TrainStuff; // size = 0x10C
44 
45 typedef struct {
46  /* 0x00 */ s16 isActive; // The paddle wheel boat only shows up if the number of players is < 3
47  /* 0x02 */ // s16 compilerPadding;
48  /* 0x04 */ Vec3f position; //
49  /* 0x10 */ Vec3f velocity; //
50  /* 0x1C */ u16 waypointIndex; //
51  /* 0x1E */ s16 actorIndex; //
52  /* 0x20 */ f32 someMultiplier; //
53  /* 0x24 */ s16 rotY; // Only Y rotation is tracked in this struct
54  /* 0x26 */ // s16 compilerPadding2;
59  /* 0x28 */ s32 someFlags;
60 } PaddleWheelBoatStuff; // size = 0x2C
61 
62 typedef struct {
63  /* 0x00 */ s16 unused; // Gets set to 0, but doesn't seem to have any purpose
64  /* 0x02 */ // s16 compilerPadding;
65  /* 0x04 */ Vec3f position;
66  /* 0x10 */ Vec3f velocity;
67  /* 0x1C */ u16 waypointIndex;
68  /* 0x1E */ s16 actorIndex;
69  /* 0x20 */ f32 someMultiplier; //
71  /* 0x28 */ Vec3s rotation;
72  /* 0x2E */ s16 someType; //
78  /* 0x30 */ s8 someFlags; //
79  /* 0x31 */ s8 someFlagsTheSequel; //
80  /* 0x32 */ // s16 compilerPadding2;
81 } VehicleStuff; // size = 0x34
82 
83 extern TrainStuff sTrains[];
84 
85 // This is an array, maybe they intended to have multiple boats at some point in development?
87 
88 // Lists for different vehicles in Toad's Turnpike
92 extern VehicleStuff gCarList[];
93 
94 #endif
f32 Vec3f[3]
Definition: common_structs.h:6
s16 Vec3s[3]
Definition: common_structs.h:8
Definition: vehicles.h:45
s16 rotY
Definition: vehicles.h:53
s32 someFlags
Definition: vehicles.h:59
f32 someMultiplier
Definition: vehicles.h:52
u16 waypointIndex
Definition: vehicles.h:50
s16 isActive
Definition: vehicles.h:46
s16 actorIndex
Definition: vehicles.h:51
Vec3f velocity
Definition: vehicles.h:49
Vec3f position
Definition: vehicles.h:48
Definition: vehicles.h:25
Vec3f position
Definition: vehicles.h:28
Vec3f velocity
Definition: vehicles.h:29
s16 actorIndex
Definition: vehicles.h:31
s32 unused
Definition: vehicles.h:32
s16 isActive
Definition: vehicles.h:26
u16 waypointIndex
Definition: vehicles.h:30
s16 compilerPadding
Definition: vehicles.h:27
Definition: vehicles.h:35
s32 someFlags
Definition: vehicles.h:40
TrainCarStuff locomotive
Definition: vehicles.h:36
s32 numCars
Definition: vehicles.h:41
TrainCarStuff tender
Definition: vehicles.h:37
f32 someMultiplier
Definition: vehicles.h:39
s32 unused
Definition: vehicles.h:42
Definition: vehicles.h:62
s16 someType
Definition: vehicles.h:72
f32 someMultiplier
Definition: vehicles.h:69
Vec3f velocity
Definition: vehicles.h:66
s16 unused
Definition: vehicles.h:63
Vec3f position
Definition: vehicles.h:65
Vec3s rotation
Definition: vehicles.h:71
s16 actorIndex
Definition: vehicles.h:68
s8 someFlags
Definition: vehicles.h:78
u16 waypointIndex
Definition: vehicles.h:67
f32 someMultiplierTheSequel
Definition: vehicles.h:70
s8 someFlagsTheSequel
Definition: vehicles.h:79
signed int s32
Definition: ultratypes.h:15
signed char s8
Definition: ultratypes.h:11
signed short int s16
Definition: ultratypes.h:13
float f32
Definition: ultratypes.h:32
unsigned short int u16
Definition: ultratypes.h:14
VehicleStuff gSchoolBusList[]
VehicleStuff gTankerTruckList[]
VehicleStuff gCarList[]
VehicleStuff gBoxTruckList[]
PaddleWheelBoatStuff gFerries[]
#define NUM_PASSENGER_CAR_ENTRIES
Definition: vehicles.h:8
TrainStuff sTrains[]