Couple of extra nethack->anethack
[aNetHack.git] / sys / vms / anethack.com
blob51857111f7204430bb16962ea8637567163abf19
1 $! aNetHack.Com -- sample command procedure for invoking aNetHack  9-JAN-1993
2 $ v = 'f$verify(0)'
3 $!
4 $! $ANH-Date: 1465133392 2016/06/05 13:29:52 $  $ANH-Branch: aNetHack-3.6.0 $:$ANH-Revision: 1.4 $
5 $!
6 $!    Possible command line arguments include
7 $!      "-uConan-B"     !play a barbarian named Conan
8 $!      "-u" "Merlin-W" !play a wizard named Merlin (slight variant of above)
9 $!      "-e" or "-E"    !play an elf with default name (from environment
10 $!                      ! [ie, ANETHACKOPTIONS logical name] or VMS username)
11 $!      "-a" or "-A", "-b" or "-B", "-c" or "-C", ... !specify character type
12 $!                      !note: "-s" is ambiguous between "play as a samurai"
13 $!                      !   vs "show scoreboard", so use "-S" for the former
14 $!      "-x" or "-X"    !play in 'explore' mode (practice for beginners)
15 $!      "-D"            !play in 'wizard' mode (for debugging, available only
16 $!                      ! to the username compiled into anethack.exe as WIZARD)
17 $!      "-dec"          !turn on DECgraphics mode (VT100 line drawing, done
18 $!                      ! automatically below if appropriate term attribs set)
19 $!      "-d" dir-path   !specify an alternate playground directory (not
20 $!                      ! recommended; define HACKDIR instead)
24 $! assume this command procedure has been placed in the playground directory;
25 $!       get its device:[directory]
26 $       hackdir = f$parse("_._;0",f$environ("PROCEDURE")) - "_._;0"
28 $! hackdir should point to the 'playground' directory
29 $ if f$trnlnm("HACKDIR").eqs."" then  define hackdir 'hackdir'
31 $! termcap is a text file defining terminal capabilities and escape sequences
32 $ if f$trnlnm("TERMCAP").eqs."" then  define termcap hackdir:termcap
34 ! [ obsolete:  now handled within anethack itself ]
35 ! $! prior to VMS v6, the C Run-Time Library doesn't understand vt420 :-(
36 ! $       TT$_VT400_Series = 113
37 ! $ if f$getdvi("TT:","DEVTYPE").eq.TT$_VT400_Series -
38 !  .and. f$trnlnm("ANETHACK_TERM").eqs."" then  define anethack_term "vt400"
40 $! use the VT100 line drawing character set if possible
41 $ graphics = ""
42 $       usropt = f$trnlnm("ANETHACKOPTIONS")
43 $       if usropt.eqs."" then  usropt = f$trnlnm("HACKOPTIONS")
44 $ if f$locate("DECG",f$edit(usropt,"UPCASE")) .ge. f$length(usropt) then -
45     if f$getdvi("TT:","TT_DECCRT") .and. f$getdvi("TT:","TT_ANSICRT") then -
46 $       graphics = " -dec"      !select DECgraphics mode by default
48 $! get input from the terminal, not from this .com file
49 $ deassign sys$input
51 $       anethack := $hackdir:anethack
52 $       if p1.nes."-s" .and. p1.nes."-s all" then -
53                 anethack = anethack + graphics
54 $ anethack "''p1'" "''p2'" "''p3'" "''p4'" "''p5'" "''p6'" "''p7'" "''p8'"