ScummVM API documentation
hpl::cLogicTimer Class Reference

Public Member Functions

 cLogicTimer (int alUpdatesPerSec, LowLevelSystem *apLowLevelSystem)
 
void Reset ()
 
bool WantUpdate ()
 
void EndUpdateLoop ()
 
void SetUpdatesPerSec (int alUpdatesPerSec)
 
void SetMaxUpdates (int alMax)
 
int GetUpdatesPerSec ()
 
float GetStepSize ()
 

Constructor & Destructor Documentation

◆ cLogicTimer()

hpl::cLogicTimer::cLogicTimer ( int  alUpdatesPerSec,
LowLevelSystem apLowLevelSystem 
)
Parameters
alUpdatesPerSecNumber of updates per second.
*apLowLevelSystem
Returns

Member Function Documentation

◆ Reset()

void hpl::cLogicTimer::Reset ( )

Reset the time. Do this when the logical update of the game has been ide, ie while loading.

◆ WantUpdate()

bool hpl::cLogicTimer::WantUpdate ( )

Check with the time if it is time for another logical update

Returns
true if logic should be updated, else false.

◆ EndUpdateLoop()

void hpl::cLogicTimer::EndUpdateLoop ( )

Resets various variables that makes the graphics is never frozen.

◆ SetUpdatesPerSec()

void hpl::cLogicTimer::SetUpdatesPerSec ( int  alUpdatesPerSec)

Set the number of times per second to update

Parameters
alUpdatesPerSec

◆ SetMaxUpdates()

void hpl::cLogicTimer::SetMaxUpdates ( int  alMax)

Sets the maximum updates in a row.

Parameters
alUpdatesPerSec

◆ GetUpdatesPerSec()

int hpl::cLogicTimer::GetUpdatesPerSec ( )

Get the number of updates per second.

◆ GetStepSize()

float hpl::cLogicTimer::GetStepSize ( )

Get the size of each step in seconds.


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