rj
2013-09-04 18:14:52
So my code:
finds the TPA correctly:

But.. the ATPA is wrong:

therfor I get annoying results like
I don't understand what the problem is.
{$I SRL/SRL.Simba}
{$i SRL/srl/misc/debug.simba}
var
Bmp: integer;
function v_get_tile:string;
var
xTPA, yTPA: tpointarray;
xATPA, yATPA: t2dpointarray;
txtstring:string;
begin
FindColorsTolerance(xTPA, 65535, 440, 13, 469, 27, 0);
FindColorsTolerance(yTPA, 65535, 480, 13, 513, 25, 0);
xATPA := splitTPAEx(xTPA, 1, 10);
yATPA := splitTPAEx(yTPA, 1, 10);
sortATPAFromFirstPointX(xATPA, point(0, 0));
sortATPAFromFirstPointX(yATPA, point(0, 0));
// result is string until I figure this out..
result:= getTextATPA(xATPA, 5, 'v_numbs') + getTextATPA(yATPA, 5, 'v_numbs');
// DebugTPA(xTPA, 'bmp');
DebugATPA(xATPA, 'bmp');
end;
begin
ActivateClient;
wait(1000);
Writeln(v_get_tile);
end.finds the TPA correctly:

But.. the ATPA is wrong:

therfor I get annoying results like

I don't understand what the problem is.