diff options
author | rubidium <rubidium@openttd.org> | 2007-11-24 10:19:56 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-11-24 10:19:56 +0000 |
commit | 64246a2775c56c99746727a02af509fe8d75d53f (patch) | |
tree | 29c8f0e9eb59ea31bd1b03626f0a4a214fddd6b2 | |
parent | fcbfba1e17ebcd6290d623dde1b4de855a0b0c73 (diff) | |
download | openttd-64246a2775c56c99746727a02af509fe8d75d53f.tar.xz |
(svn r11509) -Fix: off-by-one error in some sprite numbers; increase sprite number counter before loading the next sprite instead of after doing so.
-rw-r--r-- | src/newgrf.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/newgrf.cpp b/src/newgrf.cpp index 65590d870..8279a7610 100644 --- a/src/newgrf.cpp +++ b/src/newgrf.cpp @@ -2321,8 +2321,8 @@ static void NewSpriteSet(byte *buf, int len) ); for (uint16 i = 0; i < num_sets * num_ents; i++) { - LoadNextSprite(_cur_spriteid++, _file_index, _nfo_line); _nfo_line++; + LoadNextSprite(_cur_spriteid++, _file_index, _nfo_line); } } @@ -3392,8 +3392,8 @@ static void GraphicsNew(byte *buf, int len) } for (; num > 0; num--) { - LoadNextSprite(replace == 0 ? _cur_spriteid++ : replace++, _file_index, _nfo_line); _nfo_line++; + LoadNextSprite(replace == 0 ? _cur_spriteid++ : replace++, _file_index, _nfo_line); } _skip_sprites = skip_num; @@ -3806,8 +3806,8 @@ static void SpriteReplace(byte *buf, int len) ); for (uint j = 0; j < num_sprites; j++) { - LoadNextSprite(first_sprite + j, _file_index, _nfo_line); // XXX _nfo_line++; + LoadNextSprite(first_sprite + j, _file_index, _nfo_line); // XXX } } } @@ -4642,8 +4642,8 @@ static void LoadFontGlyph(byte *buf, int len) for (uint c = 0; c < num_char; c++) { SetUnicodeGlyph(size, base_char + c, _cur_spriteid); - LoadNextSprite(_cur_spriteid++, _file_index, _nfo_line); _nfo_line++; + LoadNextSprite(_cur_spriteid++, _file_index, _nfo_line); } } } |