2 ' made by Svjatoslav Agejenko
\r
4 ' H-Page: svjatoslav.eu
\r
5 ' E-Mail: svjatoslav@svjatoslav.eu
\r
7 DECLARE SUB prn (x!, y!, a$)
\r
8 DECLARE SUB pch (x!, y!, a$)
\r
9 DECLARE SUB readfnt ()
\r
10 DECLARE SUB ruut2 (x!, y!, z!, s!)
\r
11 DECLARE SUB ruut (x!, y!, z!, s!)
\r
12 DECLARE SUB kuus (x, y, z, s)
\r
13 DECLARE SUB porand ()
\r
14 DECLARE SUB addp (x, y, z)
\r
15 ' kursor keys and to z, w - rotate
\r
16 ' <SPACE> - speed down
\r
19 DECLARE SUB start ()
\r
20 DECLARE SUB addsq (x1%, y1%, z1%)
\r
21 DECLARE SUB getcor ()
\r
22 DECLARE SUB mulcor ()
\r
23 DECLARE SUB nait3d ()
\r
24 DECLARE SUB calcsin ()
\r
25 DIM SHARED xn(4000), yn(4000), zn(4000)
\r
26 DIM SHARED x(4000), y(4000), z(4000)
\r
28 DIM SHARED xo(4000), yo(4000), zo(4000)
\r
29 DIM SHARED point1(4000), point2(4000)
\r
30 DIM SHARED col(4000)
\r
31 DIM SHARED nump, numl
\r
32 DIM SHARED myx, myy, myz, mye, myk
\r
33 DIM SHARED tpx(0 TO 10, 0 TO 255)
\r
34 DIM SHARED tpy(0 TO 10, 0 TO 255)
\r
35 DIM SHARED tl1(0 TO 10, 0 TO 255)
\r
36 DIM SHARED tl2(0 TO 10, 0 TO 255)
\r
84 point1(numl + 1) = nump + 1
\r
85 point2(numl + 1) = nump + 2
\r
87 point1(numl + 2) = nump + 2
\r
88 point2(numl + 2) = nump + 3
\r
90 point1(numl + 3) = nump + 3
\r
91 point2(numl + 3) = nump + 4
\r
93 point1(numl + 4) = nump + 4
\r
94 point2(numl + 4) = nump + 1
\r
96 point1(numl + 5) = nump + 5
\r
97 point2(numl + 5) = nump + 6
\r
99 point1(numl + 6) = nump + 6
\r
100 point2(numl + 6) = nump + 7
\r
102 point1(numl + 7) = nump + 7
\r
103 point2(numl + 7) = nump + 8
\r
105 point1(numl + 8) = nump + 8
\r
106 point2(numl + 8) = nump + 5
\r
108 point1(numl + 9) = nump + 5
\r
109 point2(numl + 9) = nump + 1
\r
111 point1(numl + 10) = nump + 6
\r
112 point2(numl + 10) = nump + 2
\r
114 point1(numl + 11) = nump + 7
\r
115 point2(numl + 11) = nump + 3
\r
117 point1(numl + 12) = nump + 8
\r
118 point2(numl + 12) = nump + 4
\r
126 xn(nump + 1) = -150
\r
127 yn(nump + 1) = -125 + 201
\r
130 xn(nump + 2) = -150
\r
131 yn(nump + 2) = -125 + 201
\r
134 xn(nump + 3) = -150
\r
135 yn(nump + 3) = -125
\r
138 xn(nump + 4) = -150
\r
139 yn(nump + 4) = -125
\r
142 point1(numl + 1) = nump + 1
\r
143 point2(numl + 1) = nump + 2
\r
145 point1(numl + 2) = nump + 2
\r
146 point2(numl + 2) = nump + 3
\r
148 point1(numl + 3) = nump + 3
\r
149 point2(numl + 3) = nump + 4
\r
151 point1(numl + 4) = nump + 4
\r
152 point2(numl + 4) = nump + 1
\r
159 prn 0, 0, "three dimensional "
\r
160 prn 0, -3, "text example"
\r
161 prn 0, -6, "etc etc etc"
\r
167 SUB kuus (x, y, z, s)
\r
171 FOR a = 0 + f TO 6 + f STEP 6.28 / 8
\r
176 xn(nump + b) = x1 + x
\r
178 zn(nump + b) = y1 + z
\r
182 point1(numl + 1) = nump + 1
\r
183 point2(numl + 1) = nump + 2
\r
186 point1(numl + 2) = nump + 2
\r
187 point2(numl + 2) = nump + 3
\r
190 point1(numl + 3) = nump + 3
\r
191 point2(numl + 3) = nump + 4
\r
194 point1(numl + 4) = nump + 4
\r
195 point2(numl + 4) = nump + 5
\r
198 point1(numl + 5) = nump + 5
\r
199 point2(numl + 5) = nump + 6
\r
203 point1(numl + 6) = nump + 6
\r
204 point2(numl + 6) = nump + 7
\r
207 point1(numl + 7) = nump + 7
\r
208 point2(numl + 7) = nump + 8
\r
211 point1(numl + 8) = nump + 8
\r
212 point2(numl + 8) = nump + 1
\r
229 myx = myx + SIN(deg1) * mye
\r
230 myz = myz + COS(deg1) * mye
\r
232 myx = myx + COS(deg1) * myk
\r
233 myz = myz - SIN(deg1) * myk
\r
238 C1 = COS(deg1): S1 = SIN(deg1)
\r
239 C2 = COS(Deg2): S2 = SIN(Deg2)
\r
247 x1 = (xo * C1 - zo * S1)
\r
248 z1 = (xo * S1 + zo * C1)
\r
250 y1 = (yo * C2 - z1 * S2)
\r
251 z2 = (yo * S2 + z1 * C2)
\r
259 x(a) = 320 + (x1 / z2 * 500)
\r
261 y(a) = 240 + (y1 / z2 * 500)
\r
269 IF xo(p1) = -1 OR xo(p2) = -1 THEN ELSE LINE (xo(p1), yo(p1))-(xo(p2), yo(p2)), 0
\r
270 IF x(p1) = -1 OR x(p2) = -1 THEN ELSE LINE (x(p1), y(p1))-(x(p2), y(p2)), col(a)
\r
337 IF tpx(c, b) = 999 THEN GOTO 4
\r
339 xn(nump + up) = x + tpx(c, b)
\r
340 yn(nump + up) = y - tpy(c, b)
\r
346 IF tl1(c, b) = 999 THEN GOTO 5
\r
348 point1(numl + ul) = tl1(c, b) + nump + 1
\r
349 point2(numl + ul) = tl2(c, b) + nump + 1
\r
364 FOR x = -100 TO 0 STEP 12.067 + .3
\r
365 FOR z = -100 TO 0 STEP 12.067 + .3
\r
366 kuus x, -125, z, 6.53
\r
367 ruut x + 6.033 + .15, -125, z + 6.033 + .15, 3.111 + .3
\r
371 FOR y = -100 TO 0 STEP 20.3
\r
372 FOR x = -100 TO 0 STEP 20.3
\r
373 ruut2 x, y, 200, 10
\r
382 FOR b = 1 TO LEN(a$)
\r
383 c$ = RIGHT$(LEFT$(a$, b), 1)
\r
384 pch x + b * 3, y, c$
\r
389 OPEN "font.dat" FOR INPUT AS #1
\r
391 IF EOF(1) <> 0 THEN GOTO 2
\r
393 IF LEFT$(a$, 1) = "#" THEN
\r
394 chr = ASC(RIGHT$(LEFT$(a$, 3), 1))
\r
398 IF LEFT$(a$, 1) = "p" THEN
\r
399 tpx(pp, chr) = VAL(RIGHT$(LEFT$(a$, 3), 1))
\r
400 tpy(pp, chr) = VAL(RIGHT$(LEFT$(a$, 5), 1))
\r
403 IF LEFT$(a$, 1) = "l" THEN
\r
404 tl1(lp, chr) = VAL(RIGHT$(LEFT$(a$, 3), 1))
\r
405 tl2(lp, chr) = VAL(RIGHT$(LEFT$(a$, 5), 1))
\r
416 SUB ruut (x, y, z, s)
\r
419 zn(nump + 1) = z + s
\r
421 xn(nump + 2) = x + s
\r
427 zn(nump + 3) = z - s
\r
429 xn(nump + 4) = x - s
\r
433 point1(numl + 1) = nump + 1
\r
434 point2(numl + 1) = nump + 2
\r
437 point1(numl + 2) = nump + 2
\r
438 point2(numl + 2) = nump + 3
\r
441 point1(numl + 3) = nump + 3
\r
442 point2(numl + 3) = nump + 4
\r
445 point1(numl + 4) = nump + 4
\r
446 point2(numl + 4) = nump + 1
\r
453 SUB ruut2 (x, y, z, s)
\r
454 xn(nump + 1) = x - s
\r
455 yn(nump + 1) = y - s
\r
458 xn(nump + 2) = x + s
\r
459 yn(nump + 2) = y - s
\r
462 xn(nump + 3) = x + s
\r
463 yn(nump + 3) = y + s
\r
466 xn(nump + 4) = x - s
\r
467 yn(nump + 4) = y + s
\r
470 point1(numl + 1) = nump + 1
\r
471 point2(numl + 1) = nump + 2
\r
474 point1(numl + 2) = nump + 2
\r
475 point2(numl + 2) = nump + 3
\r
478 point1(numl + 3) = nump + 3
\r
479 point2(numl + 3) = nump + 4
\r
482 point1(numl + 4) = nump + 4
\r
483 point2(numl + 4) = nump + 1
\r