Open source remastering of the Freespace 2 engine
HudGaugeWeapons Class Reference

#include <hudtarget.h>

Inheritance diagram for HudGaugeWeapons:

Public Member Functions

 HudGaugeWeapons ()
void initBitmapsPrimaryTop (char *fname, char *fname_ballistic)
void initBitmapsPrimaryMiddle (char *fname, char *fname_ballistic)
void initBitmapsPrimaryLast (char *fname, char *fname_ballistic)
void initBitmapsSecondaryTop (char *fname, char *fname_ballistic)
void initBitmapsSecondaryMiddle (char *fname, char *fname_ballistic)
void initBitmapsSecondaryBottom (char *fname, char *fname_ballistic)
void initTopOffsetX (int x, int x_b)
void initHeaderOffsets (int x, int y, int x_b, int y_b)
void initFrameOffsetX (int x, int x_b)
void initPrimaryWeaponOffsets (int link_x, int name_x, int ammo_x)
void initSecondaryWeaponOffsets (int ammo_x, int name_x, int reload_x, int linked_x, int unlinked_x)
void initStartNameOffsetsY (int p_y, int s_y)
void initPrimaryHeights (int top_h, int text_h)
void initSecondaryHeights (int top_h, int text_h)
void initLinkIcon ()
void render (float frametime)
void pageIn ()
void maybeFlashWeapon (int index)
- 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 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

hud_frames primary_top [NUM_HUD_SETTINGS]
int top_offset_x [NUM_HUD_SETTINGS]
int Weapon_header_offsets [NUM_HUD_SETTINGS][2]
hud_frames primary_middle [NUM_HUD_SETTINGS]
hud_frames primary_last [NUM_HUD_SETTINGS]
int frame_offset_x [NUM_HUD_SETTINGS]
hud_frames secondary_top [NUM_HUD_SETTINGS]
hud_frames secondary_middle [NUM_HUD_SETTINGS]
hud_frames secondary_bottom [NUM_HUD_SETTINGS]
int Weapon_plink_offset_x
int Weapon_pname_offset_x
int Weapon_pammo_offset_x
int Weapon_sammo_offset_x
int Weapon_sname_offset_x
int Weapon_sreload_offset_x
int Weapon_slinked_offset_x
int Weapon_sunlinked_offset_x
ubyte Weapon_link_icon
int top_primary_h
int pname_start_offset_y
int top_secondary_h
int sname_start_offset_y
int primary_text_h
int secondary_text_h
- 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 289 of file hudtarget.h.

Constructor & Destructor Documentation

HudGaugeWeapons::HudGaugeWeapons ( )

Definition at line 5769 of file hudtarget.cpp.

Member Function Documentation

void HudGaugeWeapons::initBitmapsPrimaryLast ( char *  fname,
char *  fname_ballistic 

Definition at line 5870 of file hudtarget.cpp.

void HudGaugeWeapons::initBitmapsPrimaryMiddle ( char *  fname,
char *  fname_ballistic 

Definition at line 5855 of file hudtarget.cpp.

void HudGaugeWeapons::initBitmapsPrimaryTop ( char *  fname,
char *  fname_ballistic 

Definition at line 5840 of file hudtarget.cpp.

void HudGaugeWeapons::initBitmapsSecondaryBottom ( char *  fname,
char *  fname_ballistic 

Definition at line 5913 of file hudtarget.cpp.

void HudGaugeWeapons::initBitmapsSecondaryMiddle ( char *  fname,
char *  fname_ballistic 

Definition at line 5898 of file hudtarget.cpp.

void HudGaugeWeapons::initBitmapsSecondaryTop ( char *  fname,
char *  fname_ballistic 

Definition at line 5883 of file hudtarget.cpp.

void HudGaugeWeapons::initFrameOffsetX ( int  x,
int  x_b 

Definition at line 5800 of file hudtarget.cpp.

void HudGaugeWeapons::initHeaderOffsets ( int  x,
int  y,
int  x_b,
int  y_b 

Definition at line 5792 of file hudtarget.cpp.

void HudGaugeWeapons::initLinkIcon ( )

Definition at line 5774 of file hudtarget.cpp.

void HudGaugeWeapons::initPrimaryHeights ( int  top_h,
int  text_h 

Definition at line 5828 of file hudtarget.cpp.

void HudGaugeWeapons::initPrimaryWeaponOffsets ( int  link_x,
int  name_x,
int  ammo_x 

Definition at line 5806 of file hudtarget.cpp.

void HudGaugeWeapons::initSecondaryHeights ( int  top_h,
int  text_h 

Definition at line 5834 of file hudtarget.cpp.

void HudGaugeWeapons::initSecondaryWeaponOffsets ( int  ammo_x,
int  name_x,
int  reload_x,
int  linked_x,
int  unlinked_x 

Definition at line 5813 of file hudtarget.cpp.

void HudGaugeWeapons::initStartNameOffsetsY ( int  p_y,
int  s_y 

Definition at line 5822 of file hudtarget.cpp.

void HudGaugeWeapons::initTopOffsetX ( int  x,
int  x_b 

Definition at line 5786 of file hudtarget.cpp.

void HudGaugeWeapons::maybeFlashWeapon ( int  index)

Definition at line 6175 of file hudtarget.cpp.

void HudGaugeWeapons::pageIn ( )

Reimplemented from HudGauge.

Definition at line 5928 of file hudtarget.cpp.

void HudGaugeWeapons::render ( float  frametime)

Reimplemented from HudGauge.

Definition at line 5975 of file hudtarget.cpp.

Member Data Documentation

int HudGaugeWeapons::frame_offset_x[NUM_HUD_SETTINGS]

Definition at line 301 of file hudtarget.h.

int HudGaugeWeapons::pname_start_offset_y

Definition at line 319 of file hudtarget.h.

hud_frames HudGaugeWeapons::primary_last[NUM_HUD_SETTINGS]

Definition at line 298 of file hudtarget.h.

hud_frames HudGaugeWeapons::primary_middle[NUM_HUD_SETTINGS]

Definition at line 297 of file hudtarget.h.

int HudGaugeWeapons::primary_text_h

Definition at line 324 of file hudtarget.h.

hud_frames HudGaugeWeapons::primary_top[NUM_HUD_SETTINGS]

Definition at line 292 of file hudtarget.h.

hud_frames HudGaugeWeapons::secondary_bottom[NUM_HUD_SETTINGS]

Definition at line 305 of file hudtarget.h.

hud_frames HudGaugeWeapons::secondary_middle[NUM_HUD_SETTINGS]

Definition at line 304 of file hudtarget.h.

int HudGaugeWeapons::secondary_text_h

Definition at line 326 of file hudtarget.h.

hud_frames HudGaugeWeapons::secondary_top[NUM_HUD_SETTINGS]

Definition at line 303 of file hudtarget.h.

int HudGaugeWeapons::sname_start_offset_y

Definition at line 322 of file hudtarget.h.

int HudGaugeWeapons::top_offset_x[NUM_HUD_SETTINGS]

Definition at line 293 of file hudtarget.h.

int HudGaugeWeapons::top_primary_h

Definition at line 318 of file hudtarget.h.

int HudGaugeWeapons::top_secondary_h

Definition at line 321 of file hudtarget.h.

int HudGaugeWeapons::Weapon_header_offsets[NUM_HUD_SETTINGS][2]

Definition at line 295 of file hudtarget.h.

ubyte HudGaugeWeapons::Weapon_link_icon

Definition at line 316 of file hudtarget.h.

int HudGaugeWeapons::Weapon_pammo_offset_x

Definition at line 309 of file hudtarget.h.

int HudGaugeWeapons::Weapon_plink_offset_x

Definition at line 307 of file hudtarget.h.

int HudGaugeWeapons::Weapon_pname_offset_x

Definition at line 308 of file hudtarget.h.

int HudGaugeWeapons::Weapon_sammo_offset_x

Definition at line 311 of file hudtarget.h.

int HudGaugeWeapons::Weapon_slinked_offset_x

Definition at line 314 of file hudtarget.h.

int HudGaugeWeapons::Weapon_sname_offset_x

Definition at line 312 of file hudtarget.h.

int HudGaugeWeapons::Weapon_sreload_offset_x

Definition at line 313 of file hudtarget.h.

int HudGaugeWeapons::Weapon_sunlinked_offset_x

Definition at line 315 of file hudtarget.h.

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