FS2_Open
Open source remastering of the Freespace 2 engine
|
#include "globalincs/vmallocator.h"
#include "graphics/2d.h"
#include "graphics/font.h"
#include "hud/hudgauges.h"
#include "hud/hudparse.h"
Go to the source code of this file.
Classes | |
struct | hud_anim |
struct | hud_frames |
struct | objective_display_info |
struct | hud_subsys_info |
struct | hud_subsys_damage |
class | HudGauge |
class | HudGaugeMissionTime |
class | HudGaugeTextWarnings |
class | HudGaugeKills |
class | HudGaugeLag |
class | HudGaugeObjectiveNotify |
class | HudGaugeDamage |
class | HudGaugeSupport |
class | HudGaugeMultiMsg |
class | HudGaugeVoiceStatus |
class | HudGaugePing |
class | HudGaugeSupernova |
class | HudGaugeFlightPath |
Macros | |
#define | HUD_NUM_COLOR_LEVELS 16 |
#define | HUD_COLOR_ALPHA_USER_MAX 13 |
#define | HUD_COLOR_ALPHA_USER_MIN 3 |
#define | HUD_COLOR_ALPHA_MAX 15 |
#define | HUD_COLOR_ALPHA_DEFAULT 8 |
#define | HUD_BRIGHT_DELTA 7 |
#define | GR_AABITMAP(a, b, c) { int jx, jy; if(emp_should_blit_gauge()) { gr_set_bitmap(a); jx = b; jy = c; emp_hud_jitter(&jx, &jy); gr_aabitmap(jx, jy); } } |
#define | GR_AABITMAP_EX(a, b, c, d, e, f, g) { int jx, jy; if(emp_should_blit_gauge()) { gr_set_bitmap(a); jx = b; jy = c; emp_hud_jitter(&jx, &jy); gr_aabitmap_ex(jx, jy, d, e, f, g); } } |
#define | RTIF_CROSSHAIRS (1<<0) |
#define | RTIF_BLINK (1<<1) |
#define | RTIF_PULSATE (1<<2) |
#define | RTIF_ENLARGE (1<<3) |
#define | HUD_C_NONE -4 |
#define | HUD_C_BRIGHT -3 |
#define | HUD_C_DIM -2 |
#define | HUD_C_NORMAL -1 |
Typedefs | |
typedef struct hud_anim | hud_anim |
typedef struct hud_frames | hud_frames |
typedef struct objective_display_info | objective_display_info |
typedef struct hud_subsys_info | hud_subsys_info |
typedef struct hud_subsys_damage | hud_subsys_damage |
Functions | |
void | HUD_init_colors () |
void | HUD_init () |
Called each level to initialize HUD systems. More... | |
void | hud_close () |
Delete all HUD gauge objects, for all ships. More... | |
void | hud_level_close () |
Do post mission cleanup of HUD. More... | |
void | hud_update_frame (float frametime) |
Updates HUD systems each frame. 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_render_all () |
Undertakes main HUD render. More... | |
void | hud_render_gauges (int cockpit_display_num=-1) |
void | hud_stop_looped_engine_sounds () |
Called when the game decides to stop all looping sounds. 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_save_restore_camera_data (int save) |
Called to save and restore the 3D camera settings. 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_start_text_flash (const char *txt, int t, int interval=200) |
void | hud_num_make_mono (char *num_str, int font_num=FONT1) |
Convert a number string to use mono-spaced 1 character. 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_render (hud_anim *ha, float frametime, int draw_alpha=0, int loop=1, int hold_last=0, int reverse=0, int resize_mode=GR_RESIZE_FULL, bool mirror=false) |
Render out a frame of the targetbox static animation, based on how much time has elapsed. More... | |
int | hud_anim_load (hud_anim *ha) |
Load a hud_anim. More... | |
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=0) |
Stop displaying the support view pop-up. More... | |
void | hud_support_view_abort () |
void | hud_support_view_update () |
void | HUD_init_hud_color_array () |
void | hud_set_default_color () |
Set the current color to the default HUD color (with default alpha) More... | |
void | hud_set_iff_color (object *objp, int is_bright=0) |
Will set the color to the IFF color based on the team. More... | |
color * | hud_get_iff_color (object *objp, int is_bright=0) |
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_gauge_color (int gauge_index, int bright_index=HUD_C_NONE) |
Set the HUD color for the gauge, based on whether it is flashing or not. More... | |
int | hud_gauge_active (int gauge_index) |
Determine if the specified HUD gauge should be displayed. More... | |
void | hud_gauge_start_flash (int gauge_index) |
Call HUD function to flash gauge. More... | |
int | hud_gauge_maybe_flash (int gauge_index) |
Set the color for a gauge that may be flashing. More... | |
void | hud_gauge_popup_start (int gauge_index, int time=4000) |
Start a gauge to pop-up. More... | |
int | hud_gauge_is_popup (int gauge_index) |
Determine if gauge is in pop-up mode or not. More... | |
void | hud_update_objective_message () |
void | hud_add_objective_messsage (int type, int status) |
Add objective status on the HUD. More... | |
int | hud_get_dock_time (object *docker_objp) |
Get the number of seconds until repair ship will dock with ther player. More... | |
void | hud_show_target_model () |
void | hud_show_voice_status () |
void | hud_subspace_notify_abort () |
void | hud_maybe_render_multi_text () |
int | hud_get_draw () |
void | hud_toggle_draw () |
int | hud_disabled () |
Checks if HUD disabled. More... | |
int | hud_support_find_closest (int objnum) |
Locate the closest support ship which is trying to dock with player. More... | |
void | hud_set_draw (int draw) |
void | hud_disable_except_messages (int disable) |
int | hud_disabled_except_messages () |
Like hud_disabled(), except messages are still drawn. More... | |
void | hud_toggle_contrast () |
void | hud_set_contrast (int high) |
HudGauge * | hud_get_gauge (const char *name) |
#define GR_AABITMAP | ( | a, | |
b, | |||
c | |||
) | { int jx, jy; if(emp_should_blit_gauge()) { gr_set_bitmap(a); jx = b; jy = c; emp_hud_jitter(&jx, &jy); gr_aabitmap(jx, jy); } } |
#define GR_AABITMAP_EX | ( | a, | |
b, | |||
c, | |||
d, | |||
e, | |||
f, | |||
g | |||
) | { int jx, jy; if(emp_should_blit_gauge()) { gr_set_bitmap(a); jx = b; jy = c; emp_hud_jitter(&jx, &jy); gr_aabitmap_ex(jx, jy, d, e, f, g); } } |
typedef struct hud_frames hud_frames |
typedef struct hud_subsys_damage hud_subsys_damage |
typedef struct hud_subsys_info hud_subsys_info |
typedef struct objective_display_info objective_display_info |
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 | ( | ) |
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_maybe_render_multi_text | ( | ) |
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 | ( | ) |
void hud_set_gauge_color | ( | int | gauge_index, |
int | bright_index = HUD_C_NONE |
||
) |
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_target_model | ( | ) |
void hud_show_voice_status | ( | ) |
void hud_stop_looped_engine_sounds | ( | ) |
void hud_support_view_start | ( | ) |
Start displaying the support view pop-up. This will remain up until hud_support_view_stop() is called.
SCP_vector<HudGauge*> default_hud_gauges |
color HUD_color_defaults[HUD_NUM_COLOR_LEVELS] |
flag_def_list Hud_gauge_types[] |
Definition at line 99 of file hudparse.cpp.
int Num_hud_gauge_types |
Definition at line 152 of file hudparse.cpp.
int radar_target_id_flags |
Definition at line 69 of file radarsetup.cpp.