mirror of
https://github.com/moparisthebest/Simba
synced 2024-12-25 16:58:53 -05:00
More DTM tests.
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@106 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
b3442cc043
commit
1ff3e33a5e
43
Tests/PS/dtmtest2.txt
Normal file
43
Tests/PS/dtmtest2.txt
Normal file
@ -0,0 +1,43 @@
|
||||
program new;
|
||||
|
||||
const
|
||||
dtm_Rectangle = 0;
|
||||
dtm_Cross = 1;
|
||||
dtm_DiagonalCross = 2;
|
||||
dtm_Circle = 3;
|
||||
dtm_Triangle = 4;
|
||||
|
||||
var
|
||||
ppdtm: pdtm;
|
||||
w,h,x,y,dtm: integer;
|
||||
begin
|
||||
setlength(ppdtm.p,2);
|
||||
setlength(ppdtm.c,2);
|
||||
setlength(ppdtm.t,2);
|
||||
setlength(ppdtm.asz,2);
|
||||
setlength(ppdtm.ash,2);
|
||||
|
||||
ppdtm.p[0].x := 0;
|
||||
ppdtm.p[0].y := 0;
|
||||
ppdtm.c[0] := 16777215;
|
||||
ppdtm.t[0] := 0;
|
||||
ppdtm.asz[0] := 0;
|
||||
ppdtm.asz[0] := dtm_Rectangle;
|
||||
|
||||
ppdtm.p[1].x := 1;
|
||||
ppdtm.p[1].y := 1;
|
||||
ppdtm.c[1] := 16777215;
|
||||
ppdtm.t[1] := 0;
|
||||
ppdtm.asz[1] := 0;
|
||||
ppdtm.asz[1] := dtm_Rectangle;
|
||||
|
||||
dtm := AddpDTM(ppdtm);
|
||||
|
||||
getclientdimensions(w,h);
|
||||
if FindDTM(dtm, x, y, 0, 0, w-1, h-1) then
|
||||
begin
|
||||
writeln('Found DTM at ' + inttostr(x) + ', ' + inttostr(y));
|
||||
movemouse(x,y);
|
||||
end;
|
||||
|
||||
end.
|
Loading…
Reference in New Issue
Block a user