Added some test files.

This commit is contained in:
Raymond 2010-09-11 14:01:33 +02:00
parent 90ba36babb
commit f825ea80e6
7 changed files with 81 additions and 0 deletions

View File

@ -0,0 +1,6 @@
program new;
{$i srl/srl.scar}
{$i srl/srl/misc/users.scar}
begin
SRLPlayerForm(true,['Jemoeder'],[],[],[]);
end.

View File

@ -0,0 +1,13 @@
program new;
var
x : TMufasaBitmap;
begin
x := TMufasaBitmap.create;
x.SetSize(50,50);
x.Rectangle(IntToBox(5,5,25,25),clRed);
x.Rectangle(IntToBox(10,10,15,15),clPurple);
x.SaveToFile(ScriptPath + 'testme.bmp');
x.FloodFill(point(5,5),clred,clyellow);
x.SaveToFile(ScriptPath + 'testme2.bmp');
x.free;
end.

9
Tests/PS/compress.Simba Normal file
View File

@ -0,0 +1,9 @@
program new;
var
comp,decomp : string;
begin
comp := Base64Encode(CompressString('Dit is een test'));
writeln(comp);
decomp := DecompressString(Base64Decode(comp));
Writeln(decomp);
end.

7
Tests/PS/hexconv.simba Normal file
View File

@ -0,0 +1,7 @@
program new;
begin
Writeln(inttohex(clwhite));
Writeln(hextoint('FAFAFA'));
Writeln($FAFAFA);
Writeln(StrToInt('$FAFAFA'));
end.

17
Tests/PS/messagebox.simba Normal file
View File

@ -0,0 +1,17 @@
program new;
begin
ShowMessage('ShowMessage!');
Writeln('MessageBox -> ');
case MessageBox('This is the text','My Caption', mbYesNoCancel) of
mrYes : Writeln('Pressed yes!');
mrNo : Writeln('Pressed no!');
mrCancel : Writeln('Pressed Cancel!');
end;
Writeln('MessageDlg -> ');
case MessageDlg('Caption','Press a button!',mtError, [mbAbort,mbYes,mbIgnore]) of
mrAbort : Writeln('Pressed abort!');
mrYes : Writeln('Pressed Yes');
mrIgnore: Writeln('Pressed Ignore');
mrCancel: Writeln('pressed Cancel');
end;
end.

18
Tests/PS/pixelshift.simba Normal file
View File

@ -0,0 +1,18 @@
program new;
var
bmp1,bmp2 : integer;
begin
repeat
bmp1 := BitmapFromClient(0,0,514,240);
wait(150);
bmp2 := BitmapFromClient(0,0,514,240);
Writeln(CalculatePixelShift(bmp1,bmp2,inttobox(416,87,514,240)));
Writeln(floattostr(CalculatePixelTolerance(bmp1,bmp2,inttobox(416,87,514,240),0)));
Writeln(floattostr(CalculatePixelTolerance(bmp1,bmp2,inttobox(416,87,514,240),1)));
freebitmap(bmp1);
freebitmap(bmp2);
wait(150);
until false;
end.

11
Tests/PS/regex.simba Normal file
View File

@ -0,0 +1,11 @@
program new;
var
x : TRegExp;
begin
x := TRegExp.create;
x.Expression := 'W?alk';
x.InputString := 'Lets talk bitch!';
Writeln(x.ExecPos(1));
writeln(x.Match[0]);
x.free;
end.