A reimplementation of Mario Kart Wii's physics engine in C++
Loading...
Searching...
No Matches
Kinoko::Item::KartItem Class Reference

#include <KartItem.hh>

Description

State management for item usage.

Definition at line 13 of file KartItem.hh.

Inheritance diagram for Kinoko::Item::KartItem:

Public Member Functions

void init (size_t playerIdx)
void calc ()
 Calculates item activation based on the controller input state.
void clear ()
void activateMushroom ()
void useMushroom ()

Getters

ItemInventory & inventory ()
const ItemInventory & inventory () const

Private Types

enum class  eFlags {
  Lockout = 10 ,
  ItemButtonHold = 12 ,
  ItemButtonActivation = 14
}
typedef EGG::TBitFlag< u16, eFlags > Flags

Private Attributes

Flags m_flags
ItemInventory m_inventory

Additional Inherited Members

void setPos (const EGG::Vector3f &pos)
void setRot (const EGG::Quatf &q)
void setInertiaScale (const EGG::Vector3f &scale)
KartAction * action ()
const KartAction * action () const
KartBody * body ()
const KartBody * body () const
KartCollide * collide ()
const KartCollide * collide () const
CollisionGroup * collisionGroup ()
const CollisionGroup * collisionGroup () const
KartMove * move ()
const KartMove * move () const
KartHalfPipe * halfPipe ()
const KartHalfPipe * halfPipe () const
KartScale * kartScale ()
const KartScale * kartScale () const
KartJump * jump ()
const KartJump * jump () const
KartParam * param ()
const KartParam * param () const
const BSP & bsp () const
KartPhysics * physics ()
const KartPhysics * physics () const
KartDynamics * dynamics ()
const KartDynamics * dynamics () const
KartState * state ()
const KartState * state () const
KartSub * sub ()
const KartSub * sub () const
KartSuspension * suspension (u16 suspIdx)
const KartSuspension * suspension (u16 suspIdx) const
KartSuspensionPhysics * suspensionPhysics (u16 suspIdx)
const KartSuspensionPhysics * suspensionPhysics (u16 suspIdx) const
KartTire * tire (u16 tireIdx)
const KartTire * tire (u16 tireIdx) const
WheelPhysics * tirePhysics (u16 tireIdx)
const WheelPhysics * tirePhysics (u16 tireIdx) const
CollisionData & collisionData ()
const CollisionData & collisionData () const
CollisionData & collisionData (u16 tireIdx)
const CollisionData & collisionData (u16 tireIdx) const
const System::KPad * inputs () const
Render::KartModel * model ()
const Render::KartModel * model () const
Field::ObjectCollisionKart * objectCollisionKart ()
const Field::ObjectCollisionKart * objectCollisionKart () const
Field::BoxColUnit * boxColUnit ()
const Field::BoxColUnit * boxColUnit () const
const EGG::Vector3f & scale () const
const EGG::Matrix34f & pose () const
EGG::Vector3f bodyFront () const
 Returns the third column of the rotation matrix, which is the facing vector.
EGG::Vector3f bodyForward () const
 Returns the first column of the rotation matrix, which is the "right" direction.
EGG::Vector3f bodyUp () const
 Returns the second column of the rotation matrix, which is the "up" direction.
const EGG::Vector3f & componentXAxis () const
const EGG::Vector3f & componentYAxis () const
const EGG::Vector3f & componentZAxis () const
const EGG::Vector3f & pos () const
const EGG::Vector3f & prevPos () const
const EGG::Quatf & fullRot () const
const EGG::Vector3f & extVel () const
const EGG::Vector3f & intVel () const
const EGG::Vector3f & velocity () const
f32 speed () const
f32 acceleration () const
f32 softSpeedLimit () const
const EGG::Quatf & mainRot () const
const EGG::Vector3f & angVel2 () const
bool isBike () const
u16 suspCount () const
u16 tireCount () const
bool hasFloorCollision (const WheelPhysics *wheelPhysics) const
std::pair< EGG::Vector3f, EGG::Vector3f > getCannonPosRot ()
f32 speedRatio () const
f32 speedRatioCapped () const
bool isInRespawn () const
Field::KCLTypeMask wallKclType () const
u32 wallKclVariant () const
Status & status ()
const Status & status () const
const EGG::Vector3f & wheelPos (u16 idx) const
const EGG::Vector3f & wheelEdgePos (u16 idx) const
f32 cameraDistY () const
s32 hopStickX () const
KartParam::Stats::DriftType vehicleType () const
void apply (size_t idx)
static std::list< KartObjectProxy *, EGG::Allocator< KartObjectProxy * > > & proxyList ()

Member Typedef Documentation

◆ Flags

typedef EGG::TBitFlag<u16, eFlags> Kinoko::Item::KartItem::Flags
private

Definition at line 41 of file KartItem.hh.

Member Enumeration Documentation

◆ eFlags

enum class Kinoko::Item::KartItem::eFlags
strongprivate

Definition at line 36 of file KartItem.hh.

Constructor & Destructor Documentation

◆ KartItem()

Kinoko::Item::KartItem::KartItem ( )
0x8079754C

Definition at line 11 of file KartItem.cc.

◆ ~KartItem()

Kinoko::Item::KartItem::~KartItem ( )
default0x8079951C

Member Function Documentation

◆ activateMushroom()

void Kinoko::Item::KartItem::activateMushroom ( )
0x8079864C

Definition at line 70 of file KartItem.cc.

◆ calc()

void Kinoko::Item::KartItem::calc ( )
0x80797928

Calculates item activation based on the controller input state.

Definition at line 25 of file KartItem.cc.

◆ clear()

void Kinoko::Item::KartItem::clear ( )
0x80798848

Definition at line 63 of file KartItem.cc.

◆ init()

void Kinoko::Item::KartItem::init ( size_t playerIdx)
0x807976E0

Definition at line 19 of file KartItem.cc.

◆ inventory() [1/2]

ItemInventory & Kinoko::Item::KartItem::inventory ( )
inlinenodiscard

Definition at line 26 of file KartItem.hh.

◆ inventory() [2/2]

const ItemInventory & Kinoko::Item::KartItem::inventory ( ) const
inlinenodiscard

Definition at line 30 of file KartItem.hh.

◆ useMushroom()

void Kinoko::Item::KartItem::useMushroom ( )
0x807A9D3C

Definition at line 75 of file KartItem.cc.

Member Data Documentation

◆ m_flags

Flags Kinoko::Item::KartItem::m_flags
private

Definition at line 43 of file KartItem.hh.

◆ m_inventory

ItemInventory Kinoko::Item::KartItem::m_inventory
private

Definition at line 44 of file KartItem.hh.