FS2_Open
Open source remastering of the Freespace 2 engine
|
#include "globalincs/pstypes.h"
#include "globalincs/globals.h"
#include "globalincs/linklist.h"
#include "io/key.h"
#include "io/joy.h"
#include "io/timer.h"
#include "ship/ship.h"
#include "playerman/player.h"
#include "weapon/weapon.h"
#include "hud/hud.h"
#include "gamesequence/gamesequence.h"
#include "mission/missiongoals.h"
#include "hud/hudets.h"
#include "gamesnd/gamesnd.h"
#include "hud/hudsquadmsg.h"
#include "gamesnd/eventmusic.h"
#include "freespace2/freespace.h"
#include "mission/missionhotkey.h"
#include "hud/hudescort.h"
#include "hud/hudshield.h"
#include "io/keycontrol.h"
#include "ship/shiphit.h"
#include "ship/shipfx.h"
#include "mission/missionlog.h"
#include "hud/hudtargetbox.h"
#include "popup/popup.h"
#include "object/objcollide.h"
#include "object/object.h"
#include "hud/hudconfig.h"
#include "hud/hudmessage.h"
#include "network/multi_pmsg.h"
#include "starfield/supernova.h"
#include "mission/missionmessage.h"
#include "menuui/mainhallmenu.h"
#include "missionui/missionpause.h"
#include "hud/hudgauges.h"
#include "species_defs/species_defs.h"
#include "asteroid/asteroid.h"
#include "iff_defs/iff_defs.h"
#include "network/multi.h"
#include "network/multiutil.h"
#include "network/multimsgs.h"
#include "network/multi_pause.h"
#include "network/multi_observer.h"
#include "network/multi_endgame.h"
#include "autopilot/autopilot.h"
#include "cmdline/cmdline.h"
#include "object/objectshield.h"
Go to the source code of this file.
Classes | |
class | factor_table |
struct | Cheat |
Macros | |
#define | MAX_TIME_MULTIPLIER 64 |
#define | MAX_TIME_DIVIDER 4 |
#define | CHEAT_BUFFER_LEN 17 |
#define | CHEATS_TABLE_LEN 6 |
Enumerations | |
enum | cheatCode { CHEAT_CODE_NONE = 0, CHEAT_CODE_FREESPACE, CHEAT_CODE_FISH, CHEAT_CODE_HEADZ, CHEAT_CODE_TOOLED, CHEAT_CODE_PIRATE, CHEAT_CODE_SKIP } |
Variables | |
factor_table | ftables |
char | CheatBuffer [CHEAT_BUFFER_LEN+1] |
int | Tool_enabled = 0 |
bool | Perspective_locked =false |
bool | quit_mission_popup_shown = false |
int | AI_watch_object |
int | Countermeasures_enabled |
int | Normal_key_set [] |
int | Dead_key_set [] |
int | Critical_key_set [] |
int | Non_critical_key_set [] |
int | Ignored_keys [CCFG_MAX] |
int | Normal_key_set_size = sizeof(Normal_key_set) / sizeof(int) |
int | Dead_key_set_size = sizeof(Dead_key_set) / sizeof(int) |
int | Critical_key_set_size = sizeof(Critical_key_set) / sizeof(int) |
int | Non_critical_key_set_size = sizeof(Non_critical_key_set) / sizeof(int) |
int | Framerate_delay |
vec3d | Eye_position |
matrix | Eye_matrix |
int | Show_cpu |
#define CHEAT_BUFFER_LEN 17 |
Definition at line 183 of file keycontrol.cpp.
#define CHEATS_TABLE_LEN 6 |
Definition at line 210 of file keycontrol.cpp.
#define MAX_TIME_DIVIDER 4 |
Definition at line 181 of file keycontrol.cpp.
#define MAX_TIME_MULTIPLIER 64 |
Definition at line 180 of file keycontrol.cpp.
enum cheatCode |
Enumerator | |
---|---|
CHEAT_CODE_NONE | |
CHEAT_CODE_FREESPACE | |
CHEAT_CODE_FISH | |
CHEAT_CODE_HEADZ | |
CHEAT_CODE_TOOLED | |
CHEAT_CODE_PIRATE | |
CHEAT_CODE_SKIP |
Definition at line 186 of file keycontrol.cpp.
Execute function corresponding to action n (BUTTON_ from KeyControl.h)
This switch handles the critical buttons
button_function_critical is also called from network
Assume the switches below will catch the key, if not, set to FALSE in default
Below, you must not use return in cases, else the check for invalid keys will fail
The key has been handled, return early before the timestamp is set
Update the last used timestamp of this key
All keys should have been handled above, if not panic
Definition at line 2218 of file keycontrol.cpp.
int button_function_critical | ( | int | n, |
net_player * | p = NULL |
||
) |
Definition at line 1724 of file keycontrol.cpp.
Execute function corresponding to action n Basically, these are actions which don't affect demo playback at all
n | Action number |
Definition at line 2063 of file keycontrol.cpp.
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
bi | currently 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.
Definition at line 607 of file keycontrol.cpp.
Definition at line 483 of file keycontrol.cpp.
Cycle targeted ship to next ship in that species
delta | Increment |
Definition at line 519 of file keycontrol.cpp.
Definition at line 581 of file keycontrol.cpp.
Definition at line 568 of file keycontrol.cpp.
float do_subobj_hit_stuff | ( | object * | ship_obj, |
object * | other_obj, | ||
vec3d * | hitpos, | ||
int | submodel_num, | ||
float | damage, | ||
bool * | hull_should_apply_armor | ||
) |
Definition at line 447 of file shiphit.cpp.
Set view from x,y,z, viewer matrix, and zoom. Must call one of g3_set_view_*()
Definition at line 152 of file 3dsetup.cpp.
void game_do_end_mission_popup | ( | ) |
Handler for when player hits 'ESC' during the game
Definition at line 1429 of file keycontrol.cpp.
Process cheat codes
Definition at line 1487 of file keycontrol.cpp.
void game_process_keys | ( | ) |
Definition at line 1612 of file keycontrol.cpp.
void game_process_pause_key | ( | ) |
Handle pause keypress
Definition at line 1470 of file keycontrol.cpp.
Definition at line 647 of file keycontrol.cpp.
Definition at line 630 of file keycontrol.cpp.
void hud_target_asteroid | ( | ) |
Definition at line 1441 of file asteroid.cpp.
bool key_is_targeting | ( | int | n | ) |
Definition at line 2190 of file keycontrol.cpp.
Definition at line 1370 of file missiongoals.cpp.
Definition at line 1287 of file keycontrol.cpp.
Definition at line 664 of file keycontrol.cpp.
Routine to process keys used for player ship stuff (not ship movement).
Definition at line 1380 of file keycontrol.cpp.
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.
key | Scancode (plus modifiers). |
count | Total size of the list |
list | List of Control_config struct action indices to check for |
Definition at line 1368 of file keycontrol.cpp.
int AI_watch_object |
Definition at line 199 of file aicode.cpp.
char CheatBuffer[CHEAT_BUFFER_LEN+1] |
Definition at line 184 of file keycontrol.cpp.
int Countermeasures_enabled |
Definition at line 23 of file cmeasure.cpp.
int Critical_key_set[] |
Definition at line 378 of file keycontrol.cpp.
int Critical_key_set_size = sizeof(Critical_key_set) / sizeof(int) |
Definition at line 476 of file keycontrol.cpp.
int Dead_key_set[] |
Definition at line 336 of file keycontrol.cpp.
int Dead_key_set_size = sizeof(Dead_key_set) / sizeof(int) |
Definition at line 475 of file keycontrol.cpp.
matrix Eye_matrix |
Definition at line 26 of file 3dsetup.cpp.
vec3d Eye_position |
Definition at line 27 of file 3dsetup.cpp.
int Framerate_delay |
Definition at line 187 of file fredstubs.cpp.
factor_table ftables |
Definition at line 171 of file keycontrol.cpp.
Definition at line 471 of file keycontrol.cpp.
int Non_critical_key_set[] |
Definition at line 399 of file keycontrol.cpp.
int Non_critical_key_set_size = sizeof(Non_critical_key_set) / sizeof(int) |
Definition at line 477 of file keycontrol.cpp.
int Normal_key_set[] |
Definition at line 223 of file keycontrol.cpp.
int Normal_key_set_size = sizeof(Normal_key_set) / sizeof(int) |
Definition at line 474 of file keycontrol.cpp.
bool Perspective_locked =false |
Definition at line 213 of file keycontrol.cpp.
bool quit_mission_popup_shown = false |
Definition at line 214 of file keycontrol.cpp.
int Tool_enabled = 0 |
Definition at line 212 of file keycontrol.cpp.