Jump to content
shadowrecon

[GMRL] Additions (Animation, DTM, DebugBMP, GMRL_Plugin)

Recommended Posts

[scar]

{~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~

GMRL - Game Macro Resource Lib.

Core

Animation Routines

--------------------------------------------------------------------------------

* function GMRL_PixelShiftMulti(B: TBoxArray; Skip: TPointArray; T: Integer): TIntArray;

By: ShadowRecon, marpis.

* function GMRL_PixelShift(B: TBox; Time: Integer; Skip: TPointArray): Integer;

By: ShadowRecon, marpis. '

* function GMRL_AveragePixelShift(B: TBox; waitPerLoop, maxTime: integer; Skip: TPointArray): integer;

By: ShadowRecon, Coh3n.

* function GMRL_AnimatingMulti(B: TBoxArray; Time, MinCount: Integer; Skip: TPointArray): TBooleanArray;

By: ShadowRecon, marpis.

* function GMRL_Animating(B: TBox; Time, MinCount: Integer): Boolean;

By: ShadowRecon, marpis.

 

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~}

[/scar]

 

[scar]

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Official GMRL Include

Core

DTM Routines

--------------------------------------------------------------------------------

* function ClickDTMRotatedInB(DTM: Integer; B: TBox; Sangle, Eangle, angleStep: Extended; btn: TMouseButton): Boolean;

By ShadowRecon.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

[/scar]

 

[scar]

{=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Official GMRL Include

Core

BMP Routines

--------------------------------------------------------------------------------

* procedure GMRL_DebugTPA(BMP: TSCARBitmap; Color: Integer; TPA: TPointArray);

By ShadowRecon.

* procedure GMRL_DebugColorsEx(BMP: TSCARBitmap; Colors: TIntArray; Tol, Xs, Ys, Xe, Ye: Integer);

By ShadowRecon.

* procedure GMRL_DebugColors(BMP: TSCARBitmap; Colors: TIntArray; Tol: Integer);

By ShadowRecon.

* procedure GMRL_DebugBox(BMP: TSCARbitmap; Box: TBox);

By ShadowRecon.

* function GMRL_DebugColorBoxEx(BMP: TSCARBitmap; Colors: TIntArray; Tol, MinCount, MaxDist,

Xs, Ys, Xe, Ye: Integer): T2DPointArray;

By ShadowRecon.

=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=}

[/scar]

 

[scar]

{~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~

GMRL - Game Macro Resource Lib.

Core

GMRL Plugin Routines

--------------------------------------------------------------------------------

 

*+Credits: ShadowRecon

 

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~}

 

{$L GMRL_Plugin.dll}

{

*~~~~~~~~~~~~~~~~~~~~~~

Bitmap Functions

~~~~~~~~~~~~~~~~~~~~~~*

 

* function GMRL_GetBitmapRGB(Const BMP:Integer): T2DRGBArray;

Def: Gets all of the RGB values of a bitmap

 

* function GMRL_CalculatePixelShiftSkipTol(Const BMP1, BMP2, Tol: Integer; Skip: TPointArray): Integer;

Def: Calculates pixelshift skipping the points in the skip TPA, with the feature of using tolerance

of then pixels to determine if a pixel shift has happened.

 

* function GMRL_CalculatePixelShiftSkip(Const BMP1, BMP2: Integer; Skip: TPointArray): Integer;

Def: Calculates pixelshift skipping the points in the skip TPA. The Skip TPA

origin is 0,0 so dont use client points use points from the bitmap.

 

* function GMRL_CalculatePixelShift(Const BMP1,BMP2: Integer): Integer;

Def: Calculates pixel shift from 2 bitmaps

 

* function GMRL_CalculatePixelShiftTol(Const BMP1, BMP2, Tol: Integer): Integer;

Def: Calculates pixel shift with tolerance

 

* function GMRL_CalculatePixelShiftTPA(Const BMP1,BMP2: Integer; Points: TPointArray): Integer;

Def: Calculates pixel shift only checking the points within TPA, points are relative to

0,0 so dont use client points.

 

* procedure GMRL_SetBitmapBrightness(Const BMP, Bright: Integer);

Def: Changes the bitmaps brightness

 

* procedure GMRL_SetBitmapContrast(Const BMP: Integer; Contrast: Extended);

Def: Changes bitmaps Contrast

 

* function GMRL_OverlayBitmaps(Const Foreground, Background: Integer; percent: Extended): Integer;

Def: Overlays foreground on-top of background with a percent of the background showing.

 

* function GMRL_CreateBitmapOpacity(Const BMP, BGColor: Integer; percent: Extended): Integer;

Def: Creates and bitmap with a percent of the BGcolor showing through.

 

* function GMRL_CreateTPAFromBMP(Const BMP, SkipColor, SX, SY: Integer): TPointArray;

Def: Creates a TPA of all the points on the bitmap that do not contain the skip color.

SX,SY are so you can move the origin of the bitmap, so the points match up with the clients

points, or just set them to 0,0 and all points will be relative to the origin 0,0.

 

* function GMRL_BitmapFromJPEG(Path: AnsiString): Integer;

Def: Returns a normal bitmap from a JPEG.

 

* function GMRL_BitmapFromPNG(Path: AnsiString): Integer;

Def: Returns a normal bitmap from a png file.

 

* function GMRL_BitmapToPNG(BMP: Integer; Path: AnsiString);

Def: Turns a bitmap into a PNG file and saves it to the path.

 

*~~~~~~~~~~~~~~~~~~~~~~

TPA Functions

~~~~~~~~~~~~~~~~~~~~~~*

 

* procedure GMRL_OffsetATPA(var ATPA : T2DPointArray; const Offset : TPoint);

Def: Offsets an entire ATPA by the Offset point.

 

* procedure GMRL_OffsetTPA(var TPA : TPointArray; const Offset : TPoint);

Def: OffSets an entire TPA by the offset point.

 

* procedure GMRL_SortTPAByX(var a: TPointArray; const LowToHi: Boolean);

Def: Sorts a TPA by the X value, either low first of high first.

 

* procedure GMRL_SortTPAByY(var a: TPointArray; const LowToHi: Boolean);

Def: Sorts a TPA by the Y value, either low first of high first.

 

* function GMRL_FindTPARows(a: TPointArray): T2DPointArray;

Def: Finds rows of points and groups them into seprate TPA's in an ATPA.

 

* function GMRL_FindTPAColumns(a: TPointArray): T2DPointArray;

Def: Finds columns of points and groups them into seprate TPA's in an ATPA.

 

* procedure GMRL_SortTPAFrom(var a: TPointArray; const From: TPoint);

Def: Sorts TPA from the "From" point.

 

* procedure GMRL_SortATPAFromFirstPoint(var a: T2DPointArray; const From: TPoint);

Def: Sorts ATPA from the "From" Point.

 

* procedure GMRL_SortATPAFromMidPoint(var a: T2DPointArray; const From: TPoint);

Def: Sorts ATPA from the "From" Point.

 

* function GMRL_MiddleTPAEx(const TPA: TPointArray; var x, y: Integer): Boolean;

Def: Finds the middle of a TPA, returns the points in x,y.

 

* procedure GMRL_FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);

Def: Filters points not in the circle defined.

 

* procedure GMRL_FilterPointsDist(var Points: TPointArray; const MinDist,MaxDist: Extended; Mx, My: Integer);

Def: Filters points not in the circle defined using distance.

 

* procedure GMRL_FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);

Def: Filters points into lines.

 

* procedure GMRL_FilterTPADist(var TPA: TPointArray; maxDist: integer);

Def: Filters outpoints that are out side of the max distance.

 

* function GMRL_RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray;

Def: Removes points that are either to close or to far away determined by dist.

 

* function GMRL_GetATPABounds(const ATPA: T2DPointArray): TBox;

Def: Gets the bounds of an ATPA.

 

* function GMRL_GetTPABounds(const TPA: TPointArray): TBox;

Def: Gets the bound of an TPA.

 

* function GMRL_FindTPAinTPA(SearchTPA: TPointArray; const TotalTPA: TPointArray; var Matches: TPointArray): Boolean;

Def: Finds TPA in a TPA.

 

* function GMRL_TPAFromBox(const Box : TBox) : TPointArray;

Def: Makes TPA from a Box.

 

* function GMRL_TPAFromEllipse(const CX, CY, XRadius, YRadius : Integer): TPointArray;

Def: Makes TPA from Ellipse.

 

* function GMRL_TPAFromCircle(const CX, CY, Radius: Integer): TPointArray;

Def: Makes TPA from Circle.

 

* function GMRL_FindTPAEdges(const p: TPointArray): TPointArray;

Def: Returns all the points in the edges of a TPA.

 

* function GMRL_ReturnPointsNotInTPA(Const TotalTPA: TPointArray; const Box: TBox): TPointArray;

Def: Returns point not contained in the TPA with a box as reference.

 

~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~-~}

[/scar]

 

Defines now available to activate different sections of GMRL for use:

[scar]

{$DEFINE OSI} // Includes OSI and makes more functions available if they use OSI

{$DEFINE SMART} // Activates SMART can be used with or without OSI (RS2 or RS07)

{$DEFINE RS07} // Activates all RS07 routines including routines for SPS

{$DEFINE Randoms} // Activates all RS07 random routines, no working random solving routines atm, inprogress though.

{$DEFINE RS2} // Activates all RS2 routines including routines for SPS

{$DEFINE SPS} // Activates all SPS routines including routines for RS2 or RS07

{$DEFINE DEBUG} // Activates all debug routines

 

{$I GMRL\GMRL.scar}// Includes the cores GMRL routines and other functions depending on DEFINES

[/scar]

Link to comment
Share on other sites

Thanks, Ive been out of school for a month with nothing to do. lol. My girl-friend is flying in sunday so im going to be away for a from any actual progress so i wanted to make sure i had everything in working condition, lately ive been so indecisive on the libraries structure but i believe i have got it to where i want and if any changes need to be made it should be relatively easy from here on out. =)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
  • Create New...