378 lines
5.8 KiB
QBasic
378 lines
5.8 KiB
QBasic
DECLARE SUB pause (time!)
|
|
DECLARE SUB lafin ()
|
|
DECLARE SUB opening ()
|
|
DECLARE SUB stars ()
|
|
DECLARE SUB resetstars ()
|
|
DECLARE SUB photon ()
|
|
DECLARE SUB dematerialize ()
|
|
DECLARE SUB city ()
|
|
DECLARE SUB fire ()
|
|
DECLARE SUB materialize ()
|
|
SCREEN 9
|
|
CLS
|
|
stars
|
|
city
|
|
materialize
|
|
fire
|
|
photon
|
|
resetstars
|
|
dematerialize
|
|
SYSTEM
|
|
|
|
SUB city
|
|
FOR q = 1 TO 15
|
|
PSET (30, 350 - q * 3)
|
|
PSET (34, 350 - q * 3)
|
|
PSET (38, 350 - q * 3)
|
|
PSET (42, 350 - q * 3)
|
|
PSET (46, 350 - q * 3)
|
|
PSET (50, 350 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 9
|
|
PSET (57, 350 - q * 5)
|
|
PSET (65, 350 - q * 5)
|
|
PSET (73, 350 - q * 5)
|
|
|
|
NEXT q
|
|
FOR q = 1 TO 18
|
|
PSET (80, 350 - q * 3)
|
|
PSET (84, 350 - q * 3)
|
|
PSET (88, 350 - q * 3)
|
|
PSET (92, 350 - q * 3)
|
|
PSET (96, 350 - q * 3)
|
|
PSET (100, 350 - q * 3)
|
|
PSET (104, 350 - q * 3)
|
|
NEXT q
|
|
PSET (84, 293)
|
|
FOR q = 1 TO 2
|
|
PSET (88, 293 + 3 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 3
|
|
PSET (92, 293 + 3 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 4
|
|
PSET (96, 293 + 3 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 5
|
|
PSET (100, 293 + 3 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 6
|
|
PSET (104, 293 + 3 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 15
|
|
PSET (109, 355 - q * 5 - 3)
|
|
PSET (117, 355 - q * 5 - 3)
|
|
PSET (125, 355 - q * 5 - 3)
|
|
NEXT q
|
|
|
|
FOR q = 1 TO 35
|
|
PSET (150, 350 - q * 3)
|
|
PSET (151, 350 - q * 3)
|
|
PSET (153, 350 - q * 3)
|
|
PSET (156, 350 - q * 3)
|
|
PSET (160, 350 - q * 3)
|
|
NEXT q
|
|
FOR q = 145 TO 165
|
|
PSET (q, 243)
|
|
NEXT q
|
|
FOR q = 135 TO 175
|
|
PSET (q, 240)
|
|
NEXT q
|
|
FOR q = 143 TO 167
|
|
PSET (q, 237)
|
|
NEXT q
|
|
FOR q = 1 TO 10
|
|
PSET (155, 235 - q)
|
|
NEXT q
|
|
|
|
FOR q = 1 TO 30
|
|
PSET (230, 350 - q * 3)
|
|
PSET (234, 350 - q * 3)
|
|
PSET (238, 350 - q * 3)
|
|
PSET (242, 350 - q * 3)
|
|
PSET (246, 350 - q * 3)
|
|
PSET (250, 350 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 18
|
|
PSET (257, 350 - q * 5)
|
|
PSET (265, 350 - q * 5)
|
|
PSET (273, 350 - q * 5)
|
|
NEXT q
|
|
|
|
FOR q = 1 TO 15
|
|
PSET (330, 350 - q * 3)
|
|
PSET (334, 350 - q * 3)
|
|
PSET (338, 350 - q * 3)
|
|
PSET (342, 350 - q * 3)
|
|
PSET (346, 350 - q * 3)
|
|
PSET (350, 350 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 9
|
|
PSET (357, 350 - q * 5)
|
|
PSET (365, 350 - q * 5)
|
|
PSET (373, 350 - q * 5)
|
|
NEXT q
|
|
|
|
FOR q = 1 TO 18
|
|
PSET (390, 350 - q * 3)
|
|
PSET (394, 350 - q * 3)
|
|
PSET (398, 350 - q * 3)
|
|
PSET (402, 350 - q * 3)
|
|
PSET (406, 350 - q * 3)
|
|
PSET (410, 350 - q * 3)
|
|
PSET (414, 350 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 11
|
|
PSET (419, 355 - q * 5 - 3)
|
|
PSET (427, 355 - q * 5 - 3)
|
|
PSET (435, 355 - q * 5 - 3)
|
|
NEXT q
|
|
|
|
FOR q = 1 TO 18
|
|
PSET (480, 350 - q * 3)
|
|
PSET (484, 350 - q * 3)
|
|
PSET (488, 350 - q * 3)
|
|
PSET (492, 350 - q * 3)
|
|
PSET (496, 350 - q * 3)
|
|
PSET (500, 350 - q * 3)
|
|
PSET (504, 350 - q * 3)
|
|
NEXT q
|
|
PSET (484, 293)
|
|
FOR q = 1 TO 2
|
|
PSET (488, 293 + 3 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 3
|
|
PSET (492, 293 + 3 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 4
|
|
PSET (496, 293 + 3 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 5
|
|
PSET (500, 293 + 3 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 6
|
|
PSET (504, 293 + 3 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 15
|
|
PSET (509, 355 - q * 5 - 3)
|
|
PSET (517, 355 - q * 5 - 3)
|
|
PSET (525, 355 - q * 5 - 3)
|
|
NEXT q
|
|
|
|
FOR q = 1 TO 30
|
|
PSET (550, 350 - q * 3)
|
|
PSET (554, 350 - q * 3)
|
|
PSET (558, 350 - q * 3)
|
|
PSET (562, 350 - q * 3)
|
|
PSET (566, 350 - q * 3)
|
|
PSET (570, 350 - q * 3)
|
|
NEXT q
|
|
FOR q = 1 TO 18
|
|
PSET (577, 350 - q * 5)
|
|
PSET (585, 350 - q * 5)
|
|
PSET (593, 350 - q * 5)
|
|
NEXT q
|
|
|
|
END SUB
|
|
|
|
SUB dematerialize
|
|
SLEEP 1
|
|
FOR z = 1 TO 50
|
|
COLOR 0
|
|
a% = INT(RND * 30) + 1
|
|
PSET (300 + a%, 30)
|
|
b% = INT(RND * 28) + 1
|
|
PSET (301 + b%, 31)
|
|
c% = INT(RND * 28) + 1
|
|
COLOR 0
|
|
PSET (301 + c%, 29)
|
|
pause .005
|
|
NEXT z
|
|
COLOR 0
|
|
LINE (300, 30)-(330, 30)
|
|
LINE (301, 31)-(329, 31)
|
|
COLOR 0
|
|
LINE (301, 29)-(329, 29)
|
|
|
|
END SUB
|
|
|
|
SUB fire
|
|
FOR a = 1 TO 31
|
|
COLOR 4
|
|
PSET (299 + a, 30)
|
|
pause .005
|
|
NEXT a
|
|
|
|
FOR i = 2 TO 15
|
|
COLOR i
|
|
LINE (316, 32)-(40, 350)
|
|
pause .002
|
|
NEXT i
|
|
|
|
COLOR 4
|
|
FOR s = 1 TO 100
|
|
CIRCLE (40, 350), s
|
|
pause .00001
|
|
NEXT s
|
|
|
|
COLOR 0
|
|
LINE (316, 32)-(40, 350)
|
|
|
|
FOR a = 1 TO 100
|
|
CIRCLE (40, 350), a
|
|
pause .00001
|
|
NEXT a
|
|
|
|
COLOR 15
|
|
LINE (300, 30)-(330, 30)
|
|
|
|
FOR a = 1 TO 31
|
|
COLOR 4
|
|
PSET (299 + a, 30)
|
|
pause .005
|
|
NEXT a
|
|
|
|
FOR i = 2 TO 15
|
|
COLOR i
|
|
LINE (316, 32)-(150, 250)
|
|
pause .002
|
|
NEXT i
|
|
|
|
COLOR 4
|
|
FOR s = 1 TO 100
|
|
CIRCLE (150, 250), s
|
|
pause .00001
|
|
NEXT s
|
|
|
|
COLOR 0
|
|
LINE (316, 32)-(150, 250)
|
|
|
|
FOR a = 1 TO 100
|
|
CIRCLE (150, 250), a
|
|
pause .00001
|
|
NEXT a
|
|
|
|
COLOR 15
|
|
LINE (300, 30)-(330, 30)
|
|
|
|
FOR a = 1 TO 31
|
|
COLOR 4
|
|
PSET (299 + a, 30)
|
|
pause .005
|
|
NEXT a
|
|
|
|
FOR i = 2 TO 15
|
|
COLOR i
|
|
LINE (316, 32)-(410, 350)
|
|
pause .002
|
|
NEXT i
|
|
|
|
COLOR 4
|
|
FOR s = 1 TO 100
|
|
CIRCLE (410, 350), s
|
|
pause .00001
|
|
NEXT s
|
|
|
|
COLOR 0
|
|
LINE (316, 32)-(410, 350)
|
|
|
|
FOR a = 1 TO 100
|
|
CIRCLE (410, 350), a
|
|
pause .00001
|
|
NEXT a
|
|
|
|
COLOR 15
|
|
LINE (300, 30)-(330, 30)
|
|
|
|
FOR a = 1 TO 31
|
|
COLOR 4
|
|
PSET (299 + a, 30)
|
|
pause .005
|
|
NEXT a
|
|
|
|
FOR i = 2 TO 15
|
|
COLOR i
|
|
LINE (316, 32)-(570, 300)
|
|
pause .002
|
|
NEXT i
|
|
|
|
COLOR 4
|
|
FOR s = 1 TO 100
|
|
CIRCLE (570, 300), s
|
|
pause .00001
|
|
NEXT s
|
|
|
|
COLOR 0
|
|
LINE (316, 32)-(570, 300)
|
|
|
|
FOR a = 1 TO 100
|
|
CIRCLE (570, 300), a
|
|
pause .00001
|
|
NEXT a
|
|
|
|
COLOR 15
|
|
LINE (300, 30)-(330, 30)
|
|
|
|
END SUB
|
|
|
|
SUB materialize
|
|
SLEEP 1
|
|
FOR z = 1 TO 50
|
|
COLOR 15
|
|
a% = INT(RND * 30) + 1
|
|
PSET (300 + a%, 30)
|
|
b% = INT(RND * 28) + 1
|
|
PSET (301 + b%, 31)
|
|
c% = INT(RND * 28) + 1
|
|
COLOR 3
|
|
PSET (301 + c%, 29)
|
|
pause .005
|
|
NEXT z
|
|
COLOR 15
|
|
LINE (300, 30)-(330, 30)
|
|
LINE (301, 31)-(329, 31)
|
|
COLOR 3
|
|
LINE (301, 29)-(329, 29)
|
|
|
|
END SUB
|
|
|
|
SUB pause (time)
|
|
t = TIMER + time
|
|
DO: LOOP WHILE TIMER < t
|
|
END SUB
|
|
|
|
SUB photon
|
|
FOR o = 1 TO 350
|
|
COLOR 14
|
|
CIRCLE (315, 33 + o), 2
|
|
pause .00004
|
|
COLOR 0
|
|
CIRCLE (315, 33 + o), 2
|
|
NEXT o
|
|
COLOR 4
|
|
FOR i = 1 TO 400
|
|
CIRCLE (315, 400), i
|
|
pause .00001
|
|
NEXT i
|
|
COLOR 0
|
|
FOR i = 1 TO 400
|
|
CIRCLE (315, 400), i
|
|
pause .00001
|
|
NEXT i
|
|
END SUB
|
|
|
|
SUB resetstars
|
|
COLOR 15
|
|
FOR s = 1 TO 50
|
|
PSET (INT(RND * 640), (INT(RND * 230) + 120))
|
|
NEXT s
|
|
END SUB
|
|
|
|
SUB stars
|
|
COLOR 15
|
|
FOR s = 1 TO 200
|
|
PSET (INT(RND * 640), (INT(RND * 350)))
|
|
NEXT s
|
|
END SUB
|
|
|