summaryrefslogtreecommitdiff
path: root/src/gfx.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-13 10:31:40 +0000
committertruelight <truelight@openttd.org>2007-06-13 10:31:40 +0000
commite7221d1fa93229b8a56a84155bf20930c7b5d2aa (patch)
tree98a70aa7bd079e3d0a506b21ae4262f53fdd811c /src/gfx.cpp
parent97b74fe4f205fc65fbc2e3933fd7cb4d08e8df33 (diff)
downloadopenttd-e7221d1fa93229b8a56a84155bf20930c7b5d2aa.tar.xz
(svn r10132) -Codechange: split out the last direct video-buffer read access to the blitter-layer
-Add: added a new renderer and blitter to make room for some optimized bpp -Fix: fill the alpha channel in the grf-spriteloader
Diffstat (limited to 'src/gfx.cpp')
-rw-r--r--src/gfx.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/gfx.cpp b/src/gfx.cpp
index 332015ef3..f04524fd0 100644
--- a/src/gfx.cpp
+++ b/src/gfx.cpp
@@ -151,13 +151,7 @@ void GfxFillRect(int left, int top, int right, int bottom, int color)
dst = _screen.renderer->MoveTo(dst, 0, 1);
} while (--bottom);
} else {
- /* use colortable mode */
- const byte* ctab = GetNonSprite(GB(color, 0, PALETTE_WIDTH)) + 1;
-
- do {
- for (int i = 0; i != right; i++) _screen.renderer->SetPixel(dst, i, 0, ctab[((uint8 *)dst)[i]]);
- dst = _screen.renderer->MoveTo(dst, 0, 1);
- } while (--bottom);
+ BlitterFactoryBase::GetCurrentBlitter()->DrawColorMappingRect(dst, right, bottom, GB(color, 0, PALETTE_WIDTH));
}
} else {
byte bo = (oleft - left + dpi->left + otop - top + dpi->top) & 1;