Open source remastering of the Freespace 2 engine
missionscreencommon.h File Reference
#include "globalincs/globals.h"
#include "model/model.h"
#include "ui/ui.h"

Go to the source code of this file.


struct  brief_common_buttons
struct  wss_unit
struct  loadout_data


#define REVOLUTION_RATE   5.2f
#define COMMON_SS_REGION   1
#define MAX_WING_SLOTS   4
#define MAX_WING_BLOCKS   3
#define WING_SLOT_FILLED   (1<<0)
#define WING_SLOT_EMPTY   (1<<1)
#define WING_SLOT_IS_PLAYER   (1<<3)
#define WING_SLOT_LOCKED   (1<<4)
#define WSS_DUMP_TO_LIST   0
#define WSS_GRAB_FROM_LIST   1
#define WSS_SWAP_SLOT_SLOT   2
#define WSS_SWAP_LIST_SLOT   3
#define NUM_ICON_FRAMES   6
#define ICON_FRAME_HOT   1


typedef struct wss_unit wss_unit
typedef struct loadout_data loadout_data


void common_button_do (int i)
void common_select_init ()
int common_select_do (float frametime)
void common_select_close ()
void common_draw_buttons ()
void common_check_buttons ()
void common_check_keys (int k)
void commit_pressed ()
void common_render (float frametime)
void common_buttons_init (UI_WINDOW *ui_window)
void common_buttons_maybe_reload (UI_WINDOW *ui_window)
void common_render_selected_screen_button ()
void common_reset_buttons ()
void common_redraw_pressed_buttons ()
void common_maybe_clear_focus ()
void ship_select_common_init ()
int mission_ui_background_load (const char *custom_background, const char *single_background, const char *multi_background=NULL)
void common_set_interface_palette (char *filename=NULL)
void common_free_interface_palette ()
void load_wing_icons (char *filename)
void unload_wing_icons ()
void common_flash_button_init ()
int common_flash_bright ()
void common_render_chat_window ()
void multi_chat_scroll_up ()
void multi_chat_scroll_down ()
void set_active_ui (UI_WINDOW *ui_window)
void common_music_init (int score_index)
void common_music_do ()
void common_music_close ()
int common_num_cutscenes_valid (int movie_type)
void common_maybe_play_cutscene (int movie_type, bool restart_music=false, int music=0)
int common_scroll_down_pressed (int *start, int size, int max_show)
int common_scroll_up_pressed (int *start, int size, int max_show)
void wss_save_loadout ()
void wss_maybe_restore_loadout ()
void wss_direct_restore_loadout ()
int wss_get_mode (int from_slot, int from_list, int to_slot, int to_list, int wl_ship_slot)
int store_wss_data (ubyte *block, int max_size, int sound, int player_index)
int restore_wss_data (ubyte *block)
void draw_model_icon (int model_id, int flags, float closeup_zoom, int x1, int x2, int y1, int y2, const ship_info *sip=NULL, int resize_mode=GR_RESIZE_FULL, const vec3d *closeup_pos=&vmd_zero_vector)
void draw_model_rotating (model_render_params *render_info, int model_id, int x1, int y1, int x2, int y2, float *rotation_buffer, vec3d *closeup_pos=NULL, float closeup_zoom=.65f, float rev_rate=REVOLUTION_RATE, int flags=MR_AUTOCENTER|MR_NO_FOGGING, int resize_mode=GR_RESIZE_FULL, int effect=2)
void common_set_team_pointers (int team)
void common_reset_team_pointers ()


brief_common_buttons Common_buttons [3][GR_NUM_RESOLUTIONS][NUM_COMMON_BUTTONS]
int Background_playing
int Common_select_inited
int Current_screen
int Common_team
int Drop_icon_mflag
int Drop_on_wing_mflag
int Brief_mouse_up_flag
int Mouse_down_last_frame
int Wing_slot_empty_bitmap
int Wing_slot_disabled_bitmap
int Flash_timer
int Flash_toggle
int Flash_bright
color Icon_colors [NUM_ICON_FRAMES]
shader Icon_shaders [NUM_ICON_FRAMES]
wss_unit Wss_slots_teams [MAX_TVT_TEAMS][MAX_WSS_SLOTS]
int Wss_num_wings
int Wss_num_wings_teams [MAX_TVT_TEAMS]
loadout_data Player_loadout

Macro Definition Documentation


Definition at line 19 of file missionscreencommon.h.


Definition at line 20 of file missionscreencommon.h.


Definition at line 27 of file missionscreencommon.h.


Definition at line 30 of file missionscreencommon.h.


Definition at line 31 of file missionscreencommon.h.


Definition at line 32 of file missionscreencommon.h.

#define COMMON_SS_REGION   1

Definition at line 28 of file missionscreencommon.h.


Definition at line 29 of file missionscreencommon.h.


Definition at line 151 of file missionscreencommon.h.


Definition at line 152 of file missionscreencommon.h.

#define ICON_FRAME_HOT   1

Definition at line 148 of file missionscreencommon.h.


Definition at line 147 of file missionscreencommon.h.


Definition at line 150 of file missionscreencommon.h.


Definition at line 149 of file missionscreencommon.h.

#define MAX_WING_BLOCKS   3

Definition at line 125 of file missionscreencommon.h.

#define MAX_WING_SLOTS   4

Definition at line 124 of file missionscreencommon.h.


Definition at line 126 of file missionscreencommon.h.


Definition at line 35 of file missionscreencommon.h.


Definition at line 33 of file missionscreencommon.h.

#define NUM_ICON_FRAMES   6

Definition at line 146 of file missionscreencommon.h.

#define REVOLUTION_RATE   5.2f

Definition at line 25 of file missionscreencommon.h.


Definition at line 135 of file missionscreencommon.h.

#define WING_SLOT_EMPTY   (1<<1)

Definition at line 129 of file missionscreencommon.h.

#define WING_SLOT_FILLED   (1<<0)

Definition at line 128 of file missionscreencommon.h.


Definition at line 136 of file missionscreencommon.h.


Definition at line 137 of file missionscreencommon.h.

#define WING_SLOT_IS_PLAYER   (1<<3)

Definition at line 130 of file missionscreencommon.h.

#define WING_SLOT_LOCKED   (1<<4)

Definition at line 131 of file missionscreencommon.h.


Definition at line 132 of file missionscreencommon.h.


Definition at line 133 of file missionscreencommon.h.

#define WSS_DUMP_TO_LIST   0

Definition at line 140 of file missionscreencommon.h.

#define WSS_GRAB_FROM_LIST   1

Definition at line 141 of file missionscreencommon.h.

#define WSS_SWAP_LIST_SLOT   3

Definition at line 143 of file missionscreencommon.h.

#define WSS_SWAP_SLOT_SLOT   2

Definition at line 142 of file missionscreencommon.h.

Typedef Documentation

typedef struct loadout_data loadout_data
typedef struct wss_unit wss_unit

Function Documentation

void commit_pressed ( )

Definition at line 1839 of file missionshipchoice.cpp.

void common_button_do ( int  i)

Definition at line 746 of file missionscreencommon.cpp.

void common_buttons_init ( UI_WINDOW ui_window)

Definition at line 248 of file missionscreencommon.cpp.

void common_buttons_maybe_reload ( UI_WINDOW ui_window)

Definition at line 237 of file missionscreencommon.cpp.

void common_check_buttons ( )

Definition at line 195 of file missionscreencommon.cpp.

void common_check_keys ( int  k)

Definition at line 797 of file missionscreencommon.cpp.

void common_draw_buttons ( )
int common_flash_bright ( )

Definition at line 460 of file missionscreencommon.cpp.

void common_flash_button_init ( )

Definition at line 452 of file missionscreencommon.cpp.

void common_free_interface_palette ( )

Definition at line 439 of file missionscreencommon.cpp.

void common_maybe_clear_focus ( )
void common_maybe_play_cutscene ( int  movie_type,
bool  restart_music = false,
int  music = 0 

Definition at line 380 of file missionscreencommon.cpp.

void common_music_close ( )

Definition at line 351 of file missionscreencommon.cpp.

void common_music_do ( )

Definition at line 338 of file missionscreencommon.cpp.

void common_music_init ( int  score_index)

Definition at line 313 of file missionscreencommon.cpp.

int common_num_cutscenes_valid ( int  movie_type)

Definition at line 363 of file missionscreencommon.cpp.

void common_redraw_pressed_buttons ( )

Definition at line 224 of file missionscreencommon.cpp.

void common_render ( float  frametime)

Definition at line 720 of file missionscreencommon.cpp.

void common_render_chat_window ( )
void common_render_selected_screen_button ( )

Definition at line 738 of file missionscreencommon.cpp.

void common_reset_buttons ( )

Definition at line 580 of file missionscreencommon.cpp.

void common_reset_team_pointers ( )

Definition at line 486 of file missionscreencommon.cpp.

int common_scroll_down_pressed ( int start,
int  size,
int  max_show 

Definition at line 1031 of file missionscreencommon.cpp.

int common_scroll_up_pressed ( int start,
int  size,
int  max_show 

Definition at line 1014 of file missionscreencommon.cpp.

void common_select_close ( )

Definition at line 948 of file missionscreencommon.cpp.

int common_select_do ( float  frametime)

Definition at line 605 of file missionscreencommon.cpp.

void common_select_init ( )

Definition at line 504 of file missionscreencommon.cpp.

void common_set_interface_palette ( char *  filename = NULL)

Definition at line 406 of file missionscreencommon.cpp.

void common_set_team_pointers ( int  team)

Definition at line 473 of file missionscreencommon.cpp.

void draw_model_icon ( int  model_id,
int  flags,
float  closeup_zoom,
int  x1,
int  x2,
int  y1,
int  y2,
const ship_info sip = NULL,
int  resize_mode = GR_RESIZE_FULL,
const vec3d closeup_pos = &vmd_zero_vector 

Definition at line 1530 of file missionscreencommon.cpp.

void draw_model_rotating ( model_render_params render_info,
int  model_id,
int  x1,
int  y1,
int  x2,
int  y2,
float rotation_buffer,
vec3d closeup_pos = NULL,
float  closeup_zoom = .65f,
float  rev_rate = REVOLUTION_RATE,
int  resize_mode = GR_RESIZE_FULL,
int  effect = 2 

Definition at line 1653 of file missionscreencommon.cpp.

void load_wing_icons ( char *  filename)

Definition at line 996 of file missionscreencommon.cpp.

int mission_ui_background_load ( const char *  custom_background,
const char *  single_background,
const char *  multi_background = NULL 

Definition at line 284 of file missionscreencommon.cpp.

void multi_chat_scroll_down ( )
void multi_chat_scroll_up ( )
int restore_wss_data ( ubyte block)

Definition at line 1423 of file missionscreencommon.cpp.

void set_active_ui ( UI_WINDOW ui_window)

Definition at line 308 of file missionscreencommon.cpp.

void ship_select_common_init ( )

Definition at line 3153 of file missionshipchoice.cpp.

int store_wss_data ( ubyte block,
int  max_size,
int  sound,
int  player_index 

Definition at line 1327 of file missionscreencommon.cpp.

void unload_wing_icons ( )

Definition at line 2297 of file missionshipchoice.cpp.

void wss_direct_restore_loadout ( )

Definition at line 1188 of file missionscreencommon.cpp.

int wss_get_mode ( int  from_slot,
int  from_list,
int  to_slot,
int  to_list,
int  wl_ship_slot 

Definition at line 1288 of file missionscreencommon.cpp.

void wss_maybe_restore_loadout ( )

Definition at line 1076 of file missionscreencommon.cpp.

void wss_save_loadout ( )

Definition at line 1048 of file missionscreencommon.cpp.

Variable Documentation

int Background_playing

Definition at line 173 of file missionscreencommon.cpp.

int Brief_mouse_up_flag

Definition at line 56 of file missionscreencommon.cpp.

int Common_select_inited

Definition at line 53 of file missionscreencommon.cpp.

int Common_team

Definition at line 177 of file missionscreencommon.cpp.

int Current_screen

Definition at line 70 of file missionscreencommon.cpp.

int Drop_icon_mflag

Definition at line 56 of file missionscreencommon.cpp.

int Drop_on_wing_mflag

Definition at line 56 of file missionscreencommon.cpp.

int Flash_bright

Definition at line 65 of file missionscreencommon.cpp.

int Flash_timer

Definition at line 63 of file missionscreencommon.cpp.

int Flash_toggle

Definition at line 64 of file missionscreencommon.cpp.

color Icon_colors[NUM_ICON_FRAMES]

Definition at line 73 of file missionscreencommon.cpp.

shader Icon_shaders[NUM_ICON_FRAMES]

Definition at line 74 of file missionscreencommon.cpp.

int Mouse_down_last_frame

Definition at line 58 of file missionscreencommon.cpp.

loadout_data Player_loadout

Definition at line 76 of file missionscreencommon.cpp.

int* Ss_pool

Definition at line 91 of file missionscreencommon.cpp.

Definition at line 86 of file missionscreencommon.cpp.

int Wing_slot_disabled_bitmap

Definition at line 183 of file missionscreencommon.cpp.

int Wing_slot_empty_bitmap

Definition at line 182 of file missionscreencommon.cpp.

int* Wl_pool

Definition at line 90 of file missionscreencommon.cpp.

Definition at line 85 of file missionscreencommon.cpp.

int Wss_num_wings

Definition at line 92 of file missionscreencommon.cpp.

int Wss_num_wings_teams[MAX_TVT_TEAMS]

Definition at line 87 of file missionscreencommon.cpp.

wss_unit* Wss_slots

Definition at line 89 of file missionscreencommon.cpp.

Definition at line 84 of file missionscreencommon.cpp.