mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 09:12:19 -05:00
Merge branch 'master' of ssh://villavu.com:54367/simba
This commit is contained in:
commit
a6da52fbb3
@ -5,7 +5,7 @@
|
|||||||
; NOTE: The value of AppId uniquely identifies this application.
|
; NOTE: The value of AppId uniquely identifies this application.
|
||||||
; Do not use the same AppId value in installers for other applications.
|
; Do not use the same AppId value in installers for other applications.
|
||||||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
|
||||||
AppId={{1DBDC946-E964-430C-9BD6-2AE5E426E5AC}
|
AppId={{524C9B9A-B57F-4FEC-89BE-292202EBA44D}
|
||||||
AppName=Simba
|
AppName=Simba
|
||||||
AppVerName=Simba 1.0 Beta
|
AppVerName=Simba 1.0 Beta
|
||||||
AppPublisherURL=http://simba.villavu.com/
|
AppPublisherURL=http://simba.villavu.com/
|
||||||
@ -13,7 +13,7 @@ AppSupportURL=http://simba.villavu.com/
|
|||||||
AppUpdatesURL=http://simba.villavu.com/
|
AppUpdatesURL=http://simba.villavu.com/
|
||||||
DefaultDirName={pf}\Simba
|
DefaultDirName={pf}\Simba
|
||||||
DefaultGroupName=Simba
|
DefaultGroupName=Simba
|
||||||
OutputDir=C:\Remake\Install\win32
|
OutputDir=C:\Remake\Install\windows\
|
||||||
OutputBaseFilename=setup
|
OutputBaseFilename=setup
|
||||||
Compression=lzma
|
Compression=lzma
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
@ -30,11 +30,13 @@ Name: "{app}\Extensions"
|
|||||||
Name: "{app}\Includes"
|
Name: "{app}\Includes"
|
||||||
Name: "{app}\Plugins"
|
Name: "{app}\Plugins"
|
||||||
Name: "{app}\Scripts"
|
Name: "{app}\Scripts"
|
||||||
|
Name: "{app}\Scripts\Tests"
|
||||||
|
|
||||||
[Files]
|
[Files]
|
||||||
Source: "C:\Remake\Simba.exe"; DestDir: "{app}"; Flags: ignoreversion
|
Source: "C:\Remake\Simba.exe"; DestDir: "{app}"; Flags: ignoreversion
|
||||||
Source: "C:\Remake\Fonts\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
Source: "C:\Remake\Extensions\srl.sex"; DestDir: "{app}\Extensions"; Flags: ignoreversion
|
||||||
Source: "C:\Remake\Tests\PS\*"; DestDir:"{app}\Scripts\Tests\"; Flags: ignoreversion
|
Source: "C:\Remake\Fonts\*"; DestDir: "{app}\Fonts"; Flags: ignoreversion recursesubdirs createallsubdirs
|
||||||
|
Source: "C:\Remake\Tests\PS\*"; DestDir:"{app}\Scripts\Tests"; Flags: ignoreversion
|
||||||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
[Icons]
|
[Icons]
|
@ -46,7 +46,7 @@ uses
|
|||||||
CastaliaSimplePasPar, v_AutoCompleteForm, PSDump;
|
CastaliaSimplePasPar, v_AutoCompleteForm, PSDump;
|
||||||
|
|
||||||
const
|
const
|
||||||
SimbaVersion = 630;
|
SimbaVersion = 632;
|
||||||
|
|
||||||
type
|
type
|
||||||
|
|
||||||
@ -2045,7 +2045,7 @@ begin
|
|||||||
|
|
||||||
Self.OnScriptStart:= @ScriptStartEvent;
|
Self.OnScriptStart:= @ScriptStartEvent;
|
||||||
|
|
||||||
FillThread := TProcThread.Create(true);
|
FillThread := TProcThread.Create;
|
||||||
FillThread.FreeOnTerminate:= True;
|
FillThread.FreeOnTerminate:= True;
|
||||||
FillThread.NormalProc:= @CCFillCore;
|
FillThread.NormalProc:= @CCFillCore;
|
||||||
UpdateTimer.OnTimer:= @UpdateTimerCheck;
|
UpdateTimer.OnTimer:= @UpdateTimerCheck;
|
||||||
@ -2359,15 +2359,14 @@ function TForm1.GetSimbaNews: String;
|
|||||||
var
|
var
|
||||||
t: TDownloadThread;
|
t: TDownloadThread;
|
||||||
begin
|
begin
|
||||||
t := TDownloadThread.Create(true);
|
t := TDownloadThread.Create(LoadSettingDef('Settings/News/URL', 'http://simba.villavu.com/bin/news'),
|
||||||
t.InputURL:=LoadSettingDef('Settings/News/URL', 'http://simba.villavu.com/bin/news');
|
@Result);
|
||||||
t.Resume;
|
t.Resume;
|
||||||
while not t.done do
|
while not t.done do
|
||||||
begin
|
begin
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
Sleep(50);
|
Sleep(50);
|
||||||
end;
|
end;
|
||||||
Exit(t.ResultStr);
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TForm1.SetExtPath(const AValue: string);
|
procedure TForm1.SetExtPath(const AValue: string);
|
||||||
@ -2634,6 +2633,7 @@ var
|
|||||||
FontDownload : TDownloadThread;
|
FontDownload : TDownloadThread;
|
||||||
Stream : TStringStream;
|
Stream : TStringStream;
|
||||||
UnTarrer : TUntarThread;
|
UnTarrer : TUntarThread;
|
||||||
|
Fonts : string;
|
||||||
Decompress : TDecompressThread;
|
Decompress : TDecompressThread;
|
||||||
begin
|
begin
|
||||||
if UpdatingFonts then
|
if UpdatingFonts then
|
||||||
@ -2644,12 +2644,13 @@ begin
|
|||||||
if LatestVersion > CurrVersion then
|
if LatestVersion > CurrVersion then
|
||||||
begin;
|
begin;
|
||||||
formWriteln(format('New fonts available. Current version: %d. Latest version: %d',[CurrVersion,LatestVersion]));
|
formWriteln(format('New fonts available. Current version: %d. Latest version: %d',[CurrVersion,LatestVersion]));
|
||||||
FontDownload := TDownloadThread.Create(True);
|
FontDownload := TDownloadThread.Create(LoadSettingDef('Settings/Fonts/UpdateLink',FontURL + 'Fonts.tar.bz2'),
|
||||||
FontDownload.InputURL:= LoadSettingDef('Settings/Fonts/UpdateLink',FontURL + 'Fonts.tar.bz2');
|
@Fonts);
|
||||||
FontDownload.resume;
|
FontDownload.resume;
|
||||||
while FontDownload.Done = false do
|
while FontDownload.Done = false do
|
||||||
Idler;
|
Idler;
|
||||||
Stream := TStringStream.Create(FontDownload.ResultStr);
|
//Fontdownload is freed now
|
||||||
|
Stream := TStringStream.Create(Fonts);
|
||||||
try
|
try
|
||||||
Decompress := TDecompressThread.Create(Stream);
|
Decompress := TDecompressThread.Create(Stream);
|
||||||
Decompress.Resume;
|
Decompress.Resume;
|
||||||
@ -2676,7 +2677,6 @@ begin
|
|||||||
Decompress.free;
|
Decompress.free;
|
||||||
finally
|
finally
|
||||||
Stream.Free;
|
Stream.Free;
|
||||||
FontDownload.Free;
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
UpdatingFonts := False;
|
UpdatingFonts := False;
|
||||||
|
@ -15,10 +15,12 @@ type
|
|||||||
{ TDownloadThread }
|
{ TDownloadThread }
|
||||||
|
|
||||||
TDownloadThread = class(TThread)
|
TDownloadThread = class(TThread)
|
||||||
public
|
private
|
||||||
ResultStr : string;
|
|
||||||
InputURL : string;
|
InputURL : string;
|
||||||
|
ResultStr : PString;
|
||||||
|
public
|
||||||
Done : boolean;
|
Done : boolean;
|
||||||
|
constructor Create(const URL : string; const Output : PString);
|
||||||
procedure Execute; override;
|
procedure Execute; override;
|
||||||
end;
|
end;
|
||||||
TSimbaUpdateForm = class(TForm)
|
TSimbaUpdateForm = class(TForm)
|
||||||
@ -90,20 +92,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TSimbaUpdateForm.GetLatestFontVersion: integer;
|
function TSimbaUpdateForm.GetLatestFontVersion: integer;
|
||||||
|
var
|
||||||
|
Vers : string;
|
||||||
begin
|
begin
|
||||||
if FontVersionThread = nil then//Create thread (only if no-other one is already running)
|
if FontVersionThread = nil then//Create thread (only if no-other one is already running)
|
||||||
begin
|
begin
|
||||||
FontVersionThread := TDownloadThread.Create(true);
|
FontVersionThread := TDownloadThread.Create(SettingsForm.Settings.GetKeyValueDefLoad(
|
||||||
FontVersionThread.InputURL := SettingsForm.Settings.GetKeyValueDefLoad(
|
'Settings/Fonts/VersionLink',FontURL + 'Version',SimbaSettingsFile),
|
||||||
'Settings/Fonts/VersionLink',FontURL + 'Version',SimbaSettingsFile);
|
@Vers);
|
||||||
FontVersionThread.Resume;
|
FontVersionThread.Resume;
|
||||||
while FontVersionThread.Done = false do//Wait till thread is done
|
while FontVersionThread.Done = false do//Wait till thread is done
|
||||||
begin
|
begin
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
Sleep(25);
|
Sleep(25);
|
||||||
end;
|
end;
|
||||||
FFontVersion := StrToIntDef(Trim(FontVersionThread.ResultStr), -1);//Read output
|
FFontVersion := StrToIntDef(Trim(Vers), -1);//Read output
|
||||||
FreeAndNil(FontVersionThread);//Free the thread
|
FontVersionThread := nil; //It's already freed
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
//Another thread is already running, lets wait for it! (When it's nil, it means that the result is written!)
|
//Another thread is already running, lets wait for it! (When it's nil, it means that the result is written!)
|
||||||
@ -118,21 +122,22 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
function TSimbaUpdateForm.GetLatestSimbaVersion: Integer;
|
function TSimbaUpdateForm.GetLatestSimbaVersion: Integer;
|
||||||
|
var
|
||||||
|
Vers : string;
|
||||||
begin
|
begin
|
||||||
if SimbaVersionThread = nil then//Create thread (only if no-other one is already running)
|
if SimbaVersionThread = nil then//Create thread (only if no-other one is already running)
|
||||||
begin
|
begin
|
||||||
SimbaVersionThread := TDownloadThread.Create(true);
|
SimbaVersionThread := TDownloadThread.Create(SettingsForm.Settings.GetKeyValueDefLoad(
|
||||||
|
'Settings/Updater/RemoteVersionLink',SimbaURL + 'Version'
|
||||||
SimbaVersionThread.InputURL := SettingsForm.Settings.GetKeyValueDefLoad(
|
,SimbaSettingsFile),@Vers);
|
||||||
'Settings/Updater/RemoteVersionLink',SimbaURL + 'Version',SimbaSettingsFile);
|
|
||||||
SimbaVersionThread.Resume;
|
SimbaVersionThread.Resume;
|
||||||
while SimbaVersionThread.Done = false do//Wait till thread is done
|
while SimbaVersionThread.Done = false do//Wait till thread is done
|
||||||
begin
|
begin
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
Sleep(25);
|
Sleep(25);
|
||||||
end;
|
end;
|
||||||
FSimbaVersion := StrToIntDef(Trim(SimbaVersionThread.ResultStr), -1);//Read output
|
FSimbaVersion := StrToIntDef(Trim(Vers), -1);//Read output
|
||||||
FreeAndNil(SimbaVersionThread);//Free the thread
|
SimbaVersionThread := nil;//It's automatically freed
|
||||||
end else
|
end else
|
||||||
begin
|
begin
|
||||||
//Another thread is already running, lets wait for it! (When it's nil, it means that the result is written!)
|
//Another thread is already running, lets wait for it! (When it's nil, it means that the result is written!)
|
||||||
@ -263,11 +268,19 @@ begin
|
|||||||
FUpdating:= false;
|
FUpdating:= false;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
constructor TDownloadThread.Create(const url : String; const Output : PString);
|
||||||
|
begin
|
||||||
|
inherited Create(true);
|
||||||
|
FreeOnTerminate:= True;
|
||||||
|
InputURL:= url;
|
||||||
|
ResultStr:= Output;
|
||||||
|
end;
|
||||||
|
|
||||||
{ TDownloadThread }
|
{ TDownloadThread }
|
||||||
|
|
||||||
procedure TDownloadThread.Execute;
|
procedure TDownloadThread.Execute;
|
||||||
begin
|
begin
|
||||||
ResultStr:= GetPage(InputURL);
|
ResultStr^:= GetPage(InputURL);
|
||||||
done := true;
|
done := true;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -1,76 +1,33 @@
|
|||||||
program new;
|
program new;
|
||||||
//http://www.hawaiisunshine.org/wp-content/uploads/2008/12/sunshine1.jpg
|
//http://farm4.static.flickr.com/3067/2612399892_7df428d482.jpg
|
||||||
|
{Make the above bitmap your target}
|
||||||
var
|
var
|
||||||
Bmp : integer;
|
Bmp : integer;
|
||||||
x,y : integer;
|
x,y : integer;
|
||||||
w,h : integer;
|
w,h : integer;
|
||||||
begin
|
begin
|
||||||
Bmp := BitmapFromString(37, 32, 'beNqFl3lwVuUVxp93veu3f1' +
|
Bmp := BitmapFromString(19, 14, 'beNoBHgPh/KNEgOv1WOH6' +
|
||||||
'lI+EKCLCkIAuI6oIBl0ylWweJerSm2atAaUJYgZCMLBAKyTSAh+w4' +
|
'q9fq/fnf+P7z/P//tO/0ZMS7ZsOPdMmHY8GGXMWBXMV8cMmGddCYf' +
|
||||||
'ERKnUpWoXERSBjtailDVACLS17Tj+13NvpB3tTHvnzOTOzb3vL+c5' +
|
'ta2fNe+a9LPcc/WmOf1b+Trfdryz+nZ//zj//368///pOHbZMiqYs' +
|
||||||
'azIGaIDMYMwQ3BBSkSkD4J4xCa4gNKQBZTClTS5tMBNQgAAY6C3mG' +
|
'GCXr9zYsJ3b8N5YMZ5cbyJb8eKVcyKXMmjUsmuvvP6euPweOD1mNr' +
|
||||||
'cN/zP/Wf0o3373oK0mfM8/E1UMMAa0YmZKQ4pvz6DUHzAJM3wwmpH' +
|
'd4u3a/v/u/v786fz3ld3aXsalacR8Z8B3XMF5ZcVprdRyrt6MbtGW' +
|
||||||
'/6t1j/D3f1He/Xyj/HFQgzhIEQEAHiQDIwAEjzbrjrQX2c7yNJwDn' +
|
'VsWWTr6Q2/z0ieHzetjqfODoodzZ7PXT/f/q+v/+0PnyddHNUL6YW' +
|
||||||
'/5vh+Tb5l/3Vx77mhdFDLEEMMSPdtMDAGmMAwXWOWxWfb4s6APT4a' +
|
'8V5cr1xx9Jq//Z8//7AqefNVM6sQLqL5PPZx+/litPUdd7hfNbhwN' +
|
||||||
'S5iBCDgRLT8KnjhcEJEJIgvP/ieOccPgZpDrsO/FIGAUcI8TeMwJP' +
|
'/V+f3Z//729P7/nufkPcS2aLuCzNNg/f1t/P7K////zvj3htXPRr2' +
|
||||||
'heOLI/FVkZj5YFAuWEscANTw8lDnEgcMgQeBDd9hQXjQggu6ack+z' +
|
'Xm86f2vPIwubLgtTJb93aidfT6O7D+f/h///9svT0U7vJtcR8//hP' +
|
||||||
'b0u5enHpAEZADXA3MDwSWZgwtSB5aG4+VmoBxGOfgqYC2wVNrjIaJ' +
|
'//63//7/y/z5vfD1wOLPhNKgOaxpc7uRyeK1s+vFaNHNbtXS0uHI/' +
|
||||||
'gQV/nKBdh7rnpMPKUecnGhCI044xdzZ9+5tV40ZXMPenIo/ujumRk' +
|
'/vK///8svD/hsbW+uiK//6v9f//z/j9suvzo9TWwOO2ud+qI6RZEK' +
|
||||||
'5oahA1cHCIEqsCqINZCV3Fpjhsp08CnDHe5RVAw86oeVLOoHN8W/T' +
|
'lUbrxdl9qUV8q3Ub+6tNCz/Pmx/P/1xPP839/V+P2o//rmwPv/puH' +
|
||||||
'+YywpWnMPfj2h/d/iTm3xBHAHcHUDT2mi3jrqmISgJVK2yXvFbqjd' +
|
'swtvVqti1ptiftd+ZJ6NUIKlZIaVLL6xgQ7J/Lq93bbqB5eiY+f/k' +
|
||||||
'ysYGah4S5xQ08b1t1CDZMi4COygKHANcBYYHbmwEUzpg33JUoSgiB' +
|
'xfX///fX//7X3fz/cd32wNvSs+O3sOScm9OeqtiJH6xIIKhWLKFRA' +
|
||||||
'aCWFKP+P75ca/U3j9iOH7pk2pHpRaAmwSaHJ0NbCRnkuxynFXhEN5' +
|
'KJJEqJHN6FNHKNAW75dfdeddc/Yrd+3tuzOaefqRbnWq9Cdhtijld' +
|
||||||
'SbHHosGpEsN9FzJtjBYYDcwCirPSm267pWbSLQuGDxrXn7rKO57O5' +
|
'WNmtWVoNF+MqxVJqlWJKJKG6I/UKs5hbtCWbNIQaVHYatXWq9yOq5' +
|
||||||
'dqyAuGrGeuB/CrjHZmZG6TYANQL3qpEE9g2YJvQa4ReBPYT4IfAFD' +
|
'8OqyGMaeZNKiMT7BuTrZ0aLpye8t0dspyM6xbL6dLLqBDJ6U8dKYy' +
|
||||||
'+sQ/34kl93Glg1etBrk8Z1j8hYb2MpkGfh8RCboL1kiynpWK6fuRa' +
|
'4upNx+J4yNt35OZ5yOh8W8eMRqNnQ6hWMqlTJaRXFaU5N6JBQrFIR' +
|
||||||
'D5lDcq2mvfMnaQnaj4g0AWSPQDNYIVSusddJ+ial5wA+AicANPnEa' +
|
'rdaKqlIL6ZNKqM8CKc5VZw04N8w//2m/vq5/v7M6vzghtfEhr+Ohc' +
|
||||||
'R/61SR3Tx+y+dXBnltGditfT+asJ/Up2rOumYQsTkZFAKqmtXC8Bj' +
|
'NgYbRYU7lKUKo3O6k9K6s3KqQ/KKRILp8/D6k7GKZBMZwwqL86/P2' +
|
||||||
'TiDzWFyD6p9KN8C1ADthuwyDWI1gDfB2OQJa20IRMqD4YWWkcNxP/' +
|
'S9f/j//zlzP73nNrfpMeprdp0hMlyqcxincxYY7tXOLFHDehUEnQ=' +
|
||||||
'AghfW6RNvYAV3XxbqGGjvT8Uoy9sWxN4LuKHYPjuy8YcSiRNpNnqr' +
|
'');
|
||||||
'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');
|
|
||||||
GetClientDimensions(w,h);
|
GetClientDimensions(w,h);
|
||||||
if FindBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,25) then
|
if FindBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,25) then
|
||||||
MoveMouse(x,y);
|
MoveMouse(x,y);
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
program new;
|
program new;
|
||||||
|
const
|
||||||
|
bmppath = 'C:\Carina_1_by_Eeitam.png';
|
||||||
var
|
var
|
||||||
p1, p2: TPointArray;
|
p1, p2: TPointArray;
|
||||||
w, h: integer;
|
w, h: integer;
|
||||||
@ -7,7 +9,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
SetColorToleranceSpeed(2);
|
SetColorToleranceSpeed(2);
|
||||||
bmp := LoadBitmap('/home/merlijn/Pictures/Mooi/Carina_1_by_Eeitam.png');
|
bmp := LoadBitmap(bmppath);
|
||||||
SetTargetBitmap(bmp);
|
SetTargetBitmap(bmp);
|
||||||
GetClientDimensions(W, H);
|
GetClientDimensions(W, H);
|
||||||
writeln(inttostr(w) + ' : ' + inttostr(h));
|
writeln(inttostr(w) + ' : ' + inttostr(h));
|
||||||
|
@ -19,7 +19,6 @@ program Hoi;
|
|||||||
}
|
}
|
||||||
|
|
||||||
Const
|
Const
|
||||||
TestPath = './test';
|
|
||||||
|
|
||||||
fsFromBeginning = 0; // offset must be pos or 0
|
fsFromBeginning = 0; // offset must be pos or 0
|
||||||
fsFromCurrent = 1; // offset pos or neg
|
fsFromCurrent = 1; // offset pos or neg
|
||||||
@ -27,10 +26,12 @@ Const
|
|||||||
|
|
||||||
var
|
var
|
||||||
s, s2: string;
|
s, s2: string;
|
||||||
|
testPath : string;
|
||||||
myFile, myFile2: Integer;
|
myFile, myFile2: Integer;
|
||||||
|
|
||||||
begin
|
begin
|
||||||
s := apppath;
|
testPath := scriptpath +'Test';
|
||||||
|
s := ScriptPath;
|
||||||
Writeln('Our current path is: ' + s);
|
Writeln('Our current path is: ' + s);
|
||||||
{ If DirectoryExists(s) Then
|
{ If DirectoryExists(s) Then
|
||||||
writeln('Directory ' + s + ' exists.'); }
|
writeln('Directory ' + s + ' exists.'); }
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
program new;
|
|
||||||
{.include test.mufa}
|
|
||||||
begin
|
|
||||||
Writeln(TestStr);
|
|
||||||
Writeln(inttostr(MultiPly(500,-20)));
|
|
||||||
end.
|
|
@ -1,5 +1,8 @@
|
|||||||
program new;
|
program new;
|
||||||
//http://nl.wikipedia.org/wiki/Lily_Allen
|
//http://nl.wikipedia.org/wiki/Lily_Allen
|
||||||
|
//This finds a mask of the text 'Op 24 september',
|
||||||
|
//so target wikipedia halfway down. Might not work because of
|
||||||
|
//different font's/sizes in your browser.
|
||||||
|
|
||||||
var
|
var
|
||||||
Bmp : integer;
|
Bmp : integer;
|
||||||
@ -14,7 +17,7 @@ begin
|
|||||||
'KvJQNKa5mEcyAhoauI6N8ymAlkxWpdtwgL2bhPXCJc7+E7JLNJsgG' +
|
'KvJQNKa5mEcyAhoauI6N8ymAlkxWpdtwgL2bhPXCJc7+E7JLNJsgG' +
|
||||||
'qQgL1jhHwX4VJdBsNZMbN5D//m/ob5XzwDp40wfg/jW9g024hbuPd' +
|
'qQgL1jhHwX4VJdBsNZMbN5D//m/ob5XzwDp40wfg/jW9g024hbuPd' +
|
||||||
'ritabVqaAj7zYVyxg9fol4M8FFG7YAfIG00k=');
|
'ritabVqaAj7zYVyxg9fol4M8FFG7YAfIG00k=');
|
||||||
Mask := CreateBitmapMask(Bmp);
|
Mask := CreateMaskFromBitmap(Bmp);
|
||||||
GetClientDimensions(w,h);
|
GetClientDimensions(w,h);
|
||||||
// if FindBitmapMaskTolerance(Bmp,x,y,0, 0,w-1, h-1,1,5) then
|
// if FindBitmapMaskTolerance(Bmp,x,y,0, 0,w-1, h-1,1,5) then
|
||||||
if FindMaskTolerance(Mask,x,y,0, 0,w-1, h-1,1,5) then
|
if FindMaskTolerance(Mask,x,y,0, 0,w-1, h-1,1,5) then
|
||||||
|
@ -2,4 +2,7 @@ program new;
|
|||||||
begin
|
begin
|
||||||
Writeln(AppPath);
|
Writeln(AppPath);
|
||||||
Writeln(ScriptPath);
|
Writeln(ScriptPath);
|
||||||
|
Writeln(IncludePath);
|
||||||
|
Writeln(FontPath);
|
||||||
|
writeln(PluginPath);
|
||||||
end.
|
end.
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
program new;
|
program new;
|
||||||
const
|
const
|
||||||
SaveDir = 'C:\';
|
SaveDir = ScriptPath;
|
||||||
var
|
var
|
||||||
Bmpz : integer;
|
Bmpz : integer;
|
||||||
Bmp2 : integer;
|
Bmp2 : integer;
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
program new;
|
program new;
|
||||||
|
const
|
||||||
|
savepath = scriptpath;
|
||||||
var
|
var
|
||||||
Bmpz : integer;
|
Bmpz : integer;
|
||||||
w,h : integer;
|
w,h : integer;
|
||||||
@ -134,9 +136,9 @@ begin
|
|||||||
GetBitmapSize(bmpz,w,h);
|
GetBitmapSize(bmpz,w,h);
|
||||||
Writeln(inttostr(w) + '-' + inttostr(h));
|
Writeln(inttostr(w) + '-' + inttostr(h));
|
||||||
SetBitmapSize(Bmpz,w div 2, h div 2);
|
SetBitmapSize(Bmpz,w div 2, h div 2);
|
||||||
SaveBitmap(Bmpz,'/tmp/test.bmp');
|
SaveBitmap(Bmpz,savepath + 'test.bmp');
|
||||||
//FreeBitmap(Bmpz);
|
//FreeBitmap(Bmpz);
|
||||||
Bmpz := LoadBitmap('/tmp/test.bmp');
|
Bmpz := LoadBitmap(savepath + 'test.bmp');
|
||||||
SetBitmapSize(bmpz,w,h);
|
SetBitmapSize(bmpz,w,h);
|
||||||
SaveBitmap(Bmpz,'/tmp/test2.bmp');
|
SaveBitmap(Bmpz,savepath + 'test2.bmp');
|
||||||
end.
|
end.
|
||||||
|
@ -5,6 +5,6 @@ begin
|
|||||||
t:=getsystemtime;
|
t:=getsystemtime;
|
||||||
for i := 0 to 100 do
|
for i := 0 to 100 do
|
||||||
rs_getuptext;
|
rs_getuptext;
|
||||||
writeln(inttostr(round(getsystemtime - t) / 100));
|
writeln(floattostr(round(getsystemtime - t) / 100.0));
|
||||||
writeln(rs_getuptext);
|
writeln(rs_getuptext);
|
||||||
end.
|
end.
|
||||||
|
@ -22,23 +22,10 @@ begin
|
|||||||
if (FindColorsTolerance(cArr, TextCol, MCX1, P.y, MCX2, P.y + 13, 0)) then
|
if (FindColorsTolerance(cArr, TextCol, MCX1, P.y, MCX2, P.y + 13, 0)) then
|
||||||
begin
|
begin
|
||||||
B := GetTPABounds(cArr);
|
B := GetTPABounds(cArr);
|
||||||
// Result := GetTextAt(B.x1 - 1, B.y1 - 1, 1, 3, 0, 0, 0, 100, 'SmallChars');
|
Result := GetTextAt(B.x1 - 1, B.y1 - 1,1, 4, 1, 0, 0, 100, 'SmallChars');
|
||||||
|
|
||||||
{Result := Trim(GetTextAtEx(B.x1 - 1, B.y1 - 2, 0, SmallChars, False, False,
|
|
||||||
0, 1, TextCol, 80, False, tr_AllChars)); }
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
|
||||||
bmp: integer;
|
|
||||||
begin
|
begin
|
||||||
bmp := LoadBitmap('/home/merlijn/Programs/trunk/pics/17.bmp');
|
Writeln(GetChatBoxText(8, 0));
|
||||||
SetTargetBitmap(bmp);
|
|
||||||
// freebitmap(bmp);
|
|
||||||
{ GetChatBoxText(8, 0); }
|
|
||||||
|
|
||||||
{SetDesktopAsClient; }
|
|
||||||
|
|
||||||
// uncomment this for exception
|
|
||||||
freebitmap(bmp);
|
|
||||||
end.
|
end.
|
||||||
|
@ -15,8 +15,7 @@ begin
|
|||||||
movemouse(x,y);
|
movemouse(x,y);
|
||||||
end else
|
end else
|
||||||
writeln('not found');
|
writeln('not found');
|
||||||
if getdtm(dtm, ppdtm) then
|
ppdtm := GetDTM(Dtm);
|
||||||
writeln('yay');
|
|
||||||
printpdtm(tdtmtopdtm(pdtmtotdtm(ppdtm)));
|
printpdtm(tdtmtopdtm(pdtmtotdtm(ppdtm)));
|
||||||
dtm := addpdtm(ppdtm);
|
dtm := addpdtm(ppdtm);
|
||||||
freedtm(dtm);
|
freedtm(dtm);
|
||||||
|
@ -53,7 +53,7 @@ begin
|
|||||||
movemouse(p[0].x,p[0].y);
|
movemouse(p[0].x,p[0].y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if FindDTMRotated(dtm, x, y, 0, 0, w-1, h-1, -3.14, 3.14, 0.05, a) then
|
if FindDTMRotatedAlternating(dtm, x, y, 0, 0, w-1, h-1, -3.14, 3.14, 0.05, a) then
|
||||||
begin
|
begin
|
||||||
writeln('Found DTM at ' + inttostr(x) + ', ' + inttostr(y) + ' Angle: ' + FloatToStr(a));
|
writeln('Found DTM at ' + inttostr(x) + ', ' + inttostr(y) + ' Angle: ' + FloatToStr(a));
|
||||||
movemouse(x,y);
|
movemouse(x,y);
|
||||||
|
@ -59,6 +59,6 @@ begin
|
|||||||
writeln(inttostr(w) + ' , ' + inttostr(h));
|
writeln(inttostr(w) + ' , ' + inttostr(h));
|
||||||
if findcolortolerance(w,h,clwhite,0,0,764,502,300) then
|
if findcolortolerance(w,h,clwhite,0,0,764,502,300) then
|
||||||
smartmovemouse(w,h);
|
smartmovemouse(w,h);
|
||||||
savescreenshot('/tmp/smart.bmp');
|
Wait(5000);
|
||||||
//Wait(5000);
|
savescreenshot(scriptPath + 'smart.bmp');
|
||||||
end.
|
end.
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
program new;
|
program new;
|
||||||
begin
|
begin
|
||||||
SettingsGetSetDefaultKeyValue('Kanker/wat', 'YO WAT');
|
GetSettingValueDef('Testme/wat','Yo wat');
|
||||||
SettingsGetSetDefaultKeyValue('Kanker/wat2', 'YO WAT2');
|
GetSettingValueDef('Testme/wat2','Yo wat2');
|
||||||
writeln(SettingsGetKeyValue('Kanker/wat'));
|
Writeln(GetSettingValue('Testme/wat'));
|
||||||
|
if KeyIsDirectory('Testme') then
|
||||||
if SettingsIsDirectory('Kanker') then
|
Writeln('Testme has atleast one child!');
|
||||||
writeln('Kanker has at least one child!');
|
if KeyIsSetting('Testme/wat') then
|
||||||
if SettingsIsKey('Kanker/wat') then
|
writeln('wat exists in the parent Testme!');
|
||||||
writeln('wat exists!');
|
DeleteSetting('Testme/wat');
|
||||||
SettingsDeleteKey('Kanker/wat');
|
Writeln(GetSettingValue('Testme/wat2'));
|
||||||
writeln(SettingsGetKeyValue('Kanker/wat2'));
|
Writeln(GetSettingValue('Testme/wat'));
|
||||||
writeln(SettingsGetKeyValue('Kanker/wat'));
|
writeln(DeleteSubSettings('Testme'));
|
||||||
SettingsDeleteSubKeys('Kanker');
|
if KeyIsSetting('Testme') then
|
||||||
if SettingsIsKey('Kanker') then
|
writeln('Testme is a key now!');
|
||||||
writeln('kanker is a key now!');
|
|
||||||
end.
|
end.
|
||||||
|
@ -34,6 +34,4 @@ begin
|
|||||||
end;
|
end;
|
||||||
Writeln(y);
|
Writeln(y);
|
||||||
Writeln(TPointArray([Point(5,5),Point(20,1337),point(1,2)]));
|
Writeln(TPointArray([Point(5,5),Point(20,1337),point(1,2)]));
|
||||||
J := TForm.Create(nil);
|
|
||||||
Writeln(j.canvas);
|
|
||||||
end.
|
end.
|
||||||
|
@ -71,7 +71,7 @@ begin;
|
|||||||
raise exception.createfmt('Wrong Width or Height in ScretchResize: (%d,%d)',[NewW,NewH]);
|
raise exception.createfmt('Wrong Width or Height in ScretchResize: (%d,%d)',[NewW,NewH]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ps_GetBitmapSize(Bmp : integer; out BmpW,BmpH : integer); extdecl;
|
procedure ps_GetBitmapSize(Bmp : integer; var BmpW,BmpH : integer); extdecl;
|
||||||
begin;
|
begin;
|
||||||
With CurrThread.Client.MBitmaps[bmp] do
|
With CurrThread.Client.MBitmaps[bmp] do
|
||||||
begin;
|
begin;
|
||||||
@ -170,19 +170,19 @@ begin;
|
|||||||
CurrThread.Client.MBitmaps[result].CopyClientToBitmap(CurrThread.Client.IOManager,True,xs,ys,xe,ye);
|
CurrThread.Client.MBitmaps[result].CopyClientToBitmap(CurrThread.Client.IOManager,True,xs,ys,xe,ye);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindBitmap(Bitmap: integer; out x, y: Integer): Boolean; extdecl;
|
function ps_FindBitmap(Bitmap: integer; var x, y: Integer): Boolean; extdecl;
|
||||||
begin;
|
begin;
|
||||||
with CurrThread.Client do
|
with CurrThread.Client do
|
||||||
result := MFinder.FindBitmap( MBitmaps[bitmap],x,y);
|
result := MFinder.FindBitmap( MBitmaps[bitmap],x,y);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindBitmapIn(bitmap: integer; out x, y: Integer; xs, ys, xe, ye: Integer): Boolean; extdecl;
|
function ps_FindBitmapIn(bitmap: integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean; extdecl;
|
||||||
begin;
|
begin;
|
||||||
with CurrThread.Client do
|
with CurrThread.Client do
|
||||||
result := MFinder.FindBitmapIn( MBitmaps[bitmap],x,y,xs,ys,xe,ye);
|
result := MFinder.FindBitmapIn( MBitmaps[bitmap],x,y,xs,ys,xe,ye);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindBitmapToleranceIn(bitmap: integer; out x, y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer): Boolean; extdecl;
|
function ps_FindBitmapToleranceIn(bitmap: integer; var x, y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer): Boolean; extdecl;
|
||||||
begin;
|
begin;
|
||||||
with CurrThread.Client do
|
with CurrThread.Client do
|
||||||
result := MFinder.FindBitmapToleranceIn( MBitmaps[bitmap],x,y,xs,ys,xe,ye,tolerance);
|
result := MFinder.FindBitmapToleranceIn( MBitmaps[bitmap],x,y,xs,ys,xe,ye,tolerance);
|
||||||
@ -195,7 +195,7 @@ begin;
|
|||||||
result := MFinder.FindBitmapSpiral(Mbitmaps[bitmap],x,y,xs,ys,xe,ye);
|
result := MFinder.FindBitmapSpiral(Mbitmaps[bitmap],x,y,xs,ys,xe,ye);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindBitmapsSpiralTolerance(bitmap: integer; x, y: Integer; out Points : TPointArray; xs, ys, xe, ye,tolerance: Integer): Boolean; extdecl;
|
function ps_FindBitmapsSpiralTolerance(bitmap: integer; x, y: Integer; var Points : TPointArray; xs, ys, xe, ye,tolerance: Integer): Boolean; extdecl;
|
||||||
begin;
|
begin;
|
||||||
with CurrThread.Client do
|
with CurrThread.Client do
|
||||||
result := MFinder.FindBitmapsSpiralTolerance(MBitmaps[bitmap],x,y,points,xs,ys,xe,ye,tolerance);
|
result := MFinder.FindBitmapsSpiralTolerance(MBitmaps[bitmap],x,y,points,xs,ys,xe,ye,tolerance);
|
||||||
@ -270,11 +270,11 @@ begin;
|
|||||||
result := CurrThread.Client.MBitmaps[Bitmap].CreateTMask;
|
result := CurrThread.Client.MBitmaps[Bitmap].CreateTMask;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindMaskTolerance(const mask: TMask; out x, y: Integer; xs,ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean; extdecl;
|
function ps_FindMaskTolerance(const mask: TMask; var x, y: Integer; xs,ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean; extdecl;
|
||||||
begin;
|
begin;
|
||||||
result := CurrThread.Client.MFinder.FindMaskTolerance(Mask,x,y,xs,ys,xe,ye,tolerance,contourtolerance);
|
result := CurrThread.Client.MFinder.FindMaskTolerance(Mask,x,y,xs,ys,xe,ye,tolerance,contourtolerance);
|
||||||
end;
|
end;
|
||||||
function ps_FindBitmapMaskTolerance(mask: Integer; out x, y: Integer; xs, ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean; extdecl;
|
function ps_FindBitmapMaskTolerance(mask: Integer; var x, y: Integer; xs, ys, xe, ye: Integer; Tolerance, ContourTolerance: Integer): Boolean; extdecl;
|
||||||
begin;
|
begin;
|
||||||
{$ifdef mDebug}
|
{$ifdef mDebug}
|
||||||
mDebugLn('Better be using FindMaskTolerance in combination with CreateMaskFromBitmap, more efficient.');
|
mDebugLn('Better be using FindMaskTolerance in combination with CreateMaskFromBitmap, more efficient.');
|
||||||
@ -283,9 +283,9 @@ begin;
|
|||||||
result := MFinder.FindMaskTolerance(MBitmaps[mask].CreateTMask,x,y,xs,ys,xe,ye,tolerance,contourtolerance);
|
result := MFinder.FindMaskTolerance(MBitmaps[mask].CreateTMask,x,y,xs,ys,xe,ye,tolerance,contourtolerance);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindDeformedBitmapToleranceIn(bitmap: integer; out x,
|
function ps_FindDeformedBitmapToleranceIn(bitmap: integer; var x,
|
||||||
y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer; Range: Integer;
|
y: Integer; xs, ys, xe, ye: Integer; tolerance: Integer; Range: Integer;
|
||||||
AllowPartialAccuracy: Boolean; out accuracy: Extended): Boolean; extdecl;
|
AllowPartialAccuracy: Boolean; var accuracy: Extended): Boolean; extdecl;
|
||||||
begin;
|
begin;
|
||||||
result := CurrThread.Client.MFinder.FindDeformedBitmapToleranceIn(CurrThread.Client.MBitmaps[Bitmap],x,y,xs,ys,xe,ye,tolerance,range,AllowPartialAccuracy,accuracy);
|
result := CurrThread.Client.MFinder.FindDeformedBitmapToleranceIn(CurrThread.Client.MBitmaps[Bitmap],x,y,xs,ys,xe,ye,tolerance,range,AllowPartialAccuracy,accuracy);
|
||||||
end;
|
end;
|
||||||
|
@ -36,21 +36,21 @@ begin
|
|||||||
result := CurrThread.Client.MFinder.GetColors(coords);
|
result := CurrThread.Client.MFinder.GetColors(coords);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_findcolor(out x, y: integer; color, x1, y1, x2, y2: integer): boolean; extdecl;
|
function ps_findcolor(var x, y: integer; color, x1, y1, x2, y2: integer): boolean; extdecl;
|
||||||
begin
|
begin
|
||||||
Result := CurrThread.Client.MFinder.FindColor(x, y, color, x1, y1, x2, y2);
|
Result := CurrThread.Client.MFinder.FindColor(x, y, color, x1, y1, x2, y2);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_findcolortoleranceOptimised(out x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean; extdecl;
|
function ps_findcolortoleranceOptimised(var x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean; extdecl;
|
||||||
begin
|
begin
|
||||||
Result := CurrThread.Client.MFinder.FindColorToleranceOptimised(x, y, color, x1, y1, x2, y2, tol);
|
Result := CurrThread.Client.MFinder.FindColorToleranceOptimised(x, y, color, x1, y1, x2, y2, tol);
|
||||||
end;
|
end;
|
||||||
function ps_findcolortolerance(out x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean; extdecl;
|
function ps_findcolortolerance(var x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean; extdecl;
|
||||||
begin
|
begin
|
||||||
Result := CurrThread.Client.MFinder.FindColorTolerance(x, y, color, x1, y1, x2, y2, tol);
|
Result := CurrThread.Client.MFinder.FindColorTolerance(x, y, color, x1, y1, x2, y2, tol);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindColors(out TPA: TPointArray; Color, x1, y1, x2, y2: Integer): Boolean; extdecl;
|
function ps_FindColors(var TPA: TPointArray; Color, x1, y1, x2, y2: Integer): Boolean; extdecl;
|
||||||
begin
|
begin
|
||||||
Result := CurrThread.Client.MFinder.FindColors(TPA, color, x1, y1, x2, y2);
|
Result := CurrThread.Client.MFinder.FindColors(TPA, color, x1, y1, x2, y2);
|
||||||
end;
|
end;
|
||||||
@ -70,7 +70,7 @@ begin
|
|||||||
CurrThread.Client.MFinder.SetToleranceSpeed2Modifiers(nHue, nSat);
|
CurrThread.Client.MFinder.SetToleranceSpeed2Modifiers(nHue, nSat);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ps_GetToleranceSpeed2Modifiers(out hMod, sMod: Extended); extdecl;
|
procedure ps_GetToleranceSpeed2Modifiers(var hMod, sMod: Extended); extdecl;
|
||||||
begin
|
begin
|
||||||
CurrThread.Client.MFinder.GetToleranceSpeed2Modifiers(hMod, sMod);
|
CurrThread.Client.MFinder.GetToleranceSpeed2Modifiers(hMod, sMod);
|
||||||
end;
|
end;
|
||||||
@ -89,11 +89,11 @@ begin;
|
|||||||
result := CurrThread.Client.MFinder.CountColorTolerance(color,xs,ys,xe,ye,tolerance);
|
result := CurrThread.Client.MFinder.CountColorTolerance(color,xs,ys,xe,ye,tolerance);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindColorsToleranceOptimised(out Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean; extdecl;
|
function ps_FindColorsToleranceOptimised(var Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean; extdecl;
|
||||||
begin;
|
begin;
|
||||||
result := CurrThread.Client.MFinder.FindColorsToleranceOptimised(points,color,xs,ys,xe,ye,tolerance);
|
result := CurrThread.Client.MFinder.FindColorsToleranceOptimised(points,color,xs,ys,xe,ye,tolerance);
|
||||||
end;
|
end;
|
||||||
function ps_FindColorsTolerance(out Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean; extdecl;
|
function ps_FindColorsTolerance(var Points: TPointArray; Color, xs, ys, xe, ye, Tolerance: Integer): Boolean; extdecl;
|
||||||
begin;
|
begin;
|
||||||
result := CurrThread.Client.MFinder.FindColorsTolerance(points,color,xs,ys,xe,ye,tolerance);
|
result := CurrThread.Client.MFinder.FindColorsTolerance(points,color,xs,ys,xe,ye,tolerance);
|
||||||
end;
|
end;
|
||||||
@ -108,7 +108,7 @@ begin
|
|||||||
result := CurrThread.Client.MFinder.FindColorSpiralTolerance(x,y,color,xs,ys,xe,ye,tol);
|
result := CurrThread.Client.MFinder.FindColorSpiralTolerance(x,y,color,xs,ys,xe,ye,tol);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindColorsSpiralTolerance(x, y: Integer; out Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer) : boolean; extdecl;
|
function ps_FindColorsSpiralTolerance(x, y: Integer; var Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer) : boolean; extdecl;
|
||||||
begin;
|
begin;
|
||||||
result := CurrThread.Client.MFinder.FindColorsSpiralTolerance(x,y,Points,color,xs,ys,xe,ye,tolerance);
|
result := CurrThread.Client.MFinder.FindColorsSpiralTolerance(x,y,Points,color,xs,ys,xe,ye,tolerance);
|
||||||
end;
|
end;
|
||||||
|
@ -1,9 +1,14 @@
|
|||||||
procedure ps_ColorToRGB(Color: integer; var r, g, b: Byte);extdecl;
|
procedure ps_ColorToRGB(Color: integer; var r, g, b: Integer);extdecl;
|
||||||
|
var
|
||||||
|
RR,GG,BB : byte;
|
||||||
begin
|
begin
|
||||||
colour_conv.ColorToRGB(color,r,g,b);
|
colour_conv.ColorToRGB(color,rr,gg,bb);
|
||||||
|
r := rr;
|
||||||
|
g := gg;
|
||||||
|
b := bb;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_RGBtoColor(r, g, b: Byte): TColor;extdecl;
|
function ps_RGBtoColor(r, g, b: Integer): TColor;extdecl;
|
||||||
begin
|
begin
|
||||||
result := RGBtoColor(r,g,b);
|
result := RGBtoColor(r,g,b);
|
||||||
end;
|
end;
|
||||||
@ -28,21 +33,31 @@ begin
|
|||||||
result := XYZToColor(x,y,z);
|
result := XYZToColor(x,y,z);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ps_RGBToHSL(R, G, B: Byte; var h, s, l: Extended);extdecl;
|
procedure ps_RGBToHSL(R, G, B: Integer; var h, s, l: Extended);extdecl;
|
||||||
begin
|
begin
|
||||||
RGBToHSL(r,g,b,h,s,l);
|
RGBToHSL(r,g,b,h,s,l);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ps_HSLtoRGB(H, S, L: extended; var R, G ,B: Byte);extdecl;
|
procedure ps_HSLtoRGB(H, S, L: extended; var R, G ,B: Integer);extdecl;
|
||||||
|
var
|
||||||
|
RR,GG,BB : byte;
|
||||||
begin
|
begin
|
||||||
HSLtoRGB(h,s,l,r,g,b);
|
HSLtoRGB(h,s,l,rr,gg,bb);
|
||||||
|
r := rr;
|
||||||
|
g := gg;
|
||||||
|
b := bb;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ps_RGBToXYZ(R, G, B: Byte;var x, y ,z: Extended);extdecl;
|
procedure ps_RGBToXYZ(R, G, B: Integer;var x, y ,z: Extended);extdecl;
|
||||||
begin
|
begin
|
||||||
RGBToXYZ(r,g,b,x,y,z);
|
RGBToXYZ(r,g,b,x,y,z);
|
||||||
end;
|
end;
|
||||||
procedure ps_XYZToRGB(X, Y, Z: Extended; var R, G, B: Byte);extdecl;
|
procedure ps_XYZToRGB(X, Y, Z: Extended; var R, G, B: Integer);extdecl;
|
||||||
begin
|
var
|
||||||
XYZToRGB(x,y,z,r,g,b);
|
RR,GG,BB : byte;
|
||||||
|
begin;
|
||||||
|
XYZToRGB(x,y,z,rr,gg,bb);
|
||||||
|
r := rr;
|
||||||
|
g := gg;
|
||||||
|
b := bb;
|
||||||
end;
|
end;
|
||||||
|
@ -21,42 +21,42 @@
|
|||||||
DTM.inc for the Mufasa Macro Library
|
DTM.inc for the Mufasa Macro Library
|
||||||
}
|
}
|
||||||
|
|
||||||
function ps_FindDTM(DTM: Integer; out x, y: Integer; xs, ys, xe, ye: Integer): Boolean; extdecl;
|
function ps_FindDTM(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean; extdecl;
|
||||||
begin
|
begin
|
||||||
with CurrThread.Client do
|
with CurrThread.Client do
|
||||||
result := MFinder.FindDTM(MDTM.GetDTM(DTM),x,y,xs,ys,xe,ye);
|
result := MFinder.FindDTM(MDTM.GetDTM(DTM),x,y,xs,ys,xe,ye);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindDTMs(DTM: Integer; out p: TPointArray; xs, ys, xe, ye: Integer): Boolean; extdecl;
|
function ps_FindDTMs(DTM: Integer; var p: TPointArray; xs, ys, xe, ye: Integer): Boolean; extdecl;
|
||||||
begin
|
begin
|
||||||
with CurrThread.Client do
|
with CurrThread.Client do
|
||||||
result := MFinder.FindDTMs(MDTM.GetDTM(DTM), p, xs, ys, xe, ye);
|
result := MFinder.FindDTMs(MDTM.GetDTM(DTM), p, xs, ys, xe, ye);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindDTMRotatedAlternating(DTM: Integer; out x, y: Integer; xs, ys, xe, ye:
|
function ps_FindDTMRotatedAlternating(DTM: Integer; var x, y: Integer; xs, ys, xe, ye:
|
||||||
Integer; sAngle, eAngle, aStep: Extended;
|
Integer; sAngle, eAngle, aStep: Extended;
|
||||||
out aFound: Extended): Boolean; extdecl;
|
var aFound: Extended): Boolean; extdecl;
|
||||||
begin
|
begin
|
||||||
with CurrThread.Client do
|
with CurrThread.Client do
|
||||||
result := MFinder.FindDTMRotated(MDTM.GetDTM(DTM), x,y, xs, ys, xe, ye, sAngle, eAngle, aStep, aFound,true);
|
result := MFinder.FindDTMRotated(MDTM.GetDTM(DTM), x,y, xs, ys, xe, ye, sAngle, eAngle, aStep, aFound,true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindDTMRotatedSE(DTM: Integer; out x, y: Integer; xs, ys, xe, ye:
|
function ps_FindDTMRotatedSE(DTM: Integer; var x, y: Integer; xs, ys, xe, ye:
|
||||||
Integer; sAngle, eAngle, aStep: Extended;
|
Integer; sAngle, eAngle, aStep: Extended;
|
||||||
out aFound: Extended): Boolean; extdecl;
|
var aFound: Extended): Boolean; extdecl;
|
||||||
begin
|
begin
|
||||||
with CurrThread.Client do
|
with CurrThread.Client do
|
||||||
result := MFinder.FindDTMRotated(MDTM.GetDTM(DTM), x, y, xs, ys, xe, ye, sAngle, eAngle, aStep, aFound,false);
|
result := MFinder.FindDTMRotated(MDTM.GetDTM(DTM), x, y, xs, ys, xe, ye, sAngle, eAngle, aStep, aFound,false);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindDTMsRotatedAlternating(DTM: Integer; out Points: TPointArray; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; out aFound: T2DExtendedArray): Boolean; extdecl;
|
function ps_FindDTMsRotatedAlternating(DTM: Integer; var Points: TPointArray; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; out aFound: T2DExtendedArray): Boolean; extdecl;
|
||||||
begin
|
begin
|
||||||
with CurrThread.Client do
|
with CurrThread.Client do
|
||||||
result := MFinder.FindDTMsRotated(MDTM.GetDTM(DTM), Points, xs, ys, xe, ye,
|
result := MFinder.FindDTMsRotated(MDTM.GetDTM(DTM), Points, xs, ys, xe, ye,
|
||||||
sAngle, eAngle, aStep, aFound, true);
|
sAngle, eAngle, aStep, aFound, true);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ps_FindDTMsRotatedSE(DTM: Integer; out Points: TPointArray; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; out aFound: T2DExtendedArray): Boolean; extdecl;
|
function ps_FindDTMsRotatedSE(DTM: Integer; var Points: TPointArray; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; out aFound: T2DExtendedArray): Boolean; extdecl;
|
||||||
begin
|
begin
|
||||||
with CurrThread.Client do
|
with CurrThread.Client do
|
||||||
result := MFinder.FindDTMsRotated(MDTM.GetDTM(DTM), Points, xs, ys, xe, ye,
|
result := MFinder.FindDTMsRotated(MDTM.GetDTM(DTM), Points, xs, ys, xe, ye,
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
type
|
type
|
||||||
TStringArray = array of string;
|
TStringArray = array of string;
|
||||||
function ext_UnTar(const Input : string; out Content : TStringArray) : boolean;
|
function ext_UnTar(const Input : string; var Content : TStringArray) : boolean;
|
||||||
var
|
var
|
||||||
Stream : TStringStream;
|
Stream : TStringStream;
|
||||||
begin
|
begin
|
||||||
@ -58,7 +58,7 @@ begin
|
|||||||
stream.free;
|
stream.free;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
function ext_DecompressBZip2(const input: string;out output : string; const BlockSize: Cardinal): boolean;
|
function ext_DecompressBZip2(const input: string;var output : string; const BlockSize: Cardinal): boolean;
|
||||||
var
|
var
|
||||||
Stream : TStringStream;
|
Stream : TStringStream;
|
||||||
Decompress : TDecompressThread;
|
Decompress : TDecompressThread;
|
||||||
@ -95,15 +95,13 @@ var
|
|||||||
begin
|
begin
|
||||||
result := '';
|
result := '';
|
||||||
try
|
try
|
||||||
t := TDownloadThread.Create(true);
|
t := TDownloadThread.Create(url,@result);
|
||||||
t.InputURL:=url;
|
|
||||||
t.Resume;
|
t.Resume;
|
||||||
while not t.done do
|
while not t.done do
|
||||||
begin
|
begin
|
||||||
Application.ProcessMessages;
|
Application.ProcessMessages;
|
||||||
Sleep(25);
|
Sleep(25);
|
||||||
end;
|
end;
|
||||||
Exit(t.ResultStr);
|
|
||||||
except
|
except
|
||||||
on e : exception do
|
on e : exception do
|
||||||
mDebugLn('Exception in GetPage in Extensions: ' + e.message);
|
mDebugLn('Exception in GetPage in Extensions: ' + e.message);
|
||||||
|
@ -155,3 +155,11 @@ function ps_floor(e : extended) : integer; extdecl;
|
|||||||
begin;
|
begin;
|
||||||
result := floor(e);
|
result := floor(e);
|
||||||
end;
|
end;
|
||||||
|
function ps_logn(base, x : extended): extended;extdecl;
|
||||||
|
begin
|
||||||
|
result := logn(base,x);
|
||||||
|
end;
|
||||||
|
function ps_ln(x : extended) : extended;extdecl;
|
||||||
|
begin
|
||||||
|
result := ln(x);
|
||||||
|
end;
|
||||||
|
@ -134,7 +134,7 @@ begin;
|
|||||||
x := x mod (1000 * 60);
|
x := x mod (1000 * 60);
|
||||||
s := x div (1000);
|
s := x div (1000);
|
||||||
end;
|
end;
|
||||||
procedure ps_DecodeDate ( const SourceDate : TDateTime; out Year, Month, Day : Word ); extdecl;
|
procedure ps_DecodeDate ( const SourceDate : TDateTime; var Year, Month, Day : Word ); extdecl;
|
||||||
begin
|
begin
|
||||||
decodedate(sourcedate,year,month,day);
|
decodedate(sourcedate,year,month,day);
|
||||||
end;
|
end;
|
||||||
|
@ -278,69 +278,69 @@ begin
|
|||||||
result := AverageExtended(te);
|
result := AverageExtended(te);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ps_SplitTPAExWrap(arr: TPointArray; w, h: Integer; out res : T2DPointArray);extdecl;
|
procedure ps_SplitTPAExWrap(arr: TPointArray; w, h: Integer; var res : T2DPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
res := SplitTPAEx(arr,w,h);
|
res := SplitTPAEx(arr,w,h);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ps_SplitTPAWrap(arr: TPointArray; Dist: Integer; out res: T2DPointArray);extdecl;
|
procedure ps_SplitTPAWrap(arr: TPointArray; Dist: Integer; var res: T2DPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
res := SplitTPA(arr,dist);
|
res := SplitTPA(arr,dist);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ps_FindGapsTPAWrap(TPA: TPointArray; MinPixels: Integer; out Res : T2DPointArray); extdecl;
|
procedure ps_FindGapsTPAWrap(TPA: TPointArray; MinPixels: Integer; var Res : T2DPointArray); extdecl;
|
||||||
begin
|
begin
|
||||||
Res := FindGapsTPA(TPA,MinPixels);
|
Res := FindGapsTPA(TPA,MinPixels);
|
||||||
end;
|
end;
|
||||||
procedure ps_RemoveDistTPointArrayWrap(x, y, dist: Integer; ThePoints: TPointArray; RemoveHigher: Boolean; out Res : TPointArray);extdecl;
|
procedure ps_RemoveDistTPointArrayWrap(x, y, dist: Integer; ThePoints: TPointArray; RemoveHigher: Boolean; var Res : TPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := RemoveDistTPointArray(x,y,dist,thepoints,removehigher);
|
Res := RemoveDistTPointArray(x,y,dist,thepoints,removehigher);
|
||||||
end;
|
end;
|
||||||
procedure ps_CombineTPAWrap(Ar1, Ar2: TPointArray; out Res : TPointArray);extdecl;
|
procedure ps_CombineTPAWrap(Ar1, Ar2: TPointArray; var Res : TPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := CombineTPA(Ar1,Ar2);
|
Res := CombineTPA(Ar1,Ar2);
|
||||||
end;
|
end;
|
||||||
procedure ps_ReArrangeandShortenArrayExWrap(a: TPointArray; w, h: Integer; out Res : TPointArray);extdecl;
|
procedure ps_ReArrangeandShortenArrayExWrap(a: TPointArray; w, h: Integer; var Res : TPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := ReArrangeandShortenArrayEx(a,w,h);
|
Res := ReArrangeandShortenArrayEx(a,w,h);
|
||||||
end;
|
end;
|
||||||
procedure ps_ReArrangeandShortenArrayWrap(a: TPointArray; Dist: Integer; out Res : TPointArray);extdecl;
|
procedure ps_ReArrangeandShortenArrayWrap(a: TPointArray; Dist: Integer; var Res : TPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := ReArrangeandShortenArray(a,dist);
|
Res := ReArrangeandShortenArray(a,dist);
|
||||||
end;
|
end;
|
||||||
procedure ps_TPAtoATPAExWrap(TPA: TPointArray; w, h: Integer; out Res : T2DPointArray);extdecl;
|
procedure ps_TPAtoATPAExWrap(TPA: TPointArray; w, h: Integer; var Res : T2DPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := TPAtoATPAEx(TPA,w,h);
|
Res := TPAtoATPAEx(TPA,w,h);
|
||||||
end;
|
end;
|
||||||
procedure ps_TPAtoATPAWrap(TPA: TPointArray; Dist: Integer; out Res : T2DPointArray);extdecl;
|
procedure ps_TPAtoATPAWrap(TPA: TPointArray; Dist: Integer; var Res : T2DPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := TPAtoATPA(TPA,Dist);
|
Res := TPAtoATPA(TPA,Dist);
|
||||||
end;
|
end;
|
||||||
procedure ps_CombineIntArrayWrap(Ar1, Ar2: TIntegerArray; out Res : TIntegerArray);extdecl;
|
procedure ps_CombineIntArrayWrap(Ar1, Ar2: TIntegerArray; var Res : TIntegerArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := CombineIntArray(Ar1,Ar2);
|
Res := CombineIntArray(Ar1,Ar2);
|
||||||
end;
|
end;
|
||||||
procedure ps_MergeATPAWrap(ATPA : T2DPointArray; out Res: TPointArray); extdecl;
|
procedure ps_MergeATPAWrap(ATPA : T2DPointArray; var Res: TPointArray); extdecl;
|
||||||
begin
|
begin
|
||||||
Res := MergeATPA(ATPA);
|
Res := MergeATPA(ATPA);
|
||||||
end;
|
end;
|
||||||
procedure ps_TPAFromBoxWrap(const Box : TBox; out Res : TPointArray);extdecl;
|
procedure ps_TPAFromBoxWrap(const Box : TBox; var Res : TPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := TPAFromBox(Box);
|
Res := TPAFromBox(Box);
|
||||||
end;
|
end;
|
||||||
procedure ps_RotatePointsWrap(Const P: TPointArray; A, cx, cy: Extended; out Res : TPointArray);extdecl;
|
procedure ps_RotatePointsWrap(Const P: TPointArray; A, cx, cy: Extended; var Res : TPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := RotatePoints(P,a,cx,cy);
|
Res := RotatePoints(P,a,cx,cy);
|
||||||
end;
|
end;
|
||||||
procedure ps_FindTPAEdgesWrap(p: TPointArray; out Res : TPointArray);extdecl;
|
procedure ps_FindTPAEdgesWrap(p: TPointArray; var Res : TPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := FindTPAEdges(p);
|
Res := FindTPAEdges(p);
|
||||||
end;
|
end;
|
||||||
procedure ps_ClearTPAFromTPAWrap(arP, ClearPoints: TPointArray; out Res : TPointArray);extdecl;
|
procedure ps_ClearTPAFromTPAWrap(arP, ClearPoints: TPointArray; var Res : TPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := ClearTPAFromTPA(arP, clearpoints);
|
Res := ClearTPAFromTPA(arP, clearpoints);
|
||||||
end;
|
end;
|
||||||
procedure ps_ReturnPointsNotInTPAWrap(Const TotalTPA: TPointArray; const Box: TBox; out Res : TPointArray);extdecl;
|
procedure ps_ReturnPointsNotInTPAWrap(Const TotalTPA: TPointArray; const Box: TBox; var Res : TPointArray);extdecl;
|
||||||
begin
|
begin
|
||||||
Res := ReturnPointsNotInTPA(TotalTPA,box);
|
Res := ReturnPointsNotInTPA(TotalTPA,box);
|
||||||
end;
|
end;
|
||||||
|
@ -76,7 +76,7 @@ begin
|
|||||||
CurrThread.Client.IOManager.FreeTarget(idx);
|
CurrThread.Client.IOManager.FreeTarget(idx);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure ps_GetClientDimensions(out w, h: integer); extdecl;
|
procedure ps_GetClientDimensions(var w, h: integer); extdecl;
|
||||||
begin
|
begin
|
||||||
CurrThread.Client.IOManager.GetDimensions(w, h);
|
CurrThread.Client.IOManager.GetDimensions(w, h);
|
||||||
end;
|
end;
|
||||||
|
@ -32,8 +32,8 @@ AddFunction(@ps_DTMFromString, 'function DTMFromString(const DTMString: String):
|
|||||||
AddFunction(@ps_FreeDTM, 'procedure FreeDTM(DTM: Integer);');
|
AddFunction(@ps_FreeDTM, 'procedure FreeDTM(DTM: Integer);');
|
||||||
AddFunction(@ps_FindDTM, 'function FindDTM(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean;');
|
AddFunction(@ps_FindDTM, 'function FindDTM(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer): Boolean;');
|
||||||
AddFunction(@ps_FindDTMs, 'function FindDTMs(DTM: Integer; var p: TPointArray; xs, ys, xe, ye: Integer): Boolean;');
|
AddFunction(@ps_FindDTMs, 'function FindDTMs(DTM: Integer; var p: TPointArray; xs, ys, xe, ye: Integer): Boolean;');
|
||||||
AddFunction(@ps_FindDTMRotatedSE, 'function FindDTMRotatedSE(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; out aFound: Extended): Boolean;');
|
AddFunction(@ps_FindDTMRotatedSE, 'function FindDTMRotatedSE(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; var aFound: Extended): Boolean;');
|
||||||
AddFunction(@ps_FindDTMRotatedAlternating, 'function FindDTMRotatedAlternating(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; out aFound: Extended): Boolean;');
|
AddFunction(@ps_FindDTMRotatedAlternating, 'function FindDTMRotatedAlternating(DTM: Integer; var x, y: Integer; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; var aFound: Extended): Boolean;');
|
||||||
AddFunction(@ps_FindDTMsRotatedSE, 'function FindDTMsRotatedSE(DTM: Integer; var Points: TPointArray; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; var aFound: T2DExtendedArray) : Boolean;');
|
AddFunction(@ps_FindDTMsRotatedSE, 'function FindDTMsRotatedSE(DTM: Integer; var Points: TPointArray; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; var aFound: T2DExtendedArray) : Boolean;');
|
||||||
AddFunction(@ps_FindDTMsRotatedAlternating, 'function FindDTMsRotatedAlternating(DTM: Integer; var Points: TPointArray; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; var aFound: T2DExtendedArray) : Boolean;');
|
AddFunction(@ps_FindDTMsRotatedAlternating, 'function FindDTMsRotatedAlternating(DTM: Integer; var Points: TPointArray; xs, ys, xe, ye: Integer; sAngle, eAngle, aStep: Extended; var aFound: T2DExtendedArray) : Boolean;');
|
||||||
AddFunction(@ps_addDTM, 'function AddDTM(const d: TDTM): Integer;');
|
AddFunction(@ps_addDTM, 'function AddDTM(const d: TDTM): Integer;');
|
||||||
@ -69,6 +69,8 @@ AddFunction(@ps_DecEx,'procedure DecEx(var x : integer; Decrease : integer);');
|
|||||||
AddFunction(@ps_BinCoe,'function BinCoe(a, b: LongInt): Extended;');
|
AddFunction(@ps_BinCoe,'function BinCoe(a, b: LongInt): Extended;');
|
||||||
AddFunction(@ps_FixD,'function FixD(Degrees : extended) : Extended;');
|
AddFunction(@ps_FixD,'function FixD(Degrees : extended) : Extended;');
|
||||||
AddFunction(@ps_InRange,'function InRange(const value,min,max : integer) : boolean;');
|
AddFunction(@ps_InRange,'function InRange(const value,min,max : integer) : boolean;');
|
||||||
|
AddFunction(@ps_logn,'function logn(base, x : extended): extended;');
|
||||||
|
AddFunction(@ps_ln,'function ln(x : extended) : extended;');
|
||||||
|
|
||||||
{window}
|
{window}
|
||||||
SetCurrSection('Window');
|
SetCurrSection('Window');
|
||||||
@ -180,16 +182,16 @@ AddFunction(@ps_GetRawHeaders,'function GetRawHeaders(Client: Integer): string;'
|
|||||||
|
|
||||||
{ Color Conversions and Speed }
|
{ Color Conversions and Speed }
|
||||||
SetCurrSection('Color Convert');
|
SetCurrSection('Color Convert');
|
||||||
AddFunction(@ps_ColorToRGB, 'procedure ColorToRGB(Color: integer; var r, g, b: Byte);');
|
AddFunction(@ps_ColorToRGB, 'procedure ColorToRGB(Color: integer; var r, g, b: Integer);');
|
||||||
AddFunction(@ps_RGBToColor, 'function RGBtoColor(r, g, b: Byte): TColor;');
|
AddFunction(@ps_RGBToColor, 'function RGBtoColor(r, g, b: Integer): TColor;');
|
||||||
AddFunction(@ps_ColorToHSL, 'procedure ColorToHSL(Color: Integer; var h, s, l: Extended);');
|
AddFunction(@ps_ColorToHSL, 'procedure ColorToHSL(Color: Integer; var h, s, l: Extended);');
|
||||||
AddFunction(@ps_HSLToColor, 'function HSLToColor(H, S, L: Extended): TColor;');
|
AddFunction(@ps_HSLToColor, 'function HSLToColor(H, S, L: Extended): TColor;');
|
||||||
AddFunction(@ps_ColorToXYZ, 'procedure ColorToXYZ(Color: Integer; var x, y, z: Extended);');
|
AddFunction(@ps_ColorToXYZ, 'procedure ColorToXYZ(Color: Integer; var x, y, z: Extended);');
|
||||||
AddFunction(@ps_XYZToColor, 'function XYZToColor(X, Y, Z: Extended): TColor;');
|
AddFunction(@ps_XYZToColor, 'function XYZToColor(X, Y, Z: Extended): TColor;');
|
||||||
AddFunction(@ps_RGBToHSL, 'procedure RGBToHSL(R, G, B: Byte; var h, s, l: Extended);');
|
AddFunction(@ps_RGBToHSL, 'procedure RGBToHSL(R, G, B: Integer; var h, s, l: Extended);');
|
||||||
AddFunction(@ps_HSLToRGB, 'procedure HSLtoRGB(H, S, L: extended; var R, G ,B: Byte);');
|
AddFunction(@ps_HSLToRGB, 'procedure HSLtoRGB(H, S, L: extended; var R, G ,B: Integer);');
|
||||||
AddFunction(@ps_RGBToXYZ, 'procedure RGBToXYZ(R, G, B: Byte;var x, y ,z: Extended);');
|
AddFunction(@ps_RGBToXYZ, 'procedure RGBToXYZ(R, G, B: Integer;var x, y ,z: Extended);');
|
||||||
AddFunction(@ps_XYZToRGB, 'procedure XYZToRGB(X, Y, Z: Extended; var R, G, B: Byte);');
|
AddFunction(@ps_XYZToRGB, 'procedure XYZToRGB(X, Y, Z: Extended; var R, G, B: Integer);');
|
||||||
|
|
||||||
{ Color Finding }
|
{ Color Finding }
|
||||||
SetCurrSection('Color');
|
SetCurrSection('Color');
|
||||||
|
@ -18,6 +18,7 @@ type
|
|||||||
StartWait : Cardinal;
|
StartWait : Cardinal;
|
||||||
ClassProc : procedure of object;
|
ClassProc : procedure of object;
|
||||||
NormalProc : procedure;
|
NormalProc : procedure;
|
||||||
|
constructor Create;
|
||||||
procedure Execute; override;
|
procedure Execute; override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -132,6 +133,12 @@ begin;
|
|||||||
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
constructor TProcThread.Create;
|
||||||
|
begin
|
||||||
|
inherited Create(true);
|
||||||
|
FreeOnTerminate:= True;
|
||||||
|
end;
|
||||||
|
|
||||||
|
|
||||||
{ TProcThread }
|
{ TProcThread }
|
||||||
|
|
||||||
|
@ -81,7 +81,8 @@ type
|
|||||||
procedure Invert;overload;
|
procedure Invert;overload;
|
||||||
procedure Posterize(TargetBitmap : TMufasaBitmap; Po : integer);overload;
|
procedure Posterize(TargetBitmap : TMufasaBitmap; Po : integer);overload;
|
||||||
procedure Posterize(Po : integer);overload;
|
procedure Posterize(Po : integer);overload;
|
||||||
function Copy: TMufasaBitmap;
|
function Copy: TMufasaBitmap;overload;
|
||||||
|
function Copy(const xs,ys,xe,ye : integer) : TMufasaBitmap; overload;
|
||||||
function ToTBitmap: TBitmap;
|
function ToTBitmap: TBitmap;
|
||||||
function ToString : string;
|
function ToString : string;
|
||||||
procedure LoadFromTBitmap(bmp: TBitmap);
|
procedure LoadFromTBitmap(bmp: TBitmap);
|
||||||
@ -519,6 +520,18 @@ begin
|
|||||||
Move(self.FData[0], Result.FData[0],self.w * self.h * SizeOf(TRGB32));
|
Move(self.FData[0], Result.FData[0],self.w * self.h * SizeOf(TRGB32));
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
function TMufasaBitmap.Copy(const xs, ys, xe, ye: integer): TMufasaBitmap;
|
||||||
|
var
|
||||||
|
i : integer;
|
||||||
|
begin
|
||||||
|
ValidatePoint(xs,ys);
|
||||||
|
ValidatePoint(xe,ye);
|
||||||
|
Result := TMufasaBitmap.Create;
|
||||||
|
Result.SetSize(xe-xs+1, ye-ys+1);
|
||||||
|
for i := ys to ye do
|
||||||
|
Move(self.FData[i * self.w + xs], Result.FData[i-ys],result.Width * SizeOf(TRGB32));
|
||||||
|
end;
|
||||||
|
|
||||||
function TMufasaBitmap.ToTBitmap: TBitmap;
|
function TMufasaBitmap.ToTBitmap: TBitmap;
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -733,12 +746,15 @@ begin
|
|||||||
StartPtr := Self.FData;
|
StartPtr := Self.FData;
|
||||||
For y := 0 to Self.h - 1 do
|
For y := 0 to Self.h - 1 do
|
||||||
For x := 0 to self.w - 1 do
|
For x := 0 to self.w - 1 do
|
||||||
|
begin
|
||||||
|
StartPtr^.A := 0;
|
||||||
if LongWord(StartPtr^) = LongWord(Search) then
|
if LongWord(StartPtr^) = LongWord(Search) then
|
||||||
begin;
|
begin;
|
||||||
L := L + 1;
|
L := L + 1;
|
||||||
Result[L].x := x;
|
Result[L].x := x;
|
||||||
Result[L].y := y;
|
Result[L].y := y;
|
||||||
end;
|
end;
|
||||||
|
end;
|
||||||
SetLength(Result,L + 1);
|
SetLength(Result,L + 1);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -809,9 +825,11 @@ begin
|
|||||||
begin;
|
begin;
|
||||||
for loopy := 0 to MinH do
|
for loopy := 0 to MinH do
|
||||||
for loopx := 0 to MinW do
|
for loopx := 0 to MinW do
|
||||||
|
begin;
|
||||||
|
FData[loopy * w + loopx].A := 0;
|
||||||
if LongWord(FData[loopy * w + loopx]) <> LongWord(FTransparentColor) then
|
if LongWord(FData[loopy * w + loopx]) <> LongWord(FTransparentColor) then
|
||||||
TargetBitmap.FData[(loopy + y) * TargetW + loopx + x] := FData[Loopy * w + loopx];
|
TargetBitmap.FData[(loopy + y) * TargetW + loopx + x] := FData[Loopy * w + loopx];
|
||||||
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
for loopy := 0 to MinH do
|
for loopy := 0 to MinH do
|
||||||
@ -827,8 +845,11 @@ begin
|
|||||||
OldCol := RGBToBGR(OldColor);
|
OldCol := RGBToBGR(OldColor);
|
||||||
NewCol := RGBToBGR(NewColor);
|
NewCol := RGBToBGR(NewColor);
|
||||||
for i := w*h-1 downto 0 do
|
for i := w*h-1 downto 0 do
|
||||||
|
begin
|
||||||
|
FData[i].a := 0;
|
||||||
if LongWord(FData[i]) = LongWord(OldCol) then
|
if LongWord(FData[i]) = LongWord(OldCol) then
|
||||||
FData[i] := NewCol;
|
FData[i] := NewCol;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TMufasaBitmap.CopyClientToBitmap(MWindow : TObject;Resize : boolean; xs, ys, xe, ye: Integer);
|
procedure TMufasaBitmap.CopyClientToBitmap(MWindow : TObject;Resize : boolean; xs, ys, xe, ye: Integer);
|
||||||
@ -1212,16 +1233,24 @@ end;
|
|||||||
destructor TMBitmaps.Destroy;
|
destructor TMBitmaps.Destroy;
|
||||||
var
|
var
|
||||||
I : integer;
|
I : integer;
|
||||||
|
WriteStr : string;
|
||||||
begin
|
begin
|
||||||
|
WriteStr := '[';
|
||||||
for i := 0 to BmpsCurr do
|
for i := 0 to BmpsCurr do
|
||||||
if BmpArray[i] <> nil then
|
if BmpArray[i] <> nil then
|
||||||
begin;
|
begin;
|
||||||
if BmpArray[i].Name = '' then
|
if BmpArray[i].Name = '' then
|
||||||
TClient(Client).Writeln(Format('BMP[%d] has not been freed in the script, freeing it now.',[i]))
|
WriteStr := WriteStr + inttostr(i) + ', '
|
||||||
else
|
else
|
||||||
TClient(Client).Writeln(Format('BMP[%s] has not been freed in the script, freeing it now.',[BmpArray[i].Name]));
|
WriteStr := WriteStr + bmpArray[i].Name + ', ';
|
||||||
FreeAndNil(BmpArray[i]);
|
FreeAndNil(BmpArray[i]);
|
||||||
end;
|
end;
|
||||||
|
if WriteStr <> '[' then //Has unfreed bitmaps
|
||||||
|
begin
|
||||||
|
SetLength(WriteStr,length(WriteStr)-1);
|
||||||
|
WriteStr[Length(writeStr)] := ']';
|
||||||
|
TClient(Client).Writeln(Format('The following bitmaps were not freed: %s',[WriteStr]));
|
||||||
|
end;
|
||||||
SetLength(BmpArray,0);
|
SetLength(BmpArray,0);
|
||||||
SetLength(FreeSpots,0);
|
SetLength(FreeSpots,0);
|
||||||
inherited Destroy;
|
inherited Destroy;
|
||||||
|
@ -73,11 +73,12 @@ end;
|
|||||||
|
|
||||||
{$DEFINE DTM_DEBUG}
|
{$DEFINE DTM_DEBUG}
|
||||||
destructor TMDTM.Destroy;
|
destructor TMDTM.Destroy;
|
||||||
|
|
||||||
var
|
var
|
||||||
i, j: integer;
|
i, j: integer;
|
||||||
b:boolean;
|
b:boolean;
|
||||||
|
WriteStr : string;
|
||||||
begin
|
begin
|
||||||
|
WriteStr := '[';
|
||||||
for i := 0 to high(DTMList) do
|
for i := 0 to high(DTMList) do
|
||||||
begin
|
begin
|
||||||
b := false;
|
b := false;
|
||||||
@ -90,12 +91,18 @@ begin
|
|||||||
if not b then
|
if not b then
|
||||||
begin;
|
begin;
|
||||||
if DTMList[i].n <> '' then
|
if DTMList[i].n <> '' then
|
||||||
TClient(Client).Writeln(Format('DTM[%s] has not been freed in the script, freeing it now.',[DTMList[i].n]))
|
WriteStr := WriteStr + DTMList[i].n + ', '
|
||||||
else
|
else
|
||||||
TClient(Client).Writeln(Format('DTM[%d] has not been freed in the script, freeing it now.',[i]));
|
WriteStr := WriteStr + inttostr(i) + ', ';
|
||||||
FreeDTM(i);
|
FreeDTM(i);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
if WriteStr <> '[' then //Has unfreed DTMs
|
||||||
|
begin
|
||||||
|
SetLength(WriteStr,length(WriteStr)-1);
|
||||||
|
WriteStr[Length(writeStr)] := ']';
|
||||||
|
TClient(Client).Writeln(Format('The following DTMs were not freed: %s',[WriteStr]));
|
||||||
|
end;
|
||||||
SetLength(DTMList, 0);
|
SetLength(DTMList, 0);
|
||||||
SetLength(FreeSpots, 0);
|
SetLength(FreeSpots, 0);
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ type
|
|||||||
function FindColorTolerance(out x, y: Integer; Color, xs, ys, xe, ye, tol: Integer): Boolean;
|
function FindColorTolerance(out x, y: Integer; Color, xs, ys, xe, ye, tol: Integer): Boolean;
|
||||||
function FindColorsTolerance(out Points: TPointArray; Color, xs, ys, xe, ye, Tol: Integer): Boolean;
|
function FindColorsTolerance(out Points: TPointArray; Color, xs, ys, xe, ye, Tol: Integer): Boolean;
|
||||||
function FindColorsSpiralTolerance(x, y: Integer; out Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer) : boolean;
|
function FindColorsSpiralTolerance(x, y: Integer; out Points: TPointArray; color, xs, ys, xe, ye: Integer; Tolerance: Integer) : boolean;
|
||||||
function FindColors(out TPA: TPointArray; Color, xs, ys, xe, ye: Integer): Boolean;
|
function FindColors(var TPA: TPointArray; Color, xs, ys, xe, ye: Integer): Boolean;
|
||||||
function FindColoredArea(var x, y: Integer; color, xs, ys, xe, ye: Integer; MinArea: Integer): Boolean;
|
function FindColoredArea(var x, y: Integer; color, xs, ys, xe, ye: Integer; MinArea: Integer): Boolean;
|
||||||
function FindColoredAreaTolerance(var x, y: Integer; color, xs, ys, xe, ye: Integer; MinArea, tol: Integer): Boolean;
|
function FindColoredAreaTolerance(var x, y: Integer; color, xs, ys, xe, ye: Integer; MinArea, tol: Integer): Boolean;
|
||||||
//Mask
|
//Mask
|
||||||
@ -1306,7 +1306,7 @@ begin
|
|||||||
TClient(Client).IOManager.FreeReturnData;
|
TClient(Client).IOManager.FreeReturnData;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function TMFinder.FindColors(out TPA: TPointArray; Color, xs, ys, xe, ye: Integer): Boolean;
|
function TMFinder.FindColors(var TPA: TPointArray; Color, xs, ys, xe, ye: Integer): Boolean;
|
||||||
var
|
var
|
||||||
PtrData: TRetData;
|
PtrData: TRetData;
|
||||||
Ptr: PRGB32;
|
Ptr: PRGB32;
|
||||||
|
Loading…
Reference in New Issue
Block a user