3#include "game/kart/KartObjectProxy.hh"
4#include "game/kart/Status.hh"
30 void setCannonPointId(
u16 val) {
31 m_cannonPointId = val;
34 void setBoostRampType(s32 val) {
35 m_boostRampType = val;
38 void setJumpPadVariant(s32 val) {
39 m_jumpPadVariant = val;
42 void setHalfPipeInvisibilityTimer(s16 val) {
43 m_halfPipeInvisibilityTimer = val;
46 void setTrickableTimer(s16 val) {
47 m_trickableTimer = val;
52 [[nodiscard]]
bool isDrifting()
const {
56 [[nodiscard]]
u16 cannonPointId()
const {
57 return m_cannonPointId;
60 [[nodiscard]] s32 boostRampType()
const {
61 return m_boostRampType;
64 [[nodiscard]] s32 jumpPadVariant()
const {
65 return m_jumpPadVariant;
68 [[nodiscard]] f32 stickX()
const {
72 [[nodiscard]] f32 stickY()
const {
76 [[nodiscard]] u32 airtime()
const {
85 return m_softWallSpeed;
88 [[nodiscard]] f32 startBoostCharge()
const {
92 [[nodiscard]] s16 wallBonkTimer()
const {
96 [[nodiscard]] s16 trickableTimer()
const {
97 return m_trickableTimer;
100 [[nodiscard]]
Status &status() {
104 [[nodiscard]]
const Status &status()
const {
118 s32 m_jumpPadVariant;
119 s16 m_halfPipeInvisibilityTimer;
125 s16 m_trickableTimer;
constexpr bool onBit(Es... es) const
Checks if any of the corresponding bits for the provided enum values are on.
Base class for most kart-related objects.
Houses various flags and other variables to preserve the kart's state.
size_t m_startBoostIdx
Used to map m_startBoostCharge to a start boost duration.
void calcStartBoost()
STAGE 1 - Each frame, calculates the start boost charge.
s16 m_wallBonkTimer
2f counter that stunts your speed after hitting a wall.
void calcCollisions()
Each frame, checks for collision and saves relevant bit flags.
void calcHandleStartBoost()
On countdown end, calculates and applies our start boost charge.
f32 m_stickY
One of 15 discrete stick values from [-1.0, 1.0].
void handleStartBoost(size_t idx)
Applies the relevant start boost duration.
void calc()
Every frame, resets the input state and saves collision-related bit flags.
f32 m_stickX
One of 15 discrete stick values from [-1.0, 1.0].
f32 m_startBoostCharge
0-1 representation of start boost charge. Burnout if >0.95f.
void calcInput()
Each frame, read input and save related bit flags. Also handles start boosts.
void resetEjection()
Resets certain bitfields pertaining to ejections (reject road, half pipe zippers, etc....
Pertains to kart-related functionality.
@ DriftManual
Currently in a drift w/ manual.