diff options
author | Aki <please@ignore.pl> | 2022-03-23 22:57:42 +0100 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-03-23 22:57:42 +0100 |
commit | 6b2a17a2ccb1a0d45489208f7f23b9d6a65b110d (patch) | |
tree | 0c0c86871cdd51462617a946a9f35fe3501bd6a7 /Stars45/Sprite.cpp | |
parent | 9f9f2456d5ee0091bf171fae3ad321f82e5f2ca4 (diff) | |
download | starshatter-6b2a17a2ccb1a0d45489208f7f23b9d6a65b110d.zip starshatter-6b2a17a2ccb1a0d45489208f7f23b9d6a65b110d.tar.gz starshatter-6b2a17a2ccb1a0d45489208f7f23b9d6a65b110d.tar.bz2 |
Removed Clock from Game for now
While testing waters around exporting things out from Game to
GameWinDX9 I noticed that if both ContentBundle and Clock (primarily)
are removed from it, then the WinDX9 will be almost equivalent to base.
This is worrying mainly because I'm only fortified in seeing deep
relationships between various classes sadly including Video.
Diffstat (limited to 'Stars45/Sprite.cpp')
-rw-r--r-- | Stars45/Sprite.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Stars45/Sprite.cpp b/Stars45/Sprite.cpp index 295833f..9cf6f37 100644 --- a/Stars45/Sprite.cpp +++ b/Stars45/Sprite.cpp @@ -17,7 +17,7 @@ #include "Camera.h" #include "Polygon.h" #include "Video.h" -#include "Game.h" +#include "Clock.h" // +--------------------------------------------------------------------+ @@ -169,7 +169,7 @@ Sprite::SetAnimation(Bitmap* animation, int length, int repeat, int share) life = nframes; } - last_time = Game::GetInstance()->GetClock()->RealTime() - frame_time; + last_time = Clock::GetInstance()->RealTime() - frame_time; } } @@ -362,7 +362,7 @@ void Sprite::Update() { if (life > 0 || loop) { - DWORD time = Game::GetInstance()->GetClock()->RealTime(); + DWORD time = Clock::GetInstance()->RealTime(); while (time - last_time > frame_time) { life--; frame_index++; |