ZaSz
2009-03-08 17:34:25
I made this cool program that reverses paths that have been made.
all you need to change is the code in r_path procedure.
I'm using this for ww1 so i dont have to do double the walking for the path I just made!
Would return.
It might be a little hard to get used to at first, but your welcome!
all you need to change is the code in r_path procedure.
I'm using this for ww1 so i dont have to do double the walking for the path I just made!
program New;
var
path : tpointarray;
b,i:integer;
const
length_of_result = 3;
function r_path:tpointarray;
begin
SetLength(Result, length_of_result);
result[0] := Point(3220, 3219);
result[1] := Point(3228, 3218);
result[2] := Point(3233, 3227);
end;
begin
cleardebug;
path := r_path;
b := high(path);
writeln('SetLength(Result, '+inttostr(b+1)+');');
b := 0;
for i := High(Path) downto 0 do
begin
b := b + 2;
WriteLn('result[' + IntToStr(i-(length_of_result-1)+(b-2)) + '] := Point(' + IntToStr(Path[i].X) + ', ' + IntToStr(Path[i].Y) + ');');
end;
end.Would return.
SetLength(Result, 3);
result[0] := Point(3233, 3227);
result[1] := Point(3228, 3218);
result[2] := Point(3220, 3219);It might be a little hard to get used to at first, but your welcome!