n3ss3s
2007-10-18 07:59:41
And the coding spree continues -
this time we find the spinning wheel (63 ms)
You may use if you credit me.
EDIT: Next one is FindFire…
this time we find the spinning wheel (63 ms)
Function FindSpinningWheel(Var SpX, SpY: Integer): Boolean;
Var
TPA, S: TPointArray;
Var
I, CTS, T: Integer;
Var
TP: TPoint;
Begin
CTS := GetColorToleranceSpeed;
ColorToleranceSpeed(2);
T := GetSystemTime;
FindColorsSpiralTolerance(MSCX, MSCY, TPA, 1138058, MSX1, MSY1, MSX2, MSY2, 10);
For I := 0 To GetArrayLength(TPA) - 1 Do
Begin
TP := TPA[i];
FindColorsTolerance(S, 1138058, TP.x - 15, TP.y - 15, TP.x + 15, TP.y + 15, 15);
If(GetArrayLength(S) >= 30)Then
Begin
MiddleTPAEx(S, SpX, SpY);
Result := True;
Break;
End;
End;
Writeln(IntToStr(GetSystemTime - T));
ColorToleranceSpeed(CTS);
End;
You may use if you credit me.
EDIT: Next one is FindFire…