mirror of
https://github.com/moparisthebest/Simba
synced 2025-02-17 07:40:11 -05:00
Merge branch 'master' into cts-rework
This commit is contained in:
commit
d0bd81c2e9
@ -14,9 +14,17 @@ Recommended Simba Extensions
|
|||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
Recommended:
|
Recommended:
|
||||||
* SRL Updater (and Downloader)
|
|
||||||
* DTM Editor
|
* Extension Updater (highly recommended)
|
||||||
|
* SRL Updater (and Installer/Download)
|
||||||
* Associate Files
|
* Associate Files
|
||||||
|
* Security extension. (Implements a File and Fire wall)
|
||||||
|
|
||||||
|
For developers:
|
||||||
|
|
||||||
|
* DTM Editor
|
||||||
|
* Paster Extension
|
||||||
|
* CRov, Crash Recovery.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
You can also use the Reflection Updater (and Downloader) for updating
|
You can also use the Reflection Updater (and Downloader) for updating
|
||||||
|
@ -87,7 +87,7 @@ begin
|
|||||||
HOST := HOSTDef;
|
HOST := HOSTDef;
|
||||||
if (InputQuery(GetName + ' ' + GetVersion + ' Extension', 'Which ID would you like to grab?', Data)) then
|
if (InputQuery(GetName + ' ' + GetVersion + ' Extension', 'Which ID would you like to grab?', Data)) then
|
||||||
begin
|
begin
|
||||||
if IntToStr(StrToInt(Data)) = Data then
|
if IntToStr(StrToIntDef(Data, -1)) = Data then
|
||||||
Data := '{"paste_id": ' + Data + '}'
|
Data := '{"paste_id": ' + Data + '}'
|
||||||
else
|
else
|
||||||
Data := '{"paste_id": "' + Data + '"}';
|
Data := '{"paste_id": "' + Data + '"}';
|
||||||
|
@ -26,11 +26,13 @@
|
|||||||
// See Units/Linux/keybinder.pas
|
// See Units/Linux/keybinder.pas
|
||||||
{$ENDIF}
|
{$ENDIF}
|
||||||
|
|
||||||
|
//{$DEFINE SIMBA_VERBOSE} // For more verbosity.
|
||||||
|
|
||||||
//{$DEFINE USE_RUTIS}
|
//{$DEFINE USE_RUTIS}
|
||||||
|
|
||||||
//{$DEFINE USE_CPASCAL} // TODO
|
//{$DEFINE USE_CPASCAL} // TODO
|
||||||
//{$DEFINE USE_LAPE} // TODO
|
//{$DEFINE USE_LAPE} // TODO
|
||||||
//{$DEFINE USE_EXTENSIONS}
|
{$DEFINE USE_EXTENSIONS}
|
||||||
//{$DEFINE USE_CODECOMPLETION} // TODO
|
//{$DEFINE USE_CODECOMPLETION} // TODO
|
||||||
|
|
||||||
//{$DEFINE TERMINALWRITELN} // Only used once. Remove from SimbaUnit?
|
//{$DEFINE TERMINALWRITELN} // Only used once. Remove from SimbaUnit?
|
||||||
|
@ -35,20 +35,16 @@
|
|||||||
<LaunchingApplication PathPlusParams="/usr/bin/gnome-terminal -t 'Lazarus Run Output' -e '$(LazarusDir)/tools/runwait.sh $(TargetCmdLine)'"/>
|
<LaunchingApplication PathPlusParams="/usr/bin/gnome-terminal -t 'Lazarus Run Output' -e '$(LazarusDir)/tools/runwait.sh $(TargetCmdLine)'"/>
|
||||||
</local>
|
</local>
|
||||||
</RunParams>
|
</RunParams>
|
||||||
<RequiredPackages Count="3">
|
<RequiredPackages Count="2">
|
||||||
<Item1>
|
<Item1>
|
||||||
<PackageName Value="LCLBase"/>
|
|
||||||
<MinVersion Major="1" Release="1" Valid="True"/>
|
|
||||||
</Item1>
|
|
||||||
<Item2>
|
|
||||||
<PackageName Value="SynEdit"/>
|
<PackageName Value="SynEdit"/>
|
||||||
<MinVersion Major="1" Valid="True"/>
|
<MinVersion Major="1" Valid="True"/>
|
||||||
</Item2>
|
</Item1>
|
||||||
<Item3>
|
<Item2>
|
||||||
<PackageName Value="LCL"/>
|
<PackageName Value="LCL"/>
|
||||||
</Item3>
|
</Item2>
|
||||||
</RequiredPackages>
|
</RequiredPackages>
|
||||||
<Units Count="48">
|
<Units Count="50">
|
||||||
<Unit0>
|
<Unit0>
|
||||||
<Filename Value="Simba.lpr"/>
|
<Filename Value="Simba.lpr"/>
|
||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
@ -308,10 +304,19 @@
|
|||||||
<IsPartOfProject Value="True"/>
|
<IsPartOfProject Value="True"/>
|
||||||
<UnitName Value="os_linux"/>
|
<UnitName Value="os_linux"/>
|
||||||
</Unit47>
|
</Unit47>
|
||||||
|
<Unit48>
|
||||||
|
<Filename Value="../../Units/MMLCore/tpa.pas"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
<UnitName Value="tpa"/>
|
||||||
|
</Unit48>
|
||||||
|
<Unit49>
|
||||||
|
<Filename Value="../../Units/MMLAddon/PSInc/psexportedmethods.inc"/>
|
||||||
|
<IsPartOfProject Value="True"/>
|
||||||
|
</Unit49>
|
||||||
</Units>
|
</Units>
|
||||||
</ProjectOptions>
|
</ProjectOptions>
|
||||||
<CompilerOptions>
|
<CompilerOptions>
|
||||||
<Version Value="10"/>
|
<Version Value="9"/>
|
||||||
<Target>
|
<Target>
|
||||||
<Filename Value="../../Simba"/>
|
<Filename Value="../../Simba"/>
|
||||||
</Target>
|
</Target>
|
||||||
|
@ -33,7 +33,7 @@ uses
|
|||||||
{$ENDIF}{$ENDIF}
|
{$ENDIF}{$ENDIF}
|
||||||
Interfaces, Forms, SimbaUnit, colourhistory, About, internets, debugimage,
|
Interfaces, Forms, SimbaUnit, colourhistory, About, internets, debugimage,
|
||||||
framefunctionlist, simpleanalyzer, updater, updateform, Simbasettings,
|
framefunctionlist, simpleanalyzer, updater, updateform, Simbasettings,
|
||||||
libloader, mufasabase, v_ideCodeInsight,
|
libloader, mufasabase, tpa, v_ideCodeInsight,
|
||||||
PSDump, v_ideCodeParser,
|
PSDump, v_ideCodeParser,
|
||||||
v_AutoCompleteForm, CastaliaPasLex, CastaliaPasLexTypes, CastaliaSimplePasPar,
|
v_AutoCompleteForm, CastaliaPasLex, CastaliaPasLexTypes, CastaliaSimplePasPar,
|
||||||
CastaliaSimplePasParTypes, dcpbase64, mPasLex, v_Constants, v_MiscFunctions,
|
CastaliaSimplePasParTypes, dcpbase64, mPasLex, v_Constants, v_MiscFunctions,
|
||||||
|
@ -143,6 +143,11 @@ begin
|
|||||||
FilterPointsLine(points,radial,radius,mx,my);
|
FilterPointsLine(points,radial,radius,mx,my);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure ps_FilterTPADist(var TPA: TPointArray; maxDist: integer);
|
||||||
|
begin
|
||||||
|
FilterTPADist(TPA, maxDist);
|
||||||
|
end;
|
||||||
|
|
||||||
function ps_GetATPABounds(const ATPA: T2DPointArray): TBox;extdecl;
|
function ps_GetATPABounds(const ATPA: T2DPointArray): TBox;extdecl;
|
||||||
begin
|
begin
|
||||||
result := GetATPABounds(ATPA);
|
result := GetATPABounds(ATPA);
|
||||||
|
@ -458,6 +458,7 @@ AddFunction(@ps_FloodFillTPA,'function FloodFillTPA(const TPA : TPointArray) : T
|
|||||||
AddFunction(@ps_FilterPointsPie,'procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);');
|
AddFunction(@ps_FilterPointsPie,'procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);');
|
||||||
AddFunction(@ps_FilterPointsLine,'procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);');
|
AddFunction(@ps_FilterPointsLine,'procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);');
|
||||||
AddFunction(@ps_filterpointsdist,'procedure FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer);');
|
AddFunction(@ps_filterpointsdist,'procedure FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer);');
|
||||||
|
AddFunction(@ps_filterTPADist, 'procedure FilterTPADist(var TPA: TPointArray; maxDist: integer);');
|
||||||
AddFunction(@ps_GetATPABounds,'function GetATPABounds(const ATPA: T2DPointArray): TBox;');
|
AddFunction(@ps_GetATPABounds,'function GetATPABounds(const ATPA: T2DPointArray): TBox;');
|
||||||
AddFunction(@ps_GetTPABounds,'function GetTPABounds(const TPA: TPointArray): TBox;');
|
AddFunction(@ps_GetTPABounds,'function GetTPABounds(const TPA: TPointArray): TBox;');
|
||||||
AddFunction(@ps_FindTPAinTPA,'function FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;');
|
AddFunction(@ps_FindTPAinTPA,'function FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;');
|
||||||
|
@ -746,11 +746,15 @@ begin
|
|||||||
if (path <> '') then
|
if (path <> '') then
|
||||||
if Includes.Find(path,i) then
|
if Includes.Find(path,i) then
|
||||||
begin
|
begin
|
||||||
psWriteln('Include_Once file already included');
|
{$IFDEF SIMBA_VERBOSE}
|
||||||
Result := False;
|
psWriteln('Include_Once file already included:' + Path);
|
||||||
end;
|
{$ENDIF}
|
||||||
Includes.Add(path);
|
|
||||||
Result := True;
|
Result := True;
|
||||||
|
Exit;
|
||||||
|
end;
|
||||||
|
|
||||||
|
Includes.Add(path);
|
||||||
|
Result := False;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure SIRegister_Mufasa(cl: TPSPascalCompiler);
|
procedure SIRegister_Mufasa(cl: TPSPascalCompiler);
|
||||||
|
@ -67,6 +67,7 @@ function FloodFillTPA(const TPA : TPointArray) : T2DPointArray;
|
|||||||
procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);
|
procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);
|
||||||
procedure FilterPointsDist(var Points: TPointArray; const MinDist,MaxDist: Extended; Mx, My: Integer);
|
procedure FilterPointsDist(var Points: TPointArray; const MinDist,MaxDist: Extended; Mx, My: Integer);
|
||||||
procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);
|
procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);
|
||||||
|
procedure FilterTPADist(var TPA: TPointArray; maxDist: integer);
|
||||||
function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray;
|
function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray;
|
||||||
function GetATPABounds(const ATPA: T2DPointArray): TBox;
|
function GetATPABounds(const ATPA: T2DPointArray): TBox;
|
||||||
function GetTPABounds(const TPA: TPointArray): TBox;
|
function GetTPABounds(const TPA: TPointArray): TBox;
|
||||||
@ -1168,6 +1169,55 @@ begin
|
|||||||
Points:= P;
|
Points:= P;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
{/\
|
||||||
|
Removes points in the TPA that are within maxDist of each other.
|
||||||
|
/\}
|
||||||
|
procedure FilterTPADist(var TPA: TPointArray; maxDist: integer);
|
||||||
|
var
|
||||||
|
c, i, j, l, h, maxDistSq: integer;
|
||||||
|
newTPA: TPointArray;
|
||||||
|
inBadElements: TBooleanArray;
|
||||||
|
begin
|
||||||
|
h := high(TPA);
|
||||||
|
l := (h + 1);
|
||||||
|
maxDistSq := (maxDist * maxDist);
|
||||||
|
|
||||||
|
setLength(inBadElements, l);
|
||||||
|
setLength(newTPA, l);
|
||||||
|
|
||||||
|
for i := 0 to h do
|
||||||
|
inBadElements[i] := false;
|
||||||
|
|
||||||
|
for i := 0 to (h - 1) do
|
||||||
|
begin
|
||||||
|
if (inBadElements[i]) then
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for j := (i + 1) to h do
|
||||||
|
begin
|
||||||
|
if (inBadElements[j]) then
|
||||||
|
continue;
|
||||||
|
|
||||||
|
// simplified -> a^2 + b^2 <= c^2
|
||||||
|
if (((TPA[i].x - TPA[j].x) * (TPA[i].x - TPA[j].x)) + ((TPA[i].y - TPA[j].y) * (TPA[i].y - TPA[j].y)) <= maxDistSq) then
|
||||||
|
inBadElements[j] := true;
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
c := 0;
|
||||||
|
|
||||||
|
// set the new TPA
|
||||||
|
for i := 0 to h do
|
||||||
|
if (not inBadElements[i]) then
|
||||||
|
begin
|
||||||
|
newTPA[c] := TPA[i];
|
||||||
|
inc(c);
|
||||||
|
end;
|
||||||
|
|
||||||
|
setLength(newTPA, c);
|
||||||
|
TPA := newTPA;
|
||||||
|
end;
|
||||||
|
|
||||||
{/\
|
{/\
|
||||||
Removes the points that are inside or outside the distance Dist from the point (x, y) from the TPointArray ThePoints.
|
Removes the points that are inside or outside the distance Dist from the point (x, y) from the TPointArray ThePoints.
|
||||||
/\}
|
/\}
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit 1b8211db373428cd2916905980ad51be8fab1f83
|
Subproject commit 940053e16d79c3d76b6b70d6a1bf56507ad0e627
|
Loading…
Reference in New Issue
Block a user