1 /* 2 input.h 3 4 External (non-keyboard) input devices 5 6 Copyright (C) 1996-1997 Id Software, Inc. 7 8 This program is free software; you can redistribute it and/or 9 modify it under the terms of the GNU General Public License 10 as published by the Free Software Foundation; either version 2 11 of the License, or (at your option) any later version. 12 13 This program is distributed in the hope that it will be useful, 14 but WITHOUT ANY WARRANTY; without even the implied warranty of 15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 16 17 See the GNU General Public License for more details. 18 19 You should have received a copy of the GNU General Public License 20 along with this program; if not, write to: 21 22 Free Software Foundation, Inc. 23 59 Temple Place - Suite 330 24 Boston, MA 02111-1307, USA 25 26 */ 27 28 #ifndef __QF_input_h_ 29 #define __QF_input_h_ 30 31 #include "QF/keys.h" 32 33 typedef struct { 34 vec3_t angles; 35 vec3_t position; 36 } viewdelta_t; 37 38 extern viewdelta_t viewdelta; 39 40 #define freelook (in_mlook.state & 1 || in_freelook->int_val) 41 42 struct cvar_s; 43 44 void IN_Init (struct cbuf_s *cbuf); 45 void IN_Init_Cvars (void); 46 47 void IN_Shutdown (void); 48 49 void IN_ProcessEvents (void); 50 51 void IN_UpdateGrab (struct cvar_s *); 52 53 void IN_ClearStates (void); 54 55 void IN_Move (void); // FIXME: was cmduser_t? 56 // add additional movement on top of the keyboard move cmd 57 58 extern struct cvar_s *in_grab; 59 extern struct cvar_s *in_amp; 60 extern struct cvar_s *in_pre_amp; 61 extern struct cvar_s *m_filter; 62 extern struct cvar_s *in_mouse_accel; 63 extern struct cvar_s *in_freelook; 64 extern struct cvar_s *lookstrafe; 65 66 extern qboolean in_mouse_avail; 67 extern float in_mouse_x, in_mouse_y; 68 69 void IN_LL_Init_Cvars (void); 70 void IN_LL_Init (void); 71 void IN_LL_Shutdown (void); 72 void IN_LL_ProcessEvents (void); 73 void IN_LL_ClearStates (void); 74 void IN_LL_Grab_Input (int grab); 75 76 extern kbutton_t in_strafe, in_klook, in_speed, in_mlook; 77 78 #endif // __QF_input_h_ 79