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 >
Commodore BASIC  |  2022-10-26  |  9KB  |  300 lines

  1. 10 rem            duell
  2. 20 rem
  3. 30 rem   (c) 1987 by ralph jordan
  4. 40 rem
  5. 50 rem        hirschweg 8
  6. 60 rem        7090 ellwangen
  7. 70 rem        tel. 07961/4377
  8. 80 rem
  9. 90 rem===============================
  10. 100 rem********lader******************
  11. 110 rem===============================
  12. 120 print"[147]":poke53280,0:poke53281,0:poke 646,14:poke53272,21
  13. 130 if p=0 then p=1:load"duell obj.",8,8
  14. 140 if p2=0 then p2=1:load"fx obj.",8,8
  15. 150 rem===============================
  16. 160 rem******grafikzeichen************
  17. 170 rem===============================
  18. 180 pz(1)=0:pz(2)=0:pz(3)=0:pz(4)=0:restore:poke53280,0:poke53281,0
  19. 190 for  i=52200 to 52252
  20. 200 read  x:poke  i,x :s=s+x:next i
  21. 210 data 120,165,1,72,41,251,133,1,169,208,133,3
  22. 220 data 169,48,133,5,160,0,132,2,132,4,162,32
  23. 230 data 177,2,145,4,200,208,249,230,3,230,5,202
  24. 240 data 208,242,104,133,1,173,24,208,41,241,9,12
  25. 250 data 141,24,208,88,96
  26. 260 sys52200
  27. 270 for  x=0 to 7:read dt
  28. 280 poke 12288+8*71+x,dt
  29. 290 data 0,0,0,0,3,15,63,255
  30. 300 next
  31. 310 for  x=0 to 7:read dt
  32. 320 poke 12288+8*72+x,dt
  33. 330 data 1,7,63,127,255,255,255,255
  34. 340 next
  35. 350 for  x=0 to 7:read dt
  36. 360 poke 12288+8*74+x,dt
  37. 370 data 128,192,240,252,255,255,255,255
  38. 380 next
  39. 390 for  x=0 to 7:read dt
  40. 400 poke 12288+8*75+x,dt
  41. 410 data 0,0,0,0,192,248,254,255
  42. 420 next
  43. 430 for  x=0 to 7:read dt
  44. 440 poke 12288+8*76+x,dt
  45. 450 data 0,0,0,0,24,0,0,0
  46. 460 next
  47. 470 for  x=0 to 7:read dt
  48. 480 poke 12288+8*68+x,dt
  49. 490 data 0,0,3,4,8,30,127,218
  50. 500 next
  51. 510 for  x=0 to 7:read dt
  52. 520 poke 12288+8*70+x,dt
  53. 530 data 0,0,192,32,16,120,254,91
  54. 540 next
  55. 550 for  x=0 to 7:read dt
  56. 560 poke 12288+8*83+x,dt
  57. 570 data 255,255,255,255,255,255,255,255
  58. 580 next
  59. 590 rem===============================
  60. 600 rem******eingaben*****************
  61. 610 rem===============================
  62. 620 if sz>0 then goto 870
  63. 630 gosub 2510
  64. 640 print"[147]":poke198,0:poke 646,14:t1=1:t2=2
  65. 650 print""
  66. 660 input"        spielerzahl(2-4)";sz
  67. 670 if sz<2 or sz>4 then goto 640
  68. 680 for x=1 to sz
  69. 690 print"[147]"
  70. 700 print""
  71. 710 print"       spieler";x;"(max.4 zeichen):"
  72. 720 print"[145]"
  73. 730 print
  74. 740 input"              ";s$(x)
  75. 750 if len(s$(x))>4 or len(s$(x))<1 then goto 690
  76. 760 next x
  77. 770 rem===============================
  78. 780 rem******s$1 vs s$2***************
  79. 790 rem===============================
  80. 800 print"[147]":poke 646,1
  81. 810 print""
  82. 820 print"       ";s$(1);"(blau)  ";"vs  ";s$(2);"(grau)"
  83. 830 sys 52300:poke53280,0:poke53281,0
  84. 840 rem===============================
  85. 850 rem******grafik*******************
  86. 860 rem===============================
  87. 870 poke 53265,peek(53265)and 239
  88. 880 print"    [204]        [204]      [204]          [204]    [204]"
  89. 890 print"[155][204]  [204]     [204]         [204]        [204]    [204]   "
  90. 900 print"  [204]           [204]              [204]   [204]  "
  91. 910 print"     [204]          [204]         [204]        "
  92. 920 print"  [204]         [204]         [204]           [204]"
  93. 930 print" [204]      [204]         [204]         [204]    [204]     [204] "
  94. 940 print"[155]    [204]       [204]        [204]            [204]    [204]"
  95. 950 print"  [204]     [204]       [204]         [204]          [204]  "
  96. 960 print"[155]    [204]  [204]    [204]         [204]        [204] "
  97. 970 print"[149]                  [199][200][202][203]                "
  98. 980 print"                [199][200][211][211][211][211][202][203]              "
  99. 990 print"              [199][200][211][211][211][211][211][211][211][211][202][203]    [199][200][202][203]    "
  100. 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]"
  101. 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]"
  102. 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]"
  103. 1030 print"[154][196][198] [204][204]   [204][204]  [196][198]  [204][204]   [204][204]     [204][204]  [204]    [196][198]"
  104. 1040 print"      [196][198]  [204]  [204] [204]   [196][198]    [204][204]   [196][198]  [204][204] [204] "
  105. 1050 print"[204]  [204]      [204][204]  [204][204]      [204][204] [204]    [204]    "
  106. 1060 print"[196][198]  [204]  [204]   [196][198]  [204]   [204][204]     [196][198]  [204]  [204]"
  107. 1070 print" [204][204]   [196][198]    [204]   [204][204][204]  [196][198]   [204][204]   [204][204] [204] [196][198] [204]  [204]"
  108. 1080 print""
  109. 1090 printtab(18)"[153]^";
  110. 1100 poke 53265,peek(53265)or 16
  111. 1110 rem==============================
  112. 1120 rem********sprites***************
  113. 1130 rem==============================
  114. 1140 for n=12288 to 12350:read q:poke n,q:next
  115. 1150 data 10,0,0,2,0,12,1,64,57
  116. 1160 data 1,128,60,1,64,48,42,84,48
  117. 1170 data 186,149,48,46,170,170,46,164,48
  118. 1180 data 11,170,48,58,170,240,250,170,240
  119. 1190 data 250,170,240,254,170,240,254,170,192
  120. 1200 data 62,152,0,2,80,0,1,20,0
  121. 1210 data 1,69,0,0,82,0,0,32,0
  122. 1220 for n=12352 to 12414:read q:poke n,q:next
  123. 1230 data 0,0,160,48,0,128,108,1,64
  124. 1240 data 60,2,64,12,1,64,12,21,168
  125. 1250 data 12,86,174,170,170,184,12,26,184
  126. 1260 data 12,170,224,15,170,172,15,170,175
  127. 1270 data 15,170,175,15,170,191,3,170,191
  128. 1280 data 0,38,188,0,5,128,0,20,64
  129. 1290 data 0,81,64,0,133,0,0,8,0
  130. 1300 for n=12416 to 12478:read q:poke n,q:next
  131. 1310 data 2,170,64,2,169,64,2,165,64
  132. 1320 data 2,149,64,2,85,128,1,86,128
  133. 1330 data 1,90,128,1,106,128,1,170,64
  134. 1340 data 2,169,64,2,165,64,2,149,64
  135. 1350 data 2,85,128,1,86,128,1,90,128
  136. 1360 data 1,106,128,1,170,64,2,169,64
  137. 1370 data 2,165,64,2,149,64,2,85,64
  138. 1380 for n=12672 to 12734:read q:poke n,q:next
  139. 1390 data 0,0,0,0,238,0,3,174,192
  140. 1400 data 15,190,176,14,190,176,62,190,172
  141. 1410 data 58,254,172,175,171,235,175,171,235
  142. 1420 data 175,171,235,175,171,235,175,171,235
  143. 1430 data 175,171,235,58,254,188,58,190,172
  144. 1440 data 14,190,176,14,190,176,3,190,192
  145. 1450 data 0,190,0,0,0,0,0,0,0
  146. 1460 rem==============================
  147. 1470 rem***sprite&sound pokes*********
  148. 1480 rem==============================
  149. 1490 v=53248
  150. 1500 pokev+41,2:pokev+42,2
  151. 1510 pokev+43,6:pokev+44,13:pokev+4,24:pokev+6,64
  152. 1520 poke v+37,7:pokev+38,12:pokev+39,6:pokev+40,11
  153. 1530 poke54296,10
  154. 1540 poke54272,0
  155. 1550 poke54273,40
  156. 1560 poke54277,6
  157. 1570 poke54278,250
  158. 1580 poke54276,33
  159. 1590 rem==============================
  160. 1600 rem********start*****************
  161. 1610 rem==============================
  162. 1620 pokev+30,0:sys49152
  163. 1630 rem==============================
  164. 1640 rem*********kollision************
  165. 1650 rem==============================
  166. 1660 poke53280,1:poke53280,0:pokev+30,0:pokev+21,31
  167. 1670 x1=peek(v):x2=peek(v+2):y1=peek(v+1):y2=peek(v+3)
  168. 1680 if peek(v+16)and2^0 then x1=x1+255
  169. 1690 if peek(v+16)and2^1 then x2=x2+255
  170. 1700 if abs(x1-x2)<24 and abs(y1-y2)<21 then goto 1730
  171. 1710 if peek(50030)=0 then goto 1860
  172. 1720 if peek(50030)=1 then goto 1750
  173. 1730 if y1=y2then gosub 2360:goto 1530
  174. 1740 if y1>y2then goto 1860
  175. 1750 print"":s1=s1+1
  176. 1760 forx=1tos1
  177. 1770 print"[209]";
  178. 1780 nextx
  179. 1790 ifs1=5thenru=ru+1:forx=1984to1990:pokex,96:next x
  180. 1800 ifs1=5thens1=0:s2=0:pz(t1)=pz(t1)+1:forx=2015to2023:pokex,96:next x
  181. 1810 gosub 2360
  182. 1820 ifru=1thenprint"":printtab(18)"[153]^^";
  183. 1830 ifru=2thenprint"":printtab(18)"[153]^^^";
  184. 1840 if ru=3 then zl=zl+1:goto 2000
  185. 1850 goto 1530
  186. 1860 print"":s2=s2+1
  187. 1870 forx=1tos2
  188. 1880 printtab(34)"[152][209]";
  189. 1890 nextx
  190. 1900 ifs2=5thenru=ru+1:forx=1984to1990:poke x,96:nextx
  191. 1910 ifs2=5thens1=0:s2=0:pz(t2)=pz(t2)+1:forx=2015to2023:poke x,96:nextx
  192. 1920 gosub 2360
  193. 1930 ifru=1thenprint"":printtab(18)"[153]^^";
  194. 1940 ifru=2thenprint"":printtab(18)"[153]^^^";
  195. 1950 if ru=3 then zl=zl+1:goto 2000
  196. 1960 goto 1530
  197. 1970 rem==============================
  198. 1980 rem*****sieger !!****************
  199. 1990 rem==============================
  200. 2000 if sz>2 then goto 2710
  201. 2010 if pz(1)>pz(2) then si$=s$(1):goto 2030
  202. 2020 si$=s$(2)
  203. 2030 poke v+21,0:print"[147]"
  204. 2040 poke 53272,23
  205. 2050 poke 53265,peek(53265)and247
  206. 2060 poke 53265,(peek(53265)and248)+7
  207. 2070 poke 53265,peek(53265)and239
  208. 2080 for x=1 to 25
  209. 2090 printtab(12)si$;" gewinnt !!!"
  210. 2100 z=z+1:poke646,z
  211. 2110 if z>14 then z=1
  212. 2120 next x
  213. 2130 pokev+41,6:pokev+42,11:pokev+43,6:pokev+44,11:pokev+45,6:pokev+46,11
  214. 2140 pokev+21,255:pokev,24:pokev+1,54 :poke2040,192
  215. 2150 pokev+16,170:pokev+2,64:pokev+3,54 :poke2041,193
  216. 2160 pokev+4,24:pokev+5,112:poke2042,192
  217. 2170 pokev+6,64:pokev+7,112:poke2043,193
  218. 2180 pokev+8,24:pokev+9,162:poke2044,192
  219. 2190 pokev+10,64:pokev+11,162:poke2045,193
  220. 2200 pokev+12,24:pokev+13,225:poke2046,192
  221. 2210 pokev+14,64:pokev+15,225:poke2047,193
  222. 2220 poke 53265,peek(53265)or 16
  223. 2230 for x=1 to 120
  224. 2240 printtab(12)si$;" gewinnt !!!"
  225. 2250 z=z+1:poke646,z
  226. 2260 if z>14 then z=1
  227. 2270 next x
  228. 2280 pokev+21,0
  229. 2290 poke 53265,peek(53265)or 8
  230. 2300 poke 53265,(peek(53265)and248)+3
  231. 2310 print"[147]":poke53272,21
  232. 2320 run 190
  233. 2330 rem==============================
  234. 2340 rem*****sound********************
  235. 2350 rem==============================
  236. 2360 a=0
  237. 2370 poke 54296,15:f=50:g=50
  238. 2380 poke54272,0:poke54279,0
  239. 2390 poke54273,f:poke54280,g
  240. 2400 poke64277,0:poke54284,0
  241. 2410 poke54278,240:poke54285,240
  242. 2420 poke54276,129:poke54283,129
  243. 2430 f=f-4:g=g-4
  244. 2440 if f<1 then 2370
  245. 2450 a=a+1
  246. 2460 if a=12thenpoke54276,32:poke54283,32:pokev+21,0:return
  247. 2470 goto 2380
  248. 2480 rem==============================
  249. 2490 rem**********titelbild***********
  250. 2500 rem==============================
  251. 2510 print"[147]":poke646,14
  252. 2520 print""
  253. 2530 printtab(17)"von"
  254. 2540 print
  255. 2550 printtab(13)"ralph jordan"
  256. 2560 x=8
  257. 2570 for z=1 to 15:print""
  258. 2580 print"     [211][211][211][223][146]   [211]  [211]   [211][211][211][211]   [211]     [211]     ":poke646,x:x=x+1
  259. 2590 print"     [211]  [211]   [211]  [211]   [211]      [211]     [211]     ":poke646,x:x=x+1
  260. 2600 print"     [211]  [211]   [211]  [211]   [211]      [211]     [211]     ":poke646,x:x=x+1
  261. 2610 print"     [211]  [211]   [211]  [211]   [211][211][211][211]   [211]     [211]     ":poke646,x:x=x+1
  262. 2620 print"     [211]  [211]   [211]  [211]   [211]      [211]     [211]     ":poke646,x:x=x+1
  263. 2630 print"     [211]  [211]   [211]  [211]   [211]      [211]     [211]     ":poke646,x:x=x+1
  264. 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
  265. 2650 if x=15then x=1
  266. 2660 next z
  267. 2670 return
  268. 2680 rem==============================
  269. 2690 rem**********turnier*************
  270. 2700 rem==============================
  271. 2710 print"[147]":poke 646,1:poke53272,23
  272. 2720 print""
  273. 2730 ifsz>3thengoto2890
  274. 2740 on zl goto 2750,2790,2830,2870
  275. 2750 if pz(1)>pz(2)thenv1=1:d1=2:goto2770
  276. 2760 v1=2:d1=1
  277. 2770 print"       ";s$(v1);"(blau)  ";"vs  ";s$(3);"(grau)"
  278. 2780 t1=v1:t2=3:ru=0:sys52300:poke53265,peek(53265)and239:goto180
  279. 2790 if pz(v1)>pz(3)thend2=3:goto2810
  280. 2800 d2=v1:v1=3
  281. 2810 print"       ";s$(d1);"(blau)  ";"vs  ";s$(d2);"(grau)"
  282. 2820 t1=d1:t2=d2:ru=0:sys52300:poke53265,peek(53265)and239:goto180
  283. 2830 if pz(d1)>pz(d2)thenv2=d1:goto2850
  284. 2840 v2=d2
  285. 2850 print"       ";s$(v1);"(blau)  ";"vs  ";s$(v2);"(grau)"
  286. 2860 t1=v1:t2=v2:ru=0:sys52300:poke53265,peek(53265)and239:goto180
  287. 2870 ifpz(v1)>pz(v2)thensi$=s$(v1):goto2030
  288. 2880 si$=s$(v2):goto2030
  289. 2890 on zl goto 2900,2940,2980
  290. 2900 ifpz(1)>pz(2)thenv1=1:goto2920
  291. 2910 v1=2
  292. 2920 print"       ";s$(3);"(blau)  ";"vs  ";s$(4);"(grau)"
  293. 2930 t1=3:t2=4:ru=0:sys52300:poke53265,peek(53265)and239:goto180
  294. 2940 ifpz(3)>pz(4)thenv2=3:goto2960
  295. 2950 v2=4
  296. 2960 print"       ";s$(v1);"(blau)  ";"vs  ";s$(v2);"(grau)"
  297. 2970 t1=v1:t2=v2:ru=0:sys52300:poke53265,peek(53265)and239:goto180
  298. 2980 ifpz(v1)>pz(v2)thensi$=s$(v1):goto2030
  299. 2990 si$=s$(v2):goto2030
  300.