Source:File Dump v7

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 v7.

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 V7 --> EAMON DELUXE
2  REM   DATABASE DUMP
3  REM 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.NAME,D1": PRINT D$"READ EAMON.NAME": INPUT N$
40  ONERR  GOTO 60
50 ND = 6:VR = 4: INPUT ND,VR
60  POKE 216,0: PRINT D$"CLOSE"
70  IF VR < 7 THEN  PRINT "THIS A VERSION 6 OR OLDER ADVENTURE.": PRINT "USE THE V4-6 DUMP PROGRAM.": END 
80  PRINT D$"OPEN EAMON.DESC": PRINT D$"READ EAMON.DESC": INPUT NR,NA,NE,NM,LR,LM,LA: PRINT D$"CLOSE": DIM R$(NR),R%(NR,11),A$(NA),A%(NA,8),M$(NM),M%(NM,11)
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
115  PRINT "ADD PERIODS TO END OF ROOM NAMES?(Y/N):";: GET A$: PRINT A$: IF A$ = "Y" THEN P1 = 1
116  PRINT "ADD 'YOU ARE ' TO ROOM NAMES? (Y/N):";: GET A$: PRINT A$
117  IF A$ = "Y" THEN AY = 1
120  GOSUB 1000: GOSUB 500: GOSUB 5000: END 
500  PRINT D$"OPEN EAMON.DESC,L242": RETURN 
1000  REM 

LOAD ROOMS

1010  HOME : FOR R = 1 TO NR:R%(R,11) = 1: NEXT 
1020  PRINT D$"OPEN EAMON.ROOMS,L"LR
1030  FOR R = 1 TO NR: VTAB 9: PRINT "READING ROOM# "R"/"NR
1040  PRINT D$"READ EAMON.ROOMS,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  FOR X = 1 TO ND: INPUT R%(R,X): NEXT : 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,L"LA
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 8: INPUT A%(A,X): NEXT 
2050  NEXT : PRINT D$"CLOSE"
3000  REM 

MONSTERS

3010  PRINT D$"OPEN EAMON.MONSTERS,L"LM
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 11: INPUT M%(M,X): NEXT 
3040  NEXT : PRINT D$"CLOSE": RETURN 
5000  REM 

DUMP TO PRINTER/FILE

5010  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 + 400: INPUT A$: PRINT D$: PRINT : PRINT "E"A: PRINT A$: NEXT 
5050  FOR M = 1 TO NM: PRINT D$"READ EAMON.DESC,R"M + 600: INPUT A$: PRINT D$: PRINT : PRINT "M"M
5060  PRINT M$(M): FOR X = 1 TO 10: PRINT M%(M,X)",";: NEXT : PRINT M%(M,11): PRINT A$: NEXT 
5070  FOR A = 1 TO NA: PRINT D$"READ EAMON.DESC,R"A + 200: 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) > 500 AND R%(R,R2) < NA + 501 THEN R%(R,R2) = R%(R,R2) + 500
20020  NEXT : NEXT 
20030  FOR A = 1 TO NA: IF A%(A,4) > 500 AND A%(A,4) < NA + 501 THEN A%(A,4) = A%(A,4) + 500
20040  IF A%(A,4) > 200 AND A%(A,4) < 201 + NR THEN A%(A,4) = A%(A,4) + 1800
20060  IF A%(A,2) = 9 THEN A%(A,2) = 1
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