home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
AMOS PD CD
/
amospdcd.iso
/
351-375
/
apd365
/
soundboxii.asc
< prev
next >
Wrap
Text File
|
1992-01-10
|
6KB
|
151 lines
'-----------------------------------------------------------------------------'
'----------------------------- ZENN SOUND BOX II -----------------------------'
'----------------------------- BY David Barnsley -----------------------------'
'----------------------------- And Graham Groom -----------------------------'
'-----------------------------------------------------------------------------'
Rem **************************************************************************
Rem ********************** Screen setups and variables **********************
Rem **************************************************************************
Screen Open 0,320,20,2,Lowres : Curs Off : Flash Off : Cls 0
Close Workbench : Close Editor : Cls 0 : Led Off : Show On : Limit Mouse 132,223 To 444,293
Screen Open 3,320,272,8,Lowres
Load Iff "Frontpic",3 : Load "sprites.abk"
Palette $114
Screen Open 0,320,64,2,Lowres
Curs Off : Flash Off : Palette $0,$FF : Cls 0
Screen Display 0,134,157,320,62
Screen Open 1,320,16,2,Lowres
Curs Off : Flash Off : Palette $222,$FF2 : Cls 0
Screen Display 1,134,147,320,8
Locate 0,0 : Print "Free Mem: "
Locate 21,0 : Print "Track: "
C1=0 : C2=0 : C3=0 : C4=0 : LED=0 : VOL=63
Dir$="SoundBoxII:"
Rem **************************************************************************
Rem *********************** Setup Rainbow And Info ***************************
Rem **************************************************************************
Gosub RB
Gosub INFO
Rem **************************************************************************
Rem ************************** Setup Icon Zones ******************************
Rem **************************************************************************
Screen 3
Reserve Zone 6
Set Zone 1,10,307 To 26,322
Set Zone 2,10,330 To 26,345
Set Zone 3,10,353 To 26,368
Set Zone 4,161,307 To 177,322
Set Zone 5,161,330 To 177,345
Set Zone 6,161,353 To 177,368
Screen 3 : Paper 0 : Pen 1 : Print At(14,26)+"LOADING DATA"
Load "Samaurai.abk",3
Screen 3 : Paper 0 : Pen 1 : Print At(14,26)+Space$(12)
TRACK$="Samaurai"
Gosub INFO
VOL=63
Volume VOL
Music 1
Rem **************************************************************************
Rem ************************* Main Control Loop ******************************
Rem **************************************************************************
Do
Screen 0 : Gosub EQUALIZERS
Screen 3 : On PLACE and Mouse Key=1 Gosub NXT_TUNE,PREV_TUNE,FINISH,VOLUP,VOLDOWN,LED
K=Mouse Key : PLACE=Mouse Zone
Loop
Rem **************************************************************************
Rem ****************************** Graffix ***********************************
Rem **************************************************************************
EQUALIZERS:
V1=Int(Vumeter(0)) : V2=Int(Vumeter(1)) : V3=Int(Vumeter(2)) : V4=Int(Vumeter(3))
If V1>C1 Then C1=V1 : C1=V1
If V1<C1 and C1>0 Then Dec C1 : Dec C1
If V2>C2 Then C2=V2 : C2=V2
If V2<C2 and C2>0 Then Dec C2 : Dec C2
If V3>C3 Then C3=V3 : C3=V3
If V3<C3 and C3>0 Then Dec C3 : Dec C3
If V4>C4 Then C4=V4 : C4=V4
If V4<C4 and C4>0 Then Dec C4 : Dec C4
Bob 1,1,-66,C1 : Bob 2,11,-66,C2 : Bob 3,21,-66,C3 : Bob 4,31,-66,C4 : Wait Vbl
Screen Copy 0,1,0,39,64 To Logic(0),41,0 : Screen Copy 0,1,0,39,64 To Logic(0),81,0
Screen Copy 0,1,0,39,64 To Logic(0),121,0 : Screen Copy 0,1,0,39,64 To Logic(0),161,0
Screen Copy 0,1,0,39,64 To Logic(0),201,0 : Screen Copy 0,1,0,39,64 To Logic(0),241,0
Screen Copy 0,1,0,39,64 To Logic(0),281,0
Return
Rem **************************************************************************
Rem ****************************** Rainbow ***********************************
Rem **************************************************************************
RB:
Rem
Set Rainbow 0,1,96,"","","" : Rainbow 0,0,124,96 : Colour Back 0 : Restore RDATA
For C=0 To 95 : Read CVA : Rain(0,C)=CVA
Next C : View : Return
RDATA:
Data $F11,$F11,$F11,$F11,$FF6,$FF5,$FF4,$FD4
Data $FC4,$FB4,$FA4,$0,$0,$0,$0,$0
Data $0,$0,$0,$0,$0,$FB1,$2EF,$2EF
Data $2CF,$2AF,$29F,$27F,$25F,$23F,$21F,$21B
Data $311,$411,$511,$611,$711,$811,$911,$A11
Data $B11,$C11,$E11,$F11,$F11,$F11,$F11,$F11
Data $F11,$F11,$F11,$F11,$F21,$F31,$F41,$F51
Data $F61,$F71,$F81,$F91,$FA1,$FB1,$FC1,$FD1
Data $FE1,$FF1,$FF1,$FF1,$FF1,$FF1,$FF1,$FF1
Data $FF1,$FF1,$FF1,$FF1,$DF1,$BF1,$9F1,$7F1
Data $6F1,$4F1,$3F1,$2F1,$1F1,$F0,$F0,$F0
Data $F0,$F0,$F0,$F0,$F0,$F0,$F0,$F0
Rem **************************************************************************
Rem ****************************** Other Bits ********************************
Rem **************************************************************************
INFO:
Screen 1 : Locate 9,0 : Print Chip Free+Fast Free : L=Len(TRACK$) : Locate 28,0 : Print TRACK$+Space$(11-L)
Return
NXT_TUNE:
For N=VOL To 0 Step -1 : Volume N : Gosub EQUALIZERS : Next N
Screen 3 : Paper 0 : Pen 1 : Print At(14,26)+"LOADING DATA"
Inc TUNE
Gosub L0AD_NEXT_TUNE
Gosub INFO
Screen 3 : Paper 0 : Pen 1 : Print At(14,26)+Space$(12)
VOL=63 : Volume VOL : Music 1
Return
L0AD_NEXT_TUNE:
If TUNE>8 Then TUNE=0
If TUNE<0 Then TUNE=8
If TUNE=0 Then Load "Samaurai.abk" : TRACK$="Samaurai"
If TUNE=1 Then Load "Walker.abk" : TRACK$="Walker"
If TUNE=2 Then Load "Lament.abk" : TRACK$="Lament"
If TUNE=3 Then Load "FastBeat.abk" : TRACK$="Fast Beat"
If TUNE=4 Then Load "FastTrain.abk" : TRACK$="Fast Train"
If TUNE=5 Then Load "Machine.abk" : TRACK$="Machine"
If TUNE=6 Then Load "Armalyte.abk" : TRACK$="Armalyte"
If TUNE=7 Then Load "Artaarta.abk" : TRACK$="Artaarta"
If TUNE=8 Then Load "Countdown.abk" : TRACK$="Countdown"
Return
PREV_TUNE:
For N=VOL To 0 Step -1 : Volume N : Gosub EQUALIZERS : Next N
Screen 3 : Paper 0 : Pen 1 : Print At(14,26)+"LOADING DATA"
Dec TUNE
Gosub L0AD_NEXT_TUNE
Gosub INFO
Screen 3 : Paper 0 : Pen 1 : Print At(14,26)+Space$(12)
VOL=63 : Volume VOL : Music 1
Return
FINISH:
For N=VOL To 0 Step -1 : Volume N : Gosub EQUALIZERS : Next N : Erase 3 : Edit
VOLUP:
If VOL<63 Then Gosub EQUALIZERS : Inc VOL
Volume VOL
Return
VOLDOWN:
If VOL>0 Then Gosub EQUALIZERS : Dec VOL
Volume VOL
Return
LED:
Inc LED
If LED=3 Then Led Off
If LED=6 Then Led On : LED=0
Return
Rem **************************************************************************
Rem ************************ Sad, But Here Is The End! ***********************
Rem **************************************************************************