Pixels2 proc, which uses Land array when updating textures
authorunc0rr
Wed, 04 Mar 2009 13:55:53 +0000
changeset 1859 e071284b118e
parent 1858 a6189dbd16f0
child 1860 ce140b2b928a
Pixels2 proc, which uses Land array when updating textures
hedgewars/uLandTexture.pas
--- a/hedgewars/uLandTexture.pas	Wed Mar 04 13:42:21 2009 +0000
+++ b/hedgewars/uLandTexture.pas	Wed Mar 04 13:55:53 2009 +0000
@@ -49,6 +49,16 @@
 Pixels:= @tmpPixels
 end;
 
+function Pixels2(x, y: Longword): Pointer;
+var tx, ty: Longword;
+begin
+for ty:= 0 to TEXSIZE - 1 do
+	for tx:= 0 to TEXSIZE - 1 do
+		tmpPixels[ty, tx]:= Land[y * TEXSIZE + ty, x * TEXSIZE + tx] or $FF000000;
+	
+Pixels2:= @tmpPixels
+end;
+
 procedure UpdateLandTexture(X, Width, Y, Height: LongInt);
 var tx, ty: Longword;
 begin