home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / subroutines / roll_screen.amos / roll_screen.amosSourceCode < prev    next >
AMOS Source Code  |  1991-06-13  |  1KB  |  32 lines

  1. ' The Below procedure will roll your screen into view  
  2. ' if you have any sprites in bank one then they will be  
  3. ' replaced when the operation is finished. 
  4. ' Please leave bank 15 clear.  
  5. ' To see how long the process tool just use this 
  6. ' Print Param  
  7. '
  8. ' Name$ is the name of your picture  
  9. ' Colours is the the number of colours the picture uses
  10. ' If Speedy=-1 then screen will roll fast  
  11. ' If Speedy=0 then screen will roll slow 
  12. '
  13. Procedure ROLL_SCREEN_[NAME$,C0LOURS,SPEEDY]
  14.    ' Procedure written by Brett George
  15.    Hide On : Bank Swap 1,15
  16.    Screen Open 7,320,266,C0LOURS,Lowres : Flash Off : Cls 0
  17.    Screen Open 0,320,266,C0LOURS,Lowres : Flash Off : Cls 0
  18.    Screen 7 : Load Iff NAME$,7 : Screen 0
  19.    Get Palette(7) : Screen To Front 0 : B=40 : Timer=0
  20.    If SPEEDY=0 Then Autoback 0
  21.    For A=0 To 176
  22.       If A/2.2=Int(A/2.2) Then Dec B
  23.       Get Bob 7,1,0,A To 320,A+1
  24.       Get Bob 7,2,0,A+15 To 320,A+B
  25.       No Mask 
  26.       Paste Bob 0,A,1
  27.       Paste Bob 0,A+2,(Hires+Laced)/2
  28.       If SPEEDY=0 Then Screen Swap : Wait Vbl 
  29.    Next 
  30.    Screen Copy 7 To 0
  31.    Screen Close 7 : Erase 1 : Bank Swap 15,1
  32. End Proc[Timer/50]