# HG changeset patch # User koda # Date 1277902368 -7200 # Node ID 341e407e37549ecc5b82c997de031668ad3c146d # Parent aeca3d8f1b298c0ee0abb2cf7d09939a7cc4a115 partially removing DOWNSCALE ifdef -- only two remain and their removal requires dynamic allocation (btw this breaks low quality mode) diff -r aeca3d8f1b29 -r 341e407e3754 hedgewars/uLand.pas --- a/hedgewars/uLand.pas Wed Jun 30 12:55:33 2010 +0200 +++ b/hedgewars/uLand.pas Wed Jun 30 14:52:48 2010 +0200 @@ -643,11 +643,10 @@ for y:= 0 to LAND_HEIGHT - 1 do begin for x:= 0 to LAND_WIDTH - 1 do -{$IFDEF DOWNSCALE} - if Land[y, x] <> 0 then LandPixels[y div 2, x div 2]:= p^[x] or AMask; -{$ELSE} - if Land[y, x] <> 0 then LandPixels[y, x]:= p^[x] or AMask; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + if Land[y, x] <> 0 then LandPixels[y, x]:= p^[x] or AMask + else + if Land[y, x] <> 0 then LandPixels[y div 2, x div 2]:= p^[x] or AMask; p:= @(p^[Surface^.pitch div 4]); end; @@ -1265,33 +1264,37 @@ begin for y:= topY to LAND_HEIGHT - 1 do begin - Land[y, leftX + w]:= lfIndestructible; - Land[y, rightX - w]:= lfIndestructible; - if (y + w) mod 32 < 16 then - c:= AMask - else - c:= AMask or RMask or GMask; // FF00FFFF -{$IFDEF DOWNSCALE} - LandPixels[y div 2, (leftX + w) div 2]:= c; - LandPixels[y div 2, (rightX - w) div 2]:= c; -{$ELSE} - LandPixels[y, leftX + w]:= c; - LandPixels[y, rightX - w]:= c; -{$ENDIF} + Land[y, leftX + w]:= lfIndestructible; + Land[y, rightX - w]:= lfIndestructible; + if (y + w) mod 32 < 16 then + c:= AMask + else + c:= AMask or RMask or GMask; // FF00FFFF + + if (cReducedQuality and rqBlurryLand) = 0 then + begin + LandPixels[y, leftX + w]:= c; + LandPixels[y, rightX - w]:= c; + end + else + begin + LandPixels[y div 2, (leftX + w) div 2]:= c; + LandPixels[y div 2, (rightX - w) div 2]:= c; + end; end; for x:= leftX to rightX do begin - Land[topY + w, x]:= lfIndestructible; - if (x + w) mod 32 < 16 then - c:= AMask - else - c:= AMask or RMask or GMask; // FF00FFFF -{$IFDEF DOWNSCALE} - LandPixels[(topY + w) div 2, x div 2]:= c; -{$ELSE} - LandPixels[topY + w, x]:= c; -{$ENDIF} + Land[topY + w, x]:= lfIndestructible; + if (x + w) mod 32 < 16 then + c:= AMask + else + c:= AMask or RMask or GMask; // FF00FFFF + + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[topY + w, x]:= c + else + LandPixels[(topY + w) div 2, x div 2]:= c; end; end; end; diff -r aeca3d8f1b29 -r 341e407e3754 hedgewars/uLandGraphics.pas --- a/hedgewars/uLandGraphics.pas Wed Jun 30 12:55:33 2010 +0200 +++ b/hedgewars/uLandGraphics.pas Wed Jun 30 14:52:48 2010 +0200 @@ -146,35 +146,35 @@ if ((y + dy) and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do if (not isMap and ((Land[y + dy, i] and lfIndestructible) = 0)) or ((Land[y + dy, i] and lfBasic) <> 0) then -{$IFDEF DOWNSCALE} - LandPixels[(y + dy) div 2, i div 2]:= 0; -{$ELSE} - LandPixels[y + dy, i]:= 0; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y + dy, i]:= 0 + else + LandPixels[(y + dy) div 2, i div 2]:= 0; + if ((y - dy) and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do if (not isMap and ((Land[y - dy, i] and lfIndestructible) = 0)) or ((Land[y - dy, i] and lfBasic) <> 0) then -{$IFDEF DOWNSCALE} - LandPixels[(y - dy) div 2, i div 2]:= 0; -{$ELSE} - LandPixels[y - dy, i]:= 0; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y - dy, i]:= 0 + else + LandPixels[(y - dy) div 2, i div 2]:= 0; + if ((y + dx) and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do if (not isMap and ((Land[y + dx, i] and lfIndestructible) = 0)) or ((Land[y + dx, i] and lfBasic) <> 0) then -{$IFDEF DOWNSCALE} - LandPixels[(y + dx) div 2, i div 2]:= 0; -{$ELSE} - LandPixels[y + dx, i]:= 0; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y + dx, i]:= 0 + else + LandPixels[(y + dx) div 2, i div 2]:= 0; + if ((y - dx) and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do if (not isMap and ((Land[y - dx, i] and lfIndestructible) = 0)) or ((Land[y - dx, i] and lfBasic) <> 0) then -{$IFDEF DOWNSCALE} - LandPixels[(y - dx) div 2, i div 2]:= 0; -{$ELSE} - LandPixels[y - dx, i]:= 0; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y - dx, i]:= 0 + else + LandPixels[(y - dx) div 2, i div 2]:= 0; + end; procedure FillLandCircleLinesBG(x, y, dx, dy: LongInt); @@ -183,59 +183,60 @@ if ((y + dy) and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do if ((Land[y + dy, i] and lfBasic) <> 0) then -{$IFDEF DOWNSCALE} - LandPixels[(y + dy) div 2, i div 2]:= LandBackPixel(i, y + dy) -{$ELSE} - LandPixels[y + dy, i]:= LandBackPixel(i, y + dy) -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y + dy, i]:= LandBackPixel(i, y + dy) + else + LandPixels[(y + dy) div 2, i div 2]:= LandBackPixel(i, y + dy) else -{$IFDEF DOWNSCALE} - if ((Land[y + dy, i] and lfObject) <> 0) then LandPixels[(y + dy) div 2, i div 2]:= 0; -{$ELSE} - if ((Land[y + dy, i] and lfObject) <> 0) then LandPixels[y + dy, i]:= 0; -{$ENDIF} + if ((Land[y + dy, i] and lfObject) <> 0) then + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y + dy, i]:= 0 + else + LandPixels[(y + dy) div 2, i div 2]:= 0; + if ((y - dy) and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do if ((Land[y - dy, i] and lfBasic) <> 0) then -{$IFDEF DOWNSCALE} - LandPixels[(y - dy) div 2, i div 2]:= LandBackPixel(i, y - dy) -{$ELSE} - LandPixels[y - dy, i]:= LandBackPixel(i, y - dy) -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y - dy, i]:= LandBackPixel(i, y - dy) + else + LandPixels[(y - dy) div 2, i div 2]:= LandBackPixel(i, y - dy) else -{$IFDEF DOWNSCALE} - if ((Land[y - dy, i] and lfObject) <> 0) then LandPixels[(y - dy) div 2, i div 2]:= 0; -{$ELSE} - if ((Land[y - dy, i] and lfObject) <> 0) then LandPixels[y - dy, i]:= 0; -{$ENDIF} + if ((Land[y - dy, i] and lfObject) <> 0) then + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y - dy, i]:= 0 + else + LandPixels[(y - dy) div 2, i div 2]:= 0; + if ((y + dx) and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do if ((Land[y + dx, i] and lfBasic) <> 0) then -{$IFDEF DOWNSCALE} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y + dx, i]:= LandBackPixel(i, y + dx) + else LandPixels[(y + dx) div 2, i div 2]:= LandBackPixel(i, y + dx) -{$ELSE} - LandPixels[y + dx, i]:= LandBackPixel(i, y + dx) -{$ENDIF} else -{$IFDEF DOWNSCALE} - if ((Land[y + dx, i] and lfObject) <> 0) then LandPixels[(y + dx) div 2, i div 2]:= 0; -{$ELSE} - if ((Land[y + dx, i] and lfObject) <> 0) then LandPixels[y + dx, i]:= 0; -{$ENDIF} + if ((Land[y + dx, i] and lfObject) <> 0) then + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y + dx, i]:= 0 + else + LandPixels[(y + dx) div 2, i div 2]:= 0; + if ((y - dx) and LAND_HEIGHT_MASK) = 0 then for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do if ((Land[y - dx, i] and lfBasic) <> 0) then -{$IFDEF DOWNSCALE} - LandPixels[(y - dx) div 2, i div 2]:= LandBackPixel(i, y - dx) -{$ELSE} + if (cReducedQuality and rqBlurryLand) = 0 then LandPixels[y - dx, i]:= LandBackPixel(i, y - dx) -{$ENDIF} + else + LandPixels[(y - dx) div 2, i div 2]:= LandBackPixel(i, y - dx) + else -{$IFDEF DOWNSCALE} - if ((Land[y - dx, i] and lfObject) <> 0) then LandPixels[(y - dx) div 2, i div 2]:= 0; -{$ELSE} - if ((Land[y - dx, i] and lfObject) <> 0) then LandPixels[y - dx, i]:= 0; -{$ENDIF} + if ((Land[y - dx, i] and lfObject) <> 0) then + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y - dx, i]:= 0 + else + LandPixels[(y - dx) div 2, i div 2]:= 0; + end; procedure FillLandCircleLinesEBC(x, y, dx, dy: LongInt); @@ -245,11 +246,11 @@ for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do if ((Land[y + dy, i] and lfBasic) <> 0) or ((Land[y + dy, i] and lfObject) <> 0) then begin -{$IFDEF DOWNSCALE} - LandPixels[(y + dy) div 2, i div 2]:= cExplosionBorderColor; -{$ELSE} - LandPixels[y + dy, i]:= cExplosionBorderColor; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y + dy, i]:= cExplosionBorderColor + else + LandPixels[(y + dy) div 2, i div 2]:= cExplosionBorderColor; + Land[y + dy, i]:= Land[y + dy, i] or lfDamaged; Despeckle(i, y + dy); LandDirty[(y + dy) div 32, i div 32]:= 1; @@ -258,11 +259,10 @@ for i:= max(x - dx, 0) to min(x + dx, LAND_WIDTH - 1) do if ((Land[y - dy, i] and lfBasic) <> 0) or ((Land[y - dy, i] and lfObject) <> 0) then begin -{$IFDEF DOWNSCALE} - LandPixels[(y - dy) div 2, i div 2]:= cExplosionBorderColor; -{$ELSE} - LandPixels[y - dy, i]:= cExplosionBorderColor; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y - dy, i]:= cExplosionBorderColor + else + LandPixels[(y - dy) div 2, i div 2]:= cExplosionBorderColor; Land[y - dy, i]:= Land[y - dy, i] or lfDamaged; Despeckle(i, y - dy); LandDirty[(y - dy) div 32, i div 32]:= 1; @@ -271,11 +271,11 @@ for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do if ((Land[y + dx, i] and lfBasic) <> 0) or ((Land[y + dx, i] and lfObject) <> 0) then begin -{$IFDEF DOWNSCALE} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y + dx, i]:= cExplosionBorderColor + else LandPixels[(y + dx) div 2, i div 2]:= cExplosionBorderColor; -{$ELSE} - LandPixels[y + dx, i]:= cExplosionBorderColor; -{$ENDIF} + Land[y + dx, i]:= Land[y + dx, i] or lfDamaged; Despeckle(i, y + dx); LandDirty[(y + dx) div 32, i div 32]:= 1; @@ -284,11 +284,11 @@ for i:= max(x - dy, 0) to min(x + dy, LAND_WIDTH - 1) do if ((Land[y - dx, i] and lfBasic) <> 0) or ((Land[y - dx, i] and lfObject) <> 0) then begin -{$IFDEF DOWNSCALE} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[y - dx, i]:= cExplosionBorderColor + else LandPixels[(y - dx) div 2, i div 2]:= cExplosionBorderColor; -{$ELSE} - LandPixels[y - dx, i]:= cExplosionBorderColor; -{$ENDIF} + Land[y - dx, i]:= Land[y - dx, i] or lfDamaged; Despeckle(i, y - dy); LandDirty[(y - dx) div 32, i div 32]:= 1; @@ -378,17 +378,16 @@ for ty:= max(y - Radius, 0) to min(y + Radius, LAND_HEIGHT) do for tx:= max(0, ar^[i].Left - Radius) to min(LAND_WIDTH, ar^[i].Right + Radius) do if (Land[ty, tx] and lfBasic) <> 0 then -{$IFDEF DOWNSCALE} - LandPixels[ty div 2, tx div 2]:= LandBackPixel(tx, ty) -{$ELSE} - LandPixels[ty, tx]:= LandBackPixel(tx, ty) -{$ENDIF} - else if (Land[ty, tx] and lfObject) <> 0 then -{$IFDEF DOWNSCALE} - LandPixels[ty div 2, tx div 2]:= 0; -{$ELSE} - LandPixels[ty, tx]:= 0; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[ty, tx]:= LandBackPixel(tx, ty) + else + LandPixels[ty div 2, tx div 2]:= LandBackPixel(tx, ty) + else + if (Land[ty, tx] and lfObject) <> 0 then + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[ty, tx]:= 0 + else + LandPixels[ty div 2, tx div 2]:= 0; inc(y, dY) end; @@ -401,11 +400,11 @@ for tx:= max(0, ar^[i].Left - Radius) to min(LAND_WIDTH, ar^[i].Right + Radius) do if ((Land[ty, tx] and lfBasic) <> 0) or ((Land[ty, tx] and lfObject) <> 0) then begin -{$IFDEF DOWNSCALE} - LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor; -{$ELSE} - LandPixels[ty, tx]:= cExplosionBorderColor; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[ty, tx]:= cExplosionBorderColor + else + LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor; + Land[ty, tx]:= Land[ty, tx] or lfDamaged; LandDirty[(y + dy) shr 5, i shr 5]:= 1; end; @@ -447,11 +446,10 @@ ((Land[ty, tx] and lfObject) <> 0)) then begin Land[ty, tx]:= Land[ty, tx] or lfDamaged; -{$IFDEF DOWNSCALE} - LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor -{$ELSE} - LandPixels[ty, tx]:= cExplosionBorderColor -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[ty, tx]:= cExplosionBorderColor + else + LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor end end; nx:= nx - dY; @@ -474,11 +472,11 @@ ((Land[ty, tx] and lfObject) <> 0)) then begin Land[ty, tx]:= Land[ty, tx] or lfDamaged; -{$IFDEF DOWNSCALE} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[ty, tx]:= cExplosionBorderColor + else LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor -{$ELSE} - LandPixels[ty, tx]:= cExplosionBorderColor -{$ENDIF} + end end; X:= nx; @@ -492,17 +490,17 @@ if ((ty and LAND_HEIGHT_MASK) = 0) and ((tx and LAND_WIDTH_MASK) = 0) and ((Land[ty, tx] and lfIndestructible) = 0) then begin if (Land[ty, tx] and lfBasic) <> 0 then -{$IFDEF DOWNSCALE} - LandPixels[ty div 2, tx div 2]:= LandBackPixel(tx, ty) -{$ELSE} - LandPixels[ty, tx]:= LandBackPixel(tx, ty) -{$ENDIF} - else if (Land[ty, tx] and lfObject) <> 0 then -{$IFDEF DOWNSCALE} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[ty, tx]:= LandBackPixel(tx, ty) + else + LandPixels[ty div 2, tx div 2]:= LandBackPixel(tx, ty) + else + if (Land[ty, tx] and lfObject) <> 0 then + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[ty, tx]:= 0 + else LandPixels[ty div 2, tx div 2]:= 0; -{$ELSE} - LandPixels[ty, tx]:= 0; -{$ENDIF} + Land[ty, tx]:= 0; end end; @@ -518,11 +516,11 @@ ((Land[ty, tx] and lfObject) <> 0)) then begin Land[ty, tx]:= Land[ty, tx] or lfDamaged; -{$IFDEF DOWNSCALE} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[ty, tx]:= cExplosionBorderColor + else LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor -{$ELSE} - LandPixels[ty, tx]:= cExplosionBorderColor -{$ENDIF} + end end; nx:= nx - dY; @@ -545,11 +543,10 @@ ((Land[ty, tx] and lfObject) <> 0)) then begin Land[ty, tx]:= Land[ty, tx] or lfDamaged; -{$IFDEF DOWNSCALE} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[ty, tx]:= cExplosionBorderColor + else LandPixels[ty div 2, tx div 2]:= cExplosionBorderColor -{$ELSE} - LandPixels[ty, tx]:= cExplosionBorderColor -{$ENDIF} end end; nx:= nx - dY; @@ -621,11 +618,10 @@ if PLongword(@(p^[x * 4]))^ <> 0 then begin Land[cpY + y, cpX + x]:= lfObject; -{$IFDEF DOWNSCALE} + if (cReducedQuality and rqBlurryLand) = 0 then + LandPixels[cpY + y, cpX + x]:= PLongword(@(p^[x * 4]))^ + else LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= PLongword(@(p^[x * 4]))^ -{$ELSE} - LandPixels[cpY + y, cpX + x]:= PLongword(@(p^[x * 4]))^ -{$ENDIF} end; p:= @(p^[Image^.pitch]); end; @@ -660,11 +656,17 @@ if c < 4 then // 0-3 neighbours begin -{$IFDEF DOWNSCALE} - if (Land[Y, X] and lfBasic) <> 0 then LandPixels[Y div 2, X div 2]:= LandBackPixel(X, Y) else LandPixels[Y div 2, X div 2]:= 0; -{$ELSE} - if (Land[Y, X] and lfBasic) <> 0 then LandPixels[Y, X]:= LandBackPixel(X, Y) else LandPixels[Y, X]:= 0; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + if (Land[Y, X] and lfBasic) <> 0 then + LandPixels[Y, X]:= LandBackPixel(X, Y) + else + LandPixels[Y, X]:= 0 + else + if (Land[Y, X] and lfBasic) <> 0 then + LandPixels[Y div 2, X div 2]:= LandBackPixel(X, Y) + else + LandPixels[Y div 2, X div 2]:= 0; + Land[Y, X]:= 0; exit(true); end; diff -r aeca3d8f1b29 -r 341e407e3754 hedgewars/uLandObjects.pas --- a/hedgewars/uLandObjects.pas Wed Jun 30 12:55:33 2010 +0200 +++ b/hedgewars/uLandObjects.pas Wed Jun 30 14:52:48 2010 +0200 @@ -85,13 +85,15 @@ begin for x:= 0 to Pred(Width) do begin -{$IFDEF DOWNSCALE} - if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then - LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x]; -{$ELSE} - if LandPixels[cpY + y, cpX + x] = 0 then - LandPixels[cpY + y, cpX + x]:= p^[x]; -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + begin + if LandPixels[cpY + y, cpX + x] = 0 then + LandPixels[cpY + y, cpX + x]:= p^[x]; + end + else + if LandPixels[(cpY + y) div 2, (cpX + x) div 2] = 0 then + LandPixels[(cpY + y) div 2, (cpX + x) div 2]:= p^[x]; + if ((Land[cpY + y, cpX + x] and $FF00) = 0) and ((p^[x] and AMask) <> 0) then Land[cpY + y, cpX + x]:= lfObject end; diff -r aeca3d8f1b29 -r 341e407e3754 hedgewars/uLandTexture.pas --- a/hedgewars/uLandTexture.pas Wed Jun 30 12:55:33 2010 +0200 +++ b/hedgewars/uLandTexture.pas Wed Jun 30 14:52:48 2010 +0200 @@ -70,21 +70,20 @@ procedure UpdateLandTexture(X, Width, Y, Height: LongInt); var tx, ty: Longword; begin -if (Width <= 0) or (Height <= 0) then exit; -TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true); -TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true); -TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true); -TryDo(Y + Height <= LAND_HEIGHT, 'UpdateLandTexture: wrong Height parameter', true); + if (Width <= 0) or (Height <= 0) then exit; + TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true); + TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true); + TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true); + TryDo(Y + Height <= LAND_HEIGHT, 'UpdateLandTexture: wrong Height parameter', true); -{$IFDEF DOWNSCALE} -for ty:= (Y div TEXSIZE) div 2 to ((Y + Height - 1) div TEXSIZE) div 2 do - for tx:= (X div TEXSIZE) div 2 to ((X + Width - 1) div TEXSIZE) div 2 do - LandTextures[tx, ty].shouldUpdate:= true -{$ELSE} -for ty:= Y div TEXSIZE to (Y + Height - 1) div TEXSIZE do - for tx:= X div TEXSIZE to (X + Width - 1) div TEXSIZE do - LandTextures[tx, ty].shouldUpdate:= true -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + for ty:= Y div TEXSIZE to (Y + Height - 1) div TEXSIZE do + for tx:= X div TEXSIZE to (X + Width - 1) div TEXSIZE do + LandTextures[tx, ty].shouldUpdate:= true + else + for ty:= (Y div TEXSIZE) div 2 to ((Y + Height - 1) div TEXSIZE) div 2 do + for tx:= (X div TEXSIZE) div 2 to ((X + Width - 1) div TEXSIZE) div 2 do + LandTextures[tx, ty].shouldUpdate:= true; end; procedure RealLandTexUpdate; @@ -119,11 +118,11 @@ for x:= 0 to LANDTEXARW -1 do for y:= 0 to LANDTEXARH - 1 do with LandTextures[x, y] do -{$IFDEF DOWNSCALE} - DrawTexture(dX + x * TEXSIZE * 2, dY + y * TEXSIZE * 2, tex, 2.0) -{$ELSE} - DrawTexture(dX + x * TEXSIZE, dY + y * TEXSIZE, tex) -{$ENDIF} + if (cReducedQuality and rqBlurryLand) = 0 then + DrawTexture(dX + x * TEXSIZE, dY + y * TEXSIZE, tex) + else + DrawTexture(dX + x * TEXSIZE * 2, dY + y * TEXSIZE * 2, tex, 2.0) + end; procedure FreeLand;