diff options
author | Einar Johan Trøan Sømåen | 2012-07-29 18:22:10 +0200 |
---|---|---|
committer | Einar Johan Trøan Sømåen | 2012-07-29 18:24:08 +0200 |
commit | 6b07218eb24e91865eee277758112e5bb4fecd97 (patch) | |
tree | 2b78f1bc62bc73b910a95063c57da690eac8b10a /engines/wintermute/base/gfx | |
parent | 20e2ec4ff4d869ba54edf5b930d84340245292b6 (diff) | |
download | scummvm-rg350-6b07218eb24e91865eee277758112e5bb4fecd97.tar.gz scummvm-rg350-6b07218eb24e91865eee277758112e5bb4fecd97.tar.bz2 scummvm-rg350-6b07218eb24e91865eee277758112e5bb4fecd97.zip |
WINTERMUTE: Remove statics and silence spam in debug console.
Diffstat (limited to 'engines/wintermute/base/gfx')
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_render_osystem.cpp | 21 | ||||
-rw-r--r-- | engines/wintermute/base/gfx/osystem/base_render_osystem.h | 2 |
2 files changed, 9 insertions, 14 deletions
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp index f407a871b0..fa0663dc65 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.cpp @@ -105,7 +105,6 @@ BaseRenderOSystem::BaseRenderOSystem(BaseGame *inGame) : BaseRenderer(inGame) { setAlphaMod(255);
setColorMod(255, 255, 255);
_dirtyRect = NULL;
- _disableDirtyRects = true;
}
//////////////////////////////////////////////////////////////////////////
@@ -232,12 +231,10 @@ void BaseRenderOSystem::fade(uint16 alpha) { void BaseRenderOSystem::fadeToColor(byte r, byte g, byte b, byte a, Common::Rect *rect) {
// This particular warning is rather messy, as this function is called a ton,
// thus we avoid printing it more than once.
- static bool hasWarned = false;
- if (!hasWarned) {
- if (!_disableDirtyRects) {
- warning("BaseRenderOSystem::FadeToColor - Breaks when using dirty rects");
- }
- hasWarned = true;
+
+ // TODO: Add fading with dirty rects.
+ if (!_disableDirtyRects) {
+ warning("BaseRenderOSystem::FadeToColor - Breaks when using dirty rects");
}
Common::Rect fillRect;
@@ -461,13 +458,11 @@ void BaseRenderOSystem::drawFromSurface(const Graphics::Surface *surf, Common::R //////////////////////////////////////////////////////////////////////////
bool BaseRenderOSystem::drawLine(int x1, int y1, int x2, int y2, uint32 color) {
- static bool hasWarned = false;
- if (!hasWarned) {
- if (!_disableDirtyRects) {
- warning("BaseRenderOSystem::DrawLine - doesn't work for dirty rects yet");
- }
- hasWarned = true;
+
+ if (!_disableDirtyRects) {
+ warning("BaseRenderOSystem::DrawLine - doesn't work for dirty rects yet");
}
+
byte r = RGBCOLGetR(color);
byte g = RGBCOLGetG(color);
byte b = RGBCOLGetB(color);
diff --git a/engines/wintermute/base/gfx/osystem/base_render_osystem.h b/engines/wintermute/base/gfx/osystem/base_render_osystem.h index dfffc68c17..2b6b5943c2 100644 --- a/engines/wintermute/base/gfx/osystem/base_render_osystem.h +++ b/engines/wintermute/base/gfx/osystem/base_render_osystem.h @@ -115,7 +115,7 @@ private: int _borderRight;
int _borderBottom;
- bool _disableDirtyRects;
+ static const bool _disableDirtyRects = true;
float _ratioX;
float _ratioY;
uint32 _colorMod;
|