Open source remastering of the Freespace 2 engine
missionscreencommon.cpp File Reference
#include <limits.h>
#include "anim/animplay.h"
#include "cmdline/cmdline.h"
#include "cutscene/cutscenes.h"
#include "cutscene/movie.h"
#include "gamehelp/contexthelp.h"
#include "gamesequence/gamesequence.h"
#include "gamesnd/eventmusic.h"
#include "gamesnd/gamesnd.h"
#include "globalincs/linklist.h"
#include "graphics/2d.h"
#include "graphics/gropenglshader.h"
#include "hud/hudwingmanstatus.h"
#include "io/key.h"
#include "io/mouse.h"
#include "io/timer.h"
#include "lighting/lighting.h"
#include "missionui/chatbox.h"
#include "missionui/missionbrief.h"
#include "missionui/missionscreencommon.h"
#include "missionui/missionshipchoice.h"
#include "missionui/missionweaponchoice.h"
#include "network/multi.h"
#include "network/multi_endgame.h"
#include "network/multimsgs.h"
#include "network/multiteamselect.h"
#include "network/multiutil.h"
#include "palman/palman.h"
#include "parse/sexp.h"
#include "popup/popup.h"
#include "render/3d.h"
#include "ship/ship.h"
#include "ui/uidefs.h"
#include "weapon/weapon.h"

Go to the source code of this file.


#define MSC_FLASH_AFTER_TIME   60000
#define MSC_FLASH_INTERVAL   200
#define COMMON_SS_BUTTON   1


void ss_set_team_pointers (int team)
void ss_reset_team_pointers ()
void wl_set_team_pointers (int team)
void wl_reset_team_pointers ()
void ss_reset_selected_ship ()
int wss_slots_all_empty ()
void common_show_no_ship_error ()
void common_check_buttons ()
void common_redraw_pressed_buttons ()
void common_buttons_maybe_reload (UI_WINDOW *ui_window)
void common_buttons_init (UI_WINDOW *ui_window)
int mission_ui_background_load (const char *custom_background, const char *single_background, const char *multi_background)
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, int music)
void common_set_interface_palette (char *filename)
void common_free_interface_palette ()
void common_flash_button_init ()
int common_flash_bright ()
void common_set_team_pointers (int team)
void common_reset_team_pointers ()
void common_select_init ()
void common_reset_buttons ()
int common_select_do (float frametime)
void common_render (float frametime)
void common_render_selected_screen_button ()
void common_button_do (int i)
void common_check_keys (int k)
void common_select_close ()
void load_wing_icons (char *filename)
int common_scroll_up_pressed (int *start, int size, int max_show)
int common_scroll_down_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 x, int y, int w, int h, const ship_info *sip, int resize_mode, const vec3d *closeup_pos)
void light_set_all_relevent ()
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, float closeup_zoom, float rev_rate, int flags, int resize_mode, int effect)


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

Macro Definition Documentation


Definition at line 166 of file missionscreencommon.cpp.


Definition at line 169 of file missionscreencommon.cpp.


Definition at line 170 of file missionscreencommon.cpp.


Definition at line 171 of file missionscreencommon.cpp.

#define COMMON_SS_BUTTON   1

Definition at line 167 of file missionscreencommon.cpp.


Definition at line 168 of file missionscreencommon.cpp.

#define MSC_FLASH_AFTER_TIME   60000

Definition at line 61 of file missionscreencommon.cpp.

#define MSC_FLASH_INTERVAL   200

Definition at line 62 of file missionscreencommon.cpp.

Function Documentation

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.

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_play_cutscene ( int  movie_type,
bool  restart_music,
int  music 

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_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)

Definition at line 406 of file missionscreencommon.cpp.

void common_set_team_pointers ( int  team)

Definition at line 473 of file missionscreencommon.cpp.

void common_show_no_ship_error ( )

Definition at line 189 of file missionscreencommon.cpp.

void draw_model_icon ( int  model_id,
int  flags,
float  closeup_zoom,
int  x,
int  y,
int  w,
int  h,
const ship_info sip,
int  resize_mode,
const vec3d closeup_pos 

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,
float  closeup_zoom,
float  rev_rate,
int  flags,
int  resize_mode,
int  effect 

Definition at line 1653 of file missionscreencommon.cpp.

void light_set_all_relevent ( )

Definition at line 644 of file lighting.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 

Definition at line 284 of file missionscreencommon.cpp.

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 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_set_team_pointers ( int  team)

Definition at line 3095 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 wl_reset_team_pointers ( )

Reset the necessary pointers to defaults

Definition at line 1888 of file missionweaponchoice.cpp.

void wl_set_team_pointers ( int  team)

Set the necessary pointers

Definition at line 1878 of file missionweaponchoice.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.

int wss_slots_all_empty ( )

Definition at line 1270 of file missionscreencommon.cpp.

Variable Documentation

UI_WINDOW* Active_ui_window

Definition at line 107 of file missionscreencommon.cpp.

int anim_timer_start

Definition at line 77 of file missionshipchoice.cpp.

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 = 0

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 = 0

Definition at line 58 of file missionscreencommon.cpp.

int Next_screen

Definition at line 71 of file missionscreencommon.cpp.

loadout_data Player_loadout

Definition at line 76 of file missionscreencommon.cpp.

int* Ss_pool = NULL

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 = NULL

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 = NULL

Definition at line 89 of file missionscreencommon.cpp.

Definition at line 84 of file missionscreencommon.cpp.