home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 61
/
af061a.adf
/
Macros
/
ColourChaos.clssa
< prev
next >
Wrap
Text File
|
1993-07-05
|
3KB
|
91 lines
/***********************************************************************
GADGET: "'Colour Chaos'" "6" AUTO TYP: "?"
$DAT >>ColourChaos.clssa<< 04 Jul 1993 - (C) ProDAD Holger Burkarth
If you need special colour effects to annoy the viewer you use Chaotic
colour changes. This macro creates such effects which are certainly not
harmonious. However, the intensity and speed can be controlled.
************************************************************************/
Options Results
Address clariSSA
FailAt 10
AltFail=RESULT
GetArea
PARSE VAR RESULT . "FROM" From "TO" To .
Number=To-From
IF Number>3 THEN DO
DO FOREVER
GetAnimInfo
PARSE VAR RESULT . "FORMAT" x y t "VIEWMODE" ViewMode .
NumberColours=2**t-1
MSRequester "TITLE '*** Colour Chaos ***''Select Effect Mode'",
"PTEXT 'Use only Chaos Colours'",
"'Add Chaos Colours to natural colours'",
"'Mix in Chaos Colours'"
IF RC~=0 THEN LEAVE
Mode=RESULT
COLRequest "FROM 0 TO 1 TITLE '*** Colour Chaos ***'' ''Set colour range''for Chaos creation'"
IF RC~=0 THEN LEAVE
ChaosList=RESULT
INTRequest "'*** Colour Chaos ***''Enter the number''of colour jumps.''From 1 To "Number"'" Number
IF RC~=0 THEN LEAVE
ColorJmp=RESULT
IF ColorJmp < 1 | ColorJmp>Number THEN DO
Message "'Wrong Input'"
LEAVE
END
Pos=0
ColorJmp=ColorJmp/Number
DO UNTIL From>To
ViewFrame COPS From
IF RC~=0 THEN LEAVE
IF TRUNC(Pos*ColorJmp) < TRUNC((Pos+1)*ColorJmp) | Pos=0 THEN DO
List=""
GetColor ChaosList
ListR=RESULT
DO UNTIL ListR=""
PARSE VAR ListR x r g b ListR
IF Mode=1 THEN DO
r=RANDU()*256
g=RANDU()*256
b=RANDU()*256
END
ELSE IF Mode=2 THEN DO
r=(r+RANDU()*256)/2
g=(g+RANDU()*256)/2
b=(b+RANDU()*256)/2
END
ELSE IF Mode=3 THEN DO
r=(3*r+RANDU()*256)/4
g=(3*g+RANDU()*256)/4
b=(3*b+RANDU()*256)/4
END
List=List x TRUNC(r) TRUNC(g) TRUNC(b)
END
END
SetColor List
Record COPS
IF RC~=0 THEN LEAVE
From=From+1
Pos=Pos+1
END
LEAVE
END
END
ELSE Message "'For Chaos effects you''must select at least 4 frames.'"
FailAt AltFail
EXIT