#include "flGlobal.h"
#include <stdio.h>
#include <stdlib.h>
#include <pspctrl.h>
Go to the source code of this file.
Functions | |
void | inputInit () |
Initializes the input system, this is called by flInitialize(). | |
u8 | inputCheck (u8 inInput) |
This returns the current state of a button. | |
bool | inputDown (u8 inInput) |
This returns a non-zero value if the button supplied by inInput is currently pressed. | |
void | inputPoll () |
This updates the input system, and should be called at least once every frame in which input is required. | |
void | inputLock (float inTime) |
This locks the input system for a small period so that button presses are ignored. | |
void | inputPauseFunc (u8 inInput, u8 inState, void(*inFunc)()) |
This function allows you to define a button, a state and a function to call, so that you can register a pause event, in retrospect callbacks would possibly be better. | |
Variables | |
u8 | inputStates [32] |
SceCtrlData | inputData [2] |
Timer * | inputTimer |
float | inputLockTime = 0 |
void(*) | inputPause () = NULL |
u8 | inputPauseButton = 0 |
u8 | inputPauseState = 0 |
u8 inputCheck | ( | u8 | inInput | ) |
This returns the current state of a button.
inInput | The number of the button whose state will be checked. |
Definition at line 34 of file flInput.c.
References inputLockTime, and inputStates.
bool inputDown | ( | u8 | inInput | ) |
This returns a non-zero value if the button supplied by inInput is currently pressed.
inInput | The number of the button whose to be checked. |
Definition at line 40 of file flInput.c.
References inputLockTime, and inputStates.
void inputInit | ( | ) |
Initializes the input system, this is called by flInitialize().
Definition at line 27 of file flInput.c.
References inputData, inputTimer, and timerCreate().
Referenced by flInitialize().
void inputLock | ( | float | inTime | ) |
This locks the input system for a small period so that button presses are ignored.
inTime | The amount of time in seconds that the system will be locked for. |
Definition at line 77 of file flInput.c.
References inputLockTime, inputTimer, and timerGetDeltaTime().
Referenced by debugCriticalErrorFrom(), debugDevWarningFrom(), debugErrorFrom(), debugWarningFrom(), and inputPoll().
void inputPauseFunc | ( | u8 | inInput, | |
u8 | inState, | |||
void(*)() | inFunc | |||
) |
This function allows you to define a button, a state and a function to call, so that you can register a pause event, in retrospect callbacks would possibly be better.
inInput | The number of the button that will be used for pausing. | |
inState | The state the button must be in for inFunc() to be called. | |
inFunc | A pointer to the pause function to be used. |
Definition at line 83 of file flInput.c.
References inputPause, inputPauseButton, and inputPauseState.
void inputPoll | ( | ) |
This updates the input system, and should be called at least once every frame in which input is required.
Definition at line 46 of file flInput.c.
References inputData, inputLock(), inputLockTime, inputPause, inputPauseButton, inputPauseState, inputStates, inputTimer, and timerGetDeltaTime().
SceCtrlData inputData[2] |
float inputLockTime = 0 |
Definition at line 21 of file flInput.c.
Referenced by inputCheck(), inputDown(), inputLock(), and inputPoll().
void(*) inputPause() = NULL |
u8 inputPauseButton = 0 |
u8 inputPauseState = 0 |
u8 inputStates[32] |