home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 42
/
af042b.adf
/
Extras.lha
/
IFF_Brush_To_Sprite.AMOS
/
IFF_Brush_To_Sprite.amosSourceCode
Wrap
AMOS Source Code
|
1992-02-21
|
967b
|
29 lines
' IFF Brush To Sprite Maker
'
' By P.J.Hickman
'
' See below for brushes that have less or more than 16 colours
'
Default : Erase 1 : Show On
FILE$=Fsel$("*.*","","Pick brush to convert")
If FILE$<>""
Hide On
' ~~~~~ Get file info ~~~~~
Open In 1,FILE$ : L=Lof(1) : Close 1 : Erase 6
Reserve As Data 6,L : Bload FILE$,Start(6)
BWIDTH=Deek(Start(6)+20) : BHEIGHT=Deek(Start(6)+22) : SWIDTH=Deek(Start(6)+36) : SHEIGHT=Deek(Start(6)+38)
' Brushes can be resolution independant, eg. it can be either hi or
' lo res. For this reason you must set your own res (and number of
' colours) in the next line.
Screen Open 0,SWIDTH,SHEIGHT,16,Lowres
Flash Off : Cls 0 : Load Iff FILE$ : Get Bob 1,0,0 To BWIDTH+1,BHEIGHT+1
Show On : FILE$=Fsel$("*.ABK","","Please type Save name For bank") : Hide On
If FILE$<>""
If Right$(Upper$(F$),4)<>".ABK"
F$=F$+".Abk"
End If
Save FILE$,1
End If
End If
Default
End