home *** CD-ROM | disk | FTP | other *** search
/ Amoszine 3 / Amoszine 3.adf / Celebrity_source / line_copy0.AMOS.pp / line_copy0.AMOS / line_copy0.amosSourceCode < prev    next >
Encoding:
AMOS Source Code  |  1992-02-26  |  1.6 KB  |  61 lines

  1. ' *************************************************************
  2. '
  3. '                            Line Copy 
  4. '
  5. '                   - ** By Paul Nordovics ** -
  6. '
  7. ' If you use this in your own programs I won't be offended if
  8. '            you mention me in your creditz !!!
  9. ' *************************************************************
  10. '
  11. ' line_copy0[source,sx1,sy1,sx2,sy2,dest,dx1,dy1,speed]  
  12. '
  13. '  source = screen number where source image is  
  14. ' sx1,sy1 = co-ords of top-left corner of source image 
  15. ' sx2,sy2 = co-ords of bottom-right corner of source image 
  16. '    dest = screen number where image is being copied to 
  17. ' dx1,dy1 = co-ords of top-left corner where image is being copied to
  18. '   speed = speed of fx
  19. '
  20. ' *************************************************************
  21. '
  22. Hide 
  23. '
  24. ' ******************** 
  25. ' set up source screen 
  26. ' ******************** 
  27. Unpack 1 To 0
  28. '
  29. ' *************************
  30. ' set up destination screen
  31. ' *************************
  32. Screen Open 1,320,256,16,Lowres
  33. Curs Off : Flash Off 
  34. Get Palette 0
  35. Cls 0
  36. '
  37. Wait 20
  38. LINE_COPY0[0,32,33,290,189,1,32,33,1]
  39. '
  40. End 
  41. '
  42. Procedure LINE_COPY0[SOURCE,SX1,SY1,SX2,SY2,DEST,DX1,DY1,SPEED]
  43.    DX=DX1
  44.    For K=SX1 To SX2 Step 2
  45.       If SPEED>0 Then Wait SPEED
  46.       Screen Copy SOURCE,K,SY1,K+1,SY2+1 To DEST,DX,DY1
  47.       Add DX,2
  48.    Next K
  49.    DY=DY1
  50.    For K=SY1 To SY2 Step 2
  51.       If SPEED>0 Then Wait SPEED
  52.       Screen Copy SOURCE,SX1,K,SX2+1,K+1 To DEST,DX1,DY
  53.       Add DY,2
  54.    Next K
  55.    DX=DX1+1
  56.    For K=SX1+1 To SX2 Step 2
  57.       If SPEED>0 Then Wait SPEED
  58.       Screen Copy SOURCE,K,SY1,K+1,SY2+1 To DEST,DX,DY1
  59.       Add DX,2
  60.    Next K
  61. End Proc