home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
commodore-users-of-norman
/
CUON_02_(08-1984).d64
/
potholes
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
3KB
|
132 lines
10 REM:** COMPUTE GAZETTE SEP 83 **
20 REM:** POTHOLES **
30 REM:** U-UP:D-DOWN:L-LEFT:R-RIGHT **
40 REM:** <CLEAR> RESETS HIGH SCORE **
70 POKE53280,1:POKE53281,1
80 PRINT"[147][144]HOLD ON A SECOND WHILE I GET MYSELF TOGETHER..."
90 RESTORE:FORI=0TO8:READA:NEXT
91 POKE56334,PEEK(56334)AND254
92 POKE1,PEEK(1)AND251
93 FORI=0TO511:POKE12288+I,PEEK(53248+I):NEXT
94 POKE1,55:POKE56334,PEEK(56334)OR1
95 I=12505
96 READA:IFA<>256THENPOKEI,A:I=I+1:GOTO96
99 POKE53272,28
110 GOSUB20000:GOTO1010
300 GETD$:P=PEEK(203):IFP=64THENHA=4:RETURN
310 IFP=33THENP=0:GOTO360
320 IFP=36THENP=1:GOTO360
330 IFP=34THENP=2:GOTO360
340 IFP=37THENP=3:GOTO360
350 RETURN
360 IFPEEK(A+M(P))=33THENRETURN
370 HA=P:RETURN
400 IFHB<>4THENB1=B+M(HB)
402 IFCN>0THENRETURN
403 IFCN=0THENHB=4:RETURN
405 HY=INT((B-VR+1)/40)-INT((A-VR+1)/40)
410 HX=B-A-HY*40:CN=3
420 IFABS(HX)>ABS(HY)THEN450
430 IFHY>=0THENHB=0:RETURN
440 HB=1:RETURN
450 IFHX>0THENHB=2:RETURN
460 HB=3:RETURN
500 IFHA=4THENRETURN
510 A1=A+M(HA):D=PEEK(A1)
520 IFD=32THENRETURN
530 IFD=31THEN560
540 IFD=33THENHA=4:RETURN
550 OV=1:RETURN
560 S=S+TE:PO=PO-1
570 POKE214,3:S$=STR$(S):SL=LEN(S$):PRINTSPC(22-SL)MID$(S$,2,SL-1)
580 RETURN
600 IFHB=4THENRETURN
610 B1=B+M(HB):D=PEEK(B1)
620 IFD=32ORD=31THENRETURN
630 OV=1:RETURN
1000 GOTO6000
1010 GOSUB10000
1020 GOSUB1100:GOSUB1200
1040 IFOV=1THEN1700
1050 IFPO=0THEN1500
1060 GOTO1020
1100 IFHA<>4THENPOKEA,32:A=A1:POKEA,CH(HA):POKEA+CR,2
1110 GOSUB300:GOSUB500
1120 RETURN
1200 IFHB<>4THENPOKEB,UN:POKEB+CR,7:B=B1:UN=PEEK(B):POKEB,CH(HB):POKEB+CR,14
1210 CN=CN-1
1220 GOSUB400:GOSUB600
1230 RETURN
1500 GOSUB1100:POKE214,15:PRINT""SPC(16)"BONUS"
1510 BO=TE*20:S=S+BO:TE=TE+5
1520 PRINTSPC(16)BO
1530 GOSUB3000:FORI=0TO500:NEXT:GOTO1010
1700 GOSUB1100
1710 POKEB,32:POKEA,42
1720 GOSUB3200
1730 CA=CA-1:OV=0:IFCA=0THEN4000
1740 GOTO1010
3000 FORSL=0TO20
3010 FORS1=0THE40:NEXT
3020 FORS1=0TO20:NEXT:NEXT
3030 RETURN
3100 FORSL=0TO30
3110 FORS1=0TO10:NEXT
3120 FORS1=0TO10:NEXT:NEXT
3130 RETURN
3200 FORSL=15TO0STEP-1
3220 FORS1=0TO9:NEXT:POKEA+CR,4
3230 FORS1=0TO9:NEXT:POKEA+CR,1:NEXT
3250 RETURN
4000 GOSUB3100
4001 PRINT""
4010 FORS1=0TO18
4020 PRINT" ":NEXT
4030 POKE214,6
4031 PRINT"* GAME OVER *"
4040 IFS>HSTHENHS=S:PRINT"[159]TOP SCORE..."
4050 PRINT"TRY AGAIN?"
4060 PRINTSPC(7)"<Y/N>"
4070 POKE214,10:S$=STR$(HS):SL=LEN(S$)
4071 PRINT""SPC(22-SL)MID$(S$,2,SL-1)
6000 GETD$:IFD$=""THEN6000
6010 IFD$="Y"THEN6100
6020 IFD$="N"THENPRINT"[147][144]":END
6030 IFD$="[147]"THENRUN
6040 GOTO6000
6100 CA=3:S=0:TE=5
6110 GOTO1010
10000 PRINT"[147] ** POTHOLES **"
10010 PRINT"[158]!!!!!!!!!!!!!!!"
10020 FORI=0TO5
10030 PRINT"!_____________!"
10040 PRINT"!_!!_!!_!!_!!_!"
10050 PRINT"!_!!_!!_!!_!!_!":NEXT
10060 PRINT"!_____________!"
10065 PRINT"!!!!!!!!!!!!!!!"
10070 PRINT"_ ="TE;TAB(10)"["CA;
10080 PRINT""SPC(16)"SCORE"
10090 S$=STR$(S):SL=LEN(S$):PRINTSPC(22-SL)MID$(S$,2,SL-1)
10100 PRINT""SPC(17)"HIGH"
10110 PRINT""SPC(16)"SCORE"
10120 S$=STR$(HS):SL=LEN(S$):PRINTSPC(22-SL)MID$(S$,2,SL-1)
10130 A=81+VR:B=813+VR:UN=31
10140 POKEA,28:POKEA+CR,2
10150 POKEB,27:POKEB+CR,14
10200 HA=4:HB=4:PO=150:CN=20
10210 PRINT"":RETURN
20000 DIMM(3),CH(3)
20010 VR=1024:CR=54272:CA=3:TE=5:OV=0
20020 RESTORE:FORI=0TO3:READM(I),CH(I):NEXT
20030 DATA-40,27,40,28,-1,29,1,30
20040 REM:POKE36878,10
20050 RETURN
30000 DATA84,124,84,16,16,186,254,186
30010 DATA186,254,186,16,16,84,124,84
30020 DATA14,228,78,254,254,78,228,14
30030 DATA112,39,114,127,127,114,39,112
30040 DATA0,0,24,24,24,0,0,0
30050 DATA0,0,0,0,0,0,0,0
30060 DATA170,85,170,85,170,85,170,85
30070 DATA0,0,0,0,0,0,0,256