newgrf.c
changeset 1439 c4b08bda7a43
parent 1329 a8a0d60b0a8e
child 1477 2174a73b11c9
equal deleted inserted replaced
1438:d6bf51eff1bc 1439:c4b08bda7a43
   107 
   107 
   108 
   108 
   109 #define check_length(real, wanted, where) \
   109 #define check_length(real, wanted, where) \
   110 do { \
   110 do { \
   111 	if (real < wanted) { \
   111 	if (real < wanted) { \
   112 		grfmsg(GMS_ERROR, "%s: Invalid special sprite length %d (expected %d)!", where, real, wanted); \
   112 		grfmsg(GMS_ERROR, "%s/%d: Invalid special sprite length %d (expected %d)!", \
       
   113 		       where, _cur_spriteid - _cur_grffile->sprite_offset, real, wanted); \
   113 		return; \
   114 		return; \
   114 	} \
   115 	} \
   115 } while (0)
   116 } while (0)
   116 
   117 
   117 
   118 
  1692 		grfmsg(GMS_NOTICE, "Not skipping sprites, test was false.");
  1693 		grfmsg(GMS_NOTICE, "Not skipping sprites, test was false.");
  1693 		return;
  1694 		return;
  1694 	}
  1695 	}
  1695 
  1696 
  1696 	numsprites = grf_load_byte(&buf);
  1697 	numsprites = grf_load_byte(&buf);
  1697 	grfmsg(GMS_NOTICE, "Skipping %d->+%d sprites, test was true.", _cur_spriteid - _custom_sprites_base, numsprites);
  1698 	grfmsg(GMS_NOTICE, "Skipping %d->+%d sprites, test was true.", _cur_spriteid - _cur_grffile->sprite_offset, numsprites);
  1698 	_skip_sprites = numsprites;
  1699 	_skip_sprites = numsprites;
  1699 	if (_skip_sprites == 0) {
  1700 	if (_skip_sprites == 0) {
  1700 		/* Zero means there are no sprites to skip, so
  1701 		/* Zero means there are no sprites to skip, so
  1701 		 * we use -1 to indicate that all further
  1702 		 * we use -1 to indicate that all further
  1702 		 * sprites should be skipped. */
  1703 		 * sprites should be skipped. */