summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Sim.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Stars45/Sim.cpp')
-rw-r--r--Stars45/Sim.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/Stars45/Sim.cpp b/Stars45/Sim.cpp
index 910a778..ccfab62 100644
--- a/Stars45/Sim.cpp
+++ b/Stars45/Sim.cpp
@@ -65,6 +65,7 @@
#include "NetData.h"
#include "Game.h"
+#include "Clock.h"
#include "ContentBundle.h"
#include "Sound.h"
#include "Bolt.h"
@@ -395,7 +396,7 @@ Sim::ExecMission()
}
first_frame = true;
- start_time = Game::GetInstance()->GetClock()->GameTime();
+ start_time = Clock::GetInstance()->GameTime();
AudioConfig::SetTraining(mission->Type() == Mission::TRAINING);
}
@@ -1896,7 +1897,7 @@ Sim::ProcessEventTrigger(int type, int event_id, const char* ship, int param)
double
Sim::MissionClock() const
{
- return (Game::GetInstance()->GetClock()->GameTime() - start_time) / 1000.0;
+ return (Clock::GetInstance()->GameTime() - start_time) / 1000.0;
}
// +--------------------------------------------------------------------+
@@ -1933,7 +1934,7 @@ Sim::SkipCutscene()
double skip_time = end_time - MissionClock();
if (skip_time > 0) {
- Game::GetInstance()->GetClock()->SkipGameTime(skip_time);
+ Clock::GetInstance()->SkipGameTime(skip_time);
}
}
}
@@ -1987,7 +1988,7 @@ Sim::ResolveTimeSkip(double seconds)
player_ship->SetControls(0);
}
- Game::GetInstance()->GetClock()->SkipGameTime(skipped);
+ Clock::GetInstance()->SkipGameTime(skipped);
CameraDirector::SetCameraMode(CameraDirector::MODE_COCKPIT);
}
@@ -2510,7 +2511,7 @@ SimRegion::ExecFrame(double secs)
// DON'T REALLY KNOW WHAT PURPOSE THIS SERVES....
if (!active) {
double max_frame = 3 * Game::GetInstance()->GetMaxFrameLength();
- long new_time = Game::GetInstance()->GetClock()->GameTime();
+ long new_time = Clock::GetInstance()->GameTime();
double delta = new_time - sim_time;
seconds = delta / 1000.0;
@@ -2518,7 +2519,7 @@ SimRegion::ExecFrame(double secs)
seconds = max_frame;
}
- sim_time = Game::GetInstance()->GetClock()->GameTime();
+ sim_time = Clock::GetInstance()->GameTime();
if (orbital_region)
location = orbital_region->Location();
@@ -3798,7 +3799,7 @@ const char* FormatGameTime()
{
static char txt[64];
- int t = Game::GetInstance()->GetClock()->GameTime();
+ int t = Clock::GetInstance()->GameTime();
int h = ( t / 3600000);
int m = ((t - h*3600000) / 60000);