apple2a/examples/stars.bas
2018-08-06 11:31:44 -07:00

53 lines
942 B
QBasic

10 GR
20 TS = 40
30 DIM DX(9),DY(9),C(9),X(9),Y(9),T(9)
1000 DX(0) = -1
1005 DY(0) = -19
1010 C(0) = 1
1015 T(0) = 26
1100 DX(1) = -14
1105 DY(1) = -13
1110 C(1) = 5
1115 T(1) = 23
1200 DX(2) = 12
1205 DY(2) = -15
1210 C(2) = 7
1215 T(2) = 3
1300 DX(3) = 19
1305 DY(3) = 2
1310 C(3) = 9
1315 T(3) = 10
1400 DX(4) = 17
1405 DY(4) = -10
1410 C(4) = 12
1415 T(4) = 4
1500 DX(5) = 17
1505 DY(5) = -9
1510 C(5) = 9
1515 T(5) = 5
1600 DX(6) = 15
1605 DY(6) = 12
1610 C(6) = 4
1615 T(6) = 22
1700 DX(7) = -18
1705 DY(7) = -8
1710 C(7) = 5
1715 T(7) = 23
1800 DX(8) = -2
1805 DY(8) = -19
1810 C(8) = 1
1815 T(8) = 29
1900 DX(9) = -7
1905 DY(9) = 18
1910 C(9) = 10
1915 T(9) = 28
2200 I = 0
2210 OX = X(I) : OY = Y(I)
2220 X(I) = 20 + DX(I) * T(I) / 40
2230 Y(I) = 20 + DY(I) * T(I) / 40
2235 T(I) = T(I) + 1 : IF T(I) = TS THEN T(I) = 0
2240 COLOR=0 : PLOT OX, OY
2250 COLOR=C(I) : PLOT X(I), Y(I)
2260 I = I + 1 : IF I < 10 GOTO 2210
2300 GOTO 2200