hedgewars/uLandTexture.pas
branchwebgl
changeset 8096 453917e94e55
parent 8026 4a4f21070479
parent 8027 e5ba3dd12531
child 9127 e350500c4edb
equal deleted inserted replaced
8053:2e836bebb518 8096:453917e94e55
    65 end;
    65 end;
    66 
    66 
    67 procedure UpdateLandTexture(X, Width, Y, Height: LongInt; landAdded: boolean);
    67 procedure UpdateLandTexture(X, Width, Y, Height: LongInt; landAdded: boolean);
    68 var tx, ty: Longword;
    68 var tx, ty: Longword;
    69 begin
    69 begin
       
    70     if cOnlyStats then exit;
    70     if (Width <= 0) or (Height <= 0) then
    71     if (Width <= 0) or (Height <= 0) then
    71         exit;
    72         exit;
    72     TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true);
    73     TryDo((X >= 0) and (X < LAND_WIDTH), 'UpdateLandTexture: wrong X parameter', true);
    73     TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true);
    74     TryDo(X + Width <= LAND_WIDTH, 'UpdateLandTexture: wrong Width parameter', true);
    74     TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true);
    75     TryDo((Y >= 0) and (Y < LAND_HEIGHT), 'UpdateLandTexture: wrong Y parameter', true);
    92 
    93 
    93 procedure RealLandTexUpdate;
    94 procedure RealLandTexUpdate;
    94 var x, y, ty, tx, lx, ly : LongWord;
    95 var x, y, ty, tx, lx, ly : LongWord;
    95     isEmpty: boolean;
    96     isEmpty: boolean;
    96 begin
    97 begin
       
    98     if cOnlyStats then exit;
    97 (*
    99 (*
    98 if LandTextures[0, 0].tex = nil then
   100 if LandTextures[0, 0].tex = nil then
    99     for x:= 0 to LANDTEXARW -1 do
   101     for x:= 0 to LANDTEXARW -1 do
   100         for y:= 0 to LANDTEXARH - 1 do
   102         for y:= 0 to LANDTEXARH - 1 do
   101             with LandTextures[x, y] do
   103             with LandTextures[x, y] do