home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
sourcecode
/
demos
/
equaliserone.amos
/
equaliserone.amosSourceCode
< prev
next >
Wrap
AMOS Source Code
|
1991-02-26
|
3KB
|
150 lines
Rem FANATIX Equaliser Demo 1
Rem by JAG on 13/4/91 in three hours.
Rem
Rem Good isn't it!
Rem
Screen Open 0,320,256,2,Lowres : Curs Off : Hide On : Cls 0
Break Off : Close Editor : Close Workbench : Led Off
Dim CH0(16) : Dim CH1(16) : Dim CH2(16) : Dim CH3(16)
L0=15 : L1=15 : L2=15 : L3=15 : EQ=0
Dim L$(50) : Dim X(50) : Dim Y(50) : Gosub VARLOAD
S=2 : SC=8 : CH=1 : SCAR=7 : LETTER$="abcdefghijklmnopqrstuvwxyz.:!?(),'-+ "
Def Scroll 1,0,220 To 395,252,-2,0
Def Scroll 2,0,220 To 395,252,-4,0
Def Scroll 3,0,220 To 395,252,-8,0
Def Scroll 4,0,220 To 395,252,-16,0
Def Scroll 5,0,220 To 395,252,-32,0
Rem boring colour lists
Restore SHADES
For F=1 To 16
Read A,B,C,D
CH0(F)=A : CH1(F)=B : CH2(F)=C : CH3(F)=D
Next F
SHADES:
Data $F00,$F0,$F,$F0F
Data $E00,$E0,$E,$E0E
Data $D00,$D0,$D,$D0D
Data $C00,$C0,$C,$C0C
Data $B00,$B0,$B,$B0B
Data $A00,$A0,$A,$A0A
Data $900,$90,$9,$909
Data $800,$80,$8,$808
Data $700,$70,$7,$707
Data $600,$60,$6,$606
Data $500,$50,$5,$505
Data $400,$40,$4,$404
Data $300,$30,$3,$303
Data $200,$20,$2,$202
Data $100,$10,$1,$101
Data $0,$0,$0,$0
Screen Open 0,320,256,16,Lowres : Unpack 6 To 0
Screen Open 3,320,256,2,Lowres : Colour 0,$0 : Curs Off : Flash Off : Hide On : Cls 0
Auto View Off
Screen Open 2,320,256,16,Lowres : Unpack 7 To 2
Screen Open 1,400,256,16,Lowres : Flash Off : Curs Off : Hide On : Cls 0 : Get Palette 0 : Screen Copy 2,0,0,319,255 To 1,20,0
Screen Close 2
Screen Close 3
T$=Space$(2660) : For F=Start(8) To Start(8)+2660 : Poke Varptr(T$)+F-Start(8),Peek(F) : Next F
Auto View On
Screen To Back 0 : Screen 1
Get Palette 0
MAINLOOP:
For F=1 To Len(T$)*32
Scroll S
Inc SCAR : If SCAR=SC Then SCAR=0 : Inc CH : Gosub PCHAR
If Mouse Key=1 Then Goto SDEMO
If EQ=1 Then Gosub EQUALISE
Wait Vbl
Next F
Goto MAINLOOP
PCHAR:
If CH=Len(T$) Then CH=0 : Goto MAINLOOP
S$=Mid$(T$,CH,1)
P=Instr(LETTER$,S$)
If P=0 Then Gosub FX : Return
Screen Copy 0,X(P),Y(P),(X(P))+31,(Y(P))+31 To 1,354,220
Return
Rem the control codes interpreter system
FX:
If S$="|" Then Goto EQUAL
If S$="@" Then Goto FAST
If S$="#" Then Goto SLOW
If S$="%" Then Goto SNAILPACE
If S$="^" Then Goto AFTERBURNER
If S$="&" Then Goto SUPERBURNER
Return
EQUAL:
If EQ=1 Then Return
EQ=1 : Music 1 : Return
FAST:
S=3 : SC=4 : Return
SLOW:
S=2 : SC=8 : Return
AFTERBURNER:
S=4 : SC=2 : Return
SUPERBURNER:
S=5 : SC=1 : Return
SNAILPACE:
S=1 : SC=16 : Return
EQUALISE:
If L0<16 Then Inc L0
If L1<16 Then Inc L1
If L2<16 Then Inc L2
If L3<16 Then Inc L3
If Vumeter(0)>10 Then L0=1
If Vumeter(1)>10 Then L1=1
If Vumeter(2)>10 Then L2=1
If Vumeter(3)>10 Then L3=1
Colour 2,CH0(L0) : Colour 3,CH1(L1) : Colour 4,CH2(L2) : Colour 5,CH3(L3)
Return
VARLOAD:
Restore LETT
For F=1 To 37
Read A$ : Read A : Read B
L$(F)=A$ : X(F)=A : Y(F)=B
Next F : Return
LETT:
Data "a",0,0
Data "b",32,0
Data "c",64,0
Data "d",96,0
Data "e",128,0
Data "f",160,0
Data "g",192,0
Data "h",224,0
Data "i",256,0
Data "j",0,31
Data "k",32,31
Data "l",64,31
Data "m",96,31
Data "n",128,31
Data "o",160,31
Data "p",192,31
Data "q",224,31
Data "r",256,31
Data "s",0,62
Data "t",32,62
Data "u",64,62
Data "v",96,62
Data "w",128,62
Data "x",160,62
Data "y",192,62
Data "z",224,62
Data ".",256,62
Data ":",0,93
Data "!",32,93
Data "?",64,93
Data "(",96,93
Data ")",128,93
Data ",",160,93
Data "'",192,93
Data "-",224,93
Data "+",256,93
Data " ",0,128
Return
SDEMO:
Screen Close 0
Fade 5 : Wait 10
For F=63 To 0 Step -1
Mvolume F : For H=1 To 1000 : Next H
Next F