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 // It seems like there's room for 2 Ferries, but only 1 is ever active
14 #define NUM_ACTIVE_PADDLE_WHEEL_BOATS 1
15 #define NUM_PADDLE_WHEEL_BOATS 2
16 
17 #define NUM_RACE_BOX_TRUCKS 7
18 #define NUM_RACE_SCHOOL_BUSES 7
19 #define NUM_RACE_TANKER_TRUCKS 7
20 #define NUM_RACE_CARS 7
21 
22 #define NUM_TIME_TRIAL_BOX_TRUCKS (NUM_RACE_BOX_TRUCKS + 1)
23 #define NUM_TIME_TRIAL_SCHOOL_BUSES (NUM_RACE_SCHOOL_BUSES + 1)
24 #define NUM_TIME_TRIAL_TANKER_TRUCKS (NUM_RACE_TANKER_TRUCKS + 1)
25 #define NUM_TIME_TRIAL_CARS (NUM_RACE_CARS + 1)
26 
27 typedef struct {
28  /* 0x00 */ s16 isActive; // Only used for Tender and Passenger Cars, unused for Locomotives
29  /* 0x02 */ s16 compilerPadding;
30  /* 0x04 */ Vec3f position;
31  /* 0x10 */ Vec3f velocity;
32  /* 0x1C */ u16 waypointIndex;
33  /* 0x1E */ s16 actorIndex;
34  /* 0x20 */ s32 unused; // Not read or written. Could be padding?
35 } TrainCarStuff; // size = 0x24;
36 
37 typedef struct {
39  /* 0x024 */ TrainCarStuff tender;
40  /* 0x048 */ TrainCarStuff passengerCars[NUM_PASSENGER_CAR_ENTRIES];
41  /* 0x0FC */ f32 someMultiplier;
42  /* 0x100 */ s32 someFlags;
43  /* 0x104 */ s32 numCars; // Non-locomotive car count?
44  /* 0x108 */ s32 unused; // Not read or written. Could be padding?
45 } TrainStuff; // size = 0x10C
46 
47 typedef struct {
48  /* 0x00 */ s16 isActive; // The paddle wheel boat only shows up if the number of players is < 3
49  /* 0x02 */ // s16 compilerPadding;
50  /* 0x04 */ Vec3f position; //
51  /* 0x10 */ Vec3f velocity; //
52  /* 0x1C */ u16 waypointIndex; //
53  /* 0x1E */ s16 actorIndex; //
54  /* 0x20 */ f32 someMultiplier; //
55  /* 0x24 */ s16 rotY; // Only Y rotation is tracked in this struct
56  /* 0x26 */ // s16 compilerPadding2;
61  /* 0x28 */ s32 someFlags;
62 } PaddleWheelBoatStuff; // size = 0x2C
63 
64 typedef struct {
65  /* 0x00 */ s16 unused; // Gets set to 0, but doesn't seem to have any purpose
66  /* 0x02 */ // s16 compilerPadding;
67  /* 0x04 */ Vec3f position;
68  /* 0x10 */ Vec3f velocity;
69  /* 0x1C */ u16 waypointIndex;
70  /* 0x1E */ s16 actorIndex;
71  /* 0x20 */ f32 someMultiplier; //
73  /* 0x28 */ Vec3s rotation;
74  /* 0x2E */ s16 someType; //
80  /* 0x30 */ s8 someFlags; //
81  /* 0x31 */ s8 someFlagsTheSequel; //
82  /* 0x32 */ // s16 compilerPadding2;
83 } VehicleStuff; // size = 0x34
84 
85 extern TrainStuff gTrainList[];
86 
87 // This is an array, maybe they intended to have multiple boats at some point in development?
89 
90 // Lists for different vehicles in Toad's Turnpike
94 extern VehicleStuff gCarList[];
95 
96 #endif
f32 Vec3f[3]
Definition: common_structs.h:6
s16 Vec3s[3]
Definition: common_structs.h:8
Definition: vehicles.h:47
s16 rotY
Definition: vehicles.h:55
s32 someFlags
Definition: vehicles.h:61
f32 someMultiplier
Definition: vehicles.h:54
u16 waypointIndex
Definition: vehicles.h:52
s16 isActive
Definition: vehicles.h:48
s16 actorIndex
Definition: vehicles.h:53
Vec3f velocity
Definition: vehicles.h:51
Vec3f position
Definition: vehicles.h:50
Definition: vehicles.h:27
Vec3f position
Definition: vehicles.h:30
Vec3f velocity
Definition: vehicles.h:31
s16 actorIndex
Definition: vehicles.h:33
s32 unused
Definition: vehicles.h:34
s16 isActive
Definition: vehicles.h:28
u16 waypointIndex
Definition: vehicles.h:32
s16 compilerPadding
Definition: vehicles.h:29
Definition: vehicles.h:37
s32 someFlags
Definition: vehicles.h:42
TrainCarStuff locomotive
Definition: vehicles.h:38
s32 numCars
Definition: vehicles.h:43
TrainCarStuff tender
Definition: vehicles.h:39
f32 someMultiplier
Definition: vehicles.h:41
s32 unused
Definition: vehicles.h:44
Definition: vehicles.h:64
s16 someType
Definition: vehicles.h:74
f32 someMultiplier
Definition: vehicles.h:71
Vec3f velocity
Definition: vehicles.h:68
s16 unused
Definition: vehicles.h:65
Vec3f position
Definition: vehicles.h:67
Vec3s rotation
Definition: vehicles.h:73
s16 actorIndex
Definition: vehicles.h:70
s8 someFlags
Definition: vehicles.h:80
u16 waypointIndex
Definition: vehicles.h:69
f32 someMultiplierTheSequel
Definition: vehicles.h:72
s8 someFlagsTheSequel
Definition: vehicles.h:81
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[]
Definition: code_80005FD0.c:142
VehicleStuff gTankerTruckList[]
Definition: code_80005FD0.c:143
VehicleStuff gCarList[]
Definition: code_80005FD0.c:144
TrainStuff gTrainList[]
Definition: code_80005FD0.c:137
VehicleStuff gBoxTruckList[]
Definition: code_80005FD0.c:141
PaddleWheelBoatStuff gFerries[]
Definition: code_80005FD0.c:140
#define NUM_PASSENGER_CAR_ENTRIES
Definition: vehicles.h:8