summaryrefslogtreecommitdiff
path: root/Source/Pad.h
blob: 5b5fa1d25fbda53be13638c9247831753881f090 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
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__