hedgewars/uLandTexture.pas
branchwebgl
changeset 8026 4a4f21070479
parent 7850 fcbb024090a4
child 8096 453917e94e55
equal deleted inserted replaced
8023:7de85783b823 8026:4a4f21070479
    37 type TLandRecord = record
    37 type TLandRecord = record
    38             shouldUpdate, landAdded: boolean;
    38             shouldUpdate, landAdded: boolean;
    39             tex: PTexture;
    39             tex: PTexture;
    40             end;
    40             end;
    41 
    41 
    42 var LandTextures: array of array of TLandRecord;
    42 var
    43     tmpPixels: array [0..TEXSIZE - 1, 0..TEXSIZE - 1] of LongWord;
    43     LandTextures : array of array of TLandRecord;
    44     LANDTEXARW: LongWord;
    44     tmpPixels	 : array [0..TEXSIZE - 1, 0..TEXSIZE - 1] of LongWord;
    45     LANDTEXARH: LongWord;
    45     LANDTEXARW	 : LongWord;
       
    46     LANDTEXARH	 : LongWord;
    46 
    47 
    47 function Pixels(x, y: Longword): Pointer;
    48 function Pixels(x, y: Longword): Pointer;
    48 var ty: Longword;
    49 var ty: Longword;
    49 begin
    50 begin
    50 for ty:= 0 to TEXSIZE - 1 do
    51 for ty:= 0 to TEXSIZE - 1 do
   194     else
   195     else
   195         begin
   196         begin
   196         LANDTEXARW:= (LAND_WIDTH div TEXSIZE) div 2;
   197         LANDTEXARW:= (LAND_WIDTH div TEXSIZE) div 2;
   197         LANDTEXARH:= (LAND_HEIGHT div TEXSIZE) div 2;
   198         LANDTEXARH:= (LAND_HEIGHT div TEXSIZE) div 2;
   198         end;
   199         end;
   199 
       
   200     SetLength(LandTextures, LANDTEXARW, LANDTEXARH);
   200     SetLength(LandTextures, LANDTEXARW, LANDTEXARH);
   201 end;
   201 end;
   202 
   202 
   203 procedure initModule;
   203 procedure initModule;
   204 begin
   204 begin