home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
17 Bit Software 1: Collection A
/
17Bit_Collection_A.iso
/
files
/
37.dms
/
37.adf
/
demo.bas
< prev
next >
Wrap
BASIC Source File
|
1988-05-22
|
10KB
|
292 lines
5 AUDIO 15,1
10 A$ = TRANSLATE$("HELLO I AM THE NEW AMIGA PERSONAL COMPUTER FROM COMMODORE!")
15 B$ = TRANSLATE$("I HAVE A SHORT DEMO FOR YOU TO SEE. BUT FIRST I WANT TO TELL YOU A LITTLE ABOUT MYSELF.")
20 C$ = TRANSLATE$("FIRST OFF I AM RUNNING IN A BASIC CREATED BY METACOMPCO, FOR THE AMIGA, IT CAME FREE WITH ME.")
25 D$ = TRANSLATE$("I HAVE BUILT IN SPRITES ,BLITTERS ,SPEECH SYNTHISYS ,STEREO SOUND ,AND I CAN BE I.B.M COMPATIBLE. THE LIST GOES ON AND ON.")
30 E$ = TRANSLATE$("I HAVE GRAPHIC CAPABILITIES THAT WILL BLOW YOUR MIND THEY ARE SECOND TO NONE. MY GRAPHICS CHIP HANDLES THAT.")
35 F$ = TRANSLATE$("MY SOUND IS EXCELENT THANKS TO MY SOUND CHIP IT MADE THIS PROGRAM SO EASY.")
110 X% = NARRATE (A$)
111 X% = NARRATE (B$)
112 X% = NARRATE (C$)
113 X% = NARRATE (D$)
114 X% = NARRATE (E$)
115 X5 = NARRATE (F$)
160 SCNCLR
161 c = 1 : x = 10 : y = 10 : d = 10 : h = 1
162 penb 2
163 paint (0,50)
165 circle (x,y), d, h
170 x1 = x1+3
175 y = y+3
180 d = d+2
182 peno c
183 c = c + 1
184 if c = 31 then c = 1
185 circle (x1,y), d, h
190 IF Y = 166 THEN SLEEP 5*10^6 :SCNCLR :GOTO 200
195 goto 170
200 CIRCLE (145,90), 0, 1
201 penb 4 : paint (0,0) :c = 1 : peno c
205 S1 = S1+1
206 c = c + 1 : if c = 31 then c = 1
207 peno c
210 CIRCLE (145,90), S1, 1
215 IF S1 = 90 THEN SLEEP 5*10^6 :SCNCLR : GOTO 225
220 GOTO 205
225 draw (1,1 to 320,1)
230 y1 = y1+1
231 c = c+1 : pena c : if c = 31 then c = 1
235 draw (1,y1 to 320,y1)
240 if y1 = 190 then sleep 5*10^6 : scnclr : goto 265
245 goto 230
250 B$ = TRANSLATE$("THANK YOU FOR WATCHING THE DEMO.")
255 X% = NARRATE (B$) : GOTO 1500
260 end
265 draw (1,1 to 1,190)
270 x2 = x2+1
271 c = c+1 : pena c : if c = 31 then c = 1
275 draw (x2,1 to x2,190)
280 if x2 = 300 then sleep 5*10^6 :scnclr : goto 290
285 goto 270
290 draw (1,1 to 1,1)
295 x3 = x3+1
300 y3 = y3+1
301 c =c+1 : pena c : if c = 31 then c = 1
305 draw (x3,1 to 1,y3)
310 if y3 = 200 then sleep 5*10^6 : scnclr : goto 320
315 goto 295
320 draw (1,190 to 1,1)
325 x5 = x5+1
326 c = c+1 : pena c : if c = 31 then c = 1
330 draw (1,190 to x5,1)
335 if x5 = 320 then goto 345
340 goto 325
345 y6 = y6+1
346 c = c+1 : pena c : if c = 31 then c = 1
350 draw (1,190 to 320,y6)
355 if y6 = 190 then sleep 5*10^6 : scnclr : goto 370
360 goto 345
370 ? " TO EXIT NEXT DEMO PRESS LEFT"
371 ? " MOUSE BUTTON"
380 SLEEP 5*10^6
400 scnclr
401 penb 6
402 paint (50,50)
405 c=1
410 x = 24 : y = 50
415 z = 24 : k = 100
420 dx = 3 : dy =3
425 dz = 6 : dk = 6
430 draw (x,y to z,k)
435 c = c+1 : pena c
440 x = x + dx
445 z = z + dz
450 if x < 4 or x > 300 then dx = - dx
455 if z < 4 or z > 300 then dz = - dz
460 y = y + dy
465 k = k + dk
470 if y < 5 or y > 190 then dy = - dy
475 if k < 5 or k > 190 then dk = -dk
480 if c = 31 then c = 1
485 ask mouse x%, y%, b%
486 if b% <> 0 then goto 500
490 goto 430
500 scnclr
505 c = 1 :pena c
510 draw (100,150 to 100,145 to 105,145 to 150,50 to 145,50)
515 draw (145,50 to 145,45 to 175,45 to 175,50 to 170,50 to 185,145)
520 draw (185,145 to 190,145 to 190,150 to 170,150 to 170,145)
525 draw (170,145 to 175,145 to 168,100 to 136,100)
530 draw (136,100 to 115,145 to 120,145 to 120,150 to 100,150)
535 draw (100,150 to 95,148 to 95,143 to 100,143 to 145,50)
540 draw (145,50 to 140,48 to 140,43 to 170,43 to 175,45)
545 draw (95,143 to 100,145)
550 draw (145,45 to 140,43)
555 draw (115,143 to 120,145)
560 draw (100,143 to 105,145)
565 draw (170,150 to 165,148 to 165,143 to 170,143 to 163,100)
570 draw (170,143 to 175,145)
575 draw (166,90 to 162,60 to 155,60 to 141,90 to 166,90)
580 draw (185,143 to 190,145)
585 draw (161,88 to 157,60)
590 draw (161,88 to 142,88)
595 draw (161,88 to 166,90)
600 draw (165,143 to 170,145)
605 paint (10,10)
610 c = c + 1 : pena c : if c = 31 then goto 620
615 goto 510
620 scnclr
625 pena 1 : paint (10,10)
630 s = 10
635 y1 = 180
640 peno 4
645 circle (160,y1), s, .10
650 y1 = y1-6
655 s = s + ((s*.1)^1.3)
660 if y1 = 12 then sleep 5*10^6 : goto 670
665 goto 640
670 SCNCLR : ?" TO EXIT NEXT DEMO PRESS LEFT"
671 ?" MOUSE BUTTON"
672 SLEEP 5*10^6
678 SCNCLR
679 PENA 1
680 paint (10 , 10)
685 xc = 160 : yc = 90 : z = 0 : k =pi / 40
690 n = int(rnd(1)*17)
695 pena n
700 for j = 0 to 1 : next : n = k
705 xd = int (rnd(1) * xc) : yd = int(rnd(1) * yc) : c = int(rnd(1)*5)
710 xa = xc + xd * cos(n) : xb = xc - xd * cos(n)
715 ya = yc + yd * sin(n) : yb = yc - yd * sin(n)
720 draw (xa,ya to xb,yb)
725 n = n + k : if n < pi then 710
730 ask mouse x% , y% , b%
735 if b% <>0 then goto 760
740 for j = 0 to 1 : next : goto 690
760 scnclr
765 x = 320 : y = 200 : c = x * rnd(0) : d = y * rnd (0)
770 a=0 : b=0 : j =0 : k=1 : n=2 : p=1
775 pena j : draw (a,j to c,d to a,y)
780 pena k : draw (a+k,j to c,d to a+k,y)
785 a=a+n : if a < x then 775
790 pena j : draw (j,b to c,d to x,b)
795 pena k : draw (j,b+k to c,d to x,b+k)
800 b=b+n : if b<y then 790
805 sleep 5*10^6 : goto 810
810 scnclr
811 rgb 7,0,15,0
812 rgb 10,5,5,15
815 drawmode 1
820 dim d(128,64)
825 input "number of levels 1 through 7" ; le
830 ?"hit c for coustom colours"
835 ?"return for default"
840 get a$ : if a$ = "" then 840
845 if a$ = chr$ (13) then lc = 7 : sc = 10
850 if a$ = "c" then gosub 1435
855 ds = 2 : for n =1 to le : ds = ds + 2 ^ (n-1) : next n
860 mx = ds-1 : my = mx / 2
865 rh = pi*30/180 :vt = rh *1.2
870 for n = 1 to le : l = 10000 / 1.8^n
875 ?"working on level" ; n
880 ib = mx / 2^n : sk = ib *2
885 gosub 930
890 gosub 965
895 gosub 1000
900 next n
905 scnclr
910 pena 1
915 paint (10,10) ,0
920 goto 1175
925 rem******
930 for ye = 0 to mx-1 step sk
935 for xe = ib + ye to mx step sk
940 ax = xe - ib : ay = ye : gosub 1040 : d1 = d : ax = xe + ib : gosub 1040 : d2 = d
945 d = (d1+d2)/2 + rnd(5) * l / 2 - l / 4 : ax = xe : ay =ye : gosub 1065
950 next xe
955 next ye : return
960 rem *************
965 for xe = mx to 1 step -sk
970 for ye = ib to xe step sk
975 ax = xe : ay = ye + ib : gosub 1040 : d1 = d : ay = ye -ib : gosub 1040 : d2 = d
980 d = (d1+d2) / 2 + rnd(1)* l / 2 - l / 4 : ax = xe : ay =ye : gosub 1065
985 next ye
990 next xe : return
995 rem******************
1000 for xe= 0 to mx - 1 step sk
1005 for ye = ib to mx - xe step sk
1010 ax= xe +ye - ib : ay = ye - ib : gosub 1040 : d1 = d
1015 ax = xe + ye +ib : ay = ye + ib : gosub 1040 : d2 = d
1020 ax = xe + ye : ay = ye : d= (d1 + d2 )/ 2 + rnd ( 1 ) * l / 2 - l / 4 : gosub 1065
1025 next ye
1030 next xe : return
1035 rem****************
1040 if ay > my then 1050
1045 by = ay : bx= ax : goto 1055
1050 by = mx +1 - ay : bx = mx -ax
1055 d= d ( bx , by ) : return
1060 rem*************
1065 if ay > my then 1075
1070 by = ay : bx = ax : goto 1080
1075 by = mx + 1 - ay : bx = mx - ax
1080 d( bx , by ) = d : return
1085 rem**********************
1090 if xo <> -999 then 1105
1095 if zz < 0 then gosub 1400 : z2 = zz : zz = 0 : goto 1165
1100 gosub 1410 : goto 1160
1105 if z2 > 0 and zz > 0 then 1160
1110 if z2 <0 and zz < 0 then z2 = zz : zz = 0 : goto 1165
1115 w3 = zz / (zz-z2) : x3 = (x2-xx)*w3+xx : y3 = (y2-yy)*w3+yy : z3 = 0
1120 zt = zz : yt = yy : xt = xx
1125 if zz > 0 then 1150
1130 rem*****************
1135 zz = z3 : yy = y3 : xx = x3 : gosub 1330
1140 gosub 1400 : zz = 0 : yy = yt : xx = xt : z2 = zt : goto 1165
1145 rem ******************
1150 zz = z3 : yy = y3 : xx = x3 : gosub 1330
1155 gosub 1410 : zz = zt : yy = yt : xx = xt
1160 z2 = zz
1165 x2 = xx : y2 = yy : return
1170 rem ****************
1175 gosub 1415
1180 xs = .04 : ys = .04 : zs = .04
1185 for ax = 0 to mx : xo=-999 : for ay = 0 to ax
1190 gosub 1040 : zz = d : yy = ay / mx * 10000 : xx = ax / mx *10000 -yy / 2
1195 gosub 1325 : next ay : next ax
1200 for ay = 0 to mx : xo = -999 : for ax = ay to mx
1205 gosub 1040 : zz = d : yy = ay / mx *10000 : xx = ax / mx *10000 -yy / 2
1210 gosub 1325 : next ax : next ay
1215 for ex = 0 to mx : xo = -999 : for ey = 0 to mx - ex
1220 ax = ex + ey : ay = ey : gosub 1040 : zz = d : yy = ay / mx *10000
1225 xx = ax / mx *10000 - yy / 2 : gosub 1325 : next ey : next ex
1230 goto 1425
1235 rem********
1240 if xx <> 0 then 1255
1245 if yy <=0 then ra = - pi / 2 : goto 1265
1250 ra = pi / 2 : goto 1265
1255 ra = atn(yy/xx)
1260 if xx < 0 then ra = ra + pi
1265 r1 = ra + rh : rd = sqr(xx*xx+yy*yy)
1270 xx = rd *cos(r1) : yy = rd * sin(r1)
1275 return
1280 rem******
1285 rd = sqr(zz*zz+xx*xx)
1290 if xx = 0 then ra = pi / 2 : goto 1305
1295 ra = atn (zz/xx)
1300 if xx <0 then ra = ra+pi
1305 r1 = ra-vt
1310 xx = rd * cos(r1)+xx : zz = rd * sin(r1)
1315 return
1320 rem *************
1325 gosub 1090
1330 xx = xx * xs : yy = yy * ys : zz = zz *zs
1335 gosub 1240
1340 gosub 1285
1345 if xo = - 999 then pr$ = "m"
1350 if xo <> -999 then pr$ = "d"
1355 xp = int(yy)+cx : yp = int(zz)
1360 gosub 1375
1365 return
1370 rem*********
1375 xp = xp * 0.625 : yp = 33.14-0.663 *yp
1380 if pr$ = "m" then x8 = xp : y8 = yp : xo = x
1385 if y8 > 179 or y8 < 0 or yp > 179 or yp< 0 then return
1390 draw (x8,y8 to xp,yp)
1395 x8 = xp : y8 = yp : return
1400 pena sc : return
1405 rem***********
1410 pena lc : return
1415 return
1420 rem *******
1425 sleep 5*10^6 : goto 250
1430 end
1435 rem*****
1440 input "choose high colour 2 to 16" ; lc
1445 input "choose high colour 2 to 16" ; sc
1450 return
1500 C$ = TRANSLATE$ ("I AM AMIGA!")
1501 D$ = TRANSLATE$ ("I AM THE FUTURE!")
1502 X% = NARRATE (C$)
1503 X% = NARRATE (D$)
1504 END