home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / 551-575 / apd571 / progs / scroller / sa16scroll.amos / sa16scroll.amosSourceCode < prev   
AMOS Source Code  |  1993-12-02  |  2KB  |  99 lines

  1. ' New Scroll V2.1  -  Sausage   : Main Code + Bounce 
  2. '                     Angeldust : Multi-Speed + Bug Fix
  3. '                                 Freeze + Mirror + 16 Point 
  4. '
  5. Unpack 5 To 1
  6. Colour 8,$0
  7. Colour 9,$0
  8. Colour 10,$0
  9. Shift Up 2,8,11,1
  10. Screen Open 0,640,140,16,Lowres : Cls 0 : Curs Off : Flash Off 
  11. Screen 1
  12. Flash 13,"(111,2)(222,2)(333,2)(555,2)(777,2)(999,2)(bbb,2)(ddd,2)"
  13. Screen 0
  14. Get Icon Palette 
  15. 'Colour 1,$FFF 
  16. Global PP$
  17. SS=80
  18. Set Rainbow 0,0,100,"(5,-1,125)","",""
  19. Rainbow 0,0,0,80
  20. A$="A:M 320,0,RB;L X=0;L RA=1;J A;"
  21. Amreg(1)=SS
  22. ' Bounce or No Bounce
  23. ' Bounce 1 
  24. B$="A:M 0,12,54;M 0,-24,52;"
  25. B$=B$+"M 0,12,54;"
  26. B$=B$+"J A;"
  27. '
  28. ' For a halt you have to use trial and error !!
  29. M$=M$+"A         angeldust              HM Cpresents a sixteen point scroller"
  30. M$=M$+" NA thanks to              sausage              HC for the scroll routine"
  31. M$=M$+""
  32. ' leave this empty 
  33. M$=M$+"                               "
  34. N$=" abcdefghijklmnopqrstuvwxyz"
  35. Channel 0 To Screen Offset 0 : Amal 0,A$
  36. Amal On 0
  37. Channel 1 To Screen Display 0 : Amal 1,B$
  38. Amal On 1
  39. Screen Display 0,140,-50,320,135
  40. Do 
  41.    SP=0 : C=1
  42.    For L=1 To Len(M$)
  43.       REAPEET:
  44.       PP$=Mid$(M$,L,1)
  45.       SPEEED
  46.       If Mouse Key=1 Then End 
  47. ' Speed of Scroll
  48.       If(PP$="A") or(PP$="B") or(PP$="C") or(PP$="D") or(PP$="E")
  49.          Inc L : Goto REAPEET
  50.       End If 
  51. ' Halts Scroll 
  52.       If PP$="H"
  53.          Amal Freeze 0 : Wait 100 : Amal On 0 : Inc L
  54.       End If 
  55. ' Starts Mirror effect 
  56.       If PP$="M"
  57.          FLAG=1 : Inc L
  58.       End If 
  59. ' Stops Mirror effect
  60.       If PP$="N"
  61.          FLAG=0 : Inc L
  62.       End If 
  63. '
  64.       S=Instr(N$,PP$) : If S=0 Then Goto REAPEET
  65.       Paste Icon SP+320,105,S
  66.       If FLAG=1
  67.          Paste Icon SP+320,105+18,$4000+S
  68.       End If 
  69.       SP=SP+16
  70.       If SP>304 Then Gosub SLEEP
  71.    Next L
  72.    Gosub QUICKCOPY
  73. Loop 
  74. QUICKCOPY:
  75. Screen Copy 0,320,136-40,640,136 To 0,0,136-40
  76. Cls 0,320,136-40 To 640,136
  77. Amreg(0)=0 : SP=0 : 
  78. Return 
  79. SLEEP:
  80. If Amreg(0)=1 Then Goto QUICKCOPY
  81. Goto SLEEP
  82. Procedure SPEEED
  83.    Shared PP$
  84.    If PP$="A"
  85.       Amreg(1)=30
  86.    End If 
  87.    If PP$="B"
  88.       Amreg(1)=40
  89.    End If 
  90.    If PP$="C"
  91.       Amreg(1)=80
  92.    End If 
  93.    If PP$="D"
  94.       Amreg(1)=100
  95.    End If 
  96.    If PP$="E"
  97.       Amreg(1)=120
  98.    End If 
  99. End Proc