FS2_Open
Open source remastering of the Freespace 2 engine
HudGaugeDamage Class Reference

#include <hud.h>

Inheritance diagram for HudGaugeDamage:
HudGauge

Public Member Functions

 HudGaugeDamage ()
 
void initBitmaps (const char *fname_top, const char *fname_middle, const char *fname_bottom)
 
void initHeaderOffsets (int x, int y)
 
void initHullIntegOffsets (int x, int y)
 
void initHullIntegValueOffsetX (int x)
 
void initMiddleFrameStartOffsetY (int y)
 
void initSubsysIntegStartOffsets (int x, int y)
 
void initSubsysIntegValueOffsetX (int x)
 
void initBottomBgOffset (int offset)
 
void initLineHeight (int h)
 
void render (float frametime)
 
void pageIn ()
 
void initialize ()
 
- Public Member Functions inherited from HudGauge
 HudGauge ()
 
 HudGauge (int _gauge_object, int _gauge_config, bool _slew, bool _message, int _disabled_views, int r, int g, int b)
 
 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)
 
virtual ~HudGauge ()
 
void initPosition (int x, int y)
 
void initBaseResolution (int w, int h)
 
void initSlew (bool slew)
 
void initFont (int input_font_num)
 
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 initRenderStatus (bool render)
 
int getConfigType ()
 
int getObjectType ()
 
void getPosition (int *x, int *y)
 
bool isOffbyDefault ()
 
bool isActive ()
 
void updateColor (int r, int g, int b, int a=255)
 
void lockConfigColor (bool lock)
 
void sexpLockConfigColor (bool lock)
 
void updateActive (bool show)
 
void updatePopUp (bool pop_up_flag)
 
void updateSexpOverride (bool sexp)
 
void startFlashSexp ()
 
int maybeFlashSexp ()
 
bool flashExpiredSexp ()
 
void resetTimers ()
 
const char * getCustomGaugeName ()
 
void updateCustomGaugeCoords (int _x, int _y)
 
void updateCustomGaugeFrame (int frame_offset)
 
void updateCustomGaugeText (const char *txt)
 
void updateCustomGaugeText (const SCP_string &txt)
 
const char * getCustomGaugeText ()
 
void startPopUp (int time=4000)
 
int popUpActive ()
 
virtual void preprocess ()
 
virtual bool canRender ()
 
virtual void onFrame (float frametime)
 
bool setupRenderCanvas (int render_target=-1)
 
void setCockpitTarget (const cockpit_display *display)
 
void resetCockpitTarget ()
 
void setFont ()
 
void setGaugeColor (int bright_index=-4)
 
void renderBitmap (int x, int y)
 
void renderBitmap (int frame, int x, int y)
 
void renderBitmapColor (int frame, int x, int y)
 
void renderBitmapUv (int frame, int x, int y, int w, int h, float u0, float v0, float u1, float v1)
 
void renderBitmapEx (int frame, int x, int y, int w, int h, int sx, int sy)
 
void renderString (int x, int y, const char *str)
 
void renderString (int x, int y, int gauge_id, const char *str)
 
void renderStringAlignCenter (int x, int y, int area_width, const char *s)
 
void renderPrintf (int x, int y, const char *format,...)
 
void renderPrintf (int x, int y, int gauge_id, const char *format,...)
 
void renderLine (int x1, int y1, int x2, int y2)
 
void renderGradientLine (int x1, int y1, int x2, int y2)
 
void renderRect (int x, int y, int w, int h)
 
void renderCircle (int x, int y, int diameter)
 
void unsize (int *x, int *y)
 
void unsize (float *x, float *y)
 
void resize (int *x, int *y)
 
void resize (float *x, float *y)
 
void setClip (int x, int y, int w, int h)
 
void resetClip ()
 

Protected Attributes

hud_frames damage_top
 
hud_frames damage_middle
 
hud_frames damage_bottom
 
int header_offsets [2]
 
int hull_integ_offsets [2]
 
int hull_integ_val_offset_x
 
int middle_frame_start_offset_y
 
int subsys_integ_start_offsets [2]
 
int subsys_integ_val_offset_x
 
int bottom_bg_offset
 
int line_h
 
int Damage_flash_timer
 
bool Damage_flash_bright
 
int next_flash
 
bool flash_status
 
- Protected Attributes inherited from HudGauge
int position [2]
 
int base_w
 
int base_h
 
color gauge_color
 
int gauge_config
 
int gauge_object
 
int font_num
 
bool lock_color
 
bool sexp_lock_color
 
bool reticle_follow
 
bool active
 
bool off_by_default
 
bool sexp_override
 
bool pop_up
 
int popup_timer
 
bool message_gauge
 
int disabled_views
 
int flash_duration
 
int flash_next
 
bool flash_status
 
bool custom_gauge
 
hud_frames custom_frame
 
int custom_frame_offset
 
int textoffset_x
 
int textoffset_y
 
char custom_name [NAME_LENGTH]
 
SCP_string custom_text
 
SCP_string default_text
 
char texture_target_fname [MAX_FILENAME_LEN]
 
int texture_target
 
int canvas_w
 
int canvas_h
 
int target_w
 
int target_h
 
int target_x
 
int target_y
 
int display_offset_x
 
int display_offset_y
 

Detailed Description

Definition at line 420 of file hud.h.

Constructor & Destructor Documentation

HudGaugeDamage::HudGaugeDamage ( )

Definition at line 1907 of file hud.cpp.

Member Function Documentation

void HudGaugeDamage::initBitmaps ( const char *  fname_top,
const char *  fname_middle,
const char *  fname_bottom 
)

Definition at line 1955 of file hud.cpp.

void HudGaugeDamage::initBottomBgOffset ( int  offset)

Definition at line 1945 of file hud.cpp.

void HudGaugeDamage::initHeaderOffsets ( int  x,
int  y 
)

Definition at line 1912 of file hud.cpp.

void HudGaugeDamage::initHullIntegOffsets ( int  x,
int  y 
)

Definition at line 1918 of file hud.cpp.

void HudGaugeDamage::initHullIntegValueOffsetX ( int  x)

Definition at line 1924 of file hud.cpp.

void HudGaugeDamage::initialize ( )
virtual

Reimplemented from HudGauge.

Definition at line 1973 of file hud.cpp.

void HudGaugeDamage::initLineHeight ( int  h)

Definition at line 1950 of file hud.cpp.

void HudGaugeDamage::initMiddleFrameStartOffsetY ( int  y)

Definition at line 1929 of file hud.cpp.

void HudGaugeDamage::initSubsysIntegStartOffsets ( int  x,
int  y 
)

Definition at line 1934 of file hud.cpp.

void HudGaugeDamage::initSubsysIntegValueOffsetX ( int  x)

Definition at line 1940 of file hud.cpp.

void HudGaugeDamage::pageIn ( )
virtual

Reimplemented from HudGauge.

Definition at line 1983 of file hud.cpp.

void HudGaugeDamage::render ( float  frametime)
virtual

Reimplemented from HudGauge.

Definition at line 1990 of file hud.cpp.

Member Data Documentation

int HudGaugeDamage::bottom_bg_offset
protected

Definition at line 433 of file hud.h.

hud_frames HudGaugeDamage::damage_bottom
protected

Definition at line 425 of file hud.h.

bool HudGaugeDamage::Damage_flash_bright
protected

Definition at line 437 of file hud.h.

int HudGaugeDamage::Damage_flash_timer
protected

Definition at line 436 of file hud.h.

hud_frames HudGaugeDamage::damage_middle
protected

Definition at line 424 of file hud.h.

hud_frames HudGaugeDamage::damage_top
protected

Definition at line 423 of file hud.h.

bool HudGaugeDamage::flash_status
protected

Definition at line 440 of file hud.h.

int HudGaugeDamage::header_offsets[2]
protected

Definition at line 427 of file hud.h.

int HudGaugeDamage::hull_integ_offsets[2]
protected

Definition at line 428 of file hud.h.

int HudGaugeDamage::hull_integ_val_offset_x
protected

Definition at line 429 of file hud.h.

int HudGaugeDamage::line_h
protected

Definition at line 434 of file hud.h.

int HudGaugeDamage::middle_frame_start_offset_y
protected

Definition at line 430 of file hud.h.

int HudGaugeDamage::next_flash
protected

Definition at line 439 of file hud.h.

int HudGaugeDamage::subsys_integ_start_offsets[2]
protected

Definition at line 431 of file hud.h.

int HudGaugeDamage::subsys_integ_val_offset_x
protected

Definition at line 432 of file hud.h.


The documentation for this class was generated from the following files: