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
commit951ea4ae6d6e62d7f7a24b34bb859d5b6982f89e (patch)
tree0a942538fcf6d959026cc0ef41b03b81feb28867 /src/newgrf.cpp
parent943031bdaf52a66d7b9b59fce694654ce1450ffd (diff)
downloadopenttd-951ea4ae6d6e62d7f7a24b34bb859d5b6982f89e.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--;