Jump to content
FHannes

SCAR Divi 3.36 Alpha

Recommended Posts

The first alpha version of SCAR Divi 3.36 is now available, currently only some new functions.

 

Regular: http://svn.scar-divi.com/scar/

Portable: http://svn.scar-divi.com/scar_portable/

 

Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease

 

Changelog:

New:
- function FindColorsTPA(out X, Y: Integer; const Colors: TIntArray; const TPA: TPointArray): Boolean;
- function FindColorsTPATol(out X, Y: Integer; const Colors: TIntArray; const TPA: TPointArray; const Tol: Integer): Boolean;
- function FindColorsTPAEx(out Points: TPointArray; const Colors: TIntArray; const TPA: TPointArray): Boolean;
- function FindColorsTPATolEx(out Points: TPointArray; const Colors: TIntArray; const TPA: TPointArray; const Tol: Integer): Boolean;
- function GetActiveWindow: Hwnd;
- procedure InvertTPA(var TPA: TPointArray);

Improvements:
- procedure MoveMouseEx(const X, Y, MouseSpeed: Integer);
- InvertTPA => ReverseTPA
- InvertTIA => ReverseTIA
- Default mousespeed changed from 25 to 20

 

Enjoy :)

 

~Freddy

Edited by Freddy
Link to comment
Share on other sites

I'm entering a rather busy period for me, so development will be slowing down for a while, but I'll be working on the manual quite a lot, as there's a lot of new stuff to document.

 

Noooooooooooooooooooooo way. Good idea for the old freddy, but the new one cannot do this :P.

Link to comment
Share on other sites

I've uploaded a new copy of the Alpha now that I'm back to developing. This build has all of the fixes from 3.35.02 merged into it, and also 2 important breaking changes. 1 small revision of the new mouse API, the RX and RY parameters haev been removed from MoveMouseEx. And also, InvertTPA has been renamed to ReverseTPA, BUT a new function has been added that is named InvertTPA and it has the same parameters! So if you use InvertTPA, make sure you change it to ReverseTPA! [wiki=InvertTPA]InvertTPA[/wiki] now inverts the TPA by returning all of the points inside of the TPA's bounds that weren't in the TPA. This is an equivalent of the PointsNotInTPA function in OSI, but it is A LOT faster.

 

[scar]var

T: Integer;

TPA: TPointArray;

 

function PointsNotInTPA(TPA: TPointArray): TPointArray;

begin

Result := TPAFromBox(TPABounds(TPA));

TPAFilterPoints(Result, TPA);

end;

 

begin

TPA := RandomTPA(5000, 1000, 1000);

T := GetSystemTime;

PointsNotInTPA(TPA);

WriteLn('PointsNotInTPA: ' + IntToStr(GetSystemTime - T) + 'ms.');

T := GetSystemTime;

InvertTPA(TPA);

WriteLn('InvertTPA: ' + IntToStr(GetSystemTime - T) + 'ms.');

end.[/scar]

 

PointsNotInTPA: 14087ms.
InvertTPA: 46ms.

Link to comment
Share on other sites

Interesting. I'll have to look deeper and figure out why it's so slow under 3.36. I mean we are talking 10x faster (at least) under 3.35.

 

I've looked into it and the problem is TPAInTPA. I made changes to it to improve it's performance, which obviously had an adverse effect, though I'm not sure why yet. This is however not a recent change.

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...