00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef _CONTROL_H_
00019 #define _CONTROL_H_
00020
00021
00022
00023
00024
00025 #define CTRL_RANGE_MAX 127
00026
00027 #define CTRL_LEFT 1
00028 #define CTRL_RIGHT (1 << 1)
00029 #define CTRL_FWD (1 << 2)
00030 #define CTRL_BACK (1 << 3)
00031 #define CTRL_FIRE (1 << 4)
00032 #define CTRL_RESET (1 << 5)
00033 #define CTRL_SELWEAPON (1 << 14)
00034 #define CTRL_RESTART (1 << 15)
00035
00036 #define CTRL_LR (CTRL_LEFT | CTRL_RIGHT)
00037 #define CTRL_FB (CTRL_FWD | CTRL_BACK)
00038
00039
00040
00041
00042
00043 typedef struct CtrlStruct {
00044 signed char dx;
00045 signed char dy;
00046 unsigned short digital, idigital;
00047 } CTRL;
00048
00049
00050
00051
00052
00053 struct object_def;
00054
00055 extern void CON_DoPlayerControl(void);
00056 extern void CON_LocalCarControl(CTRL *Control, struct object_def *CarObj);
00057
00058 #endif