From 5a7b7571f35758eea378f48565786ffe543b99a0 Mon Sep 17 00:00:00 2001 From: Jeff Teunissen Date: Sat, 19 May 2001 23:24:20 +0000 Subject: [PATCH] Misc. API header cleanups. --- include/QF/input.h | 27 +++++++++++++-------------- include/QF/joystick.h | 29 +++++++++++++++++------------ 2 files changed, 30 insertions(+), 26 deletions(-) diff --git a/include/QF/input.h b/include/QF/input.h index 9141d9d92..3d1c29672 100644 --- a/include/QF/input.h +++ b/include/QF/input.h @@ -26,17 +26,17 @@ $Id$ */ -#ifndef _INPUT_H -#define _INPUT_H +#ifndef __QF_input_h_ +#define __QF_input_h_ -#include "QF/cvar.h" +#include struct { vec3_t angles; vec3_t position; } viewdelta; -#define freelook (in_mlook.state&1 || in_freelook->int_val) +#define freelook (in_mlook.state & 1 || in_freelook->int_val) void IN_Init (void); void IN_Init_Cvars (void); @@ -63,15 +63,14 @@ extern cvar_t *in_freelook; extern cvar_t *sensitivity; extern cvar_t *lookstrafe; -extern qboolean in_mouse_avail; -extern float in_mouse_x, in_mouse_y; +extern qboolean in_mouse_avail; +extern float in_mouse_x, in_mouse_y; +void IN_LL_Init_Cvars (void); +void IN_LL_Init (void); +void IN_LL_Shutdown (void); +void IN_LL_Commands (void); +void IN_LL_SendKeyEvents (void); +void IN_LL_ClearStates (void); -void IN_LL_Init_Cvars (); -void IN_LL_Init (); -void IN_LL_Shutdown (); -void IN_LL_Commands (); -void IN_LL_SendKeyEvents (); -void IN_LL_ClearStates (); - -#endif // _INPUT_H +#endif // __QF_input_h_ diff --git a/include/QF/joystick.h b/include/QF/joystick.h index 83d84268f..f37da9599 100644 --- a/include/QF/joystick.h +++ b/include/QF/joystick.h @@ -26,26 +26,29 @@ $Id$ */ -#include "QF/qtypes.h" +#ifndef __QF_joystick_h_ +#define __QF_joystick_h_ + +#include #define JOY_MAX_AXES 6 #define JOY_MAX_BUTTONS 16 -extern struct cvar_s *joy_device; // Joystick device name -extern struct cvar_s *joy_enable; // Joystick enabling flag -extern struct cvar_s *joy_sensitivity; // Joystick sensitivity +extern struct cvar_s *joy_device; // Joystick device name +extern struct cvar_s *joy_enable; // Joystick enabling flag +extern struct cvar_s *joy_sensitivity; // Joystick sensitivity -extern qboolean joy_found; // Joystick present? -extern qboolean joy_active; // Joystick in use? +extern qboolean joy_found; // Joystick present? +extern qboolean joy_active; // Joystick in use? struct joy_axis { - struct cvar_s *axis; - int current; + struct cvar_s *axis; + int current; }; struct joy_button { - int old; - int current; + int old; + int current; }; extern struct joy_axis joy_axes[JOY_MAX_AXES]; @@ -98,7 +101,7 @@ void JOY_Shutdown (void); JOY_Open () JOY_Close () - os specific joystick init/deinit + OS-specific joystick init/deinit */ int JOY_Open (void); void JOY_Close (void); @@ -106,6 +109,8 @@ void JOY_Close (void); /* JOY_Read () - os specific joystick reading + OS-specific joystick reading */ void JOY_Read (void); + +#endif // __QF_joystick_h_