# HG changeset patch # User unc0rr # Date 1236174953 0 # Node ID e071284b118ef75df1e8db87d7ee9bce2986d660 # Parent a6189dbd16f09352fddb9e9f8c0143273d21bddf Pixels2 proc, which uses Land array when updating textures diff -r a6189dbd16f0 -r e071284b118e 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