summaryrefslogtreecommitdiffhomepage
path: root/Stars45/Font.cpp
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2022-03-08 18:17:59 +0100
committerAki <please@ignore.pl>2022-03-08 18:17:59 +0100
commitb563a07d9fcaa58514eeb3ec78438db56ecf2e63 (patch)
treef048c6cbc09787e64572362cb7fe0e2f5f92cca0 /Stars45/Font.cpp
parentf725e598935860d15099a0310a3aef7197a58e9c (diff)
downloadstarshatter-b563a07d9fcaa58514eeb3ec78438db56ecf2e63.zip
starshatter-b563a07d9fcaa58514eeb3ec78438db56ecf2e63.tar.gz
starshatter-b563a07d9fcaa58514eeb3ec78438db56ecf2e63.tar.bz2
Replaced GetRealTime uses with Game->Clock equivalent
Diffstat (limited to 'Stars45/Font.cpp')
-rw-r--r--Stars45/Font.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Stars45/Font.cpp b/Stars45/Font.cpp
index ff8bff3..3d30d29 100644
--- a/Stars45/Font.cpp
+++ b/Stars45/Font.cpp
@@ -18,8 +18,8 @@
#include "DataLoader.h"
#include "ParseUtil.h"
#include "Video.h"
-
-DWORD GetRealTime();
+#include "Game.h"
+#include "Clock.h"
// +--------------------------------------------------------------------+
@@ -643,8 +643,9 @@ Font::DrawText(const char* text, int count, Rect& text_rect, DWORD flags, Bitmap
// otherwise, draw caret if requested:
else if (caret_index >= 0 && caret_y >= text_rect.y && caret_y <= text_rect.y + text_rect.h) {//caret_y + height < text_rect.y + text_rect.h) {
Video* video = Video::GetInstance();
+ Clock* clock = Game::GetInstance()->GetClock();
- if (video && (GetRealTime() / 500) & 1) {
+ if (video && (clock->RealTime() / 500) & 1) {
float v[4];
v[0] = (float) (caret_x + 1);
v[1] = (float) (caret_y);