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

#include <hud.h>

Inheritance diagram for HudGauge:
HudGaugeAfterburner HudGaugeAutoSpeed HudGaugeAutoTarget HudGaugeBrackets HudGaugeCmeasures HudGaugeDamage HudGaugeDirectives HudGaugeEscort HudGaugeEts HudGaugeExtraTargetData HudGaugeFixedMessages HudGaugeFlightPath HudGaugeHardpoints HudGaugeKills HudGaugeLag HudGaugeLeadIndicator HudGaugeLeadSight HudGaugeLock HudGaugeMessages HudGaugeMissionTime HudGaugeMultiMsg HudGaugeObjectiveNotify HudGaugeOffscreen HudGaugeOrientationTee HudGaugePing HudGaugeRadar HudGaugeReticle HudGaugeReticleTriangle HudGaugeShield HudGaugeShieldMini HudGaugeSquadMessage HudGaugeSupernova HudGaugeSupport HudGaugeTalkingHead HudGaugeTargetBox HudGaugeTextWarnings HudGaugeThreatIndicator HudGaugeThrottle HudGaugeTrainingMessages HudGaugeVoiceStatus HudGaugeWarheadCount HudGaugeWeaponEnergy HudGaugeWeaponLinking HudGaugeWeaponList HudGaugeWeapons HudGaugeWingmanStatus

Public Member Functions

 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 void render (float frametime)
 
virtual bool canRender ()
 
virtual void pageIn ()
 
virtual void initialize ()
 
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

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 201 of file hud.h.

Constructor & Destructor Documentation

HudGauge::HudGauge ( )

Definition at line 246 of file hud.cpp.

HudGauge::HudGauge ( int  _gauge_object,
int  _gauge_config,
bool  _slew,
bool  _message,
int  _disabled_views,
int  r,
int  g,
int  b 
)

Definition at line 270 of file hud.cpp.

HudGauge::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 
)

Definition at line 306 of file hud.cpp.

HudGauge::~HudGauge ( )
virtual

Definition at line 355 of file hud.cpp.

Member Function Documentation

bool HudGauge::canRender ( )
virtual
bool HudGauge::flashExpiredSexp ( )

Definition at line 608 of file hud.cpp.

int HudGauge::getConfigType ( )

Definition at line 509 of file hud.cpp.

const char * HudGauge::getCustomGaugeName ( )

Definition at line 389 of file hud.cpp.

const char * HudGauge::getCustomGaugeText ( )

Definition at line 394 of file hud.cpp.

int HudGauge::getObjectType ( )

Definition at line 515 of file hud.cpp.

void HudGauge::getPosition ( int x,
int y 
)

Definition at line 363 of file hud.cpp.

void HudGauge::initBaseResolution ( int  w,
int  h 
)

Definition at line 369 of file hud.cpp.

void HudGauge::initCockpitTarget ( const char *  display_name,
int  _target_x,
int  _target_y,
int  _target_w,
int  _target_h,
int  _canvas_w,
int  _canvas_h 
)

Definition at line 1099 of file hud.cpp.

void HudGauge::initFont ( int  input_font_num)

Definition at line 382 of file hud.cpp.

void HudGauge::initPosition ( int  x,
int  y 
)

Definition at line 357 of file hud.cpp.

void HudGauge::initRenderStatus ( bool  render)

Definition at line 543 of file hud.cpp.

void HudGauge::initSlew ( bool  slew)

Definition at line 377 of file hud.cpp.

bool HudGauge::isActive ( )

Definition at line 553 of file hud.cpp.

bool HudGauge::isOffbyDefault ( )

Definition at line 548 of file hud.cpp.

void HudGauge::lockConfigColor ( bool  lock)

Definition at line 520 of file hud.cpp.

int HudGauge::maybeFlashSexp ( )

Definition at line 617 of file hud.cpp.

void HudGauge::onFrame ( float  frametime)
virtual

Reimplemented in HudGaugeRadarDradis.

Definition at line 637 of file hud.cpp.

int HudGauge::popUpActive ( )

Definition at line 578 of file hud.cpp.

void HudGauge::preprocess ( )
virtual

Reimplemented in HudGaugeMessages.

Definition at line 632 of file hud.cpp.

void HudGauge::renderBitmap ( int  x,
int  y 
)

Definition at line 782 of file hud.cpp.

void HudGauge::renderBitmap ( int  frame,
int  x,
int  y 
)

Definition at line 812 of file hud.cpp.

void HudGauge::renderBitmapColor ( int  frame,
int  x,
int  y 
)

Definition at line 752 of file hud.cpp.

void HudGauge::renderBitmapEx ( int  frame,
int  x,
int  y,
int  w,
int  h,
int  sx,
int  sy 
)

Definition at line 818 of file hud.cpp.

void HudGauge::renderBitmapUv ( int  frame,
int  x,
int  y,
int  w,
int  h,
float  u0,
float  v0,
float  u1,
float  v1 
)
void HudGauge::renderCircle ( int  x,
int  y,
int  diameter 
)

Definition at line 919 of file hud.cpp.

void HudGauge::renderGradientLine ( int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 873 of file hud.cpp.

void HudGauge::renderLine ( int  x1,
int  y1,
int  x2,
int  y2 
)

Definition at line 850 of file hud.cpp.

void HudGauge::renderPrintf ( int  x,
int  y,
const char *  format,
  ... 
)

Definition at line 724 of file hud.cpp.

void HudGauge::renderPrintf ( int  x,
int  y,
int  gauge_id,
const char *  format,
  ... 
)

Definition at line 738 of file hud.cpp.

void HudGauge::renderRect ( int  x,
int  y,
int  w,
int  h 
)

Definition at line 896 of file hud.cpp.

void HudGauge::renderString ( int  x,
int  y,
const char *  str 
)

Definition at line 665 of file hud.cpp.

void HudGauge::renderString ( int  x,
int  y,
int  gauge_id,
const char *  str 
)

Definition at line 688 of file hud.cpp.

void HudGauge::renderStringAlignCenter ( int  x,
int  y,
int  area_width,
const char *  s 
)

Definition at line 716 of file hud.cpp.

void HudGauge::resetClip ( )

Definition at line 978 of file hud.cpp.

void HudGauge::resetCockpitTarget ( )

Definition at line 1155 of file hud.cpp.

void HudGauge::resetTimers ( )

Definition at line 592 of file hud.cpp.

void HudGauge::resize ( int x,
int y 
)

Definition at line 1026 of file hud.cpp.

void HudGauge::resize ( float x,
float y 
)

Definition at line 1033 of file hud.cpp.

void HudGauge::setClip ( int  x,
int  y,
int  w,
int  h 
)

Definition at line 942 of file hud.cpp.

void HudGauge::setCockpitTarget ( const cockpit_display display)

Definition at line 1136 of file hud.cpp.

void HudGauge::setFont ( )

Definition at line 440 of file hud.cpp.

void HudGauge::setGaugeColor ( int  bright_index = -4)

Definition at line 445 of file hud.cpp.

bool HudGauge::setupRenderCanvas ( int  render_target = -1)

Definition at line 1121 of file hud.cpp.

void HudGauge::sexpLockConfigColor ( bool  lock)

Definition at line 525 of file hud.cpp.

void HudGauge::startFlashSexp ( )

Definition at line 601 of file hud.cpp.

void HudGauge::startPopUp ( int  time = 4000)

Definition at line 568 of file hud.cpp.

void HudGauge::unsize ( int x,
int y 
)

Definition at line 1012 of file hud.cpp.

void HudGauge::unsize ( float x,
float y 
)

Definition at line 1019 of file hud.cpp.

void HudGauge::updateActive ( bool  show)

Definition at line 538 of file hud.cpp.

void HudGauge::updateColor ( int  r,
int  g,
int  b,
int  a = 255 
)

Definition at line 530 of file hud.cpp.

void HudGauge::updateCustomGaugeCoords ( int  _x,
int  _y 
)

Definition at line 399 of file hud.cpp.

void HudGauge::updateCustomGaugeFrame ( int  frame_offset)

Definition at line 409 of file hud.cpp.

void HudGauge::updateCustomGaugeText ( const char *  txt)

Definition at line 422 of file hud.cpp.

void HudGauge::updateCustomGaugeText ( const SCP_string txt)

Definition at line 431 of file hud.cpp.

void HudGauge::updatePopUp ( bool  pop_up_flag)

Definition at line 563 of file hud.cpp.

void HudGauge::updateSexpOverride ( bool  sexp)

Definition at line 558 of file hud.cpp.

Member Data Documentation

bool HudGauge::active
protected

Definition at line 215 of file hud.h.

int HudGauge::base_h
protected

Definition at line 205 of file hud.h.

int HudGauge::base_w
protected

Definition at line 205 of file hud.h.

int HudGauge::canvas_h
protected

Definition at line 240 of file hud.h.

int HudGauge::canvas_w
protected

Definition at line 240 of file hud.h.

hud_frames HudGauge::custom_frame
protected

Definition at line 229 of file hud.h.

int HudGauge::custom_frame_offset
protected

Definition at line 230 of file hud.h.

bool HudGauge::custom_gauge
protected

Definition at line 228 of file hud.h.

char HudGauge::custom_name[NAME_LENGTH]
protected

Definition at line 232 of file hud.h.

SCP_string HudGauge::custom_text
protected

Definition at line 233 of file hud.h.

SCP_string HudGauge::default_text
protected

Definition at line 235 of file hud.h.

int HudGauge::disabled_views
protected

Definition at line 221 of file hud.h.

int HudGauge::display_offset_x
protected

Definition at line 243 of file hud.h.

int HudGauge::display_offset_y
protected

Definition at line 243 of file hud.h.

int HudGauge::flash_duration
protected

Definition at line 223 of file hud.h.

int HudGauge::flash_next
protected

Definition at line 224 of file hud.h.

bool HudGauge::flash_status
protected

Definition at line 225 of file hud.h.

int HudGauge::font_num
protected

Definition at line 210 of file hud.h.

color HudGauge::gauge_color
protected

Definition at line 206 of file hud.h.

int HudGauge::gauge_config
protected

Definition at line 207 of file hud.h.

int HudGauge::gauge_object
protected

Definition at line 208 of file hud.h.

bool HudGauge::lock_color
protected

Definition at line 212 of file hud.h.

bool HudGauge::message_gauge
protected

Definition at line 220 of file hud.h.

bool HudGauge::off_by_default
protected

Definition at line 216 of file hud.h.

bool HudGauge::pop_up
protected

Definition at line 218 of file hud.h.

int HudGauge::popup_timer
protected

Definition at line 219 of file hud.h.

int HudGauge::position[2]
protected

Definition at line 204 of file hud.h.

bool HudGauge::reticle_follow
protected

Definition at line 214 of file hud.h.

bool HudGauge::sexp_lock_color
protected

Definition at line 213 of file hud.h.

bool HudGauge::sexp_override
protected

Definition at line 217 of file hud.h.

int HudGauge::target_h
protected

Definition at line 241 of file hud.h.

int HudGauge::target_w
protected

Definition at line 241 of file hud.h.

int HudGauge::target_x
protected

Definition at line 242 of file hud.h.

int HudGauge::target_y
protected

Definition at line 242 of file hud.h.

int HudGauge::textoffset_x
protected

Definition at line 231 of file hud.h.

int HudGauge::textoffset_y
protected

Definition at line 231 of file hud.h.

int HudGauge::texture_target
protected

Definition at line 239 of file hud.h.

char HudGauge::texture_target_fname[MAX_FILENAME_LEN]
protected

Definition at line 238 of file hud.h.


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