Source:Room View

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 Room View.

Source

Eamon Utilities II

Date

c. 1980

Author

Donald Brown

License

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

0  REM  CHECKS DATA IN FILES
1  REM  'EAMON.ROOMS' AND
2  REM  'EAMON.ROOM NAMES'.
3  REM 
4  REM  BY DONALD BROWN
5  REM 
6  REM  FOR EACH ROOM, PRINTS
7  REM  NUMBER, NAME, AND NUMBER
8  REM  OF ROOM ADJOINING IN
9  REM  EVERY DIRECTION
10  REM (0=NO ADJOINING ROOM)
11  REM 
100 DK$ =  CHR$ (4): PRINT DK$;"OPEN EAMON.ROOMS,L64": PRINT DK$;"OPEN EAMON.ROOM NAMES,L32"
110  PRINT DK$;"READ EAMON.ROOMS,R0": INPUT NR: TEXT : HOME : PRINT "NUM ROOM"; TAB( 21);" N  S  E  W  U  D"
120  POKE 34,2
130  FOR R1 = 0 TO  INT (NR / 15): HOME :R3 = 15: IF NR - R1 * 15 < 15 THEN R3 = NR - R1 * 15
140  FOR R2 = 1 TO R3:R = R1 * 15 + R2: PRINT DK$;"READ EAMON.ROOM NAMES,R";R: INPUT ROOM$: PRINT DK$;"READ EAMON.ROOMS,R";R: FOR D = 1 TO 6: INPUT DR%(D): NEXT 
150  PRINT  SPC( R < 10);R;" "; LEFT$ (ROOM$,16); TAB( 21);: FOR D = 1 TO 6: PRINT  SPC( DR%(D) < 10);DR%(D);" ";: NEXT : PRINT 
160  NEXT R2: PRINT DK$: PRINT : PRINT "(HIT 'C' TO CONTINUE)   ";
170  GET A$: IF A$ <  > "C" THEN 170
180  PRINT : NEXT R1: TEXT