summaryrefslogtreecommitdiff
path: root/gfx.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2005-07-05 19:54:35 +0000
committertron <tron@openttd.org>2005-07-05 19:54:35 +0000
commita06b2fdc44a7df06b37f53dfcf2d8e57c2caf36a (patch)
tree52d7739d555b6d04e4649b8726c250c3f6464b6b /gfx.c
parentb29556e6b5c78b3700da1902ef8c8151bcf9fb41 (diff)
downloadopenttd-a06b2fdc44a7df06b37f53dfcf2d8e57c2caf36a.tar.xz
(svn r2522) Reorganize sprite load and decompression in order to remove a special case from the sprite blitter, which decompressed certain sprites every time when blitting them
Diffstat (limited to 'gfx.c')
-rw-r--r--gfx.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/gfx.c b/gfx.c
index cc4a5d6c0..00168c116 100644
--- a/gfx.c
+++ b/gfx.c
@@ -1376,38 +1376,6 @@ static void GfxMainBlitter(const Sprite* sprite, int x, int y, int mode)
}
bp.start_x = start_x;
- if (info&2) {
- int totpix = bp.height_org * bp.width_org;
- byte *dst = (byte*)alloca(totpix);
- const byte *src = bp.sprite_org;
-
- bp.sprite = dst + (bp.sprite - bp.sprite_org);
-
- while (totpix != 0) {
- signed char b;
-
- assert(totpix > 0);
-
- b = *src++;
- if (b >= 0) {
- uint count = b;
- uint i;
-
- for (i = 0; i != count; i++) dst[i] = src[i];
- dst += count;
- src += count;
- totpix -= count;
- } else {
- const byte *tmp = dst - (((b & 7) << 8) | *src++);
- uint count = -(b >> 3);
- uint i;
-
- for (i = 0; i != count; i++) dst[i] = tmp[i];
- dst += count;
- totpix -= count;
- }
- }
- }
zf_uncomp[dpi->zoom](&bp);
}
}