home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 61
/
af061a.adf
/
Macros
/
Stroboscope.clssa
< prev
next >
Wrap
Text File
|
1993-05-01
|
3KB
|
106 lines
/***********************************************************************
GADGET: "'Stroboscope'" "6" AUTO TYP: "?"
$DAT >>Stroboscope.clssa<< 01 May 1993 - (C) ProDAD Holger Burkarth
************************************************************************/
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 .
ColNumber=2**t - 1
COLRequest "Register 0 TITLE '*** Strobe Colour ***'' ''Choose Strobe Colour.'"
IF RC~=0 THEN LEAVE
StrobeColour=RESULT
MSRequester "TITLE '*** Stroboscope ***''Select Reference Colour to Produce Flash.'",
"PTEXT ' Reference Colour Free Choice + Blackstrobe'' Reference Colour Free Choice'",
"' Reference Colour White + Blackstrobe'' Reference Colour White'"
IF RC~=0 THEN LEAVE
IF RESULT > 2 THEN DO
StrobeMode=RESULT-2
RefR=255
RefG=255
RefB=255
END
ELSE DO
StrobeMode=RESULT
COLRequest "Register 0 TITLE '*** Strobe Colour ***'' '' Choose Reference Colour.'"
IF RC~=0 THEN LEAVE
RefColour=RESULT
GetColor RefColour
PARSE VAR RESULT x RefR RefG RefB
END
INTRequest "'Please Enter The Number''of flashes.''(between 1 and "Number")'"Number-2
IF RC~=0 THEN LEAVE
StrobeNum=RESULT
IF StrobeNum < 1 | StrobeNum > Number THEN DO
Message "'The number you gave''is not acceptable!'"
LEAVE
END
zz=1
Lim=Number/StrobeNum
DO UNTIL From>To
IF zz > Lim THEN DO
zz=0; fa=1
END
ELSE fa=0
ViewFrame COPS From
IF RC~=0 THEN LEAVE
IF StrobeMode=1 THEN DO
l=0
List=""
DO UNTIL l>ColNumber
GetColor l
PARSE VAR RESULT x r g b
IF l=StrobeColour THEN DO
r=r+(RefR-r)*fa
g=g+(RefG-g)*fa
b=b+(RefB-b)*fa
END; ELSE DO
r=r*fa
g=g*fa
b=b*fa
END
List=List l r g b
l=l+1
END
SetColor List
END
ELSE IF StrobeMode=2 THEN DO
GetColor StrobeColour
PARSE VAR RESULT x r g b
r=r+(RefR-r)*fa
g=g+(RefG-g)*fa
b=b+(RefB-b)*fa
SetColor StrobeColour r g b
END
Record COPS
IF RC~=0 THEN LEAVE
From=From+1
zz=zz+1
END
LEAVE
END
END
ELSE Message "'For the Strobe-Effekt at''least 4 frames must be selected.'"
FailAt AltFail
exit