home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / subroutines / whole_screen_sine.amos / whole_screen_sine.amosSourceCode < prev   
AMOS Source Code  |  2014-06-18  |  848b  |  50 lines

  1. '************************************************
  2. '               Screen Sine wave 
  3. '               ---------------- 
  4. '
  5. '               By Malcolm Lavery
  6. '************************************************
  7. '
  8. Screen Open 0,320,256,2,Lowres
  9. Flash Off 
  10. Palette $0,$FFF
  11. Cls 0
  12. Load Iff ":iff/sine",0
  13.  
  14. Screen Open 1,320,256,2,Lowres
  15. Bob Update Off 
  16. Autoback 0
  17.  
  18. Cls 0
  19. Flash Off 
  20. Palette $0,$FFF
  21. Set Rainbow 1,1,4000,"(6,1,15)(6,-1,15)","",""
  22. Rainbow 1,0,0,100
  23. Set Rainbow 2,1,4000,"(8,1,15)(8,-1,15)","(6,1,15)(6,-1,16)",""
  24. Rainbow 2,0,120,250
  25.  
  26. Degree 
  27. Do 
  28.    
  29.    WAVY[10,10,50]
  30.    
  31.    
  32.    
  33.    
  34. Loop 
  35.  
  36. Procedure WAVY[IN,STE,SPEED]
  37.    FF=0
  38.    Repeat 
  39.       For X=0 To 320 Step STE
  40.          Y#=Sin(X+FF)*IN
  41.          
  42.          Screen Copy 0,X,0,X+STE,256 To 1,X,Y#+10
  43.          
  44.          
  45.     Next X
  46.       Add FF,SPEED
  47.       
  48.       
  49.    Until Inkey$<>""
  50. End Proc