Remove more dead code from uLandOutline
authorunc0rr
Sun, 14 Oct 2018 19:03:58 +0200
changeset 13928 c36aaa30be98
parent 13927 d4874de4736b
child 13929 9a1f1e8170f2
Remove more dead code from uLandOutline
hedgewars/uLandOutline.pas
--- a/hedgewars/uLandOutline.pas	Sun Oct 14 20:02:51 2018 +0300
+++ b/hedgewars/uLandOutline.pas	Sun Oct 14 19:03:58 2018 +0200
@@ -12,12 +12,10 @@
 procedure DrawEdge(var pa: TPixAr; value: Word);
 procedure FillLand(x, y: LongInt; border, value: Word);
 procedure BezierizeEdge(var pa: TPixAr; Delta: hwFloat);
-procedure RandomizePoints(var pa: TPixAr);
 
 implementation
 
-uses uLandGraphics, uDebug, uVariables, uLandTemplates, uRandom, uUtils;
-
+uses uLandGraphics, uDebug, uVariables, uLandTemplates;
 
 
 var Stack: record
@@ -268,45 +266,4 @@
     CheckSelfIntersect:= false
 end;
 
-procedure RandomizePoints(var pa: TPixAr);
-const cEdge = 55;
-      cMinDist = 8;
-var radz: array[0..Pred(cMaxEdgePoints)] of LongInt;
-    i, k, dist, px, py: LongInt;
-begin
-    for i:= 0 to Pred(pa.Count) do
-    begin
-    radz[i]:= 0;
-        with pa.ar[i] do
-            if x <> NTPX then
-            begin
-            radz[i]:= Min(Max(x - cEdge, 0), Max(LAND_WIDTH - cEdge - x, 0));
-            radz[i]:= Min(radz[i], Min(Max(y - cEdge, 0), Max(LAND_HEIGHT - cEdge - y, 0)));
-            if radz[i] > 0 then
-                for k:= 0 to Pred(i) do
-                begin
-                dist:= Max(abs(x - pa.ar[k].x), abs(y - pa.ar[k].y));
-                radz[k]:= Max(0, Min((dist - cMinDist) div 2, radz[k]));
-                radz[i]:= Max(0, Min(dist - radz[k] - cMinDist, radz[i]))
-                end
-            end;
-    end;
-
-    for i:= 0 to Pred(pa.Count) do
-        with pa.ar[i] do
-            if ((x and LAND_WIDTH_MASK) = 0) and ((y and LAND_HEIGHT_MASK) = 0) then
-            begin
-            px:= x;
-            py:= y;
-            x:= x + LongInt(GetRandom(7) - 3) * (radz[i] * 5 div 7) div 3;
-            y:= y + LongInt(GetRandom(7) - 3) * (radz[i] * 5 div 7) div 3;
-            if CheckSelfIntersect(pa, i) then
-                begin
-                x:= px;
-                y:= py
-                end;
-            end
-end;
-
-
 end.