diff options
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 |