home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Highscore 1
/
Highscore_1_19xx_-.d64
/
lawine 64
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2023-02-26
|
9KB
|
431 lines
10 rem lawine ==================c64
20 rem (p) commodore welt team ===
30 rem ============================
40 rem (c) by g. kramer ===
50 rem 4407 emsdetten ===
60 rem ============================
70 rem basic v2.0 ===
80 rem c64 + 1530/1541 ===
90 rem ============================
100 gosub2770
110 gosub1130
120 gosub2160
130 gosub190
140 gosub390
150 gosub980
160 **********************
170 *** spieler setzen ***
180 **********************
190 ze=5:sp=16:gosub1810
200 printan"spieler"
210 ru=int(15/an)*10+10
220 ze=7:gosub1810
230 print"je"ru"kugeln"
240 a$=chr$(32)+chr$(32)
250 a$=chr$(18)+a$+a$+chr$(32)
260 fori=1toan:poke646,i
270 ze=3*(i-1):sp=30:gosub1810
280 printa$
290 ze=ze+1:gosub1810
300 printa$
310 pokeb+40*ze+32,i+176
320 ze=ze+1:gosub1810
330 printa$
340 next
350 return
360 ********************
370 *** spiel laeuft ***
380 ********************
390 fori=1toru
400 fori0=1toan
410 poke646,i0
420 ze=10:sp=17:gosub1810
430 print"spieler"i0
440 ze=12:sp=16:gosub1810
450 printichr$(157)". kugel"
460 pokeb+1018,253
470 pokev+39,i0:pokev+40,i0
480 pokev+41,i0
490 poke198,0:gosub1510
500 pokev+4,sa:pokev+5,50
510 pokev+21,7
520 geta$:ifa$<>""then560
530 fori1=1to100:next
540 pokev+21,3
550 fori1=1to100:next:goto510
560 ifa$=chr$(134)then600
570 ifa$<>chr$(133)then530
580 sa=sa+16:ifsa=143thensa=31
590 goto500
600 a=sa/8-2
610 pokef+a,i0
620 pokeb+a,81
630 poke253,0
640 pokev+21,3
650 fori1=1to20:next
660 ifpeek(253)=0then660
670 b0=b+22*40+16:f0=b0-b+f
680 fori1=0to80step40
690 fori2=0to9
700 ifpeek(b0+i1+i2)<>81then790
710 ku(i0)=ku(i0)+1
720 gosub880
730 if(peek(f0+i1+i2)and15)=i0then760
740 ku(i0)=ku(i0)+1
750 gosub880
760 pokeb0+i1+i2,32
770 fori3=1to200:next
780 goto800
790 i1=100:i2=10
800 nexti2,i1
810 sa=sa+16:ifsa=143thensa=31
820 fori1=1to400:next
830 nexti0,i
840 return
850 *************************
860 *** spielstand setzen ***
870 *************************
880 a$=str$(ku(i0))
890 ze=1+3*(i0-1):sp=39-len(a$)
900 gosub1810
910 poke646,i0
920 gosub1740
930 printa$
940 return
950 *****************
960 *** spielende ***
970 *****************
980 ze=21:sp=16:gosub1810
990 printchr$(18)"spielende"
1000 a$="neues spiel ?"
1010 ze=23:sp=16:gosub1810
1020 printa$
1030 fori=1to100:next
1040 getb$:ifb$="j"thenpoke2,254:run110
1050 ifb$="n"thenprintchr$(147):end
1060 ze=23:sp=16:gosub1810
1070 printchr$(18)a$
1080 fori=1to100:next
1090 goto1010
1100 ************************
1110 *** anfang und titel ***
1120 ************************
1130 sys12*4096 :rem irq initial
1140 b=52224 :rem bildram
1150 n=57344 :rem zeichensatz neu
1160 v=53248 :rem vic
1170 f=55296 :rem farbram
1180 t=54272 :rem sid
1190 s=65472 :rem sprite
1200 pokeb+1016,255
1210 poke53280,0
1220 poke53281,0
1230 ifpeek(2)=254then1440
1240 a$="":gosub1510
1250 fori=1to14
1260 a$=a$+chr$(32)
1270 next
1280 fa=10:r=128
1290 forz1=7to9
1300 z=z1:gosub1860
1310 nextz1
1320 z=8
1330 a$="lawine"
1340 pokev+23,1
1350 pokev+29,1
1360 gosub1860
1370 ze=13:sp=12:gosub1810
1380 print"ein programm von"
1390 a$="g k r a m e r"
1400 z=16:fa=3:r=0
1410 pokev+23,0
1420 pokev+29,0
1430 gosub1860
1440 poke646,9
1450 sa=31
1460 return
1470 end
1480 ************
1490 *** (NULL)ng ***
1500 ************
1510 gosub1620
1520 poket+1,8:poket,180:poket+5,12
1530 poket+8,15:poket+7,247
1540 poket+15,13:poket+14,10
1550 poket+12,12:poket+19,12
1560 poket+24,15:poket+4,23
1570 poket+11,23:poket+18,23
1580 return
1590 ********************
1600 *** loeschen sid ***
1610 ********************
1620 fort0=0to24:poket+t0,0:nextt0
1630 return
1640 **************
1650 *** heulen ***
1660 **************
1670 gosub1620
1680 poket,t1-256*int(t1/256)
1690 poket+1,int(t1/256):poket+6,240
1700 poket+24,15:poket+4,33:return
1710 **************
1720 *** schuss ***
1730 **************
1740 gosub1620
1750 poket+5,9:poket+1,21
1760 poket+24,15:poket+4,129
1770 return
1780 *********************
1790 *** cursor setzen ***
1800 *********************
1810 poke214,ze:poke211,sp:sys58640
1820 return
1830 **********************
1840 *** sprites laufen ***
1850 **********************
1860 y=z*8+50
1870 z=19+b+z*40-len(a$)/2
1880 fori=1tolen(a$)
1890 pokev+1,230
1900 pokev,0:t1=34*256
1910 a=asc(mid$(a$,i,1))
1920 ifa=32then2080
1930 ifa>63thena=a-64
1940 a0=168-(4*(len(a$)+1and254))+i*8
1950 forj=stos+62:pokej,0:nextj
1960 forj=0to7
1970 pokes+3*j+1,usr(n+j+a*8)
1980 nextj:t1=0:gosub1670
1990 pokev+21,1
2000 forj=0toa0step4
2010 pokev,jand255
2020 pokev+16,int(j/256)
2030 poket+1,jand255:nextj
2040 forj=230toystep-2
2050 pokev+1,j
2060 poket+1,j-34
2070 nextj:gosub1740
2080 pokez+i+f-b,fa
2090 pokez+i,a+r
2100 pokev+21,0
2110 nexti
2120 return
2130 *******************
2140 *** spielanfang ***
2150 *******************
2160 ze=20:sp=0:gosub1810
2170 print"wieviele mitspieler?[160](1-8)"
2180 poke198,0
2190 geta$:ifa$<"1"ora$>"8"then2190
2200 an=val(a$)
2210 print:print
2220 printan"mitspieler - ok?[160](j/n)"
2230 geta$:ifa$=""then2230
2240 ifa$="n"then2160
2250 ifa$<>"j"then2230
2260 a$=chr$(32)+chr$(98)
2270 a$=a$+a$+a$+a$+a$+a$+chr$(32)
2280 a$=chr$(166)+a$+chr$(166)
2290 gosub1510
2300 printchr$(147)chr$(154);
2310 fori=0to23
2320 printa$
2330 next
2340 printa$;
2350 a$=chr$(32)+chr$(32)
2360 a$(0,0)=chr$(100)+a$
2370 a$(1,0)=a$+chr$(101)
2380 a$(0,1)=chr$(32)+chr$(119)+chr$(32)
2390 a$(1,1)=a$(0,1)
2400 a$=chr$(98)
2410 a$(0,2)=chr$(32)+a$+chr$(109)
2420 a$(1,2)=chr$(110)+a$+chr$(32)
2430 fori=0to1
2440 fori0=41to49step4
2450 fori1=0to640step320
2460 a=i0+i1+162*i
2470 a0=int(rnd(0)*2)
2480 ze=int(a/40)
2490 sp=a-40*ze
2500 gosub1810
2510 printa$(a0,0)
2520 ze=ze+1:gosub1810
2530 printa$(a0,1)
2540 ze=ze+1:gosub1810
2550 printa$(a0,2)
2560 nexti1,i0,i
2570 pokev+29,3:pokev+23,3
2580 pokev,156:pokev+2,204
2590 pokev+1,50:pokev+3,50
2600 pokeb+1016,254:pokeb+1017,255
2610 fori=s-64tos+63
2620 pokei,0:next
2630 pokev+39,1:pokev+40,1
2640 a$="lawine":a0=s-64
2650 fori=1to6
2660 a=asc(mid$(a$,i,1))-64
2670 a1=a0+i-1
2680 ifi>3thena1=a1+61
2690 fori0=0to7
2700 pokea1+3*i0,usr(n+i0+a*8)
2710 nexti0,i
2720 pokev+21,3
2730 return
2740 *******************
2750 *** datas laden ***
2760 *******************
2770 fori=65344toi+62step3
2780 reada:pokei,a
2790 pokei+1,0:pokei+2,0
2800 next
2810 rem sprite-pfeil ***
2820 data12,30,63,63,30,12,00
2830 data00,12,30,63,12,12,12
2840 data12,12,12,12,12,18,33
2850 print"sprite-pfeil geladen"
2860 fori=49152to49267
2870 reada:pokei,a
2880 ifa-int(a)<>0then2940
2890 ifa<0ora>255then2940
2900 s=s+a:next
2910 ifs<>13791then2970
2920 print"init-routine geladen"
2930 goto3150
2940 a=peek(63)+256*peek(64)
2950 print"data-fehler in zeile"i
2960 end
2970 print"datafehler in init-routine"
2980 end
2990 rem upro init-routine ***
3000 data76,9,192,76,116,192,76,137
3010 data194,32,160,229,120,169,51,133
3020 data1,169,208,160,0,133,96,132
3030 data95,132,90,132,88,169,224,133
3040 data91,169,240,133,89,32,191,163
3050 data169,55,133,1,169,196,141,0
3060 data221,169,204,141,136,2,32,68
3070 data229,169,56,141,24,208,169,3
3080 data141,20,3,169,192,141,21,3
3090 data141,18,3,169,6,141,17,3
3100 data88,160,226,140,98,192,160,32
3110 data140,97,192,160,0,185,178,194
3120 data141,64,226,238,97,192,200,192
3130 data32,208,242,169,3,141,53,3
3140 data141,52,3,96
3150 fori=49268to49523
3160 reada:pokei,a
3170 ifa-int(a)<>0then2940
3180 ifa<0ora>255then2940
3190 s=s+a:next
3200 ifs<>48792then3230
3210 print"upro teil 1 geladen"
3220 goto3570
3230 print"datafehler in teil 1":end
3240 rem datas teil 1 ***
3250 data165,203,201,64,208,5,162,240
3260 data142,127,192,240,29,201,40,208
3270 data12,78,52,3,208,15,162,1
3280 data142,52,3,208,8,201,43,208
3290 data9,56,46,52,3,162,208,142
3300 data127,192,201,64,208,7,169,11
3310 data141,172,192,208,13,201,3,240
3320 data11,201,6,208,5,169,10,141
3330 data183,192,208,10,169,14,141
3340 data183,192,169,25,141,172,192,174
3350 data53,3,202,142,53,3,208,10
3360 data174,52,3,142,53,3,165,253
3370 data240,3,76,49,234,169,207,133
3380 data252,169,192,133,251,160,1,177
3390 data251,201,81,208,57,169,32,145
3400 data251,32,113,194,169,128,141,247
3410 data192,162,0,189,128,207,201,32
3420 data240,16,232,224,10,208,244,169
3430 data40,24,109,247,192,141,247,192
3440 data208,231,173,247,192,141,26,193
3450 data141,31,193,185,192,219,157,128
3460 data219,169,81,157,128,207,200,200
3470 data192,15,208,187,132,253,160,1
3480 data165,251,56,233,40,133,251,133
3490 data249,165,252,233,0,133,252,9
3500 data16,41,251,133,250,177,249,170
3510 data132,2,177,251,201,81,240,23
3520 data201,68,48,7,201,72,16,3,76
3530 data0,194,200,192,14,208,229,165
3540 data251,208,202,76,49,234,152,24
3550 data105,40,168,177,251,201,81,240
3560 data55,201,32,208,11,32,205,193
3570 fori=49524to49800
3580 reada:pokei,a
3590 ifa-int(a)<>0then2940
3600 ifa<0ora>255then2940
3610 s=s+a:next
3620 ifs<>85219then3650
3630 print"upro teil 2 geladen"
3640 goto4020
3650 print"datafehler in teil 2":end
3660 rem datas teil 2 ***
3670 data164,2,169,32,145,251,208,218
3680 data72,32,113,194,104,201,68,240
3690 data4,201,69,208,9,9,2,145
3700 data251,138,145,249,208,226,201
3710 data70,208,3,200,208,5,201,71
3720 data208,11,136,177,251,201,32,240
3730 data205,164,2,208,174,201,87,208
3740 data45,164,2,200,177,251,201,81
3750 data240,4,201,32,208,4,169,41
3760 data208,2,169,39,24,101,2,168
3770 data177,251,201,32,240,168,164,2
3780 data208,173,138,145,249,169,81,145
3790 data251,169,0,133,253,96,140,252
3800 data193,201,78,208,6,200,200,169
3810 data77,208,4,136,136,169,78,72
3820 data177,251,201,32,240,3,104,208
3830 data176,104,145,251,169,14,145,249
3840 data160,41,76,113,193,72,152,24
3850 data105,80,168,177,251,164,2,201
3860 data77,240,8,201,78,240,4,104
3870 data76,86,193,169,32,145,251,104
3880 data72,41,1,208,6,200,200,169
3890 data69,208,4,136,136,169,68,72
3900 data177,251,201,81,208,4,169,2
3910 data208,6,169,14,145,249,169,0
3920 data141,64,194,104,9,0,145,251
3930 data164,2,104,201,70,240,6,201
3940 data71,240,2,208,195,152,24,105
3950 data40,168,169,81,145,251,138,145
3960 data249,164,2,208,179,152,72,169
3970 data0,160,0,153,0,212,200,192
3980 data25,208,248,104,168,96,32,96
3990 data194,169,9,141,5,212,169,21
4000 data141,1,212,169,15,141,24,212
4010 data169,129,141,4,212,96
4020 fori=49801to49873
4030 reada:pokei,a
4040 ifa-int(a)<>0then2940
4050 ifa<0ora>255then2940
4060 s=s+a:next
4070 ifs<>92129then4100
4080 print"usr-routine geladen"
4090 return
4100 print"datafehler usr-routine":end
4110 rem datas usr-routine ***
4120 data165,20,72,165,21,72,32,247
4130 data183,165,1,72,165,21,201,224
4140 data208,14,169,52,120,133,1,160
4150 data0,177,20,168,104,133,1,88
4160 data104,133,21,104,133,20,76,162
4170 data179,0,0,0,0,102,126,63
4180 data3,0,0,0,0,102,126,252
4190 data192,0,60,126,126,126,126,63
4200 data3,0,60,126,126,126,126,252,192
4210 === lawine ===================c64
4220 === 38911 bytes speicher ===
4230 === 9417 bytes programm ===
4240 === 447 bytes variable ===
4250 === 161 bytes arrays ===
4260 === 595 bytes strings ===
4270 === 28291 bytes frei ===
4280 === =============================
4290 === 722 bytes maschinenspr. ===
4300 === =============================