C  Adventure Map Maker
c   Written for MS DOS PDS FORTRAN v5.10 
c    by Paul Mu¤oz-Colman, FunStuff Software
c   27 Mar 1993  
c   12 August 1985
C
$NODEBUG
$notstrict
$storage: 4
	implicit integer*4 (a-z)
	character*72 loc(140)
	character*4 vocab(100),name1,out(9),blank
	dimension travel(750,11)
	character*72 short
	data blank/' '/
        open (1,file='advedat.asc')
	read(1,10)sect
10	format (i4)
11	format (1x,i4)
	oldnum=0
c
c  read long description section--save first lines only
20	read (1,21) number, short
21	format(i4,a72)
	if(number.eq.-1)goto 30
	if (oldnum.eq.number) go to 20
	oldnum = number
	loc(number)=short
	goto 20
c
c   read short descriptions--overlay long description first lines
30	read(1,10)sect
32	read(1,35)number,short
35	format(i4,a72)
36	format(1x,i4,a72)
	if(number.eq.-1)goto 50
40	 loc(number)=short
	goto 32
c
c	read travel numbers
50	read(1,10)sect
	i=0
60	i=I+1
	read(1,70)(travel(i,j),j=1,11)
70	format(i4,10i7,i6)
	if(travel(i,1).ne.-1)goto 60
c
c	read vocabulary
	read(1,10)sect
80	read(1,90)number,name1
90	format(i4,a4)
	if(number.gt.999)goto 100
	vocab(number)=name1
	goto 80
c
c   now put it all together
100	curmsg=0
	do 150	i=1,750
	if(travel(i,1).eq.-1)goto 170
	if(travel(i,1).eq.curmsg)goto 120
	curmsg=travel(i,1)
	write(*,110)curmsg,loc(curmsg)
110	format(//1x,i4,2x,a72)
120	do 130 k=1,9
130	out(k)=blank
	do 140 l=3,11
	if(travel(i,l).eq.0)goto 150
140	out(l-2)=vocab(travel(i,l))
150	write(*,160)travel(i,2),out
160	format(1x,i7,9(2x,a4))
170	stop
	end
