summaryrefslogtreecommitdiff
path: root/src/newgrf.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-08-30 09:46:52 +0000
committerrubidium <rubidium@openttd.org>2008-08-30 09:46:52 +0000
commitd3d34d2aac83bb6a3d53c5e05eb34f7057c6e0d1 (patch)
tree0a942538fcf6d959026cc0ef41b03b81feb28867 /src/newgrf.cpp
parente06c21426eaec662e64b02e3c0097dfaaa658d97 (diff)
downloadopenttd-d3d34d2aac83bb6a3d53c5e05eb34f7057c6e0d1.tar.xz
(svn r14191) -Codechange: unify the code to skip sprite payload (i.e. not the header).
-Fix: sprite payload skipping wouldn't skip enough bytes in a very small subset of compressed sprites.
Diffstat (limited to 'src/newgrf.cpp')
-rw-r--r--src/newgrf.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp
index 1ef2fe87c..b49605b22 100644
--- a/src/newgrf.cpp
+++ b/src/newgrf.cpp
@@ -5935,23 +5935,7 @@ void LoadNewGRFFile(GRFConfig *config, uint file_index, GrfLoadingStage stage)
}
FioSkipBytes(7);
- num -= 8;
-
- if (type & 2) {
- FioSkipBytes(num);
- } else {
- while (num > 0) {
- int8 i = FioReadByte();
- if (i >= 0) {
- num -= i;
- FioSkipBytes(i);
- } else {
- i = -(i >> 3);
- num -= i;
- FioReadByte();
- }
- }
- }
+ SkipSpriteData(type, num - 8);
}
if (_skip_sprites > 0) _skip_sprites--;