Subversion Repositories eduke32

Rev

Rev 4693 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4693 Rev 4989
Line 22... Line 22...
22
#define KEY_QUICK_KEY1    0x1011
22
#define KEY_QUICK_KEY1    0x1011
23
#define KEY_QUICK_KEY2    0x1012
23
#define KEY_QUICK_KEY2    0x1012
24
#define KEY_QUICK_KEY3    0x1013
24
#define KEY_QUICK_KEY3    0x1013
25
#define KEY_QUICK_KEY4    0x1014
25
#define KEY_QUICK_KEY4    0x1014
26
26
27
#define BUTTONSET(x,value) (CONTROL_ButtonState |= ((uint64_t)value<<((uint64_t)(x))))
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))))
28
// #define BUTTONCLEAR(x) (CONTROL_ButtonState &= ~((uint64_t)1<<((uint64_t)(x))))
29
29
30
#define PRECISIONSHOOTFACTOR        0.3f
30
#define PRECISIONSHOOTFACTOR        0.3f
31
31
32
// where do these numbers come from?
32
// where do these numbers come from?
33
#define ANDROIDFORWARDMOVEFACTOR    5000
33
#define ANDROIDFORWARDMOVEFACTOR    5000
Line 47... Line 47...
47
    READ_AUTOMAP,
47
    READ_AUTOMAP,
48
    READ_MAPFOLLOWMODE,
48
    READ_MAPFOLLOWMODE,
49
    READ_RENDERER,
49
    READ_RENDERER,
50
    READ_LASTWEAPON,
50
    READ_LASTWEAPON,
51
    READ_PAUSED,
51
    READ_PAUSED,
52
    READ_IS_DEAD
52
    READ_IS_DEAD,
-
 
53
    READ_INVENTORY,
-
 
54
    READ_SOMETHINGONPLAYER
53
} portableread_t;
55
} portableread_t;
54
56
55
57
56
typedef enum {
58
typedef enum {
57
    TOUCH_SCREEN_BLANK, //Nothing on screen (not used)
59
    TOUCH_SCREEN_BLANK, //Nothing on screen (not used)
Line 66... Line 68...
66
68
67
typedef struct
69
typedef struct
68
{
70
{
69
    int32_t crouchToggleState;
71
    int32_t crouchToggleState;
70
    int32_t lastWeapon;
72
    int32_t lastWeapon;
-
 
73
    int32_t toggleCrouch;
-
 
74
    int32_t quickSelectWeapon;
71
75
72
    uint64_t functionSticky; //To let at least one tick
76
    uint64_t functionSticky; //To let at least one tick
73
    uint64_t functionHeld;
77
    uint64_t functionHeld;
74
78
75
    int32_t left_double_action;
79
    int32_t left_double_action;
76
    int32_t right_double_action;
80
    int32_t right_double_action;
77
81
-
 
82
    int32_t invertLook, hideStick;
-
 
83
78
    double pitch, yaw;
84
    double pitch, yaw;
79
    double pitch_joystick, yaw_joystick;
85
    double pitch_joystick, yaw_joystick;
80
    float forwardmove, sidemove;
86
    float forwardmove, sidemove;
81
87
82
    // set by configuration UI
88
    // set by configuration UI
83
    float strafe_sens, forward_sens;
89
    float strafe_sens, forward_sens;
84
    float pitch_sens, yaw_sens;
90
    float pitch_sens, yaw_sens;
-
 
91
-
 
92
    float gameControlsAlpha;
85
} droidinput_t;
93
} droidinput_t;
86
94
87
typedef struct  
95
typedef struct  
88
{
96
{
89
    int32_t audio_sample_rate;
97
    int32_t audio_sample_rate;
Line 91... Line 99...
91
    uint16_t screen_width, screen_height;
99
    uint16_t screen_width, screen_height;
92
} droidsysinfo_t;
100
} droidsysinfo_t;
93
101
94
extern droidinput_t droidinput;
102
extern droidinput_t droidinput;
95
extern droidsysinfo_t droidinfo;
103
extern droidsysinfo_t droidinfo;
96
extern char toggleCrouch;
-
 
97
-
 
98
104
99
105
100
int PortableKeyEvent(int state, int code, int unicode);
106
int PortableKeyEvent(int state, int code, int unicode);
101
int PortableRead(portableread_t r);
107
int PortableRead(portableread_t r);
102
108
103
void PortableAction(int state, int action);
109
void PortableAction(int state, int action);
104
110
-
 
111
void PortableMouseMenu(float x,float y);
-
 
112
void PortableMouseMenuButton(int state,int button);
-
 
113
105
void PortableMove(float fwd, float strafe);
114
void PortableMove(float fwd, float strafe);
106
void PortableLook(double yaw, double pitch);
115
void PortableLook(double yaw, double pitch);
107
void PortableLookJoystick(double yaw, double pitch);
116
void PortableLookJoystick(double yaw, double pitch);
108
void PortableCommand(const char * cmd);
117
void PortableCommand(const char * cmd);
109
118