summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2007-06-18 18:45:12 +0000
committerpeter1138 <peter1138@openttd.org>2007-06-18 18:45:12 +0000
commit704a67ff0ba72314230e2c4b4fb9cab2654edd9d (patch)
treed94c7db55a9657361ab8c1de68448e9e70965bab /src/gfx.cpp
parent82e79b847e6c0c19010f0bf8f7bc462cdcd9ebc3 (diff)
downloadopenttd-704a67ff0ba72314230e2c4b4fb9cab2654edd9d.tar.xz
(svn r10201) -Codechange: Replace Blitter::SetHorizontalLine with Blitter::DrawRect, as the former was only used by the rectangle drawing code anyway. This lets us draw rectangles in one go.
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index d34aae7a0..f5f381e62 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -148,10 +148,7 @@ void GfxFillRect(int left, int top, int right, int bottom, int color)
if (!HASBIT(color, PALETTE_MODIFIER_GREYOUT)) {
if (!HASBIT(color, USE_COLORTABLE)) {
- do {
- blitter->SetHorizontalLine(dst, right, (uint8)color);
- dst = blitter->MoveTo(dst, 0, 1);
- } while (--bottom);
+ blitter->DrawRect(dst, right, bottom, (uint8)color);
} else {
blitter->DrawColorMappingRect(dst, right, bottom, GB(color, 0, PALETTE_WIDTH));
}