Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
ollydev committed Mar 23, 2024
1 parent c558e32 commit 12a0228
Show file tree
Hide file tree
Showing 46 changed files with 719 additions and 841 deletions.
26 changes: 25 additions & 1 deletion Source/Simba.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,7 @@
<PackageName Value="LCL"/>
</Item5>
</RequiredPackages>
<Units Count="22">
<Units Count="28">
<Unit0>
<Filename Value="Simba.lpr"/>
<IsPartOfProject Value="True"/>
Expand Down Expand Up @@ -531,6 +531,30 @@
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
</Unit21>
<Unit22>
<Filename Value="simba.containers.pas"/>
<IsPartOfProject Value="True"/>
</Unit22>
<Unit23>
<Filename Value="simba.container_stringmap.pas"/>
<IsPartOfProject Value="True"/>
</Unit23>
<Unit24>
<Filename Value="simba.container_slacktree.pas"/>
<IsPartOfProject Value="True"/>
</Unit24>
<Unit25>
<Filename Value="simba.container_dict.pas"/>
<IsPartOfProject Value="True"/>
</Unit25>
<Unit26>
<Filename Value="simba.container_heaparray.pas"/>
<IsPartOfProject Value="True"/>
</Unit26>
<Unit27>
<Filename Value="simba.array_relationship.pas"/>
<IsPartOfProject Value="True"/>
</Unit27>
</Units>
</ProjectOptions>
<CompilerOptions>
Expand Down
14 changes: 7 additions & 7 deletions Source/algorithms/simba.algo_difference.pas
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ interface

uses
Classes, SysUtils,
simba.base;
simba.base, simba.hash_murmur;

function Algo_Box_Difference(x,y: TBoxArray): TBoxArray;
function Algo_Point_Difference(x,y: TPointArray): TPointArray;
Expand All @@ -24,7 +24,7 @@ function Algo_Int64_Difference(x,y: TInt64Array): TInt64Array;
implementation

uses
simba.dictionary;
simba.container_dict, simba.hash;

{$DEFINE MACRO_SET_DIFF :=
for i:=0 to High(x) do dict[x[i]] := True;
Expand All @@ -51,7 +51,7 @@ function Algo_Box_Difference(x,y: TBoxArray): TBoxArray;
tmp: Boolean;
begin
Result := nil;
dict := TDict.Create(@HashBox);
dict := TDict.Create();
MACRO_SET_DIFF;
dict.Free();
end;
Expand All @@ -65,7 +65,7 @@ function Algo_Point_Difference(x,y: TPointArray): TPointArray;
tmp: Boolean;
begin
Result := nil;
dict := TDict.Create(@HashPoint);
dict := TDict.Create();
MACRO_SET_DIFF;
dict.Free();
end;
Expand All @@ -79,7 +79,7 @@ function Algo_UInt8_Difference(x,y: TByteArray): TByteArray;
tmp: Boolean;
begin
Result := nil;
dict := TDict.Create(@HashUInt8);
dict := TDict.Create();
MACRO_SET_DIFF;
dict.Free();
end;
Expand All @@ -93,7 +93,7 @@ function Algo_Int32_Difference(x,y: TIntegerArray): TIntegerArray;
tmp: Boolean;
begin
Result := nil;
dict := TDict.Create(@HashInt32);
dict := TDict.Create();
MACRO_SET_DIFF;
dict.Free();
end;
Expand All @@ -107,7 +107,7 @@ function Algo_Int64_Difference(x,y: TInt64Array): TInt64Array;
tmp: Boolean;
begin
Result := nil;
dict := TDict.Create(@HashInt64);
dict := TDict.Create();
MACRO_SET_DIFF;
dict.Free();
end;
Expand Down
23 changes: 11 additions & 12 deletions Source/algorithms/simba.algo_intersection.pas
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,10 @@ function Algo_UInt8_Intersection(x,y: TByteArray): TByteArray;
function Algo_Int32_Intersection(x,y: TIntegerArray): TIntegerArray;
function Algo_Int64_Intersection(x,y: TInt64Array): TInt64Array;


implementation

uses
simba.dictionary;
simba.container_dict;

{$DEFINE MACRO_SET_INTERSECTION :=
for i:=0 to High(x) do dict[x[i]] := 1;
Expand Down Expand Up @@ -64,8 +63,8 @@ function Algo_Box_Intersection(x,y: TBoxArray): TBoxArray;
i,c: Int32;
begin
Result := nil;
dict := TDict.Create(@HashBox);
dupes := TDict.Create(@HashBox);
dict := TDict.Create();
dupes := TDict.Create();
MACRO_SET_INTERSECTION;
dict.Free();
dupes.Free();
Expand All @@ -79,8 +78,8 @@ function Algo_Point_Intersection(x,y: TPointArray): TPointArray;
i,c: Int32;
begin
Result := nil;
dict := TDict.Create(@HashPoint);
dupes := TDict.Create(@HashPoint);
dict := TDict.Create();
dupes := TDict.Create();
MACRO_SET_INTERSECTION;
dict.Free();
dupes.Free();
Expand All @@ -94,8 +93,8 @@ function Algo_UInt8_Intersection(x,y: TByteArray): TByteArray;
i,c: Int32;
begin
Result := nil;
dict := TDict.Create(@HashUInt8);
dupes := TDict.Create(@HashUInt8);
dict := TDict.Create();
dupes := TDict.Create();
MACRO_SET_INTERSECTION;
dict.Free();
dupes.Free();
Expand All @@ -109,8 +108,8 @@ function Algo_Int32_Intersection(x,y: TIntegerArray): TIntegerArray;
i,c: Int32;
begin
Result := nil;
dict := TDict.Create(@HashInt32);
dupes := TDict.Create(@HashInt32);
dict := TDict.Create();
dupes := TDict.Create();
MACRO_SET_INTERSECTION;
dict.Free();
dupes.Free();
Expand All @@ -124,8 +123,8 @@ function Algo_Int64_Intersection(x,y: TInt64Array): TInt64Array;
i,c: Int32;
begin
Result := nil;
dict := TDict.Create(@HashInt64);
dupes := TDict.Create(@HashInt64);
dict := TDict.Create();
dupes := TDict.Create();
MACRO_SET_INTERSECTION;
dict.Free();
dupes.Free();
Expand Down
22 changes: 11 additions & 11 deletions Source/algorithms/simba.algo_symmetricDifference.pas
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function Algo_Int64_SymmetricDifference(x,y: TInt64Array): TInt64Array;
implementation

uses
simba.dictionary;
simba.container_dict;

{$DEFINE MACRO_SET_SYMDIFF :=
for i:=0 to High(x) do dict[x[i]] := 1;
Expand Down Expand Up @@ -64,8 +64,8 @@ function Algo_Box_SymmetricDifference(x,y: TBoxArray): TBoxArray;
i,c: Int32;
begin
Result := nil;
dict := TDict.Create(@HashBox);
dupes := TDict.Create(@HashBox);
dict := TDict.Create();
dupes := TDict.Create();
MACRO_SET_SYMDIFF;
dict.Free();
dupes.Free();
Expand All @@ -79,8 +79,8 @@ function Algo_Point_SymmetricDifference(x,y: TPointArray): TPointArray;
i,c: Int32;
begin
Result := nil;
dict := TDict.Create(@HashPoint);
dupes := TDict.Create(@HashPoint);
dict := TDict.Create();
dupes := TDict.Create();
MACRO_SET_SYMDIFF;
dict.Free();
dupes.Free();
Expand All @@ -94,8 +94,8 @@ function Algo_UInt8_SymmetricDifference(x,y: TByteArray): TByteArray;
i,c: Int32;
begin
Result := nil;
dict := TDict.Create(@HashUInt8);
dupes := TDict.Create(@HashUInt8);
dict := TDict.Create();
dupes := TDict.Create();
MACRO_SET_SYMDIFF;
dict.Free();
dupes.Free();
Expand All @@ -109,8 +109,8 @@ function Algo_Int32_SymmetricDifference(x,y: TIntegerArray): TIntegerArray;
i,c: Int32;
begin
Result := nil;
dict := TDict.Create(@HashInt32);
dupes := TDict.Create(@HashInt32);
dict := TDict.Create();
dupes := TDict.Create();
MACRO_SET_SYMDIFF;
dict.Free();
dupes.Free();
Expand All @@ -124,8 +124,8 @@ function Algo_Int64_SymmetricDifference(x,y: TInt64Array): TInt64Array;
i,c: Int32;
begin
Result := nil;
dict := TDict.Create(@HashInt64);
dupes := TDict.Create(@HashInt64);
dict := TDict.Create();
dupes := TDict.Create();
MACRO_SET_SYMDIFF;
dict.Free();
dupes.Free();
Expand Down
4 changes: 2 additions & 2 deletions Source/array/simba.array_point.pas
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,8 @@ implementation

uses
Math,
simba.array_pointarray, simba.arraybuffer, simba.geometry, simba.math,
simba.algo_sort, simba.algo_intersection, simba.slacktree,
simba.array_pointarray, simba.containers, simba.geometry, simba.math,
simba.algo_sort, simba.algo_intersection, simba.container_slacktree,
simba.array_ord, simba.matrix_bool, simba.matrix_int, simba.box;

procedure GetAdjacent4(var Adj: TPointArray; const P: TPoint); inline;
Expand Down
2 changes: 1 addition & 1 deletion Source/array/simba.array_pointarray.pas
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ interface
implementation

uses
simba.array_point, simba.algo_sort, simba.arraybuffer, simba.quad, simba.box,
simba.array_point, simba.algo_sort, simba.containers, simba.quad, simba.box,
simba.matrix_int;

function T2DPointArrayHelper.Sort(Weights: TIntegerArray; LowToHigh: Boolean): T2DPointArray;
Expand Down
2 changes: 1 addition & 1 deletion Source/finders/simba.finder_color.pas
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ function MatchColorsOnTarget(Target: TSimbaTarget; Bounds: TBox;
implementation

uses
simba.arraybuffer, simba.colormath_distance_unrolled, simba.threadpool,
simba.containers, simba.colormath_distance_unrolled, simba.threadpool,
simba.array_pointarray, simba.matrix_float, simba.datetime;

// How much to "Slice" (vertically) the image up for multithreading.
Expand Down
2 changes: 1 addition & 1 deletion Source/finders/simba.finder_dtm.pas
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function FindDTMRotatedOnTarget(Target: TSimbaTarget;
implementation

uses
simba.colormath_distance, simba.arraybuffer;
simba.colormath_distance, simba.containers;

type
TSearchPoint = record
Expand Down
2 changes: 1 addition & 1 deletion Source/finders/simba.finder_image.pas
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function FindImageOnBuffer(var Limit: TSimpleThreadsafeLimit;
implementation

uses
simba.arraybuffer, simba.threadpool, simba.array_point, simba.array_pointarray;
simba.containers, simba.threadpool, simba.array_point, simba.array_pointarray;

// How much to "Slice" (vertically) the image up for multithreading.
function CalculateSlices(SearchWidth, SearchHeight: Integer): Integer;
Expand Down
3 changes: 2 additions & 1 deletion Source/hash/simba.hash.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
interface

uses
Classes, SysUtils;
Classes, SysUtils,
simba.base;

type
{$SCOPEDENUMS ON}
Expand Down
2 changes: 1 addition & 1 deletion Source/ide/mpaslex.pas
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ interface

uses
SysUtils, Classes,
simba.base, simba.list, simba.stack,
simba.base, simba.containers,
mPasLexTypes;

type
Expand Down
4 changes: 2 additions & 2 deletions Source/ide/simba.form_functionlist.pas
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ interface

uses
Classes, SysUtils, Forms, Controls, ComCtrls, ExtCtrls, Menus, StrUtils,
simba.base, simba.ide_codetools_parser, simba.ide_codetools_insight, simba.component_treeview, simba.dictionary;
simba.base, simba.ide_codetools_parser, simba.ide_codetools_insight, simba.component_treeview, simba.container_dict;

type
ENodeType = (ntUnknown, ntSimbaSection, ntDecl, ntSimbaDecl, ntPluginDecl, ntIncludes, ntPlugins, ntIncludeFile, ntPluginFile);
Expand Down Expand Up @@ -888,7 +888,7 @@ constructor TSimbaFunctionListForm.Create(TheOwner: TComponent);
FCodeinsight := TCodeinsight.Create();
FCodeinsight.ScriptParser.NoErrorMessages := True;

FSavedStates := TFunctionListStateDict.Create(@HashInt32);
FSavedStates := TFunctionListStateDict.Create();

SimbaIDEEvents.Register(Self, SimbaIDEEvent.CODETOOLS_SETUP, @DoCodetoolsSetup);
SimbaIDEEvents.Register(Self, SimbaIDEEvent.TAB_MODIFIED, @DoEditorModified);
Expand Down
2 changes: 1 addition & 1 deletion Source/ide/simba.form_imagestring.pas
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ implementation
{$R *.lfm}

uses
simba.base, simba.image, simba.image_lazbridge, simba.stringbuilder;
simba.base, simba.image, simba.image_lazbridge, simba.containers;

procedure TSimbaImageStringForm.OpenButtonClick(Sender: TObject);
begin
Expand Down
2 changes: 1 addition & 1 deletion Source/ide/simba.ide_codetools_arrayhelpers.pas
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ function GetArrayHelpers(Decl: TDeclaration): TCodeParser;
implementation

uses
simba.list;
simba.containers;

type
TArrayHelperGenerator = class(TObject)
Expand Down
2 changes: 1 addition & 1 deletion Source/ide/simba.ide_codetools_insight.pas
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ implementation

uses
simba.base, simba.ide_codetools_includes, simba.ide_codetools_arrayhelpers,
simba.stringbuilder;
simba.containers;

function TCodeinsight.GetIncludesHash: String;
begin
Expand Down
2 changes: 1 addition & 1 deletion Source/ide/simba.ide_codetools_keywords.pas
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ implementation

uses
lpparser,
simba.list;
simba.containers;

type
TKeywordList = specialize TSimbaObjectList<TDeclaration>;
Expand Down
2 changes: 1 addition & 1 deletion Source/ide/simba.ide_codetools_parser.pas
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface
SysUtils, Classes,
mPasLexTypes, mPasLex, mSimplePasPar,
simba.base, simba.ide_codetools_utils,
simba.stack, simba.list, simba.stringbuilder;
simba.containers;

type
TCodeParser = class;
Expand Down
Loading

0 comments on commit 12a0228

Please sign in to comment.