Thread: Stos 2 amos
View Single Post
Old 25 June 2015, 01:11   #8
Schlachtwerk
68k RULEZ
Schlachtwerk's Avatar
 
Join Date: Jul 2010
Location: Germany
Posts: 199
Here a simple STOS 2 AMOS Sprite Converter in AMOS.
You can load a STOS MBK File and Save then a AMOS APK File, direct Convert.

Have Fun.

Repeat
Erase 6
NEW:
F$=Fsel$("*.MBK","","Please select the","STOS sprite bank to convert")
If F$=""
Default
End
End If
Open In 1,F$
L=Lof(1)
Close 1
If Instr(F$,".MBK")=0
Goto NEW
End If
Reserve As Work 6,L
Bload F$,Start(6)
ST=Start(6)+18
F$=F$-".MBK"
If Leek(ST)<>$19861987
Boom
Goto NEW
End If
Erase 10
Reserve As Work 10,L
Fill Start(10) To Start(10)+Length(10),0
AD=Start(10)
A$="AmSp"
Gosub BB
AB=ST+4+Leek(ST+4)
NB=Deek(ST+16)
Doke AD,NB
AD=AD+2
A=AB
For NN=0 To NB-1
Locate 0,10
Centre "Sprite"+Str$(NN+1)
SA=AB+NN*8
TX=Peek(SA+4)
TY=Peek(SA+5)
NP=4
Doke AD,TX
Doke AD+2,TY
Doke AD+4,NP
Doke AD+6,Peek(SA+6)
Doke AD+8,Peek(SA+7)
AD=AD+10
SA=AB+Leek(AB+NN*8)+TX*TY*2
For N=0 To NP-1
A=SA+N*2
For Y=0 To TY-1
AA=A+Y*TX*8
For X=0 To TX-1
Doke AD,Deek(AA+X*8)
AD=AD+2
Next X
Next Y
Next N
Next NN
APAL=Hunt(ST To ST+L,"PALT")+4
If APAL=4
End
End If
For X=0 To 15
Doke AD,Deek(APAL+X*2)*2
AD=AD+2
Next
For X=0 To 15
Doke AD,Deek(APAL+X*2)*2
AD=AD+2
Next
Locate 0,14
F$=Fsel$("*.ABK","","Please type the name","of the AMOS bank to save")
If Instr(Upper$(F$),".ABK")=0
F$=F$+".ABK"
End If
Centre "Saving "+F$
Bsave F$,Start(10) To AD
Clw
Until False
BB:
Loke AD,Leek(Varptr(A$))
AD=AD+4
Return
Loke AD,A
AD=AD+4
Return
Schlachtwerk is offline  
 
Page generated in 0.04250 seconds with 11 queries