home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AmigActive 20
/
AACD20.BIN
/
AACD
/
Graphics
/
PerfectPaint
/
rexx
/
bridge
/
MkAnim.rx
< prev
next >
Wrap
Text File
|
2000-04-09
|
1KB
|
82 lines
/* arexx Script
Load anim
*/
options results
parse ARG Port b
ADDRESS value Port
pp_AvoidRefresh
Preview=0
pp_DialogInit 250 60 "*Preview*Size*" 1
pp_Cycle 0 100 8 100 16 "Size" 1 "96x96|144x144|192x192" Preview
pp_Dialog
rc=result
if rc=0 then
do
EXIT
end
pp_GetDialog 0
Preview=result
pp_AskFile 'Load*Anim'
file=result
pp_Asay 'Split*Animation|Please*wait*...'
address COMMAND
'PerfectPaint:Tools/BuildAnim '||file||' PerfectPaint:Temp/Anim SPLIT'
name="ram:script"
path='perfectpaint:Temp'
ADDRESS COMMAND 'List >'||name||' '||path||' NOHEAD LFORMAT="%s"'
ADDRESS COMMAND 'Sort 'name' 'name'.s'
count=0
IF OPEN('listfile',name'.s') THEN DO
DO FOREVER
fline = READLN('listfile')
IF EOF('listfile') THEN BREAK
count=count+1
nom.count='PerfectPaint:Temp/'||fline
END
CALL CLOSE('listfile')
END
ADDRESS value Port
pp_CloseAsay
IF count>0 then DO
file=nom.1
pp_Load file
pp_MakeAnim count Preview
pp_CountFrames
count=result
Do i=2 to count
pp_FastNextFrame
file=nom.i
pp_Bload file
pp_GetWidthB
w=result
IF w=0 then DO
EXIT
END
pp_GetHeightB
h=result
x=w/2
y=h/2
pp_Plot x y
END
pp_GotoFrame 1
END
pp_FreeBrush
pp_PermitRefresh
ADDRESS COMMAND 'delete >nil: PerfectPaint:Temp/?#.*'