DECLARE SUB Pause (n#)
   '                 Eamon-PC
   '
   '             Adventure # 3
   '
   '             Cave of the Mind
   '
   '             by Jim Jacobsen
   '
   '    converted to IBM-PC by John Nelson
   '
    DEFINT A-Z
    DECLARE SUB prtcenter (A$)
    KEY OFF
REM $$INCL:'\EAMON\COPY\COLORRTN.BAS'
     ON ERROR GOTO NoColors
     OPEN "EAMCOLOR" FOR INPUT AS #1
     INPUT #1, fgc%
     INPUT #1, bgc%
     INPUT #1, hfg%
     INPUT #1, hbg%
     CLOSE
In.BW:
     ON ERROR GOTO 0
     COLOR fgc%, bgc%
     GOTO Colorset
NoColors:
      fgc% = 7
      bgc% = 0
      hfg% = 0
      hbg% = 7
      RESUME In.BW
Colorset:

    '------- (end of include file) -------    
 ' 
    Adv.Nam$ = "Cave of the Mind"
    CLS
    COLOR hfg%, hbg%
    prtcenter Adv.Nam$
    COLOR fgc%, bgc%
    PRINT
    PRINT
    PRINT "As you prepare for your next adventure, you meet a short little man outside the": PRINT "hall. He beckons you to see what he is holding.  As you get closer, you notice"
    PRINT "a grail with a strange, bubbling green liquid within. In a strange low voice he": PRINT "says: 'Most adventures are for normal adventurers, but you are special, and"
    PRINT "should try the most challenging adventure you could imagine.' With a sly wink": PRINT "he hands you the grail. You look at the potion, then back to the man --- but he"
    PRINT "has disappeared!": PRINT
    PRINT "Not being one weak on courage, you raise the grail to your lips and quaff the": PRINT "potion."
    GOSUB PAGE.BREAK
    FOR Z = 1 TO 3
      FOR X = 1 TO 15
        COLOR 0, X
        CLS
        Pause .25
      NEXT X
    NEXT Z
    COLOR fgc%, bgc%
    RUN "MAINPGM"
PAGE.BREAK:
    LOCATE 24, 1
    PRINT "==================== Press Any Key to Continue ====================";
    A$ = ""
    WHILE A$ = ""
    A$ = INKEY$
    WEND
    CLS
    RETURN

SUB Pause (n#)
        BTim# = TIMER + n#
        DO
        LOOP UNTIL BTim# < TIMER

END SUB

DEFSNG A-Z
SUB prtcenter (A$)
      L = LEN(A$)
      PRINT SPC((78 - L) \ 2); A$; SPC((78 - L) \ 2);
END SUB

