10 '********************************************** 20 '* BOUNCE V 1.4 * 30 '* (C) 23.08.1991 by Hannes Geyer, 4300 Essen * 40 '* f}r PCW 8256/8512 - Schneider JOYCE * 50 '* Mallard BASIC 18 Total 1k Blocks * 60 '********************************************** 70 OPTION RUN:CLEAR ,,,2,35 80 DEFINT a-o,q-z:WIDTH 255:GOTO 100 90 PRINT esc$;"Y";CHR$(z+32);CHR$(s+32);:RETURN 100 DIM men$(6,4),ste$(3),jn(25),mo(6),fe(8,8),v(6),b1(15),b2(15),zm(16),mt(16),bex(2),bey(2) 110 esc$=CHR$(27):clr$=esc$+"E"+esc$+"H" 120 inv$=esc$+"p":nrm$=esc$+"q" 130 uns$=esc$+"f":sic$=esc$+"e" 140 und$=esc$+"r":nun$=esc$+"u" 150 he$=esc$+"b"+CHR$(63)+esc$+"c"+CHR$(0) 160 du$=esc$+"b"+CHR$(0)+esc$+"c"+CHR$(63) 170 so$=" ON":so1$="OFF":lem=1:lds=1:tw=11:tw1=12:w1=255:w2=0:u1=255:u2=0 180 men$(1,1)=" BOUNCE starten ":men$(1,2)=" Highscore-Liste ":men$(1,3)=" Editor aufrufen ":men$(1,4)=" BOUNCE Ende " 190 men$(2,1)=" Level erstellen ":men$(2,2)=" Level aufrufen ":men$(2,3)=" Editieren Ende " 200 men$(3,1)=" Level speichern ":men$(3,2)=" Level unkorrekt ":men$(3,3)=" Abbrechen " 210 men$(4,1)=" Level bearbeiten ":men$(4,2)=" Level l|schen ":men$(4,3)=men$(3,3) 220 men$(5,1)=" Best{tigen ":men$(5,2)=men$(3,3) 230 men$(6,1)=" -> Mallard BASIC ":men$(6,2)=" -> CP/M ":men$(6,3)=" -> Modus 24 x 80 ":men$(6,4)=" -> Systemstart " 240 lo$=CHR$(134):ro$=CHR$(140):lu$=CHR$(131):ru$=CHR$(137):ve$=CHR$(133):ho$=STRING$(18,138) 250 ste$(1)=lo$+STRING$(4,138)+ro$:ste$(2)=ve$+" "+ve$:ste$(3)=lu$+STRING$(4,138)+ru$ 260 a$=STRING$(4,154):b$=CHR$(149)+" "+CHR$(149)+" ":c$=CHR$(150)+a$+CHR$(156)+" ":d$=CHR$(147)+a$+CHR$(153)+" " 270 bou$=CHR$(148)+SPACE$(7)+c$+CHR$(148)+" "+CHR$(148)+" "+c$+c$+c$+CHR$(151)+RIGHT$(c$,7)+b$+b$+b$+CHR$(149)+SPACE$(7)+CHR$(151)+RIGHT$(d$,7)+d$+d$+d$+CHR$(145)+" "+CHR$(145)+" "+d$+LEFT$(d$,5)+CHR$(152)+" " 280 FOR i=1 TO 6:mo(i)=i:NEXT i 290 pa$=inv$+" "+nrm$:pa$(1)=pa$+pa$+pa$:pa$(2)=pa$+" "+pa$:pa$(3)=pa$:pa$(4)=" "+pa$ 300 cue$=" "+CHR$(149)+CHR$(146)+CHR$(152)+CHR$(149)+" " 310 FOR i=1 TO 8:eli$=eli$+" "+CHR$(146)+CHR$(152)+" ":NEXT i 320 nor$=esc$+"X ?y":lf1$=esc$+"X #>_"+clr$+nor$:lf2$=esc$+"X-f13"+clr$+nor$:lf3$=esc$+"X&n$*"+clr$+nor$:lf4$=esc$+"X > "+clr$+nor$ 330 ba=16:FOR i=1 TO 15:READ b1(i),b2(i):NEXT i 340 FOR i=1 TO 25:READ jn(i):NEXT i 350 DATA 128,144,145,148,146,152,139,142,149,133,211,47,135,141,150,153,60,62,138,154,138,32,149,32,131,140,220,221,240,244,1,2,1,3,3,1,2,1,2,2,2,2,2,2,1,1,3,1,4,1,1,3,1,3,1 360 RANDOMIZE (PEEK(&HFBF7)+1)*(PEEK(&HFBF8)+1) 370 PRINT du$;uns$;nrm$;nor$;clr$; 380 ' 390 '***** Bildschirmaufbau ********************** 400 ' 410 OUT 248,8:OUT 245,91:OUT 246,115:GOSUB 2950 420 h1=141:h2=115:OUT 248,7:FOR i=1 TO 114:h1=h1+1:h2=h2-1:OUT 246,h1:FOR j=1 TO 30:NEXT j:OUT 246,h2:FOR j=1 TO 30:NEXT j:IF INKEY$="" THEN NEXT i ELSE ub=1 430 OUT 246,0:r1=SGN(0.5-INT(2*RND)):r2=SGN(0.5-INT(2*RND)):FOR i=0 TO 30:z=r1*(i-15)+15:s=1:GOSUB 90:PRINT inv$;CHR$(149):z=r2*(i-15)+15:s=68:GOSUB 90:PRINT CHR$(149);nrm$:NEXT i 440 z=0:s=70:GOSUB 90:PRINT lo$;ho$;ro$ 450 FOR z=1 TO 3:GOSUB 90:PRINT ve$;SPC(18);ve$:NEXT z 460 z=4:GOSUB 90:PRINT lu$;ho$;ru$:z=5:GOSUB 90:PRINT lo$;ho$;ro$ 470 FOR z=6 TO 11:GOSUB 90:PRINT ve$;SPC(18);ve$:NEXT z 480 z=12:GOSUB 90:PRINT lu$;ho$;ru$ 490 z=2:s=73:GOSUB 90:PRINT "BOUNCE V 1.4":z=6:s=72:GOSUB 90:PRINT "Score:":z=7:GOSUB 90:PRINT "Level:":z=8:GOSUB 90:PRINT "Bonus:":z=9:GOSUB 90:PRINT "Limit:":z=10:GOSUB 90:PRINT "Dauer:":z=11:GOSUB 90:PRINT "Sound: ON" 500 IF ub=1 THEN 590 510 FOR u=1 TO 4:FOR i=6 TO 1 STEP -1:SWAP mo(INT(i*RND)+1),mo(i):f=mo(i) 520 s=8*f+4:FOR z=14 TO 16:GOSUB 90:PRINT SPC(6):NEXT z:FOR z=16 TO 14 STEP -1:GOSUB 90 530 IF u=1 OR u=3 THEN PRINT inv$;ste$(z-13);nrm$:GOTO 560 540 IF u=2 THEN PRINT inv$; 550 PRINT MID$(bou$,8*f-7+(z-14)*48,6);nrm$ 560 IF INKEY$>"" THEN GOSUB 2950:GOTO 590 570 NEXT z:FOR j=1 TO 80:NEXT j,i:FOR j=1 TO 1000:NEXT j,u:GOTO 510 580 ' 590 IF FIND$("BOUNCE.SCO")="" THEN ng=1 600 GOSUB 2590:GOSUB 2620:sw=1024:sw1=sw 610 IF sw<1 THEN 660 620 sw1=sw1/2:GET 1,sw:a1=VAL(MID$(stu$,17,2)):de=EOF(1):IF sw>999 AND a1>0 THEN GOSUB 3010:GOTO 3040 630 GET 1,sw+1:a2=VAL(MID$(stu$,17,2)) 640 IF de<0 OR a1=0 THEN sw=sw-sw1:GOTO 610 650 IF de=0 AND a2>0 THEN sw=sw+sw1:GOTO 610 660 IF ng=1 THEN FOR i=1 TO 10:na$(i)="BOUNCE"+SPACE$(10):pu(i)=100*(11-i):le(i)=INT((10-i)/3)+1:bo(i)=le(i)-1:pt(i)=20*le(i):NEXT i:GOSUB 2610:GOTO 710 670 FOR i=1 TO 10:GET 2,i:na$(i)=name$:pu(i)=VAL(punkte$):le(i)=VAL(level$):bo(i)=VAL(bonus$):pt(i)=VAL(dauer$):NEXT i 680 ' 690 '***** Hauptprogramm ************************* 700 ' 710 DIM zuf(sw),moe(sw,2):FOR i=1 TO sw:zuf(i)=i:NEXT i 720 k=1:k1=4:GOSUB 2710:PRINT lf1$:IF v(1)<>2 THEN PRINT lf4$;lf3$ 730 IF v(1)=1 THEN GOSUB 2990:st=0:ge=0:pun=0:lev=0:bon=0:pti=0:gbs=0:GOTO 770 740 IF v(1)=2 THEN GOSUB 2500:GOTO 720 750 IF v(1)=3 THEN swa=sw:GOSUB 2650:GOSUB 2990:GOTO 1740 ELSE 3040 760 ' 770 FOR zu=sw TO 1 STEP -1 780 PRINT lf4$;inv$;und$;:s=0:FOR z=30 TO 0 STEP -1:GOSUB 90:PRINT " ":NEXT z:PRINT nun$;nrm$ 790 u=0:r=0:gc=FRE(""):lev=lev+1:lim=100:GOSUB 2640:GOSUB 2660:GOSUB 2670:GOSUB 2680:GOSUB 2690 800 SWAP zuf(INT(zu*RND)+1),zuf(zu) 810 n=zuf(zu):GET 1,n:GOSUB 2850 820 FOR q=1 TO 2:FOR a=0 TO 7:r=r+1 830 IF (moe(n,q) AND 2^a)=0 THEN zm(r)=0:u=u+1:mt(u)=r ELSE zm(r)=1 840 NEXT a,q:m=mt(INT(u*RND)+1):zm(m)=1 850 IF m>8 THEN m=m-8:d=2 ELSE d=1 860 moe(n,d)=0:FOR a=0 TO 7 870 IF zm(a+d*8-7)=1 THEN moe(n,d)=moe(n,d)+2^a 880 NEXT a 890 IF moe(n,1)+moe(n,2)=510 THEN moe(n,1)=0:moe(n,2)=0 900 ' 910 FOR y=1 TO 8:by=VAL("&H"+MID$(stu$,2*y-1,2)) 920 FOR a=0 TO 7:IF (by AND 2^a)=0 THEN 1040 930 x=a+1:ON m GOTO 940,950,960,970,980,990,1000,1010 940 x1=x:y1=y:GOTO 1020 950 x1=y:y1=9-x:GOTO 1020 960 x1=9-x:y1=9-y:GOTO 1020 970 x1=9-y:y1=x:GOTO 1020 980 x1=x:y1=9-y:GOTO 1020 990 x1=y:y1=x:GOTO 1020 1000 x1=9-x:y1=y:GOTO 1020 1010 x1=9-y:y1=9-x:GOTO 1020 1020 fe(x1,y1)=1:st=st+1:IF a=bex(d)-1 AND y=bey(d) THEN ax=x1:ay=y1 1030 z=4*y1-4:s=8*x1-4:GOSUB 90:PRINT inv$;ste$(1):z=z+1:GOSUB 90:PRINT ste$(2):z=z+1:GOSUB 90:PRINT ste$(3);nrm$ 1040 NEXT a,y 1050 GOSUB 3020:ptio=pti:ba=ba-1:IF ba<1 THEN ba=15 1060 f=INT(ba*RND)+1:SWAP b1(f),b1(ba):SWAP b2(f),b2(ba):POKE &HFBF7,0:POKE &HFBF8,0 1070 ' 1080 ta$=INKEY$:IF ta$>"" THEN 1220 1090 SWAP b1(ba),b2(ba):z=4*ay-3:s=8*ax-2:GOSUB 90:PRINT CHR$(b1(ba));CHR$(b2(ba)) 1100 IF lim<30 THEN OUT 246,u1:SWAP u1,u2:hr=253+INT(lim/10):IF u10.01 OR ge=1 THEN 1140 1120 xw=INT(8*RND)+1:yw=INT(8*RND)+1:IF fe(xw,yw)=0 OR (xw-ax)^2+(yw-ay)^2<2 THEN 1160 1130 ge=1:bw=INT(6*RND):s=8*xw-4:FOR z=4*yw-4 TO 4*yw-2:GOSUB 90:PRINT SPC(6):NEXT z:z=4*yw-1:FOR i=1 TO 3:z=z-1:GOSUB 90:PRINT inv$;MID$(bou$,8*bw+1+(z-4*yw+4)*48,6);nrm$:NEXT i:zv=se 1140 ta$=INKEY$:IF ta$>"" THEN 1220 1150 IF ge=1 THEN IF se>zv+10 THEN ge=0:s=8*xw-4:FOR z=4*yw-4 TO 4*yw-2:GOSUB 90:PRINT SPC(6):NEXT z:FOR z=4*yw-2 TO 4*yw-4 STEP -1:GOSUB 90:PRINT inv$;ste$(z-4*yw+5);nrm$:NEXT z 1160 se=VAL(HEX$(PEEK(&HFBF7)))*60+VAL(HEX$(PEEK(&HFBF8))):IF se>100 THEN se=100 1170 lim=100-se:pti=ptio+se:GOSUB 2680:GOSUB 2690 1180 ta$=INKEY$:IF ta$>"" THEN 1220 1190 PRINT esc$;"X ";CHR$(31+se/3.27);" ";clr$;nor$ 1200 IF lim>0 THEN 1080 ELSE 1450 1210 ' 1220 ta=ASC(ta$):ax1=ax:ay1=ay 1230 IF ta=1 THEN ax=ax-1:GOTO 1350 1240 IF ta=6 THEN ax=ax+1:GOTO 1350 1250 IF ta=30 THEN ay=ay+1:GOTO 1350 1260 IF ta=31 THEN ay=ay-1:GOTO 1350 1270 IF ta=252 THEN ay=ay-2:GOTO 1350 1280 IF ta=253 THEN ay=ay+2:GOTO 1350 1290 IF ta=254 THEN ax=ax-2:GOTO 1350 1300 IF ta=255 THEN ax=ax+2:GOTO 1350 1310 IF ta=3 THEN ge=0:GOSUB 2890 1320 IF ta=21 THEN GOSUB 2970 1330 IF ta=23 THEN lem=n 1340 GOTO 1080 1350 OUT 248,tw:st=st-1:fe(ax1,ay1)=0:OUT 248,12:PRINT esc$;"X";CHR$(4*ay1+28);CHR$(8*ax1+28);CHR$(34);CHR$(37);clr$;nor$ 1360 IF ge=0 OR ax1<>xw OR ay1<>yw THEN 1390 1370 ge=0:bon=bon+1:GOSUB 2670:GOSUB 2960:pun=pun+(2*lim MOD 10):ep1=INT(2*lim/10):ep2=10:GOSUB 2870:IF (gbs AND 2^bw)=0 THEN gbs=gbs+2^bw 1380 IF gbs>62 THEN gbs=0:FOR i=1 TO 3:PRINT lf2$;he$:FOR j=1 TO 200:NEXT j:PRINT du$:FOR bw=0 TO 5:GOSUB 2960:NEXT bw,i:ep1=25-INT(0.25*pti/lev):ep2=100:GOSUB 2870:PRINT lf2$ 1385 GOSUB 3020 1390 pun=pun+10:GOSUB 2640:IF st>0 THEN 1430 1400 FOR i=1 TO 3:FOR j=1 TO 200:NEXT j:OUT 248,tw:GOSUB 90:OUT 248,12:NEXT i:FOR j=1 TO 200:NEXT j:pun=pun+(lim MOD 5):ep1=INT(lim/5):ep2=5:GOSUB 2870 1410 SWAP w1,w2:FOR i=w1 TO w2 STEP SGN(1-w1):OUT 246,i:FOR j=1 TO 1:NEXT j,i:OUT 246,0 1420 NEXT zu:GOTO 770 1430 IF ax<1 OR ax>8 OR ay<1 OR ay>8 THEN 1450 1440 IF fe(ax,ay)>0 THEN 1080 1450 OUT 246,0:pti=ptio+se:GOSUB 2690 1460 FOR i=1 TO 10:FOR j=200 TO 220:OUT 248,tw:OUT 248,12:OUT 245,j:NEXT j,i:OUT 245,91 1470 s=70:FOR z=26 TO 30:GOSUB 90:PRINT inv$;SPC(20):NEXT z:z=28:s=76:GOSUB 90:PRINT "GAME OVER";nrm$ 1480 ' 1490 '***** Highscore **************************** 1500 ' 1510 FOR h=10 TO 1 STEP -1 1520 IF pun>pu(h) THEN 1580 1530 IF punle(h) THEN 1580 1550 IF levbo(h) THEN 1580 1570 IF bonpt(h) THEN 1590 1580 NEXT h 1590 IF h=10 THEN 720 1600 FOR j=10 TO h+2 STEP -1:na$(j)=na$(j-1):pu(j)=pu(j-1):le(j)=le(j-1):bo(j)=bo(j-1):pt(j)=pt(j-1):NEXT j 1610 na$(h+1)=SPACE$(16):pu(h+1)=pun:le(h+1)=lev:bo(h+1)=bon:pt(h+1)=pti 1620 PRINT lf1$:GOSUB 2500:na$(h+1)="":GOSUB 3020:z=2*h+8:s=15:GOSUB 90:PRINT sic$; 1630 ta$=INPUT$(1):ta=ASC(ta$):IF ta>32 AND ta<127 THEN 1690 1640 IF ta=32 THEN IF s=15 THEN 1630 ELSE 1690 1650 IF ta=127 THEN IF s>15 THEN na$(h+1)=LEFT$(na$(h+1),LEN(na$(h+1))-1):s=s-1:GOSUB 90:PRINT " ";:GOSUB 90 ELSE GOSUB 3010 1660 IF ta=13 THEN IF na$(h+1)="" THEN GOSUB 3010:GOTO 1630 ELSE na$(h+1)=na$(h+1)+SPACE$(31-s):PRINT uns$:GOSUB 2610:GOTO 720 1670 IF ta=21 THEN GOSUB 2970 1680 GOTO 1630 1690 IF s<31 THEN GOSUB 90:PRINT ta$;:na$(h+1)=na$(h+1)+ta$:s=s+1:GOSUB 90 ELSE GOSUB 3010 1700 GOTO 1630 1710 ' 1720 '***** Editor ******************************* 1730 ' 1740 k=2:k1=3:GOSUB 2710 1750 IF v(2)=3 OR ta=8 THEN PRINT lf3$:IF sw<>swa THEN ERASE zuf,moe:GOTO 710 ELSE 720 1760 IF v(2)=1 THEN d=0:lev=sw+1:GOSUB 2660:GOSUB 3000:GOTO 2040 1770 num$="":z=7:s=85:GOSUB 90:PRINT sic$; 1780 ta=ASC(INPUT$(1)) 1790 IF ta=8 THEN PRINT uns$:GOSUB 2650:GOTO 1740 1800 IF ta=13 THEN 1860 1810 IF ta=127 THEN IF s=85 THEN GOSUB 3010 ELSE num$=LEFT$(num$,LEN(num$)-1):s=s-1:GOSUB 90:PRINT " ";:GOSUB 90 1820 IF ta=21 THEN GOSUB 2970 1830 IF ta=23 THEN num$=STR$(lem):GOTO 1860 1840 IF ta>47 AND ta<58 THEN IF s=88 THEN GOSUB 3010 ELSE num$=num$+CHR$(ta):GOSUB 90:PRINT CHR$(ta);:s=s+1:GOSUB 90 1850 GOTO 1780 1860 PRINT uns$;:lev=VAL(num$):IF lev<1 OR lev>sw THEN lev=lds 1870 GOSUB 2660:GET 1,lev:lds=lev:FOR y=1 TO 8:by=VAL("&H"+MID$(stu$,2*y-1,2)):FOR a=0 TO 7:b=2^a 1880 IF (by AND b)<>0 THEN fe(a+1,y)=1 1890 NEXT a,y:GOSUB 2850:GOSUB 3000:FOR b=1 TO 8:FOR a=1 TO 8 1900 IF fe(a,b)>0 THEN z=4*b-4:s=8*a-4:GOSUB 90:PRINT inv$;ste$(1):z=z+1:GOSUB 90:PRINT ste$(2):z=z+1:GOSUB 90:PRINT ste$(3);nrm$ 1910 NEXT a,b:d=2:FOR i=1 TO 2:fe(bex(i),bey(i))=2:z=4*bey(i)-3:s=8*bex(i)-2:GOSUB 90:PRINT CHR$(145);CHR$(148):NEXT i 1920 ' 1930 '***** Bearbeiten / L|schen ***************** 1940 ' 1950 k=4:k1=3:GOSUB 2710 1960 IF v(4)=3 OR ta=8 THEN GOSUB 2650:PRINT lf1$:GOSUB 2990:GOTO 1740 1970 IF v(4)=1 THEN x=bex(1):y=bey(1):z=4*y-3:s=8*x-3:GOSUB 90:PRINT inv$;CHR$(149):s=s+3:GOSUB 90:PRINT CHR$(149);nrm$:s=s-4:GOTO 2050 1980 k=5:k1=2:GOSUB 2710 1990 IF v(5)=2 OR ta=8 THEN 1950 2000 GET 1,sw:PUT 1,lev:LSET stu$="":PUT 1,sw:sw=sw-1:lem=1:lds=1:GOTO 2460 2010 ' 2020 '***** Level erstellen ********************** 2030 ' 2040 x=1:y=1:z=1:s=4:GOSUB 90:PRINT cue$ 2050 afe=fe(x,y) 2060 ta=ASC(INPUT$(1)):IF ta<>1 AND ta<>6 AND ta<>8 AND ta<>13 AND ta<>18 AND ta<>21 AND ta<>30 AND ta<>31 AND ta<251 THEN 2060 2070 IF ta=1 THEN x=x-1:IF x=0 THEN x=8 2080 IF ta=6 THEN x=x+1:IF x=9 THEN x=1 2090 IF ta=30 THEN y=y+1:IF y=9 THEN y=1 2100 IF ta=31 THEN y=y-1:IF y=0 THEN y=8 2110 IF ta=13 THEN IF d<>2 THEN GOSUB 3010:GOTO 2060 2120 IF ta=18 THEN 2320 2130 IF ta=8 THEN GOSUB 2650:PRINT lf1$:GOSUB 2990:GOTO 1740 2140 IF ta=21 THEN GOSUB 2970:GOTO 2060 2150 IF ta=251 THEN 2290 2160 IF ta=252 THEN y=y-2:IF y<1 THEN y=8 2170 IF ta=253 THEN y=y+2:IF y>8 THEN y=1 2180 IF ta=254 THEN x=x-2:IF x<1 THEN x=8 2190 IF ta=255 THEN x=x+2:IF x>8 THEN x=1 2200 GOSUB 90 2210 IF afe=0 THEN PRINT " ";CHR$(146);CHR$(152);" " 2220 IF afe>0 THEN s=s+1:GOSUB 90:PRINT inv$;" ":s=s+3:GOSUB 90:PRINT " ";nrm$:s=s-4 2230 IF ta=13 THEN 2380 2240 z=4*y-3:s=8*x-4:GOSUB 90 2250 IF fe(x,y)=0 THEN PRINT cue$ 2260 IF fe(x,y)>0 THEN s=s+1:GOSUB 90:PRINT inv$;CHR$(149):s=s+3:GOSUB 90:PRINT CHR$(149);nrm$:s=s-4 2270 GOTO 2050 2280 ' 2290 z=4*y-4:s=8*x-4:GOSUB 90:IF fe(x,y)>0 THEN d=d-fe(x,y)+1:fe(x,y)=0:PRINT SPC(6):z=z+1:GOSUB 90:PRINT cue$:z=z+1:GOSUB 90:PRINT SPC(6):z=z-1:GOTO 2050 2300 fe(x,y)=1:PRINT inv$;ste$(1):z=z+1:GOSUB 90:PRINT ve$;CHR$(149);" ";CHR$(149);ve$:z=z+1:GOSUB 90:PRINT ste$(3);nrm$:z=z-1:GOTO 2050 2310 ' 2320 IF fe(x,y)=2 THEN fe(x,y)=1:d=d-1:s=s+2:GOSUB 90:PRINT inv$;" ";nrm$:s=s-2:GOTO 2060 2330 IF fe(x,y)=0 OR d=2 THEN GOSUB 3010:GOTO 2060 2340 fe(x,y)=2:d=d+1:s=s+2:GOSUB 90:PRINT CHR$(145);CHR$(148):s=s-2:GOTO 2060 2350 ' 2360 '***** Level abspeichern ******************** 2370 ' 2380 k=3:k1=3:GOSUB 2710 2390 IF v(3)=3 OR ta=8 THEN GOSUB 2650:PRINT lf1$:GOSUB 2990:GOTO 1740 2400 IF v(3)=2 THEN 2240 2410 nstu$="":zus$="":FOR y=1 TO 8:by=0:FOR a=0 TO 7:b=2^a:x=a+1 2420 IF fe(x,y)>0 THEN by=by+b 2430 IF fe(x,y)=2 THEN zus$=zus$+DEC$(10*x+y,"##") 2440 NEXT a:nstu$=nstu$+RIGHT$("0"+HEX$(by),2):NEXT y 2450 LSET stu$=nstu$+zus$:IF v(2)=2 THEN PUT 1,lev ELSE sw=sw+1:PUT 1,sw:lds=sw 2460 CLOSE 1:GOSUB 2590:GOSUB 2650:PRINT lf1$:GOSUB 2990:GOTO 1740 2470 ' 2480 '***** Unterroutinen ************************ 2490 ' 2500 z=2:s=9:GOSUB 90:PRINT STRING$(8,138);" B O U N C E - H I G H S C O R E ";STRING$(8,138):z=3:GOSUB 90:PRINT inv$;und$;SPC(51);nun$;nrm$ 2510 z=4:GOSUB 90:PRINT lo$;STRING$(22,138)CHR$(142)STRING$(7,138)CHR$(142)STRING$(5,138)CHR$(142)STRING$(5,138)CHR$(142)STRING$(6,138);ro$ 2520 z=5:GOSUB 90:PRINT ve$;" Name des Spielers: ";ve$;" Score ";ve$;" Lev ";ve$;" Bon ";ve$;" Sek ";ve$ 2530 z=6:GOSUB 90:PRINT CHR$(135)STRING$(22,138)CHR$(143)STRING$(7,138)CHR$(143)STRING$(5,138)CHR$(143)STRING$(5,138)CHR$(143)STRING$(6,138)CHR$(141) 2540 FOR z=7 TO 27 STEP 2:GOSUB 90:PRINT ve$SPC(22)ve$SPC(7)ve$SPC(5)ve$SPC(5)ve$SPC(6)ve$:NEXT z 2550 z=28:GOSUB 90:PRINT lu$STRING$(22,138)CHR$(139)STRING$(7,138)CHR$(139)STRING$(5,138)CHR$(139)STRING$(5,138)CHR$(139)STRING$(6,138)ru$ 2560 FOR i=10 TO 1 STEP -1:z=2*i+6:GOSUB 90:PRINT ve$;DEC$(i,"###");". ";na$(i);" ";ve$;DEC$(pu(i),"######");" ";ve$;DEC$(le(i),"####");" ";ve$;DEC$(bo(i),"####");" ";ve$;DEC$(pt(i),"#####");" ";ve$:NEXT i 2570 RETURN 2580 ' 2590 OPEN "R",1,"BOUNCE.LEV",20:FIELD 1,20 AS stu$:RETURN 2600 ' 2610 FOR i=1 TO 10:LSET name$=na$(i):LSET punkte$=DEC$(pu(i),"######"):LSET level$=DEC$(le(i),"####"):LSET bonus$=DEC$(bo(i),"####"):LSET dauer$=DEC$(pt(i),"#####"):PUT 2,i:NEXT i:CLOSE 2 2620 OPEN "R",2,"BOUNCE.SCO",35:FIELD 2,16 AS name$,6 AS punkte$,4 AS level$,4 AS bonus$,5 AS dauer$:RETURN 2630 ' 2640 z=6:s=82:GOSUB 90:PRINT USING"######";pun:RETURN 2650 z=7:s=79:GOSUB 90:PRINT USING"(###) ";sw:RETURN 2660 z=7:s=84:GOSUB 90:PRINT USING"####";lev:RETURN 2670 z=8:s=84:GOSUB 90:PRINT USING"####";bon:RETURN 2680 z=9:s=85:GOSUB 90:PRINT USING"###";lim:RETURN 2690 z=10:s=83:GOSUB 90:PRINT USING"#####";pti:RETURN 2700 ' 2710 z=19:s=70:GOSUB 90:PRINT lo$;ho$;ro$ 2720 z=20:GOSUB 90:PRINT ve$;inv$;men$(k,1);nrm$;ve$ 2730 FOR z=21 TO 19+k1:GOSUB 90:PRINT ve$;men$(k,z-19);ve$:NEXT z 2740 GOSUB 90:PRINT lu$;ho$;ru$ 2750 v(k)=1:z=20:s=71:GOSUB 3020 2760 zu$=men$(k,v(k)) 2770 ta=ASC(INPUT$(1)):IF ta<>8 AND ta<>13 AND ta<>21 AND ta<>30 AND ta<>31 THEN 2770 2780 IF ta=30 THEN v(k)=v(k)+1:IF v(k)=k1+1 THEN v(k)=1 2790 IF ta=31 THEN v(k)=v(k)-1:IF v(k)=0 THEN v(k)=k1 2800 IF ta=8 THEN IF k>1 AND k<6 THEN PRINT lf2$:RETURN ELSE GOSUB 3010:GOTO 2770 2810 IF ta=13 THEN IF sw>998 AND k=2 AND v(2)=1 OR sw<1 AND (k=1 AND v(1)=1 OR k=2 AND v(2)=2) THEN GOSUB 3010:GOTO 2770 ELSE PRINT lf2$:RETURN 2820 IF ta=21 THEN GOSUB 2970:GOTO 2770 2830 GOSUB 90:PRINT zu$:z=v(k)+19:GOSUB 90:PRINT inv$;men$(k,v(k));nrm$:GOTO 2760 2840 ' 2850 bex(1)=VAL(MID$(stu$,17,1)):bey(1)=VAL(MID$(stu$,18,1)):bex(2)=VAL(MID$(stu$,19,1)):bey(2)=VAL(MID$(stu$,20,1)):RETURN 2860 ' 2870 z=6:s=71:GOSUB 90:PRINT inv$;" Score: ";nrm$:FOR i=1 TO ep1:OUT 248,tw:pun=pun+ep2:OUT 248,12:GOSUB 2640:NEXT i:s=71:GOSUB 90:PRINT " Score: ":RETURN 2880 ' 2890 me1=PEEK(&HFBF7):me2=PEEK(&HFBF8):se=VAL(HEX$(me1))*60+VAL(HEX$(me2)):IF se>100 THEN se=100 2900 lim=100-se:GOSUB 2680:pti=ptio+se:GOSUB 2690 2910 PRINT lf1$:tz=INT(13*RND)-6:FOR i=1 TO 5:FOR j=1 TO 5:z=tz*(i-3)+j+12:s=i*11-1:GOSUB 90:PRINT pa$(jn(i*5+j-5)):NEXT j,i:GOSUB 3020:ta$=INPUT$(1):OUT 245,INT(91*RND):PRINT lf1$ 2920 FOR b=1 TO 8:FOR a=1 TO 8:OUT 246,72-b*8-a:IF fe(a,b)>0 THEN OUT 248,tw:s=8*a-4:OUT 248,12:FOR i=1 TO 3:z=4*b-5+i:GOSUB 90:PRINT inv$;ste$(i);nrm$:NEXT i 2930 NEXT a,b:POKE &HFBF7,me1:POKE &HFBF8,me2:OUT 245,91:GOSUB 3020:RETURN 2940 ' 2950 s=12:FOR z=14 TO 16:GOSUB 90:PRINT MID$(bou$,(z-14)*48+1,48):NEXT z:RETURN 2960 ff=13+3*INT(bw/3):s=(bw MOD 3)*7+70:FOR z=ff TO ff+2:GOSUB 90:PRINT MID$(bou$,8*bw+1+(z-ff)*48,6);:NEXT z:RETURN 2970 z1=z:s1=s:SWAP tw,tw1:SWAP so$,so1$:z=11:s=85:GOSUB 90:PRINT so$:z=z1:s=s1:GOSUB 90:RETURN 2980 ' 2990 FOR a=1 TO 8:FOR b=1 TO 8:fe(a,b)=0:NEXT b,a:RETURN 3000 s=3:FOR z=1 TO 29 STEP 4:GOSUB 90:PRINT eli$:NEXT z:RETURN 3010 OUT 248,tw:FOR i=1 TO 500:NEXT i:OUT 248,12:RETURN 3020 IF INKEY$<>"" THEN 3020 ELSE RETURN 3030 ' 3040 CLOSE:k=6:k1=4:GOSUB 2710:PRINT clr$;sic$; 3050 IF v(6)=4 THEN OUT 248,1 3060 IF v(6)=3 THEN PRINT esc$;"x";:SYSTEM 3070 IF v(6)=2 THEN SYSTEM 3080 END