Just a simple function to go along with the new AutoColor.scar. This function just uses a TAutoColorInfo record to radial walk and is more accurate as it uses ColorToleranceSpeed(2).
Very simple to use:
SCAR Code:
RadialWalkAutoColor(srl_VarrockRoadColor, 45, 90, 60, 2, 2);
No need to set the CTS (if that's what you did before) or call an auto coloring function.
For reference:
SCAR Code:
function RadialWalkAutoColor(autoColorConst, sRad, eRad, r, modX, modY: Integer): Boolean;
var
acInfo: TAutoColorInfo;
curCTS: Integer;
hMod, sMod: Extended;
begin
curCTS := GetColorToleranceSpeed;
GetColorSpeed2Modifiers(hMod, sMod);
acInfo := AutoColorEx(autoColorConst);
with acInfo do
begin
ColorToleranceSpeed(2);
SetColorSpeed2Modifiers(hueMod, satMod);
result := RadialWalkTolerance(color, sRad, eRad, r, modX, modY, lumTol);
end;
SetColorSpeed2Modifiers(hMod, sMod);
ColorToleranceSpeed(curCTS);
end;
Enjoy,
The Development Team