summaryrefslogtreecommitdiff
path: root/src/blitter/8bpp_optimized.cpp
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-06-11 14:45:26 +0000
committertruelight <truelight@openttd.org>2007-06-11 14:45:26 +0000
commit31ade47910dac75f939ab2886391d739b150a25e (patch)
treecb68e278acdc3b306e225ddc6d92511279bacaa7 /src/blitter/8bpp_optimized.cpp
parent81c7c87ed7554069408e0ead49b35b381a4f229e (diff)
downloadopenttd-31ade47910dac75f939ab2886391d739b150a25e.tar.xz
(svn r10100) -Fix r10093: some code now became obsolete as it never did something
Diffstat (limited to 'src/blitter/8bpp_optimized.cpp')
-rw-r--r--src/blitter/8bpp_optimized.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/blitter/8bpp_optimized.cpp b/src/blitter/8bpp_optimized.cpp
index 51e11767e..58003b16a 100644
--- a/src/blitter/8bpp_optimized.cpp
+++ b/src/blitter/8bpp_optimized.cpp
@@ -137,18 +137,15 @@ Sprite *Blitter_8bppOptimized::Encode(SpriteLoader::Sprite *sprite, Blitter::All
for (int x = 0; x < UnScaleByZoom(sprite->width, (ZoomLevel)i); x++) {
uint color = 0;
- int count = 0;
/* Get the color keeping in mind the zoom-level */
for (int j = 0; j < ScaleByZoom(1, (ZoomLevel)i); j++) {
- if (src->m != 0) { color = src->m; count++; }
+ if (src->m != 0) color = src->m;
src++;
rx++;
/* Because of the scaling it might happen we read outside the buffer. Avoid that. */
if (rx == sprite->width) break;
}
- /* If more than 12.5% of the pixels are non-transparent, make thisone non-transparent too */
- if (count < ScaleByZoom(1, (ZoomLevel)i) / 8) color = 0;
if (last_color == 0 || color == 0) {
if (count_index != 0) {