home *** CD-ROM | disk | FTP | other *** search
AMOS Source Code | 1992-02-26 | 1.6 KB | 61 lines |
- ' *************************************************************
- '
- ' Line Copy
- '
- ' - ** By Paul Nordovics ** -
- '
- ' If you use this in your own programs I won't be offended if
- ' you mention me in your creditz !!!
- ' *************************************************************
- '
- ' line_copy0[source,sx1,sy1,sx2,sy2,dest,dx1,dy1,speed]
- '
- ' source = screen number where source image is
- ' sx1,sy1 = co-ords of top-left corner of source image
- ' sx2,sy2 = co-ords of bottom-right corner of source image
- ' dest = screen number where image is being copied to
- ' dx1,dy1 = co-ords of top-left corner where image is being copied to
- ' speed = speed of fx
- '
- ' *************************************************************
- '
- Hide
- '
- ' ********************
- ' set up source screen
- ' ********************
- Unpack 1 To 0
- '
- ' *************************
- ' set up destination screen
- ' *************************
- Screen Open 1,320,256,16,Lowres
- Curs Off : Flash Off
- Get Palette 0
- Cls 0
- '
- Wait 20
- LINE_COPY0[0,32,33,290,189,1,32,33,1]
- '
- End
- '
- Procedure LINE_COPY0[SOURCE,SX1,SY1,SX2,SY2,DEST,DX1,DY1,SPEED]
- DX=DX1
- For K=SX1 To SX2 Step 2
- If SPEED>0 Then Wait SPEED
- Screen Copy SOURCE,K,SY1,K+1,SY2+1 To DEST,DX,DY1
- Add DX,2
- Next K
- DY=DY1
- For K=SY1 To SY2 Step 2
- If SPEED>0 Then Wait SPEED
- Screen Copy SOURCE,SX1,K,SX2+1,K+1 To DEST,DX1,DY
- Add DY,2
- Next K
- DX=DX1+1
- For K=SX1+1 To SX2 Step 2
- If SPEED>0 Then Wait SPEED
- Screen Copy SOURCE,K,SY1,K+1,SY2+1 To DEST,DX,DY1
- Add DX,2
- Next K
- End Proc