coastline 0.0.4
Loading...
Searching...
No Matches
playerinput.h File Reference
#include "common/types.h"
#include <PR/os_cont.h>
Include dependency graph for playerinput.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  PlayerInputState
 The input of one player. More...

Macros

#define MAX_PLAYERS   4
 Number of input slots.
#define INPUT_HISTORY_SIZE   128
 The button changes a player's input remembers, for the cheat codes.
#define INPUT_RECORDERS   2
 The recordings of the input a player can make at once.

Typedefs

typedef struct PlayerInputState PlayerInputState
 The input of one player.

Functions

void ConsumeInputFlags (PlayerInputState *state)
 Drop from the input the held buttons that are still pressed, and forget the held buttons that are released.
void TransferFlags (PlayerInputState *state, s32 mask)
 Move buttons out of the input until they are released, for a single action per press.
void InitPlayerInputState (PlayerInputState *state)
 Reset the input of a player.

Variables

PlayerInputState g_aPlayerInputState [MAX_PLAYERS]
 Input state of every player.
OSContPad g_aContPadData [MAX_PLAYERS]
 Emulated controller pads for four ports, or every player slot on SDL.

Macro Definition Documentation

◆ MAX_PLAYERS

#define MAX_PLAYERS   4

Number of input slots.

◆ INPUT_HISTORY_SIZE

#define INPUT_HISTORY_SIZE   128

The button changes a player's input remembers, for the cheat codes.

◆ INPUT_RECORDERS

#define INPUT_RECORDERS   2

The recordings of the input a player can make at once.

Typedef Documentation

◆ PlayerInputState

typedef struct PlayerInputState PlayerInputState

The input of one player.

Function Documentation

◆ ConsumeInputFlags()

void ConsumeInputFlags ( PlayerInputState * state)

Drop from the input the held buttons that are still pressed, and forget the held buttons that are released.

Parameters
stateThe input of the player.
Ghidra address:
USA: 0x80255934
Ghidra address:
Asia: 0x80255484
Ghidra address:
EUR: 0x80256f04
Ghidra address:
JPN: 0x80256894

◆ TransferFlags()

void TransferFlags ( PlayerInputState * state,
s32 mask )

Move buttons out of the input until they are released, for a single action per press.

Parameters
stateThe input of the player.
maskThe buttons to move.
Ghidra address:
USA: 0x80255910
Ghidra address:
Asia: 0x80255460
Ghidra address:
EUR: 0x80256ee0
Ghidra address:
JPN: 0x80256870

◆ InitPlayerInputState()

void InitPlayerInputState ( PlayerInputState * state)

Reset the input of a player.

Parameters
stateThe input to reset.
Ghidra address:
USA: 0x80255b54
Ghidra address:
Asia: 0x802556A4
Ghidra address:
EUR: 0x80257124
Ghidra address:
JPN: 0x80256ab4

Variable Documentation

◆ g_aPlayerInputState

PlayerInputState g_aPlayerInputState[MAX_PLAYERS]
extern

Input state of every player.

Ghidra address:
USA: 0x8036a8e0
Ghidra address:
Asia: 0x8036A390
Ghidra address:
EUR: 0x8036cde0
Ghidra address:
JPN: 0x8036ba50
Ghidra address:
BRD3D: 0x106c6678
Ghidra address:
BRGlide: 0x106ed708

◆ g_aContPadData

OSContPad g_aContPadData[MAX_PLAYERS]
extern

Emulated controller pads for four ports, or every player slot on SDL.

Ghidra address:
USA: 0x8031a3e0
Ghidra address:
Asia: 0x80319E90
Ghidra address:
EUR: 0x8031c8e0
Ghidra address:
JPN: 0x8031b510
Ghidra address:
BRD3D: 0x106c65a0
Ghidra address:
BRGlide: 0x106ed630