mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-21 16:55:01 -05:00
This one should work.
git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@550 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
parent
816961da9e
commit
8a63cc43ac
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
*.bak
|
||||
*.ppu
|
||||
*.o
|
||||
*.compiled
|
||||
*.or
|
@ -243,7 +243,8 @@ Function ValidMainPointBoxRotated(var dtm: pDTM; const x1, y1, x2, y2: Integer;
|
||||
sAngle, eAngle, aStep: Extended): TBox;
|
||||
|
||||
var
|
||||
i, d: Integer;
|
||||
i: Integer;
|
||||
d:extended;
|
||||
|
||||
begin
|
||||
for i := 1 to high(dtm.c) do
|
||||
@ -252,19 +253,18 @@ begin
|
||||
end;
|
||||
dtm.p[0] := dtm.p[0] - dtm.p[0];
|
||||
|
||||
|
||||
for i := 0 to high(dtm.c) do
|
||||
begin
|
||||
d := max(dtm.p[i].x - dtm.asz[i], d);
|
||||
d := max(dtm.p[i].x + dtm.asz[i], d);
|
||||
d := max(dtm.p[i].y - dtm.asz[i], d);
|
||||
d := max(dtm.p[i].y + dtm.asz[i], d);
|
||||
d := max(d, sqrt(sqr(dtm.p[i].x - dtm.asz[i]) + sqr(dtm.p[i].x - dtm.asz[i])));
|
||||
d := max(d, sqrt(sqr(dtm.p[i].y - dtm.asz[i]) + sqr(dtm.p[i].y - dtm.asz[i])));
|
||||
d := max(d, sqrt(sqr(dtm.p[i].x + dtm.asz[i]) + sqr(dtm.p[i].x + dtm.asz[i])));
|
||||
d := max(d, sqrt(sqr(dtm.p[i].y + dtm.asz[i]) + sqr(dtm.p[i].y + dtm.asz[i])));
|
||||
end;
|
||||
|
||||
Result.x1 := d;
|
||||
Result.y1 := d;
|
||||
Result.x2 := d;
|
||||
Result.y2 := d;
|
||||
Result.x1 := x1 + ceil(d);
|
||||
Result.y1 := y1 + ceil(d);
|
||||
Result.x2 := x2 - ceil(d);
|
||||
Result.y2 := y2 - ceil(d);
|
||||
end;
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user