--- a/hedgewars/uLandTexture.pas Wed Jun 16 15:20:18 2010 +0200
+++ b/hedgewars/uLandTexture.pas Thu Jun 17 11:41:38 2010 -0400
@@ -31,8 +31,13 @@
const TEXSIZE = 256;
+{$IFDEF DOWNSCALE}
+ LANDTEXARW = (LAND_WIDTH div TEXSIZE) div 2;
+ LANDTEXARH = (LAND_HEIGHT div TEXSIZE) div 2;
+{$ELSE}
LANDTEXARW = LAND_WIDTH div TEXSIZE;
LANDTEXARH = LAND_HEIGHT div TEXSIZE;
+{$ENDIF}
var
LandTextures: array[0..LANDTEXARW - 1, 0..LANDTEXARH - 1] of
@@ -71,9 +76,15 @@
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}
end;
procedure RealLandTexUpdate;
@@ -108,7 +119,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}
end;
procedure FreeLand;