Subversion Repositories eduke32

Rev

Rev 4433 | Rev 4436 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4386 terminx 1
#include "function.h"
4433 terminx 2
#include "compat.h"
4386 terminx 3
 
4
#ifdef __cplusplus
5
extern "C"
6
{
7
#endif
8
 
4434 terminx 9
#define MENU_UP                  0x200
10
#define MENU_DOWN                0x201
11
#define MENU_LEFT                0x202
12
#define MENU_RIGHT               0x203
13
#define MENU_SELECT              0x204
14
#define MENU_BACK                0x205
4386 terminx 15
 
4434 terminx 16
#define BUTTONSET(x,value) (CONTROL_ButtonState |= ((uint64_t)value<<((uint64_t)(x))))
17
#define BUTTONCLEAR(x) (CONTROL_ButtonState &= ~((uint64_t)1<<((uint64_t)(x))))
4386 terminx 18
 
4434 terminx 19
#define PRECISIONSHOOTFACTOR    0.3f
4386 terminx 20
 
4434 terminx 21
typedef enum {
22
    READ_MENU,
23
    READ_WEAPONS,
24
    READ_AUTOMAP,
25
    READ_KEYBOARD,
26
    READ_RENDERER,
27
    READ_LASTWEAPON,
28
    READ_PAUSED
29
} portableread_t;
4386 terminx 30
 
4434 terminx 31
typedef struct
32
{
33
    int32_t crouchToggleState;
34
    int32_t lastWeapon;
4386 terminx 35
 
4434 terminx 36
    uint64_t functionSticky; //To let at least one tick
37
    uint64_t functionHeld;
4386 terminx 38
 
4434 terminx 39
    double pitch, yaw;
40
    float forwardmove, sidemove;
41
} droidinput_t;
4386 terminx 42
 
4434 terminx 43
int PortableKeyEvent(int state, int code, int unicode);
44
int PortableRead(portableread_t r);
45
 
46
void PortableAction(int state, int action);
47
 
48
void PortableMove(float fwd, float strafe);
49
void PortableLook(double yaw, double pitch);
50
void PortableCommand(const char * cmd);
51
 
52
void PortableInit(int argc, const char ** argv);
53
 
4386 terminx 54
#ifdef __cplusplus
55
}
56
#endif