FS2_Open
Open source remastering of the Freespace 2 engine
|
#include "ai/aigoals.h"
#include "asteroid/asteroid.h"
#include "bmpman/bmpman.h"
#include "cmdline/cmdline.h"
#include "freespace2/freespace.h"
#include "gamesnd/eventmusic.h"
#include "gamesnd/gamesnd.h"
#include "globalincs/alphacolors.h"
#include "globalincs/linklist.h"
#include "hud/hud.h"
#include "hud/hudconfig.h"
#include "hud/hudescort.h"
#include "hud/hudets.h"
#include "hud/hudlock.h"
#include "hud/hudmessage.h"
#include "hud/hudnavigation.h"
#include "hud/hudobserver.h"
#include "hud/hudreticle.h"
#include "hud/hudshield.h"
#include "hud/hudsquadmsg.h"
#include "hud/hudtarget.h"
#include "hud/hudtargetbox.h"
#include "hud/hudwingmanstatus.h"
#include "iff_defs/iff_defs.h"
#include "io/timer.h"
#include "localization/localize.h"
#include "mission/missiongoals.h"
#include "mission/missionmessage.h"
#include "mission/missionparse.h"
#include "mission/missiontraining.h"
#include "missionui/redalert.h"
#include "model/model.h"
#include "network/multi_pmsg.h"
#include "network/multi_voice.h"
#include "network/multiutil.h"
#include "object/object.h"
#include "object/objectdock.h"
#include "playerman/player.h"
#include "radar/radar.h"
#include "radar/radarsetup.h"
#include "render/3d.h"
#include "ship/ship.h"
#include "starfield/supernova.h"
#include "weapon/emp.h"
#include "weapon/weapon.h"
Go to the source code of this file.
Macros | |
#define | HUD_NEW_ALPHA_DIM 80 |
#define | HUD_NEW_ALPHA_NORMAL 120 |
#define | HUD_NEW_ALPHA_BRIGHT 220 |
#define | HUD_NEW_ALPHA_DIM_HI 130 |
#define | HUD_NEW_ALPHA_NORMAL_HI 190 |
#define | HUD_NEW_ALPHA_BRIGHT_HI 255 |
#define | HUD_GAUGE_FLASH_DURATION 5000 |
#define | HUD_GAUGE_FLASH_INTERVAL 200 |
#define | SUBSYS_DAMAGE_FLASH_DURATION 1800 |
#define | SUBSYS_DAMAGE_FLASH_INTERVAL 100 |
#define | THROTTLE_SOUND_CHECK_INTERVAL 50 |
#define | DAMAGE_FLASH_TIME 150 |
#define | ZERO_PERCENT 0.01f |
#define | ENGINE_MAX_VOL 1.0f |
#define | ENGINE_MAX_PITCH 44100 |
#define | NUM_VM_OTHER_SHIP_GAUGES 5 |
Functions | |
void | hud_init_text_flash_gauge () |
Flashing text gauge. More... | |
void | hud_start_text_flash (char *txt, int t, int interval) |
void | update_throttle_sound () |
If the throttle has changed, modify the sound. More... | |
void | hud_damage_popup_init () |
Called at the beginning of each level. Loads frame data in once, and initializes any damage gauge specific data. More... | |
void | hud_support_view_init () |
Called at mission start to init data, and load support view bitmap if required. More... | |
void | hud_gauge_flash_init () |
Reset gauge flashing data. More... | |
void | hud_objective_message_init () |
Initialise the objective message display data. More... | |
void | hud_stop_subspace_notify () |
void | hud_start_subspace_notify () |
void | hud_stop_objective_notify () |
void | hud_start_objective_notify () |
int | hud_subspace_notify_active () |
int | hud_objective_notify_active () |
void | hud_subspace_notify_abort () |
void | hud_maybe_display_subspace_notify () |
int | hud_maybe_render_emp_icon () |
void | hud_init_emp_icon () |
void | saturate (int *i, int minv, int maxv) |
void | HUD_init_hud_color_array () |
void | HUD_init_colors () |
void | HUD_init () |
Called each level to initialize HUD systems. More... | |
void | hud_level_close () |
Do post mission cleanup of HUD. More... | |
void | hud_close () |
Delete all HUD gauge objects, for all ships. More... | |
void | hud_toggle_draw () |
void | hud_set_draw (int draw) |
int | hud_get_draw () |
void | hud_disable_except_messages (int disable) |
int | hud_disabled_except_messages () |
Like hud_disabled(), except messages are still drawn. More... | |
int | hud_disabled () |
Checks if HUD disabled. More... | |
void | hud_maybe_popup_weapons_gauge () |
Determine if we should popup the weapons gauge on the HUD. More... | |
void | hud_update_frame (float frametime) |
Updates HUD systems each frame. More... | |
void | hud_show_asteroid_brackets () |
Draw white brackets around asteroids which has the AF_DRAW_BRACKETS flag set. More... | |
void | hud_render_preprocess (float frametime) |
Render gauges that need to be between a g3_start_frame() and a g3_end_frame() More... | |
void | hud_maybe_display_supernova () |
Show supernova warning it there's a supernova coming. More... | |
void | hud_render_all () |
Undertakes main HUD render. More... | |
void | hud_render_gauges (int cockpit_display_num) |
void | hud_stop_looped_engine_sounds () |
Called when the game decides to stop all looping sounds. More... | |
void | hud_anim_init (hud_anim *ha, int sx, int sy, const char *filename) |
Initialise the members of the hud_anim struct to default values. More... | |
void | hud_frames_init (hud_frames *hf) |
Initialise the members of the hud_frames struct to default values. More... | |
int | hud_anim_load (hud_anim *ha) |
Load a hud_anim. More... | |
int | hud_anim_render (hud_anim *ha, float frametime, int draw_alpha, int loop, int hold_last, int reverse, int resize_mode, bool mirror) |
Render out a frame of the targetbox static animation, based on how much time has elapsed. More... | |
void | hud_num_make_mono (char *num_str, int font_num) |
Convert a number string to use mono-spaced 1 character. More... | |
void | hud_start_text_flash (const char *txt, int t, int interval) |
void | hud_support_view_start () |
Start displaying the support view pop-up. This will remain up until hud_support_view_stop() is called. More... | |
void | hud_support_view_stop (int stop_now) |
Stop displaying the support view pop-up. More... | |
void | hud_support_view_abort () |
int | hud_get_dock_time (object *docker_objp) |
Get the number of seconds until repair ship will dock with ther player. More... | |
int | hud_support_find_closest (int objnum) |
Locate the closest support ship which is trying to dock with player. More... | |
void | hud_support_view_update () |
void | hud_set_default_color () |
Set the current color to the default HUD color (with default alpha) More... | |
void | hud_set_bright_color () |
Set the current color to a bright HUD color (ie high alpha) More... | |
void | hud_set_dim_color () |
Set the current color to a dim HUD color (ie low alpha) More... | |
void | hud_set_iff_color (object *objp, int is_bright) |
Will set the color to the IFF color based on the team. More... | |
int | hud_gauge_active (int gauge_index) |
Determine if the specified HUD gauge should be displayed. More... | |
int | hud_gauge_is_popup (int gauge_index) |
Determine if gauge is in pop-up mode or not. More... | |
void | hud_gauge_popup_start (int gauge_index, int time) |
Start a gauge to pop-up. More... | |
void | hud_gauge_start_flash (int gauge_index) |
Call HUD function to flash gauge. More... | |
void | hud_set_gauge_color (int gauge_index, int bright_index) |
Set the HUD color for the gauge, based on whether it is flashing or not. More... | |
int | hud_gauge_maybe_flash (int gauge_index) |
Set the color for a gauge that may be flashing. More... | |
void | hud_update_objective_message () |
void | hud_add_objective_messsage (int type, int status) |
Add objective status on the HUD. More... | |
void | HUD_set_offsets (object *viewer_obj, int wiggedy_wack, matrix *eye_orient) |
Set the offset values for this render frame. More... | |
void | HUD_get_nose_coordinates (int *x, int *y) |
Returns the offset between the player's view vector and the forward vector of the ship in pixels (Swifty) More... | |
void | HUD_reset_clip () |
Like gr_reset_clip() only it accounts for HUD jittering. More... | |
void | HUD_set_clip (int x, int y, int w, int h) |
Like gr_set_clip() only it accounts for HUD jittering. More... | |
void | hud_save_restore_camera_data (int save) |
Called to save and restore the 3D camera settings. More... | |
void | hud_toggle_contrast () |
void | hud_set_contrast (int high) |
void | hudtarget_page_in () |
void | hud_page_in () |
Page in all HUD bitmaps. More... | |
HudGauge * | hud_get_gauge (const char *name) |
Variables | |
SCP_vector< HudGauge * > | default_hud_gauges |
float | View_zoom |
int | HUD_color_red = 0 |
int | HUD_color_green = 255 |
int | HUD_color_blue = 0 |
int | HUD_color_alpha = HUD_COLOR_ALPHA_DEFAULT |
int | HUD_draw = 1 |
int | HUD_contrast = 0 |
int | HUD_disable_except_messages = 0 |
color | HUD_color_defaults [HUD_NUM_COLOR_LEVELS] |
color | HUD_color_debug |
float | HUD_offset_x = 0.0f |
float | HUD_offset_y = 0.0f |
int | HUD_nose_x |
int | HUD_nose_y |
float | Pl_target_integrity |
int | Hud_max_targeting_range |
char | Hud_text_flash [512] = "" |
int | Hud_text_flash_timer = 0 |
int | Hud_text_flash_interval = 0 |
int | Multi_msg_coords [GR_NUM_RESOLUTIONS][2] |
int | Voice_coords [GR_NUM_RESOLUTIONS][2] |
int | Ping_coords [GR_NUM_RESOLUTIONS][2] |
int | Supernova_coords [GR_NUM_RESOLUTIONS][2] |
int | HUD_gauge_flash_duration [NUM_HUD_GAUGES] |
int | HUD_gauge_flash_next [NUM_HUD_GAUGES] |
int | HUD_gauge_bright |
float | Player_rearm_eta = 0 |
Add objective status on the HUD.
type | Type of goal, one of: PRIMARY_GOAL, SECONDARY_GOAL, BONUS_GOAL |
status | Status of goal, one of: GOAL_FAILED, GOAL_COMPLETE, GOAL_INCOMPLETE |
int hud_anim_render | ( | hud_anim * | ha, |
float | frametime, | ||
int | draw_alpha, | ||
int | loop, | ||
int | hold_last, | ||
int | reverse, | ||
int | resize_mode, | ||
bool | mirror | ||
) |
Render out a frame of the targetbox static animation, based on how much time has elapsed.
ha | Pointer to hud_anim info |
frametime | Seconds elapsed since last frame |
draw_alpha | Draw bitmap as alpha-bitmap (default 0) |
loop | Anim should loop (default 1) |
hold_last | Should last frame be held (default 0) |
reverse | Play animation in reverse (default 0) |
resize_mode | Resize for non-standard resolutions |
mirror | Mirror along y-axis so icon points left instead of right |
void hud_close | ( | ) |
void hud_damage_popup_init | ( | ) |
int hud_disabled | ( | ) |
int hud_disabled_except_messages | ( | ) |
Like hud_disabled(), except messages are still drawn.
void hud_frames_init | ( | hud_frames * | hf | ) |
Initialise the members of the hud_frames struct to default values.
Get the number of seconds until repair ship will dock with ther player.
mwa made this function more general purpose. Goober5000 made clearer
docker_objp | The object which is attempting to dock with the player |
void HUD_init | ( | ) |
void hud_init_emp_icon | ( | ) |
void hud_maybe_display_subspace_notify | ( | ) |
void hud_maybe_display_supernova | ( | ) |
void hud_maybe_popup_weapons_gauge | ( | ) |
int hud_maybe_render_emp_icon | ( | ) |
void hud_objective_message_init | ( | ) |
Render gauges that need to be between a g3_start_frame() and a g3_end_frame()
void HUD_reset_clip | ( | ) |
Like gr_reset_clip() only it accounts for HUD jittering.
void hud_set_bright_color | ( | ) |
Like gr_set_clip() only it accounts for HUD jittering.
void hud_set_default_color | ( | ) |
void hud_set_dim_color | ( | ) |
Set the offset values for this render frame.
Since the player's view vector may be different from the ship's forward vector, we calculate the offset of those two in pixels and store the x and y offsets in variables HUD_nose_x and HUD_nose_y (Swifty)
viewer_obj | Object, likely to be player |
wiggedy_wack | |
eye_orient |
void hud_show_asteroid_brackets | ( | ) |
void hud_stop_looped_engine_sounds | ( | ) |
void hud_support_view_init | ( | ) |
void hud_support_view_start | ( | ) |
Start displaying the support view pop-up. This will remain up until hud_support_view_stop() is called.
void hudtarget_page_in | ( | ) |
Definition at line 5249 of file hudtarget.cpp.
void update_throttle_sound | ( | ) |
SCP_vector<HudGauge*> default_hud_gauges |
int HUD_color_alpha = HUD_COLOR_ALPHA_DEFAULT |
color HUD_color_defaults[HUD_NUM_COLOR_LEVELS] |
int HUD_gauge_flash_duration[NUM_HUD_GAUGES] |
int HUD_gauge_flash_next[NUM_HUD_GAUGES] |
int Multi_msg_coords[GR_NUM_RESOLUTIONS][2] |
int Ping_coords[GR_NUM_RESOLUTIONS][2] |
int Supernova_coords[GR_NUM_RESOLUTIONS][2] |
float View_zoom |
Definition at line 30 of file 3dsetup.cpp.
int Voice_coords[GR_NUM_RESOLUTIONS][2] |