home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga MA Magazine 1998 #3
/
amigamamagazinepolishissue1998.iso
/
maksiu
/
kurs-ma
/
p61_przyklad.amos
/
p61_przyklad.amosSourceCode
Wrap
AMOS Source Code
|
1998-01-25
|
2KB
|
63 lines
' otwarcie ekranu
Screen Open 0,640,256,8,Hires
Curs Off : Palette $0,$FFF
Cls 0 : Flash Off : Ink 1,0 : Pen 1 : Paper 0
' wywo�anie selektora plik�w
NAZWA$=Fsel$("P61.*","","Wybierz modu�")
If NAZWA$="" Then End
' sprawdzam d�ugo�� pliku
Open In 1,NAZWA$
DLUGOSC=Lof(1)
Close 1
' rezerwuje bank nr 10 i wczytuje modu�
If Chip Free>DLUGOSC
Reserve As Chip Work 10,DLUGOSC
Bload NAZWA$,10
Else End
End If
' tworzenie GUI
Reserve Zone 9
Print At(2,20);Border$(Zone$(" PLAY ",1),1)
Print At(12,20);Border$(Zone$(" STOP ",2),1)
Print At(22,20);Border$(Zone$(" PAUSE ",3),1)
Print At(33,20);Border$(Zone$(" CONTINUE ",4),1)
Print At(50,20);Border$(Zone$(" PATERN + ",5),1)
Print At(63,20);Border$(Zone$(" PATERN -",6),1)
Print At(2,24);Border$(Zone$(" VOLUME + ",7),1)
Print At(16,24);Border$(Zone$(" VOLUME - ",8),1)
Print At(37,24);Border$(Zone$(" EXIT ",9),1)
' warto�ci pocz�tkowe
VOL=35
PAT=0
Print At(2,12);"Module: ";NAZWA$
' p�tla g��wna
Do
Wait 3
A=Mouse Zone
B=Mouse Key
If B=1 and A=1 Then P61 Play 10
If B=1 and A=2 Then P61 Stop
If B=1 and A=3 Then P61PAUSE
If B=1 and A=4 Then P61CONTINUE
If B=1 and A=5 Then Inc PAT : P61 Play 10,PAT
If B=1 and A=6 Then Dec PAT : P61 Play 10,PAT
If B=1 and A=7 Then Inc VOL : P61 Volume VOL
If B=1 and A=8 Then Dec VOL : P61 Volume VOL
If B=1 and A=9 Then Exit
Print At(2,14);"Position of song: ";P61POS;" "
If P61SIGNAL=-2 Then Print At(2,16);"End of song" : P61 Stop
' graniczne warto�ci g�o�no�ci
If VOL<0 Then VOL=0
If VOL>70 Then VOL=70
Loop
' wyj�cie
P61 Fade 3 : Wait 150
Reserve Zone
Erase 10
Screen Close 0
End