Changeset - r21167:79b12867f6d4
[Not reviewed]
master
0 4 0
rubidium - 11 years ago 2014-01-13 18:03:35
rubidium@openttd.org
(svn r26253) -Codechange: remove margin limitation to preserve block type (MJP)
4 files changed with 7 insertions and 3 deletions:
0 comments (0 inline, 0 general)
src/blitter/32bpp_anim_sse4.cpp
Show inline comments
 
@@ -64,6 +64,7 @@ inline void Blitter_32bppSSE4_Anim::Draw
 
		uint16 *anim = anim_line;
 

	
 
		if (read_mode == RM_WITH_MARGIN) {
 
			assert(bt_last == BT_NONE); // or you must ensure block type is preserved
 
			anim += src_rgba_line[0].data;
 
			src += src_rgba_line[0].data;
 
			dst += src_rgba_line[0].data;
src/blitter/32bpp_sse2.cpp
Show inline comments
 
@@ -56,6 +56,7 @@ inline void Blitter_32bppSSE2::Draw(cons
 
		if (mode == BM_COLOUR_REMAP) src_mv = src_mv_line;
 

	
 
		if (read_mode == RM_WITH_MARGIN) {
 
			assert(bt_last == BT_NONE); // or you must ensure block type is preserved
 
			src += src_rgba_line[0].data;
 
			dst += src_rgba_line[0].data;
 
			if (mode == BM_COLOUR_REMAP) src_mv += src_rgba_line[0].data;
 
@@ -181,7 +182,7 @@ void Blitter_32bppSSE2::Draw(Blitter::Bl
 

	
 
Sprite *Blitter_32bppSSE_Base::Encode(const SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
 
{
 
	/* First uint32 of a line = ~1 & the number of transparent pixels from the left.
 
	/* First uint32 of a line = the number of transparent pixels from the left.
 
	 * Second uint32 of a line = the number of transparent pixels from the right.
 
	 * Then all RGBA then all MV.
 
	 */
 
@@ -261,7 +262,7 @@ Sprite *Blitter_32bppSSE_Base::Encode(co
 
				else break;
 
				dst_rgba++;
 
			}
 
			(*dst_rgba_line).data = nb_pix_transp & ~1; // "& ~1" to preserve the last block type
 
			(*dst_rgba_line).data = nb_pix_transp;
 

	
 
			Colour *nb_right = dst_rgba_line + 1;
 
			dst_rgba_line = (Colour*) ((byte*) dst_rgba_line + sd.infos[z].sprite_line_size);
 
@@ -274,7 +275,7 @@ Sprite *Blitter_32bppSSE_Base::Encode(co
 
				else break;
 
				dst_rgba--;
 
			}
 
			(*nb_right).data = nb_pix_transp; // no "& ~1" here, must be done when we know bp->width
 
			(*nb_right).data = nb_pix_transp;
 
		}
 
	}
 

	
src/blitter/32bpp_sse4.cpp
Show inline comments
 
@@ -62,6 +62,7 @@ inline void Blitter_32bppSSE4::Draw(cons
 
		if (mode == BM_COLOUR_REMAP) src_mv = src_mv_line;
 

	
 
		if (read_mode == RM_WITH_MARGIN) {
 
			assert(bt_last == BT_NONE); // or you must ensure block type is preserved
 
			src += src_rgba_line[0].data;
 
			dst += src_rgba_line[0].data;
 
			if (mode == BM_COLOUR_REMAP) src_mv += src_rgba_line[0].data;
src/blitter/32bpp_ssse3.cpp
Show inline comments
 
@@ -62,6 +62,7 @@ inline void Blitter_32bppSSSE3::Draw(con
 
		if (mode == BM_COLOUR_REMAP) src_mv = src_mv_line;
 

	
 
		if (read_mode == RM_WITH_MARGIN) {
 
			assert(bt_last == BT_NONE); // or you must ensure block type is preserved
 
			src += src_rgba_line[0].data;
 
			dst += src_rgba_line[0].data;
 
			if (mode == BM_COLOUR_REMAP) src_mv += src_rgba_line[0].data;
0 comments (0 inline, 0 general)