1 ' Svjatoslav Agejenko svjatoslav@svjatoslav.eu
\r
5 DECLARE SUB textpage ()
\r
6 DECLARE SUB mkcircle ()
\r
7 DECLARE SUB mklines ()
\r
13 DIM SHARED buf2(1 TO 50, 1 TO 80) AS STRING * 1
\r
14 DIM SHARED buf(1 TO 50, 1 TO 80) AS STRING * 1
\r
15 DIM SHARED col(1 TO 50, 1 TO 80) AS INTEGER
\r
17 DIM SHARED vl, hl, vls, hls
\r
22 OPEN "mkcircle.bas" FOR INPUT AS #1
\r
39 IF INKEY$ <> "" THEN GOTO 2
\r
52 buf(y, x) = buf2(y, x)
\r
61 siz = SIN(frm / 7) + 1.1
\r
63 an = an + SIN(frm / 30) / 10
\r
64 rsx = 50 - SIN(an + pi / 4) * 12 * 20 * siz
\r
65 rsy = 50 - COS(an + pi / 4) * 12 * 20 * siz
\r
67 sxp = SIN(an) * 6 * siz
\r
68 syp = COS(an) * 6 * siz
\r
69 rsxp = SIN(an + pi / 2) * 6 * siz
\r
70 rsyp = COS(an + pi / 2) * 6 * siz
\r
77 IF rsx > 100 THEN rsx = rsx - 100: GOTO 4
\r
78 IF rsx < 0 THEN rsx = rsx + 100: GOTO 4
\r
79 IF rsy > 100 THEN rsy = rsy - 100: GOTO 4
\r
80 IF rsy < 0 THEN rsy = rsy + 100: GOTO 4
\r
91 IF sx > 100 THEN sx = sx - 100: GOTO 3
\r
92 IF sx < 0 THEN sx = sx + 100: GOTO 3
\r
93 IF sy > 100 THEN sy = sy - 100: GOTO 3
\r
94 IF sy < 0 THEN sy = sy + 100: GOTO 3
\r
96 IF sx < 12 OR sy < 12 THEN buf(y, x) = "*": col(y, x) = 9
\r
102 cs = (SIN(frm / 10) + 1.01) * 30
\r
103 cy = SIN(frm / 12) * 30 + 40
\r
104 cx = COS(frm / 17) * 15 + 25
\r
107 xp = SIN(y / 5 + frm / 30) * cs / 10
\r
109 IF (y >= cy - cs) AND (y <= cy + cs) THEN
\r
111 h1 = SQR((y - (cy - cs)) * ((cy + cs) - y))
\r
112 IF (y >= cy - cs / 2) AND (y <= cy + cs / 2) THEN h2 = SQR((y - (cy - cs / 2)) * ((cy + cs / 2) - y)) ELSE h2 = 0
\r
116 IF s < 1 THEN s = 1
\r
118 IF e > 80 THEN e = 80
\r
121 buf(y, x) = CHR$(RND * 40 + 48)
\r
122 col(y, x) = RND * 15
\r
127 IF s < 1 THEN s = 1
\r
129 IF e > 80 THEN e = 80
\r
132 buf(y, x) = CHR$(RND * 200 + 32)
\r
133 col(y, x) = RND * 15
\r
147 IF vl > 49 THEN vls = -1
\r
148 IF vl < 2 THEN vls = 1
\r
151 IF hl > 79 THEN hls = -1
\r
152 IF hl < 2 THEN hls = 1
\r
155 IF buf(vl, x) = "*" THEN c = 31 ELSE c = 10
\r
161 IF buf(y, hl) = "*" THEN c = 31 ELSE c = 10
\r
168 IF EOF(1) <> 0 THEN
\r
170 OPEN "mkcircle.bas" FOR INPUT AS #1
\r
177 buf2(y, x) = buf2(y + 1, x)
\r
185 IF LEN(a$) > 80 THEN a$ = LEFT$(a$, 80)
\r
186 FOR b = 1 TO LEN(a$)
\r
187 c$ = RIGHT$(LEFT$(a$, b), 1)
\r