Mario Kart 64
Loading...
Searching...
No Matches
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_CROSSINGS 2
14// This allows karts to jump the train despite the crossing being activated.
15// but still stop for the train once it's close
16#define FRAMES_SINCE_CROSSING_ACTIVATED 240
17
18#define NUM_CROSSINGS 2
19// This allows karts to jump the train despite the crossing being activated.
20// but still stop for the train once it's close
21#define FRAMES_SINCE_CROSSING_ACTIVATED 240
22
23// It seems like there's room for 2 Ferries, but only 1 is ever active
24#define NUM_ACTIVE_PADDLE_BOATS 1
25#define NUM_PADDLE_BOATS 2
26
27#define NUM_RACE_BOX_TRUCKS 7
28#define NUM_RACE_SCHOOL_BUSES 7
29#define NUM_RACE_TANKER_TRUCKS 7
30#define NUM_RACE_CARS 7
31
32#define NUM_TIME_TRIAL_BOX_TRUCKS (NUM_RACE_BOX_TRUCKS + 1)
33#define NUM_TIME_TRIAL_SCHOOL_BUSES (NUM_RACE_SCHOOL_BUSES + 1)
34#define NUM_TIME_TRIAL_TANKER_TRUCKS (NUM_RACE_TANKER_TRUCKS + 1)
35#define NUM_TIME_TRIAL_CARS (NUM_RACE_CARS + 1)
36
37#define TRAIN_SMOKE_RENDER_DISTANCE 2000.0f
38#define TRAIN_CROSSING_AI_DISTANCE 1000.0f
39#define BOAT_SMOKE_RENDER_DISTANCE 2000.0f
40
41#define RENDER_VEHICLE 1
42
43typedef struct {
44 /* 0x00 */ s16 isActive; // Only used for Tender and Passenger Cars, unused for Locomotives
45 /* 0x02 */ s16 compilerPadding;
46 /* 0x04 */ Vec3f position;
47 /* 0x10 */ Vec3f velocity;
48 /* 0x1C */ u16 waypointIndex;
49 /* 0x1E */ s16 actorIndex;
50 /* 0x20 */ s32 unused; // Not read or written. Could be padding?
51} TrainCarStuff; // size = 0x24;
52
53typedef struct {
55 /* 0x024 */ TrainCarStuff tender;
57 /* 0x0FC */ f32 speed;
58 /* 0x100 */ s32 someFlags;
60 /* 0x104 */ s32 numCars; // Non-locomotive car count?
61 /* 0x108 */ s32 unused; // Not read or written. Could be padding?
62} TrainStuff; // size = 0x10C
63
64typedef struct {
65 /* 0x00 */ s16 isActive; // The paddle wheel boat only shows up if the number of players is < 3
66 /* 0x02 */ // s16 compilerPadding;
67 /* 0x04 */ Vec3f position; //
68 /* 0x10 */ Vec3f velocity; //
69 /* 0x1C */ u16 waypointIndex; //
70 /* 0x1E */ s16 actorIndex; //
71 /* 0x20 */ f32 speed; //
72 /* 0x24 */ s16 rotY; // Only Y rotation is tracked in this struct
73 /* 0x26 */ // s16 compilerPadding2;
78 /* 0x28 */ s32 someFlags;
79} PaddleBoatStuff; // size = 0x2C
80
81typedef struct {
82 /* 0x00 */ s16 unused; // Gets set to 0, but doesn't seem to have any purpose
83 /* 0x02 */ // s16 compilerPadding;
84 /* 0x04 */ Vec3f position;
85 /* 0x10 */ Vec3f velocity;
86 /* 0x1C */ u16 waypointIndex;
87 /* 0x1E */ s16 actorIndex;
88 /* 0x20 */ f32 speed; //
89 /* 0x24 */ f32 someMultiplierTheSequel; //
90 /* 0x28 */ Vec3s rotation;
91 /* 0x2E */ s16 someType; //
97 /* 0x30 */ s8 someFlags; //
98 /* 0x31 */ s8 someFlagsTheSequel; //
99 /* 0x32 */ // s16 compilerPadding2;
100} VehicleStuff; // size = 0x34
101
102extern TrainStuff gTrainList[];
103
104// This is an array, maybe they intended to have multiple boats at some point in development?
106
107// Lists for different vehicles in Toad's Turnpike
111extern VehicleStuff gCarList[];
112
113#endif
TrainStuff gTrainList[NUM_TRAINS]
Definition code_80005FD0.c:149
VehicleStuff gSchoolBusList[NUM_RACE_SCHOOL_BUSES]
Definition code_80005FD0.c:154
VehicleStuff gCarList[NUM_RACE_CARS]
Definition code_80005FD0.c:156
PaddleBoatStuff gPaddleBoats[NUM_PADDLE_BOATS]
Definition code_80005FD0.c:152
VehicleStuff gTankerTruckList[NUM_RACE_TANKER_TRUCKS]
Definition code_80005FD0.c:155
VehicleStuff gBoxTruckList[NUM_RACE_BOX_TRUCKS]
Definition code_80005FD0.c:153
f32 Vec3f[3]
Definition common_structs.h:10
s16 Vec3s[3]
Definition common_structs.h:15
Definition vehicles.h:64
s32 someFlags
Definition vehicles.h:78
Vec3f velocity
Definition vehicles.h:68
s16 isActive
Definition vehicles.h:65
f32 speed
Definition vehicles.h:71
s16 rotY
Definition vehicles.h:72
s16 actorIndex
Definition vehicles.h:70
Vec3f position
Definition vehicles.h:67
u16 waypointIndex
Definition vehicles.h:69
Definition vehicles.h:43
Vec3f position
Definition vehicles.h:46
Vec3f velocity
Definition vehicles.h:47
s16 actorIndex
Definition vehicles.h:49
s32 unused
Definition vehicles.h:50
s16 isActive
Definition vehicles.h:44
u16 waypointIndex
Definition vehicles.h:48
s16 compilerPadding
Definition vehicles.h:45
Definition vehicles.h:53
s32 someFlags
Definition vehicles.h:58
TrainCarStuff locomotive
Definition vehicles.h:54
s32 numCarriages
Definition vehicles.h:59
f32 speed
Definition vehicles.h:57
s32 numCars
Definition vehicles.h:60
TrainCarStuff passengerCars[NUM_PASSENGER_CAR_ENTRIES]
Definition vehicles.h:56
TrainCarStuff tender
Definition vehicles.h:55
s32 unused
Definition vehicles.h:61
Definition vehicles.h:81
s16 someType
Definition vehicles.h:91
Vec3f velocity
Definition vehicles.h:85
s16 unused
Definition vehicles.h:82
Vec3f position
Definition vehicles.h:84
Vec3s rotation
Definition vehicles.h:90
s16 actorIndex
Definition vehicles.h:87
s8 someFlags
Definition vehicles.h:97
f32 speed
Definition vehicles.h:88
u16 waypointIndex
Definition vehicles.h:86
f32 someMultiplierTheSequel
Definition vehicles.h:89
s8 someFlagsTheSequel
Definition vehicles.h:98
#define NUM_PASSENGER_CAR_ENTRIES
Definition vehicles.h:8