1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-27 11:32:18 -05:00

Merge branch 'master' into simba-next

Conflicts:
	TODO
This commit is contained in:
Merlijn Wajer 2011-09-21 11:56:38 +02:00
commit 2c691607fe
12 changed files with 465 additions and 58 deletions

View File

@ -1,5 +1,27 @@
# Change a minus to a plus when something is being worked on.
# Remove it when you are done.
Check scriptref/dtm.rst, it look overly complicated with all the different
types. (MDTM, DDTM, TSDTM)....
Add examples to files in scriptref:
- [ ] bitmaps.rst
- [ ] colourconverting.rst
- [ ] colourfinding.rst
- [ ] dtm.rst
- [ ] files.rst
- [/] mouseandkeyboard.rst
- [ ] ocr.rst
- [ ] sound.rst
- [ ] string.rst
- [ ] tpa.rst
- [ ] web.rst
- [ ] window.rst
# ADDING CONTENT
- Create a list of Simba Extensions. If the extension has a doc on it's own,
dont forget to link to it.
- Write mmlref / article (only for developers of Simba)
- Write tutorial?
- Write about Simba Stable/Unstable.
# GENERAL
@ -12,13 +34,3 @@
seems to use it).
- Find stuff to add to this list.
# ADDING CONTENT
- Create a list of Simba Extensions. If the extension has a doc on it's own,
dont forget to link to it.
- Create scriptref/ articles. A lot of functionality that Simba exposes to the
Scripters is currently not documented.
- Write mmlref/ article (only for developers of Simba)
- Write tutorial?
- Fix up articles?
- Write about Simba Stable/Unstable.

View File

@ -11,6 +11,8 @@ Quicksort
procedure Quicksort(var Arr : TIntegerArray);
Sorts a TIntegerArray using the Quicksort algorithm
tSwap
-----
@ -19,6 +21,8 @@ tSwap
procedure tSwap(var a, b: TPoint);
Swaps the values of a and b around
tpaSwap
-------
@ -27,6 +31,8 @@ tpaSwap
procedure tpaSwap(var a, b: TPointArray);
Swaps the values of a and b around
SwapE
-----
@ -35,6 +41,8 @@ SwapE
procedure SwapE(var a, b: Extended);
Swaps the values of a and b around
RAaSTPAEx
---------
@ -43,6 +51,7 @@ RAaSTPAEx
procedure RAaSTPAEx(var a: TPointArray; const w, h: Integer);
Leaves one point per box with side lengths W and H to the TPA
RAaSTPA
-------
@ -51,6 +60,8 @@ RAaSTPA
procedure RAaSTPA(var a: TPointArray; const Dist: Integer);
Leaves one point per box with the side length Dist
NearbyPointInArrayEx
--------------------
@ -59,6 +70,8 @@ NearbyPointInArrayEx
function NearbyPointInArrayEx(const P: TPoint; w, h:Integer;const a: TPointArray): Boolean;
Returns true if the point P is near a point in the TPA a with the
NearbyPointInArray
------------------
@ -67,6 +80,8 @@ NearbyPointInArray
function NearbyPointInArray(const P: TPoint; Dist:Integer;const a: TPointArray): Boolean;
Returns true if the point P is near a point in the TPA a with the
QuickTPASort
------------
@ -91,6 +106,8 @@ SortTPAFrom
procedure SortTPAFrom(var a: TPointArray; const From: TPoint);
Sorts the TPA a from the TPoint From
SortATPAFrom
------------
@ -99,6 +116,8 @@ SortATPAFrom
procedure SortATPAFrom(var a: T2DPointArray; const From: TPoint);
Sorts the T2DPointArray a from the TPoint From
SortATPAFromFirstPoint
----------------------
@ -115,6 +134,8 @@ InvertTPA
procedure InvertTPA(var a: TPointArray);
Reverses the TPA
InvertATPA
----------
@ -123,6 +144,8 @@ InvertATPA
procedure InvertATPA(var a: T2DPointArray);
Reverses the T2dPointArray
MiddleTPAEx
-----------
@ -131,6 +154,8 @@ MiddleTPAEx
function MiddleTPAEx(const TPA: TPointArray; var x, y: Integer): Boolean;
Stores the middle point from the TPA in x and y
MiddleTPA
---------
@ -139,6 +164,8 @@ MiddleTPA
function MiddleTPA(const tpa: TPointArray): TPoint;
Returns the middle TPA in the result
SortATPASize
------------
@ -147,6 +174,8 @@ SortATPASize
procedure SortATPASize(var a: T2DPointArray; const BigFirst: Boolean);
Sorts the T2dPointArray from largest to smallest if BigFirst is true or smallest to largest if BigFirst is false
SortATPAFromSize
----------------
@ -155,6 +184,8 @@ SortATPAFromSize
procedure SortATPAFromSize(var a: T2DPointArray; const Size: Integer; CloseFirst: Boolean);
Sorts the T2DPointArray from Size by the closest first if CloseFirst is true
InIntArrayEx
------------
@ -163,6 +194,8 @@ InIntArrayEx
function InIntArrayEx(const a: TIntegerArray; var Where: Integer; const Number: Integer): Boolean;
Returns true if Number was found in the TIntegerArray a and returns its location in Where
InIntArray
----------
@ -171,6 +204,8 @@ InIntArray
function InIntArray(const a: TIntegerArray; Number: Integer): Boolean;
Returns true if Number is found in the TintegerArray a
ClearSameIntegers
-----------------
@ -179,6 +214,8 @@ ClearSameIntegers
procedure ClearSameIntegers(var a: TIntegerArray);
Deletes the indexes in the TintegerArray a which are duplicated
ClearSameIntegersAndTPA
-----------------------
@ -187,6 +224,8 @@ ClearSameIntegersAndTPA
procedure ClearSameIntegersAndTPA(var a: TIntegerArray; var p: TPointArray);
Deletes the indexes in the TIntegerArray a and TPointArray p which are duplicated
SplitTPAEx
----------
@ -195,6 +234,8 @@ SplitTPAEx
function SplitTPAEx(const arr: TPointArray; w, h: Integer): T2DPointArray;
Splits the points with max X and Y distances W and H to their
SplitTPA
--------
@ -203,6 +244,8 @@ SplitTPA
function SplitTPA(const arr: TPointArray; Dist: Integer): T2DPointArray;
Splits the points with max distance Dist to their own TPointArrays
FloodFillTPA
------------
@ -219,6 +262,9 @@ FilterPointsPie
procedure FilterPointsPie(var Points: TPointArray; const SD, ED, MinR, MaxR: Extended; Mx, My: Integer);
Removes the points that are in the TPointArray Points that are not within the the degrees SD (Strat Degrees) and
ED (End Degrees) and the radius' MinR (Min Radius) and MaxR (Max Radius) from the origin Mx and My
FilterPointsLine
----------------
@ -227,6 +273,8 @@ FilterPointsLine
procedure FilterPointsLine(var Points: TPointArray; Radial: Extended; Radius, MX, MY: Integer);
Returns the result in the TPointArray Points. Returns the points from the TPointArray Points that are on the line Radial from the center mx, my that is with the radius Radius
FilterPointsDist
----------------
@ -235,6 +283,9 @@ FilterPointsDist
procedure FilterPointsDist(var Points: TPointArray; const MinDist, MaxDist: Extended; Mx, My: Integer);
Removes the points from the TPointArray Points that are not within the radius MinDist (Min Distance) and MaxDist
from the origin Mx and My
GetATPABounds
-------------
@ -243,6 +294,8 @@ GetATPABounds
function GetATPABounds(const ATPA: T2DPointArray): TBox;
Returns the boundaries of the T2DPointArray ATPA as a TBox
GetTPABounds
------------
@ -251,6 +304,8 @@ GetTPABounds
function GetTPABounds(const TPA: TPointArray): TBox;
Returns the boundaries of the TPointArray TPA as a TBox
FindTPAinTPA
------------
@ -259,6 +314,8 @@ FindTPAinTPA
function FindTPAinTPA(const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;
Looks for the TPoints from SearchTPA inside TotalTPA and stores the matches inside the TPointArray Matches
GetSamePointsATPA
-----------------
@ -267,6 +324,8 @@ GetSamePointsATPA
function GetSamePointsATPA(const ATPA : T2DPointArray; var Matches : TPointArray) : boolean;
Finds duplicate Points inside the T2DPointArray ATPA and stores the results inside the TPointArray Matches
FindTextTPAinTPA
----------------
@ -275,6 +334,8 @@ FindTextTPAinTPA
function FindTextTPAinTPA(Height : integer;const SearchTPA, TotalTPA: TPointArray; var Matches: TPointArray): Boolean;
Looks for the TPoints from SearchTPA inside TotalTPA with a maximum y distance of Height and stores the matches inside the TPointArray Matches
SortCircleWise
--------------
@ -283,6 +344,8 @@ SortCircleWise
procedure SortCircleWise(var tpa: TPointArray; const cx, cy, StartDegree: Integer; SortUp, ClockWise: Boolean);
Sorts the TPointArray tpa from the point cx, cy if Sortup is true. Starting at StartDegree going clockwise if Clockwise is True
LinearSort
----------
@ -291,6 +354,8 @@ LinearSort
procedure LinearSort(var tpa: TPointArray; cx, cy, sd: Integer; SortUp: Boolean);
Sorts the TPointArray tpa from cx, cy if Sortup is true on the degree angle sd
RotatePoint
-----------
@ -299,6 +364,8 @@ RotatePoint
function RotatePoint(Const p: TPoint; angle, mx, my: Extended): TPoint;
Rotates the TPoint p around the center mx, my with the angle
ChangeDistPT
------------
@ -307,6 +374,8 @@ ChangeDistPT
function ChangeDistPT(const PT : TPoint; mx,my : integer; newdist : extended) : TPoint;
Returns a TPoint with the distance newdist from the point mx, my based on the position of the TPoint TP
ChangeDistTPA
-------------
@ -315,6 +384,8 @@ ChangeDistTPA
function ChangeDistTPA(var TPA : TPointArray; mx,my : integer; newdist : extended) : boolean;
Returns the result in the TPointArray TPA with the distance newdist from mx, my based on the current position TPA
FindGapsTPA
-----------
@ -323,6 +394,8 @@ FindGapsTPA
function FindGapsTPA(const TPA: TPointArray; MinPixels: Integer): T2DPointArray;
Finds the possible gaps in the TPointArray TPA and results the gaps as a T2DPointArray. Considers as a gap if the gap length is >= MinPixels
RemoveDistTPointArray
---------------------
@ -331,6 +404,8 @@ RemoveDistTPointArray
function RemoveDistTPointArray(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean): TPointArray;
Finds the possible gaps in the TPointArray TPA and removes the gaps. Considers as a gap if the gap length is >= MinPixels
CombineTPA
----------
@ -339,6 +414,8 @@ CombineTPA
function CombineTPA(const Ar1, Ar2: TPointArray): TPointArray;
Attaches the TPointArray Ar2 onto the end of Ar1 and returns it as the result
ReArrangeandShortenArrayEx
--------------------------
@ -347,6 +424,8 @@ ReArrangeandShortenArrayEx
function ReArrangeandShortenArrayEx(const a: TPointArray; w, h: Integer): TPointArray;
Results the TPointArray a with one point per box with side lengths W and H left
ReArrangeandShortenArray
------------------------
@ -355,6 +434,8 @@ ReArrangeandShortenArray
function ReArrangeandShortenArray(const a: TPointArray; Dist: Integer): TPointArray;
Results the TPointArray a with one point per box with side length Dist left
TPAtoATPAEx
-----------
@ -363,6 +444,8 @@ TPAtoATPAEx
function TPAtoATPAEx(const TPA: TPointArray; w, h: Integer): T2DPointArray;
Splits the TPA to boxes with sidelengths W and H and results them as a T2DPointArray
TPAtoATPA
---------
@ -371,6 +454,8 @@ TPAtoATPA
function TPAtoATPA(const TPA: TPointArray; Dist: Integer): T2DPointArray;
Splits the TPA to boxes with sidelength Dist and results them as a T2DPointArray
CombineIntArray
---------------
@ -379,6 +464,8 @@ CombineIntArray
function CombineIntArray(const Ar1, Ar2: TIntegerArray): TIntegerArray;
Attaches the TIntegerArray Ar2 onto the end of Ar1 and returns it as the result
MergeATPA
---------
@ -387,6 +474,8 @@ MergeATPA
function MergeATPA(const ATPA : T2DPointArray) : TPointArray;
Combines all the TPointArrays from the T2DPointArray ATPA into the result
AppendTPA
---------
@ -395,6 +484,8 @@ AppendTPA
procedure AppendTPA(var TPA: TPointArray; const ToAppend: TPointArray);
Attaches the TPointArray ToAppend onto the end of TPA
TPAFromBox
----------
@ -403,6 +494,8 @@ TPAFromBox
function TPAFromBox(const Box : TBox) : TPointArray;
Create a TPointArray from the top left and the bottom right of the TBox Box
RotatePoints
------------
@ -411,6 +504,8 @@ RotatePoints
function RotatePoints(Const P: TPointArray; A, cx, cy: Extended): TPointArray ;
Rotates the TPointArray P around the center cx, cy with the angle a
FindTPAEdges
------------
@ -419,6 +514,8 @@ FindTPAEdges
function FindTPAEdges(const p: TPointArray): TPointArray;
Returns a TPointArray of the edge points of the TPointArray p
ClearTPAFromTPA
---------------
@ -427,6 +524,8 @@ ClearTPAFromTPA
function ClearTPAFromTPA(const arP, ClearPoints: TPointArray): TPointArray;
Removes the points in TPointArray ClearPoints from arP
ReturnPointsNotInTPA
--------------------
@ -435,6 +534,8 @@ ReturnPointsNotInTPA
function ReturnPointsNotInTPA(Const TotalTPA: TPointArray; const Box: TBox): TPointArray;
All the points from the TPointArray TotalTPA that are not in the TBox Box are returned in the TPointArray Res
PointInTPA
----------
@ -443,6 +544,8 @@ PointInTPA
function PointInTPA(p: TPoint;const arP: TPointArray): Boolean;
Returns true if the TPoint p is found in the TPointArray arP
ClearDoubleTPA
--------------
@ -451,6 +554,8 @@ ClearDoubleTPA
procedure ClearDoubleTPA(var TPA: TPointArray);
Deletes duplicate TPAs int he TPointArray TPA
TPACountSort
------------
@ -475,6 +580,8 @@ InvertTIA
procedure InvertTIA(var tI: TIntegerArray);
Reverses the TIntegerArray tI
SumIntegerArray
---------------
@ -483,6 +590,8 @@ SumIntegerArray
function SumIntegerArray(const Ints : TIntegerArray): Integer;
Retuns the sum of all the integers in the TIntegerArray Ints
AverageTIA
----------
@ -491,6 +600,8 @@ AverageTIA
function AverageTIA(const tI: TIntegerArray): Integer;
Gives an average of the sum of the integers in the TIntegerArray tI
AverageExtended
---------------
@ -499,6 +610,8 @@ AverageExtended
function AverageExtended(const tE: TExtendedArray): Extended;
Gives an average of the sum of the extendeds in the TExtendedArray tI
SplitTPAExWrap
--------------
@ -507,6 +620,8 @@ SplitTPAExWrap
procedure SplitTPAExWrap(const arr: TPointArray; w, h: Integer; var res : T2DPointArray);
Splits the points with max X and Y distances W and H to their and returns the result in the T2DPointArray Res
SplitTPAWrap
------------
@ -515,6 +630,8 @@ SplitTPAWrap
procedure SplitTPAWrap(const arr: TPointArray; Dist: Integer; var res: T2DPointArray);
Splits the points with max distance Dist to their own TPointArrays and returns the result in the T2DPointArray Res
FindGapsTPAWrap
---------------
@ -523,6 +640,8 @@ FindGapsTPAWrap
procedure FindGapsTPAWrap(const TPA: TPointArray; MinPixels: Integer; var Res : T2DPointArray);
Finds the possible gaps in the TPointArray TPA and the result is returned in the T2DPointArray Res. Considers as a gap if the gap length is >= MinPixels
RemoveDistTPointArrayWrap
-------------------------
@ -531,6 +650,8 @@ RemoveDistTPointArrayWrap
procedure RemoveDistTPointArrayWrap(x, y, dist: Integer;const ThePoints: TPointArray; RemoveHigher: Boolean; var Res : TPointArray);
Finds the possible gaps in the TPointArray TPA and removes the gaps. Considers as a gap if the gap length is >= MinPixels and returns the result in the TPointArray Res
CombineTPAWrap
--------------
@ -539,6 +660,8 @@ CombineTPAWrap
procedure CombineTPAWrap(const Ar1, Ar2: TPointArray; var Res : TPointArray);
Attaches the TPointArray Ar2 onto the end of Ar1 and returns the result in the TPointArray Res
ReArrangeandShortenArrayExWrap
------------------------------
@ -547,6 +670,8 @@ ReArrangeandShortenArrayExWrap
procedure ReArrangeandShortenArrayExWrap(const a: TPointArray; w, h: Integer; var Res : TPointArray);
Results the TPointArray a with one point per box with side lengths W and H left and puts the result in Res
ReArrangeandShortenArrayWrap
----------------------------
@ -555,6 +680,8 @@ ReArrangeandShortenArrayWrap
procedure ReArrangeandShortenArrayWrap(const a: TPointArray; Dist: Integer; var Res : TPointArray);
Results the TPointArray a with one point per box with side length Dist left and puts the result in Res
TPAtoATPAExWrap
---------------
@ -563,6 +690,8 @@ TPAtoATPAExWrap
procedure TPAtoATPAExWrap(const TPA: TPointArray; w, h: Integer; var Res : T2DPointArray);
Splits the TPA to boxes with sidelengths W and H and results them as a T2DPointArray in Res
TPAtoATPAWrap
-------------
@ -571,6 +700,8 @@ TPAtoATPAWrap
procedure TPAtoATPAWrap(const TPA: TPointArray; Dist: Integer; var Res : T2DPointArray);
Splits the TPA to boxes with sidelength Dist and results them as a T2DPointArray in Res
CombineIntArrayWrap
-------------------
@ -579,6 +710,8 @@ CombineIntArrayWrap
procedure CombineIntArrayWrap(const Ar1, Ar2: TIntegerArray; var Res : TIntegerArray);
Attaches the TIntegerArray Ar2 onto the end of Ar1 and returns it in the TIntegerArray Res
ReturnPointsNotInTPAWrap
------------------------
@ -587,6 +720,8 @@ ReturnPointsNotInTPAWrap
procedure ReturnPointsNotInTPAWrap(Const TotalTPA: TPointArray; const Box: TBox; var Res : TPointArray);
All the points from the TPointArray TotalTPA that are not in the TBox Box are returned in the TPointArray Res
MergeATPAWrap
-------------
@ -595,6 +730,8 @@ MergeATPAWrap
procedure MergeATPAWrap(const ATPA : T2DPointArray; var Res: TPointArray);
Combines all the TPointArrays from the T2DPointArray ATPA into the TPointArray Res
TPAFromBoxWrap
--------------
@ -603,6 +740,8 @@ TPAFromBoxWrap
procedure TPAFromBoxWrap(const Box : TBox; var Res : TPointArray);
Create a TPointArray from the top left and the bottom right of the TBox Box and returns the result in Res
RotatePointsWrap
----------------
@ -611,6 +750,8 @@ RotatePointsWrap
procedure RotatePointsWrap(Const P: TPointArray; A, cx, cy: Extended; var Res : TPointArray);
Rotates the TPointArray P around the center cx, cy with the angle a and returns the result in Res
FindTPAEdgesWrap
----------------
@ -619,6 +760,8 @@ FindTPAEdgesWrap
procedure FindTPAEdgesWrap(const p: TPointArray; var Res : TPointArray);
Returns a TPointArray of the edge points of the TPointArray p and returns the result in the TPointArray Res
ClearTPAFromTPAWrap
-------------------
@ -627,6 +770,8 @@ ClearTPAFromTPAWrap
procedure ClearTPAFromTPAWrap(const arP, ClearPoints: TPointArray; var Res : TPointArray);
Removes the points in TPointArray ClearPoints from arP and returns the results in Res
SameTPA
-------
@ -635,6 +780,8 @@ SameTPA
function SameTPA(const aTPA, bTPA: TPointArray): Boolean;
Returns true if the TPointArray aTPA is the same as bTPA
TPAInATPA
---------
@ -643,6 +790,8 @@ TPAInATPA
function TPAInATPA(const TPA: TPointArray;const InATPA: T2DPointArray; var Index: LongInt): Boolean;
Returns true if the TPointArray TPA is found in the T2DPointArray InATPA and stores the index in Index
OffsetTPA
---------
@ -651,6 +800,8 @@ OffsetTPA
procedure OffsetTPA(var TPA : TPointArray; const Offset : TPoint);
Offsets all the TPAs int the TPointArray TPA but the TPoint Offset
OffsetATPA
----------
@ -659,6 +810,8 @@ OffsetATPA
procedure OffsetATPA(var ATPA : T2DPointArray; const Offset : TPoint);
Offsets all the TPAs int the T2DPointArray ATPA but the TPoint Offset
CopyTPA
-------
@ -667,6 +820,8 @@ CopyTPA
function CopyTPA(const TPA : TPointArray) : TPointArray;
Returns the TPointArray TPA
CopyATPA
--------
@ -675,4 +830,5 @@ CopyATPA
function CopyATPA(const ATPA : T2DPointArray) : T2DPointArray;
Returns the T2DPointArray ATPA

View File

@ -142,6 +142,8 @@ GetRawHeaders returns a string of headers from the specified client.
Socket Functions
----------------
Simba's Socket Functions. Examples required; if you have one, please let u know.
CreateSocket
~~~~~~~~~~~~
@ -190,7 +192,6 @@ ListenSocket
ListenSocket allows for a client socket to accept connections.
AcceptSocket
~~~~~~~~~~~~
@ -249,15 +250,15 @@ SendSocket
SendSocket sends a string of data to a bound client socket.
SetTimeout
SetSocketTimeout
~~~~~~~~~~
.. code-block:: pascal
procedure SetTimeout(Client, Time: integer);
procedure SetSocketTimeout(Client, Time: integer);
SetTimeout sets a maximum amount of time for a bound client socket to wait for
data from another socket.
data from another socket. Time is in *milliseconds*.
SocketInfo
~~~~~~~~~~

View File

@ -44,7 +44,7 @@ Source: "C:\Simba\Extensions\paster.sex"; DestDir: "{app}\Extensions"; Flags: ig
Source: "C:\Simba\Extensions\CRov.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
Source: "C:\Simba\Extensions\Updater.sei"; DestDir: "{app}\Extensions"; Flags: ignoreversion
Source: "C:\Simba\Includes\mml.simba"; DestDir: "{app}\Includes"; Flags: ignoreversion
Source: "C:\Simba\settings.xml"; DestDir: "{app}\"; Flags: ignoreversion
; Source: "C:\Simba\settings.xml"; DestDir: "{app}\"; Flags: ignoreversion
; XXX Make sure to use a MINIMAL settings.xml XXX
; Source: "C:\Simba\Fonts\*"; DestDir: "{app}\Fonts"; Flags: ignoreversion recursesubdirs createallsubdirs

View File

@ -0,0 +1,154 @@
<?xml version="1.0"?>
<CONFIG>
<ProjectOptions>
<Version Value="9"/>
<General>
<Flags>
<MainUnitHasCreateFormStatements Value="False"/>
</Flags>
<MainUnit Value="0"/>
<ResourceType Value="res"/>
<UseXPManifest Value="True"/>
<Icon Value="0"/>
<ActiveWindowIndexAtStart Value="0"/>
</General>
<i18n>
<EnableI18N LFM="False"/>
</i18n>
<VersionInfo>
<StringTable ProductVersion=""/>
</VersionInfo>
<BuildModes Count="1" Active="Default">
<Item1 Name="Default" Default="True"/>
</BuildModes>
<PublishOptions>
<Version Value="2"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
</PublishOptions>
<RunParams>
<local>
<FormatVersion Value="1"/>
<LaunchingApplication PathPlusParams="/usr/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/>
</local>
</RunParams>
<RequiredPackages Count="1">
<Item1>
<PackageName Value="FCL"/>
</Item1>
</RequiredPackages>
<Units Count="5">
<Unit0>
<Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/>
<UnitName Value="project1"/>
<IsVisibleTab Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
<TopLine Value="52"/>
<CursorPos X="3" Y="87"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
<Filename Value="../../Units/MMLAddon/plugins.pas"/>
<UnitName Value="plugins"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
<TopLine Value="6"/>
<CursorPos X="26" Y="37"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit1>
<Unit2>
<Filename Value="../../../fpc/rtl/inc/dynlibs.pas"/>
<UnitName Value="dynlibs"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="10"/>
</Unit2>
<Unit3>
<Filename Value="../../Units/Linux/keybinder.pas"/>
<UnitName Value="keybinder"/>
<EditorIndex Value="2"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="61" Y="24"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit3>
<Unit4>
<Filename Value="../../Units/Linux/xinput.pas"/>
<UnitName Value="xinput"/>
<EditorIndex Value="3"/>
<WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="1" Y="1"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit4>
</Units>
<JumpHistory Count="6" HistoryIndex="5">
<Position1>
<Filename Value="../../Units/MMLAddon/plugins.pas"/>
<Caret Line="37" Column="26" TopLine="27"/>
</Position1>
<Position2>
<Filename Value="project1.lpr"/>
<Caret Line="69" Column="17" TopLine="40"/>
</Position2>
<Position3>
<Filename Value="project1.lpr"/>
<Caret Line="16" Column="93" TopLine="1"/>
</Position3>
<Position4>
<Filename Value="project1.lpr"/>
<Caret Line="11" Column="10" TopLine="1"/>
</Position4>
<Position5>
<Filename Value="../../Units/MMLAddon/plugins.pas"/>
<Caret Line="37" Column="26" TopLine="6"/>
</Position5>
<Position6>
<Filename Value="project1.lpr"/>
<Caret Line="53" Column="3" TopLine="25"/>
</Position6>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
<Version Value="10"/>
<Target>
<Filename Value="project1"/>
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="../../Units/MMLCore"/>
<UnitOutputDirectory Value="lib/$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Linking>
<Options>
<PassLinkerOptions Value="True"/>
</Options>
</Linking>
<Other>
<CompilerMessages>
<UseMsgFile Value="True"/>
</CompilerMessages>
<CompilerPath Value="$(CompPath)"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Item1>
<Name Value="EAbort"/>
</Item1>
<Item2>
<Name Value="ECodetoolError"/>
</Item2>
<Item3>
<Name Value="EFOpenError"/>
</Item3>
</Exceptions>
</Debugging>
</CONFIG>

View File

@ -0,0 +1,95 @@
program project1;
{$mode objfpc}{$H+}
uses
{$IFDEF UNIX}{$IFDEF UseCThreads}
cthreads,
{$ENDIF}{$ENDIF}
Classes, SysUtils, CustApp,
{ you can add units after this }
dynlibs;
const libSmart = 'smart';
procedure std_setup (ServerURL, SecondParam: PChar; sizeX, sizeY: Integer; SomeStr: PChar); cdecl; external libSmart;
type
{ TMyApplication }
TMyApplication = class(TCustomApplication)
protected
procedure DoRun; override;
public
constructor Create(TheOwner: TComponent); override;
destructor Destroy; override;
procedure WriteHelp; virtual;
end;
procedure LoadSmart;
begin
std_setup('http://world19.runescape.com/', 'plugin.js?param=o0,a1,m0', 765, 503, 's');
end;
{ TMyApplication }
procedure TMyApplication.DoRun;
var
ErrorMsg: String;
begin
// quick check parameters
ErrorMsg:=CheckOptions('h','help');
if ErrorMsg<>'' then begin
ShowException(Exception.Create(ErrorMsg));
Terminate;
Exit;
end;
// parse parameters
if HasOption('h','help') then begin
WriteHelp;
Terminate;
Exit;
end;
LoadSmart;
sleep(100000);
{ add your program here }
// stop program loop
Terminate;
end;
constructor TMyApplication.Create(TheOwner: TComponent);
begin
inherited Create(TheOwner);
StopOnException:=True;
end;
destructor TMyApplication.Destroy;
begin
inherited Destroy;
end;
procedure TMyApplication.WriteHelp;
begin
{ add your help code here }
writeln('Usage: ',ExeName,' -h');
end;
var
Application: TMyApplication;
//{$R *.res}
begin
Application:=TMyApplication.Create(nil);
Application.Run;
Application.Free;
end.

View File

@ -62,7 +62,7 @@ uses
settings, updater;
const
SimbaVersion = 971;
SimbaVersion = 972;
interp_PS = 0; //PascalScript
interp_RT = 1; //RUTIS

43
TODO
View File

@ -3,34 +3,23 @@ Simple stuff, not required, may not be possible/useful:
- Coloured writeln [ ]
- Make an TAction for the Colour Picker. [ ]
- Portable install (needs fiddling with settings and such) [ ]
- Settings rewrite [ ]
- --no-extensions flag for Simba. [ ]
- CTS/finder speedups and changes [ ]
- Table displaying all the different performance gains and
penalties. [ ]
- General ideas:
- everything subprocedure (lots of code)
- jit + comparison function (per cts) generated, call in loop
- comparison function (per cts), not generated, call in loop
- Investigate SIMD probable speedups [ ]
- JIT (Generate comparison functions) [ ]
- CTS/finder speedups and changes [X]
- Comparison functions for HSL/XYZ/L*a*b should check for
match on each component before calculating the next.
(see FindColorsToleranceOptimised)
- Pass color information in struct [ ]
- Pass color information in struct [X]
- Precalculate screen bitmap in current cts / keep a cache
to save comparisons [ ]
- Add CTS 3 [ ]
- Add a direct RGB -> CIE L*a*b conversion [ ]
- Make sure colour conversions are inline [ ]
to save comparisons [X]
- Add CTS 3 [/]
- Add a direct RGB -> CIE L*a*b conversion [/]
- More documentation:
- Cover all functions by at least mentioning the definition [ ]
- Cover all functions by at least mentioning the definition [/]
- Imported functions as well?
- Write tutorial [ ]
- In depth documentation per function [ ]
@ -39,17 +28,17 @@ Simple stuff, not required, may not be possible/useful:
- Lape! [ ]
- Integrate script manager [ ]
- Basic support. (Install scripts) [ ]
- Update functionality [ ]
- Uninstall scripts [ ]
- Better storage / more stable storage [ ]
- Pretty GUI [ ]
- Merging / storing usernames when updating [ ]
- Basic support. (Install scripts) [X]
- Update functionality [X]
- Uninstall scripts [X]
- Better storage / more stable storage [?]
- Pretty GUI [/]
- Merging / storing usernames when updating [?]
- Make Simba more ``modular'':
- Fonts [ ]
- Interpreters [ ]
- Interpreters [/]
- Code completion/hints [ ]
- Extensions [ ]
- Extensions [X]
- Interpreter system overhaul? [ ]

View File

@ -172,12 +172,12 @@ begin;
result := (((x >= Box.x1) and(x <= Box.x2)) and ((y >= box.y1) and (y <= box.y2)));
end;
function ps_PointToBox(PT1,PT2 : TPoint) : TBox; extdecl;
function ps_PointToBox(topLeft,bottomRight: TPoint): TBox; extdecl;
begin;
result.x1 := PT1.x;
result.y1 := PT1.y;
result.x2 := PT2.x;
result.y2 := PT2.y;
result.x1 := topLeft.x;
result.y1 := topLeft.y;
result.x2 := bottomRight.x;
result.y2 := bottomRight.y;
end;
function ps_PointInBox(PT : TPoint; Box: TBox): Boolean; extdecl;

View File

@ -69,7 +69,7 @@ AddFunction(@ps_iAbs,'function iAbs(a : integer) : integer;');
AddFunction(@ps_ArcTan2,'function ArcTan2(y,x : extended) : extended;');
AddFunction(@ps_IntToBox,'function IntToBox(xs,ys,xe,ye : integer) : TBox;');
AddFunction(@ps_IntInBox,'function IntInBox(x, y: Integer; Box: TBox): Boolean;');
AddFunction(@ps_PointToBox,'function PointToBox(PT1,PT2 : TPoint): TBox;');
AddFunction(@ps_PointToBox,'function PointToBox(topLeft,bottomRight: TPoint): TBox;');
AddFunction(@ps_PointInBox,'function PointInBox(PT : TPoint; Box: TBox): Boolean;');
AddFunction(@ps_sqr,'function Sqr(e : extended) : extended;');
AddFunction(@ps_point,'function Point(x,y:integer) : TPoint;');

View File

@ -311,7 +311,7 @@ begin T := Self.TabIndex; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlNoteBookStringsNoteBook_R(Self: TTabControlNoteBookStrings; var T: TNoteBook);
begin T := TNoteBook(Self.NoteBook); end;
begin T := Self.NoteBook; end;
(*----------------------------------------------------------------------------*)
procedure TTabControlStringsTabWidth_W(Self: TTabControlStrings; const T: Smallint);

View File

@ -85,14 +85,14 @@ procedure RIRegisterTPANEL(Cl: TPSRuntimeClassImporter);
begin
Cl.Add(TPANEL);
end;
procedure TPagePageIndex_R(Self: TCustomPage; var T: INTEGER); begin T := Self.PageIndex; end;
procedure TPagePageIndex_W(Self: TCustomPage; T: INTEGER); begin Self.PageIndex := T; end;
procedure TPageOnShow_R(Self: TCustomPage; var T: TNotifyEvent); begin T := Self.OnShow; end;
procedure TPageOnShow_W(Self: TCustomPage; T: TNotifyEvent); begin Self.OnShow := T; end;
procedure TPagePageIndex_R(Self: TPAGE; var T: INTEGER); begin T := Self.PageIndex; end;
procedure TPagePageIndex_W(Self: TPAGE; T: INTEGER); begin Self.PageIndex := T; end;
procedure TPageOnShow_R(Self: TPAGE; var T: TNotifyEvent); begin T := Self.OnShow; end;
procedure TPageOnShow_W(Self: TPAGE; T: TNotifyEvent); begin Self.OnShow := T; end;
{$IFNDEF CLX}
procedure RIRegisterTPAGE(Cl: TPSRuntimeClassImporter);
begin
with Cl.Add(TCustomPage) do
with Cl.Add(TPAGE) do
begin
RegisterPropertyHelper(@TPagePageIndex_R,@TPagePageIndex_W,'PageIndex');
RegisterEventPropertyHelper(@TPageOnShow_R,@TPageOnShow_W,'OnShow');
@ -106,7 +106,7 @@ begin
with Cl.Add(TNOTEBOOK) do
begin
{$IFDEF FPC}
// RegisterMethod(@TNoteBook.TabIndexAtClientPos,'TABINDEXATCLIENTPOS');
RegisterMethod(@TNoteBook.TabIndexAtClientPos,'TABINDEXATCLIENTPOS');
{$ENDIF}
RegisterPropertyHelper(@TNoteBookPageCount_R,nil,'PAGECOUNT');
end;