Skip to content

Commit 266fdce

Browse files
committed
FreePascal compilation issues are solved.
`CRT` and `Graph` units are replaced with their counterparts in the FreePascal. A workaround for an issue in `arc()` procedure is added. The `arc()` procedure in FreePascal 3.0.4 behaves wrongly if `StAngle > EndAngle`. So, the antenna's arc has been split on two.
1 parent f682fe1 commit 266fdce

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

dos/MOON.PAS

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
program moon;
22
uses
3-
crt,graph;
3+
ptccrt,ptcgraph;
44
var
55
driver,mode,level,x,y,vy,vx,rnx,rny,rvx,rvy,rcx,rcy,rwx,rwy: integer;
66
answer: string;
@@ -13,8 +13,9 @@ begin
1313
write('Введите уровень сложности (1,2,3,4): ');
1414
readln(level);
1515
bgn:
16-
driver:=detect;
17-
initgraph(driver,mode,'d:\bp7.0\bgi');
16+
driver:=VGA;
17+
mode:=VGAHi;
18+
initgraph(driver,mode,'');
1819
x:=320;
1920
y:=0;
2021
vx:=513;
@@ -44,7 +45,9 @@ begin
4445
line(540,400,600,400); {в линия}
4546
line(540,400,510,430); {л линия}
4647
line(600,400,630,430); {п линия}
47-
arc(506,420,250,20,10); {антена}
48+
{антена}
49+
arc(506,420,250,360,10);
50+
arc(506,420,0,20,10);
4851
line(513,427,508,422); {палочка в антене}
4952
line(vx,vy,vx-5,vy-5); {волна}
5053
if vy<0 then

0 commit comments

Comments
 (0)