coastline 0.0.4
Loading...
Searching...
No Matches
inputpoll.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  SdlRaceInputState
 Action and pause requests for one SDL input configuration. More...

Functions

unsigned ReadInputDevicesButtonMask (int *pnSteering, int *pnAcceleration)
 Poll input devices and translate active bindings into race or replay actions.
void ResetMouseState (void)
 Whether the respawn binding was pressed.
int InitializeJoystickDevice (void)
 Add a user of the game controller of dwInputDeviceType.
void ReleaseJoystickDevice (void)
 Drop a user of the game controller device.
void SetForceFeedbackLongDuration (void)
 Set the effects of force feedback to last 250 milliseconds, under the conditions of SetForceFeedbackDirection().
void SetForceFeedbackShortDuration (void)
 Set the effects of force feedback to last 125 milliseconds, under the conditions of SetForceFeedbackDirection().
void StartForceFeedbackJolt (void)
 Start the jolt of force feedback with the duration of g_dwForceFeedbackDuration and its direction, under the conditions of SetForceFeedbackDirection().
SdlRaceInputState * GetSdlRaceInputState (void)
int ReadSecondControllerPad (unsigned short *buttons, signed char *stickX, signed char *stickY)
 Read the second controller of the SDL game as the console reads a pad, for the second player of a race.

Function Documentation

◆ ReadInputDevicesButtonMask()

unsigned ReadInputDevicesButtonMask ( int * pnSteering,
int * pnAcceleration )

Poll input devices and translate active bindings into race or replay actions.

Parameters
pnSteeringReceives steering outside replay and early failure paths.
pnAccelerationReceives acceleration outside replay, pause, and early failure paths.
Returns
Action mask, also written to g_dwInputButtonMask.
Ghidra address:
BRD3D: 0x100773f0
Ghidra address:
BRGlide: 0x100706d0

◆ ResetMouseState()

void ResetMouseState ( void )

Whether the respawn binding was pressed.

Ghidra address:
BRD3D: 0x118abdcc
Ghidra address:
BRGlide: 0x118eeee4 Clear both states of the mouse.
Ghidra address:
BRD3D: 0x100770c0
Ghidra address:
BRGlide: 0x100703a0

◆ InitializeJoystickDevice()

int InitializeJoystickDevice ( void )

Add a user of the game controller of dwInputDeviceType.

The first user creates the device, exclusively with force feedback when it is on and available and shared otherwise, and sets the range of X and Y to -128 to 128 with no dead zone. A property that is not set releases the device.

Returns
dwInputDeviceType of g_GlobalRallyConfig, or 0 without a game controller.
Ghidra address:
BRD3D: 0x100791d0
Ghidra address:
BRGlide: 0x100724c0

◆ ReleaseJoystickDevice()

void ReleaseJoystickDevice ( void )

Drop a user of the game controller device.

The last user releases the effects of force feedback and the device. A count that falls below 0 is set back to 0.

Ghidra address:
BRD3D: 0x10079550
Ghidra address:
BRGlide: 0x10072840

◆ SetForceFeedbackLongDuration()

void SetForceFeedbackLongDuration ( void )

Set the effects of force feedback to last 250 milliseconds, under the conditions of SetForceFeedbackDirection().

Ghidra address:
BRD3D: 0x10078e50
Ghidra address:
BRGlide: 0x10072140

◆ SetForceFeedbackShortDuration()

void SetForceFeedbackShortDuration ( void )

Set the effects of force feedback to last 125 milliseconds, under the conditions of SetForceFeedbackDirection().

Ghidra address:
BRD3D: 0x10078e90
Ghidra address:
BRGlide: 0x10072180

◆ StartForceFeedbackJolt()

void StartForceFeedbackJolt ( void )

Start the jolt of force feedback with the duration of g_dwForceFeedbackDuration and its direction, under the conditions of SetForceFeedbackDirection().

Ghidra address:
BRD3D: 0x10078ed0
Ghidra address:
BRGlide: 0x100721c0

◆ GetSdlRaceInputState()

SdlRaceInputState * GetSdlRaceInputState ( void )
Returns
Action storage for the active SDL input configuration.

◆ ReadSecondControllerPad()

int ReadSecondControllerPad ( unsigned short * buttons,
signed char * stickX,
signed char * stickY )

Read the second controller of the SDL game as the console reads a pad, for the second player of a race.

Parameters
buttonsReceives the buttons down, in the bits of libultra.
stickXReceives the stick, right positive.
stickYReceives the stick, up positive.
Returns
Whether a device is bound to the second controller.