Open source remastering of the Freespace 2 engine
missionshipchoice.cpp File Reference

Go to the source code of this file.


struct  ss_icon_info
struct  ss_slot_info
struct  ss_wing_info
struct  ss_active_item
struct  ss_buttons
struct  ss_carry_icon_info


#define SS_ACTIVE_ITEM_USED   (1<<0)
#define NUM_SS_BUTTONS   4
#define SS_BUTTON_RESET   2
#define SS_BUTTON_DUMMY   3
#define SHIP_DESC_X   445
#define SHIP_DESC_Y   273


typedef struct ss_icon_info ss_icon_info
typedef struct ss_slot_info ss_slot_info
typedef struct ss_wing_info ss_wing_info
typedef struct ss_active_item ss_active_item
typedef struct ss_carry_icon_info ss_carry_icon_info


void draw_ship_icons ()
void draw_ship_icon_with_number (int screen_offset, int ship_class)
void start_ship_animation (int ship_class, int play_sound=0)
int pick_from_ship_list (int screen_offset, int ship_class)
void pick_from_wing (int wb_num, int ws_num)
void ship_select_button_do (int i)
void ship_select_common_init ()
void ss_reset_selected_ship ()
void ss_restore_loadout ()
void maybe_change_selected_wing_ship (int wb_num, int ws_num)
void ss_init_pool (team_data *pteam)
int create_wings ()
void ss_unload_all_icons ()
void ss_unload_all_anims ()
void ss_init_units ()
animss_load_individual_animation (int ship_class)
int ss_icon_being_carried ()
void ss_reset_carried_icon ()
void ss_set_carried_icon (int from_slot, int ship_class)
const char * ss_tooltip_handler (const char *str)
int ss_carried_icon_moved ()
void clear_active_list ()
ss_active_itemget_free_active_list_node ()
void active_list_add (int ship_class)
void active_list_remove (int ship_class)
void init_active_list ()
void ship_select_check_buttons ()
void ss_reset_to_default ()
void ship_select_redraw_pressed_buttons ()
void ship_select_buttons_init ()
void ship_select_init ()
int ss_get_ship_class_from_list (int index)
void maybe_pick_up_list_icon (int offset)
void maybe_change_selected_ship (int offset)
int do_mouse_over_wing_slot (int block, int slot)
void do_mouse_over_list_slot (int index)
void ss_maybe_drop_icon ()
void ss_maybe_flash_button ()
void ship_select_blit_ship_info ()
void ship_select_do (float frametime)
void ship_select_close ()
bool is_weapon_carried (int weapon_index)
void commit_pressed ()
void draw_wing_block (int wb_num, int hot_slot, int selected_slot, int class_select, bool ship_selection)
void ss_make_slot_empty (int slot_index)
void ss_make_slot_full (int slot_index)
void ss_blit_ship_icon (int x, int y, int ship_class, int bmap_num)
void unload_wing_icons ()
void update_player_ship (int si_index)
int create_default_player_ship (int use_last_flown)
int ss_return_original_ship_class (int slot_num)
int ss_return_saindex (int slot_num)
int ss_return_ship (int wing_block, int wing_slot, int *ship_index, p_object **ppobjp)
void ss_return_name (int wing_block, int wing_slot, char *name)
int ss_get_selected_ship ()
int ss_fixup_team_data (team_data *tdata)
void ss_load_icons (int ship_class)
void ss_load_all_icons ()
int ss_disabled_slot (int slot_num, bool ship_selection)
int ss_valid_slot (int slot_num)
void ss_clear_slots ()
void ss_clear_wings ()
void ss_init_wing_info (int wing_num, int starting_wing_num)
int ss_wing_slot_is_console_player (int index)
void ss_set_team_pointers (int team)
void ss_reset_team_pointers ()
void ship_select_init_team_data (int team_num)
void ship_select_common_close ()
void ss_synch_interface ()
int ss_swap_slot_slot (int from_slot, int to_slot, int *sound)
int ss_dump_to_list (int from_slot, int to_list, int *sound)
int ss_grab_from_list (int from_list, int to_slot, int *sound)
int ss_swap_list_slot (int from_list, int to_slot, int *sound)
void ss_apply (int mode, int from_slot, int from_list, int to_slot, int to_list, int player_index)
void ss_drop (int from_slot, int from_list, int to_slot, int to_list, int player_index)
void ss_recalc_multiplayer_slots ()


char default_player_ship [255]
int Select_default_ship = 0
int Ship_select_open = 0
int Commit_pressed
float ShipSelectScreenShipRot = 0.0f
int ShipSelectModelNum = -1
int anim_timer_start = 0
ss_wing_info Ss_wings_teams [MAX_TVT_TEAMS][MAX_WING_BLOCKS]
ss_wing_infoSs_wings = NULL
ss_icon_info Ss_icons_teams [MAX_TVT_TEAMS][MAX_SHIP_CLASSES]
ss_icon_infoSs_icons = NULL
int Ss_mouse_down_on_region = -1
int Selected_ss_class
int Hot_ss_icon
int Hot_ss_slot
UI_WINDOW Ship_select_ui_window
int Ship_select_overlay_id = -1
int Wing_icon_coords [GR_NUM_RESOLUTIONS][MAX_WSS_SLOTS][2]
int Ship_select_background_bitmap
float View_zoom
float Canv_h2
float Canv_w2
int Cmdline_nohtl
ss_carry_icon_info Carried_ss_icon
int Tech_ship_display_coords [GR_NUM_RESOLUTIONS][4]

Macro Definition Documentation


Definition at line 156 of file missionshipchoice.cpp.

#define NUM_SS_BUTTONS   4

Definition at line 246 of file missionshipchoice.cpp.


Definition at line 154 of file missionshipchoice.cpp.

#define SHIP_DESC_X   445

Definition at line 349 of file missionshipchoice.cpp.

#define SHIP_DESC_Y   273

Definition at line 350 of file missionshipchoice.cpp.


Definition at line 150 of file missionshipchoice.cpp.


Definition at line 279 of file missionshipchoice.cpp.


Definition at line 149 of file missionshipchoice.cpp.


Definition at line 147 of file missionshipchoice.cpp.


Definition at line 148 of file missionshipchoice.cpp.

#define SS_ACTIVE_ITEM_USED   (1<<0)

Definition at line 213 of file missionshipchoice.cpp.

#define SS_BUTTON_DUMMY   3

Definition at line 250 of file missionshipchoice.cpp.

#define SS_BUTTON_RESET   2

Definition at line 249 of file missionshipchoice.cpp.


Definition at line 248 of file missionshipchoice.cpp.


Definition at line 247 of file missionshipchoice.cpp.

Typedef Documentation

typedef struct ss_icon_info ss_icon_info
typedef struct ss_slot_info ss_slot_info
typedef struct ss_wing_info ss_wing_info

Function Documentation

void active_list_add ( int  ship_class)

Definition at line 467 of file missionshipchoice.cpp.

void active_list_remove ( int  ship_class)

Definition at line 478 of file missionshipchoice.cpp.

void clear_active_list ( )

Definition at line 436 of file missionshipchoice.cpp.

void commit_pressed ( )

Definition at line 1839 of file missionshipchoice.cpp.

int create_default_player_ship ( int  use_last_flown)

Definition at line 2479 of file missionshipchoice.cpp.

int create_wings ( )

Definition at line 2319 of file missionshipchoice.cpp.

void do_mouse_over_list_slot ( int  index)

Definition at line 873 of file missionshipchoice.cpp.

int do_mouse_over_wing_slot ( int  block,
int  slot 

Definition at line 843 of file missionshipchoice.cpp.

void draw_ship_icon_with_number ( int  screen_offset,
int  ship_class 

Definition at line 1636 of file missionshipchoice.cpp.

void draw_ship_icons ( )

Definition at line 1611 of file missionshipchoice.cpp.

void draw_wing_block ( int  wb_num,
int  hot_slot,
int  selected_slot,
int  class_select,
bool  ship_selection 

Definition at line 2061 of file missionshipchoice.cpp.

ss_active_item* get_free_active_list_node ( )

Definition at line 452 of file missionshipchoice.cpp.

void init_active_list ( )

Definition at line 497 of file missionshipchoice.cpp.

bool is_weapon_carried ( int  weapon_index)

Definition at line 1814 of file missionshipchoice.cpp.

void maybe_change_selected_ship ( int  offset)

Definition at line 798 of file missionshipchoice.cpp.

void maybe_change_selected_wing_ship ( int  wb_num,
int  ws_num 

Definition at line 822 of file missionshipchoice.cpp.

void maybe_pick_up_list_icon ( int  offset)

Definition at line 785 of file missionshipchoice.cpp.

int pick_from_ship_list ( int  screen_offset,
int  ship_class 

Definition at line 1952 of file missionshipchoice.cpp.

void pick_from_wing ( int  wb_num,
int  ws_num 

Definition at line 1985 of file missionshipchoice.cpp.

void ship_select_blit_ship_info ( )

Definition at line 918 of file missionshipchoice.cpp.

void ship_select_button_do ( int  i)

Definition at line 606 of file missionshipchoice.cpp.

void ship_select_buttons_init ( )

Definition at line 574 of file missionshipchoice.cpp.

void ship_select_check_buttons ( )

Definition at line 519 of file missionshipchoice.cpp.

void ship_select_close ( )

Definition at line 1559 of file missionshipchoice.cpp.

void ship_select_common_close ( )

Definition at line 3179 of file missionshipchoice.cpp.

void ship_select_common_init ( )

Definition at line 3153 of file missionshipchoice.cpp.

void ship_select_do ( float  frametime)

Definition at line 1266 of file missionshipchoice.cpp.

void ship_select_init ( )

Definition at line 645 of file missionshipchoice.cpp.

void ship_select_init_team_data ( int  team_num)

Definition at line 3116 of file missionshipchoice.cpp.

void ship_select_redraw_pressed_buttons ( )

Definition at line 559 of file missionshipchoice.cpp.

void ss_apply ( int  mode,
int  from_slot,
int  from_list,
int  to_slot,
int  to_list,
int  player_index 

Definition at line 3372 of file missionshipchoice.cpp.

void ss_blit_ship_icon ( int  x,
int  y,
int  ship_class,
int  bmap_num 

Definition at line 2256 of file missionshipchoice.cpp.

int ss_carried_icon_moved ( )

Definition at line 413 of file missionshipchoice.cpp.

void ss_clear_slots ( )

Definition at line 2884 of file missionshipchoice.cpp.

void ss_clear_wings ( )

Definition at line 2910 of file missionshipchoice.cpp.

int ss_disabled_slot ( int  slot_num,
bool  ship_selection 

Definition at line 2843 of file missionshipchoice.cpp.

void ss_drop ( int  from_slot,
int  from_list,
int  to_slot,
int  to_list,
int  player_index 

Definition at line 3412 of file missionshipchoice.cpp.

int ss_dump_to_list ( int  from_slot,
int  to_list,
int sound 

Definition at line 3255 of file missionshipchoice.cpp.

int ss_fixup_team_data ( team_data tdata)

Definition at line 2688 of file missionshipchoice.cpp.

int ss_get_selected_ship ( )

Definition at line 2640 of file missionshipchoice.cpp.

int ss_get_ship_class_from_list ( int  index)

Definition at line 755 of file missionshipchoice.cpp.

int ss_grab_from_list ( int  from_list,
int  to_slot,
int sound 

Definition at line 3288 of file missionshipchoice.cpp.

int ss_icon_being_carried ( )

Definition at line 396 of file missionshipchoice.cpp.

void ss_init_pool ( team_data pteam)

Definition at line 2769 of file missionshipchoice.cpp.

void ss_init_units ( )

Definition at line 2993 of file missionshipchoice.cpp.

void ss_init_wing_info ( int  wing_num,
int  starting_wing_num 

Definition at line 2924 of file missionshipchoice.cpp.

void ss_load_all_icons ( )

Definition at line 2822 of file missionshipchoice.cpp.

void ss_load_icons ( int  ship_class)

Definition at line 2789 of file missionshipchoice.cpp.

anim* ss_load_individual_animation ( int  ship_class)
void ss_make_slot_empty ( int  slot_index)

Definition at line 2213 of file missionshipchoice.cpp.

void ss_make_slot_full ( int  slot_index)

Definition at line 2235 of file missionshipchoice.cpp.

void ss_maybe_drop_icon ( )

Definition at line 886 of file missionshipchoice.cpp.

void ss_maybe_flash_button ( )

Definition at line 905 of file missionshipchoice.cpp.

void ss_recalc_multiplayer_slots ( )

Definition at line 3424 of file missionshipchoice.cpp.

void ss_reset_carried_icon ( )

Definition at line 406 of file missionshipchoice.cpp.

void ss_reset_selected_ship ( )

Definition at line 2646 of file missionshipchoice.cpp.

void ss_reset_team_pointers ( )

Definition at line 3104 of file missionshipchoice.cpp.

void ss_reset_to_default ( )

Definition at line 533 of file missionshipchoice.cpp.

void ss_restore_loadout ( )
void ss_return_name ( int  wing_block,
int  wing_slot,
char *  name 

Definition at line 2604 of file missionshipchoice.cpp.

int ss_return_original_ship_class ( int  slot_num)

Definition at line 2522 of file missionshipchoice.cpp.

int ss_return_saindex ( int  slot_num)

Definition at line 2535 of file missionshipchoice.cpp.

int ss_return_ship ( int  wing_block,
int  wing_slot,
int ship_index,
p_object **  ppobjp 

Definition at line 2567 of file missionshipchoice.cpp.

void ss_set_carried_icon ( int  from_slot,
int  ship_class 

Definition at line 426 of file missionshipchoice.cpp.

void ss_set_team_pointers ( int  team)

Definition at line 3095 of file missionshipchoice.cpp.

int ss_swap_list_slot ( int  from_list,
int  to_slot,
int sound 

Definition at line 3324 of file missionshipchoice.cpp.

int ss_swap_slot_slot ( int  from_slot,
int  to_slot,
int sound 

Definition at line 3219 of file missionshipchoice.cpp.

void ss_synch_interface ( )

Definition at line 3186 of file missionshipchoice.cpp.

const char* ss_tooltip_handler ( const char *  str)

Definition at line 352 of file missionshipchoice.cpp.

void ss_unload_all_anims ( )

Definition at line 1803 of file missionshipchoice.cpp.

void ss_unload_all_icons ( )

Definition at line 1590 of file missionshipchoice.cpp.

int ss_valid_slot ( int  slot_num)

Definition at line 2869 of file missionshipchoice.cpp.

int ss_wing_slot_is_console_player ( int  index)

Definition at line 2972 of file missionshipchoice.cpp.

void start_ship_animation ( int  ship_class,
int  play_sound = 0 

Definition at line 1724 of file missionshipchoice.cpp.

void unload_wing_icons ( )

Definition at line 2297 of file missionshipchoice.cpp.

void update_player_ship ( int  si_index)

Definition at line 2454 of file missionshipchoice.cpp.

Variable Documentation

int anim_timer_start = 0

Definition at line 77 of file missionshipchoice.cpp.

float Canv_h2

Definition at line 40 of file 3dsetup.cpp.

float Canv_w2

Definition at line 39 of file 3dsetup.cpp.

ss_carry_icon_info Carried_ss_icon

Definition at line 312 of file missionshipchoice.cpp.

int Cmdline_nohtl

Definition at line 438 of file cmdline.cpp.

int Commit_pressed

Definition at line 64 of file missionshipchoice.cpp.

char default_player_ship[255]

Definition at line 57 of file missionshipchoice.cpp.

int Hot_ss_icon

Definition at line 118 of file missionshipchoice.cpp.

int Hot_ss_slot

Definition at line 119 of file missionshipchoice.cpp.

int Select_default_ship = 0

Definition at line 58 of file missionshipchoice.cpp.

int Selected_ss_class

Definition at line 117 of file missionshipchoice.cpp.

Initial value:
= {

Definition at line 159 of file missionshipchoice.cpp.

int Ship_select_background_bitmap

Definition at line 241 of file missionshipchoice.cpp.

int Ship_select_open = 0

Definition at line 59 of file missionshipchoice.cpp.

int Ship_select_overlay_id = -1

Definition at line 126 of file missionshipchoice.cpp.

Initial value:
= {
{ "Reset", 1337, 580, 337, UI_XSTR_COLOR_GREEN, -1, &Ship_select_buttons[0][SS_BUTTON_RESET].button }
{ "Reset", 1337, 938, 546, UI_XSTR_COLOR_GREEN, -1, &Ship_select_buttons[1][SS_BUTTON_RESET].button }
Definition: ui.h:160

Definition at line 280 of file missionshipchoice.cpp.

UI_WINDOW Ship_select_ui_window

Definition at line 124 of file missionshipchoice.cpp.

int ShipSelectModelNum = -1

Definition at line 75 of file missionshipchoice.cpp.

float ShipSelectScreenShipRot = 0.0f

Definition at line 74 of file missionshipchoice.cpp.

ss_icon_info* Ss_icons = NULL

Definition at line 113 of file missionshipchoice.cpp.

Definition at line 112 of file missionshipchoice.cpp.

int Ss_mouse_down_on_region = -1

Definition at line 115 of file missionshipchoice.cpp.

ss_wing_info* Ss_wings = NULL

Definition at line 110 of file missionshipchoice.cpp.

Definition at line 109 of file missionshipchoice.cpp.

int Tech_ship_display_coords[GR_NUM_RESOLUTIONS][4]

Definition at line 102 of file techmenu.cpp.

float View_zoom

Definition at line 30 of file 3dsetup.cpp.

int Wing_icon_coords[GR_NUM_RESOLUTIONS][MAX_WSS_SLOTS][2]

Definition at line 175 of file missionshipchoice.cpp.