2014-03-22 09:25:51 +00:00
|
|
|
#include "function.h"
|
2014-04-12 08:45:50 +00:00
|
|
|
#include "compat.h"
|
2014-03-22 09:25:51 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C"
|
|
|
|
{
|
|
|
|
#endif
|
|
|
|
|
2014-04-12 22:10:36 +00:00
|
|
|
#define MENU_UP 0x200
|
|
|
|
#define MENU_DOWN 0x201
|
|
|
|
#define MENU_LEFT 0x202
|
|
|
|
#define MENU_RIGHT 0x203
|
|
|
|
#define MENU_SELECT 0x204
|
|
|
|
#define MENU_BACK 0x205
|
|
|
|
|
|
|
|
#define BUTTONSET(x,value) (CONTROL_ButtonState |= ((uint64_t)value<<((uint64_t)(x))))
|
|
|
|
#define BUTTONCLEAR(x) (CONTROL_ButtonState &= ~((uint64_t)1<<((uint64_t)(x))))
|
|
|
|
|
|
|
|
#define PRECISIONSHOOTFACTOR 0.3f
|
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
READ_MENU,
|
|
|
|
READ_WEAPONS,
|
|
|
|
READ_AUTOMAP,
|
|
|
|
READ_KEYBOARD,
|
|
|
|
READ_RENDERER,
|
|
|
|
READ_LASTWEAPON,
|
|
|
|
READ_PAUSED
|
|
|
|
} portableread_t;
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
int32_t crouchToggleState;
|
|
|
|
int32_t lastWeapon;
|
|
|
|
|
|
|
|
uint64_t functionSticky; //To let at least one tick
|
|
|
|
uint64_t functionHeld;
|
|
|
|
|
|
|
|
double pitch, yaw;
|
|
|
|
float forwardmove, sidemove;
|
|
|
|
} droidinput_t;
|
|
|
|
|
|
|
|
int PortableKeyEvent(int state, int code, int unicode);
|
|
|
|
int PortableRead(portableread_t r);
|
|
|
|
|
|
|
|
void PortableAction(int state, int action);
|
|
|
|
|
|
|
|
void PortableMove(float fwd, float strafe);
|
|
|
|
void PortableLook(double yaw, double pitch);
|
|
|
|
void PortableCommand(const char * cmd);
|
|
|
|
|
|
|
|
void PortableInit(int argc, const char ** argv);
|
2014-03-22 09:25:51 +00:00
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|