Add structs for "vehicle" types in 80005FD0 (#248)

Signed-off-by: Taggerung <tyler.taggerung@gmail.com>
This commit is contained in:
Tyler McGavran
2022-07-27 22:03:35 -04:00
committed by GitHub
parent db95b4b9e8
commit a536985a13
14 changed files with 699 additions and 1223 deletions
+6 -1
View File
@@ -49,10 +49,14 @@ exactly what you're doing.
#define ACTOR_MARIO_RACEWAY_SIGN 0x17
#define ACTOR_PALM_TREE 0x19
#define ACTOR_WARIO_STADIUM_SIGN 0x23
#define ACTOR_BOX_TRUCK 0x25
#define ACTOR_PADDLE_WHEEL_BOAT 0x26
#define ACTOR_RAILROAD_CROSSING 0x27
#define ACTOR_SCHOOL_BUS 0x28
#define ACTOR_TANKER_TRUCK 0x29
#define ACTOR_BLUE_SPINY_SHELL 0x2A
#define ACTOR_HOT_AIR_BALLOON_ITEM_BOX 0x2B
#define ACTOR_CAR 0x2C
#define ACTOR_KIWANO_FRUIT 0x2D
#define ACTOR_LIST_SIZE 100
@@ -101,7 +105,8 @@ struct RailroadCrossing {
/* 0x06 */ s16 crossingId;
/* 0x08 */ f32 unk_08;
/* 0x0C */ f32 unk_0C;
/* 0x10 */ Vec4s unk_10;
/* 0x10 */ Vec3s rot;
/* 0x16 */ s16 unk_16;
/* 0x18 */ Vec3f pos;
/* 0x24 */ Vec3f velocity;
/* 0x30 */ UnkActorInner unk30;
+92
View File
@@ -0,0 +1,92 @@
#ifndef VEHICLES_H
#define VEHICLES_H
#include "common_structs.h"
#define NUM_1P_PASSENGER_CARS 5
#define NUM_2P_PASSENGER_CARS 2
#define NUM_PASSENGER_CAR_ENTRIES 5
#define NUM_TRAINS 2
#define NUM_PADDLE_WHEEL_BOATS 1
#define NUM_RACE_BOX_TRUCKS 7
#define NUM_RACE_SCHOOL_BUSES 7
#define NUM_RACE_TANKER_TRUCKS 7
#define NUM_RACE_CARS 7
#define NUM_TIME_TRIAL_BOX_TRUCKS (NUM_RACE_BOX_TRUCKS + 1)
#define NUM_TIME_TRIAL_SCHOOL_BUSES (NUM_RACE_SCHOOL_BUSES + 1)
#define NUM_TIME_TRIAL_TANKER_TRUCKS (NUM_RACE_TANKER_TRUCKS + 1)
#define NUM_TIME_TRIAL_CARS (NUM_RACE_CARS + 1)
typedef struct {
/* 0x00 */ s16 isActive; // Only used for Tender and Passenger Cars, unused for Locomotives
/* 0x02 */ s16 compilerPadding;
/* 0x04 */ Vec3f position;
/* 0x10 */ Vec3f velocity;
/* 0x1C */ s16 wayPointIndex;
/* 0x1E */ s16 actorIndex;
/* 0x20 */ s32 unused; // Not read or written. Could be padding?
} TrainCarStuff; // size = 0x24;
typedef struct {
/* 0x000 */ TrainCarStuff locomotive;
/* 0x024 */ TrainCarStuff tender;
/* 0x048 */ TrainCarStuff passengerCars[NUM_PASSENGER_CAR_ENTRIES];
/* 0x0FC */ f32 someMultiplier;
/* 0x100 */ s32 someFlags;
/* 0x104 */ s32 numCars; // Non-locomotive car count?
/* 0x108 */ s32 unused; // Not read or written. Could be padding?
} TrainStuff; // size = 0x10C
typedef struct {
/* 0x00 */ s16 isActive; // The paddle wheel boat only shows up if the number of players is < 3
/* 0x02 */ // s16 compilerPadding;
/* 0x04 */ Vec3f position; //
/* 0x10 */ Vec3f velocity; //
/* 0x1C */ s16 wayPointIndex; //
/* 0x1E */ s16 actorIndex; //
/* 0x20 */ f32 someMultiplier; //
/* 0x24 */ s16 yRotation; // Only Y rotation is tracked in this struct
/* 0x26 */ // s16 compilerPadding2;
/**
* Bit field that tracks whether a given human player is within a certain distance of the boat
* Probably audio related
**/
/* 0x28 */ s32 someFlags;
} PaddleWheelBoatStuff; // size = 0x2C
typedef struct {
/* 0x00 */ s16 unused; // Gets set to 0, but doesn't seem to have any purpose
/* 0x02 */ // s16 compilerPadding;
/* 0x04 */ Vec3f position;
/* 0x10 */ Vec3f velocity;
/* 0x1C */ s16 wayPointIndex;
/* 0x1E */ s16 actorIndex;
/* 0x20 */ f32 someMultiplier; //
/* 0x24 */ f32 someMultiplierTheSequel; //
/* 0x28 */ Vec3s rotation;
/* 0x2E */ s16 someType; //
/**
* Each set of flags seems to be a bit field tracking whether a given human player
* is within a certain distance of the vehicle. Likely related to audio stuff
* Seems to turn on/off based on player distance from the vehicle
**/
/* 0x30 */ s8 someFlags; //
/* 0x31 */ s8 someFlagsTheSequel; //
/* 0x32 */ // s16 compilerPadding2;
} VehicleStuff; // size = 0x34
extern TrainStuff D_801635A0[];
// This is an array, maybe they intended to have multiple boats at some point in development?
extern PaddleWheelBoatStuff D_801637C0[];
// Lists for different vehicles in Toad's Turnpike
extern VehicleStuff gBoxTruckList[];
extern VehicleStuff gSchoolBusList[];
extern VehicleStuff gTankerTruckList[];
extern VehicleStuff gCarList[];
#endif