hedgewars/uLandTexture.pas
changeset 7850 fcbb024090a4
parent 7172 f68d62711a5c
child 8026 4a4f21070479
child 8027 e5ba3dd12531
equal deleted inserted replaced
7849:a12155461b34 7850:fcbb024090a4
    25 procedure initModule;
    25 procedure initModule;
    26 procedure freeModule;
    26 procedure freeModule;
    27 procedure UpdateLandTexture(X, Width, Y, Height: LongInt; landAdded: boolean);
    27 procedure UpdateLandTexture(X, Width, Y, Height: LongInt; landAdded: boolean);
    28 procedure DrawLand(dX, dY: LongInt);
    28 procedure DrawLand(dX, dY: LongInt);
    29 procedure ResetLand;
    29 procedure ResetLand;
       
    30 procedure SetLandTexture;
    30 
    31 
    31 implementation
    32 implementation
    32 uses uConsts, GLunit, uTypes, uVariables, uTextures, uDebug, uRender;
    33 uses uConsts, GLunit, uTypes, uVariables, uTextures, uDebug, uRender;
    33 
    34 
    34 const TEXSIZE = 128;
    35 const TEXSIZE = 128;
   181                 else
   182                 else
   182                     DrawTexture(dX + x * TEXSIZE * 2, dY + y * TEXSIZE * 2, tex, 2.0)
   183                     DrawTexture(dX + x * TEXSIZE * 2, dY + y * TEXSIZE * 2, tex, 2.0)
   183 
   184 
   184 end;
   185 end;
   185 
   186 
   186 procedure initModule;
   187 procedure SetLandTexture;
   187 begin
   188 begin
   188     if (cReducedQuality and rqBlurryLand) = 0 then
   189     if (cReducedQuality and rqBlurryLand) = 0 then
   189         begin
   190         begin
   190         LANDTEXARW:= LAND_WIDTH div TEXSIZE;
   191         LANDTEXARW:= LAND_WIDTH div TEXSIZE;
   191         LANDTEXARH:= LAND_HEIGHT div TEXSIZE;
   192         LANDTEXARH:= LAND_HEIGHT div TEXSIZE;
   197         end;
   198         end;
   198 
   199 
   199     SetLength(LandTextures, LANDTEXARW, LANDTEXARH);
   200     SetLength(LandTextures, LANDTEXARW, LANDTEXARH);
   200 end;
   201 end;
   201 
   202 
       
   203 procedure initModule;
       
   204 begin
       
   205 end;
       
   206 
   202 procedure ResetLand;
   207 procedure ResetLand;
   203 var x, y: LongInt;
   208 var x, y: LongInt;
   204 begin
   209 begin
   205     for x:= 0 to LANDTEXARW - 1 do
   210     for x:= 0 to LANDTEXARW - 1 do
   206         for y:= 0 to LANDTEXARH - 1 do
   211         for y:= 0 to LANDTEXARH - 1 do