home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1990-08-11 | 1.5 KB | 56 lines |
- ' PHASE screen swapper
- ' Written by K.K.Hudson
- ' (C)1990 Twilight software
- '
- ' Use this routine in your own programs if you wish-it is public domain.
- '
- ' USAGE:
- ' PHASE[x,y]
- ' where x is the source screen number, and y is the
- ' destination screen number.
- '
- ' LIMITATIONS:
- ' Will only work with same sized screens.
- ' Requires BOB image number 1 to work.
- '
- ' NOTE:
- ' For your own safety, never PHASE screens with different
- ' numbers of colours.
- '
- ' Use and enjoy...
- '
- Screen Close 0 : Rem <<< Close default screen
- '
- Screen Open 0,320,256,32,Lowres : Rem <<< Open source screen
- '
- Flash Off : Rem <<<Turn that awful flashing off
- '
- F$=Fsel$("","","Select an IFF image","to be loaded") : Rem <<<Load an IFF picture into screen 0
- Load Iff F$
- '
- Screen Open 1,320,256,32,Lowres : Rem <<< Open destination screen
- '
- Flash Off : Rem <<<Turn flash off for new screen
- '
- PHASE[0,1] : Rem <<<Phase it!
- Procedure PHASE[A,B]
- ' This routine was written by K.K.Hudson
- ' in October 1990.
- ' (C)1990 Twilight Software
- ' Released into the public domain as long as the routine remains unchanged
- ' and the copyright messages in the above four lines remain.
- Screen B
- Get Palette A
- X=Screen Width(A)
- W=Screen Width(A)
- Z=Screen Height(B)
- Y=Screen Height(B)
- If W<>X or Y<>Z Then End
- For F=0 To Y-2 Step 2
- Get Bob A,1,0,F To X,F+2
- No Mask 1
- For N=Y To F Step -1
- Paste Bob 0,N,1
- Next N
- Next F
- End Proc