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/Bitmap.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/Bitmap.cpp')
-rw-r--r-- | Stars45/Bitmap.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/Stars45/Bitmap.cpp b/Stars45/Bitmap.cpp index 865b726..e5b8811 100644 --- a/Stars45/Bitmap.cpp +++ b/Stars45/Bitmap.cpp @@ -13,9 +13,9 @@ #include "MemDebug.h" #include "Bitmap.h" +#include "Clock.h" #include "Video.h" #include "Color.h" -#include "Game.h" #include "GameWinDX9.h" // +--------------------------------------------------------------------+ @@ -72,7 +72,7 @@ Bitmap::Bitmap(int w, int h, ColorIndex* p, int t) : type(t), width(w), height(h), ownpix(false), alpha_loaded(false), texture(false), pix(p), hipix(0), mapsize(w*h), - last_modified(Game::GetInstance()->GetClock()->RealTime()) + last_modified(Clock::GetInstance()->RealTime()) { sprintf_s(filename, "Bitmap(%d, %d, index, type=%d)", w, h, (int) t); } @@ -81,7 +81,7 @@ Bitmap::Bitmap(int w, int h, Color* p, int t) : type(t), width(w), height(h), ownpix(false), alpha_loaded(false), texture(false), pix(0), hipix(p), mapsize(w*h), - last_modified(Game::GetInstance()->GetClock()->RealTime()) + last_modified(Clock::GetInstance()->RealTime()) { sprintf_s(filename, "Bitmap(%d, %d, hicolor, type=%d)", w, h, (int) t); } @@ -238,7 +238,7 @@ Bitmap::BitBlt(int x, int y, const Bitmap& srcBmp, int sx, int sy, int w, int h, } alpha_loaded = srcBmp.alpha_loaded; - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -290,7 +290,7 @@ Bitmap::CopyBitmap(const Bitmap& rhs) } } - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -312,7 +312,7 @@ Bitmap::ClearImage() ownpix = false; texture = false; - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -347,7 +347,7 @@ Bitmap::CopyImage(int w, int h, BYTE* p, int t) memcpy(pix, p, mapsize); } - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -382,7 +382,7 @@ Bitmap::CopyHighColorImage(int w, int h, DWORD* p, int t) memcpy(hipix, p, mapsize*sizeof(DWORD)); } - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -404,7 +404,7 @@ Bitmap::CopyAlphaImage(int w, int h, BYTE* a) a++; } - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } void @@ -424,7 +424,7 @@ Bitmap::CopyAlphaRedChannel(int w, int h, DWORD* a) a++; } - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -450,7 +450,7 @@ Bitmap::AutoMask(DWORD mask) p++; } - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -479,7 +479,7 @@ Bitmap::FillColor(Color c) } } - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -749,7 +749,7 @@ Bitmap::SetIndex(int x, int y, ColorIndex c) *(hipix + y*width + x) = c.Index(); } - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -767,7 +767,7 @@ Bitmap::SetColor(int x, int y, Color c) *(hipix + y*width + x) = c; } - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -1023,7 +1023,7 @@ Bitmap::DrawLine(int x1, int y1, int x2, int y2, Color color) if (!s) return; - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); // vertical lines: if (x1==x2) { @@ -1301,7 +1301,7 @@ Bitmap::DrawRect(int x1, int y1, int x2, int y2, Color color) if (top) draw_strip(s, pitch, pixsize, x1, y1, fw, color); if (bottom) draw_strip(s, pitch, pixsize, x1, y2, fw, color); - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -1332,7 +1332,7 @@ Bitmap::DrawRect(const Rect& r, Color color) if (top) draw_strip(s, pitch, pixsize, x1, y1, r.w, color); if (bottom) draw_strip(s, pitch, pixsize, x1, y2, r.w, color); - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -1359,7 +1359,7 @@ Bitmap::FillRect(int x1, int y1, int x2, int y2, Color color) for (int i = 0; i < fh; i++) draw_strip(s, pitch, pixsize, x1, y1+i, fw, color); - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -1391,7 +1391,7 @@ Bitmap::FillRect(const Rect& r, Color color) for (int i = 0; i < fh; i++) draw_strip(s, pitch, pixsize, x1, y1+i, fw, color); - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } // +--------------------------------------------------------------------+ @@ -1472,7 +1472,7 @@ Bitmap::DrawEllipse(int x1, int y1, int x2, int y2, Color color, BYTE quad) DrawEllipsePoints(x0,y0,x,y,color,quad); } - last_modified = Game::GetInstance()->GetClock()->RealTime(); + last_modified = Clock::GetInstance()->RealTime(); } void |