home *** CD-ROM | disk | FTP | other *** search
/ Loadstar 40 / 040.d81 / gensprite (.txt) < prev    next >
Encoding:
Commodore BASIC  |  1987-01-01  |  5.9 KB  |  219 lines

  1. 5 gosub 61000:
  2. 10 dimse$(20),se(2,20),x,y:v=53248:pokev+44,1:pokev+45,1
  3. 20 pokev+33,14:pokev+32,14:poke646,14
  4. 30 print"[147]    gensprite     by john naborowski"
  5. 40 c$="     111111112222222233333333":printc$
  6. 49 forq=1to21:printqtab(28)q;
  7. 50 if q=6 then print" press ":goto59
  8. 51 if q=7 then print" return":goto59
  9. 52 if q=8  then print" for [160]":goto59
  10. 53 if q=9  then print" menu [160]":goto59
  11. 54 if q=11 then print"space[160]":goto59
  12. 56 if q=12 then print"quits ":goto59
  13. 58 print
  14. 59 next:printc$
  15. 60 pokev+32,6:pokev+33,6
  16. 70 f1=4:f3=5:f5=6:f7=3
  17. 80 forq=2to6:poke2040+q,13:next
  18. 90 def fna(q)=1109+40*y+x:deffnb(q)=int(x/8)
  19. 100 pokefna(0),81
  20. 110 q=peek(197):q1=fna(0):geta$
  21. 120 ifq=56thengosub300
  22. 130 ifq=59thengosub300
  23. 140 ifa$=""thenx=x+1:ifx=24thenx=23
  24. 150 ifa$="[157]"thenx=x-1:ifx=-1thenx=0
  25. 160 ifa$=""theny=y+1:ify=21theny=20
  26. 170 ifa$="[145]"theny=y-1:ify=-1theny=0
  27. 171 ifa$=" "thengosub 62000
  28. 200 ifpeek(q1)=209thenpokeq1,160
  29. 210 ifpeek(q1)=81thenpokeq1,32
  30. 220 ifq=1then600
  31. 230 ifpeek(fna(0))=32thenpokefna(0),81
  32. 240 ifpeek(fna(0))=160thenpokefna(0),209
  33. 250 goto110
  34. 300 f=fnb(0)*8+7-x
  35. 310 ifq=59then500
  36. 400 ifpeek(fna(0))=209thenreturn
  37. 410 se(fnb(0),y)=se(fnb(0),y)+2^(f):pokeq1,160:return
  38. 500 ifpeek(fna(0))<>209thenreturn
  39. 510 se(fnb(0),y)=se(fnb(0),y)-2^(f):pokeq1,81:return
  40. 600 f=0:fory=0to20:se$(y)=""
  41. 620 forx=0to23:b$=chr$(32):ifpeek(fna(0))=160thenb$=" [146]"
  42. 630 se$(y)=se$(y)+b$:pokefna(0),102:nextx
  43. 640 forx=0to2:poke832+f,se(x,y):f=f+1:nextx,y
  44. 650 print"[147]":b$=chr$(13):goto3610
  45. 3130 forq=0to20:forx=0to2:printse(x,q),:nextx,q
  46. 3140 pokev+4,142:pokev+5,142:print:print
  47. 3150 print"[145][152]press [155]return [152]to end"b$"[155]p[152] to print"b$"(space) for menu[160]  "
  48. 3160 gets1$:ifs1$=""then3160
  49. 3170 ifs1$="p"then14000
  50. 3180 ifs1$=chr$(13)then 3190
  51. 3185 ifs1$=" " then 3600
  52. 3187 goto 3160
  53. 3190 print"[145]     [158]do you wish to quit ? (y/n)      "
  54. 3191 geta$:ifa$="y"then 3195
  55. 3192 ifa$="n"thenprint"[145]                                       [145][145]":goto3150
  56. 3193 goto 3191
  57. 3195 pokev+21,0:pokev+23,0:pokev+29,0
  58. 3196 open15,8,15,"r0:hello connect=hello connect":input#15,er:close15
  59. 3197 ifer<>63 then print"[147]":end
  60. 3198 load"hello connect",8,1
  61. 3600 forq=1to300:next
  62. 3610 pokev+21,0:x=0:s1$="":poke198,0
  63. 3615 poke53280,.:poke53281,.
  64. 3617 print"[147]                menu     "
  65. 3620 print"  1[152]......left top to bottom right"
  66. 3630 print"  2[152]......[129]drift down"
  67. 3631 print"  3[152]......[129]two"
  68. 3640 print"  4[152]......[158]drop"
  69. 3641 print"  5[152]......[158]three"
  70. 3645 print"  6[152]......wave"
  71. 3646 print"  7[152]......four"
  72. 3650 print"  8[152]......[154]circle"
  73. 3651 print"  9[152]......[154]five"
  74. 3660 print"  10[152].....bounce"
  75. 3661 print"  11[152].....expand"
  76. 3670 print"  12[152].....[129]manual"
  77. 3671 print"  13[152].....[129]color"
  78. 3680 print"  14[152].....[158]modify"
  79. 3681 print"  15[152].....[158]data & end"
  80. 3690 print"  16[152].....register map direct control"
  81. 4000 ifpeek(v+16)<>0thenprint"warning[146]:register 16="peek(v+16)
  82. 4100 print"[152]    enter selection [154]:    [157][157][157][157]";
  83. 4101 ln=2:gosub60000:vb=val(a$):ifvb<1then3610
  84. 4105 ifvb>16 then print"[145][145]";:goto4100
  85. 4110 pokev+5,4:pokev+4,1:pokev+21,4
  86. 4120 print"[147]":poke198,0
  87. 4130 onvbgoto9000,8000,4446,5600,4445,10300,4444,10400,4443,10100,5000
  88. 4140 onvb-11goto12000,7000,6000,3130,13000,3600
  89. 4443 x=64
  90. 4444 x=x+32
  91. 4445 x=x+16
  92. 4446 x=x+12
  93. 4500 pokev+21,x
  94. 4510 forx=1to190
  95. 4520 d2=100+int(42*sin(x*(NULL)/45))
  96. 4540 pokev+4,x:pokev+6,d2:pokev+8,190-x:pokev+10,190-x:pokev+12,d2
  97. 4550 pokev+5,d2:pokev+7,190-x:pokev+9,x:pokev+11,d2:pokev+13,x:next
  98. 4560 pokev+21,4:goto3600
  99. 5000 pokev+4,150:pokev+5,100:s1$=""
  100. 5010 print"fatten[152]....1"b$"[129]lengthen[152]..2"b$"[158]expand[152]....3"
  101. 5020 print"normal[152]....4"b$"main menu[152].5"
  102. 5030 gets1$
  103. 5040 ifs1$="1"ors1$="3"thenpokev+29,4
  104. 5050 ifs1$="2"ors1$="3"thenpokev+23,4
  105. 5060 ifs1$="4"thenpokev+29,0:pokev+23,0
  106. 5070 ifs1$="5"then3600
  107. 5080 goto5030
  108. 5600 forx=175to5step-1
  109. 5610 d2=int(491*log((x+1)/(x-1)))
  110. 5620 pokev+4,200-x:pokev+5,d2:next:goto3600
  111. 6000 print"[147]    gensprite     by john naborowski":f=0:poke53280,6:poke53281,6
  112. 6010 printc$:forq=1to21:printqtab(5)se$(q-1)q:next:printc$
  113. 6020 x=0:y=0:goto230
  114. 7000 pokev+4,220:pokev+5,100
  115. 7020 print"color code"b$"[151]0[146] black","1[146] white"b$"2[146] red","[159]3[146] cyan"
  116. 7030 print"[156]4[146] purple","5[146] green"b$"6[146] blue","[158]7[146] yellow"
  117. 7040 print"[129]8[146] orange","[149]9[146] brown"b$"[150]10[146] lt red","[151]11[146] gray1"
  118. 7060 print"[152]12[146] gray2","[153]13[146] lt green"b$"[154]14[146] lt blue","[155]15[146] gray3"
  119. 7070 print"16[146] main menu"
  120. 7080 print"your choice :    [157][157][157][157]";:gosub60000:s1$=a$:vb=int(val(s1$))
  121. 7081 ifvb=16thengoto3600
  122. 7085 ifvb>16 then print"[145]";:goto 7080
  123. 7090 pokev+41,vb:pokev+5,120:forq=1to200:next
  124. 7100 printtab(11)"[145]    [145]":goto7080
  125. 8000 y=0:z=1:m=50:goto9010
  126. 9000 y=1:z=1:m=0
  127. 9010 forx=0to200
  128. 9020 d1=x*y+m:d2=x*z
  129. 9030 pokev+4,d1:pokev+5,d2:next:goto3600
  130. 10100 forx=1to100
  131. 10110 d2=90+int(5*abs(cos(x)))
  132. 10120 pokev+4,175:pokev+5,d2:next:goto3600
  133. 10300 forx=1to200
  134. 10310 d2=100+int(42*sin(x*(NULL)/60))
  135. 10320 pokev+4,x:pokev+5,d2:next:goto3600
  136. 10400 forx=0to360step2
  137. 10410 d2=100+int(42*sin(x*(NULL)/180))
  138. 10420 d1=100+int(42*cos(x*(NULL)/180))
  139. 10430 pokev+4,d1:pokev+5,d2:next:goto3600
  140. 12000 d1=100:d2=100:print"[152]use cursur keys to control movement"
  141. 12005 print"press [return] to return to menu":poke197,64
  142. 12010 pokev+4,d1:pokev+5,d2
  143. 12020 geta$:if a$=chr$(13)then3600
  144. 12030 ifa$=""thend2=d2+1:ifd1>255thend1=200
  145. 12040 ifa$="[145]"thend2=d2-1:ifd1<2thend1=2
  146. 12050 ifa$=""thend1=d1+1:ifd2>200thend2=200
  147. 12060 ifa$="[157]"thend1=d1-1:ifd2<5thend2=5
  148. 12080 goto12010
  149. 13000 print"[147] press return to exit back to main menu"
  150. 13500 print"note:a 'p' preceding a register displays the current value"
  151. 13540 print"[152]register (0-46):";:gosub60000:s1$=a$:ifa$=""then 3600
  152. 13550 q=int(val(s1$)):ifq>46 then 13000
  153. 13560 ifq<0then"invalid register":goto13540
  154. 13600 ifleft$(s1$,1)="p"then13950
  155. 13610 ifq>16andq<21thenprintq"not available":goto13540
  156. 13620 ifq=22or(q>23andq<26)thenprintq"not available":goto13540
  157. 13700 print"[155]value: ";:gosub60000:ln=3:s1$=a$::q1=int(val(s1$))
  158. 13710 ifq1>255orq1<0thenprint"invalid value[145]"tab(7)"     [145]":goto13700
  159. 13720 ifq>36andq1>7thenprint"only color values 0-7 are allowed":goto13700
  160. 13800 print"[147]":gosub13900:goto13540
  161. 13900 pokev+q,q1:return
  162. 13950 q=int(val(mid$(s1$,2))):ifq<0orq>46then13560
  163. 13960 print"[147]value of register"q":"peek(v+q):goto13540
  164. 14000 print"[147]         ready to print? (y/n)"
  165. 14005 gets1$:ifs1$=""then 14005
  166. 14010 ifs1$="n"then3600
  167. 14013 ifs1$="y"then14025
  168. 14020 goto 14005
  169. 14025 open15,4,15:close15:ifst=0 then 14030
  170. 14026 print"[147]printer off line! press (space)"
  171. 14027 geta$:ifa$<>" "then14027
  172. 14028 goto 14000
  173. 14030 open2,4
  174. 14040 print#2
  175. 14050 forq=0to20:print#2,se(0,q),se(1,q),se(2,q):nextq:print#2
  176. 14060 close2:goto3130
  177. 60000 print"[164]";:a$="":forx=1to5
  178. 60010 getb$:ifb$=""then60010
  179. 60015 ifb$=chr$(20)andx>1 then x=x-1:printb$;"[157][164]";:a$=left$(a$,x-1):goto60010
  180. 60020 ifb$=chr$(20) then 60010
  181. 60025 ifb$=chr$(13)thenprint:return
  182. 60030 ifb$<"0"orb$>"9"then 60010
  183. 60035 ifx>ln then 60010
  184. 60040 a$=a$+b$:print"[157]"b$"[164]";:next
  185. 61000 poke53280,.:poke53281,.
  186. 61010 print"[147]"chr$(142)
  187. 61020 print"            [158]l o a d s t a r"
  188. 61030 print"            [152][163][163][163][163][163][163][163][163][163][163][163][163][163][163][163]"
  189. 61040 print
  190. 61050 print"               presents"
  191. 61060 print
  192. 61070 print
  193. 61080 print
  194. 61090 print"           g e n s p r i t e"
  195. 61100 print
  196. 61110 print
  197. 61120 print
  198. 61130 print
  199. 61140 print"           [154]by john naborowski"
  200. 61150 print
  201. 61160 print
  202. 61170 print
  203. 61180 print
  204. 61190 print
  205. 61200 print"             copyright [153]1987"
  206. 61210 print
  207. 61220 print
  208. 61230 print"        [158]press space to continue"
  209. 61240 print
  210. 61250 print"";
  211. 61300 geta$:ifa$<>" "then61300
  212. 61305 return
  213. 62000 print"    [158] do you wish to quit? (y/n)"
  214. 62001 geta$:ifa$=""then62001
  215. 62005 ifa$="[217]"ora$="y"then 3196
  216. 62007 ifa$="n"ora$="[206]"then 62010
  217. 62008 goto 62001
  218. 62010 print"                                    ":return
  219.