mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 09:12:19 -05:00
Fixed wrappers (made them have ps_ prefix and made sure they have the 'extdecl' macro).
Todo is the TPA-unit.. Create wrappers :(
This commit is contained in:
parent
2c425d107f
commit
2a3868e8c7
@ -20,42 +20,42 @@
|
||||
|
||||
Bitmap.inc for the Mufasa Macro Library
|
||||
}
|
||||
function CreateBitmapString(bmp : integer) : string; extdecl;
|
||||
function ps_CreateBitmapString(bmp : integer) : string; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MBitmaps[bmp].ToString;
|
||||
end;
|
||||
|
||||
function GetMufasaBitmap(bmp : integer): TMufasaBitmap; extdecl;
|
||||
function ps_GetMufasaBitmap(bmp : integer): TMufasaBitmap; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MBitmaps[bmp];
|
||||
end;
|
||||
|
||||
function CreateBitmap(w,h : integer):integer; extdecl;
|
||||
function ps_CreateBitmap(w,h : integer):integer; extdecl;
|
||||
begin
|
||||
result := CurrThread.Client.MBitmaps.CreateBMP(w,h);
|
||||
end;
|
||||
|
||||
procedure FreeBitmap(Number : integer); extdecl;
|
||||
procedure ps_FreeBitmap(Number : integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.MBitmaps.FreeBMP(Number);
|
||||
end;
|
||||
|
||||
procedure SaveBitmap(Bmp : integer; path : string); extdecl;
|
||||
procedure ps_SaveBitmap(Bmp : integer; path : string); extdecl;
|
||||
begin;
|
||||
CurrThread.Client.MBitmaps[Bmp].SaveToFile(Path);
|
||||
end;
|
||||
|
||||
function BitmapFromString(Width,height : integer; Data : string) : integer; extdecl;
|
||||
function ps_BitmapFromString(Width,height : integer; Data : string) : integer; extdecl;
|
||||
begin;
|
||||
Result := CurrThread.Client.MBitmaps.CreateBMPFromString(Width,Height,Data);
|
||||
end;
|
||||
|
||||
function LoadBitmap(Path : String) : integer; extdecl;
|
||||
function ps_LoadBitmap(Path : String) : integer; extdecl;
|
||||
begin;
|
||||
Result := CurrThread.Client.MBitmaps.CreateBMPFromFile(Path);
|
||||
end;
|
||||
|
||||
procedure SetBitmapSize(Bmp,NewW,NewH : integer); extdecl;
|
||||
procedure ps_SetBitmapSize(Bmp,NewW,NewH : integer); extdecl;
|
||||
begin;
|
||||
if (NewW>=0) and (NewH >=0) then
|
||||
CurrThread.Client.MBitmaps[Bmp].SetSize(NewW,NewH)
|
||||
@ -63,7 +63,7 @@ begin;
|
||||
raise exception.createfmt('Wrong Width or Height in SetBitmapSize: (%d,%d)',[NewW,NewH]);
|
||||
end;
|
||||
|
||||
procedure StretchBitmapResize(Bmp,NewW,NewH : integer); extdecl;
|
||||
procedure ps_StretchBitmapResize(Bmp,NewW,NewH : integer); extdecl;
|
||||
begin;
|
||||
if (NewW>=0) and (NewH >=0) then
|
||||
CurrThread.Client.MBitmaps[Bmp].StretchResize(NewW,NewH)
|
||||
@ -71,7 +71,7 @@ begin;
|
||||
raise exception.createfmt('Wrong Width or Height in ScretchResize: (%d,%d)',[NewW,NewH]);
|
||||
end;
|
||||
|
||||
procedure GetBitmapSize(Bmp : integer; out BmpW,BmpH : integer); extdecl;
|
||||
procedure ps_GetBitmapSize(Bmp : integer; out BmpW,BmpH : integer); extdecl;
|
||||
begin;
|
||||
With CurrThread.Client.MBitmaps[bmp] do
|
||||
begin;
|
||||
@ -80,81 +80,81 @@ begin;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure SetBitmapName(Bmp : integer; name : string); extdecl;
|
||||
procedure ps_SetBitmapName(Bmp : integer; name : string); extdecl;
|
||||
begin;
|
||||
CurrThread.Client.MBitmaps[Bmp].Name:= name;
|
||||
end;
|
||||
|
||||
function CreateMirroredBitmap(Bmp : integer) : integer; extdecl;
|
||||
function ps_CreateMirroredBitmap(Bmp : integer) : integer; extdecl;
|
||||
begin;
|
||||
Result := CurrThread.Client.MBitmaps.CreateMirroredBitmap(Bmp, MirrorWidth);
|
||||
end;
|
||||
|
||||
function CreateMirroredBitmapEx(Bmp : integer; MirrorStyle : TBmpMirrorStyle) : integer; extdecl;
|
||||
function ps_CreateMirroredBitmapEx(Bmp : integer; MirrorStyle : TBmpMirrorStyle) : integer; extdecl;
|
||||
begin;
|
||||
Result := CurrThread.Client.MBitmaps.CreateMirroredBitmap(Bmp,MirrorStyle);
|
||||
end;
|
||||
|
||||
function FastGetPixel(bmp,x,y : integer) : LongWord; extdecl;
|
||||
function ps_FastGetPixel(bmp,x,y : integer) : LongWord; extdecl;
|
||||
begin;
|
||||
Result := CurrThread.Client.MBitmaps[Bmp].FastGetPixel(x,y);
|
||||
end;
|
||||
|
||||
function FastGetPixels(bmp : integer; TPA : TPointArray) : TIntegerArray; extdecl;
|
||||
function ps_FastGetPixels(bmp : integer; TPA : TPointArray) : TIntegerArray; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MBitmaps[Bmp].FastGetPixels(TPA);
|
||||
end;
|
||||
|
||||
procedure FastSetPixel(Bmp,x,y : integer; Color : TColor); extdecl;
|
||||
procedure ps_FastSetPixel(Bmp,x,y : integer; Color : TColor); extdecl;
|
||||
begin
|
||||
CurrThread.Client.MBitmaps[bmp].FastSetPixel(x,y,color);
|
||||
end;
|
||||
|
||||
procedure FastSetPixels(Bmp : integer; TPA : TPointArray; Colors : TIntegerArray); extdecl;
|
||||
procedure ps_FastSetPixels(Bmp : integer; TPA : TPointArray; Colors : TIntegerArray); extdecl;
|
||||
begin;
|
||||
CurrThread.Client.MBitmaps[Bmp].FastSetPixels(TPA,Colors);
|
||||
end;
|
||||
|
||||
procedure DrawTPABitmap(bitmap : integer; TPA : TPointArray; Color : integer); extdecl;
|
||||
procedure ps_DrawTPABitmap(bitmap : integer; TPA : TPointArray; Color : integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.MBitmaps[Bitmap].DrawTPA(TPA,Color);
|
||||
end;
|
||||
procedure DrawATPABitmap(bitmap : integer; ATPA : T2DPointArray); extdecl;
|
||||
procedure ps_DrawATPABitmap(bitmap : integer; ATPA : T2DPointArray); extdecl;
|
||||
begin
|
||||
CurrThread.Client.MBitmaps[bitmap].DrawATPA(ATPA);
|
||||
end;
|
||||
|
||||
procedure DrawATPABitmapEx(bitmap : integer; ATPA : T2DPointArray; Colors : TIntegerArray); extdecl;
|
||||
procedure ps_DrawATPABitmapEx(bitmap : integer; ATPA : T2DPointArray; Colors : TIntegerArray); extdecl;
|
||||
begin
|
||||
CurrThread.Client.MBitmaps[bitmap].DrawATPA(ATPA,Colors);
|
||||
end;
|
||||
|
||||
procedure FastDrawClear(bmp : integer; Color : TColor); extdecl;
|
||||
procedure ps_FastDrawClear(bmp : integer; Color : TColor); extdecl;
|
||||
begin;
|
||||
CurrThread.Client.MBitmaps[bmp].FastDrawClear(Color);
|
||||
end;
|
||||
|
||||
procedure DrawBitmap(Bmp: Integer; Dest: TCanvas; x, y: Integer);extdecl;
|
||||
procedure ps_DrawBitmap(Bmp: Integer; Dest: TCanvas; x, y: Integer);extdecl;
|
||||
begin
|
||||
CurrThread.Client.MBitmaps[bmp].DrawToCanvas(x,y,dest);
|
||||
end;
|
||||
|
||||
procedure FastDrawTransparent(x, y: Integer; SourceBitmap, TargetBitmap: Integer); extdecl;
|
||||
procedure ps_FastDrawTransparent(x, y: Integer; SourceBitmap, TargetBitmap: Integer); extdecl;
|
||||
begin;
|
||||
CurrThread.Client.MBitmaps[SourceBitmap].FastDrawTransparent(x,y,CurrThread.Client.MBitmaps[TargetBitmap]);
|
||||
end;
|
||||
|
||||
procedure SetTransparentColor(Bmp : integer; Color : TColor); extdecl;
|
||||
procedure ps_SetTransparentColor(Bmp : integer; Color : TColor); extdecl;
|
||||
begin
|
||||
CurrThread.Client.MBitmaps[Bmp].SetTransparentColor(Color);
|
||||
end;
|
||||
|
||||
function GetTransparentColor(Bmp : integer) : TColor; extdecl;
|
||||
function ps_GetTransparentColor(Bmp : integer) : TColor; extdecl;
|
||||
begin;
|
||||
Result := CurrThread.Client.MBitmaps[bmp].GetTransparentColor;
|
||||
end;
|
||||
|
||||
procedure FastReplaceColor(bmp: Integer; OldColor, NewColor: TColor); extdecl;
|
||||
procedure ps_FastReplaceColor(bmp: Integer; OldColor, NewColor: TColor); extdecl;
|
||||
begin
|
||||
CurrThread.Client.MBitmaps[Bmp].FastReplaceColor(OldColor,NewColor);
|
||||
end;
|
||||
@ -164,50 +164,50 @@ begin
|
||||
CurrThread.Client.MBitmaps.GetBMP(bmp).CopyClientToBitmap(CurrThread.Client.IOManager, True, xs, ys, xe, ye);
|
||||
end;
|
||||
|
||||
function BitmapFromClient(const xs, ys, xe, ye: Integer): Integer; extdecl;
|
||||
function ps_BitmapFromClient(const xs, ys, xe, ye: Integer): Integer; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MBitmaps.CreateBMP(0,0);
|
||||
CurrThread.Client.MBitmaps[result].CopyClientToBitmap(CurrThread.Client.IOManager,True,xs,ys,xe,ye);
|
||||
end;
|
||||
|
||||
function FindBitmap(Bitmap: integer; out x, y: Integer): Boolean; extdecl;
|
||||
function ps_FindBitmap(Bitmap: integer; out x, y: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client do
|
||||
result := MFinder.FindBitmap( MBitmaps[bitmap],x,y);
|
||||
end;
|
||||
|
||||
function FindBitmapIn(bitmap: integer; out x, y: Integer; xs, ys, xe, ye: Integer): Boolean; extdecl;
|
||||
function ps_FindBitmapIn(bitmap: integer; out x, y: Integer; xs, ys, xe, ye: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client do
|
||||
result := MFinder.FindBitmapIn( MBitmaps[bitmap],x,y,xs,ys,xe,ye);
|
||||
end;
|
||||
|
||||
function FindBitmapToleranceIn(bitmap: integer; out x, y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer): Boolean; extdecl;
|
||||
function ps_FindBitmapToleranceIn(bitmap: integer; out x, y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client do
|
||||
result := MFinder.FindBitmapToleranceIn( MBitmaps[bitmap],x,y,xs,ys,xe,ye,tolerance);
|
||||
end;
|
||||
|
||||
|
||||
function FindBitmapSpiral(bitmap: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean; extdecl;
|
||||
function ps_FindBitmapSpiral(bitmap: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client do
|
||||
result := MFinder.FindBitmapSpiral(Mbitmaps[bitmap],x,y,xs,ys,xe,ye);
|
||||
end;
|
||||
|
||||
function FindBitmapsSpiralTolerance(bitmap: integer; x, y: Integer; out Points : TPointArray; xs, ys, xe, ye,tolerance: Integer): Boolean; extdecl;
|
||||
function ps_FindBitmapsSpiralTolerance(bitmap: integer; x, y: Integer; out Points : TPointArray; xs, ys, xe, ye,tolerance: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client do
|
||||
result := MFinder.FindBitmapsSpiralTolerance(MBitmaps[bitmap],x,y,points,xs,ys,xe,ye,tolerance);
|
||||
end;
|
||||
|
||||
function FindBitmapSpiralTolerance(bitmap: integer; var x, y: Integer; xs, ys, xe, ye,tolerance : integer): Boolean; extdecl;
|
||||
function ps_FindBitmapSpiralTolerance(bitmap: integer; var x, y: Integer; xs, ys, xe, ye,tolerance : integer): Boolean; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client do
|
||||
result := MFinder.FindBitmapSpiralTolerance(MBitmaps[bitmap],x,y,xs,ys,xe,ye,tolerance);
|
||||
end;
|
||||
|
||||
function RotateBitmap(bitmap: Integer; angle: Extended): Integer; extdecl;
|
||||
function ps_RotateBitmap(bitmap: Integer; angle: Extended): Integer; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client.MBitmaps do
|
||||
begin;
|
||||
@ -216,7 +216,7 @@ begin;
|
||||
end;
|
||||
end;
|
||||
|
||||
function Desaturate(Bitmap : integer) : integer; extdecl;
|
||||
function ps_Desaturate(Bitmap : integer) : integer; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client.MBitmaps do
|
||||
begin;
|
||||
@ -224,15 +224,15 @@ begin;
|
||||
Bmp[Bitmap].Desaturate(Bmp[result]);
|
||||
end;
|
||||
end;
|
||||
procedure InvertBitmap(Bitmap : integer); extdecl;
|
||||
procedure ps_InvertBitmap(Bitmap : integer); extdecl;
|
||||
begin;
|
||||
CurrThread.Client.MBitmaps[Bitmap].Invert;
|
||||
end;
|
||||
function CopyBitmap(Bitmap : integer) : integer; extdecl;
|
||||
function ps_CopyBitmap(Bitmap : integer) : integer; extdecl;
|
||||
begin;
|
||||
result := Currthread.Client.MBitmaps.CopyBMP(bitmap);
|
||||
end;
|
||||
function GreyScaleBitmap(Bitmap : integer) : integer; extdecl;
|
||||
function ps_GreyScaleBitmap(Bitmap : integer) : integer; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client.MBitmaps do
|
||||
begin;
|
||||
@ -240,7 +240,7 @@ begin;
|
||||
Bmp[Bitmap].GreyScale(Bmp[result]);
|
||||
end;
|
||||
end;
|
||||
function BrightnessBitmap(Bitmap,br : integer) : integer; extdecl;
|
||||
function ps_BrightnessBitmap(Bitmap,br : integer) : integer; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client.MBitmaps do
|
||||
begin;
|
||||
@ -248,7 +248,7 @@ begin;
|
||||
Bmp[Bitmap].Brightness(Bmp[result],br);
|
||||
end;
|
||||
end;
|
||||
function ContrastBitmap(bitmap : integer; co : extended) : integer; extdecl;
|
||||
function ps_ContrastBitmap(bitmap : integer; co : extended) : integer; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client.MBitmaps do
|
||||
begin;
|
||||
@ -257,7 +257,7 @@ begin;
|
||||
end;
|
||||
end;
|
||||
|
||||
function PosterizeBitmap(Bitmap : integer; po : integer) : integer; extdecl;
|
||||
function ps_PosterizeBitmap(Bitmap : integer; po : integer) : integer; extdecl;
|
||||
begin;
|
||||
with CurrThread.Client.MBitmaps do
|
||||
begin
|
||||
@ -265,16 +265,16 @@ begin;
|
||||
Bmp[bitmap].Posterize(Bmp[result],po);
|
||||
end;
|
||||
end;
|
||||
function CreateMaskFromBitmap(Bitmap : integer) : TMask; extdecl;
|
||||
function ps_CreateMaskFromBitmap(Bitmap : integer) : TMask; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MBitmaps[Bitmap].CreateTMask;
|
||||
end;
|
||||
|
||||
function FindMaskTolerance(const mask: TMask; out x, y: Integer; xs,ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean; extdecl;
|
||||
function ps_FindMaskTolerance(const mask: TMask; out x, y: Integer; xs,ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MFinder.FindMaskTolerance(Mask,x,y,xs,ys,xe,ye,tolerance,contourtolerance);
|
||||
end;
|
||||
function FindBitmapMaskTolerance(mask: Integer; out x, y: Integer; xs, ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean; extdecl;
|
||||
function ps_FindBitmapMaskTolerance(mask: Integer; out x, y: Integer; xs, ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
{$ifdef mDebug}
|
||||
mDebugLn('Better be using FindMaskTolerance in combination with CreateMaskFromBitmap, more efficient.');
|
||||
@ -283,7 +283,7 @@ begin;
|
||||
result := MFinder.FindMaskTolerance(MBitmaps[mask].CreateTMask,x,y,xs,ys,xe,ye,tolerance,contourtolerance);
|
||||
end;
|
||||
|
||||
function FindDeformedBitmapToleranceIn(bitmap: integer; out x,
|
||||
function ps_FindDeformedBitmapToleranceIn(bitmap: integer; out x,
|
||||
y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer; Range: Integer;
|
||||
AllowPartialAccuracy: Boolean; out accuracy: Extended): Boolean; extdecl;
|
||||
begin;
|
||||
|
@ -21,104 +21,104 @@
|
||||
Colour.inc for the Mufasa Macro Library
|
||||
}
|
||||
|
||||
function GetColor(x,y : integer) : TColor; extdecl;
|
||||
function ps_GetColor(x,y : integer) : TColor; extdecl;
|
||||
begin;
|
||||
Result := CurrThread.Client.IOManager.GetColor(x,y);
|
||||
end;
|
||||
|
||||
procedure GetColorsWrap(Coords : TPointArray; var Colors: TIntegerArray); extdecl;
|
||||
procedure ps_GetColorsWrap(Coords : TPointArray; var Colors: TIntegerArray); extdecl;
|
||||
begin
|
||||
Colors := CurrThread.Client.MFinder.GetColors(coords);
|
||||
end;
|
||||
|
||||
function GetColors(Coords : TPointArray) : TIntegerArray; extdecl;
|
||||
function ps_GetColors(Coords : TPointArray) : TIntegerArray; extdecl;
|
||||
begin
|
||||
result := CurrThread.Client.MFinder.GetColors(coords);
|
||||
end;
|
||||
|
||||
function findcolor(out x, y: integer; color, x1, y1, x2, y2: integer): boolean; extdecl;
|
||||
function ps_findcolor(out x, y: integer; color, x1, y1, x2, y2: integer): boolean; extdecl;
|
||||
begin
|
||||
Result := CurrThread.Client.MFinder.FindColor(x, y, color, x1, y1, x2, y2);
|
||||
end;
|
||||
|
||||
function findcolortoleranceOptimised(out x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean; extdecl;
|
||||
function ps_findcolortoleranceOptimised(out x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean; extdecl;
|
||||
begin
|
||||
Result := CurrThread.Client.MFinder.FindColorToleranceOptimised(x, y, color, x1, y1, x2, y2, tol);
|
||||
end;
|
||||
function findcolortolerance(out x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean; extdecl;
|
||||
function ps_findcolortolerance(out x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean; extdecl;
|
||||
begin
|
||||
Result := CurrThread.Client.MFinder.FindColorTolerance(x, y, color, x1, y1, x2, y2, tol);
|
||||
end;
|
||||
|
||||
function FindColors(out TPA: TPointArray; Color, x1, y1, x2, y2: Integer): Boolean; extdecl;
|
||||
function ps_FindColors(out TPA: TPointArray; Color, x1, y1, x2, y2: Integer): Boolean; extdecl;
|
||||
begin
|
||||
Result := CurrThread.Client.MFinder.FindColors(TPA, color, x1, y1, x2, y2);
|
||||
end;
|
||||
|
||||
procedure SetColorToleranceSpeed(cts: Integer); extdecl;
|
||||
procedure ps_SetColorToleranceSpeed(cts: Integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.MFinder.SetToleranceSpeed(cts);
|
||||
end;
|
||||
|
||||
function GetToleranceSpeed: Integer; extdecl;
|
||||
function ps_GetToleranceSpeed: Integer; extdecl;
|
||||
begin
|
||||
CurrThread.Client.MFinder.GetToleranceSpeed;
|
||||
end;
|
||||
|
||||
procedure SetToleranceSpeed2Modifiers(nHue, nSat: Extended); extdecl;
|
||||
procedure ps_SetToleranceSpeed2Modifiers(nHue, nSat: Extended); extdecl;
|
||||
begin
|
||||
CurrThread.Client.MFinder.SetToleranceSpeed2Modifiers(nHue, nSat);
|
||||
end;
|
||||
|
||||
procedure GetToleranceSpeed2Modifiers(out hMod, sMod: Extended); extdecl;
|
||||
procedure ps_GetToleranceSpeed2Modifiers(out hMod, sMod: Extended); extdecl;
|
||||
begin
|
||||
CurrThread.Client.MFinder.GetToleranceSpeed2Modifiers(hMod, sMod);
|
||||
end;
|
||||
|
||||
function SimilarColors(Col1,Col2,Tol : integer) : boolean; extdecl;
|
||||
function ps_SimilarColors(Col1,Col2,Tol : integer) : boolean; extdecl;
|
||||
begin;
|
||||
Result := CurrThread.Client.MFinder.SimilarColors(Col1,Col2,Tol);
|
||||
end;
|
||||
|
||||
function CountColor(Color, xs, ys, xe, ye: Integer): Integer; extdecl;
|
||||
function ps_CountColor(Color, xs, ys, xe, ye: Integer): Integer; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MFinder.CountColor(color,xs,ys,xe,ye);
|
||||
end;
|
||||
function CountColorTolerance(Color, xs, ys, xe, ye, Tolerance: Integer): Integer; extdecl;
|
||||
function ps_CountColorTolerance(Color, xs, ys, xe, ye, Tolerance: Integer): Integer; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MFinder.CountColorTolerance(color,xs,ys,xe,ye,tolerance);
|
||||
end;
|
||||
|
||||
function FindColorsToleranceOptimised(out Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean; extdecl;
|
||||
function ps_FindColorsToleranceOptimised(out Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MFinder.FindColorsToleranceOptimised(points,color,xs,ys,xe,ye,tolerance);
|
||||
end;
|
||||
function FindColorsTolerance(out Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean; extdecl;
|
||||
function ps_FindColorsTolerance(out Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MFinder.FindColorsTolerance(points,color,xs,ys,xe,ye,tolerance);
|
||||
end;
|
||||
|
||||
function FindColorSpiral(var x, y: Integer; color, xs, ys, xe, ye: Integer): Boolean; extdecl;
|
||||
function ps_FindColorSpiral(var x, y: Integer; color, xs, ys, xe, ye: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MFinder.FindColorSpiral(x,y,color,xs,ys,xe,ye);
|
||||
end;
|
||||
|
||||
function FindColorSpiralTolerance(var x, y: Integer; color, xs, ys, xe, ye,Tol: Integer): Boolean;
|
||||
function ps_FindColorSpiralTolerance(var x, y: Integer; color, xs, ys, xe, ye,Tol: Integer): Boolean;
|
||||
begin
|
||||
result := CurrThread.Client.MFinder.FindColorSpiralTolerance(x,y,color,xs,ys,xe,ye,tol);
|
||||
end;
|
||||
|
||||
function FindColorsSpiralTolerance(x, y: Integer; out Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer) : boolean; extdecl;
|
||||
function ps_FindColorsSpiralTolerance(x, y: Integer; out Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer) : boolean; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MFinder.FindColorsSpiralTolerance(x,y,Points,color,xs,ys,xe,ye,tolerance);
|
||||
end;
|
||||
|
||||
function FindColoredArea(var x, y: Integer; color, xs, ys, xe, ye: Integer; MinArea: Integer): Boolean; extdecl;
|
||||
function ps_FindColoredArea(var x, y: Integer; color, xs, ys, xe, ye: Integer; MinArea: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MFinder.FindColoredArea(x,y,color,xs,ys,xe,ye,minarea);
|
||||
end;
|
||||
|
||||
function FindColoredAreaTolerance(var x, y: Integer; Color, xs, ys, xe, ye, MinArea, tol: Integer): Boolean; extdecl;
|
||||
function ps_FindColoredAreaTolerance(var x, y: Integer; Color, xs, ys, xe, ye, MinArea, tol: Integer): Boolean; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MFinder.FindColoredAreaTolerance(x,y,color,xs,ys,xe,ye,minarea,tol);
|
||||
end;
|
||||
|
@ -68,7 +68,7 @@ function ps_FilePointerPos(FileNum: Integer): Integer; extdecl;
|
||||
begin
|
||||
Result := CurrThread.Client.MFiles.FilePointerPos(FileNum);
|
||||
end;
|
||||
function ps_FileExists ( const FileName : string ) : Boolean;
|
||||
function ps_FileExists ( const FileName : string ) : Boolean;extdecl;
|
||||
begin
|
||||
result := FileExists(FileName);
|
||||
end;
|
||||
|
@ -1,4 +1,9 @@
|
||||
function ps_GetPage(S: String): String; extdecl;
|
||||
procedure ps_OpenWebPage( const url : string); extdecl;
|
||||
begin
|
||||
OpenWebPage(url)
|
||||
end;
|
||||
|
||||
function ps_GetPage(const S: String): String; extdecl;
|
||||
begin
|
||||
result := CurrThread.MInternet.GetPage(S);
|
||||
end;
|
||||
@ -13,21 +18,21 @@ begin;
|
||||
CurrThread.MInternet.FreeHTTPClient(client);
|
||||
end;
|
||||
|
||||
function ps_GetHTTPPage(Client: Integer; URL: string): string; extdecl;
|
||||
function ps_GetHTTPPage(Client: Integer;const URL: string): string; extdecl;
|
||||
begin
|
||||
result := CurrThread.MInternet.GetHTTPClient(Client).GetHTTPPage(url);
|
||||
end;
|
||||
procedure ps_SetHTTPUserAgent(Client: Integer; Agent: string); extdecl;
|
||||
procedure ps_SetHTTPUserAgent(Client: Integer;const Agent: string); extdecl;
|
||||
begin
|
||||
CurrThread.MInternet.GetHTTPClient(Client).SetHTTPUserAgent(agent);
|
||||
end;
|
||||
|
||||
function ps_PostHTTPPage(Client: Integer; Url: string; PostData: string): string; extdecl;
|
||||
function ps_PostHTTPPage(Client: Integer;const Url,PostData: string): string; extdecl;
|
||||
begin
|
||||
result := CurrThread.MInternet.GetHTTPClient(Client).PostHTTPPage(url,postdata);
|
||||
end;
|
||||
|
||||
function ps_PostHTTPPageEx(Client: Integer; Url: string): string; extdecl;
|
||||
function ps_PostHTTPPageEx(Client: Integer;const Url: string): string; extdecl;
|
||||
begin
|
||||
result := CurrThread.MInternet.GetHTTPClient(Client).PostHTTPPage(url);
|
||||
end;
|
||||
@ -37,7 +42,7 @@ begin
|
||||
CurrThread.MInternet.GetHTTPClient(Client).ClearPostData;
|
||||
end;
|
||||
|
||||
procedure ps_AddPostVariable(Client: Integer; VarName, VarValue: string); extdecl;
|
||||
procedure ps_AddPostVariable(Client: Integer;const VarName, VarValue: string); extdecl;
|
||||
begin
|
||||
CurrThread.MInternet.GetHTTPClient(Client).AddPostVariable(varname,varvalue);
|
||||
end;
|
||||
|
@ -21,32 +21,32 @@
|
||||
Keyboard.inc for the Mufasa Macro Library
|
||||
}
|
||||
|
||||
procedure KeyDown(key: Word); extdecl;
|
||||
procedure ps_KeyDown(key: Word); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.KeyDown(key);
|
||||
end;
|
||||
|
||||
procedure KeyUp(key: Word); extdecl;
|
||||
procedure ps_KeyUp(key: Word); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.KeyUp(key);
|
||||
end;
|
||||
|
||||
procedure SendKeys(s: string); extdecl;
|
||||
procedure ps_SendKeys(const s: string); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.SendText(s);
|
||||
end;
|
||||
|
||||
procedure PressKey(key: Word); extdecl;
|
||||
procedure ps_PressKey(key: Word); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.PressKey(key);
|
||||
end;
|
||||
|
||||
function isKeyDown(key: Word): boolean; extdecl;
|
||||
function ps_isKeyDown(key: Word): boolean; extdecl;
|
||||
begin
|
||||
Result := CurrThread.Client.IOManager.isKeyDown(key);
|
||||
end;
|
||||
|
||||
function GetKeyCode(c :char) : integer; extdecl;
|
||||
function ps_GetKeyCode(c :char) : integer; extdecl;
|
||||
begin
|
||||
result := CurrThread.Client.IOManager.GetKeyCode(c);
|
||||
end;
|
||||
|
@ -98,7 +98,7 @@ begin
|
||||
x := x - Decrease;
|
||||
end;
|
||||
|
||||
function Factorial(number: longword): Int64; extdecl;
|
||||
function ps_Factorial(number: longword): Int64; extdecl;
|
||||
var
|
||||
Loop : longword;
|
||||
begin
|
||||
@ -107,12 +107,12 @@ begin
|
||||
result := result * loop;
|
||||
end;
|
||||
|
||||
function BinCoe(a, b: LongInt): Extended; extdecl;
|
||||
function ps_BinCoe(a, b: LongInt): Extended; extdecl;
|
||||
begin
|
||||
result := Factorial(a) / (factorial(b) * factorial(a-b));
|
||||
result := ps_Factorial(a) / (ps_Factorial(b) * ps_Factorial(a-b));
|
||||
end;
|
||||
|
||||
function FixD(Degrees : extended) : Extended; extdecl;
|
||||
function ps_FixD(Degrees : extended) : Extended; extdecl;
|
||||
begin;
|
||||
Result := Degrees;
|
||||
while Result < 0 do
|
||||
@ -120,8 +120,12 @@ begin;
|
||||
while Result > 360 do
|
||||
Result := Result - 360;
|
||||
end;
|
||||
function ps_InRange(const value,min,max : integer) : boolean;extdecl;
|
||||
begin
|
||||
Result := InRange(value,min,max);
|
||||
end;
|
||||
|
||||
function IntToBox(x1,y1,x2,y2 : integer) : TBox; extdecl;
|
||||
function ps_IntToBox(x1,y1,x2,y2 : integer) : TBox; extdecl;
|
||||
begin;
|
||||
result.x1 := x1;
|
||||
result.y1 := y1;
|
||||
@ -129,12 +133,12 @@ begin;
|
||||
result.y2 := y2;
|
||||
end;
|
||||
|
||||
function IntInBox(x, y: Integer; Box: TBox): Boolean; extdecl;
|
||||
function ps_IntInBox(x, y: Integer; Box: TBox): Boolean; extdecl;
|
||||
begin;
|
||||
result := (((x >= Box.x1) and(x <= Box.x2)) and ((y >= box.y1) and (y <= box.y2)));
|
||||
end;
|
||||
|
||||
function PointToBox(PT1,PT2 : TPoint) : TBox; extdecl;
|
||||
function ps_PointToBox(PT1,PT2 : TPoint) : TBox; extdecl;
|
||||
begin;
|
||||
result.x1 := PT1.x;
|
||||
result.y1 := PT1.y;
|
||||
@ -142,7 +146,7 @@ begin;
|
||||
result.y2 := PT2.y;
|
||||
end;
|
||||
|
||||
function PointInBox(PT : TPoint; Box: TBox): Boolean; extdecl;
|
||||
function ps_PointInBox(PT : TPoint; Box: TBox): Boolean; extdecl;
|
||||
begin;
|
||||
result := (((PT.x >= Box.x1) and(PT.x <= Box.x2)) and ((PT.y>= box.y1) and (PT.y <= box.y2)));
|
||||
end;
|
||||
|
@ -25,12 +25,12 @@ const
|
||||
ps_mouse_right = 0;
|
||||
ps_mouse_left = 1;
|
||||
ps_mouse_middle = 2;
|
||||
procedure MoveMouse(x, y: integer); extdecl;
|
||||
procedure ps_MoveMouse(x, y: integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.SetMousePos(X, Y);
|
||||
end;
|
||||
|
||||
procedure GetMousePos(out x, y: integer); extdecl;
|
||||
procedure ps_GetMousePos(out x, y: integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.GetMousePos(X, Y);
|
||||
end;
|
||||
@ -45,22 +45,22 @@ begin;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure HoldMouse(x, y: integer; clickType: integer); extdecl;
|
||||
procedure ps_HoldMouse(x, y: integer; clickType: integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.HoldMouse(x, y, ConvIntClickType(clickType));
|
||||
end;
|
||||
|
||||
procedure ReleaseMouse(x, y: integer; clickType: integer); extdecl;
|
||||
procedure ps_ReleaseMouse(x, y: integer; clickType: integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.ReleaseMouse(x, y, ConvIntClickType(clickType));
|
||||
end;
|
||||
|
||||
procedure ClickMouse(x, y: integer; clickType: integer); extdecl;
|
||||
procedure ps_ClickMouse(x, y: integer; clickType: integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.ClickMouse(x, y, ConvIntClickType(clickType));
|
||||
end;
|
||||
|
||||
function IsMouseButtonDown( button : integer) : boolean; extdecl;
|
||||
function ps_IsMouseButtonDown( button : integer) : boolean; extdecl;
|
||||
begin
|
||||
result := CurrThread.Client.IOManager.IsMouseButtonDown(ConvIntClickType(button));
|
||||
end;
|
||||
|
@ -21,17 +21,17 @@
|
||||
Other.inc for the Mufasa Macro Library
|
||||
}
|
||||
|
||||
function psSetScriptProp(prop : TSP_Property; Value: String): boolean; extdecl;
|
||||
function ps_SetScriptProp(prop : TSP_Property; Value: String): boolean; extdecl;
|
||||
begin
|
||||
Exit(CurrThread.Prop.SetProp(prop, Value));
|
||||
end;
|
||||
|
||||
function psGetScriptProp(prop : TSP_Property; var Value : string) : boolean; extdecl;
|
||||
function ps_GetScriptProp(prop : TSP_Property; var Value : string) : boolean; extdecl;
|
||||
begin;
|
||||
exit(CurrThread.Prop.GetProp(prop,value));
|
||||
end;
|
||||
|
||||
procedure psWait(t: Integer); extdecl;
|
||||
procedure ps_Wait(t: Integer); extdecl;
|
||||
{$ifdef MSWINDOWS}
|
||||
begin
|
||||
Sleep(t);
|
||||
@ -52,7 +52,7 @@ begin
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
procedure PlaySound( Sound : string); extdecl;
|
||||
procedure ps_PlaySound( Sound : string); extdecl;
|
||||
begin
|
||||
{$ifdef MSWINDOWS}
|
||||
sndPlaySound(PChar(sound),SND_ASYNC or SND_NODEFAULT);
|
||||
@ -61,7 +61,7 @@ begin
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
Procedure StopSound; extdecl;
|
||||
Procedure ps_StopSound; extdecl;
|
||||
begin
|
||||
{$ifdef MSWINDOWS}
|
||||
sndPlaySoundW(nil,0);
|
||||
@ -70,13 +70,13 @@ begin
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
procedure ClearDebug; extdecl;
|
||||
procedure ps_ClearDebug; extdecl;
|
||||
begin
|
||||
if Assigned(CurrThread.DebugClear) then
|
||||
CurrThread.DebugClear();
|
||||
end;
|
||||
|
||||
procedure SaveScreenshot(FileName: string); extdecl;
|
||||
procedure ps_SaveScreenshot(FileName: string); extdecl;
|
||||
var
|
||||
w,h : integer;
|
||||
bmp: TMufasaBitmap;
|
||||
@ -90,30 +90,30 @@ end;
|
||||
|
||||
|
||||
|
||||
procedure DisplayDebugImgWindow(w,h : integer); extdecl;
|
||||
procedure ps_DisplayDebugImgWindow(w,h : integer); extdecl;
|
||||
begin;
|
||||
CurrThread.DebugImg.DispSize^ := Classes.Point(w,h);
|
||||
CurrThread.Synchronize( CurrThread.DebugImg.ShowForm);
|
||||
end;
|
||||
|
||||
procedure DrawBitmapDebugImg(bmp : integer); extdecl;
|
||||
procedure ps_DrawBitmapDebugImg(bmp : integer); extdecl;
|
||||
begin;
|
||||
CurrThread.DebugImg.ToDrawBitmap^ := CurrThread.Client.MBitmaps[bmp];
|
||||
CurrThread.Synchronize(CurrThread.DebugImg.DrawBitmap);
|
||||
end;
|
||||
|
||||
function GetDebugBitmap : integer; extdecl;
|
||||
function ps_GetDebugBitmap : integer; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.MBitmaps.CreateBMP(0,0);
|
||||
CurrThread.DebugImg.GetDebugBitmap^ := CurrThread.Client.MBitmaps[result];
|
||||
CurrThread.Synchronize(CurrThread.DebugImg.GetBitmap);
|
||||
end;
|
||||
|
||||
procedure TerminateScript; extdecl;
|
||||
procedure ps_TerminateScript; extdecl;
|
||||
begin;
|
||||
CurrThread.Terminate;
|
||||
end;
|
||||
function GetTimeRunning: LongWord; extdecl;
|
||||
function ps_GetTimeRunning: LongWord; extdecl;
|
||||
begin;
|
||||
result := GetTickCount - CurrThread.StartTime;
|
||||
end;
|
||||
@ -123,7 +123,7 @@ begin
|
||||
QuickSort(Arr,low(arr),high(arr));
|
||||
end;
|
||||
|
||||
procedure ConvertTime(Time : integer; var h,m,s : integer); extdecl;
|
||||
procedure ps_ConvertTime(Time : integer; var h,m,s : integer); extdecl;
|
||||
var
|
||||
x : integer;
|
||||
begin;
|
||||
@ -154,7 +154,7 @@ function ps_GetTickCount : Longword; extdecl;
|
||||
begin
|
||||
result := GetTickCount;
|
||||
end;
|
||||
procedure HakunaMatata; extdecl;
|
||||
procedure ps_HakunaMatata; extdecl;
|
||||
begin;
|
||||
OpenWebPage('http://www.youtube.com/v/ejEVczA8PLU&hl=en&fs=1&autoplay=1');
|
||||
end;
|
||||
|
@ -21,7 +21,7 @@
|
||||
Settings.inc for the Mufasa Macro Library
|
||||
}
|
||||
|
||||
function SetSettingValue(KeyName,value : string) : boolean;
|
||||
function ps_SetSettingValue(const KeyName,value : string) : boolean; extdecl;
|
||||
begin
|
||||
if CurrThread.Sett <> nil then
|
||||
result:= CurrThread.Sett.SetKeyValue(KeyName,Value)
|
||||
@ -29,7 +29,7 @@ begin
|
||||
result:=false;
|
||||
end;
|
||||
|
||||
function KeyIsSetting(KeyName: String): Boolean;
|
||||
function ps_KeyIsSetting(const KeyName: String): Boolean; extdecl;
|
||||
begin
|
||||
if CurrThread.Sett <> nil then
|
||||
result:= CurrThread.Sett.IsKey(KeyName)
|
||||
@ -37,7 +37,7 @@ begin
|
||||
result:=false;
|
||||
end;
|
||||
|
||||
function KeyIsDirectory(KeyName: String): Boolean;
|
||||
function ps_KeyIsDirectory(const KeyName: String): Boolean;extdecl;
|
||||
begin
|
||||
if CurrThread.Sett <> nil then
|
||||
result:= CurrThread.Sett.IsDirectory(KeyName)
|
||||
@ -45,7 +45,7 @@ begin
|
||||
result := false;
|
||||
end;
|
||||
|
||||
function GetSettingValue(KeyName: String): String;
|
||||
function ps_GetSettingValue(const KeyName: String): String;extdecl;
|
||||
begin
|
||||
if CurrThread.Sett <> nil then
|
||||
result:= CurrThread.Sett.GetKeyValue(KeyName)
|
||||
@ -53,7 +53,7 @@ begin
|
||||
result:='';
|
||||
end;
|
||||
|
||||
function GetSettingValueDef(KeyName, defVal: String): String;
|
||||
function ps_GetSettingValueDef(const KeyName, defVal: String): String; extdecl;
|
||||
begin
|
||||
if CurrThread.Sett <> nil then
|
||||
result:= CurrThread.Sett.GetKeyValueDef(KeyName, defVal)
|
||||
@ -61,7 +61,7 @@ begin
|
||||
result:='';
|
||||
end;
|
||||
|
||||
function ListSettings(KeyName: String; var KeyReturn: TStringArray) : boolean;
|
||||
function ps_ListSettings(const KeyName: String; var KeyReturn: TStringArray) : boolean; extdecl;
|
||||
begin
|
||||
if CurrThread.Sett <> nil then
|
||||
Result := CurrThread.Sett.ListKeys(KeyName,keyReturn)
|
||||
@ -69,7 +69,7 @@ begin
|
||||
result := false;
|
||||
end;
|
||||
|
||||
function DeleteSetting(KeyName: String): Boolean;
|
||||
function ps_DeleteSetting(const KeyName: String): Boolean;extdecl;
|
||||
begin
|
||||
if CurrThread.Sett <> nil then
|
||||
Result := CurrThread.Sett.DeleteKey(KeyName)
|
||||
@ -77,7 +77,7 @@ begin
|
||||
result := False;
|
||||
end;
|
||||
|
||||
function DeleteSubSettings(KeyName: String): Boolean;
|
||||
function ps_DeleteSubSettings(const KeyName: String): Boolean; extdecl;
|
||||
begin
|
||||
if CurrThread.Sett <> nil then
|
||||
Result := CurrThread.Sett.DeleteSubKeys(KeyName)
|
||||
|
@ -21,84 +21,84 @@
|
||||
window.inc for the Mufasa Macro Library
|
||||
}
|
||||
|
||||
procedure SetDesktopAsClient; extdecl;
|
||||
procedure ps_SetDesktopAsClient; extdecl;
|
||||
begin;
|
||||
CurrThread.Client.IOManager.SetDesktop;
|
||||
end;
|
||||
|
||||
function SetTargetArray(P: Integer; w, h: integer): integer; extdecl;
|
||||
function ps_SetTargetArray(P: Integer; w, h: integer): integer; extdecl;
|
||||
begin
|
||||
result:= CurrThread.Client.IOManager.SetTarget(PRGB32(P), classes.point(w,h));
|
||||
end;
|
||||
|
||||
function SetTargetBitmap(bitmap: Integer): integer; extdecl;
|
||||
function ps_SetTargetBitmap(bitmap: Integer): integer; extdecl;
|
||||
begin;
|
||||
result:= CurrThread.Client.IOManager.SetTarget(CurrThread.Client.MBitmaps[Bitmap]);
|
||||
end;
|
||||
|
||||
function SetEIOSTarget(name: string; args: Variant): integer; extdecl;
|
||||
function ps_SetEIOSTarget(name: string; args: Variant): integer; extdecl;
|
||||
begin
|
||||
result:= CurrThread.Client.IOManager.SetTarget(name, @args);
|
||||
end;
|
||||
|
||||
procedure SetImageTarget(idx: integer); extdecl;
|
||||
procedure ps_SetImageTarget(idx: integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.SetImageTarget(idx);
|
||||
end;
|
||||
|
||||
procedure SetKeyMouseTarget(idx: integer); extdecl;
|
||||
procedure ps_SetKeyMouseTarget(idx: integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.SetKeyMouseTarget(idx);
|
||||
end;
|
||||
|
||||
function GetImageTarget: integer; extdecl;
|
||||
function ps_GetImageTarget: integer; extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.GetImageTarget(result);
|
||||
end;
|
||||
|
||||
function GetKeyMouseTarget: integer; extdecl;
|
||||
function ps_GetKeyMouseTarget: integer; extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.GetKeyMouseTarget(result);
|
||||
end;
|
||||
|
||||
function ExportImageTarget : TTarget_Exported;
|
||||
function ps_ExportImageTarget : TTarget_Exported;extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.IOManager.ExportImageTarget;
|
||||
end;
|
||||
|
||||
function ExportKeyMouseTarget : TTarget_Exported;
|
||||
function ps_ExportKeyMouseTarget : TTarget_Exported; extdecl;
|
||||
begin;
|
||||
result := CurrThread.Client.IOManager.ExportKeyMouseTarget;
|
||||
end;
|
||||
|
||||
procedure FreeTarget(idx: integer); extdecl;
|
||||
procedure ps_FreeTarget(idx: integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.FreeTarget(idx);
|
||||
end;
|
||||
|
||||
procedure GetClientDimensions(out w, h: integer); extdecl;
|
||||
procedure ps_GetClientDimensions(out w, h: integer); extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.GetDimensions(w, h);
|
||||
end;
|
||||
|
||||
function Freeze: boolean; extdecl;
|
||||
function ps_Freeze: boolean; extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.SetFrozen(true);
|
||||
result := true; //dunno what the result is supposed to mean
|
||||
end;
|
||||
|
||||
function Unfreeze: boolean; extdecl;
|
||||
function ps_Unfreeze: boolean; extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.SetFrozen(false);
|
||||
result := true; //dunno what the result is supposed to mean
|
||||
end;
|
||||
|
||||
procedure ActivateClient; extdecl;
|
||||
procedure ps_ActivateClient; extdecl;
|
||||
begin
|
||||
CurrThread.Client.IOManager.ActivateClient;
|
||||
end;
|
||||
|
||||
function IsTargetValid: boolean; extdecl;
|
||||
function ps_IsTargetValid: boolean; extdecl;
|
||||
begin
|
||||
result:= CurrThread.Client.IOManager.TargetValid;
|
||||
end;
|
||||
|
@ -54,10 +54,10 @@ AddFunction(@ps_minE,'function MinE(a, b: extended): Extended;');
|
||||
AddFunction(@ps_maxE,'function MaxE(a, b: extended): Extended;');
|
||||
AddFunction(@ps_iAbs,'function iAbs(a : integer) : integer;');
|
||||
AddFunction(@ps_ArcTan2,'function ArcTan2(x,y : extended) : extended;');
|
||||
AddFunction(@IntToBox,'function IntToBox(xs,ys,xe,ye : integer) : TBox;');
|
||||
AddFunction(@IntInBox,'function IntInBox(x, y: Integer; Box: TBox): Boolean;');
|
||||
AddFunction(@PointToBox,'function PointToBox(PT1,PT2 : TPoint): TBox;');
|
||||
AddFunction(@PointInBox,'function PointInBox(PT : TPoint; Box: TBox): Boolean;');
|
||||
AddFunction(@ps_IntToBox,'function IntToBox(xs,ys,xe,ye : integer) : TBox;');
|
||||
AddFunction(@ps_IntInBox,'function IntInBox(x, y: Integer; Box: TBox): Boolean;');
|
||||
AddFunction(@ps_PointToBox,'function PointToBox(PT1,PT2 : TPoint): TBox;');
|
||||
AddFunction(@ps_PointInBox,'function PointInBox(PT : TPoint; Box: TBox): Boolean;');
|
||||
AddFunction(@ps_sqr,'function Sqr(e : extended) : extended;');
|
||||
AddFunction(@ps_point,'function Point(x,y:integer) : TPoint;');
|
||||
AddFunction(@ps_Distance,'function Distance(xs,ys,xe,ye : integer) : integer;');
|
||||
@ -65,28 +65,28 @@ AddFunction(@ps_hypot,'function Hypot(X, Y: Extended): Extended;');
|
||||
AddFunction(@ps_RandomRange,'function RandomRange(aFrom,aTo: Integer): Integer;');
|
||||
AddFunction(@ps_incex,'procedure IncEx(var x : integer; increase : integer);');
|
||||
AddFunction(@ps_DecEx,'procedure DecEx(var x : integer; Decrease : integer);');
|
||||
AddFunction(@BinCoe,'function BinCoe(a, b: LongInt): Extended;');
|
||||
AddFunction(@FixD,'function FixD(Degrees : extended) : Extended;');
|
||||
AddFunction(@InRange,'function InRange(value,min,max : integer) : boolean;');
|
||||
AddFunction(@ps_BinCoe,'function BinCoe(a, b: LongInt): Extended;');
|
||||
AddFunction(@ps_FixD,'function FixD(Degrees : extended) : Extended;');
|
||||
AddFunction(@ps_InRange,'function InRange(const value,min,max : integer) : boolean;');
|
||||
|
||||
{window}
|
||||
SetCurrSection('Window');
|
||||
AddFunction(@Freeze, 'function Freeze: boolean;');
|
||||
AddFunction(@Unfreeze, 'function Unfreeze: boolean;');
|
||||
AddFunction(@GetClientDimensions, 'procedure GetClientDimensions(var w, h:integer);');
|
||||
AddFunction(@SetTargetBitmap,'function SetTargetBitmap(Bitmap : integer): integer;');
|
||||
AddFunction(@SetTargetArray, 'function SetTargetArray(P: Integer; w, h: integer): integer;');
|
||||
AddFunction(@SetEIOSTarget, 'function SetEIOSTarget(name: string; initargs: Variant): integer;');
|
||||
AddFunction(@SetImageTarget,'procedure SetImageTarget(idx: integer);');
|
||||
AddFunction(@SetKeyMouseTarget,'procedure SetKeyMouseTarget(idx: integer);');
|
||||
AddFunction(@GetImageTarget,'function GetImageTarget: integer;');
|
||||
AddFunction(@GetKeyMouseTarget,'function GetKeyMouseTarget: integer;');
|
||||
AddFunction(@ExportImageTarget,'function ExportImageTarget : TTarget_Exported;');
|
||||
AddFunction(@ExportKeyMouseTarget,'function ExportKeyMouseTarget : TTarget_Exported;');
|
||||
AddFunction(@FreeTarget,'procedure FreeTarget(idx: integer);');
|
||||
AddFunction(@SetDesktopAsClient,'procedure SetDesktopAsClient;');
|
||||
AddFunction(@ActivateClient, 'procedure ActivateClient;');
|
||||
AddFunction(@IsTargetValid, 'function IsTargetValid: boolean;');
|
||||
AddFunction(@ps_Freeze, 'function Freeze: boolean;');
|
||||
AddFunction(@ps_Unfreeze, 'function Unfreeze: boolean;');
|
||||
AddFunction(@ps_GetClientDimensions, 'procedure GetClientDimensions(var w, h:integer);');
|
||||
AddFunction(@ps_SetTargetBitmap,'function SetTargetBitmap(Bitmap : integer): integer;');
|
||||
AddFunction(@ps_SetTargetArray, 'function SetTargetArray(P: Integer; w, h: integer): integer;');
|
||||
AddFunction(@ps_SetEIOSTarget, 'function SetEIOSTarget(name: string; initargs: Variant): integer;');
|
||||
AddFunction(@ps_SetImageTarget,'procedure SetImageTarget(idx: integer);');
|
||||
AddFunction(@ps_SetKeyMouseTarget,'procedure SetKeyMouseTarget(idx: integer);');
|
||||
AddFunction(@ps_GetImageTarget,'function GetImageTarget: integer;');
|
||||
AddFunction(@ps_GetKeyMouseTarget,'function GetKeyMouseTarget: integer;');
|
||||
AddFunction(@ps_ExportImageTarget,'function ExportImageTarget : TTarget_Exported;');
|
||||
AddFunction(@ps_ExportKeyMouseTarget,'function ExportKeyMouseTarget : TTarget_Exported;');
|
||||
AddFunction(@ps_FreeTarget,'procedure FreeTarget(idx: integer);');
|
||||
AddFunction(@ps_SetDesktopAsClient,'procedure SetDesktopAsClient;');
|
||||
AddFunction(@ps_ActivateClient, 'procedure ActivateClient;');
|
||||
AddFunction(@ps_IsTargetValid, 'function IsTargetValid: boolean;');
|
||||
|
||||
{files}
|
||||
SetCurrSection('Files');
|
||||
@ -109,28 +109,28 @@ AddFunction(@ps_DeleteINI,'procedure DeleteINI(const Section, KeyName, FileName:
|
||||
|
||||
{other}
|
||||
SetCurrSection('Other');
|
||||
AddFunction(@SaveScreenshot,'procedure SaveScreenshot(FileName: string);');
|
||||
AddFunction(@psWait, 'procedure wait(t: integer);');
|
||||
AddFunction(@psWait, 'procedure Sleep(t: integer);');
|
||||
AddFunction(@ps_SaveScreenshot,'procedure SaveScreenshot(FileName: string);');
|
||||
AddFunction(@ps_Wait, 'procedure wait(t: integer);');
|
||||
AddFunction(@ps_Wait, 'procedure Sleep(t: integer);');
|
||||
AddFunction(@ps_now,'function Now: TDateTime;');
|
||||
AddFunction(@ps_date,'function Date : TDateTime;');
|
||||
AddFunction(@ps_GetTickCount, 'function GetSystemTime: LongWord;');
|
||||
AddFunction(@ps_GetTickCount, 'function GetTickCount: LongWord;');
|
||||
AddFunction(@GetTimeRunning,'function GetTimeRunning: LongWord;');
|
||||
AddFunction(@ps_GetTimeRunning,'function GetTimeRunning: LongWord;');
|
||||
AddFunction(@ps_DecodeTime,'procedure DecodeTime(DateTime : TDateTime; var Hour,Min,Sec,MSec : word);');
|
||||
AddFunction(@ps_DecodeDate,'procedure DecodeDate ( const SourceDate : TDateTime; var Year, Month, Day : Word );');
|
||||
AddFunction(@ConvertTime,'procedure ConvertTime(Time: integer; var h, m, s: integer);');
|
||||
AddFunction(@HakunaMatata,'procedure HakunaMatata;');
|
||||
AddFunction(@TerminateScript,'procedure TerminateScript;');
|
||||
AddFunction(@DisplayDebugImgWindow,'procedure DisplayDebugImgWindow(w, h: integer);');
|
||||
AddFunction(@DrawBitmapDebugImg,'procedure DrawBitmapDebugImg(bmp: integer);');
|
||||
AddFunction(@GetDebugBitmap,'function GetDebugBitmap: integer;');
|
||||
AddFunction(@ps_ConvertTime,'procedure ConvertTime(Time: integer; var h, m, s: integer);');
|
||||
AddFunction(@ps_HakunaMatata,'procedure HakunaMatata;');
|
||||
AddFunction(@ps_TerminateScript,'procedure TerminateScript;');
|
||||
AddFunction(@ps_DisplayDebugImgWindow,'procedure DisplayDebugImgWindow(w, h: integer);');
|
||||
AddFunction(@ps_DrawBitmapDebugImg,'procedure DrawBitmapDebugImg(bmp: integer);');
|
||||
AddFunction(@ps_GetDebugBitmap,'function GetDebugBitmap: integer;');
|
||||
AddFunction(@ps_Random,'function Random(Int: integer): integer;');
|
||||
AddFunction(@ClearDebug,'procedure ClearDebug;');
|
||||
AddFunction(@PlaySound,'procedure PlaySound( Sound : string);');
|
||||
AddFunction(@StopSound,'procedure StopSound;');
|
||||
AddFunction(@psSetScriptProp, 'function SetScriptProp(Prop : TSP_Property; Value: String): boolean;');
|
||||
AddFunction(@psGetScriptProp, 'function GetScriptProp(Prop : TSP_Property;var Value: String): boolean;');
|
||||
AddFunction(@ps_ClearDebug,'procedure ClearDebug;');
|
||||
AddFunction(@ps_PlaySound,'procedure PlaySound( Sound : string);');
|
||||
AddFunction(@ps_StopSound,'procedure StopSound;');
|
||||
AddFunction(@ps_SetScriptProp, 'function SetScriptProp(Prop : TSP_Property; Value: String): boolean;');
|
||||
AddFunction(@ps_GetScriptProp, 'function GetScriptProp(Prop : TSP_Property;var Value: String): boolean;');
|
||||
|
||||
|
||||
|
||||
@ -161,75 +161,75 @@ AddFunction(@ps_padR,'function Padr(s: String; i: longInt): String;');
|
||||
|
||||
{web}
|
||||
SetCurrSection('Web');
|
||||
AddFunction(@OpenWebPage,'procedure OpenWebPage(url : string);');
|
||||
AddFunction(@ps_GetPage,'function GetPage(url : string): string;');
|
||||
AddFunction(@ps_OpenWebPage,'procedure OpenWebPage(const url : string);');
|
||||
AddFunction(@ps_GetPage,'function GetPage(const url : string): string;');
|
||||
AddFunction(@ps_InitializeHTTPClient,'function InitializeHTTPClient(HandleCookies: Boolean): Integer;');
|
||||
AddFunction(@ps_InitializeHTTPClient,'function InitializeHTTPClientWrap(HandleCookies: Boolean): Integer;');
|
||||
AddFunction(@ps_FreeHTTPClient,'procedure FreeHTTPClient(Client: Integer);');
|
||||
AddFunction(@ps_GetHTTPPage,'function GetHTTPPage(Client: Integer; URL: string): string;');
|
||||
AddFunction(@ps_SetHTTPUserAgent,'procedure SetHTTPUserAgent(Client: Integer; Agent: string);');
|
||||
AddFunction(@ps_PostHTTPPage,'function PostHTTPPage(Client: Integer; Url: string; PostData: string): string;');
|
||||
AddFunction(@ps_PostHTTPPageEx,'function PostHTTPPageEx(Client: Integer; Url: string): string;');
|
||||
AddFunction(@ps_GetHTTPPage,'function GetHTTPPage(Client: Integer;const URL: string): string;');
|
||||
AddFunction(@ps_SetHTTPUserAgent,'procedure SetHTTPUserAgent(Client: Integer;const Agent: string);');
|
||||
AddFunction(@ps_PostHTTPPage,'function PostHTTPPage(Client: Integer;const Url,PostData: string): string;');
|
||||
AddFunction(@ps_PostHTTPPageEx,'function PostHTTPPageEx(Client: Integer;const Url: string): string;');
|
||||
AddFunction(@ps_ClearPostData,'procedure ClearPostData(Client: Integer);');
|
||||
AddFunction(@ps_AddPostVariable,'procedure AddPostVariable(Client: Integer; VarName, VarValue: string);');
|
||||
AddFunction(@ps_AddPostVariable,'procedure AddPostVariable(Client: Integer;const VarName, VarValue: string);');
|
||||
AddFunction(@ps_GetRawHeaders,'function GetRawHeaders(Client: Integer): string;');
|
||||
|
||||
|
||||
|
||||
{ Color Conversions and Speed }
|
||||
SetCurrSection('Color Convert');
|
||||
AddFunction(@Colour_Conv.ColorToRGB, 'procedure ColorToRGB(Color: integer; var r, g, b: Byte);');
|
||||
AddFunction(@Colour_conv.RGBToColor, 'function RGBtoColor(r, g, b: Byte): TColor;');
|
||||
AddFunction(@Colour_conv.ColorToHSL, 'procedure ColorToHSL(Color: Integer; var h, s, l: Extended);');
|
||||
AddFunction(@Colour_conv.HSLToColor, 'function HSLToColor(H, S, L: Extended): TColor;');
|
||||
AddFunction(@Colour_conv.ColorToXYZ, 'procedure ColorToXYZ(Color: Integer; var x, y, z: Extended);');
|
||||
AddFunction(@Colour_conv.XYZToColor, 'function XYZToColor(X, Y, Z: Extended): TColor;');
|
||||
AddFunction(@Colour_conv.RGBToHSL, 'procedure RGBToHSL(R, G, B: Byte; var h, s, l: Extended);');
|
||||
AddFunction(@Colour_conv.HSLToRGB, 'procedure HSLtoRGB(H, S, L: extended; var R, G ,B: Byte);');
|
||||
AddFunction(@Colour_conv.RGBToXYZ, 'procedure RGBToXYZ(R, G, B: Byte;var x, y ,z: Extended);');
|
||||
AddFunction(@Colour_conv.XYZToRGB, 'procedure XYZToRGB(X, Y, Z: Extended; var R, G, B: Byte);');
|
||||
AddFunction(@ps_ColorToRGB, 'procedure ColorToRGB(Color: integer; var r, g, b: Byte);');
|
||||
AddFunction(@ps_RGBToColor, 'function RGBtoColor(r, g, b: Byte): TColor;');
|
||||
AddFunction(@ps_ColorToHSL, 'procedure ColorToHSL(Color: Integer; var h, s, l: Extended);');
|
||||
AddFunction(@ps_HSLToColor, 'function HSLToColor(H, S, L: Extended): TColor;');
|
||||
AddFunction(@ps_ColorToXYZ, 'procedure ColorToXYZ(Color: Integer; var x, y, z: Extended);');
|
||||
AddFunction(@ps_XYZToColor, 'function XYZToColor(X, Y, Z: Extended): TColor;');
|
||||
AddFunction(@ps_RGBToHSL, 'procedure RGBToHSL(R, G, B: Byte; var h, s, l: Extended);');
|
||||
AddFunction(@ps_HSLToRGB, 'procedure HSLtoRGB(H, S, L: extended; var R, G ,B: Byte);');
|
||||
AddFunction(@ps_RGBToXYZ, 'procedure RGBToXYZ(R, G, B: Byte;var x, y ,z: Extended);');
|
||||
AddFunction(@ps_XYZToRGB, 'procedure XYZToRGB(X, Y, Z: Extended; var R, G, B: Byte);');
|
||||
|
||||
{ Color Finding }
|
||||
SetCurrSection('Color');
|
||||
AddFunction(@SetColorToleranceSpeed, 'procedure SetColorToleranceSpeed(cts: integer);');
|
||||
AddFunction(@GetToleranceSpeed, 'function GetToleranceSpeed: Integer;');
|
||||
AddFunction(@SetToleranceSpeed2Modifiers, 'procedure SetToleranceSpeed2Modifiers(nHue, nSat: Extended);');
|
||||
AddFunction(@GetToleranceSpeed2Modifiers, 'procedure GetToleranceSpeed2Modifiers(var hMod, sMod: Extended);');
|
||||
AddFunction(@GetColor,'function GetColor(x, y: Integer): Integer;');
|
||||
AddFunction(@GetColors,'function GetColors(Coords : TPointArray) : TIntegerArray;');
|
||||
AddFunction(@GetColorsWrap,'procedure GetColorsWrap(Coords : TPointArray; var Colors :TIntegerArray);');
|
||||
AddFunction(@FindColor, 'function FindColor(var x, y: integer; color, xs, ys, xe, ye: integer): boolean;');
|
||||
AddFunction(@findcolortoleranceOptimised, 'function FindColorToleranceOptimised(var x, y: integer; color, xs, ys, xe, ye, tol: integer): boolean;');
|
||||
AddFunction(@FindColorTolerance, 'function FindColorTolerance(var x, y: integer; color, xs, ys, xe, ye, tol: integer): boolean;');
|
||||
AddFunction(@FindColors, 'function FindColors(var TPA: TPointArray; color, xs, ys, xe, ye: integer): boolean;');
|
||||
AddFunction(@SimilarColors,'function SimilarColors(Col1, Col2, Tolerance: integer): boolean');
|
||||
AddFunction(@CountColor,'function CountColor(Color, xs, ys, xe, ye: Integer): Integer;');
|
||||
AddFunction(@CountColorTolerance,'function CountColorTolerance(Color, xs, ys, xe, ye, Tolerance: Integer): Integer;');
|
||||
AddFunction(@FindColorsToleranceOptimised,'function FindColorsToleranceOptimised(var Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean;');
|
||||
AddFunction(@FindColorsTolerance,'function FindColorsTolerance(var Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean;');
|
||||
AddFunction(@FindColorSpiral,'function FindColorSpiral(var x, y: Integer; color, xs, ys, xe, ye: Integer): Boolean;');
|
||||
AddFunction(@FindColorSpiralTolerance,'function FindColorSpiralTolerance(var x, y: Integer; color, xs, ys, xe, ye,Tol: Integer): Boolean;');
|
||||
AddFunction(@FindColorsSpiralTolerance,'function FindColorsSpiralTolerance(x, y: Integer; var Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer) : boolean;');
|
||||
AddFunction(@FindColoredArea, 'function FindColoredArea(var x, y: Integer; color, xs, ys, xe, ye, MinArea: Integer): Boolean');
|
||||
AddFunction(@FindColoredAreaTolerance, 'function FindColoredAreaTolerance(var x, y : Integer; color, xs, ys, xe, ye, MinArea, Tolerance : Integer): Boolean');
|
||||
AddFunction(@ps_SetColorToleranceSpeed, 'procedure SetColorToleranceSpeed(cts: integer);');
|
||||
AddFunction(@ps_GetToleranceSpeed, 'function GetToleranceSpeed: Integer;');
|
||||
AddFunction(@ps_SetToleranceSpeed2Modifiers, 'procedure SetToleranceSpeed2Modifiers(nHue, nSat: Extended);');
|
||||
AddFunction(@ps_GetToleranceSpeed2Modifiers, 'procedure GetToleranceSpeed2Modifiers(var hMod, sMod: Extended);');
|
||||
AddFunction(@ps_GetColor,'function GetColor(x, y: Integer): Integer;');
|
||||
AddFunction(@ps_GetColors,'function GetColors(Coords : TPointArray) : TIntegerArray;');
|
||||
AddFunction(@ps_GetColorsWrap,'procedure GetColorsWrap(Coords : TPointArray; var Colors :TIntegerArray);');
|
||||
AddFunction(@ps_FindColor, 'function FindColor(var x, y: integer; color, xs, ys, xe, ye: integer): boolean;');
|
||||
AddFunction(@ps_findcolortoleranceOptimised, 'function FindColorToleranceOptimised(var x, y: integer; color, xs, ys, xe, ye, tol: integer): boolean;');
|
||||
AddFunction(@ps_FindColorTolerance, 'function FindColorTolerance(var x, y: integer; color, xs, ys, xe, ye, tol: integer): boolean;');
|
||||
AddFunction(@ps_FindColors, 'function FindColors(var TPA: TPointArray; color, xs, ys, xe, ye: integer): boolean;');
|
||||
AddFunction(@ps_SimilarColors,'function SimilarColors(Col1, Col2, Tolerance: integer): boolean');
|
||||
AddFunction(@ps_CountColor,'function CountColor(Color, xs, ys, xe, ye: Integer): Integer;');
|
||||
AddFunction(@ps_CountColorTolerance,'function CountColorTolerance(Color, xs, ys, xe, ye, Tolerance: Integer): Integer;');
|
||||
AddFunction(@ps_FindColorsToleranceOptimised,'function FindColorsToleranceOptimised(var Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean;');
|
||||
AddFunction(@ps_FindColorsTolerance,'function FindColorsTolerance(var Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean;');
|
||||
AddFunction(@ps_FindColorSpiral,'function FindColorSpiral(var x, y: Integer; color, xs, ys, xe, ye: Integer): Boolean;');
|
||||
AddFunction(@ps_FindColorSpiralTolerance,'function FindColorSpiralTolerance(var x, y: Integer; color, xs, ys, xe, ye,Tol: Integer): Boolean;');
|
||||
AddFunction(@ps_FindColorsSpiralTolerance,'function FindColorsSpiralTolerance(x, y: Integer; var Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer) : boolean;');
|
||||
AddFunction(@ps_FindColoredArea, 'function FindColoredArea(var x, y: Integer; color, xs, ys, xe, ye, MinArea: Integer): Boolean');
|
||||
AddFunction(@ps_FindColoredAreaTolerance, 'function FindColoredAreaTolerance(var x, y : Integer; color, xs, ys, xe, ye, MinArea, Tolerance : Integer): Boolean');
|
||||
|
||||
{Mouse etc.}
|
||||
SetCurrSection('Mouse');
|
||||
AddFunction(@MoveMouse, 'procedure MoveMouse(x, y: integer);');
|
||||
AddFunction(@GetMousePos, 'procedure GetMousePos(var x, y: integer);');
|
||||
AddFunction(@HoldMouse, 'procedure HoldMouse(x, y: integer; clickType: integer);');
|
||||
AddFunction(@ReleaseMouse, 'procedure ReleaseMouse(x, y: integer; clickType: integer);');
|
||||
AddFunction(@ClickMouse, 'procedure ClickMouse(x, y: integer; clickType: integer);');
|
||||
AddFunction(@IsMouseButtonDown,'function IsMouseButtonDown( button : integer) : boolean;');
|
||||
AddFunction(@ps_MoveMouse, 'procedure MoveMouse(x, y: integer);');
|
||||
AddFunction(@ps_GetMousePos, 'procedure GetMousePos(var x, y: integer);');
|
||||
AddFunction(@ps_HoldMouse, 'procedure HoldMouse(x, y: integer; clickType: integer);');
|
||||
AddFunction(@ps_ReleaseMouse, 'procedure ReleaseMouse(x, y: integer; clickType: integer);');
|
||||
AddFunction(@ps_ClickMouse, 'procedure ClickMouse(x, y: integer; clickType: integer);');
|
||||
AddFunction(@ps_IsMouseButtonDown,'function IsMouseButtonDown( button : integer) : boolean;');
|
||||
|
||||
{Keyboard}
|
||||
SetCurrSection('Keyboard');
|
||||
AddFunction(@KeyDown, 'procedure KeyDown(key: Word);');
|
||||
AddFunction(@KeyUp, 'procedure KeyUp(key: Word);');
|
||||
AddFunction(@PressKey, 'procedure PressKey(key: Word);');
|
||||
AddFunction(@SendKeys, 'procedure SendKeys(s: string);');
|
||||
AddFunction(@isKeyDown, 'function IsKeyDown(key: Word): Boolean;');
|
||||
AddFunction(@GetKeyCode,'function GetKeyCode(c : char) : integer;');
|
||||
AddFunction(@ps_KeyDown, 'procedure KeyDown(key: Word);');
|
||||
AddFunction(@ps_KeyUp, 'procedure KeyUp(key: Word);');
|
||||
AddFunction(@ps_PressKey, 'procedure PressKey(key: Word);');
|
||||
AddFunction(@ps_SendKeys, 'procedure SendKeys(const s: string);');
|
||||
AddFunction(@ps_isKeyDown, 'function IsKeyDown(key: Word): Boolean;');
|
||||
AddFunction(@ps_GetKeyCode,'function GetKeyCode(c : char) : integer;');
|
||||
|
||||
{ OCR}
|
||||
SetCurrSection('OCR');
|
||||
@ -244,52 +244,52 @@ AddFunction(@ps_LoadSystemFont,'function LoadSystemFont(const SysFont : TFont; c
|
||||
|
||||
{Bitmaps}
|
||||
SetCurrSection('Bitmaps');
|
||||
AddFunction(@CreateBitmapString,'function CreateBitmapString(bmp : integer) : string;');
|
||||
AddFunction(@GetMufasaBitmap,'function GetMufasaBitmap(bmp : integer) : TMufasaBitmap;');
|
||||
AddFunction(@CreateBitmap,'function CreateBitmap(w,h :integer) : integer;');
|
||||
AddFunction(@FreeBitmap,'procedure FreeBitmap(Bmp : integer);');
|
||||
AddFunction(@SaveBitmap,'procedure SaveBitmap(Bmp : integer; path : string);');
|
||||
AddFunction(@BitmapFromString,'function BitmapFromString(Width,Height : integer; Data : string): integer;');
|
||||
AddFunction(@LoadBitmap,'function LoadBitmap(Path : string) : integer;');
|
||||
AddFunction(@SetBitmapSize,'procedure SetBitmapSize(Bmp,NewW,NewH : integer);');
|
||||
AddFunction(@GetBitmapSize,'procedure GetBitmapSize(Bmp : integer; var BmpW,BmpH : integer);');
|
||||
AddFunction(@StretchBitmapResize,'procedure StretchBitmapResize(Bmp,NewW,NewH : integer);');
|
||||
AddFunction(@CreateMirroredBitmap,'function CreateMirroredBitmap(Bmp : integer) : integer;');
|
||||
AddFunction(@CreateMirroredBitmapEx,'function CreateMirroredBitmapEx(Bmp : integer; MirrorStyle : TBmpMirrorStyle) : integer;');
|
||||
AddFunction(@FastSetPixel,'procedure FastSetPixel(bmp,x,y : integer; Color : TColor);');
|
||||
AddFunction(@FastSetPixels,'procedure FastSetPixels(bmp : integer; TPA : TPointArray; Colors : TIntegerArray);');
|
||||
AddFunction(@FastGetPixel,'function FastGetPixel(bmp, x,y : integer) : TColor;');
|
||||
AddFunction(@FastGetPixels,'function FastGetPixels(Bmp : integer; TPA : TPointArray) : TIntegerArray;');
|
||||
AddFunction(@FastDrawClear,'procedure FastDrawClear(bmp : integer; Color : TColor);');
|
||||
AddFunction(@FastDrawTransparent,'procedure FastDrawTransparent(x, y: Integer; SourceBitmap, TargetBitmap: Integer);');
|
||||
AddFunction(@SetTransparentColor,'procedure SetTransparentColor(bmp : integer; Color : TColor);');
|
||||
AddFunction(@GetTransparentColor,'function GetTransparentColor(bmp: integer) : TColor;');
|
||||
AddFunction(@FastReplaceColor,'procedure FastReplaceColor(Bmp : integer; OldColor,NewColor : TColor);');
|
||||
AddFunction(@ps_CreateBitmapString,'function CreateBitmapString(bmp : integer) : string;');
|
||||
AddFunction(@ps_GetMufasaBitmap,'function GetMufasaBitmap(bmp : integer) : TMufasaBitmap;');
|
||||
AddFunction(@ps_CreateBitmap,'function CreateBitmap(w,h :integer) : integer;');
|
||||
AddFunction(@ps_FreeBitmap,'procedure FreeBitmap(Bmp : integer);');
|
||||
AddFunction(@ps_SaveBitmap,'procedure SaveBitmap(Bmp : integer; path : string);');
|
||||
AddFunction(@ps_BitmapFromString,'function BitmapFromString(Width,Height : integer; Data : string): integer;');
|
||||
AddFunction(@ps_LoadBitmap,'function LoadBitmap(Path : string) : integer;');
|
||||
AddFunction(@ps_SetBitmapSize,'procedure SetBitmapSize(Bmp,NewW,NewH : integer);');
|
||||
AddFunction(@ps_GetBitmapSize,'procedure GetBitmapSize(Bmp : integer; var BmpW,BmpH : integer);');
|
||||
AddFunction(@ps_StretchBitmapResize,'procedure StretchBitmapResize(Bmp,NewW,NewH : integer);');
|
||||
AddFunction(@ps_CreateMirroredBitmap,'function CreateMirroredBitmap(Bmp : integer) : integer;');
|
||||
AddFunction(@ps_CreateMirroredBitmapEx,'function CreateMirroredBitmapEx(Bmp : integer; MirrorStyle : TBmpMirrorStyle) : integer;');
|
||||
AddFunction(@ps_FastSetPixel,'procedure FastSetPixel(bmp,x,y : integer; Color : TColor);');
|
||||
AddFunction(@ps_FastSetPixels,'procedure FastSetPixels(bmp : integer; TPA : TPointArray; Colors : TIntegerArray);');
|
||||
AddFunction(@ps_FastGetPixel,'function FastGetPixel(bmp, x,y : integer) : TColor;');
|
||||
AddFunction(@ps_FastGetPixels,'function FastGetPixels(Bmp : integer; TPA : TPointArray) : TIntegerArray;');
|
||||
AddFunction(@ps_FastDrawClear,'procedure FastDrawClear(bmp : integer; Color : TColor);');
|
||||
AddFunction(@ps_FastDrawTransparent,'procedure FastDrawTransparent(x, y: Integer; SourceBitmap, TargetBitmap: Integer);');
|
||||
AddFunction(@ps_SetTransparentColor,'procedure SetTransparentColor(bmp : integer; Color : TColor);');
|
||||
AddFunction(@ps_GetTransparentColor,'function GetTransparentColor(bmp: integer) : TColor;');
|
||||
AddFunction(@ps_FastReplaceColor,'procedure FastReplaceColor(Bmp : integer; OldColor,NewColor : TColor);');
|
||||
AddFunction(@ps_CopyClientToBitmap, 'procedure CopyClientToBitmap(bmp, xs, ys, xe, ye: Integer);');
|
||||
AddFunction(@BitmapFromClient,'function BitmapFromClient(const xs, ys, xe, ye: Integer): Integer;');
|
||||
AddFunction(@SetBitmapName, 'procedure SetBitmapName(Bmp : integer; name : string);');
|
||||
AddFunction(@FindBitmap,'function FindBitmap(bitmap: integer; var x, y: Integer): Boolean;');
|
||||
AddFunction(@FindBitmapIn,'function FindBitmapIn(bitmap: integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean;');
|
||||
AddFunction(@FindBitmapToleranceIn,'function FindBitmapToleranceIn(bitmap: integer; var x, y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer): Boolean;');
|
||||
AddFunction(@FindBitmapSpiral,'function FindBitmapSpiral(bitmap: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean;');
|
||||
AddFunction(@FindBitmapsSpiralTolerance,'function FindBitmapsSpiralTolerance(bitmap: integer; x, y: Integer; var Points : TPointArray; xs, ys, xe, ye,tolerance: Integer): Boolean;');
|
||||
AddFunction(@FindBitmapSpiralTolerance,'function FindBitmapSpiralTolerance(bitmap: integer; var x, y: Integer; xs, ys, xe, ye,tolerance : integer): Boolean;');
|
||||
AddFunction(@RotateBitmap,'function RotateBitmap(bitmap: Integer; angle: Extended): Integer;');
|
||||
AddFunction(@Desaturate,'function DesaturateBitmap(Bitmap : integer) : integer;');
|
||||
AddFunction(@InvertBitmap,'procedure InvertBitmap(Bitmap : integer);');
|
||||
AddFunction(@CopyBitmap,'function CopyBitmap(Bitmap: integer) : integer)');
|
||||
AddFunction(@GreyScaleBitmap,'function GreyScaleBitmap(bitmap : integer) : integer');
|
||||
AddFunction(@BrightnessBitmap,'function BrightnessBitmap(Bitmap,br : integer) : integer;');
|
||||
AddFunction(@ContrastBitmap,'function ContrastBitmap(bitmap : integer; co : extended) : integer;');
|
||||
AddFunction(@PosterizeBitmap,'function PosterizeBitmap(Bitmap : integer; po : integer) : integer;');
|
||||
AddFunction(@CreateMaskFromBitmap,'function CreateMaskFromBitmap(Bitmap : integer) : TMask;');
|
||||
AddFunction(@FindMaskTolerance,'function FindMaskTolerance(const mask: TMask; var x, y: Integer; xs,ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean;');
|
||||
AddFunction(@FindBitmapMaskTolerance,'function FindBitmapMaskTolerance(mask: Integer; var x, y: Integer; xs, ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean;');
|
||||
AddFunction(@FindDeformedBitmapToleranceIn,'function FindDeformedBitmapToleranceIn(bitmap: integer; var x,y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer; Range: Integer; AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean;');
|
||||
AddFunction(@DrawTPABitmap,'procedure DrawTPABitmap(bitmap: integer; TPA: TPointArray; Color: integer);');
|
||||
AddFunction(@DrawATPABitmap,'procedure DrawATPABitmap(bitmap: integer; ATPA: T2DPointArray);');
|
||||
AddFunction(@DrawATPABitmapEx,'procedure DrawATPABitmapEx(bitmap: integer; ATPA: T2DPointArray; Colors: TIntegerArray);');
|
||||
AddFunction(@DrawBitmap,'procedure DrawBitmap(Bmp: Integer; Dest: TCanvas; x, y: Integer);');
|
||||
AddFunction(@ps_BitmapFromClient,'function BitmapFromClient(const xs, ys, xe, ye: Integer): Integer;');
|
||||
AddFunction(@ps_SetBitmapName, 'procedure SetBitmapName(Bmp : integer; name : string);');
|
||||
AddFunction(@ps_FindBitmap,'function FindBitmap(bitmap: integer; var x, y: Integer): Boolean;');
|
||||
AddFunction(@ps_FindBitmapIn,'function FindBitmapIn(bitmap: integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean;');
|
||||
AddFunction(@ps_FindBitmapToleranceIn,'function FindBitmapToleranceIn(bitmap: integer; var x, y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer): Boolean;');
|
||||
AddFunction(@ps_FindBitmapSpiral,'function FindBitmapSpiral(bitmap: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean;');
|
||||
AddFunction(@ps_FindBitmapsSpiralTolerance,'function FindBitmapsSpiralTolerance(bitmap: integer; x, y: Integer; var Points : TPointArray; xs, ys, xe, ye,tolerance: Integer): Boolean;');
|
||||
AddFunction(@ps_FindBitmapSpiralTolerance,'function FindBitmapSpiralTolerance(bitmap: integer; var x, y: Integer; xs, ys, xe, ye,tolerance : integer): Boolean;');
|
||||
AddFunction(@ps_RotateBitmap,'function RotateBitmap(bitmap: Integer; angle: Extended): Integer;');
|
||||
AddFunction(@ps_Desaturate,'function DesaturateBitmap(Bitmap : integer) : integer;');
|
||||
AddFunction(@ps_InvertBitmap,'procedure InvertBitmap(Bitmap : integer);');
|
||||
AddFunction(@ps_CopyBitmap,'function CopyBitmap(Bitmap: integer) : integer)');
|
||||
AddFunction(@ps_GreyScaleBitmap,'function GreyScaleBitmap(bitmap : integer) : integer');
|
||||
AddFunction(@ps_BrightnessBitmap,'function BrightnessBitmap(Bitmap,br : integer) : integer;');
|
||||
AddFunction(@ps_ContrastBitmap,'function ContrastBitmap(bitmap : integer; co : extended) : integer;');
|
||||
AddFunction(@ps_PosterizeBitmap,'function PosterizeBitmap(Bitmap : integer; po : integer) : integer;');
|
||||
AddFunction(@ps_CreateMaskFromBitmap,'function CreateMaskFromBitmap(Bitmap : integer) : TMask;');
|
||||
AddFunction(@ps_FindMaskTolerance,'function FindMaskTolerance(const mask: TMask; var x, y: Integer; xs,ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean;');
|
||||
AddFunction(@ps_FindBitmapMaskTolerance,'function FindBitmapMaskTolerance(mask: Integer; var x, y: Integer; xs, ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean;');
|
||||
AddFunction(@ps_FindDeformedBitmapToleranceIn,'function FindDeformedBitmapToleranceIn(bitmap: integer; var x,y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer; Range: Integer; AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean;');
|
||||
AddFunction(@ps_DrawTPABitmap,'procedure DrawTPABitmap(bitmap: integer; TPA: TPointArray; Color: integer);');
|
||||
AddFunction(@ps_DrawATPABitmap,'procedure DrawATPABitmap(bitmap: integer; ATPA: T2DPointArray);');
|
||||
AddFunction(@ps_DrawATPABitmapEx,'procedure DrawATPABitmapEx(bitmap: integer; ATPA: T2DPointArray; Colors: TIntegerArray);');
|
||||
AddFunction(@ps_DrawBitmap,'procedure DrawBitmap(Bmp: Integer; Dest: TCanvas; x, y: Integer);');
|
||||
|
||||
{tpa}
|
||||
SetCurrSection('TPA');
|
||||
@ -370,11 +370,11 @@ AddFunction(@SameTPA,'function SameTPA(aTPA, bTPA: TPointArray): Boolean;');
|
||||
AddFunction(@TPAInATPA,'function TPAInATPA(TPA: TPointArray; InATPA: T2DPointArray; var Index: LongInt): Boolean;');
|
||||
|
||||
SetCurrSection('Settings');
|
||||
AddFunction(@KeyIsSetting, 'function KeyIsSetting(KeyName: String): Boolean;');
|
||||
AddFunction(@KeyIsDirectory, 'function KeyIsDirectory(KeyName: String): Boolean;');
|
||||
AddFunction(@GetSettingValue, 'function GetSettingValue(KeyName: String): String;');
|
||||
AddFunction(@GetSettingValueDef, 'function GetSettingValueDef(KeyName, defVal: String): String;');
|
||||
AddFunction(@SetSettingValue,'function SetSettingValue(KeyName,value : string) : boolean;');
|
||||
AddFunction(@ListSettings, 'function ListSettings(KeyName: String; var KeyReturn: TStringArray) : boolean;');
|
||||
AddFunction(@DeleteSetting, 'function DeleteSetting(KeyName: String): Boolean;');
|
||||
AddFunction(@DeleteSubSettings, 'function DeleteSubSettings(KeyName: String): Boolean;');
|
||||
AddFunction(@ps_KeyIsSetting, 'function KeyIsSetting(const KeyName: String): Boolean;');
|
||||
AddFunction(@ps_KeyIsDirectory, 'function KeyIsDirectory(const KeyName: String): Boolean;');
|
||||
AddFunction(@ps_GetSettingValue, 'function GetSettingValue(const KeyName: String): String;');
|
||||
AddFunction(@ps_GetSettingValueDef, 'function GetSettingValueDef(const KeyName, defVal: String): String;');
|
||||
AddFunction(@ps_SetSettingValue,'function SetSettingValue(const KeyName,value : string) : boolean;');
|
||||
AddFunction(@ps_ListSettings, 'function ListSettings(const KeyName: String; var KeyReturn: TStringArray) : boolean;');
|
||||
AddFunction(@ps_DeleteSetting, 'function DeleteSetting(const KeyName: String): Boolean;');
|
||||
AddFunction(@ps_DeleteSubSettings, 'function DeleteSubSettings(const KeyName: String): Boolean;');
|
||||
|
@ -215,7 +215,7 @@ uses
|
||||
lclintf // for GetTickCount and others.
|
||||
;
|
||||
{$ifdef Linux}
|
||||
{$define PS_StdCall}
|
||||
//{$define PS_StdCall}
|
||||
{$else}
|
||||
//{$define PS_StdCall}
|
||||
{$endif}
|
||||
@ -476,6 +476,7 @@ end;
|
||||
{$I PSInc/Wrappers/tpa.inc}
|
||||
{$I PSInc/Wrappers/strings.inc}
|
||||
{$I PSInc/Wrappers/colour.inc}
|
||||
{$I PSInc/Wrappers/colourconv.inc}
|
||||
{$I PSInc/Wrappers/math.inc}
|
||||
{$I PSInc/Wrappers/mouse.inc}
|
||||
{$I PSInc/Wrappers/file.inc}
|
||||
|
Loading…
Reference in New Issue
Block a user