mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-25 10:42:20 -05:00
Merge ssh://villavu.com:54367/simba
This commit is contained in:
commit
21286973fd
@ -361,7 +361,7 @@ begin
|
|||||||
Includes.Add(path);
|
Includes.Add(path);
|
||||||
|
|
||||||
try
|
try
|
||||||
f:= TFileStream.Create(UTF8ToSys(Path), fmOpenRead or fmShareDenyWrite);
|
f:= TFileStream.Create(UTF8ToSys(Path), fmOpenRead);
|
||||||
SetLength(contents, f.Size);
|
SetLength(contents, f.Size);
|
||||||
f.Read(contents[1], Length(contents));
|
f.Read(contents[1], Length(contents));
|
||||||
result:= true;
|
result:= true;
|
||||||
|
@ -75,8 +75,8 @@ var
|
|||||||
angle : extended;
|
angle : extended;
|
||||||
begin
|
begin
|
||||||
angle := ArcTan2(pt.y-my,pt.x-mx);
|
angle := ArcTan2(pt.y-my,pt.x-mx);
|
||||||
result.y := round(sin(angle) * newdist) + mx;
|
result.x := round(cos(angle) * newdist) + mx;
|
||||||
result.x := round(cos(angle) * newdist) + my;
|
result.y := round(sin(angle) * newdist) + my;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function ChangeDistTPA(var TPA : TPointArray; mx,my : integer; newdist : extended) : boolean;
|
function ChangeDistTPA(var TPA : TPointArray; mx,my : integer; newdist : extended) : boolean;
|
||||||
@ -92,8 +92,8 @@ begin
|
|||||||
for i := high(TPA) downto 0 do
|
for i := high(TPA) downto 0 do
|
||||||
begin
|
begin
|
||||||
angle := ArcTan2(TPA[i].y-my,TPA[i].x-mx);
|
angle := ArcTan2(TPA[i].y-my,TPA[i].x-mx);
|
||||||
TPA[i].y := round(sin(angle) * newdist) + mx;
|
TPA[i].x := round(cos(angle) * newdist) + mx;
|
||||||
TPA[i].x := round(cos(angle) * newdist) + my;
|
TPA[i].y := round(sin(angle) * newdist) + my;
|
||||||
end;
|
end;
|
||||||
except
|
except
|
||||||
result := false;
|
result := false;
|
||||||
|
Loading…
Reference in New Issue
Block a user