# HG changeset patch # User pasky # Date 1110122548 0 # Node ID c4b08bda7a43b44766289558c48f08192d7a050f # Parent d6bf51eff1bce254cf4d87f9c3366000b99fc1b5 (svn r1943) Show the sprite ID in the check_length() error message. Also show the correct sprite ID in the spriteskip notice. diff -r d6bf51eff1bc -r c4b08bda7a43 newgrf.c --- a/newgrf.c Sun Mar 06 15:15:27 2005 +0000 +++ b/newgrf.c Sun Mar 06 15:22:28 2005 +0000 @@ -109,7 +109,8 @@ #define check_length(real, wanted, where) \ do { \ if (real < wanted) { \ - grfmsg(GMS_ERROR, "%s: Invalid special sprite length %d (expected %d)!", where, real, wanted); \ + grfmsg(GMS_ERROR, "%s/%d: Invalid special sprite length %d (expected %d)!", \ + where, _cur_spriteid - _cur_grffile->sprite_offset, real, wanted); \ return; \ } \ } while (0) @@ -1694,7 +1695,7 @@ } numsprites = grf_load_byte(&buf); - grfmsg(GMS_NOTICE, "Skipping %d->+%d sprites, test was true.", _cur_spriteid - _custom_sprites_base, numsprites); + grfmsg(GMS_NOTICE, "Skipping %d->+%d sprites, test was true.", _cur_spriteid - _cur_grffile->sprite_offset, numsprites); _skip_sprites = numsprites; if (_skip_sprites == 0) { /* Zero means there are no sprites to skip, so