diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2017-07-21 00:09:35 +0200 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2017-07-21 00:09:35 +0200 |
| commit | 627de0d81f81ad60d26d782f2425be1e6f5a3dbc (patch) | |
| tree | 91ffa502aa62c03c2fecf28529ebc8c6b20828c5 /Source/Pad.h | |
| download | opensend-627de0d81f81ad60d26d782f2425be1e6f5a3dbc.tar.gz | |
+ First commit. It works painfully slow, but gets the job done. Still lots of room for improvement.
Diffstat (limited to 'Source/Pad.h')
| -rw-r--r-- | Source/Pad.h | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/Source/Pad.h b/Source/Pad.h new file mode 100644 index 0000000..5b5fa1d --- /dev/null +++ b/Source/Pad.h @@ -0,0 +1,62 @@ +#ifndef __PAD_HEADER__ +#define __PAD_HEADER__ + +/* ************************************* + * Includes + * *************************************/ + +#include "Global_Inc.h" +#include "System.h" +#include "GameStructures.h" + +/* ************************************* + * Defines + * *************************************/ + +#define PAD_ALWAYS_REPEAT 1 + +/* ************************************* + * Global prototypes + * *************************************/ + +void PadInit(void); +void PadClearData(void); + +bool PadOneConnected(void); + +bool PadOneAnyKeyPressed(void); +bool PadTwoAnyKeyPressed(void); + +bool PadOneKeyPressed(unsigned short key); +bool PadTwoKeyPressed(unsigned short key); + +bool PadOneKeyRepeat(unsigned short key, uint8_t time); +bool PadTwoKeyRepeat(unsigned short key, uint8_t time); + +bool PadOneKeyReleased(unsigned short key); +bool PadTwoKeyReleased(unsigned short key); + +bool PadOneKeySinglePress(unsigned short key); +bool PadTwoKeySinglePress(unsigned short key); + +unsigned short PadOneGetLastKeySinglePressed(void); +unsigned short PadTwoGetLastKeySinglePressed(void); + +bool PadOneDirectionKeyPressed(void); +bool PadTwoDirectionKeyPressed(void); + +bool PadOneDirectionKeyReleased(void); +bool PadTwoDirectionKeyReleased(void); + +bool UpdatePads(void); +bool PadOneIsVibrationEnabled(void); +bool PadTwoIsVibrationEnabled(void); + +bool PadAddCheat(TYPE_CHEAT * cheat); + +unsigned short* PadGetPlayerOneCheatArray(void); + +// Experimental (to be removed) +unsigned short* PadOneGetAddress(void); + +#endif //__PAD_HEADER__ |
