TIMER Class Reference

#include <timer.h>

Collaboration diagram for TIMER:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TIMER ()
 ~TIMER ()
void Load ()
void Reset ()
void Lap (bool storelastlap)
float GetTimer ()
void TickTimer (float timefactor, float fps)
void ResetBest ()
void ResetLast ()
void Draw ()

Private Member Functions

void SecsToSecsMin (double t, float &secs, int &min)

Private Attributes

double time
double pretime
double lastlap
double bestlap
TEXTURE_HANDLE timerbox
bool loaded

Detailed Description

Definition at line 52 of file timer.h.


Constructor & Destructor Documentation

TIMER::TIMER  ) 
 

Definition at line 27 of file timer.cpp.

References bestlap, SETTINGS::GetSettingsDir(), lastlap, loaded, pretime, settings, and time.

TIMER::~TIMER  ) 
 

Definition at line 45 of file timer.cpp.

References timerbox, and TEXTURE_HANDLE::Unload().


Member Function Documentation

void TIMER::Draw  ) 
 

Definition at line 95 of file timer.cpp.

References UTILITY::Draw2D(), font, GAMESTATE::GetGameState(), pretime, FONT::Print(), SecsToSecsMin(), STAGING_TIME, state, STATE_STAGING, timerbox, and utility.

Referenced by VAMOSWORLD::DrawTopLevel().

float TIMER::GetTimer  ) 
 

Definition at line 73 of file timer.cpp.

References time.

void TIMER::Lap bool  storelastlap  ) 
 

Definition at line 54 of file timer.cpp.

References bestlap, SETTINGS::GetSettingsDir(), lastlap, settings, and time.

void TIMER::Load  ) 
 

Definition at line 192 of file timer.cpp.

References TEXTURE_HANDLE::Load(), loaded, and timerbox.

Referenced by ChangeDisplay(), and InitGameData().

void TIMER::Reset  ) 
 

Definition at line 186 of file timer.cpp.

References pretime, and time.

Referenced by LoadWorld(), REPLAY::PlayStart(), ResetWorld(), and REPLAY::Start().

void TIMER::ResetBest  ) 
 

Definition at line 171 of file timer.cpp.

References bestlap, SETTINGS::GetSettingsDir(), and settings.

Referenced by LoadWorld().

void TIMER::ResetLast  ) 
 

Definition at line 181 of file timer.cpp.

References lastlap.

Referenced by LoadWorld().

void TIMER::SecsToSecsMin double  t,
float &  secs,
int &  min
[private]
 

Definition at line 165 of file timer.cpp.

Referenced by Draw().

void TIMER::TickTimer float  timefactor,
float  fps
 

Definition at line 78 of file timer.cpp.

References GAMESTATE::GetGameState(), pretime, GAMESTATE::SetGameState(), STAGING_TIME, state, STATE_PLAYING, STATE_STAGING, and time.

Referenced by Update().


Member Data Documentation

double TIMER::bestlap [private]
 

Definition at line 58 of file timer.h.

Referenced by Lap(), ResetBest(), and TIMER().

double TIMER::lastlap [private]
 

Definition at line 57 of file timer.h.

Referenced by Lap(), ResetLast(), and TIMER().

bool TIMER::loaded [private]
 

Definition at line 62 of file timer.h.

Referenced by Load(), and TIMER().

double TIMER::pretime [private]
 

Definition at line 56 of file timer.h.

Referenced by Draw(), Reset(), TickTimer(), and TIMER().

double TIMER::time [private]
 

Definition at line 55 of file timer.h.

Referenced by GetTimer(), Lap(), Reset(), TickTimer(), and TIMER().

TEXTURE_HANDLE TIMER::timerbox [private]
 

Definition at line 60 of file timer.h.

Referenced by Draw(), Load(), and ~TIMER().


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 04:12:33 2006 by  doxygen 1.4.6