Phran6
2009-06-14 22:19:56
{*******************************************************************************
function RandomizePath(Path: TPointArray; rX, rY: integer): TPointArray;
By: lordsaturn
Description: Randomizes a path with max dist rX and rY.
*******************************************************************************}
function RandomizePath(Path: TPointArray; rX, rY: integer): TPointArray;
var
i, Hi: integer;
begin
Hi := High(Path);
if Hi < 0 then Exit;
for i := 0 to Hi do
Result[i] := RandomizeTile(Result[i], rX, rY);
end;
need to be changed to
function RandomizePath(Path: TPointArray; rX, rY: integer): TPointArray;
var
i, Hi: integer;
begin
Hi := High(Path);
if Hi < 0 then Exit;
for i := 0 to Hi do
begin
setlength(result, Length(result)+1)
result[high(result)]:=RandomizeTile(Path[i], rX, rY);
end;
end;