home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / general / phase.amos / phase.amosSourceCode < prev    next >
Encoding:
AMOS Source Code  |  1990-08-11  |  1.5 KB  |  56 lines

  1. ' PHASE    screen swapper
  2. ' Written by K.K.Hudson
  3. ' (C)1990 Twilight software
  4. '
  5. ' Use this routine in your own programs if you wish-it is public domain. 
  6. '  
  7. ' USAGE: 
  8. '     PHASE[x,y] 
  9. '                 where x is the source screen number, and y is the
  10. '                 destination screen number. 
  11. '
  12. ' LIMITATIONS: 
  13. '                 Will only work with same sized screens.
  14. '                 Requires BOB image number 1 to work. 
  15. '
  16. ' NOTE:
  17. '                 For your own safety, never PHASE screens with different
  18. '                 numbers of colours.
  19. '
  20. ' Use and enjoy... 
  21. '
  22. Screen Close 0 : Rem <<< Close default screen 
  23. '
  24. Screen Open 0,320,256,32,Lowres : Rem <<< Open source screen 
  25. '
  26. Flash Off : Rem <<<Turn that awful flashing off  
  27. '
  28. F$=Fsel$("","","Select an IFF image","to be loaded") : Rem <<<Load an IFF picture into screen 0 
  29. Load Iff F$
  30. '
  31. Screen Open 1,320,256,32,Lowres : Rem <<< Open destination screen
  32. '
  33. Flash Off : Rem <<<Turn flash off for new screen 
  34. '
  35. PHASE[0,1] : Rem <<<Phase it! 
  36. Procedure PHASE[A,B]
  37. ' This routine was written by K.K.Hudson 
  38. ' in October 1990. 
  39. ' (C)1990 Twilight Software
  40. ' Released into the public domain as long as the routine remains unchanged 
  41. ' and the copyright messages in the above four lines remain. 
  42. Screen B
  43. Get Palette A
  44. X=Screen Width(A)
  45. W=Screen Width(A)
  46. Z=Screen Height(B)
  47. Y=Screen Height(B)
  48. If W<>X or Y<>Z Then End 
  49. For F=0 To Y-2 Step 2
  50. Get Bob A,1,0,F To X,F+2
  51. No Mask 1
  52. For N=Y To F Step -1
  53. Paste Bob 0,N,1
  54. Next N
  55. Next F
  56. End Proc