Pioneer
Loading...
Searching...
No Matches
Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Game Class Reference

#include <Game.h>

Collaboration diagram for Game:
Collaboration graph
[legend]

Public Types

enum  TimeAccel {
  TIMEACCEL_PAUSED , TIMEACCEL_1X , TIMEACCEL_10X , TIMEACCEL_100X ,
  TIMEACCEL_1000X , TIMEACCEL_10000X , TIMEACCEL_HYPERSPACE
}
 

Public Member Functions

 Game (const SystemPath &path, const double startDateTime=0.0)
 
 Game (const Json &jsonObj)
 
 ~Game ()
 
void ToJson (Json &jsonObj)
 
bool IsNormalSpace () const
 
bool IsHyperspace () const
 
RefCountedPtr< GalaxyGetGalaxy () const
 
SpaceGetSpace () const
 
double GetTime () const
 
PlayerGetPlayer () const
 
void TimeStep (float step)
 
bool UpdateTimeAccel ()
 
void WantHyperspace ()
 
float GetHyperspaceProgress () const
 
double GetHyperspaceDuration () const
 
double GetHyperspaceEndTime () const
 
double GetHyperspaceArrivalProbability () const
 
const SystemPathGetHyperspaceDest () const
 
const SystemPathGetHyperspaceSource () const
 
void RemoveHyperspaceCloud (HyperspaceCloud *)
 
void SetTimeAccel (TimeAccel t)
 
void RequestTimeAccel (TimeAccel t, bool force=false)
 
void RequestTimeAccelInc (bool force=false)
 
void RequestTimeAccelDec (bool force=false)
 
TimeAccel GetTimeAccel () const
 
TimeAccel GetRequestedTimeAccel () const
 
bool IsPaused () const
 
float GetTimeAccelRate () const
 
float GetInvTimeAccelRate () const
 
float GetTimeStep () const
 
SectorViewGetSectorView () const
 
SystemViewGetSystemView () const
 
WorldViewGetWorldView () const
 
DeathViewGetDeathView () const
 
ViewGetSpaceStationView () const
 
ViewGetInfoView () const
 
ObjectViewerViewGetObjectViewerView () const
 

Static Public Member Functions

static Json LoadGameToJson (const std::string &filename)
 
static GameLoadGame (const std::string &filename)
 
static bool CanLoadGame (const std::string &filename)
 
static void SaveGame (const std::string &filename, Game *game)
 

Public Attributes

GameLoglog
 

Member Enumeration Documentation

◆ TimeAccel

Enumerator
TIMEACCEL_PAUSED 
TIMEACCEL_1X 
TIMEACCEL_10X 
TIMEACCEL_100X 
TIMEACCEL_1000X 
TIMEACCEL_10000X 
TIMEACCEL_HYPERSPACE 

Constructor & Destructor Documentation

◆ Game() [1/2]

Game::Game ( const SystemPath path,
const double  startDateTime = 0.0 
)
Here is the call graph for this function:

◆ Game() [2/2]

Game::Game ( const Json jsonObj)
Here is the call graph for this function:

◆ ~Game()

Game::~Game ( )

Member Function Documentation

◆ CanLoadGame()

bool Game::CanLoadGame ( const std::string &  filename)
static
Here is the call graph for this function:

◆ GetDeathView()

DeathView * Game::GetDeathView ( ) const
inline

◆ GetGalaxy()

RefCountedPtr< Galaxy > Game::GetGalaxy ( ) const
inline

◆ GetHyperspaceArrivalProbability()

double Game::GetHyperspaceArrivalProbability ( ) const

◆ GetHyperspaceDest()

const SystemPath & Game::GetHyperspaceDest ( ) const
inline

◆ GetHyperspaceDuration()

double Game::GetHyperspaceDuration ( ) const
inline

◆ GetHyperspaceEndTime()

double Game::GetHyperspaceEndTime ( ) const
inline

◆ GetHyperspaceProgress()

float Game::GetHyperspaceProgress ( ) const
inline

◆ GetHyperspaceSource()

const SystemPath & Game::GetHyperspaceSource ( ) const
inline

◆ GetInfoView()

View * Game::GetInfoView ( ) const
inline

◆ GetInvTimeAccelRate()

float Game::GetInvTimeAccelRate ( ) const
inline

◆ GetObjectViewerView()

ObjectViewerView * Game::GetObjectViewerView ( ) const

◆ GetPlayer()

Player * Game::GetPlayer ( ) const
inline

◆ GetRequestedTimeAccel()

TimeAccel Game::GetRequestedTimeAccel ( ) const
inline

◆ GetSectorView()

SectorView * Game::GetSectorView ( ) const
inline

◆ GetSpace()

Space * Game::GetSpace ( ) const
inline

◆ GetSpaceStationView()

View * Game::GetSpaceStationView ( ) const
inline

◆ GetSystemView()

SystemView * Game::GetSystemView ( ) const
inline

◆ GetTime()

double Game::GetTime ( ) const
inline

◆ GetTimeAccel()

TimeAccel Game::GetTimeAccel ( ) const
inline

◆ GetTimeAccelRate()

float Game::GetTimeAccelRate ( ) const
inline

◆ GetTimeStep()

float Game::GetTimeStep ( ) const
inline

◆ GetWorldView()

WorldView * Game::GetWorldView ( ) const
inline

◆ IsHyperspace()

bool Game::IsHyperspace ( ) const
inline

◆ IsNormalSpace()

bool Game::IsNormalSpace ( ) const
inline

◆ IsPaused()

bool Game::IsPaused ( ) const
inline

◆ LoadGame()

Game * Game::LoadGame ( const std::string &  filename)
static
Here is the call graph for this function:

◆ LoadGameToJson()

Json Game::LoadGameToJson ( const std::string &  filename)
static
Here is the call graph for this function:

◆ RemoveHyperspaceCloud()

void Game::RemoveHyperspaceCloud ( HyperspaceCloud cloud)

◆ RequestTimeAccel()

void Game::RequestTimeAccel ( TimeAccel  t,
bool  force = false 
)

◆ RequestTimeAccelDec()

void Game::RequestTimeAccelDec ( bool  force = false)

Requests a decrease in time acceleration

Parameters
forceif set to false the system can reject the request under certain conditions

◆ RequestTimeAccelInc()

void Game::RequestTimeAccelInc ( bool  force = false)

Requests an increase in time acceleration

Parameters
forceif set to false the system can reject the request under certain conditions

◆ SaveGame()

void Game::SaveGame ( const std::string &  filename,
Game game 
)
static
Here is the call graph for this function:

◆ SetTimeAccel()

void Game::SetTimeAccel ( TimeAccel  t)
Here is the call graph for this function:

◆ TimeStep()

void Game::TimeStep ( float  step)
Here is the call graph for this function:

◆ ToJson()

void Game::ToJson ( Json jsonObj)
Here is the call graph for this function:

◆ UpdateTimeAccel()

bool Game::UpdateTimeAccel ( )
Here is the call graph for this function:

◆ WantHyperspace()

void Game::WantHyperspace ( )

Member Data Documentation

◆ log

GameLog* Game::log

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