3#include <egg/math/Vector.hh>
17 STATIC_ASSERT(
sizeof(
Hitbox) == 0x18);
31 STATIC_ASSERT(
sizeof(
Wheel) == 0x2c);
43 std::array<Wheel, 4> wheels;
47STATIC_ASSERT(
sizeof(
BSP) == 0x25c);
65 STATIC_ASSERT(
sizeof(
BikeDisp) == 0xB0);
74 u8 _004[0x150 - 0x004];
76 STATIC_ASSERT(
sizeof(
KartDisp) == 0x150);
90 Outside_Drift_Kart = 0,
91 Outside_Drift_Bike = 1,
92 Inside_Drift_Bike = 2,
103 WeightClass weightClass;
107 f32 bumpDeviationLevel;
111 std::array<f32, 4> accelerationStandardA;
112 std::array<f32, 3> accelerationStandardT;
113 std::array<f32, 2> accelerationDriftA;
114 std::array<f32, 1> accelerationDriftT;
121 f32 driftOutsideTargetAngle;
122 f32 driftOutsideDecrement;
130 f32 maxNormalAcceleration;
134 STATIC_ASSERT(
sizeof(
Stats) == 0x18c);
148 KartParam(Character character, Vehicle vehicle, u8 playerIdx);
152 void setTireCount(
u16 tireCount) {
153 m_tireCount = tireCount;
156 void setSuspCount(u16 suspCount) {
157 m_suspCount = suspCount;
162 [[nodiscard]]
const BSP &bsp()
const {
166 [[nodiscard]]
const Stats &stats()
const {
170 [[nodiscard]]
const BikeDisp &bikeDisp()
const {
174 [[nodiscard]]
const KartDisp &kartDisp()
const {
179 [[nodiscard]]
const KartCameraParam &camera()
const {
183 [[nodiscard]] u8 playerIdx()
const {
187 [[nodiscard]]
bool isBike()
const {
191 [[nodiscard]]
bool isVehicleRelativeBike()
const {
195 [[nodiscard]] u16 suspCount()
const {
199 [[nodiscard]] u16 tireCount()
const {
205 void initStats(Character character, Vehicle vehicle);
206 void initBikeDispParams(Vehicle vehicle);
207 void initKartDispParams(Vehicle vehicle);
208 void initHitboxes(Vehicle vehicle);
209 void initCameraParams(Character character);
215 KartCameraParam m_camera;
A stream of data stored in memory.
Houses stats regarding a given character/vehicle combo.
Pertains to kart-related functionality.
Represents one of the many hitboxes that make up a vehicle.
EGG::Vector3f position
The relative position of the hitbox.
u16 enable
Specifies if this is an active hitbox (since BSP always has 16).
Info pertaining to the suspension, position, etc. of a wheel.
Houses hitbox and wheel positions, radii, and suspension info.
EGG::Vector3f cuboids[2]
Mask cuboids for computing moment of inertia.
u16 rumbleSpeed
Speed of the vehicle body's rumble animation.
std::array< Hitbox, 16 > hitboxes
Array of vehicle hitboxes, not all of which are active.
f32 rumbleHeight
Max vertical distance of the vehicle body's rumble animation.
Various character/vehicle-related handling and speed stats.
std::array< f32, 32 > kclSpeed
Speed multipliers, indexed using KCL attributes.
f32 speed
Base full speed of the character/vehicle combo.
void read(EGG::RamStream &stream)
Parses out the stats for a given KartParam.bin stream.
f32 driftReactivity
A weight applied to turn radius when drifting.
std::array< f32, 32 > kclRot
Rotation scalars, indexed using KCL attributes.
f32 weight
Contrary to popular belief, this does not affect gravity.
f32 driftManualTightness
Affects turn radius when manual drifting.
void applyCharacterBonus(EGG::RamStream &stream)
Applies character stats on top of the kart stats.
DriftType
The type of drift (inside/outside).
u32 miniTurbo
The framecount duration of a charged mini-turbo.
f32 driftAutomaticTightness
Affects turn radius when automatic drifting.
f32 handlingManualTightness
Affects turn radius when manual and not drifting.
Body
The body style of the vehicle. Basically the number of wheels.
@ Vehicle_Relative_Bike
Used by Quacker.
@ Three_Wheel_Kart
Used by Blue Falcon.
@ Handle_Relative_Bike
Used by most bikes.
@ Four_Wheel_Kart
Used by most karts.
f32 handlingAutomaticTightness
Affects turn radius when auto and not drifting.
f32 turningSpeed
Speed decrement percentage of the vehicle when handling.
f32 handlingReactivity
A weight applied to turn radius when not drifting.