home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
451-475
/
apd453
/
sprite's_to_iff.amos
/
sprite's_to_iff.amosSourceCode
Wrap
AMOS Source Code
|
1993-01-08
|
1KB
|
33 lines
' This Program will convert your sprite file to a picture.
' each sprite will have it's own border around it so you can easily grab
' the sprite's back at a later date.
' Program written by Brett George
Screen Open 0,320,256,32,0
Paper 0 : Cls 0 : Curs Off : Ink 1 : Flash Off
Centre "Sprite's to iff converter"
Print : Cmove ,2
A$=Fsel$("*.Abk","","Please choose sprite","bank to be converted to iff")
If A$="" Then Print "You must select a file!" : Edit
If Exist(A$)=False Then Print "File does not exist" : Edit
Load A$
If Length(1)=False Then Print "You must load a sprite file" : Edit
Print "You have a total of";Length(1);" Sprites. "
Input "Which sprite should I draw first?";SS
If SS=0 Then SS=1
Get Sprite Palette : Cls 0
For Z=SS To Length(1)
XX=Deek(Sprite Base(Z))*16
YY=Deek(Sprite Base(Z)+2)
If YY>CY Then Add BY,YY : CY=YY
If X+XX>320 Then Add Y,CY+6 : X=0 : CY=0
Exit If Y+YY+3>256
Box X,Y To X+XX+3,Y+YY+3
Hot Spot Z,0
Paste Bob X+2,Y+2,Z
Add X,XX+6
Wait 10
Next
Save Iff Fsel$("","Sprites.Iff","Please choose name to save","Iff picture.")
Print Z-1;"/";
Print Str$(Length(1))-" ";" Sprites printed to screen"
Erase 1