FS2_Open
Open source remastering of the Freespace 2 engine
keycontrol.h File Reference

Go to the source code of this file.

Classes

struct  button_info
 

Macros

#define NUM_BUTTON_FIELDS   ((CCFG_MAX + 31) / 32)
 

Typedefs

typedef struct button_info button_info
 

Functions

void button_info_set (button_info *bi, int n)
 
void button_info_unset (button_info *bi, int n)
 
int button_info_query (button_info *bi, int n)
 
void button_info_do (button_info *bi)
 
void button_info_clear (button_info *bi)
 
void process_set_of_keys (int key, int count, int *list)
 
void game_process_pause_key ()
 
void button_strip_noncritical_keys (button_info *bi)
 

Variables

int Dead_key_set []
 
int Dead_key_set_size
 
bool Perspective_locked
 
int Ignored_keys []
 
bool quit_mission_popup_shown
 

Macro Definition Documentation

#define NUM_BUTTON_FIELDS   ((CCFG_MAX + 31) / 32)

Definition at line 18 of file keycontrol.h.

Typedef Documentation

typedef struct button_info button_info

Function Documentation

void button_info_clear ( button_info bi)

Clear out the button_info struct

Definition at line 2892 of file keycontrol.cpp.

void button_info_do ( button_info bi)

Calls multiple event handlers for each active button

Parameters
bicurrently active buttons

Definition at line 2836 of file keycontrol.cpp.

int button_info_query ( button_info bi,
int  n 
)

Definition at line 2884 of file keycontrol.cpp.

void button_info_set ( button_info bi,
int  n 
)

Set the bit for the corresponding action n (BUTTON_ from KeyControl.h)

Definition at line 2861 of file keycontrol.cpp.

void button_info_unset ( button_info bi,
int  n 
)

Unset the bit for the corresponding action n (BUTTON_ from KeyControl.h)

Definition at line 2874 of file keycontrol.cpp.

void button_strip_noncritical_keys ( button_info bi)

Strip out all noncritical keys from the button_info struct

Definition at line 2904 of file keycontrol.cpp.

void game_process_pause_key ( )

Handle pause keypress

Definition at line 1470 of file keycontrol.cpp.

void process_set_of_keys ( int  key,
int  count,
int list 
)

Check keypress 'key' against a set of valid controls and mark the match in the player's button info bitfield. Also checks joystick controls in the set.

Parameters
keyScancode (plus modifiers).
countTotal size of the list
listList of Control_config struct action indices to check for

Definition at line 1368 of file keycontrol.cpp.

Variable Documentation

int Dead_key_set[]

Definition at line 336 of file keycontrol.cpp.

int Dead_key_set_size

Definition at line 475 of file keycontrol.cpp.

int Ignored_keys[]

Definition at line 471 of file keycontrol.cpp.

bool Perspective_locked

Definition at line 213 of file keycontrol.cpp.

bool quit_mission_popup_shown

Definition at line 214 of file keycontrol.cpp.