home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 61
/
af061a.adf
/
Macros
/
ColourSeq.clssa
< prev
next >
Wrap
Text File
|
1993-05-01
|
2KB
|
91 lines
/***********************************************************************
GADGET: "'Colour Sequence'" "6" AUTO TYP: "?"
$DAT >>ColourSeq.clssa<< 01 May 1993 - (C) ProDAD Holger Burkarth
This macro calculates a colour sequence in an animation. The
user selects a range in the usual way then a colour sequence is
calculated from the start to the end frame. The bigger the
colour differences the smaller the selected range and the
harsher the colour progression.
************************************************************************/
Options Results
Address clariSSA
FailAt 10
AltFail=RESULT
GetArea
PARSE VAR RESULT . "FROM" From "TO" To .
Number=To-From
IF Number>1 THEN DO
DO FOREVER
GetAnimInfo
PARSE VAR RESULT . "FORMAT" x y t "VIEWMODE" ViewMode .
ColNumber=2**t - 1
MSRequester "TITLE '*** Colour Sequence ***''Colour Sequence From "From" To "To"''Please Select An Effect mode.'",
"PTEXT 'All Colours ...''Colour Range ...'"
IF RC~=0 THEN LEAVE
Mode=RESULT
IF Mode=1 THEN DO
List=""
l=0
DO UNTIL l>ColNumber
List=List|| l " "
l=l+1
END
END
ELSE IF Mode=2 THEN DO
COLRequest "FROM 0 TO 0 TITLE '*** Colour Sequence ***'' ''Please Select A Colour Range''for Processing.'"
IF RC~=0 THEN LEAVE
List=RESULT
END
ViewFrame COPS To
IF RC~=0 THEN LEAVE
GetColor List
Last=RESULT
ViewFrame COPS From
IF RC~=0 THEN LEAVE
GetColor List
Start=RESULT
DO UNTIL From>To
fa=(1-(To-From)/Number)
ViewFrame COPS From
IF RC~=0 THEN LEAVE
MStart=Start
MLast=Last
l=0
List=""
DO UNTIL MStart=""
PARSE VAR MStart x Sr Sg Sb MStart
PARSE VAR MLast x Er Eg Eb MLast
r=Sr+(Er-Sr)*fa
g=Sg+(Eg-Sg)*fa
b=Sb+(Eb-Sb)*fa
List=List x TRUNC(r) TRUNC(g) TRUNC(b)
l=l+1
END
SetColor List
Record COPS
IF RC~=0 THEN LEAVE
From=From+1
END
LEAVE
END
END
ELSE Message "'For a Colour Sequence at''least 2 Frames must be selected.'"
FailAt AltFail
exit