home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
genie-commodore-file-library
/
C64Educational
/
BIRD-SPELL
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
9KB
|
291 lines
50 REM BIRD SPELL BY DOUG HAPMAN
90 REM: FROM B&P PD DISK # 66 PGMS FOR PD # 50 & JGPD # 77
100 GOSUB 2660
110 X=RND(-TI)
120 DIM W(20),W$(500)
130 PRINT"[147]":GOSUB 1190 :REM DRAW HOUSE
140 PRINT"PLEASE WAIT...
150 [141] 1380 :[143] POKE IN SPRITES
160 [141] 1920 :[143] GET WORDS
170 [141] 690 :[143] SET UP SPRITES
180 [153]" "
190 W$[178]W$([187](1)[172]N[170]1)
200 [141] 650
210 L$[178]" ABCDEFGHIJKLMNOPQRSTUVWXYZ"
220 [153]"";
230 [129] I[178]2 [164] 14
240 [153] [202](L$,I,1)"";
250 [130]
260 [153]:[153]"";
270 [129] I[178]15 [164] 27
280 [153] [202](L$,I,1)"";
290 [130]
300 [153]""[166]18[171][195](G$));
310 [129] I[178]1 [164][195](G$)
320 [153] [202](G$,I,1)"";
330 [130]
340 [139] COUNT[179][177][195](W$) [167] 420
350 [151] 198,0
360 [129] DL[178]1 [164] 100:[130] DL:CL[178]CL[170]1:[139] CL[178]3 [167] CL[178]1
370 [153] [202]("OPEN",CL,1);
380 [153]" YOU WIN !!!! PRESS <SPACE>
385 FORT=15TO0STEP-1:POKE54296,T:POKE54296,0:NEXT
390 GET A$:IF A$="" THEN 360
400 GOTO 2610
410 GOSUB 2000
420 GET A$:IF A$<"A" OR A$>"Z" AND A$<>"_" THEN 410
430 IF A$="_" THEN 760
440 P=ASC(A$)-64
450 IF MID$(L$,P+1,1)<>" " THEN 540
460 PRINT" LETTER ALREADY CHOSEN "
470 FOR I=1 TO 6:POKE54296,6:POKE54296,0:NEXT
480 PRINT" "
490 PRINT""SPC(18-LEN(G$));
500 FOR I=1 TO LEN(G$)
510 PRINT MID$(G$,I,1)"";
520 NEXT
530 GOTO 420
540 L$=LEFT$(L$,P)+" "+MID$(L$,P+2)
550 RF=0 :REM FLAG FOR CORRECT GUESS
560 FOR I=1 TO LEN(W$)
570 IF MID$(W$,I,1) <> A$ THEN 610
580 G$=LEFT$(G$,I)+MID$(W$,I,1)+MID$(G$,I+2)
590 RF=RF+1
600 COUNT=COUNT+1
610 NEXT I
620 IF RF=0 THEN GOSUB 1030
630 IF RF THEN GOSUB 2070
640 GOTO 220
650 G$=" "
660 FOR I=1 TO LEN(W$):G$=G$+"-":W(I)=0:NEXT
670 RETURN
680 I=I+1:GOTO 1980
690 REM SET UP SPRITES
700 V=53248
710 FOR I=0 TO 15:POKE V+I,0:NEXT
720 POKE V+21,255
730 FOR I=V+39 TO V+46:POKE I,0:NEXT
740 X=0:Y=60:S=251
750 RETURN
760 PRINT"ENTER YOUR GUESS: ";
770 POKE V+21,PEEK(V+21) AND 254
780 FOR I=1 TO LEN(W$):PRINT"[164]";:NEXT
790 PRINT"";GU$;
800 IFLEN(GU$)<LEN(W$)THENPRINT"[223]";
810 IF LEN(GU$)<LEN(W$)-1 THEN FOR I=2TOLEN(W$)-LEN(GU$):PRINT"[164]";
820 GET K$:IF K$="" THEN 820
830 IF K$=CHR$(20) AND LEN(GU$)>0 THEN GU$=LEFT$(GU$,LEN(GU$)-1):GOTO 790
840 IF K$=CHR$(13) AND LEN(GU$)=LEN(W$) THEN 870
850 IF K$>="A" AND K$<="Z" AND LEN(GU$)<LEN(W$) THEN GU$=GU$+K$
860 GOTO 790
870 IF GU$<>W$ THEN 930
880 PRINT" "
890 PRINT""SPC(18-LEN(" "+W$));
900 FOR I=1 TO LEN(" "+W$)
910 PRINT MID$(" "+W$,I,1)"";
920 NEXT:GOTO 350
930 PRINT"[144] SORRY...YOU LOSE "
935 FORJ=1TO3:FORT=1TO7:POKE54296,10:POKE54296,0:NEXT:FORD=1TO150:NEXT:NEXT
940 PRINT"[144]THE WORD WAS..."
950 PRINT""SPC(18-LEN(" "+W$));
960 FOR I=1 TO LEN(" "+W$)
970 PRINT MID$(" "+W$,I,1)"";
980 FOR D=1 TO 200:NEXT:NEXT
990 PRINT""TAB(13)" >SPACE< "
992 FORD=1TO250:NEXT:PRINT""TAB(13)"PRESS <SPACE>":FORD=1TO250:NEXT
1010 GET A$:IF A$="" THEN 990
1020 GOTO 2610
1030 DB=DB+1:S=S-3
1040 DX=32*DB+16:DY=225
1050 IF DB=8 THEN DB=0
1060 POKEV,XAND255:POKEV+16,PEEK(V+16)AND254OR-(X>255):POKEV+1,Y:POKE2040,S
1070 IF X=0 THEN POKE V+21,PEEK(V+21) OR 1
1080 FLAG=0
1090 IFABS(X-DX)>1THENX=X+3:FLAG=1:IFX>344THENX=0:POKEV+21,PEEK(V+21)AND254
1100 IF Y<DY THEN Y=Y+2:FLAG=1
1110 S=S+1:IF S=251 THEN S=248
1120 IF FLAG THEN 1060
1140 POKE V+2*DB,X AND 255:POKE V+16,PEEK(V+16)OR(2^DB)*(-(X>255))
1150 POKE V+2*DB+1,Y:POKE 2040+DB,254
1160 IF DB<>0 THEN POKE V+21,PEEK(V+21) AND 254
1170 X=0:Y=60:IF DB=0 THEN 930
1190 POKE 53281,3:POKE 53280,4
1200 PRINT"[159]
1210 [153]"
1220 PRINT
1230 PRINT" [146] [172][145][191][146]
1240 [153]" GET WAITINT SYSSTEP(null)STOPWAITFNFN INT ABSWAIT
1250 PRINT" [181] [182][146] [158][169] [223][146][144][165] [146]
1260 [153]" FN +WAIT SYSSTEP (null)WAIT INT ABSWAIT
1270 PRINT" [146] [168] [146] [146]
1280 [153]" PRINT# WAIT NOT WAIT PRINT# WAIT
1290 PRINT"[153] [152] [153] [162][187] [168][153] [152] [153] ";
1300 PRINT" [152] [153] [146] [161] [153] [152] [153] ";
1310 PRINT"[153]";
1320 FOR I=0 TO 8:PRINT" ";:NEXT
1330 FOR I=1 TO 8:L=1024+23*40+I*4:POKE L,114:POKE L+54272,0:NEXT
1340 FOR I=0 TO 39:POKE 1024+24*40+I,160:POKE 55296+24*40+I,13:NEXT
1350 PRINT"
1360 [153]"STOP
1370 RETURN
1380 I=15872:IF PEEK(I+1)=96 THEN FOR I=1 TO 64*6+2:READ A:NEXT:RETURN
1390 READ A:IF A=256 THEN 1410
1400 POKE I,A:I=I+1:GOTO 1390
1410 FOR I=0 TO 63:POKE 254*64+I,PEEK(249*64+I):NEXT:RETURN
1420 DATA 0,96,0,0,113,224,0
1430 DATA 121,176,0,125,252,117,193
1440 DATA 192,127,255,192,113,255,128
1450 DATA 0,252,0,0,24,0,0
1460 DATA 24,0,0,102,0,0,102
1470 DATA 0,0,0,0,0,0,0
1480 DATA 0,0,0,0,0,0,0
1490 DATA 0,0,0,0,0,0,0
1500 DATA 0,0,0,0,0,0,0
1510 DATA 0,0,0,0,0,1,224
1520 DATA 0,1,176,0,127,252,117
1530 DATA 193,192,127,255,192,113,255
1540 DATA 128,0,252,0,0,24,0
1550 DATA 0,24,0,0,102,0,0
1560 DATA 102,0,0,0,0,0,0
1570 DATA 0,0,0,0,0,0,0
1580 DATA 0,0,0,0,0,0,0
1590 DATA 0,0,0,0,0,0,0
1600 DATA 0,0,0,0,0,0,1
1610 DATA 224,0,1,176,112,127,252
1620 DATA 127,221,192,115,185,192,1
1630 DATA 179,128,0,172,0,0,24
1640 DATA 0,0,24,0,0,102,0
1650 DATA 0,102,0,0,0,0,0
1660 DATA 0,0,0,0,0,0,0
1670 DATA 0,0,0,0,0,0,0
1680 DATA 0,0,0,0,0,0,0
1690 DATA 0,0,0,0,96,0,0
1700 DATA 113,224,0,121,176,0,125
1710 DATA 252,117,193,192,127,255,192
1720 DATA 113,255,128,0,252,0,0
1730 DATA 0,0,0,0,0,0,0
1740 DATA 0,0,0,0,0,0,0
1750 DATA 0,0,0,0,0,0,0
1760 DATA 0,0,0,0,0,0,0
1770 DATA 0,0,0,0,0,0,0
1780 DATA 0,0,0,0,0,0,0
1790 DATA 0,1,224,0,1,176,0
1800 DATA 127,252,117,193,192,127,255
1810 DATA 192,113,255,128,0,252,0
1820 DATA 0,0,0,0,0,0,0
1830 DATA 0,0,0,0,0,0,0
1840 DATA 0,0,0,0,0,0,0
1850 DATA 0,0,0,0,0,0,0
1860 DATA 0,0,0,0,0,0,0
1870 DATA 0,0,0,0,0,0,0
1880 DATA 0,0,1,224,0,1,176
1890 DATA 112,127,252,127,221,192,115
1900 DATA 185,192,1,179,128,0,172
1910 DATA 0,0,112,0,0,0,0
1920 DATA 0,0,0,0,0,0,0
1930 DATA 0,0,0,0,0,0,0
1940 DATA 0,0,0,0,0,0,0
1950 DATA 0,0,0,0,0,0,0
1960 DATA 0,0,0,0,0,0,0,256
1970 I=1
1980 READ W$(I):IF W$(I)="*" THEN N=I+1:RETURN
1990 I=I+1:GOTO 1980
2000 POKEV,XAND255:POKEV+16,PEEK(V+16)AND254OR-(X>255):POKEV+1,Y:POKE2040,S
2010 IF X=0 THEN POKE V+21,PEEK(V+21) OR 1
2020 X=X+3:IF X>344 THEN X=0:POKE V+21,PEEK(V+21) AND 254
2030 Y=Y-1+RND(1)*2:IF Y>100 THEN Y=99
2040 IF Y<50 THEN Y=50
2050 S=S+1:IF S=254 THEN S=251
2060 RETURN
2070 DX=INT(P+13*(P>13))*16+24+40
2080 DY=173+INT(P/14)*24:IF S>250 THEN S=S-3
2090 POKEV,XAND255:POKEV+16,PEEK(V+16)AND254OR-(X>255):POKEV+1,Y:POKE2040,S
2100 IF X=0 THEN POKE V+21,PEEK(V+21) OR 1
2110 FLAG=0
2120 IFABS(X-DX)>2THENX=X+3:FLAG=1:IFX>344THENX=0:POKEV+21,PEEK(V+21)AND254
2130 IF Y<DY THEN Y=Y+2:FLAG=1
2140 S=S+1:IF S=251 THEN S=248
2150 IF FLAG THEN 2090
2160 X=DX:Y=DY
2170 POKEV,XAND255:POKEV+16,PEEK(V+16)AND254OR-(X>255):POKEV+1,Y:POKE2040,249
2180 POKE 56334,PEEK(56334) AND 254
2190 POKE 1,PEEK(1) AND 251
2200 FOR I=0 TO 7
2210 B=PEEK(53248+8*P+I)
2220 FOR J=248 TO 250
2230 POKE J*64+40+I*3,B
2240 NEXT J,I
2250 POKE 1,PEEK(1) OR 4
2260 POKE 56334,PEEK(56334) OR 1
2270 PRINT"";
2280 FOR I=2 TO 14
2290 PRINT MID$(L$,I,1)"";
2300 NEXT
2310 PRINT:PRINT"";
2320 FOR I=15 TO 27
2330 PRINT MID$(L$,I,1)"";
2340 NEXT
2350 DX=160-8*LEN(G$):DY=69
2360 POKEV,XAND255:POKEV+16,PEEK(V+16)AND254OR-(X>255):POKEV+1,Y:POKE2040,S
2370 IF X=0 THEN POKE V+21,PEEK(V+21) OR 1
2380 FLAG=0
2390 IFABS(X-DX)>2THENX=X+3:FLAG=1:IFX>344THENX=0:POKEV+21,PEEK(V+21)AND254
2400 IF Y>DY THEN Y=Y-2:FLAG=1
2410 S=S+1:IF S=251 THEN S=248
2420 IF FLAG THEN 2360
2430 X=DX:Y=DY
2440 POKEV,XAND255:POKEV+16,PEEK(V+16)AND254OR-(X>255):POKEV+1,Y:POKE2040,249
2450 PRINT""SPC(18-LEN(G$));
2460 FOR I=1 TO LEN(G$)
2470 IF MID$(G$,I,1)=A$ THEN PRINT A$;:RF=RF-1:IF RF=0 THEN GOSUB 2560
2480 IF MID$(G$,I,1) <> A$ THEN PRINT"";
2490 PRINT"";
2500 IF RF=0 THEN I=100:GOTO 2540
2510 FOR J=0 TO 15:X=X+1:S=S+1:IF S=251 THEN S=248
2520 POKE V,X AND 255:POKE V+16,PEEK(V+16) AND 254 OR -(X>255):POKE 2040,S
2530 NEXT J
2540 NEXT I
2550 RETURN
2560 FOR K=0 TO 7
2570 FOR J=248 TO250
2580 POKE J*64+40+K*3,0
2590 NEXT J,K
2600 RETURN
2610 PRINT"[147][144]DO YOU WISH TO PLAY AGAIN (Y/N) ?"
2615 POKE V+21,PEEK(V+21) AND 254
2620 PRINT"YOU MISSED THIS MANY:"
2630 GET A$:IF A$ <> "N" AND A$ <>"Y" THEN 2630
2640 IF A$="Y" THEN POKE V+21,0:RUN 110
2650 END
2660 POKE 53281,0:POKE 53280,0
2670 PRINT"[147] INSTRUCTIONS
2680 [153]"SYS CHOOSE LETTERS TO GUESS THE WORD.
2690 PRINT"IF YOU GUESS A WRONG LETTER, THE BIRD
2700 [153]"WILL LAND ON ITS PERCH.
2710 PRINT" WHEN ALL THE PERCHES ARE FULL, OR
2720 [153]"YOU GUESSED THE WORD, THE GAME IS OVER
2730 PRINT" YOU CAN HIT THE "CHR$(34)"_"CHR$(34)" KEY ANY TIME TO
2740 [153]"GUESS THE WORD. IF YOU GET IT WRONG, YOU LOSE.
2750 PRINT"PRESS <SPACE> TO BEGIN"
2760 GET A$:IF A$="" THEN 2760
2770 RETURN
2780 DATAHAPPY,BRIDGE,FAMILY,CHILDREN,MONKEYS,RECENTLY,STARWARS,TENTEN,SNOWY
2790 DATA WINDOW,TRAIN,DWARF,BIRDS,CHEVROLET,DODGE,CRYSLER,JAPANESE,RECYCLE
2800 DATA SUPERMAN,CONCERT,PEOPLE,MAGIC,LETTERMAN,LENO,ARSENIO,DONAHUE,SUPER
2810 DATA SPACE,SCIENCE,PLANETS,GALAXY,STARS,WINDOW,JOYSTICK,MODEM,COMMODORE
2820 DATA ROOMS,TEACHER,CHALK,BLACKBOARD,AQUAINTED,CONTEST,INSTANT,WINNER,BOARD
2830 DATA SCREEN,COMPUTER,KEYBOARD,PROGRAM,CONTROL,SCREEN,SOFTDISK,LOADSTAR
2840 DATA SPELLING,WORDS,COLORS,LETTERS,PROCESSOR,GRAPHIC,SEX,VIOLENCE,PRINTING
2850 DATA MARKET,STREETS,SQUARE,TRIANGLE,WINDOW,TRESHHOLD,ENTRANCE,BATMAN,ROBIN
2860 DATA MOVIE,SPACESHIP,LAZER,AIRPLANE,BOAT,SUPERMAN,ALIEN,WALLPAPER,COUCH
2870 DATA STICK,ROCK,PAPER,WIN,PLACE,SHOW,CAMEL,JUICE,JOCKEY,SHORTS,SALUTE
2880 DATA CHANNEL,EXECUTIVE,MONEY,SHIRT,SHIRTTAIL,SNAIL,GRANDPRIX,SPEEDWAY
2890 DATA QUIET,LOUD,BILLBOARD,YACHT,MOTORCYCLE,ROMPER,CATTLE,ATTENUATOR,MASTER
2900 DATA SWITCH,SHOOTER,KILLER,MAGNUM,COMMANDER,WIZARD,WITCHES,WARLOCKS
3000 DATA HUSSEIN,CHRISTMAS,FLOPPY,DISTRIBUTE,WARRANTY,LIMITED,REGISTERED
3005 DATA CONCEPT,CONCLUSION,STRAIGHT,CUSTOMER,ARCHIVAL,CYBIL,HERCULES,MAVERICK
3010 DATA SUBSYSTEM,DEFECTIVE,CAMERA,HOMESPUN,EXCEPTIONS,PROGRAMMER,PARAMETERS
3015 DATA TECHNICAL,SUPPORT,REPLACEMENT,ENDEAVOR,DESIGNED,PACKAGE,CHAMPAGNE
3020 DATA MILLION,BEAUTIFUL,WONDERFUL,HANDSOME,POOF,ANOTHER,MYSTERIOUS,PACKAGE
3025 DATA FORGET,RECYCLED,CONSUMER,CANADA,LOUISIANA,AMERICAN,GREETINGS,*