Remove some dead code
authorunc0rr
Sun, 28 Oct 2018 23:09:35 +0100
changeset 14030 bb2f4636787f
parent 14029 03a5d9f0bcc9
child 14031 3b3d97ed2286
Remove some dead code
hedgewars/uLandOutline.pas
--- a/hedgewars/uLandOutline.pas	Sun Oct 28 00:49:00 2018 +0200
+++ b/hedgewars/uLandOutline.pas	Sun Oct 28 23:09:35 2018 +0100
@@ -215,55 +215,4 @@
         end else inc(i)
 end;
 
-
-function CheckIntersect(V1, V2, V3, V4: TPoint): boolean;
-var c1, c2, dm: LongInt;
-begin
-    CheckIntersect:= false;
-    dm:= (V4.y - V3.y) * (V2.x - V1.x) - (V4.x - V3.x) * (V2.y - V1.y);
-    c1:= (V4.x - V3.x) * (V1.y - V3.y) - (V4.y - V3.y) * (V1.x - V3.x);
-    if dm = 0 then
-        exit;
-
-    CheckIntersect:= true;
-    c2:= (V2.x - V3.x) * (V1.y - V3.y) - (V2.y - V3.y) * (V1.x - V3.x);
-    if dm > 0 then
-    begin
-        if (c1 < 0) or (c1 > dm) then
-            CheckIntersect:= false
-        else if (c2 < 0) or (c2 > dm) then
-            CheckIntersect:= false;
-    end
-    else
-    begin
-        if (c1 > 0) or (c1 < dm) then
-            CheckIntersect:= false
-        else if (c2 > 0) or (c2 < dm) then
-            CheckIntersect:= false;
-    end;
-
-    //AddFileLog('1  (' + inttostr(V1.x) + ',' + inttostr(V1.y) + ')x(' + inttostr(V2.x) + ',' + inttostr(V2.y) + ')');
-    //AddFileLog('2  (' + inttostr(V3.x) + ',' + inttostr(V3.y) + ')x(' + inttostr(V4.x) + ',' + inttostr(V4.y) + ')');
-end;
-
-
-function CheckSelfIntersect(var pa: TPixAr; ind: Longword): boolean;
-var i: Longword;
-begin
-    CheckSelfIntersect:= false;
-    if (ind <= 0) or (LongInt(ind) >= Pred(pa.Count)) then
-        exit;
-
-    CheckSelfIntersect:= true;
-    for i:= 1 to pa.Count - 3 do
-        if (i <= ind - 1) or (i >= ind + 2) then
-        begin
-            if (i <> ind - 1) and CheckIntersect(pa.ar[ind], pa.ar[ind - 1], pa.ar[i], pa.ar[i - 1]) then
-                exit;
-            if (i <> ind + 2) and CheckIntersect(pa.ar[ind], pa.ar[ind + 1], pa.ar[i], pa.ar[i - 1]) then
-                exit;
-        end;
-    CheckSelfIntersect:= false
-end;
-
 end.