summaryrefslogtreecommitdiff
path: root/newgrf.c
diff options
context:
space:
mode:
authorpasky <pasky@openttd.org>2005-03-06 15:22:28 +0000
committerpasky <pasky@openttd.org>2005-03-06 15:22:28 +0000
commit25aa47448d20f531852c6e027353015188d74050 (patch)
treecbf4e9ff6325d702e118d8070dcff2e740803e37 /newgrf.c
parent83cbb7b1da6397b0b6f1186f21414ecedd2bd6ca (diff)
downloadopenttd-25aa47448d20f531852c6e027353015188d74050.tar.xz
(svn r1943) Show the sprite ID in the check_length() error message. Also show the correct sprite ID in the spriteskip notice.
Diffstat (limited to 'newgrf.c')
-rw-r--r--newgrf.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/newgrf.c b/newgrf.c
index f96459734..8703dd940 100644
--- a/newgrf.c
+++ b/newgrf.c
@@ -109,7 +109,8 @@ static void CDECL grfmsg(enum grfmsg_severity severity, const char *str, ...)
#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 @@ static void SkipIf(byte *buf, int len)
}
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