home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / various / d10.amos / d10.amosSourceCode
AMOS Source Code  |  1990-10-14  |  6KB  |  210 lines

  1. '
  2. ' Scroll maker v1.1 by Jurgen Valks
  3. '
  4. '
  5. '--------------------------------------------------------------- 
  6. Shared Z,TEKST$,FONTNR,TLENGTE,T$,TELLER,YPOS,SPEED,PAUZE
  7. Shared S1,S2,SC1
  8. YPOS=247
  9. FONTNR=2
  10. SPEED=-1
  11. S1=$0 : S2=$0 : SC1=$FFF
  12. Proc INIT_SCREEN
  13. Proc INIT_MENU
  14. Do 
  15.  If Mouse Click=1 Then LEES_MUIS
  16. Loop 
  17. '--------------------------------------------------------------- 
  18. '
  19. Procedure INIT_SCREEN
  20.  Break Off 
  21.  Get Rom Fonts : Change Mouse 2
  22.  Screen Open 0,320,200,16,Lowres
  23.  Screen Open 1,400,260,4,Lowres
  24.  Palette S1,S2,SC1 : Curs Off : Flash Off 
  25.  Proc INIT_SCROLL_ZONE
  26.  Screen Open 2,640,100,4,Hires : Flash Off : Curs Off 
  27.  Screen Display 2,,50,,
  28.  Palette $999,$999,$0
  29. End Proc
  30. '
  31. Procedure INIT_SCROLL_ZONE
  32.  Def Scroll 1,0,238 To 355,249,SPEED,0
  33. End Proc
  34. '
  35. Procedure INIT_MENU
  36.  Screen 2
  37.  Cls : Curs Off : Reserve Zone 10 : Colour 3,$A
  38.  Locate 1,0 : Centre "* Scroll maker v1.1 by Jurgen Valks *"
  39.  Pen 3
  40.  Locate 15,3 : Print Border$(Zone$(" Edit Text ",1),1)
  41.  Locate 15,6 : Print Border$(Zone$(" Load Text ",2),1)
  42.  Locate 15,9 : Print Border$(Zone$(" Set Font  ",3),1)
  43.  Locate 29,3 : Print Border$(Zone$(" Set Scroll Speed ",4),1)
  44.  Locate 29,6 : Print Border$(Zone$(" Set Screen Color ",5),1)
  45.  Locate 29,9 : Print Border$(Zone$(" Set Scroll Color ",6),1)
  46.  Locate 50,3 : Print Border$(Zone$("    View Text     ",7),1)
  47.  Locate 50,6 : Print Border$(Zone$("    View Scroll   ",8),1)
  48.  Locate 50,9 : Print Border$(Zone$("     Save All..   ",9),1)
  49.  Locate 0,0 : Print Zone$("Quit",10)
  50. End Proc
  51. '
  52. Procedure LEES_MUIS
  53.  Z=Mouse Zone
  54.  If Z=1 Then Proc ED_TEKST : Proc INIT_MENU
  55.  If Z=2 Then Proc LAAD_TEKST : Proc INIT_MENU
  56.  If Z=3 Then Proc KIES_FONT : Proc INIT_MENU
  57.  If Z=4 Then Proc ZET_SPEED : Proc INIT_MENU
  58.  If Z=5 Then Proc SCHERM_KLEUR : Proc INIT_MENU
  59.  If Z=6 Then Proc TEKST_KLEUR : Proc INIT_MENU
  60.  If Z=7 Then Proc LAAT_TEKST_ZIEN : Proc INIT_MENU
  61.  If Z=8 Then Proc TEST_SCROLL : Proc INIT_MENU
  62.  If Z=9 Then Proc BEWAAR_TEKST : Proc INIT_MENU
  63.  If Z=10 Then Proc EINDE
  64. End Proc
  65. '
  66. Procedure ED_TEKST
  67.  Cls : Curs On 
  68.  TEKST$=""
  69.  Locate 1,0 : Centre "* EDIT SCROLL TEXT *"
  70.  Locate 1,2 : Line Input "> ";TEKST$
  71. End Proc
  72. '
  73. Procedure LAAD_TEKST
  74.  Cls 
  75.  E=Exist("scroll.txt")
  76.  If E=0
  77.   Locate 1,1 : Centre "No scroll file on this disk !"
  78.   Locate 1,3 : Centre "Press left mouse button"
  79.   Repeat 
  80.   Until Mouse Click=1 : Pop Proc
  81.  End If 
  82.  Open In 1,"scroll.txt"
  83.  Line Input #1,TEKST$
  84.  Line Input #1,SPEED
  85.  Line Input #1,FONTNR
  86.  Line Input #1,YPOS
  87.  Line Input #1,S1
  88.  Line Input #1,S2
  89.  Line Input #1,SC1
  90.  Close 1
  91.  Screen 1 : Palette S1,S2,SC1 : Proc INIT_SCROLL_ZONE
  92.  Set Font FONTNR
  93.  Screen 2
  94.  Locate 1,1 : Centre "Text file now loaded !"
  95.  Locate 1,3 : Centre "Press left mouse button"
  96.  Repeat 
  97.  Until Mouse Click=1
  98. End Proc
  99. '
  100. Procedure BEWAAR_TEKST
  101.  Cls 
  102.  Open Out 1,"scroll.txt"
  103.  Print #1,TEKST$
  104.  Print #1,SPEED
  105.  Print #1,FONTNR
  106.  Print #1,YPOS
  107.  Print #1,S1
  108.  Print #1,S2
  109.  Print #1,SC1
  110.  Close 1
  111.  Locate 1,1 : Centre "Text now saved on disk !"
  112.  Locate 1,3 : Centre "Press left mouse button"
  113.  Repeat 
  114.  Until Mouse Click=1
  115. End Proc
  116. '
  117. Procedure KIES_FONT
  118.  Cls 
  119.  Locate 1,0 : Centre "* SET FONT *"
  120.  Locate 1,2 : Print "Default = ";Font$(FONTNR)
  121.  Locate 1,4 : Input "New number 1 or 2 > ";FONTNR
  122.  If FONTNR>2 or FONTNR<1 Then KIES_FONT
  123. End Proc
  124. '
  125. Procedure LAAT_TEKST_ZIEN
  126.  Cls 
  127.  Locate 1,0 : Centre "* VIEW SCROLL TEXT *   "
  128.  Locate 1,3 : Print TEKST$
  129.  Locate 1,10 : Centre "Press left mouse button"
  130.  Repeat 
  131.  Until Mouse Click=1
  132. End Proc
  133. '
  134. Procedure TEST_SCROLL
  135.  Screen Hide 2 : Screen 1
  136.  Set Font FONTNR
  137.  If SPEED=-1 Then PAUZE=10
  138.  If SPEED=-2 Then PAUZE=5
  139.  If SPEED=-3 Then PAUZE=3
  140.  If SPEED=-4 Then PAUZE=2
  141.  TLENGTE=Len(TEKST$)
  142.  Repeat 
  143.   Inc TELLER : If TELLER>TLENGTE Then TELLER=1
  144.   T$=Mid$(TEKST$,TELLER,1)
  145.   Text 345,YPOS,T$
  146.   For J=1 To PAUZE
  147.    Scroll 1 : Multi Wait 
  148.   Next J
  149.  Until Mouse Click=1
  150.  TELLER=0 : TLENGTE=0 : Cls 
  151.  Screen Show 2 : Screen 2
  152. End Proc
  153. '
  154. Procedure ZET_SPEED
  155.  Cls 
  156.  Locate 1,0 : Centre "* SET SCROLL SPEED *"
  157.  If SPEED=-1 Then SP=1
  158.  If SPEED=-2 Then SP=2
  159.  If SPEED=-3 Then SP=3
  160.  If SPEED=-4 Then SP=4
  161.  Locate 1,3 : Print "Default = ";SP
  162.  Locate 1,5 : Input "Give new number [1-4] > ";SP
  163.  If SP<1 or SP>4 Then Proc ZET_SPEED
  164.  If SP=1 Then SPEED=-1
  165.  If SP=2 Then SPEED=-2
  166.  If SP=3 Then SPEED=-3
  167.  If SP=4 Then SPEED=-4
  168.  Proc INIT_SCROLL_ZONE
  169. End Proc
  170. '
  171. Procedure SCHERM_KLEUR
  172.  Cls 
  173.  Locate 1,0 : Centre "* SET SCREEN COLOR *"
  174.  Locate 1,3 : Print "Just type a value like ff0 or 90a"
  175.  Locate 1,4 : Print "Don't type a $ before the value!"
  176.  Locate 1,7 : Print "Border = ";Hex$(S1)
  177.  Locate 1,8 : Print "Screen = ";Hex$(S2)
  178.  Locate 14,7 : Input "> ";C1$
  179.  Locate 14,8 : Input "> ";C2$
  180.  KL1$="$"+C1$ : KL2$="$"+C2$
  181.  S1=Val(KL1$) : S2=Val(KL2$)
  182.  Screen 1 : Palette S1,S2,
  183. End Proc
  184. '
  185. Procedure TEKST_KLEUR
  186.  Cls 
  187.  Locate 1,0 : Centre "* SET SCROLL TEXT COLOR *"
  188.  Locate 1,3 : Print "Just type a value like ff0 or 30a"
  189.  Locate 1,4 : Print "Don't type a $ before the value!"
  190.  Locate 1,7 : Print "Default color ";Hex$(SC1)
  191.  Locate 18,7 : Input "> ";C3$
  192.  KL3$="$"+C3$ : SC1=Val(KL3$)
  193.  Screen 1 : Palette ,,SC1
  194. End Proc
  195. '
  196. Procedure EINDE
  197.  Cls 
  198.  Locate 1,0 : Centre "* LAST INSTRUCTIONS *"
  199.  Locate 1,2 : Print "Now load the program called SCROLL.AMOS and see !"
  200.  Locate 1,3 : Print "The file SCROLL.TXT must be on the same disc where the program SCROLL.AMOS "
  201.  Locate 1,4 : Print "stands, put it in the root, or else it won't work. Watch out for the new "
  202.  Locate 1,5 : Print "version of this program...Version 2 will have:"
  203.  Locate 1,7 : Print "* Plays music * Vu-meters * Color effects * Bouncing Scrolls *"
  204.  Locate 1,8 : Print "* More scrolls * More Fonts * Vertical Scrolls * And FREE !! *"
  205.  Locate 1,10 : Print "Press right mouse button to quit"
  206.  Repeat 
  207.  Until Mouse Click=2
  208.  Cls : Screen Close 2 : Screen Close 1
  209.  Run "menu.AMOS"
  210. End Proc