putonajonny
2011-12-03 17:50:33
The Colours in this function need correcting, this function works when you change them to more updated red and green.
function FindAllHPBars(Sx, Sy, x1, y1, x2, y2: Integer): TBoxArray;
var
a, b : TPointArray;
ATPA : T2DPointArray;
H, I : Integer;
begin
FindColorsSpiralTolerance(Sx, Sy, a, 524473, x1, y1, x2, y2, 0);
FindColorsSpiralTolerance(Sx, Sy, b, 51867, x1, y1, x2, y2, 0);
ATPA := TPAToATPAEx(CombineTPA(a, b), 55, 7);
H := High(ATPA);
SetLength(Result, Length(ATPA));
for I := 0 to H do
Result[i] := GetTPABounds(ATPA[i]);
end;