home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / demos / bobalizer.amos / bobalizer.amosSourceCode < prev    next >
AMOS Source Code  |  1991-06-13  |  3KB  |  195 lines

  1. Screen Open 0,320,240,4,Lowres
  2. Screen Hide 0
  3. '
  4. ' BOBALIZER V2.0 
  5. ' CODED BY VENICE 1991   
  6. '
  7. Procedure SETUP
  8. Led Off 
  9. Break Off 
  10. If Chip Free+Fast Free<500000
  11.  Close Workbench 
  12.   Close Editor 
  13. End If 
  14. Unpack 6 To 0
  15. Screen Hide 
  16. Hide 
  17. Colour 11,$600
  18. Double Buffer 
  19. End Proc
  20. Procedure MAIN
  21. Shared EO,L,LD,T,V
  22. On Error Proc HELP
  23. A$=A$+"AU (L R1=V(R0)*3; I R1=0 X D L)"
  24. A$=A$+"L: L R2=R1; L Y=R0*19+69; L X=270"
  25. A$=A$+"M -190,0,RA; W;"
  26. Amreg(0)=50
  27. For N=0 To 3
  28.    Bob N,150,50+N*20,1
  29.    Channel N To Bob N
  30.    Amal N,"Let R0="+Str$(N)+A$
  31. Next N
  32. Amal On 
  33. Wait 50
  34. Screen Show 
  35. Do 
  36. A:
  37. Mvolume V
  38. Tempo T
  39. Clear Key 
  40. If Key State(80)=-1
  41.  LMUSIC
  42. If L=1
  43. L=0
  44. Goto A
  45. End If 
  46. If EO=1
  47. E0=0
  48. Goto A
  49. End If 
  50.   Music 1
  51.    If LD=1
  52.     Colour 9,$A0 : Colour 11,$E00
  53.      P=1 : T=18 : V=63
  54.       End If 
  55.        End If 
  56. If Key State(81)=-1
  57.  SMUSIC
  58.   End If 
  59. If Key State(82)=-1
  60.  DMUSIC
  61.   End If 
  62. If Key State(83)=-1
  63.  Colour 9,$60 : Colour 11,$600
  64.   If P=1
  65.    P=0
  66.     End If 
  67.      Music Off 
  68.       End If 
  69. If Key State(84)=-1
  70.    If P=1
  71.     Else 
  72.      Music 1
  73. If EO=1
  74. EO=0
  75. Goto A
  76. End If 
  77. Colour 9,$A0 : Colour 11,$E00
  78.       End If 
  79.        End If 
  80. If Key State(85)=-1 and L=0
  81.  Led On 
  82.   L=1
  83.    Wait 5
  84.     End If 
  85. If Key State(85)=-1 and L=1
  86.  Led Off 
  87.   L=0
  88.    Wait 5
  89.     End If 
  90. If Key State(86)=-1 and T<64 and T>1
  91.  Add T,-1
  92.   End If 
  93. If Key State(87)=-1 and T<63 and T>0
  94.  Add T,1
  95.   End If 
  96. If Key State(88)=-1 and V<64 and V>1
  97.  Add V,-1
  98.    End If 
  99. If Key State(89)=-1 and V<63 and V>0
  100.  Add V,1
  101.    End If 
  102. If Key State(95)=-1
  103.  Led Off 
  104.   T=18
  105.    V=63
  106.     End If 
  107. If Key State(69)=-1
  108.  Music Off 
  109.   Mvolume 0
  110.    Fade 3
  111.     Wait 45
  112.      Amal Off 
  113.       Erase 3
  114.        Edit 
  115.         End If 
  116. If Key State(70)=-1
  117.  Colour 0,$FFF : Colour 9,$60 : Colour 11,$600
  118.   If P=1
  119.    P=0
  120. End If 
  121.     Music Off 
  122.      Erase 3
  123.       Wait 5
  124.        Colour 0,$45
  125.         End If 
  126. Loop 
  127. End Proc
  128. Procedure LMUSIC
  129. Shared L,LD
  130. On Error Proc HELP
  131. Clear Key 
  132. Show 
  133. A$=Fsel$("*.abk","","Load Music .abk")
  134. If A$=""
  135.    LD=0
  136.    Hide 
  137. Goto NL
  138. End If 
  139. Mvolume 0
  140. Wait 50
  141. Hide 
  142. Colour 9,$60
  143. Colour 15,$D00
  144. Erase 3
  145. Load A$
  146. Colour 15,$900
  147. LD=1
  148. NL:
  149. If LD=0
  150.    L=1
  151. Else 
  152.    L=0
  153. End If 
  154. End Proc
  155. Procedure SMUSIC
  156. On Error Proc HELP
  157. Clear Key 
  158. Show 
  159. A$=Fsel$("*.abk","","Save Music .abk")
  160. If A$=""
  161.  Hide 
  162.   Pop Proc
  163.    End If 
  164. Colour 9,$A0
  165. Hide 
  166. Save A$,3
  167. Colour 9,$60
  168. Pop Proc
  169. End Proc
  170. Procedure DMUSIC
  171. On Error Proc HELP
  172. Clear Key 
  173. Show 
  174. A$=Fsel$("*.abk","","Delete Music .abk")
  175. If A$=""
  176.  Hide 
  177.   Pop Proc
  178.    End If 
  179. Colour 9,$A0
  180. Hide 
  181. Kill A$
  182. Colour 9,$60
  183. Pop Proc
  184. End Proc
  185. Procedure HELP
  186. Shared EO,LD
  187. Colour 15,$900 : Colour 9,$60 : Colour 30,$DB2 : Wait 50 : Colour 30,$A82
  188. LD=0
  189. Colour 11,$600
  190. EO=1
  191. Resume Next 
  192. End Proc
  193. '
  194. SETUP
  195. MAIN