File diff r2014:c6a34c339dda → r2015:73fac0e1e64b
spritecache.c
Show inline comments
 
@@ -176,25 +176,25 @@ static void* ReadSprite(SpriteID id)
 

	
 
		return dest;
 
	} else {
 
		uint height = FioReadByte();
 
		uint width  = FioReadWord();
 
		Sprite* sprite;
 
		byte* dest;
 

	
 
		num = (type & 0x02) ? width * height : num - 8;
 
		sprite = AllocSprite(sizeof(*sprite) + num);
 
		_sprite_ptr[id] = sprite;
 
		sprite->info   = type;
 
		sprite->height = (id != 142) ? height : 10;
 
		sprite->height = (id != 142) ? height : 10; // Compensate for a TTD bug
 
		sprite->width  = width;
 
		sprite->x_offs = FioReadWord();
 
		sprite->y_offs = FioReadWord();
 

	
 
		dest = sprite->data;
 
		while (num > 0) {
 
			int8 i = FioReadByte();
 

	
 
			if (i >= 0) {
 
				num -= i;
 
				for (; i > 0; --i) *dest++ = FioReadByte();
 
			} else {