coastline 0.0.4
Loading...
Searching...
No Matches
PlayerInputState Struct Reference

The input of one player. More...

#include <playerinput.h>

Collaboration diagram for PlayerInputState:

Public Attributes

u32 buttons
u32 heldButtons
s32 repeatUp
s32 repeatDown
s32 repeatLeft
s32 repeatRight
f32 stickX
f32 stickY
f32 steering
s8 steeringInput
u8 controllerLayout
s32 controllerMissing
u8 * recordBuffers [INPUT_RECORDERS]
s32 recordPositions [INPUT_RECORDERS]
s32 recordLimits [INPUT_RECORDERS]
u8 * playbackBuffer
s32 playbackPosition
s32 playbackLimit
u16 history [INPUT_HISTORY_SIZE]
s32 historyIndex
s32 playerIndex
OSContPad * pad

Detailed Description

The input of one player.

Member Data Documentation

◆ buttons

u32 PlayerInputState::buttons

The buttons pressed and the race actions, as the INPUT_ bits.

◆ heldButtons

u32 PlayerInputState::heldButtons

The buttons TransferFlags() moved out of the input until they are released.

◆ repeatUp

s32 PlayerInputState::repeatUp

The milliseconds before the stick presses up again.

◆ repeatDown

s32 PlayerInputState::repeatDown

The milliseconds before the stick presses down again.

◆ repeatLeft

s32 PlayerInputState::repeatLeft

The milliseconds before the stick presses left again.

◆ repeatRight

s32 PlayerInputState::repeatRight

The milliseconds before the stick presses right again.

◆ stickX

f32 PlayerInputState::stickX

The horizontal position of the stick, from -1 to 1.

◆ stickY

f32 PlayerInputState::stickY

The vertical position of the stick, from -1 to 1.

◆ steering

f32 PlayerInputState::steering

The steering, from -1 to 1.

◆ steeringInput

s8 PlayerInputState::steeringInput

The steering as the stick, the pad, or the recording gives it.

◆ controllerLayout

u8 PlayerInputState::controllerLayout

The button layout of the race.

◆ controllerMissing

s32 PlayerInputState::controllerMissing

Set when the controller of the player does not respond.

◆ recordBuffers

u8* PlayerInputState::recordBuffers[INPUT_RECORDERS]

The buffers that record two bytes of input each frame, or NULL.

◆ recordPositions

s32 PlayerInputState::recordPositions[INPUT_RECORDERS]

The byte offset of the next frame of each recording.

◆ recordLimits

s32 PlayerInputState::recordLimits[INPUT_RECORDERS]

The size of each recording buffer, in bytes.

◆ playbackBuffer

u8* PlayerInputState::playbackBuffer

The recording that replaces the input, or NULL.

◆ playbackPosition

s32 PlayerInputState::playbackPosition

The byte offset of the next frame of the recording played.

◆ playbackLimit

s32 PlayerInputState::playbackLimit

The size of the recording played, in bytes.

◆ history

u16 PlayerInputState::history[INPUT_HISTORY_SIZE]

The last button changes, the newest at historyIndex.

◆ historyIndex

s32 PlayerInputState::historyIndex

The index of the newest button change, moving down as changes come.

◆ playerIndex

s32 PlayerInputState::playerIndex

The player of the input, from 0 to MAX_PLAYERS - 1.

◆ pad

OSContPad* PlayerInputState::pad

The pad the controller reads fill.


The documentation for this struct was generated from the following file: