diff options
author | peter1138 <peter1138@openttd.org> | 2007-06-18 18:45:12 +0000 |
---|---|---|
committer | peter1138 <peter1138@openttd.org> | 2007-06-18 18:45:12 +0000 |
commit | c31ff284c321be86dcd3e4640f11b4e82a6c7cb4 (patch) | |
tree | d94c7db55a9657361ab8c1de68448e9e70965bab /src/gfx.cpp | |
parent | b09431478d416ceb58f9676d67c1cc3b4af397bc (diff) | |
download | openttd-c31ff284c321be86dcd3e4640f11b4e82a6c7cb4.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.cpp | 5 |
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)); } |