home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 11 / Amoszine 11 (Disk 2 of 2).adf / Loads_Of_Source.lha / screenwipes.amos / screenwipes.amosSourceCode < prev   
Encoding:
AMOS Source Code  |  1980-11-12  |  9.3 KB  |  304 lines

  1. '     ____   ____   __     ____   ____   _   _  _  
  2. '    /    \ /    \ /  \/\ /    \ /    \ / \ / \/ \ 
  3. '   /  ___//  /  //   / //  /  //     //  //  /  /   
  4. '  /  ___//     // / / //     / \__  //  //     /    
  5. ' /  /   /  /  // /   //  /  /    / //  //  /  /   
  6. ' \_/    \_/\_/ \/\__/ \_/\_/     \/ \_/ \_/\_/    
  7. '
  8. ' Hits ya with sone nice n cool screen wipes! All the coding 
  9. ' was done by Yazoo of Fanatix, yep I have joined FX! Anyway 
  10. ' don't forget, if you use em, credit me! Contact me.... 
  11. ' 104 London Road, Stanway, Colchester, Essex, CO3 5HD!
  12. '
  13. ' Enjoy em dudes! Yazoo in 1992! 
  14. '
  15. ' (C) Fanatix. All Rights Reserved.
  16. ' A Yazoo product! 
  17. '
  18. Hide 
  19. AG:
  20. Screen Open 1,100,100,2,Lowres
  21. Screen Hide 1
  22. Screen Open 0,640,256,2,Hires
  23. Curs Off 
  24. Palette $0,$FFF
  25. Print "     ____   ____   __     ____   ____   _   _  _ "
  26. Print "    /    \ /    \ /  \/\ /    \ /    \ / \ / \/ \"
  27. Print "   /  ___//  /  //   / //  /  //     //  //  /  /"
  28. Print "  /  ___//     // / / //     / \__  //  //     / "
  29. Print " /  /   /  /  // /   //  /  /    / //  //  /  /  "
  30. Print " \_/    \_/\_/ \/\__/ \_/\_/     \/ \_/ \_/\_/   "
  31. Print 
  32. Print "Input a number and press return!"
  33. Print 
  34. Print "1) Flood Fill!"
  35. Print 
  36. Print "2) Vinetion Blinds! (God knows how you spell that!)"
  37. Print 
  38. Print "3) Vinetion Blinds V2!"
  39. Print 
  40. Print "4) Nicefade! (Not exactly a screen wipe...)"
  41. Print 
  42. Print "5) Zoom! (No amos ZOOM command!)"
  43. Print 
  44. Print "6) Squares! (So its a little lame, but I have space to fill!)"
  45. Print 
  46. Print "7) Quit!"
  47. Print 
  48. Print "All code by Yazoo. GFX from the AMOS data disk!"
  49. Print "Greets to all, and look out for Copper Colourz V2.3!"
  50. IN:
  51. Input ">";OPT
  52. If OPT>7 Then Goto IN
  53. If OPT=1 Then Gosub _DOSCRN : _FLOOD[0,1,0] : Wait Key : Goto AG
  54. If OPT=2 Then Gosub _DOSCRN : _VBLINDS[0,1,16] : Wait Key : Goto AG
  55. If OPT=3 Then Gosub _DOSCRN : _VBLINDSII[0,1,16] : Wait Key : Goto AG
  56. If OPT=4 Then Unpack 6 To 0 : _NICEFADE[0,1] : Wait Key : Goto AG
  57. If OPT=5 Then Gosub _DOSCRN : _ZOOM[0,1] : Wait Key : Goto AG
  58. If OPT=6 Then Gosub _DOSCRN : _SQUARES[0,1] : Wait Key : Goto AG
  59. If OPT=7 Then End 
  60. Goto IN
  61. _DOSCRN:
  62. Screen Close 1
  63. Unpack 6 To 0
  64. Screen Hide 0
  65. Screen Open 1,320,256,32,Lowres
  66. Paper 0
  67. Cls 
  68. Flash Off 
  69. Curs Off 
  70. Fade 1 To 0
  71. Wait 15
  72. Return 
  73. '
  74. ' The routines....!
  75. '
  76. Procedure _FLOOD[SOURCE,DEST,CHUNK]
  77.    '
  78.    ' Another cool screen wipe routine from Yazoo of...
  79.    '
  80.    '     ____   ____   __     ____   ____   _   _  _  
  81.    '    /    \ /    \ /  \/\ /    \ /    \ / \ / \/ \ 
  82.    '   /  ___//  /  //   / //  /  //     //  //  /  /   
  83.    '  /  ___//     // / / //     / \__  //  //     /    
  84.    ' /  /   /  /  // /   //  /  /    / //  //  /  /   
  85.    ' \_/    \_/\_/ \/\__/ \_/\_/     \/ \_/ \_/\_/    
  86.    '
  87.    '  Hey guyz n gals, don't forget to credit me, Yazoo/Fanatix 
  88.    ' if you use this routine! Write to me! 104 London Road, Stanway,  
  89.    ' Colchester, Essex, CO3 5HD! Greets to all I know! Laterz!
  90.    '
  91.    ' Please note that this routine is faster the any other of its type
  92.    ' (that I have seen) even Peter Hickmans, was slow! Come on you lot, 
  93.    ' just think about the problem a little bit! This one keeps up its 
  94.    ' frame rate, even with large screens, so it does not speed up at
  95.    ' the end! Enjoy it! 
  96.    '
  97.    LINE=0
  98.    SIZE=1
  99.    SW=Screen Width(DEST)
  100.    Screen Copy SOURCE,0,LINE,SW,LINE To DEST,0,LINE
  101.    Do 
  102.       Screen Copy DEST,0,LINE,SW,LINE+SIZE To DEST,0,LINE+SIZE
  103.       If SIZE+LINE>Screen Height(DEST)
  104.          SIZE=0
  105.          Inc LINE
  106.          Screen Copy SOURCE,0,LINE,SW,LINE+1 To DEST,0,LINE
  107.          If LINE>Screen Height(DEST)
  108.             Exit 
  109.          End If 
  110.       End If 
  111.       SIZE=(SIZE+CHUNK)*2
  112.       If SIZE=0
  113.          SIZE=1
  114.       End If 
  115.    Loop 
  116. End Proc
  117. Procedure _VBLINDS[SOURCE,DEST,BLIND]
  118.    '
  119.    ' Another cool screen wipe routine from Yazoo of...
  120.    '
  121.    '     ____   ____   __     ____   ____   _   _  _  
  122.    '    /    \ /    \ /  \/\ /    \ /    \ / \ / \/ \ 
  123.    '   /  ___//  /  //   / //  /  //     //  //  /  /   
  124.    '  /  ___//     // / / //     / \__  //  //     /    
  125.    ' /  /   /  /  // /   //  /  /    / //  //  /  /   
  126.    ' \_/    \_/\_/ \/\__/ \_/\_/     \/ \_/ \_/\_/    
  127.    '
  128.    '  Hey guyz n gals, don't forget to credit me, Yazoo/Fanatix 
  129.    ' if you use this routine! Write to me! 104 London Road, Stanway,  
  130.    ' Colchester, Essex, CO3 5HD! Greets to all I know! Laterz!
  131.    '
  132.    SW=Screen Width(DEST)
  133.    LINE=0
  134.    Do 
  135.       For HGT=BLIND To 1 Step -1
  136.          Screen Copy SOURCE,0,LINE+HGT,SW,(LINE+BLIND) To DEST,0,LINE
  137.          Wait Vbl 
  138.       Next HGT
  139.       If LINE+BLIND+1=>Screen Height(DEST)
  140.          Exit 
  141.       End If 
  142.       LINE=LINE+BLIND
  143.       Dec LINE
  144.    Loop 
  145. End Proc
  146. Procedure _VBLINDSII[SOURCE,DEST,BLIND]
  147.    '
  148.    ' Another cool screen wipe routine from Yazoo of...
  149.    '
  150.    '     ____   ____   __     ____   ____   _   _  _  
  151.    '    /    \ /    \ /  \/\ /    \ /    \ / \ / \/ \ 
  152.    '   /  ___//  /  //   / //  /  //     //  //  /  /   
  153.    '  /  ___//     // / / //     / \__  //  //     /    
  154.    ' /  /   /  /  // /   //  /  /    / //  //  /  /   
  155.    ' \_/    \_/\_/ \/\__/ \_/\_/     \/ \_/ \_/\_/    
  156.    '
  157.    '  Hey guyz n gals, don't forget to credit me, Yazoo/Fanatix 
  158.    ' if you use this routine! Write to me! 104 London Road, Stanway,  
  159.    ' Colchester, Essex, CO3 5HD! Greets to all I know! Laterz!
  160.    '
  161.    SW=Screen Width(DEST)
  162.    LINE=0
  163.    Do 
  164.       For HGT=BLIND To 1 Step -1
  165.          Screen Copy SOURCE,0,LINE+HGT,SW,(LINE+BLIND) To DEST,0,LINE+HGT
  166.          Wait Vbl 
  167.       Next HGT
  168.       If LINE+BLIND+1=>Screen Height(DEST)
  169.          Exit 
  170.       End If 
  171.       LINE=LINE+BLIND
  172.       Dec LINE
  173.    Loop 
  174. End Proc
  175. Procedure _NICEFADE[SOURCE,FS]
  176.    '
  177.    ' Another cool screen wipe routine from Yazoo of...
  178.    '
  179.    '     ____   ____   __     ____   ____   _   _  _  
  180.    '    /    \ /    \ /  \/\ /    \ /    \ / \ / \/ \ 
  181.    '   /  ___//  /  //   / //  /  //     //  //  /  /   
  182.    '  /  ___//     // / / //     / \__  //  //     /    
  183.    ' /  /   /  /  // /   //  /  /    / //  //  /  /   
  184.    ' \_/    \_/\_/ \/\__/ \_/\_/     \/ \_/ \_/\_/    
  185.    '
  186.    '  Hey guyz n gals, don't forget to credit me, Yazoo/Fanatix 
  187.    ' if you use this routine! Write to me! 104 London Road, Stanway,  
  188.    ' Colchester, Essex, CO3 5HD! Greets to all I know! Laterz!
  189.    '
  190.    Screen Hide SOURCE
  191.    SCRN=Screen
  192.    Screen SOURCE
  193.    AMCL=Screen Colour
  194.    Dim CL(AMCL),R(AMCL),G(AMCL),B(AMCL),TR(AMCL),TG(AMCL),TB(AMCL)
  195.    For LOP=0 To AMCL-1
  196.       CL(LOP)=Colour(LOP)
  197.       Colour LOP,0
  198.    Next LOP
  199.    '
  200.    ' I put this here so you would not see a flicker 
  201.    ' as I calculate the RGB values. 
  202.    '
  203.    For LOP=0 To AMCL
  204.       R(LOP)=CL(LOP)/$100
  205.       G(LOP)=CL(LOP)/$10-((CL(LOP)/$100)*$10)
  206.       B(LOP)=CL(LOP)-R(LOP)*$100
  207.       B(LOP)=B(LOP)-G(LOP)*$10
  208.    Next LOP
  209.    '
  210.    ' Do the fades!
  211.    '
  212.    ' First Red! 
  213.    '
  214.    Screen Show SOURCE
  215.    For LOPI=0 To 16
  216.       For LOP=0 To AMCL
  217.          If TR(LOP)=R(LOP)*$100 Then Goto RBY
  218.          TR(LOP)=TR(LOP)+(1*$100)
  219.          Colour LOP,TR(LOP)
  220.          RBY:
  221.       Next LOP
  222.       Wait FS
  223.    Next LOPI
  224.    '
  225.    ' Then Green!  
  226.    '
  227.    For LOPI=0 To 16
  228.       For LOP=0 To AMCL
  229.          If TG(LOP)=G(LOP)*$10 Then Goto GBY
  230.          TG(LOP)=TG(LOP)+(1*$10)
  231.          Colour LOP,TR(LOP)+TG(LOP)
  232.          GBY:
  233.       Next LOP
  234.       Wait FS
  235.    Next LOPI
  236.    '
  237.    ' And last Blue!   
  238.    '
  239.    For LOPI=0 To 16
  240.       For LOP=0 To AMCL
  241.          If TB(LOP)=B(LOP)*$1 Then Goto BBY
  242.          TB(LOP)=TB(LOP)+(1*$1)
  243.          Colour LOP,TR(LOP)+TG(LOP)+TB(LOP)
  244.          BBY:
  245.       Next LOP
  246.       Wait FS
  247.    Next LOPI
  248. End Proc
  249. Procedure _ZOOM[SOURCE,DEST]
  250.    '
  251.    ' Another cool screen wipe routine from Yazoo of...
  252.    '
  253.    '     ____   ____   __     ____   ____   _   _  _  
  254.    '    /    \ /    \ /  \/\ /    \ /    \ / \ / \/ \ 
  255.    '   /  ___//  /  //   / //  /  //     //  //  /  /   
  256.    '  /  ___//     // / / //     / \__  //  //     /    
  257.    ' /  /   /  /  // /   //  /  /    / //  //  /  /   
  258.    ' \_/    \_/\_/ \/\__/ \_/\_/     \/ \_/ \_/\_/    
  259.    '
  260.    '  Hey guyz n gals, don't forget to credit me, Yazoo/Fanatix 
  261.    ' if you use this routine! Write to me! 104 London Road, Stanway,  
  262.    ' Colchester, Essex, CO3 5HD! Greets to all I know! Laterz!
  263.    '
  264.    ' This one makes a zoom type thing, but does no use the ZOOM command!
  265.    '
  266.    LINE#=Screen Height(DEST)+0.0
  267.    Do 
  268.       CNT=1
  269.       For Q=0 To Screen Height(DEST) Step LINE#
  270.          Screen Copy SOURCE,0,Q,Screen Width(DEST),Q+1 To DEST,0,CNT
  271.          Inc CNT
  272.       Next Q
  273.       If LINE#=1 Then Exit 
  274.       LINE#=LINE#-0.5
  275.    Loop 
  276. End Proc
  277. Procedure _SQUARES[SOURCE,DEST]
  278.    '
  279.    ' Another cool screen wipe routine from Yazoo of...
  280.    '
  281.    '     ____   ____   __     ____   ____   _   _  _  
  282.    '    /    \ /    \ /  \/\ /    \ /    \ / \ / \/ \ 
  283.    '   /  ___//  /  //   / //  /  //     //  //  /  /   
  284.    '  /  ___//     // / / //     / \__  //  //     /    
  285.    ' /  /   /  /  // /   //  /  /    / //  //  /  /   
  286.    ' \_/    \_/\_/ \/\__/ \_/\_/     \/ \_/ \_/\_/    
  287.    '
  288.    '  Hey guyz n gals, don't forget to credit me, Yazoo/Fanatix 
  289.    ' if you use this routine! Write to me! 104 London Road, Stanway,  
  290.    ' Colchester, Essex, CO3 5HD! Greets to all I know! Laterz!
  291.    '
  292.    SW=Screen Width(DEST)
  293.    SH=Screen Height(DEST)
  294.    SW=SW-1
  295.    SH=SH-1
  296.    For LI=0 To SW/32
  297.       For LII=0 To SH/32
  298.          For LIII=16 To 0 Step -1
  299.             Screen Copy SOURCE,(LI*32)+LIII,(LII*32)+LIII,((LI*32)+32)-LIII,((LII*32)+32)-LIII To DEST,(LI*32)+LIII,(LII*32)+LIII
  300.             Wait Vbl 
  301.          Next LIII
  302.       Next LII
  303.    Next LI
  304. End Proc