DarkPlaces
Game engine based on the Quake 1 engine by id Software, developed by LadyHavoc
 
input.h File Reference

-- external (non-keyboard) input devices More...

#include "qtypes.h"
#include "cvar.h"
+ Include dependency graph for input.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  in_bestweapon_info_t
 

Macros

#define IN_BESTWEAPON_MAX   32
 

Functions

void IN_BestWeapon_ResetData (void)
 call before each map so QC can start from a clean state
 
void IN_Move (void)
 

Variables

in_bestweapon_info_t in_bestweapon_info [IN_BESTWEAPON_MAX]
 
qbool in_client_mouse
 
float in_mouse_x
 
float in_mouse_y
 
cvar_t in_pitch_max
 
cvar_t in_pitch_min
 
float in_windowmouse_x
 
float in_windowmouse_y
 

Detailed Description

-- external (non-keyboard) input devices

Definition in file input.h.

Macro Definition Documentation

◆ IN_BESTWEAPON_MAX

#define IN_BESTWEAPON_MAX   32

Definition at line 40 of file input.h.

Referenced by IN_BestWeapon_f(), and IN_BestWeapon_Register().

Function Documentation

◆ IN_BestWeapon_ResetData()

void IN_BestWeapon_ResetData ( void )

call before each map so QC can start from a clean state

Definition at line 226 of file cl_input.c.

227{
228 memset(in_bestweapon_info, 0, sizeof(in_bestweapon_info));
237 IN_BestWeapon_Register("9", 9, 128, 128, STAT_CELLS, 1); // generic energy weapon for mods
238 IN_BestWeapon_Register("p", 209, 128, 128, STAT_CELLS, 1); // dpmod plasma gun
239 IN_BestWeapon_Register("w", 210, 8388608, 8388608, STAT_CELLS, 1); // dpmod plasma wave cannon
240 IN_BestWeapon_Register("l", 225, HIT_LASER_CANNON, HIT_LASER_CANNON, STAT_CELLS, 1); // hipnotic laser cannon
241 IN_BestWeapon_Register("h", 226, HIT_MJOLNIR, HIT_MJOLNIR, STAT_CELLS, 0); // hipnotic mjolnir hammer
242}
in_bestweapon_info_t in_bestweapon_info[IN_BESTWEAPON_MAX]
Definition cl_input.c:201
static void IN_BestWeapon_Register(const char *name, int impulse, int weaponbit, int activeweaponcode, int ammostat, int ammomin)
Definition cl_input.c:203
#define STAT_SHELLS
Definition qstats.h:14
#define STAT_NAILS
Definition qstats.h:15
#define STAT_CELLS
Definition qstats.h:17
#define STAT_ROCKETS
Definition qstats.h:16
#define IT_LIGHTNING
Definition quakedef.h:44
#define IT_GRENADE_LAUNCHER
Definition quakedef.h:42
#define IT_AXE
Definition quakedef.h:50
#define IT_SHOTGUN
Definition quakedef.h:38
#define HIT_MJOLNIR
Definition quakedef.h:118
#define IT_SUPER_SHOTGUN
Definition quakedef.h:39
#define IT_NAILGUN
Definition quakedef.h:40
#define IT_ROCKET_LAUNCHER
Definition quakedef.h:43
#define IT_SUPER_NAILGUN
Definition quakedef.h:41
#define HIT_LASER_CANNON
Definition quakedef.h:119

References HIT_LASER_CANNON, HIT_MJOLNIR, in_bestweapon_info, IN_BestWeapon_Register(), IT_AXE, IT_GRENADE_LAUNCHER, IT_LIGHTNING, IT_NAILGUN, IT_ROCKET_LAUNCHER, IT_SHOTGUN, IT_SUPER_NAILGUN, IT_SUPER_SHOTGUN, STAT_CELLS, STAT_NAILS, STAT_ROCKETS, and STAT_SHELLS.

Referenced by CL_ClearState(), and IN_BestWeapon_Register_f().

◆ IN_Move()

Variable Documentation

◆ in_bestweapon_info

◆ in_client_mouse

qbool in_client_mouse
extern

◆ in_mouse_x

float in_mouse_x
extern

Definition at line 70 of file vid_shared.c.

Referenced by CL_Frame(), CL_Input(), IN_Move(), VM_CL_getmousepos(), and VM_M_getmousepos().

◆ in_mouse_y

float in_mouse_y

Definition at line 33 of file input.h.

Referenced by CL_Frame(), CL_Input(), IN_Move(), VM_CL_getmousepos(), and VM_M_getmousepos().

◆ in_pitch_max

cvar_t in_pitch_max
extern

Definition at line 399 of file cl_input.c.

399{CF_CLIENT, "in_pitch_max", "90", "how far you can aim downward (quake used 80)"};
#define CF_CLIENT
cvar/command that only the client can change/execute
Definition cmd.h:48

Referenced by CL_AdjustAngles(), and CL_InitInput().

◆ in_pitch_min

cvar_t in_pitch_min
extern

Definition at line 398 of file cl_input.c.

398{CF_CLIENT, "in_pitch_min", "-90", "how far you can aim upward (quake used -70)"};

Referenced by CL_AdjustAngles(), and CL_InitInput().

◆ in_windowmouse_x

◆ in_windowmouse_y