summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2012-03-25 19:06:59 +0000
committerrubidium <rubidium@openttd.org>2012-03-25 19:06:59 +0000
commit927734e6ce825f6b34380f73a2e73c74591dd16e (patch)
treec63e9e557e47cb68aff12e8ee01e8e41574ea900 /src/gfx.cpp
parentc8ce0faca49f85bbe72a3257bc327d14208f3d6c (diff)
downloadopenttd-927734e6ce825f6b34380f73a2e73c74591dd16e.tar.xz
(svn r24065) -Feature-ish [FS#5101]: debug option for showing the redrawn dirty blocks/rectangles
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 63baa999d..93335de8a 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -110,6 +110,7 @@ static const uint DIRTY_BLOCK_WIDTH = 64;
static uint _dirty_bytes_per_line = 0;
static byte *_dirty_blocks = NULL;
+extern uint _dirty_block_colour;
void GfxScroll(int left, int top, int width, int height, int xo, int yo)
{
@@ -1807,6 +1808,7 @@ void DrawDirtyBlocks()
} while (b++, (x += DIRTY_BLOCK_WIDTH) != w);
} while (b += -(int)(w / DIRTY_BLOCK_WIDTH) + _dirty_bytes_per_line, (y += DIRTY_BLOCK_HEIGHT) != h);
+ ++_dirty_block_colour;
_invalid_rect.left = w;
_invalid_rect.top = h;
_invalid_rect.right = 0;