FS2_Open
Open source remastering of the Freespace 2 engine
missionhotkey.cpp File Reference
#include "freespace2/freespace.h"
#include "gamehelp/contexthelp.h"
#include "gamesequence/gamesequence.h"
#include "gamesnd/gamesnd.h"
#include "globalincs/alphacolors.h"
#include "globalincs/linklist.h"
#include "globalincs/pstypes.h"
#include "graphics/font.h"
#include "iff_defs/iff_defs.h"
#include "io/key.h"
#include "io/timer.h"
#include "mission/missionhotkey.h"
#include "missionui/missionscreencommon.h"
#include "object/object.h"
#include "parse/parselo.h"
#include "playerman/player.h"
#include "ship/ship.h"
#include "sound/audiostr.h"
#include "ui/ui.h"
#include "ui/uidefs.h"
#include "weapon/weapon.h"

Go to the source code of this file.

Classes

struct  HK_save_info
 
struct  hotkey_buttons
 

Macros

#define HOTKEY_SAVE_TIME   15000
 
#define HOTKEY_LINE_HEADING   1
 
#define HOTKEY_LINE_WING   2
 
#define HOTKEY_LINE_SHIP   3
 
#define HOTKEY_LINE_SUBSHIP   4
 
#define WING_FLAG   0x80000
 
#define MAX_LINES   200
 
#define NUM_BUTTONS   10
 
#define LIST_BUTTONS_MAX   50
 
#define SCROLL_UP_BUTTON   0
 
#define SCROLL_DOWN_BUTTON   1
 
#define CANCEL_BUTTON   2
 
#define CLEAR_BUTTON   3
 
#define RESET_BUTTON   4
 
#define ADD_HOTKEY_BUTTON   5
 
#define REMOVE_HOTKEY_BUTTON   6
 
#define HELP_BUTTON   7
 
#define OPTIONS_BUTTON   8
 
#define ACCEPT_BUTTON   9
 
#define HOTKEY_NUM_TEXT   6
 

Functions

int mission_hotkey_get_set_num (int k)
 
void mission_hotkey_maybe_restore ()
 
void mission_hotkey_set_defaults ()
 
void mission_hotkey_reset_saved ()
 
void mission_hotkey_maybe_save_sets ()
 
void mission_hotkey_mf_add (int set, int objnum, int how_to_add)
 
void mission_hotkey_validate ()
 
int get_wing_hotkeys (int n)
 
int hotkey_line_add (const char *text, int type, int index, int y)
 
int hotkey_line_insert (int n, char *text, int type, int index)
 
int hotkey_line_add_sorted (char *text, int type, int index, int start)
 
int hotkey_build_team_listing (int enemy_team_mask, int y, bool list_enemies)
 
void hotkey_build_listing ()
 
int hotkey_line_query_visible (int n)
 
void hotkey_scroll_screen_up ()
 
void hotkey_scroll_line_up ()
 
void hotkey_scroll_screen_down ()
 
void hotkey_scroll_line_down ()
 
void expand_wing ()
 
void reset_hotkeys ()
 
void clear_hotkeys ()
 
void save_hotkeys ()
 
void add_hotkey (int hotkey)
 
void remove_hotkey ()
 
void hotkey_button_pressed (int n)
 
void mission_hotkey_init ()
 
void mission_hotkey_close ()
 
void mission_hotkey_do_frame (float frametime)
 
void mission_hotkey_exit ()
 

Variables

HK_save_info Hotkey_saved_info [MAX_HOTKEY_TARGET_ITEMS]
 
int Num_hotkeys_saved
 
int Hotkey_overlay_id
 

Macro Definition Documentation

#define ACCEPT_BUTTON   9

Definition at line 121 of file missionhotkey.cpp.

#define ADD_HOTKEY_BUTTON   5

Definition at line 117 of file missionhotkey.cpp.

#define CANCEL_BUTTON   2

Definition at line 114 of file missionhotkey.cpp.

#define CLEAR_BUTTON   3

Definition at line 115 of file missionhotkey.cpp.

#define HELP_BUTTON   7

Definition at line 119 of file missionhotkey.cpp.

#define HOTKEY_LINE_HEADING   1

Definition at line 101 of file missionhotkey.cpp.

#define HOTKEY_LINE_SHIP   3

Definition at line 103 of file missionhotkey.cpp.

#define HOTKEY_LINE_SUBSHIP   4

Definition at line 104 of file missionhotkey.cpp.

#define HOTKEY_LINE_WING   2

Definition at line 102 of file missionhotkey.cpp.

#define HOTKEY_NUM_TEXT   6

Definition at line 238 of file missionhotkey.cpp.

#define HOTKEY_SAVE_TIME   15000

Definition at line 53 of file missionhotkey.cpp.

#define LIST_BUTTONS_MAX   50

Definition at line 110 of file missionhotkey.cpp.

#define MAX_LINES   200

Definition at line 108 of file missionhotkey.cpp.

#define NUM_BUTTONS   10

Definition at line 109 of file missionhotkey.cpp.

#define OPTIONS_BUTTON   8

Definition at line 120 of file missionhotkey.cpp.

#define REMOVE_HOTKEY_BUTTON   6

Definition at line 118 of file missionhotkey.cpp.

#define RESET_BUTTON   4

Definition at line 116 of file missionhotkey.cpp.

#define SCROLL_DOWN_BUTTON   1

Definition at line 113 of file missionhotkey.cpp.

#define SCROLL_UP_BUTTON   0

Definition at line 112 of file missionhotkey.cpp.

#define WING_FLAG   0x80000

Definition at line 106 of file missionhotkey.cpp.

Function Documentation

void add_hotkey ( int  hotkey)

Definition at line 829 of file missionhotkey.cpp.

void clear_hotkeys ( )

Definition at line 798 of file missionhotkey.cpp.

void expand_wing ( )

Definition at line 762 of file missionhotkey.cpp.

int get_wing_hotkeys ( int  n)

Definition at line 493 of file missionhotkey.cpp.

void hotkey_build_listing ( )

Definition at line 674 of file missionhotkey.cpp.

int hotkey_build_team_listing ( int  enemy_team_mask,
int  y,
bool  list_enemies 
)

Definition at line 566 of file missionhotkey.cpp.

void hotkey_button_pressed ( int  n)

Definition at line 859 of file missionhotkey.cpp.

int hotkey_line_add ( const char *  text,
int  type,
int  index,
int  y 
)

Definition at line 514 of file missionhotkey.cpp.

int hotkey_line_add_sorted ( char *  text,
int  type,
int  index,
int  start 
)

Definition at line 548 of file missionhotkey.cpp.

int hotkey_line_insert ( int  n,
char *  text,
int  type,
int  index 
)

Definition at line 527 of file missionhotkey.cpp.

int hotkey_line_query_visible ( int  n)

Definition at line 686 of file missionhotkey.cpp.

void hotkey_scroll_line_down ( )

Definition at line 745 of file missionhotkey.cpp.

void hotkey_scroll_line_up ( )

Definition at line 714 of file missionhotkey.cpp.

void hotkey_scroll_screen_down ( )

Definition at line 730 of file missionhotkey.cpp.

void hotkey_scroll_screen_up ( )

Definition at line 700 of file missionhotkey.cpp.

void mission_hotkey_close ( )

Definition at line 985 of file missionhotkey.cpp.

void mission_hotkey_do_frame ( float  frametime)

Definition at line 1008 of file missionhotkey.cpp.

void mission_hotkey_exit ( )

Definition at line 1276 of file missionhotkey.cpp.

int mission_hotkey_get_set_num ( int  k)

Definition at line 286 of file missionhotkey.cpp.

void mission_hotkey_init ( )

Definition at line 917 of file missionhotkey.cpp.

void mission_hotkey_maybe_restore ( )

Definition at line 301 of file missionhotkey.cpp.

void mission_hotkey_maybe_save_sets ( )

Definition at line 401 of file missionhotkey.cpp.

void mission_hotkey_mf_add ( int  set,
int  objnum,
int  how_to_add 
)

Definition at line 443 of file missionhotkey.cpp.

void mission_hotkey_reset_saved ( )

Definition at line 394 of file missionhotkey.cpp.

void mission_hotkey_set_defaults ( )

Definition at line 325 of file missionhotkey.cpp.

void mission_hotkey_validate ( )

Definition at line 454 of file missionhotkey.cpp.

void remove_hotkey ( )

Definition at line 844 of file missionhotkey.cpp.

void reset_hotkeys ( )

Definition at line 778 of file missionhotkey.cpp.

void save_hotkeys ( )

Definition at line 814 of file missionhotkey.cpp.

Variable Documentation

int Hotkey_overlay_id

Definition at line 279 of file missionhotkey.cpp.

Definition at line 60 of file missionhotkey.cpp.

Definition at line 265 of file missionhotkey.cpp.

const char* label

Definition at line 263 of file missionhotkey.cpp.

int Num_hotkeys_saved

Definition at line 61 of file missionhotkey.cpp.

Definition at line 264 of file missionhotkey.cpp.

int y

Definition at line 266 of file missionhotkey.cpp.