home *** CD-ROM | disk | FTP | other *** search
/ AMOS PD CD / amospdcd.iso / sourcecode / various / icon's_to_iff.amos / icon's_to_iff.amosSourceCode < prev    next >
AMOS Source Code  |  1993-01-08  |  1KB  |  38 lines

  1. ' This Program will convert your icon file to a picture. 
  2. ' each icon will have it's own border around it so you can easily grab 
  3. ' the icon's back at a later date. 
  4. '
  5. '
  6. '     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
  7. '                      Program written by Brett George   
  8. '
  9. '     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~  
  10. '
  11. Screen Open 0,320,256,32,0
  12. Paper 0 : Cls 0 : Curs Off : Ink 1 : Flash Off 
  13. Centre "Icon's to iff converter"
  14. Print : Cmove ,2
  15. A$=Fsel$("*.Abk","","Please choose icon","bank to be converted to iff")
  16. If A$="" Then Print "You must select a file!" : Edit 
  17. If Exist(A$)=False Then Print "File does not exist" : Edit 
  18. Load A$
  19. If Length(2)=False Then Print "You must load a icon file" : Edit 
  20. Print "You have a total of";Length(2);" Icon's.     "
  21. Input "Which icon should I draw first?";SS
  22. If SS=0 Then SS=1
  23. Get Icon Palette : Cls 0
  24. For Z=SS To Length(2)
  25.    XX=Deek(Icon Base(Z))*16
  26.    YY=Deek(Icon Base(Z)+2)
  27.    If YY>CY Then Add BY,YY : CY=YY
  28.    If X+XX>320 Then Add Y,CY+6 : X=0 : CY=0
  29.    Exit If Y+YY+3>256
  30.    Box X,Y To X+XX+3,Y+YY+3
  31.    Paste Icon X+2,Y+2,Z
  32.    Add X,XX+6
  33.    Wait 10
  34. Next 
  35. Save Iff Fsel$("","Icon's.Iff","Please choose name to save","Iff picture.")
  36. Print Z-1;"/";
  37. Print Str$(Length(2))-" ";" Icon's printed to screen"
  38. Erase 1