Spinout functions (#762)

* Document steering

* Refer to steering position, instead of steering angle

Refer to steering position instead of steering angle, to make clear that it is not the same thing as degrees.

* Change comment to block format

* Pre-spinout swerving

When you sharply move a joystick in 150CC or hit a banana, you can enter a pre-spinout state where you swerve back and forth.

This primarily documents how the swerving works, as well as updating some related function / property names
This commit is contained in:
Jed Grabman
2026-04-15 21:38:48 -04:00
committed by GitHub
parent c68b3d481f
commit bb8d234152
8 changed files with 123 additions and 113 deletions
+5 -5
View File
@@ -273,7 +273,7 @@ typedef struct {
/* 0x0064 */ Vec3f unk_064;
/* 0x0070 */ f32 boundingBoxSize;
/* 0x0074 */ f32 unk_074;
/* 0x0078 */ s16 unk_078;
/* 0x0078 */ s16 unk_078; // One source of angular velocity (turning / swerving)
/* 0x007A */ s16 unk_07A;
/* 0x007C */ s32 steerPosition; // Where the kart is steering, related to joystick position. Basically, in [-53 to 53], but shifted 16 bits left
/* 0x0080 */ f32 boostPower;
@@ -288,13 +288,13 @@ typedef struct {
/* 0x00A4 */ f32 unk_0A4;
/* 0x00A8 */ s16 unk_0A8;
/* 0x00AA */ s16 unk_0AA;
/* 0x00AC */ s16 unk_0AC;
/* 0x00AE */ s16 unk_0AE;
/* 0x00AC */ s16 swerveDirection;
/* 0x00AE */ s16 unk_0AE; // preserved rotation velocity? To restore after effects wear off
/* 0x00B0 */ s16 unk_0B0;
/* 0x00B2 */ s16 unk_0B2;
/* 0x00B4 */ u16 unk_0B4;
/* 0x00B4 */ u16 swerveTimer;
/* 0x00B6 */ u16 kartGraphics;
/* 0x00B8 */ f32 unk_0B8;
/* 0x00B8 */ f32 swerveAccelInit;
/* 0x00BC */ u32 effects;
/* 0x00C0 */ s16 unk_0C0;
/* 0x00C2 */ s16 unk_0C2;