home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format 67
/
af067a.adf
/
SYSTEM.DMS
/
SYSTEM.adf
/
Examples
/
AMALRainbow.AMOS
/
AMALRainbow.amosSourceCode
Wrap
AMOS Source Code
|
1994-09-08
|
1KB
|
72 lines
Rem *** Animated Rainbow Effect
Rem *** By Jason Holborn
Rem *** Taken from the book 'ULTIMATE AMOS'
Rem *** Available from Future Publishing on 0225 442244
Screen Open 0,320,256,2,Lowres
Flash Off : Curs Off
Rem *** Define AMAL program...
A$=" Let R1 = 0"
A$=A$+"A: Let R1 = R1 + 2"
A$=A$+" If R1 > 191 Jump B"
A$=A$+" Jump C"
A$=A$+"B: Let R1 = 0"
A$=A$+" Jump C"
A$=A$+"C: Let X = R1"
A$=A$+" Pause"
A$=A$+" Jump A"
Set Rainbow 0,0,192,"","",""
Rem *** Set up copper list
COUNT=0
For R=0 To 15
RGB=Val(Hex$(R)+"00")
Rain(0,COUNT)=RGB
Rain(0,COUNT+1)=RGB
COUNT=COUNT+2
Next R
For R=15 To 0 Step -1
RGB=Val(Hex$(R)+"00")
Rain(0,COUNT)=RGB
Rain(0,COUNT+1)=RGB
COUNT=COUNT+2
Next R
For G=0 To 15
RGB=Val("$0"+Right$(Hex$(G),1)+"0")
Rain(0,COUNT)=RGB
Rain(0,COUNT+1)=RGB
COUNT=COUNT+2
Next G
For G=15 To 0 Step -1
RGB=Val("$0"+Right$(Hex$(G),1)+"0")
Rain(0,COUNT)=RGB
Rain(0,COUNT+1)=RGB
COUNT=COUNT+2
Next G
For B=0 To 15
RGB=Val("$00"+Right$(Hex$(B),1))
Rain(0,COUNT)=RGB
Rain(0,COUNT+1)=RGB
COUNT=COUNT+2
Next B
For B=15 To 0 Step -1
RGB=Val("$00"+Right$(Hex$(B),1))
Rain(0,COUNT)=RGB
Rain(0,COUNT+1)=RGB
COUNT=COUNT+2
Next B
Rem *** Turn on Rainbow effect...
Rainbow 0,0,0,280
Rem *** Assign AMAL channel to Rainbow...
Channel 1 To Rainbow 0
Amal 1,A$
Amal On
Direct