Changeset - r19118:d6b077cb31cd
[Not reviewed]
master
0 2 0
frosch - 13 years ago 2012-02-25 17:39:34
frosch@openttd.org
(svn r23989) -Fix-ish: Zero the offsets of disabled zoomlevels.
2 files changed with 2 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/blitter/32bpp_optimized.cpp
Show inline comments
 
@@ -337,6 +337,7 @@ Sprite *Blitter_32bppOptimized::Encode(S
 
	dest_sprite->y_offs = sprite->y_offs;
 

	
 
	SpriteData *dst = (SpriteData *)dest_sprite->data;
 
	memset(dst, 0, sizeof(*dst));
 

	
 
	for (ZoomLevel z = zoom_min; z <= zoom_max; z++) {
 
		dst->offset[z][0] = z == zoom_min ? 0 : lengths[z - 1][1] + dst->offset[z - 1][1];
src/blitter/8bpp_optimized.cpp
Show inline comments
 
@@ -141,6 +141,7 @@ Sprite *Blitter_8bppOptimized::Encode(Sp
 
	 * and the memory usage is quite low. */
 
	static ReusableBuffer<byte> temp_buffer;
 
	SpriteData *temp_dst = (SpriteData *)temp_buffer.Allocate(memory);
 
	memset(temp_dst, 0, sizeof(*temp_dst));
 
	byte *dst = temp_dst->data;
 

	
 
	/* Make the sprites per zoom-level */
0 comments (0 inline, 0 general)