home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 61
/
af061a.adf
/
Macros
/
Mix02.clssa
< prev
next >
Wrap
Text File
|
1993-05-01
|
4KB
|
142 lines
/***********************************************************************
GADGET: "Multi-HF-Mix" "2" AUTO TYP: "?"
$DAT >>Mix02.clssa<< 01 May 1993 - (C) ProDAD Holger Burkarth
Mix two SSA anims together, in various ways. With some other features.
************************************************************************/
Options Results
Address clariSSA
FailAt 10
AltFail=RESULT
DO FOREVER
Anims=""
GetAnimInfo Source_A
IF RESULT~='' THEN Anims=Anims||" Source_A "
GetAnimInfo Source_B
IF RESULT~='' THEN Anims=Anims||" Source_B "
GetAnimInfo Source_C
IF RESULT~='' THEN Anims=Anims||" Source_C "
GetAnimInfo Source_D
IF RESULT~='' THEN Anims=Anims||" Source_D "
IF Anims~='' THEN DO
SelectAnim Anims "TITLE 'Select an Anim for mixing.' REQ"
IF rc~=0 THEN LEAVE
Anim1=RESULT
Anim2=""
MSRequester "TITLE '*** Multi-HF-Mix ***''Select preferred processing mode.'",
"PTEXT 'Integrate Anim with Other.''Calculate Anim with Other in Usual Way.''Integrate One Anim.''Use Only One Anim.'"
EffMode=RESULT
IF EffMode < 3 THEN DO
SelectAnim Anims "TITLE 'Select the second @ anim which is to be mixed.' REQ"
IF rc~=0 THEN LEAVE
Anim2=RESULT
END
NUM=1
Ver=1; VerStep=1
IF EffMode=1 | EffMode=3 THEN DO
INTRequest "'Enter the Interval to''''>>Advance Recording By<<'" Ver
IF rc~=0 THEN LEAVE
Ver=MIN(30,MAX(1,RESULT))
INTRequest "'Enter the''Frame Offset.'" VerStep
IF rc~=0 THEN LEAVE
VerStep=MIN(30,MAX(1,RESULT))
END
ELSE DO
INTRequest "'Record Each Frame?'" NUM
IF rc~=0 THEN LEAVE
NUM=MIN(30,MAX(1,RESULT))
END
SelectAnim Anim1
GetArea
MarkRange1=RESULT
PARSE VAR RESULT "FROM" Start1 "TO" Last1 Mod1
IF Anim2~="" THEN DO
SelectAnim Anim2
GetArea
MarkRange2=RESULT
PARSE VAR RESULT "FROM" Start2 "TO" Last2 Mod2
D2=Last2-Start2
A2=Start2
END
D1=Last1-Start1
Ver=Ver-1
A1=Start1
IF Anim2~="" THEN DO
a=0
M1=0; M2=0
S=(d1+d2)/VerStep
IF S>3 THEN DO
DO FOREVER
Calc=1/3+a/S
x=TRUNC(Calc*D1)
IF M1~=x THEN DO
M1=x
IF A1>Last1 THEN LEAVE
SelectAnim Anim1
SetArea 'FROM' A1 'TO' A1+Ver
A1=A1+VerStep
IF Record(NUM)~=0 THEN LEAVE
END
x=TRUNC(Calc*D2)
IF M2~=x THEN DO
M2=x
IF A2>Last2 THEN LEAVE
SelectAnim Anim2
SetArea 'FROM' A2 'TO' A2+Ver
A2=A2+VerStep
IF Record(NUM)~=0 THEN LEAVE
END
IF rc~=0 THEN LEAVE
a=a+1
END
SelectAnim Anim2
SetArea MarkRange2
END; ELSE Message '"Selected range!" "too small!!"'
END
ELSE DO
SelectAnim Anim1
DO UNTIL A1>Last1
SetArea 'FROM' A1 'TO' A1+Ver
A1=A1+VerStep
IF Record(NUM)~=0 THEN LEAVE
END
END
SelectAnim Anim1
SetArea MarkRange1
SelectAnim "MASTER"
END; ELSE Message '"No Source Anim available!"'
LEAVE
END
FailAt AltFail
exit
Record: procedure
DO
ARG NUM
count=0
DO UNTIL count>=NUM
count=count+1
Record 'AREA'
IF rc~=0 THEN LEAVE
END
RETURN(rc)
END