qbasic/pop.bas
2021-06-12 20:36:23 -07:00

101 lines
1.9 KiB
QBasic

DECLARE SUB pause (time!)
DECLARE SUB fire ()
DECLARE SUB laser ()
DECLARE SUB pop ()
DECLARE SUB icbm ()
DECLARE SUB trees ()
DECLARE SUB baloons ()
CLS
SCREEN 12
trees
baloons
laser
pop
fire
SYSTEM
SUB baloons
FOR q = 1 TO 100
CIRCLE (q, 100), 10, 4, , , 2
LINE (0 + q, 110)-(-100 + q * 2, 150 + q / 10), 7
pause .05
CIRCLE (q, 100), 10, 0, , , 2
LINE (q, 110)-(-100 + q * 2, 150 + q / 10), 0
NEXT q
CIRCLE (0 + q, 100), 10, 4, , , 2
LINE (q, 110)-(-100 + q * 2, 150 + q / 10), 7
END SUB
SUB fire
FOR noo = 1 TO 3
PLAY "T160O0L32EFGEFDC"
FOR n = 1 TO 6
FOR q = 1 TO 60 'hight of flame
a = SIN(n + q / 10) * 10
FOR b = 1 TO q / 6 'width of flame
PSET (100 + (noo * 20) + a + b, 480 - 60 + q), 4
NEXT b
NEXT q
pause .001
FOR q = 1 TO 60 'hight of flame
a = SIN(n + q / 10) * 10
FOR b = 1 TO q / 6 'width of flame
PSET (100 + (noo * 20) + a + b, 480 - 60 + q), 0
NEXT b
NEXT q
NEXT n
NEXT noo
FOR i = 1 TO 3
PLAY "T160O0L32EFGEFDC"
NEXT i
FOR f = 1 TO 650
CIRCLE (190, 480), f, 4
pause .000001
NEXT f
END SUB
SUB laser
FOR b = 1 TO 15
LINE (640, 300)-(100, 100), b
pause .005
NEXT b
LINE (640, 300)-(100, 100), 0
END SUB
SUB pause (time)
t = TIMER + time
DO: LOOP WHILE TIMER < t
END SUB
SUB pop
FOR i = 1 TO 3
PLAY "T160O0L32EFGEFDC"
NEXT i
FOR r = 1 TO 20
CIRCLE (100, 100), r, 4
pause .0001
NEXT r
FOR r = 1 TO 380
CIRCLE (100, 100 + r), 20 + r / 10, 4
PAINT (100, 100 + r), 4, 4
pause .00001
PAINT (100, 100 + r), 0, 0
NEXT r
CIRCLE (100, 100 + r - 1), 20 + r / 10, 0
FOR i = 1 TO 3
PLAY "T160O0L32EFGEFDC"
NEXT i
END SUB
SUB trees
DRAW "bm0,430"
FOR t = 0 TO 11
tree$ = "c2g10r5g10r5g10r5g10r50h10r5h10r5h10r5h10bd40r2d1c6d4l4u5c2r2bu40"
DRAW "br50X" + VARPTR$(tree$)
NEXT t
CIRCLE (190, 480), 10, 5, , , .5
PAINT (190, 478), 5, 5
pause .5
END SUB