home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
64'er 1987 September
/
64er_Magazin_87-09_1987_Markt__Technik_de_Side_A.d64
/
duell
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2022-10-26
|
9KB
|
300 lines
10 rem duell
20 rem
30 rem (c) 1987 by ralph jordan
40 rem
50 rem hirschweg 8
60 rem 7090 ellwangen
70 rem tel. 07961/4377
80 rem
90 rem===============================
100 rem********lader******************
110 rem===============================
120 print"[147]":poke53280,0:poke53281,0:poke 646,14:poke53272,21
130 if p=0 then p=1:load"duell obj.",8,8
140 if p2=0 then p2=1:load"fx obj.",8,8
150 rem===============================
160 rem******grafikzeichen************
170 rem===============================
180 pz(1)=0:pz(2)=0:pz(3)=0:pz(4)=0:restore:poke53280,0:poke53281,0
190 for i=52200 to 52252
200 read x:poke i,x :s=s+x:next i
210 data 120,165,1,72,41,251,133,1,169,208,133,3
220 data 169,48,133,5,160,0,132,2,132,4,162,32
230 data 177,2,145,4,200,208,249,230,3,230,5,202
240 data 208,242,104,133,1,173,24,208,41,241,9,12
250 data 141,24,208,88,96
260 sys52200
270 for x=0 to 7:read dt
280 poke 12288+8*71+x,dt
290 data 0,0,0,0,3,15,63,255
300 next
310 for x=0 to 7:read dt
320 poke 12288+8*72+x,dt
330 data 1,7,63,127,255,255,255,255
340 next
350 for x=0 to 7:read dt
360 poke 12288+8*74+x,dt
370 data 128,192,240,252,255,255,255,255
380 next
390 for x=0 to 7:read dt
400 poke 12288+8*75+x,dt
410 data 0,0,0,0,192,248,254,255
420 next
430 for x=0 to 7:read dt
440 poke 12288+8*76+x,dt
450 data 0,0,0,0,24,0,0,0
460 next
470 for x=0 to 7:read dt
480 poke 12288+8*68+x,dt
490 data 0,0,3,4,8,30,127,218
500 next
510 for x=0 to 7:read dt
520 poke 12288+8*70+x,dt
530 data 0,0,192,32,16,120,254,91
540 next
550 for x=0 to 7:read dt
560 poke 12288+8*83+x,dt
570 data 255,255,255,255,255,255,255,255
580 next
590 rem===============================
600 rem******eingaben*****************
610 rem===============================
620 if sz>0 then goto 870
630 gosub 2510
640 print"[147]":poke198,0:poke 646,14:t1=1:t2=2
650 print""
660 input" spielerzahl(2-4)";sz
670 if sz<2 or sz>4 then goto 640
680 for x=1 to sz
690 print"[147]"
700 print""
710 print" spieler";x;"(max.4 zeichen):"
720 print"[145]"
730 print
740 input" ";s$(x)
750 if len(s$(x))>4 or len(s$(x))<1 then goto 690
760 next x
770 rem===============================
780 rem******s$1 vs s$2***************
790 rem===============================
800 print"[147]":poke 646,1
810 print""
820 print" ";s$(1);"(blau) ";"vs ";s$(2);"(grau)"
830 sys 52300:poke53280,0:poke53281,0
840 rem===============================
850 rem******grafik*******************
860 rem===============================
870 poke 53265,peek(53265)and 239
880 print" [204] [204] [204] [204] [204]"
890 print"[155][204] [204] [204] [204] [204] [204] "
900 print" [204] [204] [204] [204] "
910 print" [204] [204] [204] "
920 print" [204] [204] [204] [204]"
930 print" [204] [204] [204] [204] [204] [204] "
940 print"[155] [204] [204] [204] [204] [204]"
950 print" [204] [204] [204] [204] [204] "
960 print"[155] [204] [204] [204] [204] [204] "
970 print"[149] [199][200][202][203] "
980 print" [199][200][211][211][211][211][202][203] "
990 print" [199][200][211][211][211][211][211][211][211][211][202][203] [199][200][202][203] "
1000 print" [199][200][202][203] [199][200][211][211][211][211][211][211][211][211][211][211][211][211][202][203][199][200][211][211][211][211][202][203]"
1010 print" [199][200][211][211][211][211][202][203][199][200][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][202][203]"
1020 print"[199][200][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][211][202][203]"
1030 print"[154][196][198] [204][204] [204][204] [196][198] [204][204] [204][204] [204][204] [204] [196][198]"
1040 print" [196][198] [204] [204] [204] [196][198] [204][204] [196][198] [204][204] [204] "
1050 print"[204] [204] [204][204] [204][204] [204][204] [204] [204] "
1060 print"[196][198] [204] [204] [196][198] [204] [204][204] [196][198] [204] [204]"
1070 print" [204][204] [196][198] [204] [204][204][204] [196][198] [204][204] [204][204] [204] [196][198] [204] [204]"
1080 print""
1090 printtab(18)"[153]^";
1100 poke 53265,peek(53265)or 16
1110 rem==============================
1120 rem********sprites***************
1130 rem==============================
1140 for n=12288 to 12350:read q:poke n,q:next
1150 data 10,0,0,2,0,12,1,64,57
1160 data 1,128,60,1,64,48,42,84,48
1170 data 186,149,48,46,170,170,46,164,48
1180 data 11,170,48,58,170,240,250,170,240
1190 data 250,170,240,254,170,240,254,170,192
1200 data 62,152,0,2,80,0,1,20,0
1210 data 1,69,0,0,82,0,0,32,0
1220 for n=12352 to 12414:read q:poke n,q:next
1230 data 0,0,160,48,0,128,108,1,64
1240 data 60,2,64,12,1,64,12,21,168
1250 data 12,86,174,170,170,184,12,26,184
1260 data 12,170,224,15,170,172,15,170,175
1270 data 15,170,175,15,170,191,3,170,191
1280 data 0,38,188,0,5,128,0,20,64
1290 data 0,81,64,0,133,0,0,8,0
1300 for n=12416 to 12478:read q:poke n,q:next
1310 data 2,170,64,2,169,64,2,165,64
1320 data 2,149,64,2,85,128,1,86,128
1330 data 1,90,128,1,106,128,1,170,64
1340 data 2,169,64,2,165,64,2,149,64
1350 data 2,85,128,1,86,128,1,90,128
1360 data 1,106,128,1,170,64,2,169,64
1370 data 2,165,64,2,149,64,2,85,64
1380 for n=12672 to 12734:read q:poke n,q:next
1390 data 0,0,0,0,238,0,3,174,192
1400 data 15,190,176,14,190,176,62,190,172
1410 data 58,254,172,175,171,235,175,171,235
1420 data 175,171,235,175,171,235,175,171,235
1430 data 175,171,235,58,254,188,58,190,172
1440 data 14,190,176,14,190,176,3,190,192
1450 data 0,190,0,0,0,0,0,0,0
1460 rem==============================
1470 rem***sprite&sound pokes*********
1480 rem==============================
1490 v=53248
1500 pokev+41,2:pokev+42,2
1510 pokev+43,6:pokev+44,13:pokev+4,24:pokev+6,64
1520 poke v+37,7:pokev+38,12:pokev+39,6:pokev+40,11
1530 poke54296,10
1540 poke54272,0
1550 poke54273,40
1560 poke54277,6
1570 poke54278,250
1580 poke54276,33
1590 rem==============================
1600 rem********start*****************
1610 rem==============================
1620 pokev+30,0:sys49152
1630 rem==============================
1640 rem*********kollision************
1650 rem==============================
1660 poke53280,1:poke53280,0:pokev+30,0:pokev+21,31
1670 x1=peek(v):x2=peek(v+2):y1=peek(v+1):y2=peek(v+3)
1680 if peek(v+16)and2^0 then x1=x1+255
1690 if peek(v+16)and2^1 then x2=x2+255
1700 if abs(x1-x2)<24 and abs(y1-y2)<21 then goto 1730
1710 if peek(50030)=0 then goto 1860
1720 if peek(50030)=1 then goto 1750
1730 if y1=y2then gosub 2360:goto 1530
1740 if y1>y2then goto 1860
1750 print"":s1=s1+1
1760 forx=1tos1
1770 print"[209]";
1780 nextx
1790 ifs1=5thenru=ru+1:forx=1984to1990:pokex,96:next x
1800 ifs1=5thens1=0:s2=0:pz(t1)=pz(t1)+1:forx=2015to2023:pokex,96:next x
1810 gosub 2360
1820 ifru=1thenprint"":printtab(18)"[153]^^";
1830 ifru=2thenprint"":printtab(18)"[153]^^^";
1840 if ru=3 then zl=zl+1:goto 2000
1850 goto 1530
1860 print"":s2=s2+1
1870 forx=1tos2
1880 printtab(34)"[152][209]";
1890 nextx
1900 ifs2=5thenru=ru+1:forx=1984to1990:poke x,96:nextx
1910 ifs2=5thens1=0:s2=0:pz(t2)=pz(t2)+1:forx=2015to2023:poke x,96:nextx
1920 gosub 2360
1930 ifru=1thenprint"":printtab(18)"[153]^^";
1940 ifru=2thenprint"":printtab(18)"[153]^^^";
1950 if ru=3 then zl=zl+1:goto 2000
1960 goto 1530
1970 rem==============================
1980 rem*****sieger !!****************
1990 rem==============================
2000 if sz>2 then goto 2710
2010 if pz(1)>pz(2) then si$=s$(1):goto 2030
2020 si$=s$(2)
2030 poke v+21,0:print"[147]"
2040 poke 53272,23
2050 poke 53265,peek(53265)and247
2060 poke 53265,(peek(53265)and248)+7
2070 poke 53265,peek(53265)and239
2080 for x=1 to 25
2090 printtab(12)si$;" gewinnt !!!"
2100 z=z+1:poke646,z
2110 if z>14 then z=1
2120 next x
2130 pokev+41,6:pokev+42,11:pokev+43,6:pokev+44,11:pokev+45,6:pokev+46,11
2140 pokev+21,255:pokev,24:pokev+1,54 :poke2040,192
2150 pokev+16,170:pokev+2,64:pokev+3,54 :poke2041,193
2160 pokev+4,24:pokev+5,112:poke2042,192
2170 pokev+6,64:pokev+7,112:poke2043,193
2180 pokev+8,24:pokev+9,162:poke2044,192
2190 pokev+10,64:pokev+11,162:poke2045,193
2200 pokev+12,24:pokev+13,225:poke2046,192
2210 pokev+14,64:pokev+15,225:poke2047,193
2220 poke 53265,peek(53265)or 16
2230 for x=1 to 120
2240 printtab(12)si$;" gewinnt !!!"
2250 z=z+1:poke646,z
2260 if z>14 then z=1
2270 next x
2280 pokev+21,0
2290 poke 53265,peek(53265)or 8
2300 poke 53265,(peek(53265)and248)+3
2310 print"[147]":poke53272,21
2320 run 190
2330 rem==============================
2340 rem*****sound********************
2350 rem==============================
2360 a=0
2370 poke 54296,15:f=50:g=50
2380 poke54272,0:poke54279,0
2390 poke54273,f:poke54280,g
2400 poke64277,0:poke54284,0
2410 poke54278,240:poke54285,240
2420 poke54276,129:poke54283,129
2430 f=f-4:g=g-4
2440 if f<1 then 2370
2450 a=a+1
2460 if a=12thenpoke54276,32:poke54283,32:pokev+21,0:return
2470 goto 2380
2480 rem==============================
2490 rem**********titelbild***********
2500 rem==============================
2510 print"[147]":poke646,14
2520 print""
2530 printtab(17)"von"
2540 print
2550 printtab(13)"ralph jordan"
2560 x=8
2570 for z=1 to 15:print""
2580 print" [211][211][211][223][146] [211] [211] [211][211][211][211] [211] [211] ":poke646,x:x=x+1
2590 print" [211] [211] [211] [211] [211] [211] [211] ":poke646,x:x=x+1
2600 print" [211] [211] [211] [211] [211] [211] [211] ":poke646,x:x=x+1
2610 print" [211] [211] [211] [211] [211][211][211][211] [211] [211] ":poke646,x:x=x+1
2620 print" [211] [211] [211] [211] [211] [211] [211] ":poke646,x:x=x+1
2630 print" [211] [211] [211] [211] [211] [211] [211] ":poke646,x:x=x+1
2640 print" [211][211][211][169] [211][211][211][211] [211][211][211][211] [211][211][211] [211][211][211] ":poke646,x:x=x+1
2650 if x=15then x=1
2660 next z
2670 return
2680 rem==============================
2690 rem**********turnier*************
2700 rem==============================
2710 print"[147]":poke 646,1:poke53272,23
2720 print""
2730 ifsz>3thengoto2890
2740 on zl goto 2750,2790,2830,2870
2750 if pz(1)>pz(2)thenv1=1:d1=2:goto2770
2760 v1=2:d1=1
2770 print" ";s$(v1);"(blau) ";"vs ";s$(3);"(grau)"
2780 t1=v1:t2=3:ru=0:sys52300:poke53265,peek(53265)and239:goto180
2790 if pz(v1)>pz(3)thend2=3:goto2810
2800 d2=v1:v1=3
2810 print" ";s$(d1);"(blau) ";"vs ";s$(d2);"(grau)"
2820 t1=d1:t2=d2:ru=0:sys52300:poke53265,peek(53265)and239:goto180
2830 if pz(d1)>pz(d2)thenv2=d1:goto2850
2840 v2=d2
2850 print" ";s$(v1);"(blau) ";"vs ";s$(v2);"(grau)"
2860 t1=v1:t2=v2:ru=0:sys52300:poke53265,peek(53265)and239:goto180
2870 ifpz(v1)>pz(v2)thensi$=s$(v1):goto2030
2880 si$=s$(v2):goto2030
2890 on zl goto 2900,2940,2980
2900 ifpz(1)>pz(2)thenv1=1:goto2920
2910 v1=2
2920 print" ";s$(3);"(blau) ";"vs ";s$(4);"(grau)"
2930 t1=3:t2=4:ru=0:sys52300:poke53265,peek(53265)and239:goto180
2940 ifpz(3)>pz(4)thenv2=3:goto2960
2950 v2=4
2960 print" ";s$(v1);"(blau) ";"vs ";s$(v2);"(grau)"
2970 t1=v1:t2=v2:ru=0:sys52300:poke53265,peek(53265)and239:goto180
2980 ifpz(v1)>pz(v2)thensi$=s$(v1):goto2030
2990 si$=s$(v2):goto2030