FHannes Posted November 3, 2011 Share Posted November 3, 2011 (edited) The release candidate of SCAR Divi 3.28 is now available. This release is one of the biggest ones in the history of SCAR in terms of functionality, tons of new functions have been added, quite a lot of bugs were also fixed. RC marks a code freeze, so no more things will be added, if needed only bugfixes will be made at this point. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Changelog: Bugfixes: - Define not closed on code completion error - Loading toolbar positions could throw an error - GetCursorType was not working properly - TPAGroup(Ex) duplicated every first entry - A bug in Floor/Ceil introduced in 3.26 [Mantis:0000029] - GroupTPA(Ex) didn't perform it's intended task - ISM API was broken - Internal bug could cause SCAR to get stuck in the memory for a while after closing - Workaround for occasional error on closing - DebugBitmap did not resize the debugwindow Improvements: - Dock positions are no longer saved - TPARemove is now an alias of TPARemovePoint, TPADelete is now the original TPARemove - Revamped SendKeysWait Additions: - function Ln(const X: Extended): Extended; - function Gauss(const x, Mean, Variance: Extended): Extended; - function RandG(const Variance: Extended): Extended; - function RandomG(const Range: Integer; const Variance: Extended): Integer; - function RandomRangeG(const AFrom, ATo: Integer; const Variance: Extended): Integer; - function RndCirclePoint(const mx, my, r: Integer): TPoint; - function RndCirclePointG(const mx, my, r: Integer; const Variance: Extended): TPoint; - function RndBoxPoint(const b: TBox): TPoint; - function RndBoxPointG(const b: TBox; const Variance: Extended): TPoint; - function GroupTPA(const TPA: TPointArray; const Dist: Integer): T2DPointArray; (Alias: TPAGroup) - function GroupTPAEx(const TPA: TPointArray; const XMax, YMax: Integer): T2DPointArray; (Alias: TPAGroupEx) - procedure OffsetTPA(var TPA: TPointArray; const XOffset, YOffset: Integer); - function RandomTPA(const Count, XRange, YRange: Integer): TPointArray; (Alias: TPARandom) - procedure SortTPA(var TPA: TPointArray); (Alias: TPASort) - procedure SortTPAEx(var TPA: TPointArray; const Point: TPoint); (Alias: TPASortEx) - function CopyTPA(const TPA: TPointArray): TPointArray; - function CopyTPAEx(const TPA: TPointArray; const Index, Count: Integer): TPointArray; - procedure SortATPABySize(var ATPA: T2DPointArray); (Alias: ATPASortBySize) - function TPAInTPARel(const TPA1, TPA2: TPointArray): Boolean; - function MergeATPA(const ATPA: T2DPointArray): TPointArray; - procedure TPAAppend(var TPA: TPointArray; const Point: TPoint); - function TPAInTPARelEx(const TPA1, TPA2: TPointArray; var TPAFound: TPointArray): Boolean; - function TIAInTIA(const TIA1, TIA2: TIntArray): Boolean; - procedure TIARange(const TIA: TIntArray; out Lo, Hi: Integer); - procedure InvertTIA(var TIA: TIntArray); - function CombineTIA(const TIA1, TIA2: TIntArray): TIntArray; - function TIAToStr(const TIA: TIntArray): AnsiString; - function StrToTIA(const Str: AnsiString): TIntArray; - procedure TIAUnique(var TIA: TIntArray); - function ATPABounds(const ATPA: T2DPointArray): TBox; - procedure ATPADimensions(const ATPA: T2DPointArray; out Width, Height: Integer); - function ATPAArea(const ATPA: T2DPointArray): Integer; - function ATPADensity(const ATPA: T2DPointArray): Extended; - function MergeATIA(const ATIA: T2DIntArray): TIntArray; - procedure SortTIA(var TIA: TIntArray); - procedure SortTIAEx(var TIA: TIntArray; const Int: Integer); - procedure SortATIABySize(var ATIA: T2DIntArray); - procedure InvertATPA(var ATPA: T2DPointArray); - procedure SortATPA(var ATPA: T2DPointArray); - procedure SortATPAEx(var ATPA: T2DPointArray; const Point: TPoint); - procedure SortATPAByMiddleEx(var ATPA: T2DPointArray; const Point: TPoint); - procedure SortATPAByMiddle(var ATPA: T2DPointArray); - function TIAContains(const TIA: TIntArray; const Int: Integer): Boolean; - function TIAPos(const TIA: TIntArray; const Int: Integer): Integer; - function TIAPosEx(const TIA: TIntArray; const Int, From: Integer): Integer; - procedure SortATPAByFirstEx(var ATPA: T2DPointArray; const Point: TPoint); - procedure SortATPAByFirst(var ATPA: T2DPointArray); - procedure TPAUnique(var TPA: TPointArray); (Alias: TPARemoveDupl) - procedure TPARemoveEx(var TPA: TPointArray; const Point: TPoint; const All: Boolean); (Alias: TPARemoveEx) - function TIADelete(var TIA: TIntArray; const Index: Integer): Integer; - procedure TIAAppend(var TIA: TIntArray; const Int: Integer); - function TIASum(const TIA: TIntArray): Integer; - procedure OffsetATPA(var ATPA: T2DPointArray; const XOffset, YOffset: Integer); - procedure TIARemoveEx(var TIA: TIntArray; const Int: Integer; const All: Boolean); - procedure TIARemove(var TIA: TIntArray; const Int: Integer); - function TIAIntersect(const TIA1, TIA2: TIntArray): TIntArray; - Clear history menu button for color history - function AppendFile(Path: AnsiString; const Shared: Boolean): Integer; - procedure TPAExtractBoxes(var TPA: TPointArray; const Boxes: TBoxArray); - procedure TPAExtractPie(var TPA: TPointArray; const Center: TPoint; const RMin, RMax, AStart, AEnd: Extended); - procedure TPAFilterPie(var TPA: TPointArray; const Center: TPoint; const RMin, RMax, AStart, AEnd: Extended); - procedure RotatePoint(var Point: TPoint; const Center: TPoint; const Angle: Extended); - procedure RotateTPA(const TPA: TPointArray; const Center: TPoint; const Angle: Extended); Enjoy the release quickly, because final isn't far behind ~Freddy Edited November 3, 2011 by Freddy New revision Quote Link to comment Share on other sites More sharing options...
zippoxer Posted November 3, 2011 Share Posted November 3, 2011 Gaussian functions makes human simulation less painful, thanks for that. Quote Link to comment Share on other sites More sharing options...
Wanted Posted November 3, 2011 Share Posted November 3, 2011 Response to the RandomRangeG https://github.com/OSI1/OSI1/commit/869bb0fa79ad14090ffc6ccc54d0a5c21d49755e In OSI RR will function this way now, however SCAR will not. Quote Link to comment Share on other sites More sharing options...
zippoxer Posted November 3, 2011 Share Posted November 3, 2011 That'll save me these lines: function RndMiddleG(a, b: Integer; variance: Extended): Integer; var r: Integer; begin Result := Round((a + b) / 2); r := RandomG(Result, variance); if Random(2) = 0 then Result := Result + r else Result := Result - r end; Quote Link to comment Share on other sites More sharing options...
FHannes Posted November 3, 2011 Author Share Posted November 3, 2011 Response to the RandomRangeG https://github.com/OSI1/OSI1/commit/869bb0fa79ad14090ffc6ccc54d0a5c21d49755e In OSI RR will function this way now, however SCAR will not. This will be more accurate: function RR(const L, H: Integer; const Variance: Extended): Integer; var Origin, HalfRange: Extended; begin HalfRange := (H - L + 1) / 2; Origin := L + HalfRange; case Random(2) of 0: Result := Round(Origin - HalfRange * RandG(Variance)); 1: Result := Round(Origin + HalfRange * RandG(Variance)); end; end; Quote Link to comment Share on other sites More sharing options...
Janilabo Posted November 3, 2011 Share Posted November 3, 2011 Oh I just <3 the section of ADDITIONS. Well done! Also, good work with better stability and fixing the broken ISM API! -Jani Quote Link to comment Share on other sites More sharing options...
KingKong Posted November 3, 2011 Share Posted November 3, 2011 Does this mean you'll work on SCAR Titan?(please say yes!!!) Quote Link to comment Share on other sites More sharing options...
FHannes Posted November 3, 2011 Author Share Posted November 3, 2011 Does this mean you'll work on SCAR Titan?(please say yes!!!) Well yeah, I never stopped working on Titan, rather I bumped into a bit of an issue, but I'm working on that... Quote Link to comment Share on other sites More sharing options...