From: Heysus
The problem is i don't know which points are the ones that aren't being found.
Its a DDTM that is being made during runtime. Sometimes drop dots and player dots get in the way.
function FindDTM2(var x, y : Integer; MainPoint : TPoint; SubPoints : TPointArray; MainPointCol : Integer; SubPointsCol : TIntegerArray; x1, y1, x2, y2, Tol : Integer): Boolean;
var
TPA : TPointArray;
H1, H2, I1, I2, D : Integer
begin
Result := False;
if not FindColorsTolerance(TPA, MainPointCol, x1, y1, x2, y2, Tol) then Exit;
H1 := High(TPA);
for I1 := 0 to H1 do
begin
H2 := High(SubPoints);
for I2 := 0 to H2 do
begin
if GetColor(MainPoint.x+abs(MainPoint.x-SubPoints[I2]) = SubPointsCol[I2] then
Inc(D);
end;
end;
WriteLn(IntToStr(D));
end;
or something like that.. I haven't tested it, I did not use SCAR to write the code, and I am extremely tired so it probably wouldn't work, but I hope you get my point.. That is how I would have done it, but I am sure there is other, better ways