Source:Desc Edit-Create
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 Desc Edit/Create. |
---|---|
Source | |
Date |
c. 1980 |
Author | |
License |
The use of this item is permitted on the grounds that it's free or in the public domain. |
0 REM HANDLES EAMON.DESC FILE
1 REM FOR THE BEGINNERS CAVE
2 REM
3 REM BY DONALD BROWN
4 REM
5 REM 'RUN 5000' INITS FILE.
6 REM
7 REM FILE IS RANDOM, LENGTH
8 REM 256. RECORD ZERO HOLDS
9 REM FOUR NUMBERS--NUMBER OF
10 REM ROOMS GIVEN IN FILE,
11 REM ARTIFACTS, EFFECTS, AND
12 REM MONSTERS. RECORDS 0-100
13 REM HOLD CORRESPONDING ROOM
14 REM DESCRIPTIONS; 101-200
15 REM ARTIFACT DESCRIPTIONS;
16 REM 201-300 EFFECT PHRASES;
17 REM 301-400 MONSTERS.
18 REM
100 DK$ = CHR$ (4)
110 PRINT DK$;"OPEN EAMON.DESC,L256": PRINT DK$;"READ EAMON.DESC,R0": FOR N = 1 TO 4: INPUT N(N): NEXT : PRINT DK$
120 N$(1) = "ROOM":N$(2) = "ART.":N$(3) = "EFF.":N$(4) = "MONS."
130 TEXT : HOME : FOR N = 1 TO 4: PRINT N$(N);" ";N(N);" ";: NEXT : PRINT : POKE 34,2
140 HOME
150 PRINT "EDIT, ADD, OR QUIT (HIT E,A, OR Q)";
160 GET A$: IF A$ = "E" THEN 1000
170 IF A$ = "A" THEN 2000
180 IF A$ < > "Q" THEN 160
190 PRINT A$: PRINT DK$;"WRITE EAMON.DESC,R0": FOR N = 1 TO 4: PRINT N(N): NEXT : PRINT DK$;"CLOSE": TEXT : END
200 PRINT A$: PRINT : PRINT "WANT TO ";D$;" ROOM, ARTIFACT, EFFECT": PRINT " OR MONSTER (HIT R,A,E OR M) ";
210 GET A$: FOR TYPE = 1 TO 4: IF A$ < > MID$ ("RAEM",TYPE,1) THEN NEXT : GOTO 210
220 PRINT A$: RETURN
230 I$ = ""
240 GET A$: IF A$ = "" THEN 240
250 IF ASC (A$) = 13 THEN PRINT : RETURN
260 IF ASC (A$) > 31 AND LEN (I$) < 250 THEN PRINT A$;:I$ = I$ + A$: GOTO 240
270 IF ASC (A$) < > 8 THEN PRINT " ";: GOTO 240
280 IF LEN (I$) THEN PRINT A$;" ";A$;: IF LEN (I$) > 1 THEN I$ = LEFT$ (I$, LEN (I$) - 1): GOTO 240
290 GOTO 230
1000 D$ = "EDIT": GOSUB 200
1010 PRINT : PRINT "ENTER NUMBER TO EDIT (1-";N(TYPE);
1020 INPUT ") ";A$:N = VAL (A$): IF N < 1 OR N > N(TYPE) OR N < > INT (N) OR STR$ (N) < > A$ THEN PRINT : GOTO 150
1030 R = (TYPE