diff options
author | Aki <please@ignore.pl> | 2022-03-08 19:33:59 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-03-08 19:33:59 +0100 |
commit | e472d9537ee7919630e5f6039f8425b06f6c4213 (patch) | |
tree | c146d59b532ec1ae248727faa182102cab6365e2 /Stars45/CmpSceneDlg.cpp | |
parent | b563a07d9fcaa58514eeb3ec78438db56ecf2e63 (diff) | |
download | starshatter-e472d9537ee7919630e5f6039f8425b06f6c4213.zip starshatter-e472d9537ee7919630e5f6039f8425b06f6c4213.tar.gz starshatter-e472d9537ee7919630e5f6039f8425b06f6c4213.tar.bz2 |
Replaced time funcs from Game with Clock equivalents
This excludes time compression stuff, as it will need some more
attention due to casting.
I don't quite like the long invocations that go through game instance
first then get the clock. It looks bad. I'll need to rethink how
modules are being made available in the codebase.
Diffstat (limited to 'Stars45/CmpSceneDlg.cpp')
-rw-r--r-- | Stars45/CmpSceneDlg.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Stars45/CmpSceneDlg.cpp b/Stars45/CmpSceneDlg.cpp index 96c317e..725d756 100644 --- a/Stars45/CmpSceneDlg.cpp +++ b/Stars45/CmpSceneDlg.cpp @@ -163,7 +163,7 @@ CmpSceneDlg::ExecFrame() if (begin_scene && end_scene) { double total_time = end_scene->Time() - begin_scene->Time(); subtitles_delay = total_time / nlines; - subtitles_time = Game::GetInstance()->RealTime() / 1000.0 + subtitles_delay; + subtitles_time = Game::GetInstance()->GetClock()->RealTime() / 1000.0 + subtitles_delay; } else { subtitles_delay = -1; @@ -171,7 +171,7 @@ CmpSceneDlg::ExecFrame() } if (subtitles_delay > 0) { - double seconds = Game::GetInstance()->RealTime() / 1000.0; + double seconds = Game::GetInstance()->GetClock()->RealTime() / 1000.0; if (subtitles_time <= seconds) { subtitles_time = seconds + subtitles_delay; |