The Color include contains all Colorfinding routines.
Note
Remove?:
- FindDeformed
- DTMRotated
- GetColorsBox?
function FindDeformed(var Xoff, Yoff: Integer; BMP, a, b, c, d: Integer): Boolean;
Finds Bitmap in Box a,b,c,d. Returns coords in ObjX and ObjY. Uses Deformed Bitmap. FindDeformed will gradually lower Tol and reduce Accuracy. Functon can cause severe Lag when using bitmaps bigger then 16 pixels. Works but Lags. Useful for MM-clicking. For ObjectFinding use FindObjectDeformed.
Note
by WT-Fakawi
Example:
function FindColorsPie(var Points: TPointArray; Color, Tol: Integer; StartD,
EndD, MinR, MaxR: Extended; x1, y1, x2, y2, Mx, My: Integer): Boolean;
Finds all Colors with tolerance in the Pie, defined by x1, y1, x2, y2, Mx, My, StartDegree, EndDegree, MinRadius and MaxRadius.
Note
by Wizzup?, edit by EvilChicken!
Example:
function DTMRotated(DTM: Integer; var x, y: Integer; x1, y1, x2, y2: Integer): Boolean;
First looks for a DTM without rotation, then increases the amount of rotation around 0 gradually until it finds the DTM. A bit like the ProgressiveTol Bitmap Engines.
Note
by Yakman
Example:
function GetColorsBox(x1, y1, x2, y2: Integer; ClearSameColors: Boolean): TIntegerArray;
Returns an array of all colors within box ((x1, y1), (x2, y2)). If ClearSameColors is set to True, all duplicate colors will be deleted.
Note
by Rasta Magician
Example:
function PercentColorMMEx(Color, Tol, StartRadial, EndRadial, StartRadius, EndRadius: Integer): integer;
Returns the percentage of colour on the minimap section defined by StartRadial, EndRadial, StartRadius, and EndRadius.
Note
by Richard, and Nava2
Example:
function PercentColorMM(Color, Tol: Integer): Integer;
Returns the percent of a colour on the whole minimap.
Note
by Richard
Example:
function FindMMColorsTolerance(var Points: TPointArray; Color, Tol: Integer): Boolean;
Finds all colors within “Tol” tolerance in the minimap circle and if successful, returns a TPointArray containing them, sorted from MMCX, MMCY.
Note
by EvilChicken!
Example:
function GetColorArrayInfo(C: TIntegerArray; var BestColors, Tolerances: TIntegerArray; Speed2Mods: TExtendedArray; var RGB: array of TIntegerArray; var HSL, XYZ: array of TExtendedArray): array of array of TExtendedArray;
Result[CTS][Div][MMA]
Note
by Nava2
Example:
function GetBestColor(Colors: TIntegerArray; CTS: Integer; var Tol: Integer; var Speed2Modifiers: TExtendedArray): Integer;
Gets the best colour to find as well as the tolerance and modifiers based on which CTS you input.
Note
by Nava2
Example:
function CreateAutoColorInfo(Colors: TIntegerArray): TAutoColorInfo;
Creates a TAutoColorInfo from the inputted array of colors.
Note
by Nava2
Example: