66 #define HUD_NUM_COLOR_LEVELS 16
70 #define HUD_COLOR_ALPHA_USER_MAX 13 // max user-settable alpha, absolute max is 15
71 #define HUD_COLOR_ALPHA_USER_MIN 3 // min user-settable alpha, absolute min is 0
73 #define HUD_COLOR_ALPHA_MAX 15
74 #define HUD_COLOR_ALPHA_DEFAULT 8
76 #define HUD_BRIGHT_DELTA 7 // Level added to HUD_color_alpha to make brightness used for flashing
79 #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); } }
80 #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); } }
83 #define RTIF_CROSSHAIRS (1<<0) // draw crosshairs
84 #define RTIF_BLINK (1<<1) // make targeted blip blink
85 #define RTIF_PULSATE (1<<2) // make targeted blips size pulsate
86 #define RTIF_ENLARGE (1<<3) // make targeted blip appear larger than the other blips
161 #define HUD_C_NONE -4
162 #define HUD_C_BRIGHT -3
164 #define HUD_C_NORMAL -1
247 HudGauge(
int _gauge_object,
int _gauge_config,
bool _slew,
bool _message,
int _disabled_views,
int r,
int g,
int b);
249 HudGauge(
int _gauge_config,
bool _slew,
int r,
int g,
int b,
char* _custom_name,
char* _custom_text,
char* frame_fname,
int txtoffset_x,
int txtoffset_y);
256 void initCockpitTarget(
const char* display_name,
int _target_x,
int _target_y,
int _target_w,
int _target_h,
int _canvas_w,
int _canvas_h);
292 virtual void render(
float frametime);
296 virtual void onFrame(
float frametime);
316 void renderLine(
int x1,
int y1,
int x2,
int y2);
333 int time_text_offsets[2];
334 int time_val_offsets[2];
340 void render(
float frametime);
350 void render(
float frametime);
360 int text_value_offsets[2];
366 void render(
float frametime);
379 void render(
float frametime);
410 virtual void render(
float frametime);
443 void initBitmaps(
const char *fname_top,
const char *fname_middle,
const char *fname_bottom);
452 void render(
float frametime);
473 void render(
float frametime);
483 void render(
float frametime);
491 void render(
float frametime);
499 void render(
float frametime);
506 void render(
float frametime);
518 void render(
float frametime);
void updateCustomGaugeFrame(int frame_offset)
GLenum GLsizei GLenum format
virtual void initialize()
void renderBitmapEx(int frame, int x, int y, int w, int h, int sx, int sy)
virtual void onFrame(float frametime)
void updateCustomGaugeCoords(int _x, int _y)
void render(float frametime)
Render multiplayer text message currently being entered, if any.
hud_frames Objective_display_gauge
int hud_gauge_active(int gauge_index)
Determine if the specified HUD gauge should be displayed.
void render(float frametime)
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.
int hud_anim_load(hud_anim *ha)
Load a hud_anim.
int hud_disabled_except_messages()
Like hud_disabled(), except messages are still drawn.
GLfloat GLfloat GLfloat GLfloat h
int hud_get_dock_time(object *docker_objp)
Get the number of seconds until repair ship will dock with ther player.
void startPopUp(int time=4000)
void render(float frametime)
int Hud_max_targeting_range
int subsys_integ_val_offset_x
void setGaugeColor(int bright_index=-4)
void hud_set_draw(int draw)
void hud_toggle_contrast()
void initBitmaps(const char *fname_top, const char *fname_middle, const char *fname_bottom)
void updateActive(bool show)
void initValueOffsets(int x, int y)
#define HUD_NUM_COLOR_LEVELS
int hud_gauge_maybe_flash(int gauge_index)
Set the color for a gauge that may be flashing.
void hud_render_gauges(int cockpit_display_num=-1)
float Pl_target_integrity
void HUD_init()
Called each level to initialize HUD systems.
void initSubspaceTextOffsetY(int y)
void updateColor(int r, int g, int b, int a=255)
void renderBitmapColor(int frame, int x, int y)
void initObjTextOffsetY(int y)
void hud_maybe_render_multi_text()
void initRedAlertTextOffsetY(int y)
struct hud_subsys_info hud_subsys_info
void initBitmaps(const char *fname)
void hud_set_dim_color()
Set the current color to a dim HUD color (ie low alpha)
bool maybeFlashLag(bool flash_fast=false)
struct hud_frames hud_frames
void hud_support_view_start()
Start displaying the support view pop-up. This will remain up until hud_support_view_stop() is called...
void setCockpitTarget(const cockpit_display *display)
void initCockpitTarget(const char *display_name, int _target_x, int _target_y, int _target_w, int _target_h, int _canvas_w, int _canvas_h)
void initBitmaps(const char *fname)
void hud_update_frame(float frametime)
Updates HUD systems each frame.
void initTextValueOffsetY(int y)
void hud_gauge_popup_start(int gauge_index, int time=4000)
Start a gauge to pop-up.
void renderLine(int x1, int y1, int x2, int y2)
void hud_add_objective_messsage(int type, int status)
Add objective status on the HUD.
void initTextValueOffsets(int x, int y)
std::basic_string< char, std::char_traits< char >, std::allocator< char > > SCP_string
void initBaseResolution(int w, int h)
int hud_disabled()
Checks if HUD disabled.
void initBitmaps(const char *fname)
void renderGradientLine(int x1, int y1, int x2, int y2)
void initMiddleFrameStartOffsetY(int y)
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.
void setClip(int x, int y, int w, int h)
bool maybeFlashNotify(bool flash_fast=false)
void hud_stop_looped_engine_sounds()
Called when the game decides to stop all looping sounds.
void render(float frametime)
virtual void render(float frametime)
void hud_disable_except_messages(int disable)
void initTextOffsets(int x, int y)
void initRedAlertValueOffsetY(int y)
void updatePopUp(bool pop_up_flag)
void initTextDockValueOffsetX(int x)
HudGaugeObjectiveNotify()
void initFont(int input_font_num)
char texture_target_fname[MAX_FILENAME_LEN]
void HUD_init_hud_color_array()
void hud_support_view_stop(int stop_now=0)
Stop displaying the support view pop-up.
HudGauge * hud_get_gauge(const char *name)
int hull_integ_val_offset_x
void initRenderStatus(bool render)
GLdouble GLdouble GLdouble r
struct objective_display_info objective_display_info
int Subspace_text_offset_y
const char * getCustomGaugeText()
void initSubsysIntegStartOffsets(int x, int y)
void render(float frametime)
GLboolean GLboolean GLboolean GLboolean a
void hud_subspace_notify_abort()
void initBottomBgOffset(int offset)
void hud_frames_init(hud_frames *hf)
Initialise the members of the hud_frames struct to default values.
void hud_render_all()
Undertakes main HUD render.
int Subspace_text_val_offset_y
void hud_save_restore_camera_data(int save)
Called to save and restore the 3D camera settings.
void hud_level_close()
Do post mission cleanup of HUD.
void initHeaderOffsets(int x, int y)
void initLineHeight(int h)
void hud_show_target_model()
virtual void preprocess()
int hud_gauge_is_popup(int gauge_index)
Determine if gauge is in pop-up mode or not.
void initBitmaps(const char *fname)
int hud_support_find_closest(int objnum)
Locate the closest support ship which is trying to dock with player.
int middle_frame_start_offset_y
void initObjValueOffsetY(int y)
void hud_set_bright_color()
Set the current color to a bright HUD color (ie high alpha)
void hud_set_default_color()
Set the current color to the default HUD color (with default alpha)
void renderString(int x, int y, const char *str)
void render(float frametime)
int Objective_text_offset_y
const char * getCustomGaugeName()
GLint GLint GLint GLint GLint x
int radar_target_id_flags
void HUD_set_clip(int x, int y, int w, int h)
Like gr_set_clip() only it accounts for HUD jittering.
flag_def_list Hud_gauge_types[]
void hud_gauge_start_flash(int gauge_index)
Call HUD function to flash gauge.
void updateSexpOverride(bool sexp)
void hud_set_contrast(int high)
void startFlashLag(int duration=1400)
void renderRect(int x, int y, int w, int h)
void initSubsysIntegValueOffsetX(int x)
GLuint const GLchar * name
int flash_duration_timestamp
void render(float frametime)
Display the kills gauge on the HUD.
void renderStringAlignCenter(int x, int y, int area_width, const char *s)
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 (Swi...
GLboolean GLboolean GLboolean b
void HUD_reset_clip()
Like gr_reset_clip() only it accounts for HUD jittering.
void hud_support_view_abort()
GLubyte GLubyte GLubyte GLubyte w
void unsize(int *x, int *y)
virtual void render(float frametime)
void initHeaderOffsets(int x, int y)
void render(float frametime)
void initTextOffsets(int x, int y)
void getPosition(int *x, int *y)
int Red_text_val_offset_y
void sexpLockConfigColor(bool lock)
void resize(int *x, int *y)
void initSubspaceValueOffsetY(int y)
void renderPrintf(int x, int y, const char *format,...)
void initHullIntegValueOffsetX(int x)
void hud_show_voice_status()
void render(float frametime)
char filename[MAX_FILENAME_LEN]
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.
color HUD_color_defaults[HUD_NUM_COLOR_LEVELS]
int hull_integ_offsets[2]
void initBitmaps(const char *fname)
void lockConfigColor(bool lock)
void renderBitmapUv(int frame, int x, int y, int w, int h, float u0, float v0, float u1, float v1)
void hud_set_iff_color(object *objp, int is_bright=0)
Will set the color to the IFF color based on the team.
bool setupRenderCanvas(int render_target=-1)
char custom_name[NAME_LENGTH]
struct hud_subsys_damage hud_subsys_damage
void render(float frametime)
void initHullIntegOffsets(int x, int y)
void initPosition(int x, int y)
void initTextDockOffsetX(int x)
int text_dock_val_offset_x
void updateCustomGaugeText(const char *txt)
void hud_support_view_update()
void render(float frametime)
Render multiplayer ping time to the server, if appropriate.
color * hud_get_iff_color(object *objp, int is_bright=0)
void initBitmap(const char *fname)
int Objective_text_val_offset_y
void hud_update_objective_message()
void hud_render_preprocess(float frametime)
Render gauges that need to be between a g3_start_frame() and a g3_end_frame()
void initHalfSize(int w, int h)
void HUD_set_offsets(object *viewer_obj, int wiggedy_wack, matrix *eye_orient)
Set the offset values for this render frame.
void hud_num_make_mono(char *num_str, int font_num=FONT1)
Convert a number string to use mono-spaced 1 character.
void hud_start_text_flash(const char *txt, int t, int interval=200)
int subsys_integ_start_offsets[2]
void resetCockpitTarget()
SCP_vector< HudGauge * > default_hud_gauges
void renderCircle(int x, int y, int diameter)
void startFlashNotify(int duration=1400)
void hud_close()
Delete all HUD gauge objects, for all ships.
void renderBitmap(int x, int y)