mirror of
https://github.com/moparisthebest/Simba
synced 2024-11-22 17:22:21 -05:00
Minor fixes
This commit is contained in:
parent
c29d3b66e4
commit
89e30c1af5
@ -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