1 2 // automatically generated by m4 from headers in proto subdir 3 4 5 #ifndef __INPUT_H__ 6 #define __INPUT_H__ 7 8 #include <stdint.h> 9 10 ///////////////////////////////// 11 // CROSS-PLATFORM INPUT FUNCTIONS 12 ///////////////////////////////// 13 14 /////////// 15 // keyboard 16 /////////// 17 18 19 //////////// 20 // joysticks 21 //////////// 22 23 // user defined keys structure for simulated joystick 24 25 typedef struct udk_s 26 { 27 28 uint16_t fire; // scancode 29 uint16_t right; // scancode 30 uint16_t left; // scancode 31 uint16_t down; // scancode 32 uint16_t up; // scancode 33 34 } udk_t; 35 36 // masks for return values from joystick functions 37 38 #define IN_STICK_FIRE 0x80 39 #define IN_STICK_FIRE_1 0x80 40 #define IN_STICK_FIRE_2 0x40 41 #define IN_STICK_FIRE_3 0x20 42 43 #define IN_STICK_UP 0x01 44 #define IN_STICK_DOWN 0x02 45 #define IN_STICK_LEFT 0x04 46 #define IN_STICK_RIGHT 0x08 47 48 49 //////// 50 // mouse 51 //////// 52 53 // masks for return values from mouse functions 54 55 #define IN_MOUSE_BUTTON_LEFT 0x01 56 #define IN_MOUSE_BUTTON_RIGHT 0x02 57 #define IN_MOUSE_BUTTON_MIDDLE 0x04 58 59 #define IN_MOUSE_BUTTON_1 0x01 60 #define IN_MOUSE_BUTTON_2 0x02 61 #define IN_MOUSE_BUTTON_3 0x04 62 63 //////////////////////////////////// 64 // PLATFORM SPECIFIC INPUT FUNCTIONS 65 //////////////////////////////////// 66 67 #ifdef __BASIC 68 #include <input/input_basic.h> 69 #endif 70 71 #ifdef __CPM 72 #include <input/input_cpm.h> 73 #endif 74 75 #ifdef __HBIOS 76 #include <input/input_hbios.h> 77 #endif 78 79 #ifdef __SMS 80 #include <input/input_sms.h> 81 #endif 82 83 #ifndef __ZXNEXT 84 85 #ifdef __SPECTRUM 86 #include <input/input_zx.h> 87 #endif 88 89 #endif 90 91 #ifdef __ZXNEXT 92 #include <input/input_zxn.h> 93 #endif 94 95 #endif 96