Difference between revisions of "Legs.bas"
From CPCWiki - THE Amstrad CPC encyclopedia!
(New page: <pre> 10 ' *********** PROGRAM TWO ********** 20 ' * CRAZY LEGS WRITTEN BY * 30 ' * CRAIG MITCHELL * 40 ' ********************************** 50 ' 60 ' ***** DEFINE...) |
|||
Line 1: | Line 1: | ||
+ | [[Category:Programming]] | ||
+ | |||
<pre> | <pre> | ||
10 ' *********** PROGRAM TWO ********** | 10 ' *********** PROGRAM TWO ********** |
Latest revision as of 16:51, 17 December 2010
10 ' *********** PROGRAM TWO ********** 20 ' * CRAZY LEGS WRITTEN BY * 30 ' * CRAIG MITCHELL * 40 ' ********************************** 50 ' 60 ' ***** DEFINE USER KEYS ***** 70 DEFINT a-z:KEY DEF 76,0,0,0,0 80 CLG 0 90 KEY 139,"mode 2:paper 0:pen 1:border 13:ink 0,13:ink 1,0:cls:list"+CHR$(13):KEY 138,"save"+CHR$(34)+"main prog"+CHR$(34)+CHR$(13):GOSUB 750:GOSUB 2990 100 SPEED KEY 20,1 110 GOSUB 1240 120 ' ***** BEGIN NEW GAME ***** 130 MODE 0:INK 0,0:INK 1,26:INK 2,6:INK 3,2:INK 4,18:INK 5,24:INK 6,15:INK 7,16:INK 8,7:INK 12,1:INK 13,9:INK 14,13:INK 15,24 140 lev=1:sc=0:men=3:in=40:stim=900 150 tim=stim:x=10:y=16:chr=248:z1=2:z2=8:z1d=1:z2d=1:PAPER #1,0:PEN #1,2:EI:area=0:fd=0 160 GOSUB 1980 170 EVERY in GOSUB 600 180 ' ***** MOVE PLAYER ***** 190 k$=LOWER$(INKEY$):j=JOY(0):IF fd THEN 2490 200 LOCATE x,y:PAPER TEST((x-1)*32,(26-y)*16):PEN 1:PRINT CHR$(chr):chr=chr+1:IF chr=252 THEN chr=248 210 IF k$="z" OR j=4 THEN LOCATE x,y:PAPER TEST((x-1)*32,(26-y)*16):PRINT" ":x=x-4:GOTO 320 220 IF k$="x" OR j=8 THEN LOCATE x,y:PAPER TEST((x-1)*32,(26-y)*16):PRINT" ":x=x+4:GOTO 320 230 IF k$="p" OR j=1 THEN LOCATE x,y:PAPER TEST((x-1)*32,(26-y)*16):PRINT" ":y=y-4:GOTO 320 240 IF k$="l" OR j=2 THEN LOCATE x,y:PAPER TEST((x-1)*32,(26-y)*16):PRINT" ":y=y+4:GOTO 320 250 tim=tim-1:LOCATE 15,4:PAPER 0:PEN 13:PRINT tim:IF tim<1 THEN 2490 260 ' ***** ANIMATE FACES ***** 270 IF face=0 THEN PEN 5:LOCATE 3,1:PRINT CHR$(224):LOCATE 18,1:PRINT CHR$(225) 280 IF face=10 THEN PEN 5:LOCATE 3,1:PRINT CHR$(225):LOCATE 18,1:PRINT CHR$(224) 290 face=face+1:IF face=20 THEN face=0 300 GOTO 190 310 ' ***** MOVEMENT ROUTINE ***** 320 SOUND 1,160,-1,0,2,1:IF x<2 OR x>18 OR y<8 OR y>24 THEN 2490 330 lb=(lev-1) MOD 3:f1=0 340 col=TEST((x-1)*32,(26-y)*16) 350 ' ***** TEST FOR TELEPORT ***** 360 IF col=0 THEN x=INT(RND*5)*4+2:y=INT(RND*5)*4+8:f1=1:GOTO 340 370 IF f1 THEN SOUND 1,70,-2,15,2,3,31:sc=sc-50:IF sc<0 THEN sc=0 380 ' ***** NEW DISC COLOUR ***** 390 IF lb=0 AND col=9 THEN ncol=11:area=area+1:sc=sc+10:GOTO 470 400 IF lb=1 AND col=9 THEN ncol=10:sc=sc+10:GOTO 470 410 IF lb=1 AND col=10 THEN ncol=11:area=area+1:sc=sc+10:GOTO 470 420 IF lb=2 AND col=9 THEN ncol=10:sc=sc+10:GOTO 470 430 IF lb=2 AND col=10 THEN ncol=11:area=area+1:sc=sc+10:GOTO 470 440 IF lb=2 AND col=11 THEN ncol=9:area=area-1:GOTO 470 450 GOTO 190 460 ' ***** CHANGE DISC COLOUR ***** 470 PAPER 0:LOCATE x-1,y-1:PEN ncol:PRINT CHR$(240)CHR$(143)CHR$(241):LOCATE x-1,y:PRINT CHR$(143)CHR$(143)CHR$(143):LOCATE x-1,y+1:PRINT CHR$(242)CHR$(143)CHR$(243) 480 LOCATE 7,3:PEN 13:PRINT sc 490 IF area=24 THEN 2170 500 GOTO 190 510 ' ***** TUNE 1 INTERRUPT ***** 520 ' ***** SUBROUTINE ***** 530 IF NOT SQ(1) AND 2 THEN SOUND 1,t1(n1,0,0),t1(n1,1,0),15,3:n1=n1+1:IF n1=84 THEN n1=0:AFTER 200 GOSUB 530 540 IF ic THEN INK 2,c1:c1=c1+1:IF c1=27 THEN c1=1 550 IF NOT SQ(4) AND 2 THEN SOUND 4,t1(n2,0,1),t1(n2,1,1),5:n2=n2+1:IF n2=105 THEN n2=0:AFTER 200 GOSUB 530 560 AFTER 8 GOSUB 530 570 RETURN 580 ' ***** X-Y ZAPPER INTERRUPT ***** 590 ' ***** SUBROUTINE ***** 600 LOCATE#1,z1,6:PRINT#1," ":LOCATE#1,20,z2:PRINT#1," " 610 z1=z1+z1d:IF z1=18 OR z1=2 THEN z1d=-z1d 620 z2=z2+z2d:IF z2=24 OR z2=8 THEN z2d=-z2d 630 LOCATE#1,z1,6:PRINT#1,CHR$(253):LOCATE#1,20,z2:PRINT#1,CHR$(252) 640 IF (z1-2)/4<>(z1-2)\4 THEN EI:RETURN 650 IF RND>0.7 THEN RETURN 660 ' ***** DEATH RAYS ***** 670 PRINT#1,CHR$(30)CHR$(23)CHR$(1) 680 SOUND 130,10,1,15,1,2 690 FOR l=1 TO 4:MOVE (z1-1)*32+17,304:DRAWR 0,-303,1:DRAWR -4,0:DRAWR 0,303:MOVE 607,(26-z2)*16-10:DRAWR -607,0:DRAWR 0,2:DRAWR 607,0:NEXT 700 PRINT#1,CHR$(30)CHR$(23)CHR$(0) 710 IF z1=x OR z2=y THEN fd=1 720 RETURN 730 ' ***** DEFINE CHARACTER SET ***** 740 ' ***** AND SET ENVELOPES ***** 750 SYMBOL AFTER 32 760 SYMBOL 48,124,254,206,214,230,254,124,0 770 SYMBOL 49,24,56,120,24,24,126,126,0 780 SYMBOL 50,124,254,142,56,112,254,254,0 790 SYMBOL 51,124,254,134,30,134,254,124,0 800 SYMBOL 52,64,200,216,254,126,24,24,0 810 SYMBOL 53,254,254,192,124,6,198,124,0 820 SYMBOL 54,126,192,252,254,198,254,124,0 830 SYMBOL 55,254,254,206,28,56,112,224,0 840 SYMBOL 56,124,254,198,124,198,254,124,0 850 SYMBOL 57,124,254,198,254,126,6,252,0 860 SYMBOL 65,124,254,198,254,254,198,198,0 870 SYMBOL 66,252,254,198,252,198,254,252,0 880 SYMBOL 67,124,254,198,192,198,254,124,0 890 SYMBOL 68,248,252,206,198,206,252,248,0 900 SYMBOL 69,126,254,192,252,192,254,126,0 910 SYMBOL 70,126,254,192,248,248,192,192,0 920 SYMBOL 71,124,254,192,220,198,254,124,0 930 SYMBOL 72,68,198,198,254,254,198,198,0 940 SYMBOL 73,126,60,24,24,24,60,126,0 950 SYMBOL 74,6,6,6,198,198,254,124,0 960 SYMBOL 75,204,220,248,240,248,220,206,0 970 SYMBOL 76,192,192,192,192,192,254,124,0 980 SYMBOL 77,68,238,254,254,214,198,198,0 990 SYMBOL 78,68,230,246,254,222,206,68,0 1000 SYMBOL 79,124,254,238,198,238,254,124,0 1010 SYMBOL 80,124,254,198,254,252,192,192,0 1020 SYMBOL 81,124,254,238,198,218,236,118,0 1030 SYMBOL 82,124,254,198,252,248,220,206,0 1040 SYMBOL 83,124,254,192,124,6,254,124,0 1050 SYMBOL 84,252,252,180,48,48,48,48,0 1060 SYMBOL 85,68,198,198,198,238,254,124,0 1070 SYMBOL 86,68,198,198,238,124,56,16,0 1080 SYMBOL 87,68,198,198,214,214,254,108,0 1090 SYMBOL 88,198,238,124,56,124,238,198,0 1100 SYMBOL 89,68,198,238,124,56,56,56,0 1110 SYMBOL 90,252,254,28,56,112,254,126,0 1120 SYMBOL 252,0,7,30,124,248,124,30,7 1130 SYMBOL 253,65,99,119,62,62,28,28,8 1140 SYMBOL 240,3,15,31,63,127,127,255,255 1150 SYMBOL 241,192,240,248,252,254,254,255,255 1160 SYMBOL 242,255,255,127,127,63,31,15,3 1170 SYMBOL 243,255,255,254,254,252,248,240,192 1180 DIM disc(2,2):RESTORE 1220:FOR f=0 TO 2:FOR g=0 TO 2:READ disc(f,g):NEXT g,f 1190 ENV 1,15,-1,20:ENV 2,15,1,1:ENT 1,15,-10,1:ENT -2,1,10,1:ENT -3,10,5,1,10,-5,1:ENV 3,15,-1,5:ENV 4,1,-15,1,15,1,1,6,-1,2 1200 RETURN 1210 ' ***** DISC COLOUR DATA ***** 1220 DATA 10,0,5,8,1,2,16,2,3 1230 ' ***** TITLE SCREEN ***** 1240 INK 0,0:INK 1,26:INK 3,2:PAPER 0:MODE 1:CLS:BORDER 0:ic=1 1250 LOCATE 2,19:PEN 1:PAPER 2:PRINT CHR$(135)STRING$(36,CHR$(131))CHR$(139) 1260 FOR f=20 TO 23:LOCATE 2,f:PRINT CHR$(133):LOCATE 39,f:PRINT CHR$(138):NEXT 1270 LOCATE 2,24:PRINT CHR$(141)STRING$(36,CHR$(140))CHR$(142) 1280 PAPER 0:PEN 3:LOCATE 4,21:PRINT"DESIGN & PROGRAM BY CRAIG MITCHELL" 1290 LOCATE 18,22:PRINT CHR$(164)" 1985" 1300 PRINT CHR$(22)CHR$(1):LOCATE 11,24:PEN 0:PRINT"INSTRUCTIONS (Y/N) ?"CHR$(22)CHR$(0) 1310 PAPER 0 1320 n1=0:n2=0:GOSUB 530 1330 FOR x=200 TO 239:a$=CHR$(x) 1340 PEN 2:FOR f=11 TO 7 STEP -1:LOCATE f,2:PRINT a$:NEXT:FOR f=3 TO 8:LOCATE 7,f:PRINT a$:NEXT:FOR f=8 TO 11:LOCATE f,8:PRINT a$:NEXT 1350 FOR f=8 TO 2 STEP -1:LOCATE 13,f:PRINT a$:NEXT:FOR f=14 TO 16:LOCATE f,2:PRINT a$:NEXT:FOR f=3 TO 4:LOCATE 16,f:PRINT a$:NEXT:FOR f=15 TO 14 STEP -1:LOCATE f,4:PRINT a$:NEXT 1360 FOR f=5 TO 6:LOCATE 15,f:PRINT a$:NEXT:FOR f=7 TO 8:LOCATE 16,f:PRINT a$:NEXT 1370 FOR f=8 TO 2 STEP -1:LOCATE 18,f:PRINT a$:NEXT:FOR f=19 TO 21:LOCATE f,2:PRINT a$:NEXT:FOR f=3 TO 8:LOCATE 21,f:PRINT a$:NEXT:FOR f=19 TO 20:LOCATE f,5:PRINT a$:NEXT 1380 FOR f=23 TO 27:LOCATE f,2:PRINT a$:NEXT:FOR f=0 TO 4:LOCATE 27-f,3+f:PRINT a$:NEXT:FOR f=23 TO 27:LOCATE f,8:PRINT a$:NEXT 1390 FOR f=0 TO 2:LOCATE 29+f,2+f:PRINT a$:NEXT:FOR f=0 TO 1:LOCATE 32+f,3-f:PRINT a$:NEXT:FOR f=4 TO 8:LOCATE 31,f:PRINT a$:NEXT 1400 FOR f=10 TO 16:LOCATE 10,f:PRINT a$:NEXT:FOR f=11 TO 13:LOCATE f,16:PRINT a$:NEXT 1410 FOR f=18 TO 15 STEP -1:LOCATE f,10:PRINT a$:NEXT:FOR f=11 TO 16:LOCATE 15,f:PRINT a$:NEXT:FOR f=16 TO 17:LOCATE f,13:PRINT a$:NEXT:FOR f=16 TO 18:LOCATE f,16:PRINT a$:NEXT 1420 FOR f=24 TO 20 STEP -1:LOCATE f,10:PRINT a$:NEXT:FOR f=11 TO 16:LOCATE 20,f:PRINT a$:NEXT:FOR f=21 TO 24:LOCATE f,16:PRINT a$:NEXT:FOR f=15 TO 13 STEP -1:LOCATE 24,f:PRINT a$:NEXT:LOCATE 23,13:PRINT a$ 1430 FOR f=30 TO 26 STEP -1:LOCATE f,10:PRINT a$:NEXT:FOR f=11 TO 13:LOCATE 26,f:PRINT a$:NEXT:FOR f=27 TO 30:LOCATE f,13:PRINT a$:NEXT:FOR f=14 TO 16:LOCATE 30,f:PRINT a$:NEXT 1440 FOR f=29 TO 26 STEP -1:LOCATE f,16:PRINT a$:NEXT 1450 k$=LOWER$(INKEY$) 1460 IF k$="y" THEN re=REMAIN(0):SOUND 135,0,0,1:GOTO 1510 1470 IF k$="n" THEN re=REMAIN(0):SOUND 135,0,0,1:CLS:RETURN 1480 k$=LOWER$(INKEY$):IF k$<>"" THEN 1460 1490 NEXT:GOTO 1330 1500 ' ***** PRINT INSTRUCTIONS ***** 1510 MODE 1:INK 0,6:BORDER 6:INK 1,26:INK 2,0:INK 3,24:PAPER 0:CLS 1520 PEN 1:LOCATE 16,1:PRINT "CRAZY LEGS":LOCATE 15,2:PEN 2:PRINT STRING$(12,208) 1530 PRINT:PEN 3:PRINT" THE OBJECT OF THE GAME IS TO COLOUR ALL":PRINT"THE DISCS ON THE GRID TO THE SAME COLOUR":PRINT"AS THE FOUR SMALL REFERENCE DISCS":PRINT:PRINT"CLUSTERED AROUND THE CENTRE. IN DOING SO" 1540 PRINT"YOU RECEIVE A TIME BONUS AND PROCEDE TO":PRINT:PRINT"THE NEXT LEVEL." 1550 PEN 1:PRINT:PRINT" THE WAY IN WHICH YOU COLOUR THE DISCS":PRINT:PRINT"DEPENDS ON THE LEVEL THAT YOU ARE":PRINT:PRINT"PLAYING ON." 1560 GOSUB 1920 1570 CLS:PEN 2 1580 PRINT "ON EACH LEVEL THERE IS ONE TELEPORT,":PRINT:PRINT"THIS CAN BE USED TO GET OUT OF TROUBLE":PRINT:PRINT"BUT EVERY TIME YOU USE IT YOU LOSE":PRINT:PRINT"50 POINTS." 1590 PEN 1:PRINT:PRINT" "CHR$(199):PRINT CHR$(198)CHR$(159)CHR$(196):PRINT " "CHR$(197) 1600 PEN 3:LOCATE 6,9:PRINT"THIS IS A TELEPORT" 1610 LOCATE 17,11:PEN 1:PRINT"LEVEL 1" 1620 PRINT:PEN 2:PRINT" THIS LEVEL IS THE EASIEST OF THE THREE":PRINT:PRINT"LEVELS. EACH DISC ONLY NEEDS TO BE":PRINT:PRINT"JUMPED ON ONCE TO BE CHANGED TO THE":PRINT:PRINT"COLOUR OF THE REFERENCE DISCS. JUMPING" 1630 PRINT:PRINT"ON THEM TWICE DOES NOT CAUSE THEM TO":PRINT:PRINT"CHANGE BACK TO THEIR ORIGINAL COLOUR." 1640 GOSUB 1920 1650 CLS 1660 PEN 1:PRINT TAB(17):PRINT"LEVEL 2":PEN 3 1670 PRINT:PRINT" ON THIS LEVEL YOU MUST CHANGE ALL THE":PRINT:PRINT"DISCS BY JUMPING ON THEM TWICE EACH.":PRINT:PRINT"AGAIN, JUMPING ON A COMPLETED DISC DOES":PRINT:PRINT"NOT CHANGE IT BACK TO ITS ORIGINAL":PRINT:PRINT"COLOUR." 1680 PEN 1:PRINT TAB(17):PRINT"LEVEL 3":PEN 3 1690 PRINT:PRINT" THIS LEVEL IS THE SAME AS LEVEL 2":PRINT:PRINT"EXCEPT THAT WHEN YOU JUMP ON A COMPLETED":PRINT"DISC IT TURNS BACK TO ITS ORIGINAL":PRINT:PRINT"COLOUR. THIS LEVEL NEEDS STRATEGY AND":PRINT:PRINT"USE OF THE TELEPORT MAY BE NEEDED TO" 1700 PRINT:PRINT"COMPLETE THIS LEVEL." 1710 GOSUB 1920 1720 CLS:PEN 1 1730 PRINT" THERE ARE THREE WAYS OF BEING KILLED,":PRINT:PRINT"THESE ARE :-" 1740 PEN 3:PRINT:PRINT"1 : ";:PEN 2:PRINT"TRYING TO JUMP OFF THE GRID" 1750 PEN 3:PRINT:PRINT"2 : ";:PEN 2:PRINT"RUNNING OUT OF TIME" 1760 PEN 3:PRINT:PRINT"3 : ";:PEN 2:PRINT"BEING SHOT BY THE X-Y ZAPPERS" 1770 PRINT:PRINT:PRINT:PEN 1:PRINT" THE X-Y ZAPPERS ARE THE SMALL RED SHIPS":PRINT"THAT MOVE UP & DOWN ON THE LEFT OF THE":PRINT:PRINT"GRID AND LEFT & RIGHT ON THE TOP OF THE":PRINT:PRINT"GRID - THESE SOMETIMES FIRE DEATH RAYS":PRINT:PRINT"INTO THE GRID." 1780 GOSUB 1920 1790 PEN 1:CLS 1800 PRINT" EVERY TIME LEVEL 3 IS COMPLETED A NEW":PRINT:PRINT"ROUND IS STARTED, THIS MEANS THE":PRINT:PRINT"X-Y ZAPPERS MOVE MORE QUICKLY THAN":PRINT:PRINT"BEFORE AND YOU START ON LEVEL 1 AGAIN." 1810 PRINT:PRINT"AFTER SEVERAL ROUNDS HAVE BEEN COMPLETED":PRINT"HOWEVER, THE GAME STOPS GETTING FASTER":PRINT:PRINT"AND INSTEAD YOU HAVE LESS TIME TO FINISH":PRINT"EACH LEVEL." 1820 GOSUB 1920 1830 CLS 1840 PEN 1:LOCATE 17,1:PRINT"CONTROLS":PEN 2:LOCATE 16,2:PRINT STRING$(10,208) 1850 PRINT:PEN 3:PRINT"KEYBOARD :-":PEN 1 1860 PRINT:PRINT"Z - LEFT : X - RIGHT":PRINT:PRINT"P - UP : L - DOWN" 1870 PRINT:PRINT:PEN 3:PRINT"JOYSTICK :-":PEN 1 1880 PRINT:PRINT"USE JOYSTICK 0." 1890 GOSUB 1920 1900 RETURN 1910 ' ***** WAIT FOR KEYPRESS ***** 1920 FOR f=1 TO 20:k$=INKEY$:NEXT:LOCATE 1,25:PAPER 3:PEN 2:PRINT" PRESS SPACE/FIRE TO CONTINUE "; 1930 PAPER 0 1940 j=0 1950 WHILE k$<>" " AND j<>16:k$=INKEY$:j=JOY(0):WEND 1960 RETURN 1970 ' ***** PRINT GAME SCREEN ***** 1980 BORDER 0:LOCATE 1,1:INK 0,0:INK 2,0:INK 3,0:INK 6,0:INK 7,0:INK 9,0:INK 10,0:INK 11,0:INK 12,0:INK 14,0:INK 15,0 1990 INK 8,7 2000 PAPER 0:PEN 8 2010 FOR f=1 TO 20:k$=INKEY$:NEXT 2020 PRINT CHR$(194)STRING$(3,154);:PEN 1:PRINT" CRAZY LEGS ";:PEN 8:PRINT STRING$(3,154)CHR$(195); 2030 PRINT CHR$(149)SPC(18)CHR$(149);:PRINT CHR$(149);:PEN 4:PRINT"SCORE";:PEN 13:PRINT sc:LOCATE 14,3:PEN 4:PRINT"MEN";:PEN 13:PRINT men:LOCATE 20,3:PEN 8:PRINT CHR$(149); 2040 PRINT CHR$(149);:PEN 4:PRINT"LEVEL";:PEN 13:PRINT lev:PEN 4:LOCATE 11,4:PRINT"TIME";:PEN 13:PRINT tim:PEN 8:LOCATE 20,4:PRINT CHR$(149); 2050 PRINT CHR$(193)STRING$(18,154)CHR$(192) 2060 d1$="":d2$="":d3$="":FOR f=1 TO 5:d1$=d1$+CHR$(240)+CHR$(143)+CHR$(241)+CHR$(32):d2$=d2$+CHR$(15)+CHR$(9)+STRING$(3,143)+CHR$(15)+CHR$(6)+CHR$(154):d3$=d3$+CHR$(242)+CHR$(143)+CHR$(243)+CHR$(32):NEXT 2070 d2$=LEFT$(d2$,37):d4$="":FOR f=1 TO 5:d4$=d4$+" "+CHR$(149)+" ":NEXT 2080 FOR f=1 TO 5:PEN 9:PRINT d1$;d2$;d3$;:IF f<>5 THEN PEN 6:PRINT d4$; 2090 NEXT 2100 PEN 11:LOCATE 8,14:PRINT CHR$(231):LOCATE 12,14:PRINT CHR$(231):LOCATE 8,18:PRINT CHR$(231):LOCATE 12,18:PRINT CHR$(231) 2110 PEN 6:a=INT(RND*5)*4+1:b=INT(RND*5)*4+7:IF a=9 AND b=15 THEN 2110 ELSE LOCATE a,b:PRINT " "+CHR$(199)+" ":LOCATE a,b+1:PRINT CHR$(198)CHR$(159)CHR$(196):LOCATE a,b+2:PRINT" "+CHR$(197)+" " 2120 d1=disc((lev-1) MOD 3,0):d2=disc((lev-1) MOD 3,1):d3=disc((lev-1) MOD 3,2) 2130 INK 0,0:INK 1,26:INK 2,6:INK 3,2:INK 4,18:INK 5,24:INK 6,15:INK 7,16:INK 8,7:INK 9,d1:INK 10,d2:INK 11,d3:INK 12,1:INK 13,9:INK 14,13:INK 15,24 2140 RETURN 2150 ' ***** LEVEL COMPLETION ***** 2160 ' ***** ROUTINE ***** 2170 r=REMAIN(0):SPEED INK 10,10:INK 11,d3,d1:INK 6,6,2:SOUND 135,0 2180 FOR f=0 TO 640 STEP 4:MOVE f,0:DRAWR 0,80,0:MOVE 640-f,320:DRAWR 0,-80:MOVE 640-f,80:DRAWR 0,80:MOVE f,240:DRAWR 0,-80:SOUND 1,f,4,15:SOUND 2,650-f,4,15:NEXT 2190 WINDOW 1,20,6,25 2200 INK 9,2,6:SPEED INK 10,10 2210 LOCATE 6,20:PEN 9:PRINT"TIME BONUS":GOSUB 2470 2220 PEN 14:FOR f=500 TO 100 STEP -100:GOSUB 2470:GOSUB 2470:LOCATE 5,20:PRINT f"POINTS":NEXT 2230 FOR f=1 TO 5:GOSUB 2470:NEXT 2240 IF tim<551 THEN h=6:bo=100:GOTO 2290 2250 IF tim<751 THEN h=8:bo=200:GOTO 2290 2260 IF tim<801 THEN h=10:bo=300:GOTO 2290 2270 IF tim<851 THEN h=12:bo=400:GOTO 2290 2280 h=14:bo=500 2290 h=h*16:TAG 2300 DRAWR 0,0,2:FOR f=0 TO h STEP 2:MOVE 605,f:CALL &BD19:PRINT CHR$(252);:MOVE 621,f-16:DRAWR 20,0,0:DRAWR 0,0,2:SOUND 1,f,2,4:SOUND 2,f+30,2,4:NEXT 2310 TAGOFF 2320 LOCATE 1,1:PRINT CHR$(23)CHR$(1) 2330 FOR g=1 TO 180:MOVE 600,f-10:DRAWR -600,0,RND*15:SOUND 1,0,1,15,0,0,g/6:NEXT 2340 PRINT CHR$(23)CHR$(0) 2350 MOVE 600,f-10:DRAWR -600,0,0 2360 LOCATE 5,21-(h/16):INK 10,13,26:PEN 10:PRINT bo"POINTS" 2370 SOUND 1,40,-1,15,1,3 2380 WINDOW 1,20,1,25:PEN 13 2390 FOR f=sc TO sc+bo STEP 5:SOUND 2,(f-sc)/5,1,6:LOCATE 7,3:PRINT f:NEXT:sc=sc+bo 2400 WINDOW 1,20,6,25:FOR f=1 TO 4:GOSUB 2470:NEXT 2410 lev=lev+1:PEN 9:LOCATE 2,20:PRINT "NOW ENTER LEVEL:";lev 2420 FOR f=1 TO 10:GOSUB 2470:NEXT:SOUND 1,40,-1,15,1,3:SOUND 2,10,-1,15,1,3:SOUND 4,80,-1,15,1,3:FOR f=1 TO 2000:NEXT:WINDOW 1,20,1,25 2430 IF lev/4=lev\4 AND in=10 THEN stim=stim-100 2440 IF lev/4=lev\4 AND in>10 THEN in=in-10 2450 GOTO 150 2460 ' ***** SCROLL WINDOW UP **** 2470 LOCATE 1,20:PRINT CHR$(10):SOUND 4,100,5,5:RETURN 2480 ' ***** DEATH ROUTINE ***** 2490 SOUND 135,100,-1,15,1,0,31:r=REMAIN(0):FOR f=1 TO 400:r=RND*7:BORDER r:INK 0,r:NEXT 2500 INK 0,0:BORDER 0 2510 l=640:h=320:x=0:y=0 2520 FOR f=1 TO 81:SOUND 1,200+f*2,1,7:SOUND 2,f,1,7:MOVE x,y:DRAWR l,0,0:DRAWR o,h:DRAWR -l,0:DRAWR 0,-h:x=x+4:y=y+2:l=l-8:h=h-4:NEXT 2530 men=men-1:IF men>0 THEN 150 2540 ' ***** GAME OVER ROUTINE ***** 2550 l=0:h=0:x=320:y=160:FOR f=1 TO 81:SOUND 1,200+f*2,1,7:SOUND 2,f,1,7:MOVE x,y:DRAWR l,0,2:DRAWR 0,h:DRAWR -l,0:DRAWR 0,-h:x=x-4:y=y-2:l=l+8:h=h+4:NEXT 2560 LOCATE 6,16:PEN 9:SPEED INK 40,40:PAPER 2:PRINT "GAME OVER" 2570 FOR g=31 TO 0 STEP -1:INK 9,f MOD 26:FOR f=0 TO g:SOUND 1,f,1,7:SOUND 2,f*g,1,7,0,0:NEXT f,g 2580 PAPER 0:CLS:INK 5,6,2:INK 15,2,6 2590 nhs=0:FOR f=0 TO 4:IF sc<hi(f) THEN NEXT:nhs=1:GOTO 2630 2600 IF f=0 THEN a=1 ELSE a=f 2610 FOR g=4 TO a STEP -1:hi(g)=hi(g-1):hi$(g)=hi$(g-1):NEXT 2620 hi(f)=sc:hi$(f)="----------" 2630 PEN 9:LOCATE 5,2:PRINT"HIGH SCORES" 2640 FOR g=0 TO 4:LOCATE 1,g+4:PEN 8:PRINT g+1:LOCATE 3,g+4:PRINT":";:PEN 4:PRINT hi$(g):LOCATE 14,g+4:PEN 3:PRINT hi(g):NEXT 2650 MOVE 12,393:DRAWR 615,0,5:DRAWR 0,-130:DRAWR -615,0:DRAWR 0,130:MOVE 16,391:DRAWR 607,0,15:DRAWR 0,-126:DRAWR -607,0:DRAWR 0,126 2660 IF nhs THEN FOR f=1 TO 8:LOCATE 1,1:PRINT CHR$(11):NEXT:en=1:t1=0:t2=0:EVERY 10 GOSUB 2940:GOTO 2890 2670 PEN 6:LOCATE 2,11:PRINT "USE ";CHR$(255);" & FIRE/SPACE":LOCATE 4,12:PRINT"TO ENTER NAME:" 2680 a$="ABCDEFGHIJKLMNOPQRSTUVWXYZ.,* " 2690 PEN 14:LOCATE 3,15:PRINT"A B C D E F G H":LOCATE 3,17:PRINT"I J K L M N O P":LOCATE 3,19:PRINT"Q R S T U V W X":LOCATE 3,21:PRINT"Y Z . , * "CHR$(1)CHR$(8)" "CHR$(1)CHR$(13) 2700 LOCATE 3,24:PRINT CHR$(1)CHR$(13);:PEN 13:PRINT"=ENTER ";:PEN 14:PRINT CHR$(1)CHR$(8);:PEN 13:PRINT"=DELETE" 2710 FOR g=1 TO 20:k$=INKEY$:NEXT 2720 LOCATE 4,f+4:INK 11,20,1:PEN 11:PRINT hi$(f);hi(f) 2730 le=1:x=48:y=182:na$="" 2740 MOVE x,y:DRAWR 56,0,1:DRAWR 0,-28:DRAWR -56,0:DRAWR 0,28 2750 t1=0:t2=0:en=1:EVERY 10 GOSUB 2940 2760 k$=LOWER$(INKEY$):j=JOY(0) 2770 IF k$<>" " AND k$<>"z" AND k$<>"x" AND j<>4 AND j<>8 AND j<>16 THEN 2760 2780 MOVE x,y:DRAWR 56,0,0:DRAWR 0,-28:DRAWR -56,0:DRAWR 0,28 2790 IF (k$=" " OR j=16) AND le=31 AND na$<>"" THEN na$=LEFT$(na$,LEN(na$)-1):LOCATE 4,f+4:PRINT na$;"-":WHILE k$=" " OR j<>0:k$=LOWER$(INKEY$):j=JOY(0):WEND 2800 IF (k$=" " OR j=16) AND le=32 THEN 2850 2810 IF k$="x" OR j=8 THEN x=x+64:le=le+1:IF x=560 THEN x=48:y=y-32:IF y=54 THEN x=48:y=182:le=1 2820 IF k$="z" OR j=4 THEN x=x-64:le=le-1:IF x=-16 THEN x=496:y=y+32:IF y=214 THEN x=496:y=86:le=32 2830 IF k$=" " OR j=16 AND le<31 THEN na$=na$+MID$(a$,le,1):LOCATE 4,f+4:PRINT na$:WHILE k$=" " OR j<>0:k$=LOWER$(INKEY$):j=JOY(0):WEND:IF LEN(na$)>9 THEN 2850 2840 MOVE x,y:DRAWR 56,0,1:DRAWR 0,-28:DRAWR -56,0:DRAWR 0,28:GOTO 2760 2850 WINDOW 1,20,10,25:CLS:WINDOW 1,20,1,25:FOR g=1 TO 20:k$=INKEY$:NEXT 2860 LOCATE 4,f+4:PRINT" ":hi$(f)=na$ 2870 PEN 4:LOCATE 4,f+4:PRINT na$:LOCATE 14,f+4:PEN 3:PRINT sc:FOR f=1 TO 8:LOCATE 1,1:PRINT CHR$(11):NEXT 2880 FOR f=1 TO 5000:NEXT 2890 LOCATE 1,25:PAPER 13:PEN 9:PRINT" PRESS SPACE/FIRE "; 2900 IF INKEY$<>" " AND JOY(0)<>16 THEN 2900 2910 re=REMAIN(0):SOUND 135,0:GOTO 110 2920 ' ***** TUNE 2 INTERRUPT ***** 2930 ' ***** SUBROUTINE ***** 2940 IF t2=29 THEN en=4 2950 IF NOT SQ(1) AND 2 THEN SOUND 1,p1(t1,0,0),p1(t1,1,0),15,en:t1=t1+1 2960 IF NOT SQ(4) AND 2 THEN SOUND 4,p1(t2,0,1),p1(t2,1,1),15,en:t2=t2+1:IF t2=56 THEN t1=0:t2=0:en=1 2970 RETURN 2980 ' ***** READ TUNE DATA ***** 2990 MODE 1:BORDER 0:INK 0,0:PAPER 0:CLS:INK 1,4,17:SPEED INK 15,15:LOCATE 15,12:PEN 1:PRINT"PLEASE WAIT" 3000 DIM t1(105,1,2),nn(4),hi$(4),hi(4):RESTORE 3270:cr=40:nn(0)=83:nn(1)=104:hi$(0)=" * MITCH *":hi$(1)="FODSLAP":hi$(2)="ARNOLD":hi$(3)="CLUMSY":hi$(4)="FAG ASH":FOR f=0 TO 4:hi(f)=(5-f)*100:NEXT 3010 FOR n=0 TO 1 3020 FOR f=0 TO nn(n):READ t1(f,0,n),dur$ 3030 IF dur$="q" THEN dur=cr/2 3040 IF dur$="c" THEN dur=cr 3050 IF dur$="dc" THEN dur=cr+cr/2 3060 IF dur$="m" THEN dur=cr*2 3070 IF dur$="s" THEN dur=cr*4 3080 t1(f,1,n)=dur 3090 NEXT f,n 3100 DIM p1(56,1,1) 3110 FOR f=0 TO 53:READ p1(f,0,0),dur$ 3120 IF dur$="q" THEN dur=cr/2 3130 IF dur$="c" THEN dur=cr 3140 IF dur$="dc" THEN dur=cr+cr/2 3150 IF dur$="m" THEN dur=cr*2 3160 IF dur$="dm" THEN dur=cr*4 3170 p1(f,1,0)=dur:NEXT 3180 FOR f=0 TO 55:READ p1(f,0,1),dur$ 3190 IF dur$="q" THEN dur=cr/2 3200 IF dur$="c" THEN dur=cr 3210 IF dur$="dc" THEN dur=cr+cr/2 3220 IF dur$="m" THEN dur=cr*2 3230 IF dur$="dm" THEN dur=cr*4 3240 p1(f,1,1)=dur:NEXT 3250 RETURN 3260 ' ***** DATA FOR TUNE 1 ***** 3270 DATA 284,m,319,q,358,q,284,q,319,q,358,c,179,c,213,q,179,dc,239,m,284,c,358,c,319,s,284,m,319,q,358,q,284,q,319,q,358,c,179,c,213,q,179,dc,239,c,284,q,358,q,319,c,319,c,358,s 3280 DATA 284,m,319,q,358,q,284,q,319,q,358,c,179,c,213,q,179,dc,239,m,284,c,358,c,319,s,284,m,319,q,358,q,284,q,319,q,358,c,179,c,213,q,179,dc,239,c,284,q,358,q,319,c,319,c,358,s 3290 DATA 190,dc,179,q,159,c,239,c,239,dc,213,q,239,c,179,c,179,c,213,c,253,c,213,c,239,s,284,m,319,q,358,q,284,q,319,q,358,c,179,c,213,q,179,dc,239,c,284,q,358,q,319,c,319,c,358,s 3300 DATA 716,m,478,c,379,c,358,c,568,c,536,q,426,dc,716,m,478,c,568,c,478,q,536,q,478,q,379,q,239,q,253,q,284,q,319,q,358,c,478,c,536,q,568,q,568,c,568,c,426,c,506,m,478,c,478,q,568,q,536,c,536,c,568,q,716,q,568,q,478,q,358,q,568,q,478,q,358,q 3310 DATA 716,m,478,c,379,c,358,c,568,c,536,q,426,dc,716,m,478,c,568,c,478,q,536,q,478,q,379,q,239,q,253,q,284,q,319,q,358,c,478,c,536,q,568,q,568,c,568,c,426,c,506,m,478,c,478,q,568,q,536,c,536,c,568,q,716,q,568,q,478,q,358,q,568,q,478,q,358,q 3320 DATA 319,dc,319,q,319,c,379,c,358,dc,358,q,358,c,358,c,358,c,358,c,426,c,358,c,379,s,358,c,478,c,536,q,568,q,568,c,568,c,426,c,506,m,478,c,478,q,568,q,536,c,536,c,568,s 3330 ' ***** DATA FOR TUNE 2 ***** 3340 DATA 319,q,284,q,253,dc,239,q,239,c,213,c,213,m,253,c,213,c,239,dc,253,q,239,c,284,c,253,dm 3350 DATA 319,q,284,q,253,dc,239,q,239,c,213,c,213,m,253,c,213,c,239,dc,253,q,239,c,284,c,319,dm 3360 DATA 213,c,159,dc,169,c,190,c,213,c,213,m,253,c,213,c,239,dc,253,q,239,c,284,c,253,dm,213,c,159,dc,169,c,190,c,213,c,213,m,253,c,213,c,239,dc,253,q,239,c,284,c,319,dm 3370 DATA 506,q,426,q,319,dc,284,q,284,c,253,c,253,m,319,c,253,c,284,dc,319,q,284,c,338,c,319,dm 3380 DATA 506,q,426,q,319,dc,284,q,284,c,253,c,253,m,319,c,253,c,284,dc,319,q,284,c,426,q,478,q,506,dm 3390 DATA 253,c,253,dc,213,c,239,c,253,c,253,m,319,c,253,c,284,dc,319,q,284,c,338,c,319,dm,253,c,253,dc,213,c,239,c,253,c,253,m,319,c,253,c,284,d,319,q,284,c,426,q,478,q,506,dm