bbri06
2010-05-20 20:36:01
So I was attempting to track a TPA by using reflection. The function
Every point in the Result array is always equal to (-1, -1). Now the thing is, if I test the TPA that I input before making it into Tiles, it comes out as all valid points, so that is not the problem. Then, if I test the values of SPS, it comes out as what looks to be all valid tiles.
Finally, when I test the values of Result, they all come out to (-1, -1). Now my question is, where the hell is the problem.
Function TrackTPA(TPA: TPointArray): TPointArray;
var
SPS: Array of TTile;
i: integer;
p: tpoint;
begin
SetLength(SPS, Length(TPA));
SetLength(Result, Length(SPS));
for i := 0 to High(SPS) do
begin
SPS[i] := Tile(TPA[i].x, TPA[i].y);
end;
R_Flag;
for i := 0 to High(SPS) do
begin
Result[i] := TileToMS(SPS[i], 0);
end;
writeln('TrackTPA finished');
end;
Every point in the Result array is always equal to (-1, -1). Now the thing is, if I test the TPA that I input before making it into Tiles, it comes out as all valid points, so that is not the problem. Then, if I test the values of SPS, it comes out as what looks to be all valid tiles.
Finally, when I test the values of Result, they all come out to (-1, -1). Now my question is, where the hell is the problem.