Source:File Dump v4-6

From Eamon Wiki
Jump to navigation Jump to search
This page is a verbatim reproduction of original source material and should not be edited except for maintenance.
Description

The Applesoft BASIC source code of the Eamon utility program File Dump v4-6.

Source

Eamon Deluxe Conversion Tools

Date

c. 2000

Author

Frank Black

License

The use of this item is permitted on the grounds that it's free or in the public domain.

1  REM 

EAMON V4-6 --> EAMON DELUXE
DATABASE DUMP
BY FRANK KUNZE

10  TEXT : HOME : PRINT "INSERT ADVENTURE DISK IN DRIVE 1": GET A$: PRINT : HOME 
20 D$ =  CHR$ (4)
30  PRINT D$"OPEN EAMON.DESC,D1": PRINT D$"READ EAMON.DESC": INPUT NR,NA,NE,NM: PRINT D$"CLOSE": DIM R$(NR),R%(NR,11),A$(NA),A%(NA,8),M$(NM),M%(NM,12)
40  PRINT D$"OPEN EAMON.NAME": PRINT D$"READ EAMON.NAME": INPUT N$
50  ONERR  GOTO 70
60 ND = 6:VR = 4: INPUT ND,VR
70  POKE 216,0: PRINT D$"CLOSE"
80  IF VR >  = 7 THEN  PRINT "THIS A VERSION 7+ ADVENTURE.  USE THE V7 DUMP PROGRAM.": END 
90  VTAB 7: PRINT "DUMPING:  "N$: PRINT 
100  PRINT "ADD DIRECTIONS TO ROOM NAMES? (Y/N):";: GET A$: PRINT A$
110  IF A$ = "Y" THEN ADD = 1
120  PRINT "ADD 'YOU ARE ' TO ROOM NAMES? (Y/N):";: GET A$: PRINT A$
130  IF A$ = "Y" THEN AY = 1
135  PRINT "ADD PERIODS TO END OF ROOM NAMES?(Y/N):";: GET A$: PRINT A$: IF A$ = "Y" THEN P1 = 1
140  GOSUB 1000: GOSUB 500: GOSUB 5000: END 
500  PRINT D$"OPEN EAMON.DESC,L256": RETURN 
1000  REM 

LOAD ROOMS

1010  HOME : FOR R = 1 TO NR:R%(R,11) = 1: NEXT 
1020  PRINT D$"OPEN EAMON.ROOM NAMES,L64": PRINT D$"OPEN EAMON.ROOMS,L64"
1030  FOR R = 1 TO NR: VTAB 9: PRINT "READING ROOM# "R"/"NR
1040  PRINT D$"READ EAMON.ROOM NAMES,R"R: INPUT R$(R): IF AY = 1 THEN R$(R) = "YOU ARE " + R$(R)
1045  IF P1 = 1 THEN R$(R) = R$(R) + "."
1050  PRINT D$"READ EAMON.ROOMS,R"R: FOR X = 1 TO ND: INPUT R%(R,X): NEXT : IF VR > 4 THEN  INPUT R%(R,11)
1060  IF ADD = 1 THEN  GOSUB 21000
1070  NEXT : PRINT D$"CLOSE"
2000  REM 

ARTIFACTS

2010  PRINT D$"OPEN EAMON.ARTIFACTS,L128"
2020  FOR A = 1 TO NA: VTAB 10: PRINT "READING ART# "A"/"NA
2030  PRINT D$"READ EAMON.ARTIFACTS,R"A: INPUT A$(A)
2040  FOR X = 1 TO 4: INPUT A%(A,X): NEXT : IF A%(A,2) > 1 OR VR > 4 THEN  FOR X = 5 TO 8: INPUT A%(A,X): NEXT 
2050  NEXT : PRINT D$"CLOSE"
3000  REM 

MONSTERS

3010  PRINT D$"OPEN EAMON.MONSTERS,L128"
3020  FOR M = 1 TO NM: VTAB 11: PRINT "READING MON# "M"/"NM
3030  PRINT D$"READ EAMON.MONSTERS,R"M: INPUT M$(M): FOR X = 1 TO 12: INPUT M%(M,X): NEXT 
3040  NEXT : PRINT D$"CLOSE": RETURN 
5000  REM 

DUMP TO PRINTER/FILE

5010  IF VR =  > 6 THEN  GOSUB 20000
5020  PRINT D$"PR#1": PRINT N$: PRINT NR;",";NA;",";NE","NM: PRINT ND: PRINT VR: PRINT 
5040  IF NE > 0 THEN  FOR A = 1 TO NE: PRINT D$"READ EAMON.DESC,R"A + 200: INPUT A$: PRINT D$: PRINT : PRINT "E"A: PRINT A$: NEXT 
5050  FOR M = 1 TO NM: PRINT D$"READ EAMON.DESC,R"M + 300: INPUT A$: PRINT D$: PRINT : PRINT "M"M
5060  PRINT M$(M): FOR X = 1 TO 11: PRINT M%(M,X)",";: NEXT : PRINT M%(M,12): PRINT A$: NEXT 
5070  FOR A = 1 TO NA: PRINT D$"READ EAMON.DESC,R"A + 100: INPUT A$: PRINT D$: PRINT : PRINT "A"A
5080  PRINT A$(A): FOR X = 1 TO 7: PRINT A%(A,X)",";: NEXT : PRINT A%(A,8): PRINT A$: NEXT 
5090  FOR R = 1 TO NR: PRINT D$"READ EAMON.DESC,R"R: INPUT A$: PRINT D$: PRINT : PRINT "R"R
5100  PRINT R$(R): FOR X = 1 TO ND: PRINT R%(R,X)",";: NEXT : PRINT R%(R,11): PRINT A$: NEXT 
5110  PRINT D$"PR#0": RETURN 
20000  REM 

ADJUST V6.X DATA

20010  FOR R = 1 TO NR: FOR R2 = 1 TO ND: IF R%(R,R2) > 100 AND R%(R,R2) < 200 THEN R%(R,R2) = R%(R,R2) + 900
20020  NEXT : NEXT 
20030  FOR A = 1 TO NA: IF A%(A,4) > 100 AND A%(A,4) < 200 THEN A%(A,4) = A%(A,4) + 900
20040  IF A%(A,4) > 200 AND A%(A,4) < 300 THEN A%(A,4) = A%(A,4) + 1800
20050  IF A%(A,4) > 300 AND A%(A,4) < 400 THEN A%(A,4) = A%(A,4) + 1700
20060  IF A%(A,2) = 9 THEN A%(A,2) = 1
20070  IF A%(A,2) = 6 THEN A%(A,5) = A%(A,6):A%(A,6) = A%(A,7):A%(A,7) = 1:A%(A,8) = 0
20080  NEXT : RETURN 
21000  REM 

ADD DIR. TO R. NAMES

21010 SL = 0:PT = 0
21020  FOR X = 1 TO ND: IF R%(R,X) > 0 AND R%(R,X) <  = NR AND PT = 0 THEN PT = 1:R$(R) = R$(R) + "  ("
21030  IF R%(R,X) > 0 AND R%(R,X) <  = NR AND SL = 1 THEN R$(R) = R$(R) + "/"
21040  IF R%(R,X) > 0 AND R%(R,X) <  = NR AND X < 7 THEN R$(R) = R$(R) +  MID$ ("NSEWUD",X,1):SL = 1
21050  IF R%(R,X) > 0 AND R%(R,X) <  = NR AND X > 6 THEN R$(R) = R$(R) +  MID$ ("NENWSESW",(X - 7) * 2 + 1,2):SL = 1
21060  NEXT : IF PT = 1 THEN R$(R) = R$(R) + ")"
21070  RETURN