PDA

View Full Version : [OSR] ReturnDTMPointsMS



Sin
04-14-2013, 08:53 PM
function ReturnDTMPointsMS(DTM:Integer):TPointArray;
var
i,x,y:Integer; //515 x 327
t:TBoxArray;
begin
SetLength(t,100);
SetLength(Result,1);
t := Grid(10, 10, 52, 33, 50, 33, point(26, 26));
for i := 0 to 99 do
begin
if (FindDTM(DTM,x,y,t[i].X1,t[i].Y1,t[i].X2,t[i].Y2)) then
begin
Result[Length(Result)] := Point(x,y);
SetLength(Result, Length(Result) + 1);
end;
end;
end;

Returns a TPA of points it finds on the mainscreen.

Olly
04-14-2013, 09:21 PM
what is the grid for? also findDTMs may help ;)

Sin
04-14-2013, 09:40 PM
The grid separates the main screen into boxes.

Turpinator
04-16-2013, 05:52 AM
what is the grid for? also findDTMs may help ;)
Clarifying... I believe the grid separates the main screen into boxes, then searches for a dtm in each box. I presume this is so if you were using a very small dtm, it would/might not appear many times in the same region?

Olly
04-16-2013, 03:28 PM
Actually iirc it only searches for the main point in the area.

Frement
04-16-2013, 03:36 PM
And where would you use this function?

Sin
04-16-2013, 06:06 PM
And where would you use this function?
Someone on IRC wanted it.

John
04-16-2013, 10:03 PM
It could be helpful looting? Just define which squares to search to avoid false positives.