coastline 0.0.4
Loading...
Searching...
No Matches
peripheralinput.h File Reference
#include <PR/ultratypes.h>
#include "common/playerinput.h"
Include dependency graph for peripheralinput.h:

Go to the source code of this file.

Macros

#define RANDNET_KEY_CONTROL   0x1107
#define RANDNET_KEY_Z   0x0D08
#define RANDNET_KEY_LEFT_SHIFT   0x0E01
#define RANDNET_KEY_RIGHT_SHIFT   0x0E06

Functions

s32 ReadRandnetKeyboard (s32 port, u16 keys[3])
 Read three keys from the Randnet keyboard on a port, or clear its key history if absent.
s32 WasRandnetKeyDown (s32 port, u16 code)
 Check whether a key was down during the previous poll of a port.
void RememberRandnetKeys (s32 port, const u16 keys[3])
 Record the keys from the latest poll of a port.
s32 IsRandnetShiftDown (void)
 Check whether either Shift key is down on any Randnet keyboard.
void UpdateGameKeyboardInput (PlayerInputState *state)
 Merge keyboard controls into menus and races.
void UpdateN64PeripheralInputForPlayer (s32 player)
 Poll N64 peripherals for a player and merge their input.

Macro Definition Documentation

◆ RANDNET_KEY_CONTROL

#define RANDNET_KEY_CONTROL   0x1107

The Control key's matrix position.

◆ RANDNET_KEY_Z

#define RANDNET_KEY_Z   0x0D08

The Z key's matrix position.

◆ RANDNET_KEY_LEFT_SHIFT

#define RANDNET_KEY_LEFT_SHIFT   0x0E01

The left Shift key's matrix position.

◆ RANDNET_KEY_RIGHT_SHIFT

#define RANDNET_KEY_RIGHT_SHIFT   0x0E06

The right Shift key's matrix position.

Function Documentation

◆ ReadRandnetKeyboard()

s32 ReadRandnetKeyboard ( s32 port,
u16 keys[3] )

Read three keys from the Randnet keyboard on a port, or clear its key history if absent.

◆ WasRandnetKeyDown()

s32 WasRandnetKeyDown ( s32 port,
u16 code )

Check whether a key was down during the previous poll of a port.

◆ RememberRandnetKeys()

void RememberRandnetKeys ( s32 port,
const u16 keys[3] )

Record the keys from the latest poll of a port.

◆ IsRandnetShiftDown()

s32 IsRandnetShiftDown ( void )

Check whether either Shift key is down on any Randnet keyboard.

◆ UpdateGameKeyboardInput()

void UpdateGameKeyboardInput ( PlayerInputState * state)

Merge keyboard controls into menus and races.

◆ UpdateN64PeripheralInputForPlayer()

void UpdateN64PeripheralInputForPlayer ( s32 player)

Poll N64 peripherals for a player and merge their input.