PageRenderTime 23ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/source/pad.h

http://github.com/tenshou/fail0verflow2
C Header | 37 lines | 28 code | 9 blank | 0 comment | 0 complexity | 17ebe19f9c9d3abe9a49073dce7662bb MD5 | raw file
 1#ifndef PAD_H
 2#define PAD_H
 3
 4#include <io/pad.h>
 5
 6#define BUTTON_LEFT       32768
 7#define BUTTON_DOWN       16384
 8#define BUTTON_RIGHT      8192
 9#define BUTTON_UP         4096
10#define BUTTON_START      2048
11#define BUTTON_R3         1024
12#define BUTTON_L3         512
13#define BUTTON_SELECT     256
14            
15#define BUTTON_SQUARE     128
16#define BUTTON_CROSS      64
17#define BUTTON_CIRCLE     32
18#define BUTTON_TRIANGLE   16
19#define BUTTON_R1         8
20#define BUTTON_L1         4
21#define BUTTON_R2         2
22#define BUTTON_L2         1
23
24extern PadInfo padinfo;
25extern PadData paddata;
26
27extern unsigned new_pad; // new pad buttons pressed (only can see one time, when it change from 0 to 1)
28extern unsigned old_pad; // old pad buttons pressed (only can change when you release the button)
29
30extern int pad_alive; // if 1 paddata is valid
31
32extern int rumble1_on; // used for rumble
33extern int rumble2_on;
34
35unsigned ps3pad_read(); // read the first conected pad
36
37#endif