Basic/data/DMPPLAY.BAS

181 lines
4.5 KiB
QBasic

10 COL 0,$e6,0
17 DIM g(20)
20 CROFF
22 TLOAD 1,"font1.dat",16,11
25 STILE 1
30 CLS
32 MAP l"mappl.dat"
35 MAP d
40 FONT "SID-DMP-PLAYER",$e6,0,$80,13,1
45 FONT "DATEILISTE",$e6,0,$80,5,4
50 FONT "DATEIINFORMATIONEN",$e6,0,$80,20,4
55 FONT "POWERED BY",$e6,0,$80,3,27
56 FONT "TRIOS-BASIC 2.1",$e6,0,$80,1,28
60 CROFF
70 p(5)=0
73 TLOAD 15,"mouse3.dat",1,1
75 MOUSE 1,0
76 BOX $92,23,26,34,28,0
77 FRAME 0,$92,0,23,26,34,28
80 BUTTON i(1,126,$92,0,0,24,27)
90 BUTTON i(2,16,$92,0,0,27,27)
100 BUTTON i(4,171,$92,0,0,30,27)
102 BUTTON i(3,127,$92,0,0,33,27)
114 TILE 30,$e6,0,0,18,6
116 TILE 31,$e6,0,0,18,23
130 CHDIR "dmp"
140 DIR "DMP",0
150 a(1)=GFILE
151 a(2)=18
152 a(3)=a(1)
153 IF a(1)>a(2) THEN a(3)=a(2)
160 GOSUB 20000:REM Dateiliste anzeigen
192 REM scrolldownzaehler setzen
193 a(6)=1
195 GFILE 1
200 GOSUB 10000
210 TILE 17,$e6,0,0,13,6
900 b=GFILE
910 c=5:REM erste zeile
920 d=25:REM letzte zeile
930 y=6
940 f=0:REM dateinummer
2000 m(1)=MB (0)
2002 x(1)=MGET (1)
2005 y(1)=MGET (2)
2006 IF m(1)=0 THEN GOTO 2040
2010 ON m(1) GOSUB 7000,6000,5000,9000
2040 IF x(1)>0 AND x(1)<13 AND y(1)>5 AND y(1)<b+6 AND m(1)=255 THEN GOSUB 8000
2100 IF x(1)=18 AND y(1)=23 AND m(1)=255 THEN GOSUB 11000
2200 IF x(1)=18 AND y(1)=6 AND m(1)=255 THEN GOSUB 12000
2300 IF p=1 AND GDMP =0 THEN GOSUB 5000
2310 IF p=1 THEN p(5)=GDMP
2490 #g=p(5)
2495 IF p=1 THEN FONT " ",$e6,0,$80,30,14
2500 FONT #g,$e6,0,$80,29,14
3000 GOTO 2000
5000 REM naechster titel
5020 FONT " ",$e6,0,$80,13,y
5030 y=y+1
5032 IF y>23 THEN GOSUB 11000
5035 IF y>23 THEN y=23
5040 f=f+1
5050 IF f>b THEN GOSUB 20000
5055 IF f>b THEN f=1
5060 IF f=1 THEN y=6
5070 GFILE f
5100 TILE 17,$e6,0,0,13,y
5120 IF p>1 THEN GOSUB 9000
5125 GOSUB 10000
5130 IF p=1 THEN PLAY #z
5900 RETURN
6000 REM playfunktion
6010 p=p+1
6011 #b=CHR$ (10)
6015 #a=CHR$ (16)
6016 IF p=1 THEN GOSUB 10000
6017 IF p=1 THEN PLAY #z
6018 IF p=1 THEN FONT #b,0,$92,0,27,27
6020 IF p=2 THEN PLAY 1
6025 IF p=2 THEN FONT #a,$92,0,0,27,27
6028 IF p=3 THEN FONT #b,0,$92,0,27,27
6030 IF p=3 THEN PLAY 1
6035 IF p=3 THEN p=1
6900 RETURN
7000 REM titel zurueck
7020 FONT " ",$e6,0,$80,13,y
7030 y=y-1
7032 IF y<6 THEN GOSUB 12000
7035 IF y<6 THEN y=6
7040 f=f-1
7050 IF f<1 THEN f=1
7060 IF f=b THEN y=5+b
7070 GFILE f
7110 TILE 17,$e6,0,0,13,y
7120 IF p>1 THEN GOSUB 9000
7125 GOSUB 10000
7130 IF p=1 THEN PLAY #z
7900 RETURN
8000 REM mauskoordinatenabfrage
8001 a(2)=0
8003 m(1)=MB (0)
8005 IF m(1)=255 THEN a(2)=1
8020 FONT " ",$e6,0,$80,13,y
8030 y=y(1)
8040 f=y-5+a(4):REM titelauswahl
8050 GFILE f
8070 TILE 17,$e6,0,0,13,y
8080 IF a(2)=1 THEN PLAY 0
8085 IF a(2)=1 THEN GOSUB 10000
8090 IF a(2)=1 THEN PLAY #z
8100 IF a(2)=1 THEN p=1
8110 #b=CHR$ (10)
8120 IF p=1 THEN FONT #b,0,$92,0,27,27
8900 RETURN
9000 REM player-stop
9010 PLAY 0
9020 p=0
9030 #a=CHR$ (16)
9040 FONT #a,$92,0,0,27,27
9100 RETURN
10000 REM dateiattribute einlesen
10010 OPEN #z,R
10020 FOR i=0 TO 20
10030 g(i)=GATTR (i)
10040 NEXT i
10050 CLOSE
10100 FONT #z,$e6,0,$80,23,6
10110 FONT "GROESSE:",$e6,0,31,21,8
10115 FONT "SAMPLES:",$e6,0,31,21,12
10117 FONT "DMP-POS:",$e6,0,31,21,14
10120 #x=g(0)
10122 u=g(0)/25
10125 #u=u
10130 FONT #x,$e6,0,$F0,29,8
10133 FONT " ",$e6,0,$f0,33,12
10135 FONT #u,$e6,0,$f0,29,12
10140 FONT "DATUM :",$e6,0,31,21,10
10150 #n=g(1)+"-"+g(2)+"-"+g(3)
10230 FONT " ",$e6,0,$f0,37,10
10500 FONT #n,$e6,0,$f0,29,10
10900 RETURN
11000 REM scroll-up
11001 REM a(4) scrollzaehler
11002 REM a(5) endemarker scrollup
11020 IF a(4)+18=a(1) THEN a(5)=1
11025 IF a(4)+18<a(1) THEN a(5)=0
11028 IF a(5)=0 THEN a(4)=a(4)+1
11030 IF a(5)=0 THEN SCRUP 1,$e6,1,6,17,23,1
11035 IF a(5)=0 THEN y=y-1
11037 IF y<6 THEN y=6
11040 a(7)=a(4)+18
11050 GFILE a(7)
11060 FONT #z,$e6,0,$80,1,23
11900 RETURN
12000 REM scrolldown
12005 IF a(4)>0 THEN a(6)=0
12010 IF a(6)=0 THEN a(4)=a(4)-1
12030 IF a(6)=0 THEN SCRDN 1,$e6,1,6,17,23,1
12035 IF a(6)=0 THEN y=y+1
12037 IF y>23 THEN y=23
12040 IF a(4)=0 THEN a(6)=1
12050 a(7)=a(4)+1
12060 GFILE a(7)
12065 FONT #z,$e6,0,$80,1,6
12900 RETURN
13000 REM Fortschrittsanzeige
13010 r=GDMP
13030 u=r/18:REM wert pro block
13040 t=GDMP /u
13050 t=18-t
13800 POS 5,28:PRINT t;
13900 RETURN
20000 REM Dateiliste anzeigen
20010 FOR i=1 TO a(3)
20020 GFILE i
20030 FONT #z,$e6,$0,$80,1,i+5
20040 NEXT i
20050 a(4)=0:REM scrollzaehler zuruecksetzen
20060 RETURN