Shuttleu
2009-05-31 22:43:36
function FindColorsToleranceMM(var Points: TPointArray; Color, Tol: Integer): Boolean;
var
TPA: TPointArray;
begin
if (not(LoggedIn)) then exit;
if FindColorsTolerance(TPA, Color, MMX1, MMY1, MMX2, MMY2, Tol) then
begin
FilterPointsPie(TPA, 0.0, 360.0, 0.0, 76.0, MMCX, MMCY);
Result := Length(TPA) > 0;
if Result then
Points := TPA;
end;
end;
function FindColorsMM(var Points: TPointArray; Color: Integer): Boolean;
begin
Result := FindColorsToleranceMM(Points, Color, 0);
end;
function FindColorMM(var x, y: Integer; Color: Integer): Boolean;
begin
if (not(LoggedIn)) then exit;
Result := FindColorCircle(x, y, Color, MMCX, MMCY, 76);
end;
function FindColorToleranceMM(var x, y: Integer; Color, Tol: Integer): Boolean;
begin
if (not(LoggedIn)) then exit;
Result := FindColorCircleTolerance(x, y, Color, MMCX, MMCY, 76, Tol);
end;
it searches for a color on the MM then uses InCircle to make sure it is on the MM and not in one of the corners around the edges of the MM~shut