peetu
2012-05-04 12:57:13
So when I do FindDTM or something similar the script will search from top left to bottom right. How can I reverse it so that it searches from bottom right to top left?
2012-05-04 12:57:13
2012-05-04 13:00:49
FindDTM(DTM, X, Y, MSX2, MSY2, MSX1, MSY1)
2012-05-04 13:26:15
From: Rich
Just reverse the search coordinates (I think), so like thisFindDTM(DTM, X, Y, MSX2, MSY2, MSX1, MSY1)
2012-05-04 13:49:53
FindDTM(DTM, X, Y MSX2-100, MSY2-100, MSX2, MSY2)And increase that 100 in intervals until you find what you want. Could be done easier in an for to do loop or a while do.
2012-05-04 15:15:17
2012-05-04 15:45:01
function FindLowDTM(DTM : LongInt, var X : LongInt, var Y : LongInt, XS, YS, XE, YE : LongInt) : Boolean;
var
sX, sY : Integer;
begin
sX:= XS;
sY:= YS;
repeat
if FindDTM(DTM, X, Y, sX, sY, XE, YE) then
begin
Result:= True;
sX:= X;
sY:= Y;
end;
until(not(FindDTM(DTM, X, Y, sX, sY, XE, YE)))
end; ?2012-05-04 16:19:27
From: peetu
So when I do FindDTM or something similar the script will search from top left to bottom right. How can I reverse it so that it searches from bottom right to top left?
2012-05-04 16:25:04