home *** CD-ROM | disk | FTP | other *** search
/ Power Pack / Power_Pack_3_1992_Alfons_Mittelmeyer_de.d64 / edelgraf (.txt) < prev    next >
Commodore BASIC  |  2023-02-26  |  18KB  |  611 lines

  1. 1 poke53280,14:poke53281,0:poke646,1:printchr$(147);
  2. 2 ifpeek(56)=153andpeek(49153)=224then400
  3. 3 poke56,153:clr:gosub12:sys50941:sys50906,1,0:sys50990:sys51090:gosub11:gosub70
  4. 4 gosub100:sys50774,4,4:sys50088,32,12,"[197]delgraf":sys50774,1,1
  5. 5 sys50088,64,144,"[196]as noble [199]rafikprogramm":sys50088,128,160,"von [193].[205]."
  6. 6 poke49605,2:sys52569,56,136,264,176
  7. 9 fori=1to2000:geta$:ifa$<>""theni=5000
  8. 10 next:goto470
  9. 11 sys52259,57344,54272,1024,0:return
  10. 12 sys57812"edelgraf.mc1",8,0:poke780,0:poke781,0:poke782,192:sys65493
  11. 14 sys51991,8,"edelgraf.mc2",39168,7:sys65484:close8:return
  12. 15 y=64:x=88:a$="k":gosub19:fori=1to1000:next
  13. 16 x=9:y=11:t$="edelgraf":forj=1to8
  14. 17 a$=mid$(t$,j,1):gosub19:next:return
  15. 19 gosub5250:sys52948,x,y,0,0:gosub5270:x=x+dx:return
  16. 20 ifnotcsthensys49264,x,y:return
  17. 21 poke49605,2:sys49415,0,y,319,y:sys49415,x,0,x,199:poke49605,3:return
  18. 30 s=-1
  19. 40 return
  20. 50 ifnotsthen20
  21. 60 return
  22. 70 sys52259,65024,1024,320,0:sys52259,57280,1344,40,0:poke49634,0:poke49605,3
  23. 80 poke49863,2:sys50774,1,1:sys51090:sys50873,1,0:poke49154,3:return
  24. 100 sys52259,1024,65024,320,0:sys52259,1344,57280,40,0:poke49154,0:return
  25. 110 an=0:fg=notfg:iffgthenan=-1:ca=0:tr=0
  26. 120 goto150
  27. 130 poke49634,0:ml=0:iffmandtrthenpoke49605,2:sys49264,xa,ya
  28. 140 poke49634,0:gosub70:ifa$=chr$(134)thenmn=2:goto2280
  29. 150 fm=0:sys50088,0,192,"[204]inie:":gosub280
  30. 160 geta$:ifa$=""then160
  31. 170 ifa$="c"thenca=notca:goto150
  32. 180 ifa$="w"thengosub360:goto150
  33. 190 ifa$="l"thentr=nottr:goto150
  34. 200 ifa$="f"then110
  35. 210 ifa$="0"ora$="1"ora$="2"thenpa=val(a$):goto150
  36. 220 ifa$=chr$(134)ora$=chr$(133)then:gosub100:goto2270
  37. 230 ifa$="m"thenan=-1:ca=-1:ml=-1:tr=-1:fg=0:gosub100:goto510
  38. 240 ifa$="a"thengosub3390:goto140
  39. 250 ifa$=chr$(13)thengosub100:goto510
  40. 260 goto160
  41. 270 sys51115
  42. 280 a=ca:a$="[195][193]":gosub340:a=notca:a$="[195][197]":gosub340
  43. 290 a=tr:a$="[204][212]":gosub340:a=nottr:a$="[204][214]":gosub340
  44. 300 a=fg:a$="[198]ig":gosub340
  45. 310 a=ml:a$="[205][204]i":gosub340:a=wi:a$="[215]i":gosub340
  46. 320 a=0:a$="[193]ttr":gosub340
  47. 330 fori=0to2:a=(pa=i):a$=chr$(48+i):gosub340:next:return
  48. 340 poke49863,2:sys50107," "
  49. 350 poke49863,2-a:sys50107,a$:poke49863,2:return
  50. 360 xx=x:yy=y:x=240:y=192:poke49605,3:sys50088,x,y,"    "
  51. 370 gosub1560:x=xx:y=yy:poke49634,0
  52. 380 t=val(t$)*(NULL)/180:rx=cos(t):ry=-sin(t)
  53. 390 wi=(t<>0):return
  54. 400 printchr$(147)chr$(14)"  [197][196][197][204][199][210][193][198]":print:print
  55. 420 print"1 [193]ltes [194]ild"
  56. 430 print"2 [206]eues [194]ild"
  57. 431 print"3 [205][195]-[210]outinen"
  58. 440 get a$:ifa$=""then440
  59. 450 ifa$="1"then 480
  60. 451 ifa$="3"thengosub12:goto400
  61. 460 if a$<>"2"then440
  62. 470 sys50906,1,0:sys50941
  63. 480 sys51090
  64. 485 cu=1:d=8:vf=1:hf=0:zs=2:zx=1:zy=1:px=1:py=1:bf=4
  65. 490 mn=2:ca=0:tr=-1:pa=1
  66. 500 x=160:y=96:poke49863,2:goto2270
  67. 510 gosub520:goto550
  68. 520 poke49605,3:ifnotluthend=8
  69. 530 poke49635,224:poke49636,192:poke49637,160:poke49638,16:poke49639,8
  70. 540 poke49640,4:poke49641,2:poke49642,1:poke49634,3:return
  71. 550 poke49605,3:poke49634,3:ifx<0thenx=0
  72. 560 ify<0theny=0
  73. 570 ifx>319thenx=319
  74. 580 ify>199theny=199
  75. 590 ifnotluthenoncugosub20,30,50
  76. 610 ifsthenonmngosub1030,2420,2420,2720,40,4380,5810
  77. 620 ifluthengosub3030
  78. 630 geta$:ifa$=""then630
  79. 640 ifsthenonmngosub1030,2420,2420,2720,40,4380,5810
  80. 660 ifnotluthenoncugosub20,30,50
  81. 670 ifa$=chr$(13)andfethen1020
  82. 680 fe=0:ifa$=""thenx=x+d:goto550
  83. 690 ifa$="[157]"thenx=x-d:goto550
  84. 700 ifa$="[145]"theny=y-d:goto550
  85. 710 ifa$=""theny=y+d:goto550
  86. 720 ifa$="[193]"then550
  87. 730 rem neu------
  88. 740 ifa$<>chr$(133)anda$<>chr$(134)then760
  89. 750 onmngoto130,2270,2430,2560,1520,4080,5830
  90. 760 ifa$=chr$(136)thens=nots:goto550
  91. 770 ifa$=chr$(13)then on mngoto840,2410,2410,2710,1490,4390,5820
  92. 780 ifa$=" "ora$="[160]"then820
  93. 790 ifa$=chr$(135)thenlu=notlu:ifnotluthensys51090
  94. 800 ifa$=chr$(140)thenx=xandnot7:y=yandnot7
  95. 801 ifa$=chr$(139)thencs=notcs
  96. 810 goto550
  97. 820 ifd=8thend=1:goto550
  98. 830 d=8:goto550
  99. 840 iffmthen910
  100. 850 ifmlandnotanthenca=0:wi=0
  101. 860 ifanthenan=0:xe=x:ye=y
  102. 870 poke49605,2:sys49264,x,y
  103. 880 fm=-1:xa=x:ya=y
  104. 890 ifmlandnotcathendx=xs-xe:dy=ys-ye:x=x+dx:y=y+dy
  105. 900 goto550
  106. 910 ifwithengosub1060:x=kx:y=ky
  107. 920 poke49605,2:sys49264,xa,ya:ifmlandcathenxs=x:ys=y
  108. 930 ifmlandnotcathen1130
  109. 940 sys50774,px,py:sys50873,vf,hf:poke49154,fa
  110. 950 fm=0:poke49605,pa:sys49415,xa,ya,x,y:poke49605,3:ifcathenx=xa:y=ya
  111. 960 sys50774,1,1:poke49154,0
  112. 970 iffgthenfe=-1
  113. 980 ifnottrthen880
  114. 990 goto550
  115. 1020 xa=xe:ya=ye:poke49605,2:sys49264,x,y:poke631,133:poke198,1:fg=0:goto920
  116. 1030 ifnotfmthenreturn
  117. 1040 kx=x:ky=y:ifnotwithen1100
  118. 1050 gosub1060:goto1100
  119. 1060 dx=x-xa:dy=y-ya:kx=dx*rx-dy*ry+xa:ky=dy*rx+dx*ry+ya:kx=int(kx+.5)
  120. 1070 ky=int(ky+.5):ifkx<0orky<0thenkx=xa:ky=ya
  121. 1080 ifkx>319orky>199thenkx=xa:ky=ya
  122. 1090 return
  123. 1100 poke49605,2:sys51454,xa,ya,kx,ky:iffgthengosub1270
  124. 1110 poke49605,3:return
  125. 1120 poke49605,2:sys51454,xa,ya,x,y:poke49605,3:return
  126. 1130 bx=xa-xe:by=ya-ye:ax=x-xs:ay=y-ys
  127. 1140 xa=xe:ya=ye:poke49605,3:ifluthensys51090
  128. 1150 gosub70:poke49634,0:sys50088,0,192,"[193]nzahl:      [215]inkel:      "
  129. 1160 x=64:y=192:gosub1560:n=val(t$):x=168:gosub370:gosub100:x=xs:y=ys
  130. 1170 poke49605,pa:n=int(n):ifn<1then1230
  131. 1180 sys50774,px,py:sys50873,vf,hf:poke49154,fa
  132. 1190 fori=1ton:xa=xa+bx:ya=ya+by:x=x+ax:y=y+ay:ifwithengosub1060:x=kx:y=ky
  133. 1200 ifx<0ory<0orxa<0orya<0orx>319orxa>319ory>199orya>199theni=n:goto1220
  134. 1210 sys49415,xa,ya,x,y
  135. 1220 next:sys50774,1,1:poke49154,0
  136. 1230 ml=0:wi=0:goto140
  137. 1240 fk=1:poke49605,3:goto550
  138. 1250 if(xa=xe)and(ya=ye)then1120
  139. 1260 poke49605,2
  140. 1270 ifxe<>xaorye<>yathensys51454,xe,ye,kx,ky
  141. 1280 return
  142. 1290 iffk<>5thenfk=5:goto870
  143. 1300 fk=1:poke49605,1:gosub1270:goto550
  144. 1310 ifnotfmthenreturn
  145. 1320 gosub1370:poke49605,2:sys49264,xa,ya
  146. 1330 sys51470,xa,ya,x,ky:poke49605,3:return
  147. 1340 ifnotfmthen860
  148. 1350 gosub1370:poke49605,2:sys49264,xa,ya:sys50774,px,py:sys50873,vf,hf
  149. 1351 poke49154,fa
  150. 1360 fm=0:poke49605,pa:sys51470,xa,ya,x,ky:sys50774,1,1:poke49154,0:goto550
  151. 1370 ky=y:ifqathenky=sgn(y-ya)*abs(x-xa)+ya:ifky<0orky>199thenky=ya
  152. 1380 return
  153. 1390 ifnotfmthenfm=-1:goto870
  154. 1400 poke49605,2:sys49264,xa,ya
  155. 1410 fm=0:if(abs(xa-x)and255)=0then550
  156. 1420 sys50774,px,py:sys50873,vf,hf:poke49154,fa
  157. 1430 poke49605,pa:sys51710,xa,ya,abs(xa-x)and255:poke49605,3:sys50774,1,1
  158. 1431 poke49154,0:goto550
  159. 1440 ifnotfmor((abs(x-xa)and255)=0)thenreturn
  160. 1441 poke49605,2:sys51710,xa,ya,abs(x-xa)and255:poke49605,3
  161. 1450 return
  162. 1460 poke49635,255:poke49642,255
  163. 1470 fori=49636to49641:pokei,129:next:return
  164. 1480 sys49264,256*peek(50020)+peek(50019),peek(50021):return
  165. 1490 sys50761,ri,dr:poke49634,ta:poke49863,zs:sys50774,zx,zy
  166. 1491 sys50873,vf,hf:poke49154,0:ifluthensys51090
  167. 1500 ifx<0ory<0orx>319ory>199then2880
  168. 1510 tx=-1:gosub1560:tx=0:poke49154,0
  169. 1520 ifa$=chr$(133)thengoto2880
  170. 1530 ifa$=chr$(134)thensys50761,0,0:goto2270
  171. 1540 ifyfthenx=x+dx:goto1500
  172. 1550 y=y-dy:goto1500
  173. 1560 poke49634,3:t$=""
  174. 1570 a=peek(50022):dd=8:ifa=3ora=0thendd=-dd
  175. 1580 yf=(aand1)=1:dy=dd*peek(49784)
  176. 1590 dx=dd*peek(49783)
  177. 1600 sys50088,x,y,t$
  178. 1610 gosub1460:gosub1480
  179. 1620 geta$:ifa$=""then1620
  180. 1630 gosub1480
  181. 1640 ifa$<>chr$(20)then1720
  182. 1650 ift$=""then1610
  183. 1660 a$=right$(t$,1):t$=left$(t$,len(t$)-1)
  184. 1670 xl=peek(50019):xh=peek(50020):yl=peek(50021)
  185. 1680 ifyfthenyl=yl+dy:goto1700
  186. 1690 kx=xl+256*xh+dx:xl=kxand255:xh=int(kx/256)
  187. 1700 gosub1710:sys50107,a$:gosub1710:goto1610
  188. 1710 poke50019,xl:poke50020,xh:poke50021,yl:return
  189. 1720 ifnot(a$=""ora$="[157]"ora$="[145]"ora$="")then1770
  190. 1730 sys50088,x,y,t$:ifa$=""thenx=x+1:goto1600
  191. 1740 ifa$="[157]"thenx=x-1:goto1600
  192. 1750 ifa$=""theny=y+1:goto1600
  193. 1760 y=y-1:goto1600
  194. 1770 ifa$=chr$(13)ora$=chr$(133)ora$=chr$(134)then1790
  195. 1780 sys50107,a$:t$=t$+a$:goto1610
  196. 1790 sys50088,x,y,t$
  197. 1791 ifa$<>chr$(13)thenreturn
  198. 1792 iftxthenpoke49154,fa
  199. 1800 poke49634,ta:sys50088,x,y,t$
  200. 1810 return
  201. 1820 ifnotfmthen870
  202. 1830 gosub1370:poke49605,2:sys49264,xa,ya
  203. 1840 fm=0:poke49605,ff:sys52569,xa,ya,x,ky:goto550
  204. 1850 sys49264,x,y:poke49605,2:sys51470,x,y,x+39,y+24:poke49605,3:return
  205. 1860 gosub1870:goto1940
  206. 1870 kx=(xandnot7)-16:ky=(yandnot7)-8
  207. 1880 ifkx<0thenkx=kx+8:goto1880
  208. 1890 ifkx>280thenkx=kx-8:goto1890
  209. 1900 ifky<0thenky=ky+8
  210. 1910 ifky>176thenky=ky-8
  211. 1920 sys39468,kx,ky:sys52750
  212. 1930 xc=x-kx:yc=y-ky:return
  213. 1940 poke49605,2
  214. 1950 ifxc<0thenxc=0
  215. 1960 ifyc<0thenyc=0
  216. 1970 ifxc>39thenxc=39
  217. 1980 ifyc>23thenyc=23
  218. 1990 ad=40*yc+xc+1024:z=peek(ad)
  219. 2000 pokead,z+2
  220. 2010 geta$:ifa$=""then2010
  221. 2020 pokead,z
  222. 2030 ifa$=""thenxc=xc+1:goto1950
  223. 2040 ifa$="[157]"thenxc=xc-1:goto1950
  224. 2050 ifa$="[145]"thenyc=yc-1:goto1950
  225. 2060 ifa$=""thenyc=yc+1:goto1950
  226. 2070 ifa$=chr$(13)thenx=kx+xc:y=ky+yc:sys51090:goto2270
  227. 2080 ifa$<>" "then1950
  228. 2090 z=peek(ad):pokead,(zand254)or((z+1)and1):sys49264,kx+xc,ky+yc:goto1950
  229. 2100 sys51090:sys52706:goto550
  230. 2110 sys49264,x,y:poke49605,2:sys51470,xa,ya,x,y:poke49605,3:return
  231. 2120 sys52883,xa,ya,x,y:poke49605,3:fm=1:goto550
  232. 2130 sys39936,xa,ya,x,y:poke49605,3:fm=1:goto550
  233. 2140 dz=dz-8:az=az-1
  234. 2150 x=xandnot7:y=yandnot7:kx=x+dz:ky=y+dz
  235. 2160 ifkx>319orky>199then2140
  236. 2170 poke49605,2:sys51470,x,y,kx,ky:poke49605,3:return
  237. 2180 gosub2150
  238. 2190 ifluthengosub3030
  239. 2200 geta$:ifa$=""then2200
  240. 2210 gosub2150
  241. 2220 ifa$=""thenaz=az+1:dz=dz+8:goto2180
  242. 2230 if(a$=""ora$="[157]")andaz<>0thenaz=az-1:dz=dz-8:goto2180
  243. 2240 ifa$=chr$(13)thensys51090:sys40386,x,y,az:xa=x:ya=y:x=kx:y=ky:goto2760
  244. 2250 ifa$=chr$(133)ora$=chr$(134)thencu=1:goto740
  245. 2260 goto2180
  246. 2270 mn=2:fm=0:gosub70:cu=1
  247. 2280 sys50088,0,192,"[208]kt [204]in [210]-[197]ck [203]r [194]lock [207]bj [212]ext [198]uell [211]o"
  248. 2290 geta$:ifa$=""then2290
  249. 2300 ifa$="l"thengosub100:mn=1:goto140
  250. 2310 ifa$="k"thenmn=3:fk=1:mn$="[203]reis:":gosub100:goto2450
  251. 2320 ifa$="r"thenmn=3:fk=2:mn$="[210]echteck:":gosub100:goto2450
  252. 2330 ifa$="b"thengosub100:goto2580
  253. 2340 ifa$="t"thengosub100:goto2880
  254. 2350 ifa$="p"thenfk=3:gosub100:goto510
  255. 2360 ifa$="f"thenfk=4:gosub100:goto510
  256. 2370 ifa$="s"thengosub100:goto3640
  257. 2380 ifa$="o"thengosub100:goto4120
  258. 2390 goto2290
  259. 2400 sys50873,vf,hf:poke49154,fa:sys50524,x,y:poke49154,0:goto550
  260. 2410 onfkgoto1390,1340,1860,2400
  261. 2420 onfkgoto1440,1310,40,40
  262. 2430 iffmthenpoke49605,2:sys49264,xa,ya:fm=0
  263. 2440 ifa$=chr$(134)thengoto2270
  264. 2450 poke49634,0:gosub70
  265. 2460 sys50088,0,192,mn$:gosub320
  266. 2470 iffk=2thena=qa:a$="[209]uadrat":gosub340
  267. 2480 geta$:ifa$=""then2480
  268. 2490 ifa$="0"ora$="1"ora$="2"thenpa=val(a$):goto2460
  269. 2500 ifa$=chr$(133)ora$=chr$(134)thengosub100:goto2270
  270. 2510 iffk=1then 2530
  271. 2520 ifa$="q"thenqa=notqa:goto2460
  272. 2530 ifa$="a"thengosub3390:goto2450
  273. 2540 ifa$<>chr$(13)then2460
  274. 2550 gosub100:goto510
  275. 2560 iffmthenpoke49605,2:sys49264,xa,ya:fm=0
  276. 2570 ifa$=chr$(134)thengoto2270
  277. 2580 mn=4:gosub70:poke49634,0:cu=1
  278. 2590 sys50088,0,192,"[194]lock: [209]uadr [204]oesch [198]uell [201]nv [196]reh [211]pieg"
  279. 2600 sys50088,48,192,"":a=qa:a$="[209]uadr":gosub340
  280. 2610 geta$:ifa$=""then2610
  281. 2620 ifa$="q"thenqa=notqa:goto2600
  282. 2630 ifa$="l"thenff=0:goto2700
  283. 2640 ifa$="f"thenff=1:goto2700
  284. 2650 ifa$="i"thenff=2:goto2700
  285. 2660 ifa$=chr$(133)ora$=chr$(134)thengosub100:goto2270
  286. 2670 ifa$="d"thenfk=2:az=0:dz=7:d=8:gosub100:cu=2:goto510
  287. 2680 ifa$="s"thenfk=3:gosub100:goto510
  288. 2690 goto2600
  289. 2700 fk=1:gosub100:goto510
  290. 2710 onfkgoto1820,2180,2730
  291. 2720 onfkgoto1310,2150,1310
  292. 2730 ifnotfmthen870
  293. 2740 ifluthensys51090
  294. 2750 gosub1370:poke49605,2:sys49264,xa,ya
  295. 2760 poke49605,2:gosub1330
  296. 2770 gosub70:poke49634,0
  297. 2780 sys50088,0,192,"[211]piegeln: [204]i/[210]e [207]b/[213]nt "
  298. 2790 ifcu=2thensys50107,"[196]rehen"
  299. 2800 geta$:ifa$=""then2800
  300. 2810 if a$="l"thengosub2860:sys39936,xa,ya,x,ky:goto2760
  301. 2820 if a$="o"thengosub2860:sys52883,xa,ya,x,ky:goto2760
  302. 2830 if (a$="d"ora$=chr$(13))andcu=2thengosub2860:sys40386,xa,ya,az:goto2760
  303. 2840 ifa$=chr$(133)ora$=chr$(134)then2870
  304. 2850 goto2800
  305. 2860 gosub100:poke49605,2:gosub1330:goto70
  306. 2870 gosub100:poke49605,2:gosub1330:fm=0:cu=1:goto2560
  307. 2880 mn=5:poke49634,0:poke49863,2:gosub70
  308. 2890 sys50761,0,0
  309. 2900 sys50088,0,192,"[212]ext: [193]ttr 0 1 2 3 [210]ichtung   [196]rehung [193]"
  310. 2910 poke49863,3:sys50088,(11+ta+ta)*8,192,chr$(ta+48)
  311. 2920 sys50761,0,(ri+3)and3:sys50088,224,192,"^"
  312. 2930 sys50761,0,dr:sys50088,304,192,"[193]"
  313. 2940 poke49863,2:sys50761,0,0
  314. 2950 geta$:ifa$=""then2950
  315. 2960 ifa$="r"thenri=(ri-1)and3:goto2890
  316. 2970 ifa$="d"thendr=(dr-1)and3:goto2890
  317. 2980 ifa$>="0"anda$<"4"thenta=val(a$):goto2890
  318. 2990 ifa$=chr$(13)thengosub100:goto510
  319. 3000 ifa$=chr$(133)ora$=chr$(134)thensys50761,0,0:gosub100:goto2270
  320. 3010 ifa$="a"thengosub3390:goto2880
  321. 3020 goto2950
  322. 3030 gosub1870
  323. 3040 ad=40*yc+xc+1024:z=peek(ad)
  324. 3050 pokead,z+2:return
  325. 3060 geta$:ifa$=""then3060
  326. 3070 a=val(a$):ifa<1ora>2then3060
  327. 3080 return
  328. 3090 a=(a+1)and1:q=53248+1024*a:poke49605,2
  329. 3100 za=57344+4*320+80:ya=31:xa=79
  330. 3110 forj=1to2:zl=za:fori=1to4:z=zl:sys51470,xa,ya,xa+33,ya+33:fork=1to4
  331. 3120 sys52259,z,q,32,0:q=q+32:z=z+320:next
  332. 3130 xa=xa+40:zl=zl+40:next:xa=79:za=za+320*5:ya=ya+40:next
  333. 3140 return
  334. 3150 gosub70
  335. 3160 poke49634,0:sys50088,0,192,"[199]rafik: [211]i [200]o [215]e [204]oe  [218]satz:  [197]dit [193]ktiv"
  336. 3170 geta$:ifa$=""then3170
  337. 3180 ifa$="s"thengosub100:sys50990:goto3150
  338. 3190 ifa$="h"thengosub100:sys51002:goto3150
  339. 3200 ifa$="w"thengosub100:sys51063:goto3150
  340. 3210 ifa$="l"thengosub100:sys50906,1,0:sys50941:goto3150
  341. 3220 ifa$="e"thengosub3270:gosub3280:gosub3310:goto3150
  342. 3230 ifa$="a"thengosub3270:gosub3060:gosub100:gosub3090:goto3150
  343. 3240 ifa$=chr$(133)thengosub100:goto3640
  344. 3250 ifa$=chr$(134)then2280
  345. 3260 goto3170
  346. 3270 poke49863,3:sys50088,224,192,"?":poke49863,2:return
  347. 3280 geta$:ifa$=""then3280
  348. 3290 a=val(a$):ifa<0ora>7then3280
  349. 3300 return
  350. 3310 ifa<4thenro=1:q=53248+1024*(aand6)
  351. 3320 ifa>3thenro=0:q=53248+1024*int((aand3)/2)
  352. 3330 sys50906,1,0:sys50941:poke49605,2
  353. 3340 za=57344+4*320+80:ya=31:xa=79
  354. 3350 forj=1to2:zl=za:fori=1to4:z=zl:sys51470,xa,ya,xa+33,ya+33:fork=1to4
  355. 3360 sys52259,q,z,32,ro:q=q+32:z=z+320:next
  356. 3370 xa=xa+40:zl=zl+40:next:xa=79:za=za+320*5:ya=ya+40:next
  357. 3380 return
  358. 3390 gosub100:printchr$(147):sys51115:gf=0:printchr$(14)
  359. 3400 printchr$(147)
  360. 3410 print"  [214]ordergrundfarbe : "vf
  361. 3420 print"  [200]intergrundfarbe : "hf
  362. 3430 print"  [198]arbattribut     : "fa
  363. 3440 print"  [199]lobale [198]arbe":print
  364. 3450 print"  [208]unktgroesse     : "px;","py
  365. 3460 print"  [194]uchstabengroesse: "zx;","zy:print
  366. 3470 print"  [218]eichensatz      : "zs:print
  367. 3500 geta$:ifa$=""then3500
  368. 3510 ifa$="v"thenyk=1:gosub3630:inputvf:goto3400
  369. 3520 ifa$="h"thenyk=2:gosub3630:inputhf:goto3400
  370. 3530 ifa$="f"thenyk=3:gosub3630:inputfa:goto3400
  371. 3540 ifa$="g"thengf=-1:goto3400
  372. 3550 ifa$="p"thenyk=6:gosub3630:inputpx,py:goto3400
  373. 3560 ifa$="b"thenyk=7:gosub3630:inputzx,zy:goto3400
  374. 3570 ifa$=chr$(13)then3610
  375. 3580 ifa$="z"thenyk=9:gosub3630:inputzs:goto3400
  376. 3590 ifa$="c"thencs=notcs:goto3400
  377. 3600 goto3500
  378. 3610 sys51090:ifgfthensys50906,vf,hf
  379. 3620 goto70
  380. 3630 poke782,20:poke781,yk:poke783,peek(783)and254:sys65520:return
  381. 3640 gosub70
  382. 3650 sys50088,0,192,"[211]peicher [198]loppy [196]ruck [205]uster [195]olor [193]ttr":cu=1
  383. 3660 geta$:ifa$=""then3660
  384. 3670 ifa$="s"then3160
  385. 3680 ifa$="f"then3740
  386. 3690 ifa$="m"thengosub100:goto5280
  387. 3700 ifa$="a"thengosub3390:goto3650
  388. 3701 ifa$="d"thengosub100:goto3731
  389. 3710 ifa$="c"thenmn=7:cu=2:gosub1460:gosub100:goto550
  390. 3720 ifa$=chr$(133)ora$=chr$(134)thengosub100:goto2270
  391. 3730 goto3660
  392. 3731 gosub70:sys50088,0,192,"[196]ruck: [196]rucken [212]reiber                  "
  393. 3732 geta$:ifa$=""then3732
  394. 3733 ifa$="d"thengosub100:sys39168:goto3640
  395. 3734 ifa$=chr$(134)thengosub100:goto2270
  396. 3735 ifa$<>"t"thengosub100:goto3640
  397. 3736 xx=x:yy=y:y=192:x=184:gosub1560
  398. 3737 x=xx:y=yy:sys51991,8,t$,39168,1:sys65484:close8:gosub100:goto3731
  399. 3740 b=-1:gr=-1:c=-1
  400. 3750 sys50088,0,192,""
  401. 3760 a=b:a$="[204]aden":gosub350:a=notb:a$="[211]peichern":gosub340
  402. 3770 sys50107," [199]rafik:":ifnotgrthensys50107," [207][198] [205][198]":goto3790
  403. 3780 a=c:a$="[207][198]":gosub340:a=notc:a$="[205][198]":gosub340
  404. 3790 sys50107," [218]satz:":ifgrthensys50107," 1 2":goto3810
  405. 3800 a=c:a$="1":gosub340:a=notc:a$="2":gosub340
  406. 3810 geta$:ifa$=""then3810
  407. 3820 ifa$="l"thenb=-1:goto3750
  408. 3830 ifa$="s"thenb=0:goto3750
  409. 3840 ifa$="o"thenc=-1:gr=-1:goto3750
  410. 3850 ifa$="m"thenc=0:gr=-1:goto3750
  411. 3860 ifa$="1"thenc=-1:gr=0:goto3750
  412. 3870 ifa$="2"thenc=0:gr=0:goto3750
  413. 3880 ifa$=chr$(133)thengosub100:goto3640
  414. 3890 ifa$=chr$(134)thengoto2280
  415. 3900 ifa$<>chr$(13)then3810
  416. 3910 gosub100:gosub70:sys50088,0,192,""
  417. 3920 a$="[211]peichern ":ifbthena$="[204]aden "
  418. 3930 sys50107,a$:a$="[218]eichensatz ":ifgrthena$="[199]rafik ":sys50107,a$:goto3960
  419. 3940 sys50107,a$:a$="2":ifcthena$="1"
  420. 3950 goto3970
  421. 3960 a$="[205][198]":ifcthena$="[207][198]"
  422. 3970 sys50107,a$+":"
  423. 3980 xx=x:yy=y:x=256*peek(50020)+peek(50019):y=peek(50021)
  424. 3990 sys50107,"                   "
  425. 4000 poke49605,3:gosub1560:x=xx:y=yy
  426. 4010 gosub100:n=-gr-gr-b+1
  427. 4020 onngosub4040,4050,4060,4070
  428. 4030 sys65484:close8:gosub70:goto3750
  429. 4040 sys52122,8,t$+",p,w",54272+c*1024,4:return
  430. 4050 sys51991,8,t$,54272+c*1024,4:return
  431. 4060 sys52162,8,t$+",p,w",1+c,0:return
  432. 4070 sys52030,8,t$,1+c,0:return
  433. 4080 ifa$<>chr$(133)then4110
  434. 4090 iffk<4then4120
  435. 4100 goto4560
  436. 4110 goto2270
  437. 4120 fm=0:gosub70:sys50088,0,192,"[207]bjekt: [205]ark [215]ahl [194]ew [203]op [199]raf-[215]e [193]ufn [204]":mn=6
  438. 4130 cu=1
  439. 4140 geta$:ifa$=""then4140
  440. 4150 ifa$="m"thenan=-1:fk=1:qa=0:gosub100:goto510
  441. 4160 ifa$="k"thengosub100:goto4560
  442. 4170 ifa$="g"then4240
  443. 4180 ifa$="b"thengosub4250:fk=3:gosub100:goto510
  444. 4190 ifa$="a"then4970
  445. 4200 ifa$="w"then5030
  446. 4210 ifa$="l"then5100
  447. 4220 ifa$=chr$(133)ora$=chr$(134)thengosub100:goto2270
  448. 4230 goto4140
  449. 4240 gosub100:sys51063:poke40959,peek(40959)+64*sgn(200-peek(40959)):goto4120
  450. 4250 ifpeek(40959)<>224thencu=3
  451. 4260 return
  452. 4270 ifnotfmthen860
  453. 4280 poke49605,2:sys49264,xa,ya:sys52569,xa,ya,x,y
  454. 4290 fk=2:xs=x:ys=y:x=xe:y=ye:goto550
  455. 4300 gosub4440:ifauthen550
  456. 4310 a=-(peek(40959)=224):sys52948,x,y,a,0:fori=0to5
  457. 4320 poke40753+i,peek(53002+i):next:poke40959,224:goto4120
  458. 4330 gosub4440:ifauthen550
  459. 4340 xe=x:ye=y:sys52948,x,y,0,oa:fk=6:goto550
  460. 4350 sys52948,x,y,0,1:goto550
  461. 4360 gosub4440:ifnotauthensys52948,x,y,0,oa
  462. 4370 goto550
  463. 4380 onfkgoto1310,40,4400,4400,4400,4400,40
  464. 4390 onfkgoto4270,4480,4300,4360,4330,4880,5120
  465. 4400 gosub4440:ifauthenoncu-lugoto40,40,20,40
  466. 4410 ifpeek(40959)<>224thensys52948,x,y,0,3:return
  467. 4420 poke49605,2
  468. 4430 sys51470,xx,yy,kx,ky:poke49605,3:return
  469. 4440 xx=x-peek(40759):yy=y-peek(40760)
  470. 4450 kx=xx+256*(peek(40757)-peek(40754))+peek(40756)-peek(40753)
  471. 4460 ky=yy+peek(40758)-peek(40755)
  472. 4470 au=xx<0oryy<0orkx>319orky>199:return
  473. 4480 ifxe>xsthena=xe:xe=xs:xs=a
  474. 4490 ifye>ysthena=ye:ye=ys:ys=a
  475. 4500 ifx<xeorx>xsor(x-xe)>255then550
  476. 4510 ify<yeory>ysthen550
  477. 4520 poke49605,2:sys52569,xe,ye,xs,ys
  478. 4530 poke40753,xeand255:poke40754,int(xe/256):poke40755,ye
  479. 4540 poke40756,xsand255:poke40757,int(xs/256):poke40758,ys
  480. 4550 poke40759,x-xe:poke40760,y-ye:poke40959,224:goto4120
  481. 4560 gosub70:ifpeek(40959)<>224thencu=3
  482. 4570 poke49634,0
  483. 4580 sys50088,0,192,"[203]opie:":fori=0to3:a=(oa=i):a$=chr$(48+i):gosub340:next
  484. 4590 sys50107," [205][203] [206]eb [201]nv [196]r [204][210] [207][213]"
  485. 4600 geta$:ifa$=""then4600
  486. 4610 ifa$="i"then4720
  487. 4620 ifa$="l"then4740
  488. 4630 ifa$="o"then4770
  489. 4640 ifa$=chr$(13)thengosub100:fk=4:goto510
  490. 4650 ifa$="d"then4800
  491. 4660 ifa$="m"thengosub100:fk=5:goto510
  492. 4670 ifa$="n"thencu=1:gosub100:fk=7:goto510
  493. 4680 ifa$>="0"anda$<"4"thenoa=val(a$):goto4570
  494. 4690 ifa$=chr$(133)thengosub100:goto4120
  495. 4700 ifa$=chr$(134)thengosub100:goto2270
  496. 4710 goto4600
  497. 4720 ifpeek(40959)<>224then4600
  498. 4730 gosub100:gosub4940:poke49605,2:sys52569,xe,ye,xs,ys:goto4560
  499. 4740 ifpeek(40959)<>224then4600
  500. 4750 gosub100:gosub4940:sys39936,xe,ye,xs,ys
  501. 4760 poke40759,xs-xe-dx:goto4560
  502. 4770 ifpeek(40959)<>224then4600
  503. 4780 gosub100:gosub4940:sys52883,xe,ye,xs,ys
  504. 4790 poke40760,ys-ye-dy:goto4560
  505. 4800 ifpeek(40959)<>224then4600
  506. 4810 gosub100:gosub4940:a=int((xs-xe)/8):b=int((ys-ye)/8)
  507. 4811 if((yeandnot7)+xs-xe)>199then4560
  508. 4820 ifb>athena=b
  509. 4830 xe=xeandnot7:ye=yeandnot7
  510. 4840 sys52948,xe+dx,ye+dy,1,0:fori=0to2:poke40753+i,peek(53002+i):next
  511. 4850 xs=xe+a*8+7:ys=ye+a*8+7
  512. 4860 poke40758,ys:poke40756,xsand255:poke40757,int(xs/256)
  513. 4870 sys40386,xe,ye,a:a=dx:dx=xs-xe-dy:dy=a:poke40759,dx:poke40760,dy:goto4560
  514. 4880 gosub4440:ifauthen550
  515. 4890 gosub70:sys50088,0,192,"[193]nzahl:       "
  516. 4900 xx=x:yy=y:x=64:y=192:gosub1560:az=val(t$):x=xx:y=yy:gosub100
  517. 4910 dx=x-xe:dy=y-ye:fori=1toaz:gosub4440:ifauttheni=az:goto4930
  518. 4920 sys52948,x,y,0,oa:x=x+dx:y=y+dy
  519. 4930 next:x=xe:y=ye:goto4560
  520. 4940 xe=256*peek(40754)+peek(40753):ye=peek(40755)
  521. 4950 xs=256*peek(40757)+peek(40756):ys=peek(40758)
  522. 4960 dx=peek(40759):dy=peek(40760):return
  523. 4970 poke49634,0:poke49863,3:sys50088,312,192," "
  524. 4980 geta$:ifa$=""then4980
  525. 4990 sys50088,312,192,a$
  526. 5000 poke780,asc(a$):sys49989:ad=54272+8*peek(780)
  527. 5010 fori=0to7:sys51238,ad+i,peek(40753+i):next
  528. 5020 poke49863,2:gosub100:goto4120
  529. 5030 gosub100:sys51063:gosub70:sys50088,0,192,"[215]ahl: "
  530. 5040 poke49863,3:sys50107," "
  531. 5050 geta$:ifa$=""then5050
  532. 5060 sys50088,48,192,a$
  533. 5070 poke780,asc(a$):sys49989:ad=54272+8*peek(780)
  534. 5080 fori=0to7:sys52386,ad+i,a:poke40753+i,a:next:poke40959,224
  535. 5090 poke49863,2:goto4240
  536. 5100 ifpeek(40959)<>224then4140
  537. 5110 gosub100:gosub4940:poke49605,0:sys52569,xe,ye,xs,ys:goto4120
  538. 5120 t$="":x1=x:y1=y
  539. 5130 sys50088,x,y,"[165]"
  540. 5140 geta$:ifa$=""then5140
  541. 5150 sys50088,x,y,"[165]"
  542. 5160 ifa$<>chr$(20)then5200
  543. 5170 ift$=""then5130
  544. 5180 a$=right$(t$,1):t$=left$(t$,len(t$)-1)
  545. 5190 gosub5250:gosub5270:x=x-dx-1:sys52948,x,y,0,3:goto5130
  546. 5200 ifa$=chr$(13)ora$=chr$(133)thenx=x1:y=y1:goto4560
  547. 5210 ifa$=chr$(134)thenx=x1:y=y1:goto2270
  548. 5230 gosub5250:gosub4440:ifauthen5130
  549. 5231 t$=t$+a$
  550. 5240 sys52948,x,y,0,oa:gosub5270:x=x+dx+1:goto5130
  551. 5250 poke780,asc(a$):sys49989:ad=54272+8*peek(780)
  552. 5260 fori=0to7:sys52386,ad+i,a:poke40753+i,a:next:poke40959,160:return
  553. 5270 dx=256*(peek(40757)-peek(40754))+peek(40756)-peek(40753):return
  554. 5280 gosub70
  555. 5290 sys50088,0,192,"[205]uster: [211]etzen  [215]ahl: [194]lock [218]eichen"
  556. 5300 geta$:ifa$=""then5300
  557. 5310 ifa$="b"then5390
  558. 5320 ifa$="z"then5620
  559. 5330 ifa$="s"then5370
  560. 5340 ifa$=chr$(133)thengosub100:goto3640
  561. 5350 ifa$=chr$(134)thengosub100:goto2270
  562. 5360 goto5300
  563. 5370 gosub100:ifmfthensys51303,bm:goto5280
  564. 5380 poke49863,zf:sys51179,zc:poke49863,2:goto5280
  565. 5390 gosub100:sys50990:poke49605,1:sys50941
  566. 5400 sys50088,0,192,"[194]lockfuellmuster (4-7):    "
  567. 5410 poke49863,3:sys50088,192,192,chr$(bf+48):poke49863,2
  568. 5420 ro=0:a=bfand3:q=53248+1024*int(a/2):gosub3340
  569. 5430 ifbfand1thensys50906,0,1:goto5450
  570. 5440 sys50906,1,0
  571. 5450 geta$:ifa$=""then5450
  572. 5460 ifa$=chr$(133)thensys51002:gosub70:goto5290
  573. 5470 ifa$=chr$(134)thensys51002:goto2270
  574. 5480 ifa$=chr$(13)thengosub5500:bm=8*(bfand3)+4*z+sp:sys51002:mf=-1:goto2270
  575. 5490 bf=(asc(a$)and3)+4:goto5400
  576. 5500 z=0:sp=0
  577. 5510 gosub5600
  578. 5520 geta$:ifa$=""then5520
  579. 5530 gosub5600
  580. 5540 ifa$=""thensp=sp+1:ifsp>3thensp=3
  581. 5550 ifa$="[157]"thensp=sp-1:ifsp<0thensp=0
  582. 5560 ifa$=""thenz=z+1:ifz>1thenz=1
  583. 5570 ifa$="[145]"thenz=z-1:ifz<0thenz=0
  584. 5580 ifa$=chr$(13)thenreturn
  585. 5590 goto5510
  586. 5600 xx=80+40*sp:yy=32+40*z:poke49605,2
  587. 5610 sys52569,xx+8,yy+8,xx+23,yy+23:return
  588. 5620 gosub100:sys50990:poke49605,1:a=zf
  589. 5630 gosub3310:zf=a:sys50088,0,192,"[218]eichenfuellmuster (0-7):     "
  590. 5640 poke49863,3:sys50088,208,192,chr$(zf+48):poke49863,2
  591. 5650 ifaand1thensys50906,0,1:goto5660
  592. 5660 geta$:ifa$=""then5660
  593. 5670 ifa$=chr$(133)ora$=chr$(134)then5460
  594. 5680 ifa$<>chr$(13)thena=val(a$)and7:goto5630
  595. 5690 gosub5500:zc=64*z+16*sp:sys50774,1,1
  596. 5700 z=0:sp=0
  597. 5710 gosub5800
  598. 5720 geta$:ifa$=""then5720
  599. 5730 gosub5800
  600. 5740 ifa$=""thensp=sp+1:ifsp>3thensp=3
  601. 5750 ifa$="[157]"thensp=sp-1:ifsp<0thensp=0
  602. 5760 ifa$=""thenz=z+1:ifz>3thenz=3
  603. 5770 ifa$="[145]"thenz=z-1:ifz<0thenz=0
  604. 5780 ifa$=chr$(13)thenzc=zc+4*z+sp:sys51002:mf=0:goto2270
  605. 5790 goto5710
  606. 5800 poke49605,2:sys52569,xx+8*sp,yy+8*z,xx+8*sp+7,yy+8*z+7:return
  607. 5810 sys49264,xandnot7,yandnot7:return
  608. 5820 sys50873,vf,hf:poke49154,fa:sys51075,x,y:poke49154,0:goto550
  609. 5830 cu=1:gosub520:ifa$=chr$(133)then3640
  610. 5840 goto2270
  611.