home *** CD-ROM | disk | FTP | other *** search
/ 17 Bit Software 4: Phase Four / 17Bit_Phase_Four.iso / files / 3023.dms / 3023.adf / Source-Code / Packer / Packer.amosSourceCode
Encoding:
AMOS Source Code  |  1994-02-21  |  2.0 KB  |  36 lines

  1. ' Packer - (c) Copyright John White, 1993. All rights reserved.
  2. Close Workbench : Close Editor : JJ=0
  3. 0
  4. Screen Open 0,640,50,4,Hires : Hide On : Palette $DC8,$0,$FF0,$F00 : Curs Off : Flash Off : Cls 0 : Screen Display 0,128,200,640,50 : U=0 : Gosub 4
  5. 1
  6. Z$=Inkey$ : SC=Scancode : If Z$=Chr$(13) Then If A$="" Then Goto 1
  7. If Z$=Chr$(13) and U=1 Then If Exist(A$) Then E$=A$+"Pic"+Chr$(65+JJ) : Gosub 8 : Goto 0 Else Cls 0 : Gosub 7
  8. If Z$=Chr$(13) and U=0 Then If Exist(A$) Then Gosub 5 Else Cls 0 : Gosub 4
  9. If Z$=>Chr$(32) Then If Z$<Chr$(127) Then Gosub 2
  10. If SC=70 or SC=65 Then Gosub 3
  11. If SC=69 or SC=95 Then End 
  12. Goto 1
  13. 2
  14. If V=1 Then X=1 : V=0
  15. Paper 0 : Pen 1 : If X<=70 Then Locate X,3 : Print Z$; : A$=A$+Z$ : Add X,1
  16. Return 
  17. 3
  18. If X=>1 Then Dec X : If X<1 Then V=1
  19. Paper 0 : Pen 1 : If X=>1 Then Locate X,3 : Print " "; : A$=Mid$(A$,1,Len(A$)-1)
  20. Return 
  21. 4
  22. Ink 1 : Draw 0,0 To 639,0 : Draw 0,48 To 639,48 : Ink 2 : Draw 0,1 To 639,1 : Draw 0,47 To 639,47 : Ink 3 : Draw 0,2 To 639,2 : Draw 0,46 To 639,46
  23. A$="" : Paper 0 : Pen 3 : Print At(1,1);"Please enter the Full Pathname (including Filename) of your Picture, below..." : V=0 : X=1 : Return 
  24. 5
  25. On Error Goto 6
  26. Open In 1,A$ : B$=Input$(1,4) : Close 1 : If B$="FORM" and U=0 Then C$=A$ : U=1 : Cls 0 : Gosub 7 : Else Cls 0 : Gosub 4
  27. Return 
  28. 6
  29. Cls 0 : Gosub 4 : Resume 1
  30. 7
  31. Ink 1 : Draw 0,0 To 639,0 : Draw 0,48 To 639,48 : Ink 2 : Draw 0,1 To 639,1 : Draw 0,47 To 639,47 : Ink 3 : Draw 0,2 To 639,2 : Draw 0,46 To 639,46
  32. A$="" : Paper 0 : Pen 3 : Print At(1,1);"Please enter a Pathname (without a Filename) to put the Packed File into..." : V=0 : X=1 : Return 
  33. 8
  34. Load Iff C$,2 : Screen To Front 0 : Screen 0 : Cls 0 : Ink 1 : Draw 0,0 To 639,0 : Draw 0,48 To 639,48 : Ink 2 : Draw 0,1 To 639,1 : Draw 0,47 To 639,47 : Ink 3 : Draw 0,2 To 639,2 : Draw 0,46 To 639,46
  35. Print At(1,2);"Press any Key to Pack and Save your Picture...";At(32,4);"...Your Packed Picture File will be in Bank 15" : Wait Key : Screen Close 0 : Spack 2 To 15 : Save E$,15 : Add JJ,1 : Bell : If JJ>25 Then JJ=0
  36. Return