Subversion Repositories eduke32

Rev

Rev 4434 | Rev 4439 | 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
 
4436 terminx 16
#define KEY_QUICK_CMD    0x1005
17
#define KEY_SHOW_KBRD    0x1008
18
#define KEY_SHOW_INVEN    0x1009
19
#define KEY_QUICK_SAVE    0x100A
20
#define KEY_QUICK_LOAD    0x100B
21
 
22
#define KEY_QUICK_KEY1    0x1011
23
#define KEY_QUICK_KEY2    0x1012
24
#define KEY_QUICK_KEY3    0x1013
25
#define KEY_QUICK_KEY4    0x1014
26
 
4434 terminx 27
#define BUTTONSET(x,value) (CONTROL_ButtonState |= ((uint64_t)value<<((uint64_t)(x))))
28
#define BUTTONCLEAR(x) (CONTROL_ButtonState &= ~((uint64_t)1<<((uint64_t)(x))))
4386 terminx 29
 
4436 terminx 30
#define PRECISIONSHOOTFACTOR        0.3f
4386 terminx 31
 
4436 terminx 32
// where do these numbers come from?
33
#define ANDROIDFORWARDMOVEFACTOR    5000
34
#define ANDROIDSIDEMOVEFACTOR       200
35
#define ANDROIDPITCHFACTOR          100000
36
#define ANDROIDYAWFACTOR            80000
37
 
38
#define MINCONTROLALPHA             0.25f
39
 
4434 terminx 40
typedef enum {
41
    READ_MENU,
42
    READ_WEAPONS,
43
    READ_AUTOMAP,
4436 terminx 44
    READ_MAPFOLLOWMODE,
4434 terminx 45
    READ_RENDERER,
46
    READ_LASTWEAPON,
47
    READ_PAUSED
48
} portableread_t;
4386 terminx 49
 
4434 terminx 50
typedef struct
51
{
52
    int32_t crouchToggleState;
53
    int32_t lastWeapon;
4386 terminx 54
 
4434 terminx 55
    uint64_t functionSticky; //To let at least one tick
56
    uint64_t functionHeld;
4386 terminx 57
 
4434 terminx 58
    double pitch, yaw;
59
    float forwardmove, sidemove;
60
} droidinput_t;
4386 terminx 61
 
4436 terminx 62
typedef struct  
63
{
64
    int32_t audio_sample_rate;
65
    int32_t audio_buffer_size;
66
    uint16_t screen_width, screen_height;
67
} droidsysinfo_t;
68
 
69
extern droidsysinfo_t droidinfo;
70
 
4434 terminx 71
int PortableKeyEvent(int state, int code, int unicode);
72
int PortableRead(portableread_t r);
73
 
74
void PortableAction(int state, int action);
75
 
76
void PortableMove(float fwd, float strafe);
77
void PortableLook(double yaw, double pitch);
78
void PortableCommand(const char * cmd);
79
 
80
void PortableInit(int argc, const char ** argv);
81
 
4386 terminx 82
#ifdef __cplusplus
83
}
84
#endif