barbrady

misc.simba.simba

Apr 30th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 3.42 KB | None | 0 0
  1. (*
  2.   File name: Simba.simba
  3.   Description: Contains functions that are called within simba, and extra overloaded
  4.   functions
  5.   Authors: Officer Barbrady
  6. *)
  7.  
  8.  
  9.  
  10. (*
  11.   Author: ??
  12.   Description: Gets system time
  13. *)
  14.  
  15. function GetSystemTime: LongWord; override;
  16. begin
  17.   Result := GetTickCount;
  18. end;
  19.  
  20. (*
  21.   Author: ??
  22.   Description: Terminates script
  23. *)
  24.  
  25. procedure TerminateScript; override;
  26. begin
  27.   Halt();
  28. end;
  29.  
  30. (*
  31.   Author: ??
  32.   Description: Sets color tolerance speed(CTS)
  33. *)
  34.  
  35. procedure ColorToleranceSpeed(cts : integer);
  36. begin;
  37.   SetColorToleranceSpeed(cts);
  38. end;
  39.  
  40. (*
  41.   Author: ??
  42.   Description: Gets color tolerance speed(CTS)
  43. *)
  44.  
  45. function getColorToleranceSpeed:Integer;
  46. begin
  47.   exit(GetToleranceSpeed);
  48. end;
  49.  
  50. (*
  51.   Author: ??
  52.   Description: Sets color tolerance speed modifiers
  53. *)
  54.  
  55. procedure SetColorspeed2Modifiers(huemodifier, saturationmodifier: Extended);
  56. begin
  57.   SetToleranceSpeed2Modifiers(Huemodifier, saturationmodifier);
  58. end;
  59.  
  60. (*
  61.   Author: Officer Barbrady
  62.   Description: overload for findColorTolerance, using box instead of integers
  63. *)
  64.  
  65. function findColorTolerance(var x, y:Integer;col:Integer;b:TBox;tol:Integer):boolean;overload;
  66. begin
  67.   result := findColorTolerance(x, y, col, b.x1, b.y1, b.x2, b.y2, tol);
  68. end;
  69.  
  70. (*
  71.   Author: Officer Barbrady
  72.   Description: overload for findColorTolerance, using box instead of integers,
  73.   does not need to use var x, y
  74. *)
  75.  
  76. function findColorTolerance(col:Integer;b:TBox;tol:Integer):boolean;overload;
  77. var
  78.   x, y:Integer;
  79. begin
  80.   result := findColorTolerance(x, y, col, b.x1, b.y1, b.x2, b.y2, tol);
  81. end;
  82.  
  83. (*
  84.   Author: Officer Barbrady
  85.   Description: overload for findColorsTolerance, using box instead of integers
  86. *)
  87.  
  88. function findColorsTolerance(var tpa:TPointArray;col:Integer;b:TBox;tol:Integer):boolean;overload;
  89. begin
  90.   result := findColorstolerance(tpa, col, b.x1, b.y1, b.x2, b.y2, tol);
  91. end;
  92.  
  93. (*
  94.   Author: Officer Barbrady
  95.   Description: overload for findColorsSpiralTolerance, using box instead of integers
  96. *)
  97.  
  98. function findColorsSpiralTolerance(x, y:Integer;var tpa:TPointArray;col:Integer;b:TBox;tol:Integer):boolean;overload;
  99. begin
  100.   result := findColorsSpiraltolerance(x, y, tpa, col, b.x1, b.y1, b.x2, b.y2, tol);
  101. end;
  102.  
  103. (*
  104.   Author: Officer Barbrady
  105.   Description: overload for findColors, using box instead of integers
  106. *)
  107.  
  108. function findColors(var tpa:tpointarray; color:integer;b:tbox):boolean;overload;
  109. begin
  110.   result := findColors(tpa, color, b.x1, b.y1, b.x2, b.y2);
  111. end;
  112.  
  113. (*
  114.   Author: Officer Barbrady
  115.   Description: overload for findColor, using box instead of integers
  116. *)
  117.  
  118. function findColor(var x, y:integer;color:integer;b:tbox):boolean; overload;
  119. begin
  120.   result := findColor(x, y, color, b.x1, b.y1, b.x2, b.y2);
  121. end;
  122.  
  123. (*
  124.   Author: Officer Barbrady
  125.   Description: overload for findColor, using box instead of integers
  126.   does not need to use var x, y
  127. *)
  128.  
  129. function findColor(color:integer;b:tbox):boolean; overload;
  130. var
  131.   x, y:integer;
  132. begin
  133.   result := findColor(x, y, color, b.x1, b.y1, b.x2, b.y2);
  134. end;
  135.  
  136. (*
  137.   Author: not me
  138.   Description: find colors and filters by rad
  139. *)
  140.  
  141. function FindColorsPie(var Points: TPointArray; Color, Tol: Integer; StartD,
  142.   EndD, MinR, MaxR: Extended; x1, y1, x2, y2, Mx, My: Integer): Boolean;
  143. begin
  144.   Result := FindColorsTolerance(Points, Color, x1, y1, x2, y2, Tol);
  145.   if (Result) then
  146.     FilterPointsPie(Points, StartD, EndD, MinR, MaxR, Mx, My);
  147. end;
Advertisement
Add Comment
Please, Sign In to add comment