Changeset - r2037:9afd8a3c24f6
[Not reviewed]
master
0 1 0
tron - 19 years ago 2005-07-11 15:47:20
tron@openttd.org
(svn r2546) Don't calculate a value which never gets used and simplify some calculations
1 file changed with 4 insertions and 9 deletions:
gfx.c
4
9
0 comments (0 inline, 0 general)
gfx.c
Show inline comments
 
@@ -1351,30 +1351,25 @@ static void GfxMainBlitter(const Sprite*
 
			bp.dst += bp.pitch * (y >> dpi->zoom);
 
		}
 

	
 
		if ( (y = y + bp.height - dpi->height) > 0) {
 
			bp.height -= y;
 
		if (bp.height > dpi->height - y) {
 
			bp.height = dpi->height - y;
 
			if (bp.height <= 0) return;
 
		}
 

	
 
		start_x = 0;
 

	
 
		x &= zoom_mask;
 

	
 
		if ( (x -= dpi->left) < 0) {
 
			bp.width += x;
 
			if (bp.width <= 0) return;
 
			start_x -= x;
 
			bp.sprite -= x;
 
			x = 0;
 
		}
 
		bp.dst += x >> dpi->zoom;
 

	
 
		if ( (x = x + bp.width - dpi->width) > 0) {
 
			bp.width -= x;
 
		if (bp.width > dpi->width - x) {
 
			bp.width = dpi->width - x;
 
			if (bp.width <= 0) return;
 
			start_x += x;
 
		}
 
		bp.start_x = start_x;
 

	
 
		zf_uncomp[dpi->zoom](&bp);
 
	}
0 comments (0 inline, 0 general)