Starshatter_Open
Open source Starshatter engine
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
HUDView Class Reference

#include <HUDView.h>

Inheritance diagram for HUDView:
View SimObserver

List of all members.

Public Types

enum  HUDModes { HUD_MODE_OFF, HUD_MODE_TAC, HUD_MODE_NAV, HUD_MODE_ILS }

Public Member Functions

 HUDView (Window *c)
virtual ~HUDView ()
virtual void Refresh ()
virtual void OnWindowMove ()
virtual void ExecFrame ()
virtual void UseCameraView (CameraView *v)
virtual ShipGetShip () const
virtual SimObjectGetTarget () const
virtual void SetShip (Ship *s)
virtual void SetTarget (SimObject *t)
virtual MFDGetMFD (int n) const
virtual void HideAll ()
virtual void DrawBars ()
virtual void DrawNav ()
virtual void DrawILS ()
virtual void DrawObjective ()
virtual void DrawNavInfo ()
virtual void DrawNavPoint (Instruction &navpt, int index, int next)
virtual void DrawContactMarkers ()
virtual void DrawContact (Contact *c, int index)
virtual void DrawTrack (Contact *c)
virtual void DrawTrackSegment (Point &t1, Point &t2, Color c)
virtual void DrawRect (SimObject *targ)
virtual void DrawTarget ()
virtual void DrawSight ()
virtual void DrawLCOS (SimObject *targ, double dist)
virtual void DrawDesignators ()
virtual void DrawFPM ()
virtual void DrawHPM ()
virtual void DrawCompass ()
virtual void HideCompass ()
virtual void DrawPitchLadder ()
virtual void DrawStarSystem ()
virtual void DrawMFDs ()
virtual void DrawWarningPanel ()
virtual void DrawInstructions ()
virtual void DrawMessages ()
virtual void MouseFrame ()
virtual int GetHUDMode () const
virtual int GetTacticalMode () const
virtual void SetTacticalMode (int mode=1)
virtual int GetOverlayMode () const
virtual void SetOverlayMode (int mode=1)
virtual void SetHUDMode (int mode)
virtual void CycleHUDMode ()
virtual Color CycleHUDColor ()
virtual void SetHUDColorSet (int c)
virtual int GetHUDColorSet () const
virtual Color GetHUDColor () const
virtual Color GetTextColor () const
virtual Color Ambient () const
virtual void ShowHUDWarn ()
virtual void ShowHUDInst ()
virtual void HideHUDWarn ()
virtual void HideHUDInst ()
virtual void CycleHUDWarn ()
virtual void CycleHUDInst ()
virtual void CycleMFDMode (int mfd)
virtual void CycleInstructions (int direction)
virtual void RestoreHUD ()
virtual void TargetOff ()
virtual bool Update (SimObject *obj)
virtual const char * GetObserverName () const
- Public Member Functions inherited from View
 View (Window *c)
virtual ~View ()
int operator== (const View &that) const
virtual void OnShow ()
virtual void OnHide ()
virtual void SetWindow (Window *w)
virtual WindowGetWindow ()
- Public Member Functions inherited from SimObserver
virtual ~SimObserver ()
int operator== (const SimObserver &o) const
virtual void Observe (SimObject *obj)
virtual void Ignore (SimObject *obj)

Static Public Member Functions

static Color MarkerColor (Contact *targ)
static bool IsNameCrowded (int x, int y)
static bool IsMouseLatched ()
static HUDViewGetInstance ()
static void Message (const char *fmt,...)
static void ClearMessages ()
static void PrepareBitmap (const char *name, Bitmap &img, BYTE *&shades)
static void TransferBitmap (const Bitmap &src, Bitmap &img, BYTE *&shades)
static void ColorizeBitmap (Bitmap &img, BYTE *shades, Color color, bool force_alpha=false)
static int GetGunsight ()
static void SetGunsight (int s)
static bool IsArcade ()
static void SetArcade (bool a)
static int DefaultColorSet ()
static void SetDefaultColorSet (int c)
static Color GetStatusColor (System::STATUS status)
static bool ShowFPS ()
static void ShowFPS (bool f)
- Static Public Member Functions inherited from View
static const char * TYPENAME ()
- Static Public Member Functions inherited from SimObserver
static const char * TYPENAME ()

Protected Types

enum  HUD_CASE { HUD_MIXED_CASE, HUD_UPPER_CASE }
enum  { MAX_MSG = 6 }

Protected Member Functions

const char * FormatInstruction (Text instr)
void SetStatusColor (System::STATUS status)
void DrawDiamond (int x, int y, int r, Color c)
void DrawHUDText (int index, const char *txt, Rect &rect, int align, int upcase=HUD_UPPER_CASE, bool box=false)
void HideHUDText (int index)
void DrawOrbitalBody (OrbitalBody *body)

Protected Attributes

Projectorprojector
CameraViewcamview
int width
int height
int aw
int ah
double xcenter
double ycenter
Simsim
Shipship
SimObjecttarget
SimRegionactive_region
Bitmapcockpit_hud_texture
Color hud_color
Color txt_color
Color status_color
bool show_warn
bool show_inst
int inst_page
int threat
int mode
int color
int tactical
int overlay
int transition
int docking
MFDmfd [3]
Spritepitch_ladder [31]
Spritehud_sprite [32]
Solidaz_ring
Solidaz_pointer
Solidel_ring
Solidel_pointer
double compass_scale
Text msg_text [MAX_MSG]
double msg_time [MAX_MSG]
- Protected Attributes inherited from View
Windowwindow
- Protected Attributes inherited from SimObserver
List< SimObjectobserve_list

Static Protected Attributes

static HUDViewhud_view = 0
static bool arcade = false
static bool show_fps = false
static int gunsight = 1
static int def_color_set = 1

Detailed Description

Definition at line 43 of file HUDView.h.


Member Enumeration Documentation

anonymous enum
protected
Enumerator:
MAX_MSG 

Definition at line 196 of file HUDView.h.

enum HUDView::HUD_CASE
protected
Enumerator:
HUD_MIXED_CASE 
HUD_UPPER_CASE 

Definition at line 147 of file HUDView.h.

Enumerator:
HUD_MODE_OFF 
HUD_MODE_TAC 
HUD_MODE_NAV 
HUD_MODE_ILS 

Definition at line 50 of file HUDView.h.


Constructor & Destructor Documentation

HUDView::HUDView ( Window c)

Definition at line 348 of file HUDView.cpp.

HUDView::~HUDView ( )
virtual

Definition at line 624 of file HUDView.cpp.


Member Function Documentation

Color HUDView::Ambient ( ) const
virtual

Definition at line 3992 of file HUDView.cpp.

void HUDView::ClearMessages ( )
static

Definition at line 4119 of file HUDView.cpp.

void HUDView::ColorizeBitmap ( Bitmap img,
BYTE *  shades,
Color  color,
bool  force_alpha = false 
)
static

Definition at line 4179 of file HUDView.cpp.

Color HUDView::CycleHUDColor ( )
virtual

Definition at line 4012 of file HUDView.cpp.

void HUDView::CycleHUDInst ( )
virtual

Definition at line 3874 of file HUDView.cpp.

void HUDView::CycleHUDMode ( )
virtual

Definition at line 3899 of file HUDView.cpp.

void HUDView::CycleHUDWarn ( )
virtual

Definition at line 3862 of file HUDView.cpp.

void HUDView::CycleInstructions ( int  direction)
virtual

Definition at line 2854 of file HUDView.cpp.

void HUDView::CycleMFDMode ( int  mfd)
virtual

Definition at line 3793 of file HUDView.cpp.

static int HUDView::DefaultColorSet ( )
inlinestatic

Definition at line 134 of file HUDView.h.

void HUDView::DrawBars ( )
virtual

Definition at line 1308 of file HUDView.cpp.

void HUDView::DrawCompass ( )
virtual

Definition at line 1807 of file HUDView.cpp.

void HUDView::DrawContact ( Contact c,
int  index 
)
virtual

Definition at line 1014 of file HUDView.cpp.

void HUDView::DrawContactMarkers ( )
virtual

Definition at line 879 of file HUDView.cpp.

void HUDView::DrawDesignators ( )
virtual

Definition at line 2264 of file HUDView.cpp.

void HUDView::DrawDiamond ( int  x,
int  y,
int  r,
Color  c 
)
protected

Definition at line 4348 of file HUDView.cpp.

void HUDView::DrawFPM ( )
virtual

Definition at line 1574 of file HUDView.cpp.

void HUDView::DrawHPM ( )
virtual

Definition at line 1750 of file HUDView.cpp.

void HUDView::DrawHUDText ( int  index,
const char *  txt,
Rect rect,
int  align,
int  upcase = HUD_UPPER_CASE,
bool  box = false 
)
protected

Definition at line 245 of file HUDView.cpp.

void HUDView::DrawILS ( )
virtual

Definition at line 2943 of file HUDView.cpp.

void HUDView::DrawInstructions ( )
virtual

Definition at line 2747 of file HUDView.cpp.

void HUDView::DrawLCOS ( SimObject targ,
double  dist 
)
virtual

Definition at line 1863 of file HUDView.cpp.

void HUDView::DrawMessages ( )
virtual

Definition at line 2865 of file HUDView.cpp.

void HUDView::DrawMFDs ( )
virtual

Definition at line 3629 of file HUDView.cpp.

void HUDView::DrawNav ( )
virtual

Definition at line 2916 of file HUDView.cpp.

void HUDView::DrawNavInfo ( )
virtual

Definition at line 2161 of file HUDView.cpp.

void HUDView::DrawNavPoint ( Instruction navpt,
int  index,
int  next 
)
virtual

Definition at line 3100 of file HUDView.cpp.

void HUDView::DrawObjective ( )
virtual

Definition at line 3052 of file HUDView.cpp.

void HUDView::DrawOrbitalBody ( OrbitalBody body)
protected

Definition at line 3656 of file HUDView.cpp.

void HUDView::DrawPitchLadder ( )
virtual

Definition at line 1608 of file HUDView.cpp.

void HUDView::DrawRect ( SimObject targ)
virtual

Definition at line 1248 of file HUDView.cpp.

void HUDView::DrawSight ( )
virtual

Definition at line 2249 of file HUDView.cpp.

void HUDView::DrawStarSystem ( )
virtual

Definition at line 3642 of file HUDView.cpp.

void HUDView::DrawTarget ( )
virtual

Definition at line 1992 of file HUDView.cpp.

void HUDView::DrawTrack ( Contact c)
virtual

Definition at line 1220 of file HUDView.cpp.

void HUDView::DrawTrackSegment ( Point t1,
Point t2,
Color  c 
)
virtual

Definition at line 1173 of file HUDView.cpp.

void HUDView::DrawWarningPanel ( )
virtual

Definition at line 2630 of file HUDView.cpp.

void HUDView::ExecFrame ( )
virtual

Definition at line 3686 of file HUDView.cpp.

const char * HUDView::FormatInstruction ( Text  instr)
protected

Definition at line 2814 of file HUDView.cpp.

static int HUDView::GetGunsight ( )
inlinestatic

Definition at line 130 of file HUDView.h.

virtual Color HUDView::GetHUDColor ( ) const
inlinevirtual

Definition at line 105 of file HUDView.h.

virtual int HUDView::GetHUDColorSet ( ) const
inlinevirtual

Definition at line 104 of file HUDView.h.

virtual int HUDView::GetHUDMode ( ) const
inlinevirtual

Definition at line 94 of file HUDView.h.

static HUDView* HUDView::GetInstance ( )
inlinestatic

Definition at line 123 of file HUDView.h.

MFD * HUDView::GetMFD ( int  n) const
virtual

Definition at line 3365 of file HUDView.cpp.

const char * HUDView::GetObserverName ( ) const
virtual

Reimplemented from SimObserver.

Definition at line 830 of file HUDView.cpp.

virtual int HUDView::GetOverlayMode ( ) const
inlinevirtual

Definition at line 97 of file HUDView.h.

virtual Ship* HUDView::GetShip ( ) const
inlinevirtual

Definition at line 58 of file HUDView.h.

Color HUDView::GetStatusColor ( System::STATUS  status)
static

Definition at line 2387 of file HUDView.cpp.

virtual int HUDView::GetTacticalMode ( ) const
inlinevirtual

Definition at line 95 of file HUDView.h.

virtual SimObject* HUDView::GetTarget ( ) const
inlinevirtual

Definition at line 59 of file HUDView.h.

virtual Color HUDView::GetTextColor ( ) const
inlinevirtual

Definition at line 106 of file HUDView.h.

void HUDView::HideAll ( )
virtual

Definition at line 3953 of file HUDView.cpp.

void HUDView::HideCompass ( )
virtual

Definition at line 1788 of file HUDView.cpp.

void HUDView::HideHUDInst ( )
virtual

Definition at line 3854 of file HUDView.cpp.

void HUDView::HideHUDText ( int  index)
protected

Definition at line 330 of file HUDView.cpp.

void HUDView::HideHUDWarn ( )
virtual

Definition at line 3843 of file HUDView.cpp.

static bool HUDView::IsArcade ( )
inlinestatic

Definition at line 132 of file HUDView.h.

bool HUDView::IsMouseLatched ( )
static

Definition at line 4297 of file HUDView.cpp.

bool HUDView::IsNameCrowded ( int  x,
int  y 
)
static

Definition at line 4314 of file HUDView.cpp.

Color HUDView::MarkerColor ( Contact targ)
static

Definition at line 853 of file HUDView.cpp.

void HUDView::Message ( const char *  fmt,
  ... 
)
static

Definition at line 4078 of file HUDView.cpp.

void HUDView::MouseFrame ( )
virtual

Definition at line 4219 of file HUDView.cpp.

void HUDView::OnWindowMove ( )
virtual

Reimplemented from View.

Definition at line 737 of file HUDView.cpp.

void HUDView::PrepareBitmap ( const char *  name,
Bitmap img,
BYTE *&  shades 
)
static

Definition at line 4132 of file HUDView.cpp.

void HUDView::Refresh ( )
virtual

Reimplemented from View.

Definition at line 3376 of file HUDView.cpp.

void HUDView::RestoreHUD ( )
virtual

Definition at line 3917 of file HUDView.cpp.

static void HUDView::SetArcade ( bool  a)
inlinestatic

Definition at line 133 of file HUDView.h.

static void HUDView::SetDefaultColorSet ( int  c)
inlinestatic

Definition at line 135 of file HUDView.h.

static void HUDView::SetGunsight ( int  s)
inlinestatic

Definition at line 131 of file HUDView.h.

void HUDView::SetHUDColorSet ( int  c)
virtual

Definition at line 4020 of file HUDView.cpp.

void HUDView::SetHUDMode ( int  mode)
virtual

Definition at line 3883 of file HUDView.cpp.

void HUDView::SetOverlayMode ( int  mode = 1)
virtual

Definition at line 798 of file HUDView.cpp.

void HUDView::SetShip ( Ship s)
virtual

Definition at line 3220 of file HUDView.cpp.

void HUDView::SetStatusColor ( System::STATUS  status)
protected

Definition at line 2403 of file HUDView.cpp.

void HUDView::SetTacticalMode ( int  mode = 1)
virtual

Definition at line 778 of file HUDView.cpp.

void HUDView::SetTarget ( SimObject t)
virtual

Definition at line 3323 of file HUDView.cpp.

static bool HUDView::ShowFPS ( )
inlinestatic

Definition at line 137 of file HUDView.h.

static void HUDView::ShowFPS ( bool  f)
inlinestatic

Definition at line 138 of file HUDView.h.

void HUDView::ShowHUDInst ( )
virtual

Definition at line 3835 of file HUDView.cpp.

void HUDView::ShowHUDWarn ( )
virtual

Definition at line 3822 of file HUDView.cpp.

virtual void HUDView::TargetOff ( )
inlinevirtual

Definition at line 118 of file HUDView.h.

void HUDView::TransferBitmap ( const Bitmap src,
Bitmap img,
BYTE *&  shades 
)
static

Definition at line 4157 of file HUDView.cpp.

bool HUDView::Update ( SimObject obj)
virtual

Reimplemented from SimObserver.

Definition at line 808 of file HUDView.cpp.

void HUDView::UseCameraView ( CameraView v)
virtual

Definition at line 838 of file HUDView.cpp.


Member Data Documentation

SimRegion* HUDView::active_region
protected

Definition at line 165 of file HUDView.h.

int HUDView::ah
protected

Definition at line 158 of file HUDView.h.

bool HUDView::arcade = false
staticprotected

Definition at line 201 of file HUDView.h.

int HUDView::aw
protected

Definition at line 158 of file HUDView.h.

Solid* HUDView::az_pointer
protected

Definition at line 191 of file HUDView.h.

Solid* HUDView::az_ring
protected

Definition at line 190 of file HUDView.h.

CameraView* HUDView::camview
protected

Definition at line 156 of file HUDView.h.

Bitmap* HUDView::cockpit_hud_texture
protected

Definition at line 167 of file HUDView.h.

int HUDView::color
protected

Definition at line 179 of file HUDView.h.

double HUDView::compass_scale
protected

Definition at line 194 of file HUDView.h.

int HUDView::def_color_set = 1
staticprotected

Definition at line 204 of file HUDView.h.

int HUDView::docking
protected

Definition at line 183 of file HUDView.h.

Solid* HUDView::el_pointer
protected

Definition at line 193 of file HUDView.h.

Solid* HUDView::el_ring
protected

Definition at line 192 of file HUDView.h.

int HUDView::gunsight = 1
staticprotected

Definition at line 203 of file HUDView.h.

int HUDView::height
protected

Definition at line 158 of file HUDView.h.

Color HUDView::hud_color
protected

Definition at line 169 of file HUDView.h.

Sprite* HUDView::hud_sprite[32]
protected

Definition at line 188 of file HUDView.h.

HUDView * HUDView::hud_view = 0
staticprotected

Definition at line 200 of file HUDView.h.

int HUDView::inst_page
protected

Definition at line 175 of file HUDView.h.

MFD* HUDView::mfd[3]
protected

Definition at line 185 of file HUDView.h.

int HUDView::mode
protected

Definition at line 178 of file HUDView.h.

Text HUDView::msg_text[MAX_MSG]
protected

Definition at line 197 of file HUDView.h.

double HUDView::msg_time[MAX_MSG]
protected

Definition at line 198 of file HUDView.h.

int HUDView::overlay
protected

Definition at line 181 of file HUDView.h.

Sprite* HUDView::pitch_ladder[31]
protected

Definition at line 187 of file HUDView.h.

Projector* HUDView::projector
protected

Definition at line 155 of file HUDView.h.

Ship* HUDView::ship
protected

Definition at line 162 of file HUDView.h.

bool HUDView::show_fps = false
staticprotected

Definition at line 202 of file HUDView.h.

bool HUDView::show_inst
protected

Definition at line 174 of file HUDView.h.

bool HUDView::show_warn
protected

Definition at line 173 of file HUDView.h.

Sim* HUDView::sim
protected

Definition at line 161 of file HUDView.h.

Color HUDView::status_color
protected

Definition at line 171 of file HUDView.h.

int HUDView::tactical
protected

Definition at line 180 of file HUDView.h.

SimObject* HUDView::target
protected

Definition at line 163 of file HUDView.h.

int HUDView::threat
protected

Definition at line 176 of file HUDView.h.

int HUDView::transition
protected

Definition at line 182 of file HUDView.h.

Color HUDView::txt_color
protected

Definition at line 170 of file HUDView.h.

int HUDView::width
protected

Definition at line 158 of file HUDView.h.

double HUDView::xcenter
protected

Definition at line 159 of file HUDView.h.

double HUDView::ycenter
protected

Definition at line 159 of file HUDView.h.


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