diff -r 73cdc306888f -r 128ace913837 hedgewars/uLandOutline.pas --- a/hedgewars/uLandOutline.pas Tue Dec 13 21:21:55 2022 +0100 +++ b/hedgewars/uLandOutline.pas Mon Jan 02 15:59:26 2023 +0100 @@ -10,12 +10,11 @@ end; procedure DrawEdge(var pa: TPixAr; value: Word); -procedure FillLand(x, y: LongInt; border, value: Word); procedure BezierizeEdge(var pa: TPixAr; Delta: hwFloat); implementation -uses uLandGraphics, uDebug, uVariables, uLandTemplates; +uses uLandGraphics, uDebug, uVariables, uLandTemplates, uLandUtils; var Stack: record @@ -54,41 +53,6 @@ end end; -procedure FillLand(x, y: LongInt; border, value: Word); -var xl, xr, dir: LongInt; -begin - Stack.Count:= 0; - xl:= x - 1; - xr:= x; - Push(xl, xr, y, -1); - Push(xl, xr, y, 1); - dir:= 0; - while Stack.Count > 0 do - begin - Pop(xl, xr, y, dir); - while (xl > 0) and (Land[y, xl] <> border) and (Land[y, xl] <> value) do - dec(xl); - while (xr < LAND_WIDTH - 1) and (Land[y, xr] <> border) and (Land[y, xr] <> value) do - inc(xr); - while (xl < xr) do - begin - while (xl <= xr) and ((Land[y, xl] = border) or (Land[y, xl] = value)) do - inc(xl); - x:= xl; - while (xl <= xr) and (Land[y, xl] <> border) and (Land[y, xl] <> value) do - begin - Land[y, xl]:= value; - inc(xl) - end; - if x < xl then - begin - Push(x, Pred(xl), y, dir); - Push(x, Pred(xl), y,-dir); - end; - end; - end; -end; - procedure DrawEdge(var pa: TPixAr; value: Word); var i: LongInt; begin