home *** CD-ROM | disk | FTP | other *** search
/ 64'er 1989 February / 64er_Magazin_89-02_1989_Markt__Technik_de_Disk_2_of_2_Side_A.d64 / break (.txt) < prev    next >
Commodore BASIC  |  2022-10-26  |  3KB  |  124 lines

  1. 20 rem@ \word #:\fastfor:\shortif
  2. 30 rem@ \byte x,so,j,i2,ie,count,lv,sl
  3. 40 poke650,128
  4. 500 so=15:br=10:b2=br-1
  5. 900 ap=1023:gosub5750
  6. 950 gosub5700
  7. 1000 jo=56320
  8. 1005 gosub12000
  9. 1010 gosub10000
  10. 1020 gosub5100:rem berechnen
  11. 1030 gosub5200:rem testen
  12. 1032 gosub8000:rem tastatur
  13. 1035 pokeap,32:
  14. 1040 pokepo,81:
  15. 1060 gosub 5000
  16. 1070 fori=1tosp:next
  17. 1080 gosub 5000
  18. 1085 fori=1tosp:next
  19. 1090 goto1020
  20. 5000 ri=0
  21. 5005 if (peek(jo)and4)=0 then 5030:rem joystic
  22. 5010 if (peek(jo)and8)=0 then 5040
  23. 5020 return
  24. 5030 ifxc>1984thenxc=xc-1:ri=-128
  25. 5032 pokexc,119:pokexc+br,32:return
  26. 5040 ifxc<1984+40-brthen xc=xc+1:ri=128
  27. 5042 pokexc+b2,119:pokexc-1,32:return
  28. 5090 :
  29. 5100 rem berechnen
  30. 5110 ax=x:ap=po:po=po+dy
  31. 5120 xx=xx+dx:ifxxand256thenxx=xxand255:po=po+tx:x=x+tx
  32. 5130 remprint"                              ";po;x;xx;dx;tx
  33. 5140 return
  34. 5190 :
  35. 5200 pn=po+dy
  36. 5210 if peek(po)=204 or peek(po)=239 then gosub5600
  37. 5230 if po<1104then dy=40:gosub6000
  38. 5240 if x=39 then if tx=1 then dx=-dx:tx=-tx:gosub6000
  39. 5250 if x=0 then if tx=-1 then dx=-dx:tx=-tx:gosub6000
  40. 5255 if po>=1944then gosub 5270
  41. 5260 return
  42. 5270 if peek(pn)=119 thengoto5500
  43. 5275 if po>=1988then pokeap,32:gosub5700:dx=0:tx=0:dy=0:ifsl=1thengosub5950
  44. 5280 return
  45. 5399 :
  46. 5500 dy=-40:gosub6200
  47. 5505 if x=0and tx=0 then dx=128:tx=1
  48. 5506 if x=39and tx=0 then dx=-128:tx=-1
  49. 5510 dx=dx+ri:tx=0
  50. 5515 if dx+30000>30000thentx=1
  51. 5520 if dx+30000<30000thentx=-1
  52. 5525 if dx+30256<30000thentx=-1:dx=-256::return
  53. 5530 if dx>256then if dx<1000then dx=256:tx=1:return
  54. 5590 return
  55. 5600 dy=-dy:ifpo>=1104thengosub6100
  56. 5610 p=(po-x)+(xand255-3):pokep,32:pokep+1,32:pokep+2,32:pokep+3,32
  57. 5630 count=count-1:pu=pu+1:print""tab(9)pu
  58. 5640 ifcount>0thenreturn
  59. 5650 sl=sl+1:print"naechster level...":gosub5800:gosub10000:gosub5700
  60. 5660 lv=lv+1
  61. 5690 return
  62. 5700 dy=-40:dx=256:tx=1:x=5:po=1904+x:ap=1023
  63. 5710 xx=x*256:return
  64. 5750 xc=1984+20:if br>19 then xc=1984
  65. 5760 ie=3:lv=1:sl=3:pu=0
  66. 5790 return
  67. 5800 poke198,0
  68. 5810 geta$:ifa$=""then5810
  69. 5820 return
  70. 5900 print"[152]  punkte: [157]"pu"[157]    level:"lv"[157]    leben:"sl"[157]  ":return
  71. 5950 print" ende ":gosub5800
  72. 5960 gosub5700:gosub5750:gosub10000:return
  73. 6000 :
  74. 6100 :
  75. 6200 :
  76. 6510 poke54272+24,so:so=15-so
  77. 6530 return
  78. 6999 :
  79. 8000 if peek(198)=0then return
  80. 8005 geta$
  81. 8010 ifa$="+"andbr<40thenbr=br+1:ifxc>1984thenxc=xc-1
  82. 8020 ifa$="-"andbr>1thenbr=br-1
  83. 8100 if a$>="0" and a$<="9" then gosub9000
  84. 8800 b2=br-1:gosub11000
  85. 8850 ifdy<>0thenreturn
  86. 8860 gosub5700:sl=sl-1:gosub5900
  87. 8870 ap=1023:lv=lv+1
  88. 8900 return
  89. 9000 a=9-val(a$)
  90. 9010 sp=(2^a-1)*7+200*a:return
  91. 10000 poke53281,12:print"[152][147]";
  92. 10002 gosub5900:print""
  93. 10005 a$(1)="":a$(2)="[158]":a$(3)="[129]":a$(4)=""
  94. 10006 ie=ie+2:ifie>15thenie=15
  95. 10007 count=ie*7
  96. 10010 fori2=1toie:printa$((i2and3)+1);
  97. 10020 j=int(rnd(1)*3)*4
  98. 10030 printtab(j)"[204][175][175][175][204][175][175][175][204][175][175][175][204][175][175][175][204][175][175][175][204][175][175][175][204][175][175][175][146]"
  99. 10040 if (i2and3)=3 then print
  100. 10100 nexti2:print"[152]";
  101. 10150 poke53281,0:poke53280,12
  102. 11000 fori=1984to2023:pokei,32:next
  103. 11010 fori=0tob2:pokexc+i,119:next
  104. 11020 return
  105. 11110 fori=0tob2:poke1984+xc+i,119:next
  106. 12000 print"[147]"chr$(142)
  107. 12010 print"          simpelstes breakout
  108. 12020 [153]"   eine demo zum basic-boss-compiler
  109. 12022 print"              (thilo herrmann, 1988)
  110. 12023 [153]"
  111. 12024 print"
  112. 12025 [153]"    dieses spielchen darf (und soll)
  113. 12026 print"       beliebig kopiert werden.
  114. 12029 [153]"    bedienung waehrend des spiels:
  115. 12030 print"  +,- ... breite
  116. 12040 [153]"  0-9 ... geschwindigkeit
  117. 12042 print"  die bewegungsrichtung des schlaegers
  118. 12043 [153]"  beeinflusst den abprallenden ball.
  119. 12044 print"  bitte waehlen sie die
  120. 12045 [153]"  startgeschwindigkeit:(0-9)
  121. 12047 print" (bei der basic-version besser '9')
  122. 12050 [161]a$:[139]a$[178]""[167]12050
  123. 12060 [137]9000
  124.