(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.

This commit is contained in:
rubidium 2007-11-24 10:19:56 +00:00
parent fcbfba1e17
commit 64246a2775

View File

@ -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);
}
}
}