drawing overhaul (trunk only)
This is an overhaul to the NetHack drawing mechanism. - eliminates the need to have separate lists in drawing.c for the things and their associated explanations by grouping those thing together on the same inializer in a struct. - replaces all of these options: IBMgraphics, DECgraphics, MACgraphics, graphics, monsters, objects, boulder, traps, effects - drawing.c contains only the set of NetHack standard symbols for the main game and a set of NetHack standard symbols for the roguelevel. - introduces a symbols file that contains named sets of symbols that can be loaded at run time making it extensible for situations like multinational code pages like those reported by <Someone>, without hardcoding additional sets into the game code. - symbols file uses names for the symbols, so offsets will not break when new things are introduced into the game, the way the older config file uchar load routines did. - symbols file only contains exceptions to the standard NetHack set, not entire sets so they are much less verbose than all of the g_FILLER() entries that were previously in drawing.c - 'symset' and 'roguesymset' config file options for preselecting a symbol set from the file called 'symbols' at startup time. The name of the symbols file is not under the users control, only the symbol set name desired from within the symbols file is. - 'symset' config file option loads a desired symbol set for everything but the rogue level. - 'roguesymset' config file option loads a desired symbol set for the rogue level. - 'SYMBOLS' config file option allows the user to specify replacement symbols on a per symbol basis. You can specify as many or as few symbols as you wish. The symbols are identified by a name:value pair, and line continuation is supported. Multiple symbol assignments can be made on the same line if each name:value pair is separated by a comma. For example: SYMBOLS = S_bars:\xf0, S_tree: \xf1, S_room:\xfa \ S_fountain:\xf4 \ S_boulder:0 - 'symbols' file has the following structure: start: DECgraphics Handling: DEC S_vwall: \xf8 # meta-x, vertical rule S_hwall: \xf1 # meta-q, horizontal rule finish start: IBMgraphics Handling: IBM S_vwall: \xb3 # meta-3, vertical rule S_hwall: \xc4 # meta-D, horizontal rule finish - 'symbols' file added to the source tree in the dat directory - Port Makefiles/scripts will need to be adjusted to move them into HACKDIR destination
This commit is contained in:
4
Files
4
Files
@@ -16,8 +16,8 @@ Tourist.des Valkyrie.des Wizard.des bigroom.des castle.des
|
||||
cmdhelp data.base dungeon.def endgame.des gehennom.des
|
||||
help hh history knox.des license
|
||||
medusa.des mines.des opthelp oracle.des oracles.txt
|
||||
quest.txt rumors.fal rumors.tru sokoban.des tower.des
|
||||
wizhelp yendor.des
|
||||
quest.txt roguesym rumors.fal rumors.tru sokoban.des
|
||||
symbols tower.des wizhelp yendor.des
|
||||
|
||||
doc:
|
||||
(files for all versions)
|
||||
|
||||
390
doc/Guidebook.mn
390
doc/Guidebook.mn
@@ -5,7 +5,7 @@
|
||||
.ds vr "NetHack 3.4
|
||||
.ds f0 "\*(vr
|
||||
.ds f1
|
||||
.ds f2 "January 15, 2005
|
||||
.ds f2 "September 20, 2006
|
||||
.mt
|
||||
A Guide to the Mazes of Menace
|
||||
(Guidebook for NetHack)
|
||||
@@ -1662,22 +1662,11 @@ Using a configuration file
|
||||
Any line in the configuration file starting with `#' is treated as a comment.
|
||||
Any line in the configuration file starting with ``OPTIONS='' may be
|
||||
filled out with options in the same syntax as in NETHACKOPTIONS.
|
||||
Any line starting with ``DUNGEON='', ``EFFECTS='', ``MONSTERS='',
|
||||
``OBJECTS='', ``TRAPS='', or ``BOULDER=''
|
||||
is taken as defining the corresponding
|
||||
.op dungeon,
|
||||
.op effects,
|
||||
.op monsters,
|
||||
.op objects
|
||||
.op traps
|
||||
or
|
||||
.op boulder
|
||||
option in a different syntax,
|
||||
a sequence of decimal numbers giving the character position
|
||||
in the current font to be used in displaying each entry.
|
||||
A zero in any entry in such a sequence leaves the display of that
|
||||
entry unchanged; this feature is not available using the option syntax.
|
||||
Such a sequence can be continued to multiple lines by putting a `\e'
|
||||
Any line starting with ``SYMBOLS=''
|
||||
is taken as defining the corresponding symbol
|
||||
in a different syntax, a sequence of decimal numbers giving
|
||||
the character position in the current font to be used in displaying
|
||||
each entry. Such a sequence can be continued to multiple lines by putting a `\e'
|
||||
at the end of each line to be continued.
|
||||
.pg
|
||||
If your copy of the game included the compile time AUTOPICKUP_EXCEPTIONS
|
||||
@@ -1749,13 +1738,6 @@ new players if it detects some anticipated mistakes (default on).
|
||||
.lp "confirm "
|
||||
Have user confirm attacks on pets, shopkeepers, and other
|
||||
peaceable creatures (default on).
|
||||
.lp DECgraphics
|
||||
Use a predefined selection of characters from the DEC VT-xxx/DEC
|
||||
Rainbow/ANSI line-drawing character set to display the dungeon/effects/traps
|
||||
instead of having to define a full graphics set yourself (default off).
|
||||
This option also sets up proper handling of graphics
|
||||
characters for such terminals, so you should specify it when appropriate
|
||||
even if you override the selections with your own graphics strings.
|
||||
.lp disclose
|
||||
Controls options for disclosing various information when the game ends (defaults
|
||||
to all possibilities being disclosed).
|
||||
@@ -1795,66 +1777,6 @@ Note that the vanquished monsters list includes all monsters killed by
|
||||
traps and each other as well as by you.
|
||||
.lp dogname
|
||||
Name your starting dog (ex. ``dogname:Fang'').
|
||||
Cannot be set with the `O' command.
|
||||
.lp dungeon
|
||||
Set the graphics symbols for displaying the dungeon
|
||||
(default \&``\ |--------||.-|++##.##<><>_|\e\e#{}.}..##\ #}'').
|
||||
The
|
||||
.op dungeon
|
||||
option should be followed by a string of 1-41
|
||||
characters to be used instead of the default map-drawing characters.
|
||||
The dungeon map will use the characters you specify instead of the
|
||||
default symbols, and default symbols for any you do not specify.
|
||||
Remember that you may need to escape some of these characters
|
||||
on a command line if they are special to your shell.
|
||||
|
||||
Note that NetHack escape-processes this option string in conventional C
|
||||
fashion. This means that `\e' is a prefix to take the following
|
||||
character literally. Thus `\e' needs to be represented as `\e\e'.
|
||||
The special escape
|
||||
form `\em' switches on the meta bit in the following character, and the `^'
|
||||
prefix causes the following character to be treated as a control
|
||||
character.
|
||||
|
||||
The order of the symbols is: solid rock, vertical wall, horizontal
|
||||
wall, upper left corner, upper right corner, lower left corner, lower
|
||||
right corner, cross wall, upward T wall, downward T wall, leftward T
|
||||
wall, rightward T wall, no door, vertical open door, horizontal open
|
||||
door, vertical closed door, horizontal closed door, iron bars, tree,
|
||||
floor of a room, dark corridor, lit corridor, stairs up, stairs down,
|
||||
ladder up, ladder down, altar, grave, throne, kitchen sink, fountain, pool or moat,
|
||||
ice, lava, vertical lowered drawbridge, horizontal lowered drawbridge,
|
||||
vertical raised drawbridge, horizontal raised drawbridge, air, cloud,
|
||||
under water.
|
||||
|
||||
You might want to use `+' for the corners and T walls for a more
|
||||
aesthetic, boxier display. Note that in the next release, new symbols
|
||||
may be added, or the present ones rearranged.
|
||||
|
||||
Cannot be set with the `O' command.
|
||||
.lp effects
|
||||
Set the graphics symbols for displaying special effects
|
||||
(default \&``|-\e\e/*!)(0#@*/-\e\e||\e\e-//-\e\e|\ |\e\e-/'').
|
||||
The
|
||||
.op effects
|
||||
option should be followed by a string of 1-29
|
||||
characters to be used instead of the default special-effects characters.
|
||||
This string is subjected to the same processing as the
|
||||
.op dungeon
|
||||
option.
|
||||
|
||||
The order of the symbols is: vertical beam, horizontal beam, left slant,
|
||||
right slant, digging beam, camera flash beam, left boomerang, right boomerang,
|
||||
four glyphs giving the sequence for magic resistance displays,
|
||||
the eight surrounding glyphs for swallowed display,
|
||||
nine glyphs for explosions.
|
||||
An explosion consists of three rows (top, middle, and bottom) of three
|
||||
characters. The explosion is centered in the center of this 3 by 3
|
||||
array.
|
||||
|
||||
Note that in the next release, new symbols may be added,
|
||||
or the present ones rearranged.
|
||||
|
||||
Cannot be set with the `O' command.
|
||||
.lp extmenu
|
||||
Changes the extended commands interface to pop-up a menu of available commands.
|
||||
@@ -1891,13 +1813,6 @@ interesting and/or important information.
|
||||
.lp horsename
|
||||
Name your starting horse (ex. ``horsename:Trigger'').
|
||||
Cannot be set with the `O' command.
|
||||
.lp IBMgraphics
|
||||
Use a predefined selection of IBM extended ASCII characters to display the
|
||||
dungeon/effects/traps instead of having to define a full graphics set
|
||||
yourself (default off).
|
||||
This option also sets up proper handling of graphics
|
||||
characters for such terminals, so you should specify it when appropriate
|
||||
even if you override the selections with your own graphics strings.
|
||||
.lp ignintr
|
||||
Ignore interrupt signals, including breaks (default off).
|
||||
.lp legacy
|
||||
@@ -1974,35 +1889,6 @@ Default '.'.
|
||||
Menu character accelerator to select all items on this page of a menu.
|
||||
Implemented by the Amiga, Gem and tty ports.
|
||||
Default ','.
|
||||
.lp monsters
|
||||
Set the characters used to display monster classes (default
|
||||
``abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@\ \'&;:~]'').
|
||||
This string is subjected to the same processing as the
|
||||
.op dungeon
|
||||
option.
|
||||
The order of the symbols is
|
||||
ant or other insect, blob, cockatrice,
|
||||
dog or other canine, eye or sphere, feline,
|
||||
gremlin, humanoid, imp or minor demon,
|
||||
jelly, kobold, leprechaun,
|
||||
mimic, nymph, orc,
|
||||
piercer, quadruped, rodent,
|
||||
arachnid or centipede, trapper or lurker above, horse or unicorn,
|
||||
vortex, worm, xan or other mythical/fantastic insect,
|
||||
light, zruty,
|
||||
angelic being, bat or bird, centaur,
|
||||
dragon, elemental, fungus or mold,
|
||||
gnome, giant humanoid, invisible monster,
|
||||
jabberwock, Keystone Kop, lich,
|
||||
mummy, naga, ogre,
|
||||
pudding or ooze, quantum mechanic, rust monster,
|
||||
snake, troll, umber hulk,
|
||||
vampire, wraith, xorn,
|
||||
apelike creature, zombie,
|
||||
human, ghost, golem,
|
||||
demon, sea monster, lizard,
|
||||
long worm tail, and mimic.
|
||||
Cannot be set with the `O' command.
|
||||
.lp msghistory
|
||||
The number of top line messages to save (and recall with ^P) (default 20).
|
||||
Cannot be set with the `O' command.
|
||||
@@ -2060,17 +1946,6 @@ location of the `y' and `z' keys swapped.)
|
||||
When moving by numbers, to enter a count prefix for those commands
|
||||
which accept one (such as ``12s'' to search twelve times), precede it
|
||||
with the letter `n' (``n12s'').
|
||||
.lp objects
|
||||
Set the characters used to display object classes
|
||||
(default ``])[="(%!?+/$*`0_.'').
|
||||
This string is subjected to the same processing as the
|
||||
.op dungeon
|
||||
option.
|
||||
The order of the symbols is
|
||||
illegal-object (should never be seen), weapon, armor, ring, amulet, tool,
|
||||
food, potion, scroll, spellbook, wand, gold, gem or rock, boulder or statue,
|
||||
iron ball, chain, and venom.
|
||||
Cannot be set with the `O' command.
|
||||
.lp packorder
|
||||
Specify the order to list object types in (default ``")[%?+!=/(*`0_'').
|
||||
The value of this option should be a string containing the
|
||||
@@ -2129,6 +2004,9 @@ of specifying your role. Normally only the first letter of the
|
||||
value is examined; `r' is an exception with ``Rogue'', ``Ranger'',
|
||||
and ``random'' values. If you prefix a `!' or ``no'' to the value, you can
|
||||
exclude that role from being picked randomly.
|
||||
.lp roguesymset
|
||||
This option may be used to select one of the named symbol sets found within
|
||||
``symbols'' to alter the symbols displayed on the screen on the rogue level.
|
||||
.lp rlecomp
|
||||
When writing out a save file, perform run length compression of the map.
|
||||
Not all ports support run length compression. It has no
|
||||
@@ -2177,6 +2055,9 @@ Boldface monsters and ``\fB--More--\fP'' (default off).
|
||||
This option may be set to a NetHack version level to suppress
|
||||
alert notification messages about feature changes for that
|
||||
and prior versions (ex. ``suppress_alert:3.3.1'').
|
||||
.lp symset
|
||||
This option may be used to select one of the named symbol sets found within
|
||||
``symbols'' to alter the symbols displayed on the screen.
|
||||
.lp "time "
|
||||
Show the elapsed game time in turns on bottom line (default off).
|
||||
.lp timed_delay
|
||||
@@ -2192,24 +2073,6 @@ Put the ending display in a NetHack window instead of on stdout (default off).
|
||||
Setting this option makes the score list visible when a windowing version
|
||||
of NetHack is started without a parent window, but it no longer leaves
|
||||
the score list around after game end on a terminal or emulating window.
|
||||
.lp traps
|
||||
Set the graphics symbols for displaying traps
|
||||
(default \&``^^^^^^^^^^^^^^^^^"^^^^'').
|
||||
The
|
||||
.op traps
|
||||
option should be followed by a string of 1-22
|
||||
characters to be used instead of the default traps characters.
|
||||
This string is subjected to the same processing as the
|
||||
.op dungeon
|
||||
option.
|
||||
|
||||
The order of the symbols is:
|
||||
arrow trap, dart trap, falling rock trap, squeaky board, bear trap,
|
||||
land mine, rolling boulder trap, sleeping gas trap, rust trap, fire trap,
|
||||
pit, spiked pit, hole, trap door, teleportation trap, level teleporter,
|
||||
magic portal, web, statue trap, magic trap, anti-magic field, polymorph trap.
|
||||
|
||||
Cannot be set with the `O' command.
|
||||
.lp travel
|
||||
Allow the travel command (default on). Turning this option off will
|
||||
prevent the game from attempting unintended moves if you make inadvertent
|
||||
@@ -2496,6 +2359,208 @@ in it will trigger the playing of "gong.wav". You can have multiple
|
||||
SOUND entries in your config file.
|
||||
.pg
|
||||
.hn 2
|
||||
Modifying NetHack Symbols
|
||||
.pg
|
||||
NetHack can load entire symbol sets from the symbol file.
|
||||
.pg
|
||||
The options that are used to select a particular symbol set from the
|
||||
symbol file are:
|
||||
.lp symset
|
||||
Set the name of the symbol set that you want to load.
|
||||
.lp roguesymset
|
||||
Set the name of the symbol set that you want to load for display
|
||||
on the rogue level.
|
||||
.pg
|
||||
You can also override one or more symbols using the SYMBOLS config
|
||||
file option. Symbols are specified as name:value pairs. Note that
|
||||
NetHack escape-processes the value string in conventional C fashion.
|
||||
This means that \ is a prefix to take the following character literally. Thus
|
||||
\ needs to be represented as \\.
|
||||
The special escape form
|
||||
\m switches on the meta bit in the symbol value, and the \^ prefix causes the
|
||||
following character to be treated as a control
|
||||
character.
|
||||
.pg
|
||||
.sd
|
||||
.TS S
|
||||
center;
|
||||
c c c.
|
||||
.\"TABLE_START
|
||||
Default Symbol Name Description
|
||||
S_air (air)
|
||||
_ S_altar (altar)
|
||||
" S_amulet (amulet)
|
||||
A S_angel (angelic being)
|
||||
a S_ant (ant or other insect)
|
||||
^ S_anti_magic_trap (anti-magic field)
|
||||
[ S_armor (suit or piece of armor)
|
||||
[ S_armour (suit or piece of armor)
|
||||
^ S_arrow_trap (arrow trap)
|
||||
0 S_ball (iron ball)
|
||||
# S_bars (iron bars)
|
||||
B S_bat (bat or bird)
|
||||
^ S_bear_trap (bear trap)
|
||||
- S_blcorn (bottom left corner)
|
||||
b S_blob (blob)
|
||||
+ S_book (spellbook)
|
||||
) S_boomleft (boomerang open left)
|
||||
( S_boomright (boomerang open right)
|
||||
` S_boulder (boulder)
|
||||
- S_brcorn (bottom right corner)
|
||||
C S_centaur (centaur)
|
||||
_ S_chain (iron chain)
|
||||
# S_cloud (cloud)
|
||||
c S_cockatrice (cockatrice)
|
||||
$ S_coin (pile of coins)
|
||||
# S_corr (corridor)
|
||||
- S_crwall (wall)
|
||||
^ S_dart_trap (dart trap)
|
||||
& S_demon (major demon)
|
||||
* S_digbeam (dig beam)
|
||||
> S_dnladder (ladder down)
|
||||
> S_dnstair (staircase down)
|
||||
d S_dog (dog or other canine)
|
||||
D S_dragon (dragon)
|
||||
; S_eel (sea monster)
|
||||
E S_elemental (elemental)
|
||||
/ S_explode1 (explosion top left)
|
||||
- S_explode2 (explosion top center)
|
||||
`\e' S_explode3 (explosion top right)
|
||||
| S_explode4 (explosion middle left)
|
||||
S_explode5 (explosion middle center)
|
||||
| S_explode6 (explosion middle right)
|
||||
`\e' S_explode7 (explosion bottom left)
|
||||
- S_explode8 (explosion bottom center)
|
||||
/ S_explode9 (explosion bottom right)
|
||||
e S_eye (eye or sphere)
|
||||
^ S_falling_rock_trap (falling rock trap)
|
||||
f S_feline (cat or other feline)
|
||||
^ S_fire_trap (fire trap)
|
||||
! S_flashbeam (flash beam)
|
||||
% S_food (piece of food)
|
||||
{ S_fountain (fountain)
|
||||
F S_fungus (fungus or mold)
|
||||
* S_gem (gem or rock)
|
||||
S_ghost (ghost)
|
||||
H S_giant (giant humanoid)
|
||||
G S_gnome (gnome)
|
||||
' S_golem (golem)
|
||||
| S_grave (grave)
|
||||
g S_gremlin (gremlin)
|
||||
- S_hbeam (wall)
|
||||
# S_hcdbridge (horizontal raised drawbridge)
|
||||
+ S_hcdoor (closed door)
|
||||
. S_hodbridge (horizontal lowered drawbridge)
|
||||
| S_hodoor (open door)
|
||||
^ S_hole (hole)
|
||||
@ S_human (human or elf)
|
||||
h S_humanoid (humanoid)
|
||||
- S_hwall (horizontal wall)
|
||||
. S_ice (ice)
|
||||
i S_imp (imp or minor demon)
|
||||
J S_jabberwock (jabberwock)
|
||||
j S_jelly (jelly)
|
||||
k S_kobold (kobold)
|
||||
K S_kop (Keystone Kop)
|
||||
^ S_land_mine (land mine)
|
||||
} S_lava (molten lava)
|
||||
l S_leprechaun (leprechaun)
|
||||
^ S_level_teleporter (level teleporter)
|
||||
L S_lich (lich)
|
||||
y S_light (light)
|
||||
# S_litcorr (lit corridor)
|
||||
: S_lizard (lizard)
|
||||
`\e' S_lslant (wall)
|
||||
^ S_magic_portal (magic portal)
|
||||
^ S_magic_trap (magic trap)
|
||||
m S_mimic (mimic)
|
||||
] S_mimic_def (mimic)
|
||||
M S_mummy (mummy)
|
||||
N S_naga (naga)
|
||||
. S_ndoor (doorway)
|
||||
n S_nymph (nymph)
|
||||
O S_ogre (ogre)
|
||||
o S_orc (orc)
|
||||
p S_piercer (piercer)
|
||||
^ S_pit (pit)
|
||||
^ S_polymorph_trap (polymorph trap)
|
||||
} S_pool (water)
|
||||
! S_potion (potion)
|
||||
P S_pudding (pudding or ooze)
|
||||
q S_quadruped (quadruped)
|
||||
Q S_quantmech (quantum mechanic)
|
||||
= S_ring (ring)
|
||||
` S_rock (boulder or statue)
|
||||
r S_rodent (rodent)
|
||||
^ S_rolling_boulder_trap (rolling boulder trap)
|
||||
. S_room (floor of a room)
|
||||
/ S_rslant (wall)
|
||||
^ S_rust_trap (rust trap)
|
||||
R S_rustmonst (rust monster or disenchanter)
|
||||
? S_scroll (scroll)
|
||||
# S_sink (sink)
|
||||
^ S_sleeping_gas_trap (sleeping gas trap)
|
||||
S S_snake (snake)
|
||||
s S_spider (arachnid or centipede)
|
||||
^ S_spiked_pit (spiked pit)
|
||||
^ S_squeaky_board (squeaky board)
|
||||
0 S_ss1 (magic shield 1 of 4)
|
||||
# S_ss2 (magic shield 2 of 4)
|
||||
@ S_ss3 (magic shield 3 of 4)
|
||||
* S_ss4 (magic shield 4 of 4)
|
||||
^ S_statue_trap (statue trap)
|
||||
S_stone (dark part of a room)
|
||||
- S_sw_bc (swallow bottom center)
|
||||
`\e' S_sw_bl (swallow bottom left)
|
||||
/ S_sw_br (swallow bottom right )
|
||||
| S_sw_ml (swallow middle left)
|
||||
| S_sw_mr (swallow middle right)
|
||||
- S_sw_tc (swallow top center)
|
||||
/ S_sw_tl (swallow top left)
|
||||
`\e' S_sw_tr (swallow top right)
|
||||
- S_tdwall (wall)
|
||||
^ S_teleportation_trap (teleportation trap)
|
||||
\ S_throne (opulent throne)
|
||||
- S_tlcorn (top left corner)
|
||||
| S_tlwall (wall)
|
||||
( S_tool (useful item (pick-axe\, key\, lamp...))
|
||||
^ S_trap_door (trap door)
|
||||
t S_trapper (trapper or lurker above)
|
||||
- S_trcorn (top right corner)
|
||||
# S_tree (tree)
|
||||
T S_troll (troll)
|
||||
| S_trwall (wall)
|
||||
- S_tuwall (wall)
|
||||
U S_umber (umber hulk)
|
||||
u S_unicorn (unicorn or horse)
|
||||
< S_upladder (ladder up)
|
||||
< S_upstair (staircase up)
|
||||
V S_vampire (vampire)
|
||||
| S_vbeam (wall)
|
||||
# S_vcdbridge (vertical raised drawbridge)
|
||||
+ S_vcdoor (closed door)
|
||||
. S_venom (splash of venom)
|
||||
. S_vodbridge (vertical lowered drawbridge)
|
||||
- S_vodoor (open door)
|
||||
v S_vortex (vortex)
|
||||
| S_vwall (vertical wall)
|
||||
/ S_wand (wand)
|
||||
} S_water (water)
|
||||
) S_weapon (weapon)
|
||||
" S_web (web)
|
||||
w S_worm (worm)
|
||||
~ S_worm_tail (long worm tail)
|
||||
W S_wraith (wraith)
|
||||
x S_xan (xan or other mythical/fantastic insect)
|
||||
X S_xorn (xorn)
|
||||
Y S_yeti (apelike creature)
|
||||
Z S_zombie (zombie)
|
||||
z S_zruty (zruty)
|
||||
.\"TABLE_END Do not delete this line.
|
||||
.TE
|
||||
.ed
|
||||
.pg
|
||||
.hn 2
|
||||
Configuring NetHack for Play by the Blind
|
||||
.pg
|
||||
NetHack can be set up to use only standard ASCII characters for making
|
||||
@@ -2516,28 +2581,25 @@ overall location of items on the screen.
|
||||
.pg
|
||||
While it is not difficult for experienced users to edit the \fBdefaults.nh\fP
|
||||
file to accomplish this, novices may find this task somewhat daunting.
|
||||
Included in all official distributions of NetHack is a file called
|
||||
\fBNHAccess.nh\fP. Replacing \fBdefaults.nh\fP with this file will cause
|
||||
the game to run in a manner accessible to the blind. After you have gained
|
||||
some experience with the game and with editing files, you may want to alter
|
||||
settings to better suit your preferences. Instructions on how to do this
|
||||
are included in the \fBNHAccess.nh\fP file itself. The most crucial settings to
|
||||
make the game accessible are:
|
||||
Included within the ``symbols'' file of all official distributions of NetHack
|
||||
is a symset called \fBNHAccess\fP. Selecting that symset in your
|
||||
configuration file will cause the game to run in a manner accessible
|
||||
to the blind. After you have gained some experience with the game
|
||||
and with editing files, you may want to alter settings via \fBSYMBOLS=\fP
|
||||
in your configuration file to better suit your preferences.
|
||||
The most crucial settings to make the game accessible are:
|
||||
.pg
|
||||
.lp IBMgraphics
|
||||
Disable IBMgraphics by commenting out this option.
|
||||
.lp symset:NHAccess
|
||||
Load a symbol set appropriate for use by blind players.
|
||||
.lp roguesymset:NHAccess
|
||||
Load a symbol set for the rogue level that is appropriate for
|
||||
use by blind players.
|
||||
.lp menustyle:traditional
|
||||
This will assist in the interface to speech synthesizers.
|
||||
.lp number_pad
|
||||
A lot of speech access programs use the number-pad to review the screen.
|
||||
If this is the case, disable the number_pad option and use the traditional
|
||||
Rogue-like commands.
|
||||
.lp "Character graphics"
|
||||
Comment out all character graphics sets found near the bottom of the
|
||||
\fBdefaults.nh\fP file. Most of these replace \fBNetHack\fP's
|
||||
default representation of the dungeon using standard ASCII characters
|
||||
with fancier characters from extended character sets, and these fancier
|
||||
characters can annoy screen-readers.
|
||||
.hn 1
|
||||
Scoring
|
||||
.pg
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
\documentstyle[titlepage]{article}
|
||||
\documentclass{article}
|
||||
% \documentstyle[titlepage]{article}
|
||||
|
||||
\usepackage{hyperref}
|
||||
\usepackage{longtable}
|
||||
|
||||
\textheight 220mm
|
||||
\textwidth 160mm
|
||||
@@ -27,7 +31,7 @@
|
||||
\begin{document}
|
||||
%
|
||||
% input file: guidebook.mn
|
||||
% $Revision: 1.100 $ $Date: 2006/05/18 04:18:23 $
|
||||
% $Revision: 1.101 $ $Date: 2006/07/15 03:25:04 $
|
||||
%
|
||||
%.ds h0 "
|
||||
%.ds h1 %.ds h2 \%
|
||||
@@ -40,7 +44,7 @@
|
||||
%.au
|
||||
\author{Eric S. Raymond\\
|
||||
(Extensively edited and expanded for 3.5)}
|
||||
\date{November 19, 2005}
|
||||
\date{September 20, 2006}
|
||||
|
||||
\maketitle
|
||||
|
||||
@@ -2092,17 +2096,11 @@ and the {\it fruit\/} is set to ``papaya'', you would enter the command
|
||||
Any line in the configuration file starting with `{\tt \#}' is treated as a comment.
|
||||
Any line in the configuration file starting with ``{\tt OPTIONS=}'' may be
|
||||
filled out with options in the same syntax as in NETHACKOPTIONS.
|
||||
Any line starting with ``{\tt DUNGEON=}'', ``{\tt EFFECTS=}'',
|
||||
``{\tt MONSTERS=}'', ``{\tt OBJECTS=}'', ``{\tt TRAPS=}'',
|
||||
or ``{\tt BOULDER=}''
|
||||
is taken as defining the corresponding {\it dungeon},
|
||||
{\it effects}, {\it monsters}, {\it objects}, {\it traps\/} or
|
||||
{\it boulder\/} option in a different syntax,
|
||||
a sequence of decimal numbers giving the character position
|
||||
in the current font to be used in displaying each entry.
|
||||
A zero in any entry in such a sequence leaves the display of that
|
||||
entry unchanged; this feature is not available using the option syntax.
|
||||
Such a sequence can be continued to multiple lines by putting a
|
||||
Any line starting with ``{\tt SYMBOLS=}''
|
||||
is taken as defining the corresponding {\it symbol}
|
||||
in a different syntax, a sequence of decimal numbers giving
|
||||
the character position in the current font to be used in displaying
|
||||
each entry. Such a sequence can be continued to multiple lines by putting a
|
||||
`{\tt \verb+\+}' at the end of each line to be continued.
|
||||
|
||||
%.pg
|
||||
@@ -2190,14 +2188,6 @@ players if it detects some anticipated mistakes (default on).
|
||||
Have user confirm attacks on pets, shopkeepers, and other
|
||||
peaceable creatures (default on).
|
||||
%.lp
|
||||
\item[\ib{DECgraphics}]
|
||||
Use a predefined selection of characters from the DEC VT-xxx/DEC
|
||||
Rainbow/ANSI line-drawing character set to display the dungeon/effects/traps
|
||||
instead of having to define a full graphics set yourself (default off).
|
||||
This option also sets up proper handling of graphics
|
||||
characters for such terminals, so you should specify it when appropriate
|
||||
even if you override the selections with your own graphics strings.
|
||||
%.lp
|
||||
\item[\ib{disclose}]
|
||||
Controls options for disclosing various information when the game ends (defaults
|
||||
to all possibilities being disclosed).
|
||||
@@ -2236,64 +2226,6 @@ traps and each other as well as by you.
|
||||
%.lp
|
||||
\item[\ib{dogname}]
|
||||
Name your starting dog (ex.\ ``{\tt dogname:Fang}'').
|
||||
Cannot be set with the `{\tt O}' command.
|
||||
%.lp
|
||||
\item[\ib{dungeon}]
|
||||
Set the graphics symbols for displaying the dungeon (default
|
||||
``\verb& |--------||.-|++##& \verb&.##<><>_|\\#{}.}..## #}&'').
|
||||
The {\it dungeon\/} option should be
|
||||
followed by a string of 1--41
|
||||
characters to be used instead of the default map-drawing characters.
|
||||
The dungeon map will use the characters you specify instead of the
|
||||
default symbols, and default symbols for any you do not specify.
|
||||
Remember that you may need to escape some of these characters
|
||||
on a command line if they are special to your shell.
|
||||
|
||||
Note that {\it NetHack\/} escape-processes this option string in conventional C
|
||||
fashion. This means that `\verb+\+' is a prefix to take the following
|
||||
character literally. Thus `\verb+\+' needs to be represented as `\verb+\\+'.
|
||||
The special escape form
|
||||
`\verb+\m+' switches on the meta bit in the following character, and the
|
||||
`{\tt \^{}}' prefix causes the following character to be treated as a control
|
||||
character.
|
||||
|
||||
The order of the symbols is: solid rock, vertical wall, horizontal
|
||||
wall, upper left corner, upper right corner, lower left corner, lower
|
||||
right corner, cross wall, upward T wall, downward T wall, leftward T
|
||||
wall, rightward T wall, no door, vertical open door, horizontal open
|
||||
door, vertical closed door, horizontal closed door, iron bars, tree,
|
||||
floor of a room, dark corridor, lit corridor, stairs up, stairs down,
|
||||
ladder up, ladder down, altar, grave, throne, kitchen sink, fountain, pool or moat,
|
||||
ice, lava, vertical lowered drawbridge, horizontal lowered drawbridge,
|
||||
vertical raised drawbridge, horizontal raised drawbridge, air, cloud,
|
||||
under water.
|
||||
|
||||
You might want to use `{\tt +}' for the corners and T walls for a more
|
||||
aesthetic, boxier display. Note that in the next release, new symbols
|
||||
may be added, or the present ones rearranged.
|
||||
|
||||
Cannot be set with the `{\tt O}' command.
|
||||
%.lp
|
||||
\item[\ib{effects}]
|
||||
Set the graphics symbols for displaying special effects (default
|
||||
``\verb&|-\\/*!)(0#@*/-\\& \verb&||\\-//-\\| |\\-/&'').
|
||||
The {\it effects\/} option should be
|
||||
followed by a string of 1--29
|
||||
characters to be used instead of the default special-effects characters.
|
||||
This string is subjected to the same processing as the {\it dungeon\/} option.
|
||||
|
||||
The order of the symbols is: vertical beam, horizontal beam, left slant,
|
||||
right slant, digging beam, camera flash beam, left boomerang, right boomerang,
|
||||
four glyphs giving the sequence for magic resistance displays,
|
||||
the eight surrounding glyphs for swallowed display,
|
||||
nine glyphs for explosions.
|
||||
An explosion consists of three rows (top, middle, and bottom) of three
|
||||
characters. The explosion is centered in the center of this $3 \times 3$
|
||||
array.
|
||||
|
||||
Note that in the next release, new symbols may be added,
|
||||
or the present ones rearranged.
|
||||
|
||||
Cannot be set with the `{\tt O}' command.
|
||||
%.lp
|
||||
\item[\ib{extmenu}]
|
||||
@@ -2338,14 +2270,6 @@ might miss some interesting and/or important information.
|
||||
Name your starting horse (ex.\ ``{\tt horsename:Trigger}'').
|
||||
Cannot be set with the `{\tt O}' command.
|
||||
%.lp
|
||||
\item[\ib{IBMgraphics}]
|
||||
Use a predefined selection of IBM extended ASCII characters to display the
|
||||
dungeon/effects/traps instead of having to define a full graphics set
|
||||
yourself (default off).
|
||||
This option also sets up proper handling of graphics
|
||||
characters for such terminals, so you should specify it when appropriate
|
||||
even if you override the selections with your own graphics strings.
|
||||
%.lp
|
||||
\item[\ib{ignintr}]
|
||||
Ignore interrupt signals, including breaks (default off).
|
||||
%.lp
|
||||
@@ -2429,35 +2353,6 @@ Menu character accelerator to select all items on this page of a menu.
|
||||
Implemented by the Amiga, Gem and tty ports.
|
||||
Default `,'.
|
||||
%.lp
|
||||
\item[\ib{monsters}]
|
||||
Set the characters used to display monster classes (default
|
||||
``\verb+abcdefghijklmnopqrstuv+
|
||||
\verb+wxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@ '&;:~]+'').
|
||||
This string is subjected to the same processing as the {\it dungeon\/} option.
|
||||
The order of the symbols is
|
||||
ant or other insect, blob, cockatrice,
|
||||
dog or other canine, eye or sphere, feline,
|
||||
gremlin, humanoid, imp or minor demon,
|
||||
jelly, kobold, leprechaun,
|
||||
mimic, nymph, orc,
|
||||
piercer, quadruped, rodent,
|
||||
arachnid or centipede, trapper or lurker above, horse or unicorn,
|
||||
vortex, worm, xan or other mythical/fantastic insect,
|
||||
light, zruty,
|
||||
angelic being, bat or bird, centaur,
|
||||
dragon, elemental, fungus or mold,
|
||||
gnome, giant humanoid, invisible monster,
|
||||
jabberwock, Keystone Kop, lich,
|
||||
mummy, naga, ogre,
|
||||
pudding or ooze, quantum mechanic, rust monster,
|
||||
snake, troll, umber hulk,
|
||||
vampire, wraith, xorn,
|
||||
apelike creature, zombie,
|
||||
human, ghost, golem,
|
||||
demon, sea monster, lizard,
|
||||
long worm tail, and mimic.
|
||||
Cannot be set with the `{\tt O}' command.
|
||||
%.lp
|
||||
\item[\ib{msghistory}]
|
||||
The number of top line messages to save (and recall with `{\tt \^{}P}')
|
||||
(default 20). Cannot be set with the `{\tt O}' command.
|
||||
@@ -2524,16 +2419,6 @@ When moving by numbers, to enter a count prefix for those commands
|
||||
which accept one (such as ``{\tt 12s}'' to search twelve times), precede it
|
||||
with the letter `{\tt n}' (``{\tt n12s}'').
|
||||
%.lp
|
||||
\item[\ib{objects}]
|
||||
Set the characters used to display object classes (default
|
||||
``\verb&])[="(%!?+/$*`0_.&'').
|
||||
This string is subjected to the same processing as the {\it dungeon\/} option.
|
||||
The order of the symbols is
|
||||
illegal-object (should never be seen), weapon, armor, ring, amulet, tool,
|
||||
food, potion, scroll, spellbook, wand, gold, gem or rock, boulder or statue,
|
||||
iron ball, chain, and venom.
|
||||
Cannot be set with the `{\tt O}' command.
|
||||
%.lp
|
||||
\item[\ib{packorder}]
|
||||
Specify the order to list object types in (default
|
||||
``\verb&")[%?+!=/(*`0_&''). The value of this option should be a string
|
||||
@@ -2598,6 +2483,11 @@ value is examined; `r' is an exception with ``{\tt Rogue}'', {\tt Ranger}'',
|
||||
and ``{\tt random}'' values. If you prefix `{\tt !}' or ``{\tt no}'' to the
|
||||
value, you can exclude that role from being picked randomly.
|
||||
%.lp
|
||||
\item[\ib{roguesymset}]
|
||||
This option may be used to select one of the named symbol sets found within
|
||||
{\tt symbols} to alter the symbols displayed on the screen on the
|
||||
rogue level.
|
||||
%.lp
|
||||
\item[\ib{rlecomp}]
|
||||
When writing out a save file, perform run length compression of the map.
|
||||
Not all ports support run length compression. It has no
|
||||
@@ -2661,6 +2551,10 @@ This option may be set to a NetHack version level to suppress
|
||||
alert notification messages about feature changes for that
|
||||
and prior versions (ex.\ ``{\tt suppress\_alert:3.3.1}'')
|
||||
%.lp
|
||||
\item[\ib{symset}]
|
||||
This option may be used to select one of the named symbol sets found within
|
||||
{\tt symbols} to alter the symbols displayed on the screen.
|
||||
%.lp
|
||||
\item[\ib{time}]
|
||||
Show the elapsed game time in turns on bottom line (default off).
|
||||
%.lp
|
||||
@@ -2680,21 +2574,6 @@ Setting this option makes the score list visible when a windowing version
|
||||
of NetHack is started without a parent window, but it no longer leaves
|
||||
the score list around after game end on a terminal or emulating window.
|
||||
%.lp
|
||||
\item[\ib{traps}]
|
||||
Set the graphics symbols for displaying traps (default
|
||||
``\verb&^^^^^^^^^^^^^^^^^"^^^^&'').
|
||||
The {\it traps\/} option should be followed by a string of 1--22
|
||||
characters to be used instead of the default traps characters.
|
||||
This string is subjected to the same processing as the {\it dungeon\/} option.
|
||||
|
||||
The order of the symbols is:
|
||||
arrow trap, dart trap, falling rock trap, squeaky board, bear trap,
|
||||
land mine, rolling boulder trap, sleeping gas trap, rust trap, fire trap,
|
||||
pit, spiked pit, hole, trap door, teleportation trap, level teleporter,
|
||||
magic portal, web, statue trap, magic trap, anti-magic field, polymorph trap.
|
||||
|
||||
Cannot be set with the `{\tt O}' command.
|
||||
%.lp
|
||||
\item[\ib{travel}]
|
||||
Allow the travel command (default on). Turning this option off will
|
||||
prevent the game from attempting unintended moves if you make inadvertent
|
||||
@@ -3054,6 +2933,218 @@ specifies that any message with "chime of a cash register" contained
|
||||
in it will trigger the playing of "gong.wav". You can have multiple
|
||||
SOUND entries in your config file.
|
||||
|
||||
%.lp
|
||||
%.hn 2
|
||||
\subsection*{Modifying NetHack Symbols}
|
||||
|
||||
%.pg
|
||||
NetHack can load entire symbol sets from the symbol file.
|
||||
|
||||
%.pg
|
||||
The options that are used to select a particular symbol set from the
|
||||
symbol file are:
|
||||
|
||||
\blist{}
|
||||
%.lp
|
||||
\item[\ib{symset}]
|
||||
Set the name of the symbol set that you want to load.
|
||||
{\it symbols\/}.
|
||||
|
||||
%.lp
|
||||
\item[\ib{roguesymset}]
|
||||
Set the name of the symbol set that you want to load for display
|
||||
on the rogue level.
|
||||
\elist
|
||||
|
||||
You can also override one or more symbols using the {\it SYMBOLS\/} config
|
||||
file option. Symbols are specified as {\it name:value\/} pairs. Note that
|
||||
{\it NetHack\/} escape-processes the {\it value\/} string in conventional C
|
||||
fashion. This means that `\verb+\+' is a prefix to take the following
|
||||
character literally. Thus `\verb+\+' needs to be represented as `\verb+\\+'.
|
||||
The special escape form
|
||||
`\verb+\m+' switches on the meta bit in the symbol value, and the
|
||||
`{\tt \^{}}' prefix causes the following character to be treated as a control
|
||||
character.
|
||||
|
||||
{
|
||||
\small
|
||||
\begin{longtable}{lll}
|
||||
\caption[]{NetHack Symbols}\\
|
||||
Default & Symbol Name & Description\\
|
||||
\hline \hline
|
||||
\endhead
|
||||
\verb@ @ & S\_air & (air)\\
|
||||
\verb@_@ & S\_altar & (altar)\\
|
||||
\verb@"@ & S\_amulet & (amulet)\\
|
||||
\verb@A@ & S\_angel & (angelic being)\\
|
||||
\verb@a@ & S\_ant & (ant or other insect)\\
|
||||
\verb@^@ & S\_anti\_magic\_trap & (anti-magic field)\\
|
||||
\verb@[@ & S\_armor & (suit or piece of armor)\\
|
||||
\verb@[@ & S\_armour & (suit or piece of armor)\\
|
||||
\verb@^@ & S\_arrow\_trap & (arrow trap)\\
|
||||
\verb@0@ & S\_ball & (iron ball)\\
|
||||
\verb@#@ & S\_bars & (iron bars)\\
|
||||
\verb@B@ & S\_bat & (bat or bird)\\
|
||||
\verb@^@ & S\_bear\_trap & (bear trap)\\
|
||||
\verb@-@ & S\_blcorn & (bottom left corner)\\
|
||||
\verb@b@ & S\_blob & (blob)\\
|
||||
\verb@+@ & S\_book & (spellbook)\\
|
||||
\verb@)@ & S\_boomleft & (boomerang open left)\\
|
||||
\verb@(@ & S\_boomright & (boomerang open right)\\
|
||||
\verb@`@ & S\_boulder & (boulder)\\
|
||||
\verb@-@ & S\_brcorn & (bottom right corner)\\
|
||||
\verb@C@ & S\_centaur & (centaur)\\
|
||||
\verb@_@ & S\_chain & (iron chain)\\
|
||||
\verb@#@ & S\_cloud & (cloud)\\
|
||||
\verb@c@ & S\_cockatrice & (cockatrice)\\
|
||||
\verb@$@ & S\_coin & (pile of coins)\\
|
||||
\verb@#@ & S\_corr & (corridor)\\
|
||||
\verb@-@ & S\_crwall & (wall)\\
|
||||
\verb@^@ & S\_dart\_trap & (dart trap)\\
|
||||
\verb@&@ & S\_demon & (major demon)\\
|
||||
\verb@*@ & S\_digbeam & (dig beam)\\
|
||||
\verb@>@ & S\_dnladder & (ladder down)\\
|
||||
\verb@>@ & S\_dnstair & (staircase down)\\
|
||||
\verb@d@ & S\_dog & (dog or other canine)\\
|
||||
\verb@D@ & S\_dragon & (dragon)\\
|
||||
\verb@;@ & S\_eel & (sea monster)\\
|
||||
\verb@E@ & S\_elemental & (elemental)\\
|
||||
\verb@/@ & S\_explode1 & (explosion top left)\\
|
||||
\verb@-@ & S\_explode2 & (explosion top center)\\
|
||||
\verb@\@ & S\_explode3 & (explosion top right)\\
|
||||
\verb@|@ & S\_explode4 & (explosion middle left)\\
|
||||
\verb@ @ & S\_explode5 & (explosion middle center)\\
|
||||
\verb@|@ & S\_explode6 & (explosion middle right)\\
|
||||
\verb@\@ & S\_explode7 & (explosion bottom left)\\
|
||||
\verb@-@ & S\_explode8 & (explosion bottom center)\\
|
||||
\verb@/@ & S\_explode9 & (explosion bottom right)\\
|
||||
\verb@e@ & S\_eye & (eye or sphere)\\
|
||||
\verb@^@ & S\_falling\_rock\_trap & (falling rock trap)\\
|
||||
\verb@f@ & S\_feline & (cat or other feline)\\
|
||||
\verb@^@ & S\_fire\_trap & (fire trap)\\
|
||||
\verb@!@ & S\_flashbeam & (flash beam)\\
|
||||
\verb@%@ & S\_food & (piece of food)\\
|
||||
\verb@{@ & S\_fountain & (fountain)\\
|
||||
\verb@F@ & S\_fungus & (fungus or mold)\\
|
||||
\verb@*@ & S\_gem & (gem or rock)\\
|
||||
\verb@ @ & S\_ghost & (ghost)\\
|
||||
\verb@H@ & S\_giant & (giant humanoid)\\
|
||||
\verb@G@ & S\_gnome & (gnome)\\
|
||||
\verb@'@ & S\_golem & (golem)\\
|
||||
\verb@|@ & S\_grave & (grave)\\
|
||||
\verb@g@ & S\_gremlin & (gremlin)\\
|
||||
\verb@-@ & S\_hbeam & (wall)\\
|
||||
\verb@#@ & S\_hcdbridge & (horizontal raised drawbridge)\\
|
||||
\verb@+@ & S\_hcdoor & (closed door)\\
|
||||
\verb@.@ & S\_hodbridge & (horizontal lowered drawbridge)\\
|
||||
\verb@|@ & S\_hodoor & (open door)\\
|
||||
\verb@^@ & S\_hole & (hole)\\
|
||||
\verb~@~ & S\_human & (human or elf)\\
|
||||
\verb@h@ & S\_humanoid & (humanoid)\\
|
||||
\verb@-@ & S\_hwall & (horizontal wall)\\
|
||||
\verb@.@ & S\_ice & (ice)\\
|
||||
\verb@i@ & S\_imp & (imp or minor demon)\\
|
||||
\verb@J@ & S\_jabberwock & (jabberwock)\\
|
||||
\verb@j@ & S\_jelly & (jelly)\\
|
||||
\verb@k@ & S\_kobold & (kobold)\\
|
||||
\verb@K@ & S\_kop & (Keystone Kop)\\
|
||||
\verb@^@ & S\_land\_mine & (land mine)\\
|
||||
\verb@}@ & S\_lava & (molten lava)\\
|
||||
\verb@l@ & S\_leprechaun & (leprechaun)\\
|
||||
\verb@^@ & S\_level\_teleporter & (level teleporter)\\
|
||||
\verb@L@ & S\_lich & (lich)\\
|
||||
\verb@y@ & S\_light & (light)\\
|
||||
\verb@#@ & S\_litcorr & (lit corridor)\\
|
||||
\verb@:@ & S\_lizard & (lizard)\\
|
||||
\verb@\@ & S\_lslant & (wall)\\
|
||||
\verb@^@ & S\_magic\_portal & (magic portal)\\
|
||||
\verb@^@ & S\_magic\_trap & (magic trap)\\
|
||||
\verb@m@ & S\_mimic & (mimic)\\
|
||||
\verb@]@ & S\_mimic\_def & (mimic)\\
|
||||
\verb@M@ & S\_mummy & (mummy)\\
|
||||
\verb@N@ & S\_naga & (naga)\\
|
||||
\verb@.@ & S\_ndoor & (doorway)\\
|
||||
\verb@n@ & S\_nymph & (nymph)\\
|
||||
\verb@O@ & S\_ogre & (ogre)\\
|
||||
\verb@o@ & S\_orc & (orc)\\
|
||||
\verb@p@ & S\_piercer & (piercer)\\
|
||||
\verb@^@ & S\_pit & (pit)\\
|
||||
\verb@^@ & S\_polymorph\_trap & (polymorph trap)\\
|
||||
\verb@}@ & S\_pool & (water)\\
|
||||
\verb@!@ & S\_potion & (potion)\\
|
||||
\verb@P@ & S\_pudding & (pudding or ooze)\\
|
||||
\verb@q@ & S\_quadruped & (quadruped)\\
|
||||
\verb@Q@ & S\_quantmech & (quantum mechanic)\\
|
||||
\verb@=@ & S\_ring & (ring)\\
|
||||
\verb@`@ & S\_rock & (boulder or statue)\\
|
||||
\verb@r@ & S\_rodent & (rodent)\\
|
||||
\verb@^@ & S\_rolling\_boulder\_trap & (rolling boulder trap)\\
|
||||
\verb@.@ & S\_room & (floor of a room)\\
|
||||
\verb@/@ & S\_rslant & (wall)\\
|
||||
\verb@^@ & S\_rust\_trap & (rust trap)\\
|
||||
\verb@R@ & S\_rustmonst & (rust monster or disenchanter)\\
|
||||
\verb@?@ & S\_scroll & (scroll)\\
|
||||
\verb@#@ & S\_sink & (sink)\\
|
||||
\verb@^@ & S\_sleeping\_gas\_trap & (sleeping gas trap)\\
|
||||
\verb@S@ & S\_snake & (snake)\\
|
||||
\verb@s@ & S\_spider & (arachnid or centipede)\\
|
||||
\verb@^@ & S\_spiked\_pit & (spiked pit)\\
|
||||
\verb@^@ & S\_squeaky\_board & (squeaky board)\\
|
||||
\verb@0@ & S\_ss1 & (magic shield 1 of 4)\\
|
||||
\verb@#@ & S\_ss2 & (magic shield 2 of 4)\\
|
||||
\verb@@@ & S\_ss3 & (magic shield 3 of 4)\\
|
||||
\verb@*@ & S\_ss4 & (magic shield 4 of 4)\\
|
||||
\verb@^@ & S\_statue\_trap & (statue trap)\\
|
||||
\verb@ @ & S\_stone & (dark part of a room)\\
|
||||
\verb@-@ & S\_sw\_bc & (swallow bottom center)\\
|
||||
\verb@\@ & S\_sw\_bl & (swallow bottom left)\\
|
||||
\verb@/@ & S\_sw\_br & (swallow bottom right )\\
|
||||
\verb@|@ & S\_sw\_ml & (swallow middle left)\\
|
||||
\verb@|@ & S\_sw\_mr & (swallow middle right)\\
|
||||
\verb@-@ & S\_sw\_tc & (swallow top center)\\
|
||||
\verb@/@ & S\_sw\_tl & (swallow top left)\\
|
||||
\verb@\@ & S\_sw\_tr & (swallow top right)\\
|
||||
\verb@-@ & S\_tdwall & (wall)\\
|
||||
\verb@^@ & S\_teleportation\_trap & (teleportation trap)\\
|
||||
\verb@\@ & S\_throne & (opulent throne)\\
|
||||
\verb@-@ & S\_tlcorn & (top left corner)\\
|
||||
\verb@|@ & S\_tlwall & (wall)\\
|
||||
\verb@(@ & S\_tool & (useful item (pick-axe\, key\, lamp...))\\
|
||||
\verb@^@ & S\_trap\_door & (trap door)\\
|
||||
\verb@t@ & S\_trapper & (trapper or lurker above)\\
|
||||
\verb@-@ & S\_trcorn & (top right corner)\\
|
||||
\verb@#@ & S\_tree & (tree)\\
|
||||
\verb@T@ & S\_troll & (troll)\\
|
||||
\verb@|@ & S\_trwall & (wall)\\
|
||||
\verb@-@ & S\_tuwall & (wall)\\
|
||||
\verb@U@ & S\_umber & (umber hulk)\\
|
||||
\verb@u@ & S\_unicorn & (unicorn or horse)\\
|
||||
\verb@<@ & S\_upladder & (ladder up)\\
|
||||
\verb@<@ & S\_upstair & (staircase up)\\
|
||||
\verb@V@ & S\_vampire & (vampire)\\
|
||||
\verb@|@ & S\_vbeam & (wall)\\
|
||||
\verb@#@ & S\_vcdbridge & (vertical raised drawbridge)\\
|
||||
\verb@+@ & S\_vcdoor & (closed door)\\
|
||||
\verb@.@ & S\_venom & (splash of venom)\\
|
||||
\verb@.@ & S\_vodbridge & (vertical lowered drawbridge)\\
|
||||
\verb@-@ & S\_vodoor & (open door)\\
|
||||
\verb@v@ & S\_vortex & (vortex)\\
|
||||
\verb@|@ & S\_vwall & (vertical wall)\\
|
||||
\verb@/@ & S\_wand & (wand)\\
|
||||
\verb@}@ & S\_water & (water)\\
|
||||
\verb@)@ & S\_weapon & (weapon)\\
|
||||
\verb@"@ & S\_web & (web)\\
|
||||
\verb@w@ & S\_worm & (worm)\\
|
||||
\verb@~@ & S\_worm\_tail & (long worm tail)\\
|
||||
\verb@W@ & S\_wraith & (wraith)\\
|
||||
\verb@x@ & S\_xan & (xan or other mythical/fantastic insect)\\
|
||||
\verb@X@ & S\_xorn & (xorn)\\
|
||||
\verb@Y@ & S\_yeti & (apelike creature)\\
|
||||
\verb@Z@ & S\_zombie & (zombie)\\
|
||||
\verb@z@ & S\_zruty & (zruty)
|
||||
\end{longtable}%
|
||||
}
|
||||
|
||||
%.lp
|
||||
%.hn 2
|
||||
\subsection*{Configuring NetHack for Play by the Blind}
|
||||
@@ -3077,18 +3168,22 @@ overall location of items on the screen.
|
||||
%.pg
|
||||
While it is not difficult for experienced users to edit the {\it defaults.nh\/}
|
||||
file to accomplish this, novices may find this task somewhat daunting.
|
||||
Included in all official distributions of NetHack is a file called
|
||||
{\it NHAccess.nh\/}. Replacing {\it defaults.nh\/} with this file will cause
|
||||
the game to run in a manner accessible to the blind. After you have gained
|
||||
some experience with the game and with editing files, you may want to alter
|
||||
settings to better suit your preferences. Instructions on how to do this
|
||||
are included in the {\it NHAccess.nh\/} file itself. The most crucial
|
||||
settings to make the game accessible are:
|
||||
Included within the symbol file of all official distributions of NetHack
|
||||
is a symset called {\it NHAccess\/}. Selecting that symset in your
|
||||
configuration file will cause the game to run in a manner accessible
|
||||
to the blind. After you have gained some experience with the game
|
||||
and with editing files, you may want to alter settings via {\it SYMBOLS=\/}
|
||||
in your configuration file to better suit your preferences.
|
||||
The most crucial settings to make the game accessible are:
|
||||
%.pg
|
||||
\blist{}
|
||||
%.lp
|
||||
\item[\ib{IBMgraphics}]
|
||||
Disable IBMgraphics by commenting out this option.
|
||||
\item[\ib{symset:NHAccess}]
|
||||
Load a symbol set appropriate for use by blind players.
|
||||
%.lp
|
||||
\item[\ib{roguesymset:NHAccess}]
|
||||
Load a symbol set for the rogue level that is appropriate for
|
||||
use by blind players.
|
||||
%.lp
|
||||
\item[\ib{menustyle:traditional}]
|
||||
This will assist in the interface to speech synthesizers.
|
||||
@@ -3097,13 +3192,6 @@ This will assist in the interface to speech synthesizers.
|
||||
A lot of speech access programs use the number-pad to review the screen.
|
||||
If this is the case, disable the number\_pad option and use the traditional
|
||||
Rogue-like commands.
|
||||
%.lp
|
||||
\item[\ib{Character graphics}]
|
||||
Comment out all character graphics sets found near the bottom of the
|
||||
{\it defaults.nh\/} file. Most of these replace {\it NetHack\/}'s
|
||||
default representation of the dungeon using standard ASCII characters
|
||||
with fancier characters from extended character sets, and these fancier
|
||||
characters can annoy screen-readers.
|
||||
\elist
|
||||
|
||||
%.hn 1
|
||||
@@ -3402,9 +3490,14 @@ resurrected it for 3.3.1.
|
||||
%.pg
|
||||
\medskip
|
||||
\nd There is a NetHack web site maintained by {\it Ken Lorber} at
|
||||
{\catcode`\#=11
|
||||
\special{html:<a href="http://www.nethack.org/">}}
|
||||
http:{\tt /}{\tt /}www.nethack.org{\tt /}.
|
||||
{\catcode`\#=11
|
||||
\special{html:</a>}}
|
||||
|
||||
%.pg
|
||||
%.hn 3
|
||||
\subsection*{Dungeoneers}
|
||||
\bigskip
|
||||
\nd From time to time, some depraved individual out there in netland sends a
|
||||
particularly intriguing modification to help out with the game. The Gods of
|
||||
|
||||
@@ -515,8 +515,8 @@ winid WIN_MESSAGE, WIN_MAP, WIN_INVEN
|
||||
There is also a window called WIN_STATUS that is used
|
||||
only for backward compatibility in the genl_status_*
|
||||
set of generic status display functions.
|
||||
char *AE, *AS; Checked in options.c to see if we should switch
|
||||
to DEC_GRAPHICS. It is #ifdefed VMS and UNIX.
|
||||
char *AE, *AS; Checked in options.c to see if we should load and
|
||||
switch to DECGraphics symset. It is #ifdefed VMS and UNIX.
|
||||
int LI, CO; Set in sys/unix/ioctl.c.
|
||||
|
||||
The following appears to be Unix specific. Other ports using the tty
|
||||
|
||||
@@ -231,9 +231,9 @@ E NEARDATA struct spell spl_book[]; /* sized in decl.c */
|
||||
E const int zapcolors[];
|
||||
#endif
|
||||
|
||||
E const char def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||
E const struct class_sym def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||
E uchar oc_syms[MAXOCLASSES]; /* current class symbols */
|
||||
E const char def_monsyms[MAXMCLASSES]; /* default class symbols */
|
||||
E const struct class_sym def_monsyms[MAXMCLASSES]; /* default class symbols */
|
||||
E uchar monsyms[MAXMCLASSES]; /* current class symbols */
|
||||
|
||||
#include "obj.h"
|
||||
@@ -269,6 +269,8 @@ E NEARDATA struct mvitals {
|
||||
uchar mvflags;
|
||||
} mvitals[NUMMONS];
|
||||
|
||||
E struct symparse loadsyms[];
|
||||
|
||||
E NEARDATA struct c_color_names {
|
||||
const char *const c_black, *const c_amber, *const c_golden,
|
||||
*const c_light_blue,*const c_red, *const c_green,
|
||||
@@ -347,7 +349,7 @@ E struct tc_gbl_data { /* also declared in tcap.h */
|
||||
#endif
|
||||
|
||||
/* xxxexplain[] is in drawing.c */
|
||||
E const char * const monexplain[], invisexplain[], * const objexplain[], * const oclass_names[];
|
||||
E const char * const monexplain[], invisexplain[], * const oclass_names[];
|
||||
|
||||
/* Some systems want to use full pathnames for some subsets of file names,
|
||||
* rather than assuming that they're all in the current directory. This
|
||||
|
||||
@@ -491,10 +491,18 @@ E boolean FDECL(hurtle_step, (genericptr_t, int, int));
|
||||
E int FDECL(def_char_to_objclass, (CHAR_P));
|
||||
E int FDECL(def_char_to_monclass, (CHAR_P));
|
||||
#if !defined(MAKEDEFS_C) && !defined(LEV_LEX_C)
|
||||
E void FDECL(assign_graphics, (uchar *,int,int,int));
|
||||
E void FDECL(switch_graphics, (int));
|
||||
#ifdef REINCARNATION
|
||||
E void FDECL(assign_rogue_graphics, (BOOLEAN_P));
|
||||
E void NDECL(init_r_symbols);
|
||||
#endif
|
||||
E void NDECL(init_symbols);
|
||||
E void NDECL(init_disp_symbols);
|
||||
E void NDECL(init_l_symbols);
|
||||
#ifdef ASCIIGRAPH
|
||||
E void FDECL(update_l_symset, (struct symparse *,int));
|
||||
E void FDECL(update_r_symset, (struct symparse *,int));
|
||||
E void FDECL(switch_graphics, (int));
|
||||
#endif
|
||||
#ifdef BARGETHROUGH
|
||||
E boolean FDECL(cursed_object_at, (int, int));
|
||||
@@ -710,6 +718,10 @@ E void FDECL(check_recordfile, (const char *));
|
||||
#if defined(WIZARD)
|
||||
E void NDECL(read_wizkit);
|
||||
#endif
|
||||
#ifdef ASCIIGRAPH
|
||||
E int FDECL(read_sym_file, (BOOLEAN_P));
|
||||
E int FDECL(parse_sym_line, (char *,BOOLEAN_P));
|
||||
#endif
|
||||
E void FDECL(paniclog, (const char *, const char *));
|
||||
E int FDECL(validate_prefix_locations, (char *));
|
||||
E char** NDECL(get_saved_games);
|
||||
@@ -1524,6 +1536,12 @@ E void FDECL(set_option_mod_status, (const char *,int));
|
||||
E int FDECL(add_autopickup_exception, (const char *));
|
||||
E void NDECL(free_autopickup_exceptions);
|
||||
#endif /* AUTOPICKUP_EXCEPTIONS */
|
||||
#ifdef ASCIIGRAPH
|
||||
E int FDECL(load_symset, (const char *,BOOLEAN_P));
|
||||
E void FDECL(parsesymbols, (char *));
|
||||
E struct symparse *FDECL(match_sym, (char *));
|
||||
E int FDECL(sym_val, (char *));
|
||||
#endif
|
||||
|
||||
/* ### pager.c ### */
|
||||
|
||||
|
||||
@@ -181,9 +181,15 @@ struct instance_flags {
|
||||
boolean zerocomp; /* write zero-compressed save files */
|
||||
boolean rlecomp; /* run-length comp of levels when writing savefile */
|
||||
uchar num_pad_mode;
|
||||
boolean DECgraphics; /* use DEC VT-xxx extended character set */
|
||||
boolean echo; /* 1 to echo characters */
|
||||
#if 0
|
||||
boolean DECgraphics; /* use DEC VT-xxx extended character set */
|
||||
boolean IBMgraphics; /* use IBM extended character set */
|
||||
#ifdef MAC_GRAPHICS_ENV
|
||||
boolean MACgraphics; /* use Macintosh extended character set, as
|
||||
as defined in the special font HackFont */
|
||||
#endif
|
||||
#endif
|
||||
uchar bouldersym; /* symbol for boulder display */
|
||||
#ifdef TTY_GRAPHICS
|
||||
char prevmsg_window; /* type of old message window to use */
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
#define LICENSE "license" /* file with license information */
|
||||
#define OPTIONFILE "opthelp" /* file explaining runtime options */
|
||||
#define OPTIONS_USED "options" /* compile-time options, for #version */
|
||||
|
||||
#define SYMBOLS "symbols" /* replacement symbol sets */
|
||||
#define LEV_EXT ".lev" /* extension for special level files */
|
||||
|
||||
|
||||
|
||||
@@ -109,6 +109,12 @@ struct objclass {
|
||||
unsigned short oc_nutrition; /* food value */
|
||||
};
|
||||
|
||||
struct class_sym {
|
||||
char sym;
|
||||
char *name;
|
||||
char *explain;
|
||||
};
|
||||
|
||||
struct objdescr {
|
||||
const char *oc_name; /* actual name */
|
||||
const char *oc_descr; /* description when name unknown */
|
||||
@@ -149,7 +155,7 @@ extern NEARDATA struct objdescr obj_descr[];
|
||||
#define MON_EXPLODE (MAXOCLASSES+2) /* Exploding monster (e.g. gas spore) */
|
||||
|
||||
#if 0 /* moved to decl.h so that makedefs.c won't see them */
|
||||
extern const char def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||
extern const struct class_sym def_oc_syms[MAXOCLASSES]; /* default class symbols */
|
||||
extern uchar oc_syms[MAXOCLASSES]; /* current class symbols */
|
||||
#endif
|
||||
|
||||
|
||||
34
include/rm.h
34
include/rm.h
@@ -223,17 +223,49 @@ struct symdef {
|
||||
#endif
|
||||
};
|
||||
|
||||
struct symparse {
|
||||
unsigned range;
|
||||
#define SYM_CONTROL 1 /* start/finish markers */
|
||||
#define SYM_PCHAR 2 /* index into showsyms */
|
||||
#define SYM_MON 3 /* index into monsyms */
|
||||
#define SYM_OC 4 /* index into oc_syms */
|
||||
#define SYM_OBJ 5 /* index into objects */
|
||||
int idx;
|
||||
const char *name;
|
||||
};
|
||||
|
||||
/* general linked list of text pointers */
|
||||
struct textlist {
|
||||
char *text; /* the text */
|
||||
int idx; /* an index value */
|
||||
struct textlist *next; /* next in list */
|
||||
};
|
||||
|
||||
#ifdef REINCARNATION
|
||||
#define ROGUEHANDLING(H) ((Is_rogue_level(&u.uz) && roguehandling && \
|
||||
!strcmpi(roguehandling,H)))
|
||||
#define SYMHANDLING(H) (ROGUEHANDLING(H) || \
|
||||
(!Is_rogue_level(&u.uz) && symhandling && \
|
||||
!strcmpi(symhandling,H)))
|
||||
#else
|
||||
#define SYMHANDLING(H) (symhandling && !strcmpi(symhandling,H))
|
||||
#endif
|
||||
|
||||
extern const struct symdef defsyms[MAXPCHARS]; /* defaults */
|
||||
extern uchar showsyms[MAXPCHARS];
|
||||
extern const struct symdef def_warnsyms[WARNCOUNT];
|
||||
extern char *symset, *symhandling; /* from drawing.c */
|
||||
extern char *roguesymset, *roguehandling; /* from drawing.c */
|
||||
|
||||
/*
|
||||
* Graphics sets for display symbols
|
||||
*/
|
||||
#define ASCII_GRAPHICS 0 /* regular characters: '-', '+', &c */
|
||||
#define DEFAULT_GRAPHICS 0 /* regular characters: '-', '+', &c */
|
||||
#if 0
|
||||
#define IBM_GRAPHICS 1 /* PC graphic characters */
|
||||
#define DEC_GRAPHICS 2 /* VT100 line drawing characters */
|
||||
#define MAC_GRAPHICS 3 /* Macintosh drawing characters */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The 5 possible states of doors
|
||||
|
||||
@@ -425,14 +425,14 @@ int class; /* an object class, 0 for all */
|
||||
* detect. Rather than trump anything, show both possibilities.
|
||||
* We can exclude checking the buried obj chain for boulders below.
|
||||
*/
|
||||
sym = class ? def_oc_syms[class] : 0;
|
||||
sym = class ? def_oc_syms[class].sym : 0;
|
||||
if (sym && iflags.bouldersym && sym == iflags.bouldersym)
|
||||
boulder = ROCK_CLASS;
|
||||
|
||||
if (Hallucination || (Confusion && class == SCROLL_CLASS))
|
||||
Strcpy(stuff, something);
|
||||
else
|
||||
Strcpy(stuff, class ? oclass_names[class] : "objects");
|
||||
Strcpy(stuff, class ? def_oc_syms[class].name : "objects");
|
||||
if (boulder && class != ROCK_CLASS) Strcat(stuff, " and/or large stones");
|
||||
|
||||
if (do_dknown) for(obj = invent; obj; obj = obj->nobj) do_dknown_of(obj);
|
||||
@@ -616,7 +616,7 @@ int mclass; /* monster class, 0 for all */
|
||||
if (!mclass || mtmp->data->mlet == mclass ||
|
||||
(mtmp->data == &mons[PM_LONG_WORM] && mclass == S_WORM_TAIL))
|
||||
if (mtmp->mx > 0) {
|
||||
if (mclass && def_monsyms[mclass] == ' ')
|
||||
if (mclass && def_monsyms[mclass].sym == ' ')
|
||||
show_glyph(mtmp->mx,mtmp->my,
|
||||
detected_mon_to_glyph(mtmp));
|
||||
else
|
||||
@@ -917,7 +917,7 @@ struct obj *obj;
|
||||
if (flags.verbose) You("may look for an object or monster symbol.");
|
||||
ch = yn_function("What do you look for?", (char *)0, '\0');
|
||||
/* Don't filter out ' ' here; it has a use */
|
||||
if ((ch != def_monsyms[S_GHOST]) && index(quitchars,ch)) {
|
||||
if ((ch != def_monsyms[S_GHOST].sym) && index(quitchars,ch)) {
|
||||
if (flags.verbose) pline(Never_mind);
|
||||
return;
|
||||
}
|
||||
|
||||
1280
src/drawing.c
1280
src/drawing.c
File diff suppressed because it is too large
Load Diff
278
src/files.c
278
src/files.c
@@ -185,6 +185,11 @@ STATIC_DCL char *FDECL(make_lockname, (const char *,char *));
|
||||
STATIC_DCL FILE *FDECL(fopen_config_file, (const char *));
|
||||
STATIC_DCL int FDECL(get_uchars, (FILE *,char *,char *,uchar *,BOOLEAN_P,int,const char *));
|
||||
int FDECL(parse_config_line, (FILE *,char *,char *,char *));
|
||||
#ifdef ASCIIGRAPH
|
||||
STATIC_DCL FILE *NDECL(fopen_sym_file);
|
||||
STATIC_DCL void FDECL(free_symhandling, (BOOLEAN_P));
|
||||
STATIC_DCL void FDECL(set_symhandling, (char *,BOOLEAN_P));
|
||||
#endif
|
||||
#ifdef NOCWD_ASSUMPTIONS
|
||||
STATIC_DCL void FDECL(adjust_prefix, (char *, int));
|
||||
#endif
|
||||
@@ -2047,35 +2052,46 @@ char *tmp_levels;
|
||||
} else if (match_varname(buf, "BOULDER", 3)) {
|
||||
(void) get_uchars(fp, buf, bufp, &iflags.bouldersym, TRUE,
|
||||
1, "BOULDER");
|
||||
} else if (match_varname(buf, "GRAPHICS", 4)) {
|
||||
len = get_uchars(fp, buf, bufp, translate, FALSE,
|
||||
MAXPCHARS, "GRAPHICS");
|
||||
assign_graphics(translate, len, MAXPCHARS, 0);
|
||||
} else if (match_varname(buf, "DUNGEON", 4)) {
|
||||
len = get_uchars(fp, buf, bufp, translate, FALSE,
|
||||
MAXDCHARS, "DUNGEON");
|
||||
assign_graphics(translate, len, MAXDCHARS, 0);
|
||||
} else if (match_varname(buf, "TRAPS", 4)) {
|
||||
len = get_uchars(fp, buf, bufp, translate, FALSE,
|
||||
MAXTCHARS, "TRAPS");
|
||||
assign_graphics(translate, len, MAXTCHARS, MAXDCHARS);
|
||||
} else if (match_varname(buf, "EFFECTS", 4)) {
|
||||
len = get_uchars(fp, buf, bufp, translate, FALSE,
|
||||
MAXECHARS, "EFFECTS");
|
||||
assign_graphics(translate, len, MAXECHARS, MAXDCHARS+MAXTCHARS);
|
||||
|
||||
} else if (match_varname(buf, "OBJECTS", 3)) {
|
||||
/* oc_syms[0] is the RANDOM object, unused */
|
||||
(void) get_uchars(fp, buf, bufp, &(oc_syms[1]), TRUE,
|
||||
MAXOCLASSES-1, "OBJECTS");
|
||||
} else if (match_varname(buf, "MONSTERS", 3)) {
|
||||
/* monsyms[0] is unused */
|
||||
(void) get_uchars(fp, buf, bufp, &(monsyms[1]), TRUE,
|
||||
MAXMCLASSES-1, "MONSTERS");
|
||||
} else if (match_varname(buf, "WARNINGS", 5)) {
|
||||
(void) get_uchars(fp, buf, bufp, translate, FALSE,
|
||||
WARNCOUNT, "WARNINGS");
|
||||
assign_warnings(translate);
|
||||
} else if (match_varname(buf, "SYMBOLS", 4)) {
|
||||
#ifdef ASCIIGRAPH
|
||||
char *op, symbuf[BUFSZ];
|
||||
boolean morelines;
|
||||
do {
|
||||
morelines = FALSE;
|
||||
|
||||
/* strip leading and trailing white space */
|
||||
while (isspace(*bufp)) bufp++;
|
||||
op = eos(bufp);
|
||||
while (--op >= bufp && isspace(*op)) *op = '\0';
|
||||
|
||||
/* check for line continuation (trailing '\') */
|
||||
op = eos(bufp);
|
||||
if (--op >= bufp && *op == '\\') {
|
||||
*op = '\0';
|
||||
morelines = TRUE;
|
||||
/* strip trailing space now that '\' is gone */
|
||||
while (--op >= bufp && isspace(*op)) *op = '\0';
|
||||
}
|
||||
|
||||
/* parse here */
|
||||
parsesymbols(bufp);
|
||||
|
||||
if (morelines)
|
||||
do {
|
||||
*symbuf = '\0';
|
||||
if (!fgets(symbuf, BUFSZ, fp)) {
|
||||
morelines = FALSE;
|
||||
break;
|
||||
}
|
||||
bufp = symbuf;
|
||||
} while (*bufp == '#');
|
||||
} while (morelines);
|
||||
switch_graphics(TRUE);
|
||||
#endif /*ASCIIGRAPH*/
|
||||
#ifdef WIZARD
|
||||
} else if (match_varname(buf, "WIZKIT", 6)) {
|
||||
(void) strncpy(wizkit, bufp, WIZKIT_MAX-1);
|
||||
@@ -2405,6 +2421,218 @@ read_wizkit()
|
||||
|
||||
#endif /*WIZARD*/
|
||||
|
||||
#ifdef ASCIIGRAPH
|
||||
extern struct symparse loadsyms[]; /* drawing.c */
|
||||
extern struct textlist *symset_list; /* options.c */
|
||||
static int symset_count = 0; /* for pick-list building only */
|
||||
static boolean chosen_symset_start = FALSE, chosen_symset_end = FALSE;
|
||||
|
||||
STATIC_OVL
|
||||
FILE *
|
||||
fopen_sym_file()
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen_datafile(SYMBOLS, "r", HACKPREFIX);
|
||||
return fp;
|
||||
}
|
||||
|
||||
/*
|
||||
* Returns 1 if the chose symset was found and loaded.
|
||||
* 0 if it wasn't found in the sym file or other problem.
|
||||
*/
|
||||
int
|
||||
read_sym_file(rogueflag)
|
||||
boolean rogueflag;
|
||||
{
|
||||
char buf[4*BUFSZ];
|
||||
FILE *fp;
|
||||
|
||||
if (!(fp = fopen_sym_file())) return 0;
|
||||
|
||||
symset_count = 0;
|
||||
chosen_symset_start = chosen_symset_end = FALSE;
|
||||
while (fgets(buf, 4*BUFSZ, fp)) {
|
||||
if (!parse_sym_line(buf, rogueflag)) {
|
||||
raw_printf("Bad symbol line: \"%.50s\"", buf);
|
||||
wait_synch();
|
||||
}
|
||||
}
|
||||
(void) fclose(fp);
|
||||
if (!chosen_symset_end && !chosen_symset_start) return 0;
|
||||
if (!chosen_symset_end) {
|
||||
raw_printf("Missing finish for symset \"%s\"",
|
||||
#ifdef REINCARNATION
|
||||
rogueflag ? roguesymset :
|
||||
#endif
|
||||
symset);
|
||||
wait_synch();
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* returns 0 on error */
|
||||
int
|
||||
parse_sym_line(buf, rogueflag)
|
||||
char *buf;
|
||||
boolean rogueflag;
|
||||
{
|
||||
int val;
|
||||
struct symparse *symp = (struct symparse *)0;
|
||||
char *bufp, *commentp, *altp;
|
||||
char *symsetname =
|
||||
#ifdef REINCARNATION
|
||||
rogueflag ? roguesymset :
|
||||
#endif
|
||||
symset;
|
||||
|
||||
if (*buf == '#')
|
||||
return 1;
|
||||
|
||||
/* remove trailing comment(s) */
|
||||
commentp = eos(buf);
|
||||
while (--commentp > buf) {
|
||||
if (*commentp != '#') continue;
|
||||
*commentp = '\0';
|
||||
}
|
||||
|
||||
/* remove trailing whitespace */
|
||||
bufp = eos(buf);
|
||||
while (--bufp > buf && isspace(*bufp))
|
||||
continue;
|
||||
|
||||
if (bufp <= buf)
|
||||
return 1; /* skip all-blank lines */
|
||||
else
|
||||
*(bufp + 1) = '\0'; /* terminate line */
|
||||
|
||||
/* skip leading whitespace on option name */
|
||||
while (isspace(*buf)) ++buf;
|
||||
|
||||
/* find the '=' or ':' */
|
||||
bufp = index(buf, '=');
|
||||
altp = index(buf, ':');
|
||||
if (!bufp || (altp && altp < bufp)) bufp = altp;
|
||||
if (!bufp) {
|
||||
if (strncmpi(buf, "finish", 6) == 0) {
|
||||
/* end current graphics set */
|
||||
chosen_symset_start = FALSE;
|
||||
chosen_symset_end = TRUE;
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* skip whitespace between '=' and value */
|
||||
do { ++bufp; } while (isspace(*bufp));
|
||||
|
||||
symp = match_sym(buf);
|
||||
if (!symp)
|
||||
return 0;
|
||||
|
||||
if (!symsetname) {
|
||||
/* A null symsetname indicates that we're just
|
||||
building a pick-list of possible symset
|
||||
values from the file, so only do that */
|
||||
if (symp->range == SYM_CONTROL && symp->idx == 0) {
|
||||
struct textlist *tmpsp;
|
||||
tmpsp = (struct textlist *)alloc(sizeof(struct textlist));
|
||||
tmpsp->next = (struct textlist *)0;
|
||||
if (!symset_list) {
|
||||
symset_list = tmpsp;
|
||||
symset_count = 0;
|
||||
} else {
|
||||
symset_count++;
|
||||
tmpsp->next = symset_list;
|
||||
symset_list = tmpsp;
|
||||
}
|
||||
tmpsp->idx = symset_count;
|
||||
tmpsp->text = (char *)alloc(strlen(bufp)+1);
|
||||
Strcpy(tmpsp->text, bufp);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
if (symp->range) {
|
||||
if (symp->range == SYM_CONTROL) {
|
||||
switch(symp->idx) {
|
||||
case 0:
|
||||
/* start of symset */
|
||||
if (!strcmpi(bufp, symsetname)) { /* desired one? */
|
||||
chosen_symset_start = TRUE;
|
||||
#ifdef REINCARNATION
|
||||
if (rogueflag)
|
||||
init_r_symbols();
|
||||
else
|
||||
#endif
|
||||
init_l_symbols();
|
||||
free_symhandling(rogueflag);
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
/* finish symset */
|
||||
chosen_symset_start = FALSE;
|
||||
chosen_symset_end = TRUE;
|
||||
break;
|
||||
case 2:
|
||||
/* handler type identified */
|
||||
if (chosen_symset_start)
|
||||
set_symhandling(bufp, rogueflag);
|
||||
break;
|
||||
}
|
||||
} else { /* !SYM_CONTROL */
|
||||
val = sym_val(bufp);
|
||||
if (chosen_symset_start) {
|
||||
#ifdef REINCARNATION
|
||||
if (rogueflag)
|
||||
update_r_symset(symp, val);
|
||||
else
|
||||
#endif
|
||||
update_l_symset(symp, val);
|
||||
}
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
free_symhandling(rogueflag)
|
||||
boolean rogueflag;
|
||||
{
|
||||
if (rogueflag) {
|
||||
#ifdef REINCARNATION
|
||||
if (roguehandling) {
|
||||
free((genericptr_t)roguehandling);
|
||||
roguehandling = (char *)0;
|
||||
}
|
||||
#endif
|
||||
} else {
|
||||
if (symhandling) {
|
||||
free((genericptr_t)symhandling);
|
||||
symhandling = (char *)0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
set_symhandling(handling, rogueflag)
|
||||
char *handling;
|
||||
boolean rogueflag;
|
||||
{
|
||||
char *new_handling;
|
||||
|
||||
free_symhandling(rogueflag);
|
||||
if (!handling) return;
|
||||
new_handling = (char *)alloc(strlen(handling)+1);
|
||||
Strcpy(new_handling, handling);
|
||||
#ifdef REINCARNATION
|
||||
if (rogueflag)
|
||||
roguehandling = new_handling;
|
||||
#endif
|
||||
if (!rogueflag)
|
||||
symhandling = new_handling;
|
||||
}
|
||||
#endif /*ASCIIGRAPH*/
|
||||
|
||||
/* ---------- END CONFIG FILE HANDLING ----------- */
|
||||
|
||||
/* ---------- BEGIN SCOREBOARD CREATION ----------- */
|
||||
|
||||
10
src/invent.c
10
src/invent.c
@@ -806,7 +806,7 @@ register const char *let,*word;
|
||||
|
||||
if(allownone) *bp++ = '-';
|
||||
#ifndef GOLDOBJ
|
||||
if(allowgold) *bp++ = def_oc_syms[COIN_CLASS];
|
||||
if(allowgold) *bp++ = def_oc_syms[COIN_CLASS].sym;
|
||||
#endif
|
||||
if(bp > buf && bp[-1] == '-') *bp++ = ' ';
|
||||
ap = altlets;
|
||||
@@ -981,7 +981,7 @@ register const char *let,*word;
|
||||
if(ilet == '-') {
|
||||
return(allownone ? &zeroobj : (struct obj *) 0);
|
||||
}
|
||||
if(ilet == def_oc_syms[COIN_CLASS]) {
|
||||
if(ilet == def_oc_syms[COIN_CLASS].sym) {
|
||||
if (!usegold) {
|
||||
You("cannot %s gold.", word);
|
||||
return(struct obj *)0;
|
||||
@@ -1035,7 +1035,7 @@ register const char *let,*word;
|
||||
* counts for other things since the throw code will
|
||||
* split off a single item anyway */
|
||||
#ifdef GOLDOBJ
|
||||
if (ilet != def_oc_syms[COIN_CLASS])
|
||||
if (ilet != def_oc_syms[COIN_CLASS].sym)
|
||||
#endif
|
||||
allowcnt = 1;
|
||||
if(cnt == 0 && prezero) return((struct obj *)0);
|
||||
@@ -2101,8 +2101,8 @@ dotypeinv()
|
||||
if (!billx) *extra_types++ = 'x';
|
||||
*extra_types = '\0'; /* for index() */
|
||||
for (i = 0; i < MAXOCLASSES; i++)
|
||||
if (!index(types, def_oc_syms[i])) {
|
||||
*extra_types++ = def_oc_syms[i];
|
||||
if (!index(types, def_oc_syms[i].sym)) {
|
||||
*extra_types++ = def_oc_syms[i].sym;
|
||||
*extra_types = '\0';
|
||||
}
|
||||
|
||||
|
||||
@@ -1295,7 +1295,7 @@ rndmonst()
|
||||
if (tooweak(mndx, minmlev) || toostrong(mndx, maxmlev))
|
||||
continue;
|
||||
#ifdef REINCARNATION
|
||||
if (upper && !isupper(def_monsyms[(int)(ptr->mlet)])) continue;
|
||||
if (upper && !isupper(def_monsyms[(int)(ptr->mlet)].sym)) continue;
|
||||
#endif
|
||||
if (elemlevel && wrong_elem_type(ptr)) continue;
|
||||
if (uncommon(mndx)) continue;
|
||||
|
||||
@@ -50,10 +50,9 @@ int explcolors[] = {
|
||||
|
||||
#ifdef ROGUE_COLOR
|
||||
# if defined(USE_TILES) && defined(MSDOS)
|
||||
#define HAS_ROGUE_IBM_GRAPHICS (iflags.IBMgraphics && !iflags.grmode && \
|
||||
Is_rogue_level(&u.uz))
|
||||
#define HAS_ROGUE_IBM_GRAPHICS (ROGUEHANDLING("IBM") && !iflags.grmode)
|
||||
# else
|
||||
#define HAS_ROGUE_IBM_GRAPHICS (iflags.IBMgraphics && Is_rogue_level(&u.uz))
|
||||
#define HAS_ROGUE_IBM_GRAPHICS (ROGUEHANDLING("IBM"))
|
||||
# endif
|
||||
#endif
|
||||
|
||||
@@ -221,11 +220,7 @@ unsigned *ospecial;
|
||||
#ifdef TEXTCOLOR
|
||||
/* Turn off color if no color defined, or rogue level w/o PC graphics. */
|
||||
# ifdef REINCARNATION
|
||||
# ifdef ASCIIGRAPH
|
||||
if (!has_color(color) || (Is_rogue_level(&u.uz) && !has_rogue_ibm_graphics))
|
||||
# else
|
||||
if (!has_color(color) || Is_rogue_level(&u.uz))
|
||||
# endif
|
||||
# else
|
||||
if (!has_color(color))
|
||||
# endif
|
||||
|
||||
@@ -114,7 +114,7 @@ mkshop()
|
||||
return;
|
||||
}
|
||||
for(i=0; shtypes[i].name; i++)
|
||||
if(*ep == def_oc_syms[(int)shtypes[i].symb])
|
||||
if(*ep == def_oc_syms[(int)shtypes[i].symb].sym)
|
||||
goto gottype;
|
||||
if(*ep == 'g' || *ep == 'G')
|
||||
i = 0;
|
||||
|
||||
581
src/options.c
581
src/options.c
@@ -1,4 +1,4 @@
|
||||
/* SCCS Id: @(#)options.c 3.5 2006/07/08 */
|
||||
/* SCCS Id: @(#)options.c 3.5 2006/09/17 */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -18,6 +18,7 @@ NEARDATA struct instance_flags iflags; /* provide linkage */
|
||||
#include <ctype.h>
|
||||
#endif
|
||||
|
||||
#define BACKWARD_COMPAT
|
||||
#define WINTYPELEN 16
|
||||
|
||||
#ifdef DEFAULT_WC_TILED_MAP
|
||||
@@ -86,11 +87,6 @@ static struct Bool_Opt
|
||||
{"color", &iflags.wc_color, FALSE, SET_IN_GAME}, /*WC*/
|
||||
# endif
|
||||
{"confirm",&flags.confirm, TRUE, SET_IN_GAME},
|
||||
#if defined(TERMLIB) && !defined(MAC_GRAPHICS_ENV)
|
||||
{"DECgraphics", &iflags.DECgraphics, FALSE, SET_IN_GAME},
|
||||
#else
|
||||
{"DECgraphics", (boolean *)0, FALSE, SET_IN_FILE},
|
||||
#endif
|
||||
{"eight_bit_tty", &iflags.wc_eight_bit_input, FALSE, SET_IN_GAME}, /*WC*/
|
||||
#ifdef TTY_GRAPHICS
|
||||
{"extmenu", &iflags.extmenu, FALSE, SET_IN_GAME},
|
||||
@@ -112,11 +108,6 @@ static struct Bool_Opt
|
||||
{"fullscreen", &iflags.wc2_fullscreen, FALSE, SET_IN_FILE},
|
||||
{"help", &flags.help, TRUE, SET_IN_GAME},
|
||||
{"hilite_pet", &iflags.wc_hilite_pet, FALSE, SET_IN_GAME}, /*WC*/
|
||||
#ifdef ASCIIGRAPH
|
||||
{"IBMgraphics", &iflags.IBMgraphics, FALSE, SET_IN_GAME},
|
||||
#else
|
||||
{"IBMgraphics", (boolean *)0, FALSE, SET_IN_FILE},
|
||||
#endif
|
||||
#ifndef MAC
|
||||
{"ignintr", &flags.ignintr, FALSE, SET_IN_GAME},
|
||||
#else
|
||||
@@ -126,11 +117,6 @@ static struct Bool_Opt
|
||||
{"legacy", &flags.legacy, TRUE, DISP_IN_GAME},
|
||||
{"lit_corridor", &flags.lit_corridor, FALSE, SET_IN_GAME},
|
||||
{"lootabc", &flags.lootabc, FALSE, SET_IN_GAME},
|
||||
#ifdef MAC_GRAPHICS_ENV
|
||||
{"Macgraphics", &iflags.MACgraphics, TRUE, SET_IN_GAME},
|
||||
#else
|
||||
{"Macgraphics", (boolean *)0, FALSE, SET_IN_FILE},
|
||||
#endif
|
||||
#ifdef MAIL
|
||||
{"mail", &flags.biff, TRUE, SET_IN_GAME},
|
||||
#else
|
||||
@@ -245,8 +231,10 @@ static struct Comp_Opt
|
||||
{ "align_message", "message window alignment", 20, DISP_IN_GAME }, /*WC*/
|
||||
{ "align_status", "status window alignment", 20, DISP_IN_GAME }, /*WC*/
|
||||
{ "altkeyhandler", "alternate key handler", 20, DISP_IN_GAME },
|
||||
{ "boulder", "the symbol to use for displaying boulders",
|
||||
1, SET_IN_GAME },
|
||||
#ifdef BACKWARD_COMPAT
|
||||
{ "boulder", "deprecated (use S_boulder in sym file instead)",
|
||||
1, SET_IN_FILE },
|
||||
#endif
|
||||
{ "catname", "the name of your (first) cat (e.g., catname:Tabby)",
|
||||
PL_PSIZ, DISP_IN_GAME },
|
||||
{ "disclose", "the kinds of information to disclose at end of game",
|
||||
@@ -344,6 +332,13 @@ static struct Comp_Opt
|
||||
{ "scroll_margin", "scroll map when this far from the edge", 20, DISP_IN_GAME }, /*WC*/
|
||||
#ifdef MSDOS
|
||||
{ "soundcard", "type of sound card to use", 20, SET_IN_FILE },
|
||||
#endif
|
||||
{ "symset", "load a set of display symbols from the symbols file", 70, SET_IN_GAME },
|
||||
{ "roguesymset", "load a set of rogue display symbols from the roguesym file", 70,
|
||||
#ifdef REINCARNATION
|
||||
SET_IN_GAME },
|
||||
#else
|
||||
SET_IN_FILE },
|
||||
#endif
|
||||
{ "suppress_alert", "suppress alerts about version-specific features",
|
||||
8, SET_IN_GAME },
|
||||
@@ -368,6 +363,13 @@ static struct Comp_Opt
|
||||
{ "windowcolors", "the foreground/background colors of windows", /*WC*/
|
||||
80, DISP_IN_GAME },
|
||||
{ "windowtype", "windowing system to use", WINTYPELEN, DISP_IN_GAME },
|
||||
#ifdef BACKWARD_COMPAT
|
||||
{"DECgraphics", "deprecated", 70, SET_IN_FILE},
|
||||
{"IBMgraphics", "deprecated", 70, SET_IN_FILE},
|
||||
# ifdef MAC_GRAPHICS_ENV
|
||||
{"Macgraphics", "deprecated", 70, SET_IN_FILE},
|
||||
# endif
|
||||
#endif
|
||||
{ (char *)0, (char *)0, 0, 0 }
|
||||
};
|
||||
|
||||
@@ -580,15 +582,12 @@ initoptions()
|
||||
flags.initgend = -1;
|
||||
flags.initalign = -1;
|
||||
|
||||
/* Set the default monster and object class symbols. Don't use */
|
||||
/* memcpy() --- sizeof char != sizeof uchar on some machines. */
|
||||
for (i = 0; i < MAXOCLASSES; i++)
|
||||
oc_syms[i] = (uchar) def_oc_syms[i];
|
||||
for (i = 0; i < MAXMCLASSES; i++)
|
||||
monsyms[i] = (uchar) def_monsyms[i];
|
||||
/* Set the default monster and object class symbols. */
|
||||
init_symbols();
|
||||
for (i = 0; i < WARNCOUNT; i++)
|
||||
warnsyms[i] = def_warnsyms[i].sym;
|
||||
iflags.bouldersym = 0;
|
||||
|
||||
iflags.travelcc.x = iflags.travelcc.y = -1;
|
||||
|
||||
/* assert( sizeof flags.inv_order == sizeof def_inv_order ); */
|
||||
@@ -599,7 +598,7 @@ initoptions()
|
||||
|
||||
for (i = 0; i < NUM_DISCLOSURE_OPTIONS; i++)
|
||||
flags.end_disclose[i] = DISCLOSE_PROMPT_DEFAULT_NO;
|
||||
switch_graphics(ASCII_GRAPHICS); /* set default characters */
|
||||
switch_graphics(DEFAULT_GRAPHICS); /* set default characters */
|
||||
#if defined(UNIX) && defined(TTY_GRAPHICS)
|
||||
/*
|
||||
* Set defaults for some options depending on what we can
|
||||
@@ -610,7 +609,13 @@ initoptions()
|
||||
*/
|
||||
/* this detects the IBM-compatible console on most 386 boxes */
|
||||
if ((opts = nh_getenv("TERM")) && !strncmp(opts, "AT", 2)) {
|
||||
switch_graphics(IBM_GRAPHICS);
|
||||
#ifdef ASCIIGRAPH
|
||||
if (!symset) load_symset("IBMGraphics", FALSE);
|
||||
|
||||
if (!roguesymset) load_symset("IBMGraphics", TRUE);
|
||||
|
||||
switch_graphics(TRUE);
|
||||
#endif
|
||||
# ifdef TEXTCOLOR
|
||||
iflags.use_color = TRUE;
|
||||
# endif
|
||||
@@ -622,13 +627,20 @@ initoptions()
|
||||
if ((opts = nh_getenv("TERM")) &&
|
||||
!strncmpi(opts, "vt", 2) && AS && AE &&
|
||||
index(AS, '\016') && index(AE, '\017')) {
|
||||
switch_graphics(DEC_GRAPHICS);
|
||||
# ifdef ASCIIGRAPH
|
||||
if (!symset) load_symset("DECGraphics", FALSE);
|
||||
|
||||
|
||||
|
||||
switch_graphics(TRUE);
|
||||
# endif /*ASCIIGRAPH*/
|
||||
}
|
||||
# endif
|
||||
#endif /* UNIX || VMS */
|
||||
|
||||
#ifdef MAC_GRAPHICS_ENV
|
||||
switch_graphics(MAC_GRAPHICS);
|
||||
if (!symset) load_symset("MACGraphics", FALSE);
|
||||
switch_graphics(TRUE);
|
||||
#endif /* MAC_GRAPHICS_ENV */
|
||||
flags.menu_style = MENU_FULL;
|
||||
|
||||
@@ -866,27 +878,6 @@ char *op;
|
||||
return 1;
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
graphics_opts(opts, optype, maxlen, offset)
|
||||
register char *opts;
|
||||
const char *optype;
|
||||
int maxlen, offset;
|
||||
{
|
||||
uchar translate[MAXPCHARS+1];
|
||||
int length, i;
|
||||
|
||||
if (!(opts = string_for_env_opt(optype, opts, FALSE)))
|
||||
return;
|
||||
escapes(opts, opts);
|
||||
|
||||
length = strlen(opts);
|
||||
if (length > maxlen) length = maxlen;
|
||||
/* match the form obtained from PC configuration files */
|
||||
for (i = 0; i < length; i++)
|
||||
translate[i] = (uchar) opts[i];
|
||||
assign_graphics(translate, length, maxlen, offset);
|
||||
}
|
||||
|
||||
STATIC_OVL void
|
||||
warning_opts(opts, optype)
|
||||
register char *opts;
|
||||
@@ -1305,6 +1296,49 @@ boolean tinitial, tfrom_file;
|
||||
return;
|
||||
}
|
||||
|
||||
fullname = "roguesymset";
|
||||
if (match_optname(opts, fullname, 7, TRUE)) {
|
||||
#if defined(REINCARNATION) && defined(ASCIIGRAPH)
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (negated) bad_negation(fullname, FALSE);
|
||||
else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
roguesymset = (char *)alloc(strlen(op) + 1);
|
||||
Strcpy(roguesymset, op);
|
||||
if (!read_sym_file(TRUE)) {
|
||||
badoption(opts);
|
||||
free((char *)roguesymset);
|
||||
roguesymset = (char *)0;
|
||||
} else {
|
||||
if (!initial && Is_rogue_level(&u.uz))
|
||||
assign_rogue_graphics(TRUE);
|
||||
need_redraw = TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
fullname = "symset";
|
||||
if (match_optname(opts, fullname, 6, TRUE)) {
|
||||
#ifdef ASCIIGRAPH
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (negated) bad_negation(fullname, FALSE);
|
||||
else if ((op = string_for_opt(opts, FALSE)) != 0) {
|
||||
symset = (char *)alloc(strlen(op) + 1);
|
||||
Strcpy(symset, op);
|
||||
if (!read_sym_file(FALSE)) {
|
||||
badoption(opts);
|
||||
free((char *)symset);
|
||||
symset = (char *)0;
|
||||
} else {
|
||||
switch_graphics(TRUE);
|
||||
need_redraw = TRUE;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
return;
|
||||
}
|
||||
|
||||
fullname = "runmode";
|
||||
if (match_optname(opts, fullname, 4, TRUE)) {
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
@@ -1566,93 +1600,6 @@ goodfruit:
|
||||
*/
|
||||
return;
|
||||
}
|
||||
|
||||
/* graphics:string */
|
||||
fullname = "graphics";
|
||||
if (match_optname(opts, fullname, 2, TRUE)) {
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (negated) bad_negation(fullname, FALSE);
|
||||
else graphics_opts(opts, fullname, MAXPCHARS, 0);
|
||||
return;
|
||||
}
|
||||
fullname = "dungeon";
|
||||
if (match_optname(opts, fullname, 2, TRUE)) {
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (negated) bad_negation(fullname, FALSE);
|
||||
else graphics_opts(opts, fullname, MAXDCHARS, 0);
|
||||
return;
|
||||
}
|
||||
fullname = "traps";
|
||||
if (match_optname(opts, fullname, 2, TRUE)) {
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (negated) bad_negation(fullname, FALSE);
|
||||
else graphics_opts(opts, fullname, MAXTCHARS, MAXDCHARS);
|
||||
return;
|
||||
}
|
||||
fullname = "effects";
|
||||
if (match_optname(opts, fullname, 2, TRUE)) {
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (negated) bad_negation(fullname, FALSE);
|
||||
else
|
||||
graphics_opts(opts, fullname, MAXECHARS, MAXDCHARS+MAXTCHARS);
|
||||
return;
|
||||
}
|
||||
|
||||
/* objects:string */
|
||||
fullname = "objects";
|
||||
if (match_optname(opts, fullname, 7, TRUE)) {
|
||||
int length;
|
||||
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return;
|
||||
}
|
||||
if (!(opts = string_for_env_opt(fullname, opts, FALSE)))
|
||||
return;
|
||||
escapes(opts, opts);
|
||||
|
||||
/*
|
||||
* Override the default object class symbols. The first
|
||||
* object in the object class is the "random object". I
|
||||
* don't want to use 0 as an object class, so the "random
|
||||
* object" is basically a place holder.
|
||||
*
|
||||
* The object class symbols have already been initialized in
|
||||
* initoptions().
|
||||
*/
|
||||
length = strlen(opts);
|
||||
if (length >= MAXOCLASSES)
|
||||
length = MAXOCLASSES-1; /* don't count RANDOM_OBJECT */
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
oc_syms[i+1] = (uchar) opts[i];
|
||||
return;
|
||||
}
|
||||
|
||||
/* monsters:string */
|
||||
fullname = "monsters";
|
||||
if (match_optname(opts, fullname, 8, TRUE)) {
|
||||
int length;
|
||||
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (negated) {
|
||||
bad_negation(fullname, FALSE);
|
||||
return;
|
||||
}
|
||||
if (!(opts = string_for_env_opt(fullname, opts, FALSE)))
|
||||
return;
|
||||
escapes(opts, opts);
|
||||
|
||||
/* Override default mon class symbols set in initoptions(). */
|
||||
length = strlen(opts);
|
||||
if (length >= MAXMCLASSES)
|
||||
length = MAXMCLASSES-1; /* mon class 0 unused */
|
||||
|
||||
for (i = 0; i < length; i++)
|
||||
monsyms[i+1] = (uchar) opts[i];
|
||||
return;
|
||||
}
|
||||
fullname = "warnings";
|
||||
if (match_optname(opts, fullname, 5, TRUE)) {
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
@@ -1660,6 +1607,7 @@ goodfruit:
|
||||
else warning_opts(opts, fullname);
|
||||
return;
|
||||
}
|
||||
#ifdef BACKWARD_COMPAT
|
||||
/* boulder:symbol */
|
||||
fullname = "boulder";
|
||||
if (match_optname(opts, fullname, 7, TRUE)) {
|
||||
@@ -1692,6 +1640,7 @@ goodfruit:
|
||||
if (!initial) need_redraw = TRUE;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* name:string */
|
||||
fullname = "name";
|
||||
@@ -2301,7 +2250,7 @@ goodfruit:
|
||||
isbad = TRUE;
|
||||
else /* reject default object class symbols */
|
||||
for (j = 1; j < MAXOCLASSES; j++)
|
||||
if (c == def_oc_syms[i]) {
|
||||
if (c == def_oc_syms[i].sym) {
|
||||
isbad = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -2331,20 +2280,102 @@ goodfruit:
|
||||
badoption(opts);
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ASCIIGRAPH
|
||||
# if defined(BACKWARD_COMPAT)
|
||||
fullname = "DECgraphics";
|
||||
if (match_optname(opts, fullname, 10, TRUE)) {
|
||||
boolean badflag = FALSE;
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (!negated) {
|
||||
if (symset) badflag = TRUE;
|
||||
else {
|
||||
symset = (char *)alloc(strlen(fullname) + 1);
|
||||
Strcpy(symset, fullname);
|
||||
if (!read_sym_file(FALSE)) {
|
||||
badflag = TRUE;
|
||||
free((char *)symset);
|
||||
symset = (char *)0;
|
||||
} else switch_graphics(TRUE);
|
||||
}
|
||||
if (badflag) {
|
||||
pline("Failure to load symbol set %s.",
|
||||
fullname);
|
||||
wait_synch();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
fullname = "IBMgraphics";
|
||||
if (match_optname(opts, fullname, 10, TRUE)) {
|
||||
boolean badflag = FALSE;
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (!negated) {
|
||||
if (symset) badflag = TRUE;
|
||||
else {
|
||||
symset = (char *)alloc(strlen(fullname) + 1);
|
||||
Strcpy(symset, fullname);
|
||||
if (!read_sym_file(FALSE)) {
|
||||
badflag = TRUE;
|
||||
free((char *)symset);
|
||||
symset = (char *)0;
|
||||
} else switch_graphics(TRUE);
|
||||
}
|
||||
#ifdef REINCARNATION
|
||||
if (roguesymset) badflag = TRUE;
|
||||
else {
|
||||
roguesymset = (char *)alloc(strlen(fullname) + 1);
|
||||
Strcpy(roguesymset, fullname);
|
||||
if (!read_sym_file(TRUE)) {
|
||||
badflag = TRUE;
|
||||
free((char *)roguesymset);
|
||||
roguesymset = (char *)0;
|
||||
}
|
||||
if (!initial && Is_rogue_level(&u.uz))
|
||||
assign_rogue_graphics(TRUE);
|
||||
}
|
||||
#endif
|
||||
if (badflag) {
|
||||
pline("Failure to load symbol set %s.",
|
||||
fullname);
|
||||
wait_synch();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
# ifdef MAC_GRAPHICS_ENV
|
||||
fullname = "MACgraphics";
|
||||
if (match_optname(opts, fullname, 11, TRUE)) {
|
||||
boolean badflag = FALSE;
|
||||
if (duplicate) complain_about_duplicate(opts,1);
|
||||
if (!negated) {
|
||||
if (symset) badflag = TRUE;
|
||||
else {
|
||||
symset = (char *)alloc(strlen(fullname) + 1);
|
||||
Strcpy(symset, fullname);
|
||||
if (!read_sym_file(FALSE)) {
|
||||
badflag = TRUE;
|
||||
free((char *)symset);
|
||||
symset = (char *)0;
|
||||
} else switch_graphics(TRUE);
|
||||
}
|
||||
if (badflag) {
|
||||
pline("Failure to load symbol set %s.",
|
||||
fullname);
|
||||
wait_synch();
|
||||
}
|
||||
}
|
||||
return;
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
/* OK, if we still haven't recognized the option, check the boolean
|
||||
* options list
|
||||
*/
|
||||
for (i = 0; boolopt[i].name; i++) {
|
||||
if (match_optname(opts, boolopt[i].name, 3, FALSE)) {
|
||||
#if defined(TERMLIB) || defined(ASCIIGRAPH) || defined(MAC_GRAPHICS_ENV)
|
||||
/* need to remember previous XXXgraphics setting
|
||||
in order to prevent explicit "noXXXgraphics" from
|
||||
overriding a preceding "YYYgraphics" request;
|
||||
noXXXgraphics will reset to ordinary ASCII only
|
||||
if/when XXXgraphics is currently in effect */
|
||||
boolean old_gfx = boolopt[i].addr && *boolopt[i].addr;
|
||||
#endif
|
||||
|
||||
/* options that don't exist */
|
||||
if (!boolopt[i].addr) {
|
||||
@@ -2365,50 +2396,6 @@ goodfruit:
|
||||
if (duplicate_opt_detection(boolopt[i].name, 0))
|
||||
complain_about_duplicate(boolopt[i].name,0);
|
||||
|
||||
#if defined(TERMLIB) || defined(ASCIIGRAPH) || defined(MAC_GRAPHICS_ENV)
|
||||
if (FALSE
|
||||
# ifdef TERMLIB
|
||||
|| (boolopt[i].addr) == &iflags.DECgraphics
|
||||
# endif
|
||||
# ifdef ASCIIGRAPH
|
||||
|| (boolopt[i].addr) == &iflags.IBMgraphics
|
||||
# endif
|
||||
# ifdef MAC_GRAPHICS_ENV
|
||||
|| (boolopt[i].addr) == &iflags.MACgraphics
|
||||
# endif
|
||||
) {
|
||||
# ifdef REINCARNATION
|
||||
if (!initial && Is_rogue_level(&u.uz))
|
||||
assign_rogue_graphics(FALSE);
|
||||
# endif
|
||||
need_redraw = TRUE;
|
||||
# ifdef TERMLIB
|
||||
if ((boolopt[i].addr) == &iflags.DECgraphics) {
|
||||
if (iflags.DECgraphics != old_gfx)
|
||||
switch_graphics(iflags.DECgraphics ?
|
||||
DEC_GRAPHICS : ASCII_GRAPHICS);
|
||||
}
|
||||
# endif
|
||||
# ifdef ASCIIGRAPH
|
||||
if ((boolopt[i].addr) == &iflags.IBMgraphics) {
|
||||
if (iflags.IBMgraphics != old_gfx)
|
||||
switch_graphics(!negated ?
|
||||
IBM_GRAPHICS : ASCII_GRAPHICS);
|
||||
}
|
||||
# endif
|
||||
# ifdef MAC_GRAPHICS_ENV
|
||||
if ((boolopt[i].addr) == &iflags.MACgraphics) {
|
||||
if (iflags.MACgraphics != old_gfx)
|
||||
switch_graphics(iflags.MACgraphics ?
|
||||
MAC_GRAPHICS : ASCII_GRAPHICS);
|
||||
}
|
||||
# endif
|
||||
# ifdef REINCARNATION
|
||||
if (!initial && Is_rogue_level(&u.uz))
|
||||
assign_rogue_graphics(TRUE);
|
||||
# endif
|
||||
}
|
||||
#endif /* TERMLIB || ASCIIGRAPH || MAC_GRAPHICS_ENV */
|
||||
#ifdef RLECOMP
|
||||
if ((boolopt[i].addr) == &iflags.rlecomp) {
|
||||
if (*boolopt[i].addr)
|
||||
@@ -2517,7 +2504,7 @@ oc_to_str(src,dest)
|
||||
if (i < 0 || i >= MAXOCLASSES)
|
||||
impossible("oc_to_str: illegal object class %d", i);
|
||||
else
|
||||
*dest++ = def_oc_syms[i];
|
||||
*dest++ = def_oc_syms[i].sym;
|
||||
}
|
||||
*dest = '\0';
|
||||
}
|
||||
@@ -2791,6 +2778,8 @@ doset()
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct textlist *symset_list; /* files.c will populate this wil list of available sets */
|
||||
|
||||
STATIC_OVL boolean
|
||||
special_handling(optname, setinitial, setfromfile)
|
||||
const char *optname;
|
||||
@@ -3148,6 +3137,102 @@ boolean setinitial,setfromfile;
|
||||
if (pick_cnt >= 0) goto ape_again;
|
||||
}
|
||||
#endif /* AUTOPICKUP_EXCEPTIONS */
|
||||
#ifdef ASCIIGRAPH
|
||||
} else if (!strcmp("symset", optname) ||
|
||||
!strcmp("roguesymset", optname)) {
|
||||
menu_item *symset_pick = (menu_item *)0;
|
||||
boolean rogueflag = (*optname == 'r');
|
||||
char *symset_name;
|
||||
int chosen = -2;
|
||||
|
||||
/* clear symset/roguesymset as a flag to read_sym_file() to build list */
|
||||
if (!rogueflag) {
|
||||
symset_name = symset;
|
||||
symset = (char *)0;
|
||||
}
|
||||
#ifdef REINCARNATION
|
||||
if (rogueflag) {
|
||||
symset_name = roguesymset;
|
||||
roguesymset = (char *)0;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (read_sym_file(rogueflag) && symset_list) {
|
||||
int let = 'a';
|
||||
struct textlist *sl;
|
||||
tmpwin = create_nhwindow(NHW_MENU);
|
||||
start_menu(tmpwin);
|
||||
any.a_int = 1;
|
||||
add_menu(tmpwin, NO_GLYPH, &any, let++, 0,
|
||||
ATR_NONE, "NetHack default", MENU_UNSELECTED);
|
||||
sl = symset_list;
|
||||
while (sl) {
|
||||
if (sl->text) {
|
||||
any.a_int = sl->idx + 2;
|
||||
add_menu(tmpwin, NO_GLYPH, &any, let, 0,
|
||||
ATR_NONE, sl->text, MENU_UNSELECTED);
|
||||
sl = sl->next;
|
||||
if (let == 'z') let = 'A';
|
||||
else let++;
|
||||
}
|
||||
}
|
||||
end_menu(tmpwin, "Select symbol set:");
|
||||
if (select_menu(tmpwin, PICK_ONE, &symset_pick) > 0) {
|
||||
chosen = symset_pick->item.a_int - 2;
|
||||
free((genericptr_t)symset_pick);
|
||||
}
|
||||
destroy_nhwindow(tmpwin);
|
||||
if (chosen > -1) {
|
||||
sl = symset_list;
|
||||
while (sl) {
|
||||
if (sl->idx == chosen) {
|
||||
if (symset_name)
|
||||
free((genericptr_t)symset_name);
|
||||
symset_name = (char *)alloc(strlen(sl->text)+1);
|
||||
Strcpy(symset_name, sl->text);
|
||||
}
|
||||
sl = sl->next;
|
||||
}
|
||||
}
|
||||
/* clean up */
|
||||
while (symset_list) {
|
||||
sl = symset_list;
|
||||
if (sl->text) free((genericptr_t)sl->text);
|
||||
symset_list = sl->next;
|
||||
free((genericptr_t)sl);
|
||||
}
|
||||
symset_list = (struct textlist *)0;
|
||||
}
|
||||
if(!rogueflag) {
|
||||
init_l_symbols();
|
||||
if (chosen >= 0) {
|
||||
symset = symset_name;
|
||||
if (!read_sym_file(FALSE)) {
|
||||
free((genericptr_t)symset);
|
||||
symset = (char *)0;
|
||||
}
|
||||
}
|
||||
}
|
||||
# ifdef REINCARNATION
|
||||
if (rogueflag) {
|
||||
init_r_symbols();
|
||||
if (chosen >= 0) {
|
||||
roguesymset = symset_name;
|
||||
if (!read_sym_file(TRUE)) {
|
||||
free((genericptr_t)roguesymset);
|
||||
roguesymset = (char *)0;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (Is_rogue_level(&u.uz))
|
||||
assign_rogue_graphics(TRUE);
|
||||
else
|
||||
assign_rogue_graphics(FALSE);
|
||||
#else
|
||||
switch_graphics(TRUE);
|
||||
# endif
|
||||
need_redraw = TRUE;
|
||||
#endif /*ASCIIGRAPH*/
|
||||
} else {
|
||||
/* didn't match any of the special options */
|
||||
return FALSE;
|
||||
@@ -3192,9 +3277,11 @@ char *buf;
|
||||
Sprintf(buf, "%s", iflags.altkeyhandler[0] ?
|
||||
iflags.altkeyhandler : "default");
|
||||
#endif
|
||||
#ifdef BACKWARD_COMPAT
|
||||
else if (!strcmp(optname, "boulder"))
|
||||
Sprintf(buf, "%c", iflags.bouldersym ?
|
||||
iflags.bouldersym : oc_syms[(int)objects[BOULDER].oc_class]);
|
||||
#endif
|
||||
else if (!strcmp(optname, "catname"))
|
||||
Sprintf(buf, "%s", catname[0] ? catname : none );
|
||||
else if (!strcmp(optname, "disclose")) {
|
||||
@@ -3343,6 +3430,10 @@ char *buf;
|
||||
}
|
||||
else if (!strcmp(optname, "race"))
|
||||
Sprintf(buf, "%s", rolestring(flags.initrace, races, noun));
|
||||
#ifdef REINCARNATION
|
||||
else if (!strcmp(optname, "roguesymset"))
|
||||
Sprintf(buf, "%s", roguesymset ? roguesymset : "default");
|
||||
#endif
|
||||
else if (!strcmp(optname, "role"))
|
||||
Sprintf(buf, "%s", rolestring(flags.initrole, roles, name.m));
|
||||
else if (!strcmp(optname, "runmode"))
|
||||
@@ -3374,6 +3465,8 @@ char *buf;
|
||||
FEATURE_NOTICE_VER_MIN,
|
||||
FEATURE_NOTICE_VER_PATCH);
|
||||
}
|
||||
else if (!strcmp(optname, "symset"))
|
||||
Sprintf(buf, "%s", symset ? symset : "default");
|
||||
else if (!strcmp(optname, "tile_file"))
|
||||
Sprintf(buf, "%s", iflags.wc_tile_file ? iflags.wc_tile_file : defopt);
|
||||
else if (!strcmp(optname, "tile_height")) {
|
||||
@@ -3548,6 +3641,110 @@ free_autopickup_exceptions()
|
||||
}
|
||||
}
|
||||
#endif /* AUTOPICKUP_EXCEPTIONS */
|
||||
#ifdef ASCIIGRAPH
|
||||
/* bundle some common usage into one easy-to-use routine */
|
||||
int
|
||||
load_symset(s, rogueflag)
|
||||
const char *s;
|
||||
boolean rogueflag;
|
||||
{
|
||||
#ifdef REINCARNATION
|
||||
if (rogueflag) {
|
||||
if (roguesymset) free((genericptr_t)roguesymset);
|
||||
roguesymset = (char *)alloc(strlen(s)+1);
|
||||
Strcpy(roguesymset,s);
|
||||
if (read_sym_file(TRUE))
|
||||
switch_graphics(TRUE);
|
||||
else {
|
||||
free((genericptr_t)roguesymset);
|
||||
roguesymset = (char *)0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (!rogueflag) {
|
||||
if (symset) free((genericptr_t)symset);
|
||||
symset = (char *)alloc(strlen(s)+1);
|
||||
Strcpy(symset,s);
|
||||
if (read_sym_file(FALSE))
|
||||
switch_graphics(TRUE);
|
||||
else {
|
||||
free((genericptr_t)symset);
|
||||
symset = (char *)0;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Parse the value of a SYMBOLS line from a config file */
|
||||
void
|
||||
parsesymbols(opts)
|
||||
register char *opts;
|
||||
{
|
||||
int val;
|
||||
char *op, *symname, *strval, *p;
|
||||
struct symparse *symp;
|
||||
|
||||
if ((op = index(opts, ',')) != 0) {
|
||||
*op++ = 0;
|
||||
parsesymbols(op);
|
||||
}
|
||||
|
||||
/* S_sample:string */
|
||||
symname = opts;
|
||||
strval = index(opts, ':');
|
||||
if (!symname || !strval) return;
|
||||
*strval++ = 0;
|
||||
|
||||
/* strip leading and trailing white space from symname */
|
||||
while (isspace(*symname)) symname++;
|
||||
p = eos(symname);
|
||||
while (--p >= symname && isspace(*p)) *p = '\0';
|
||||
|
||||
/* strip leading and trailing white space from strval */
|
||||
while (isspace(*strval)) strval++;
|
||||
p = eos(strval);
|
||||
while (--p >= strval && isspace(*p)) *p = '\0';
|
||||
|
||||
symp = match_sym(symname);
|
||||
if (!symp) return;
|
||||
|
||||
if (symp->range && symp->range != SYM_CONTROL) {
|
||||
val = sym_val(strval);
|
||||
update_l_symset(symp, val);
|
||||
}
|
||||
}
|
||||
|
||||
struct symparse *
|
||||
match_sym(buf)
|
||||
char *buf;
|
||||
{
|
||||
size_t len = strlen(buf);
|
||||
const char *p = index(buf, ':'),
|
||||
*q = index(buf, '=');
|
||||
struct symparse *sp = loadsyms;
|
||||
|
||||
if (!p || (q && q < p)) p = q;
|
||||
while(p && p > buf && isspace(*(p-1))) p--;
|
||||
if (p) len = (int)(p - buf);
|
||||
while(sp->range) {
|
||||
if ((len >= strlen(sp->name)) && !strncmpi(buf, sp->name, len))
|
||||
return sp;
|
||||
sp++;
|
||||
}
|
||||
return (struct symparse *)0;
|
||||
}
|
||||
|
||||
int sym_val(strval)
|
||||
char *strval;
|
||||
{
|
||||
char buf[QBUFSZ];
|
||||
buf[0] = '\0';
|
||||
escapes(strval, buf);
|
||||
return (int)*buf;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* data for option_help() */
|
||||
static const char *opt_intro[] = {
|
||||
@@ -3792,12 +3989,12 @@ char *class_select;
|
||||
selected = FALSE;
|
||||
switch (category) {
|
||||
case 0:
|
||||
text = monexplain[def_char_to_monclass(*class_list)];
|
||||
text = def_monsyms[def_char_to_monclass(*class_list)].explain;
|
||||
accelerator = *class_list;
|
||||
Sprintf(buf, "%s", text);
|
||||
break;
|
||||
case 1:
|
||||
text = objexplain[def_char_to_objclass(*class_list)];
|
||||
text = def_oc_syms[def_char_to_objclass(*class_list)].explain;
|
||||
accelerator = next_accelerator;
|
||||
Sprintf(buf, "%c %s", *class_list, text);
|
||||
break;
|
||||
|
||||
22
src/pager.c
22
src/pager.c
@@ -573,15 +573,15 @@ do_look(mode, click_cc)
|
||||
|
||||
/* Check for monsters */
|
||||
for (i = 0; i < MAXMCLASSES; i++) {
|
||||
if (sym == ((from_screen || clicklook) ? monsyms[i] : def_monsyms[i]) &&
|
||||
monexplain[i]) {
|
||||
if (sym == ((from_screen || clicklook) ? monsyms[i] : def_monsyms[i].sym) &&
|
||||
def_monsyms[i].explain) {
|
||||
need_to_look = TRUE;
|
||||
if (!found) {
|
||||
Sprintf(out_str, "%c %s", sym, an(monexplain[i]));
|
||||
firstmatch = monexplain[i];
|
||||
Sprintf(out_str, "%c %s", sym, an(def_monsyms[i].explain));
|
||||
firstmatch = def_monsyms[i].explain;
|
||||
found++;
|
||||
} else {
|
||||
found += append_str(out_str, an(monexplain[i]));
|
||||
found += append_str(out_str, an(def_monsyms[i].explain));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -590,7 +590,7 @@ do_look(mode, click_cc)
|
||||
symbol; firstmatch is assumed to already be set for '@' */
|
||||
if (((from_screen || clicklook) ?
|
||||
(sym == monsyms[S_HUMAN] && cc.x == u.ux && cc.y == u.uy) :
|
||||
(sym == def_monsyms[S_HUMAN] && !flags.showrace)) &&
|
||||
(sym == def_monsyms[S_HUMAN].sym && !flags.showrace)) &&
|
||||
!(Race_if(PM_HUMAN) || Race_if(PM_ELF)) && !Upolyd)
|
||||
found += append_str(out_str, "you"); /* tack on "or you" */
|
||||
|
||||
@@ -611,18 +611,18 @@ do_look(mode, click_cc)
|
||||
|
||||
/* Now check for objects */
|
||||
for (i = 1; i < MAXOCLASSES; i++) {
|
||||
if (sym == ((from_screen || clicklook) ? oc_syms[i] : def_oc_syms[i])) {
|
||||
if (sym == ((from_screen || clicklook) ? oc_syms[i] : def_oc_syms[i].sym)) {
|
||||
need_to_look = TRUE;
|
||||
if ((from_screen || clicklook) && i == VENOM_CLASS) {
|
||||
skipped_venom++;
|
||||
continue;
|
||||
}
|
||||
if (!found) {
|
||||
Sprintf(out_str, "%c %s", sym, an(objexplain[i]));
|
||||
firstmatch = objexplain[i];
|
||||
Sprintf(out_str, "%c %s", sym, an(def_oc_syms[i].explain));
|
||||
firstmatch = def_oc_syms[i].explain;
|
||||
found++;
|
||||
} else {
|
||||
found += append_str(out_str, an(objexplain[i]));
|
||||
found += append_str(out_str, an(def_oc_syms[i].explain));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -697,7 +697,7 @@ do_look(mode, click_cc)
|
||||
|
||||
/* if we ignored venom and list turned out to be short, put it back */
|
||||
if (skipped_venom && found < 2) {
|
||||
x_str = objexplain[VENOM_CLASS];
|
||||
x_str = def_oc_syms[VENOM_CLASS].explain;
|
||||
if (!found) {
|
||||
Sprintf(out_str, "%c %s", sym, an(x_str));
|
||||
firstmatch = x_str;
|
||||
|
||||
@@ -119,11 +119,11 @@ int *itemcount;
|
||||
*itemcount = 0;
|
||||
#ifndef GOLDOBJ
|
||||
if (incl_gold)
|
||||
ilets[iletct++] = def_oc_syms[COIN_CLASS];
|
||||
ilets[iletct++] = def_oc_syms[COIN_CLASS].sym;
|
||||
#endif
|
||||
ilets[iletct] = '\0'; /* terminate ilets so that index() will work */
|
||||
while (otmp) {
|
||||
c = def_oc_syms[(int)otmp->oclass];
|
||||
c = def_oc_syms[(int)otmp->oclass].sym;
|
||||
if (!index(ilets, c) && (!filter || (*filter)(otmp)))
|
||||
ilets[iletct++] = c, ilets[iletct] = '\0';
|
||||
*itemcount += 1;
|
||||
@@ -785,7 +785,7 @@ boolean FDECL((*allow), (OBJ_P));/* allow function */
|
||||
any.a_obj = curr;
|
||||
add_menu(win, obj_to_glyph(curr), &any,
|
||||
qflags & USE_INVLET ? curr->invlet : 0,
|
||||
def_oc_syms[(int)objects[curr->otyp].oc_class],
|
||||
def_oc_syms[(int)objects[curr->otyp].oc_class].sym,
|
||||
ATR_NONE, doname(curr), MENU_UNSELECTED);
|
||||
}
|
||||
}
|
||||
@@ -901,7 +901,7 @@ int how; /* type of query */
|
||||
any = zeroany;
|
||||
any.a_int = curr->oclass;
|
||||
add_menu(win, NO_GLYPH, &any, invlet++,
|
||||
def_oc_syms[(int)objects[curr->otyp].oc_class],
|
||||
def_oc_syms[(int)objects[curr->otyp].oc_class].sym,
|
||||
ATR_NONE, let_to_name(*pack, FALSE),
|
||||
MENU_UNSELECTED);
|
||||
collected_type_name = TRUE;
|
||||
|
||||
@@ -1612,7 +1612,7 @@ do_class_genocide()
|
||||
|
||||
if (strlen(buf) == 1) {
|
||||
if (buf[0] == ILLOBJ_SYM)
|
||||
buf[0] = def_monsyms[S_MIMIC];
|
||||
buf[0] = def_monsyms[S_MIMIC].sym;
|
||||
class = def_char_to_monclass(buf[0]);
|
||||
} else {
|
||||
char buf2[BUFSZ];
|
||||
@@ -1624,7 +1624,7 @@ do_class_genocide()
|
||||
immunecnt = gonecnt = goodcnt = 0;
|
||||
for (i = LOW_PM; i < NUMMONS; i++) {
|
||||
if (class == 0 &&
|
||||
strstri(monexplain[(int)mons[i].mlet], buf) != 0)
|
||||
strstri(def_monsyms[(int)mons[i].mlet].explain, buf) != 0)
|
||||
class = mons[i].mlet;
|
||||
if (mons[i].mlet == class) {
|
||||
if (!(mons[i].geno & G_GENO)) immunecnt++;
|
||||
|
||||
@@ -113,7 +113,7 @@ struct obj *obj;
|
||||
case P_NONE:
|
||||
/* not a weapon: use item class name; override "food" for corpses */
|
||||
descr = (obj->otyp == CORPSE) ? "corpse" :
|
||||
oclass_names[(int)obj->oclass];
|
||||
def_oc_syms[(int)obj->oclass].name;
|
||||
break;
|
||||
case P_SLING:
|
||||
if (is_ammo(obj))
|
||||
@@ -121,7 +121,7 @@ struct obj *obj;
|
||||
/* avoid "rock"; what about known glass? */
|
||||
(obj->oclass == GEM_CLASS) ? "gem" :
|
||||
/* in case somebody adds odd sling ammo */
|
||||
oclass_names[(int)obj->oclass];
|
||||
def_oc_syms[(int)obj->oclass].name;
|
||||
break;
|
||||
case P_BOW:
|
||||
if (is_ammo(obj)) descr = "arrow";
|
||||
|
||||
@@ -949,6 +949,7 @@ install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
|
||||
if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile
|
||||
! ENDIF
|
||||
copy $(SYS)\termcap $(GAMEDIR)
|
||||
if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR)
|
||||
if exist $(DOC)\guideb*.txt copy $(DOC)\guideb*.txt $(GAMEDIR)
|
||||
if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt
|
||||
if exist $(DOC)\recover.txt copy $(DOC)\recover.txt $(GAMEDIR)
|
||||
|
||||
@@ -448,6 +448,7 @@ ifdef TERMLIB
|
||||
@$(subst /,\,copy $(SSHR)/termcap $(GAMEDIR))
|
||||
endif
|
||||
@$(subst /,\,if exist $(DAT)/*.tib copy $(DAT)/*.tib $(GAMEDIR))
|
||||
@$(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR))
|
||||
@$(subst /,\,copy $(SSHR)/NetHack.cnf $(GAMEDIR)/defaults.nh)
|
||||
@$(subst /,\,copy $(MSYS)/NHAccess.nh $(GAMEDIR))
|
||||
@$(subst /,\,copy $(DOC)/guidebo*.txt $(GAMEDIR))
|
||||
|
||||
@@ -396,6 +396,7 @@ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
|
||||
copy $(DAT)\*.lev $(GAMEDIR)
|
||||
if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile
|
||||
! ENDIF
|
||||
if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR)
|
||||
copy $(SSHR)\termcap $(GAMEDIR)
|
||||
copy *.tib $(GAMEDIR)
|
||||
copy $(SSHR)\NetHack.cnf $(GAMEDIR)\defaults.nh
|
||||
|
||||
@@ -547,7 +547,7 @@ boolean on;
|
||||
{
|
||||
/* vga_HideCursor(); */
|
||||
if (on) {
|
||||
/* switch_graphics(ASCII_GRAPHICS); */
|
||||
/* switch_graphics(DEFAULT_GRAPHICS); */
|
||||
iflags.traditional_view = TRUE;
|
||||
clipx = 0;
|
||||
clipxmax = CO - 1;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
# The three options on this line should be used for most setups.
|
||||
# If your machine isn't very IBM-compatible, and NetHack doesn't work,
|
||||
# try commenting out this line.
|
||||
OPTIONS=rawio,BIOS,IBMgraphics
|
||||
OPTIONS=rawio,BIOS,symset:IBMGraphics_2,roguesymset:RogueEpyx
|
||||
|
||||
# To use VGA graphical tiles on an MS-DOS PC with VGA or better,uncomment
|
||||
# this:
|
||||
|
||||
@@ -299,7 +299,25 @@ char *argv[];
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
/* We do this early for MSDOS because there are several
|
||||
* display/tile related options that affect init_nhwindows()
|
||||
*/
|
||||
process_options(argc, argv);
|
||||
#endif
|
||||
|
||||
#if defined(MSDOS) || defined(WIN32)
|
||||
/* Player didn't specify any symbol set so use IBM defaults */
|
||||
if (!symset) {
|
||||
load_symset("IBMGraphics_2", FALSE);
|
||||
}
|
||||
# ifdef REINCARNATION
|
||||
if (!roguesymset) {
|
||||
load_symset("IBMepyx", TRUE);
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
init_nhwindows(&argc,argv);
|
||||
#else
|
||||
init_nhwindows(&argc,argv);
|
||||
@@ -529,13 +547,22 @@ char *argv[];
|
||||
#ifndef AMIGA
|
||||
case 'I':
|
||||
case 'i':
|
||||
if (!strncmpi(argv[0]+1, "IBM", 3))
|
||||
switch_graphics(IBM_GRAPHICS);
|
||||
if (!strncmpi(argv[0]+1, "IBM", 3)) {
|
||||
# ifdef ASCIIGRAPH
|
||||
load_symset("IBMGraphics", FALSE);
|
||||
load_symset("IBMGraphics", TRUE);
|
||||
switch_graphics(TRUE);
|
||||
# endif
|
||||
}
|
||||
break;
|
||||
/* case 'D': */
|
||||
case 'd':
|
||||
if (!strncmpi(argv[0]+1, "DEC", 3))
|
||||
switch_graphics(DEC_GRAPHICS);
|
||||
if (!strncmpi(argv[0]+1, "DEC", 3)) {
|
||||
# ifdef ASCIIGRAPH
|
||||
load_symset("DECGraphics", FALSE);
|
||||
switch_graphics(TRUE);
|
||||
# endif
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
case 'g':
|
||||
|
||||
@@ -365,7 +365,11 @@ init_sco_cons()
|
||||
if (!strcmp(windowprocs.name, "tty") && sco_flag_console) {
|
||||
atexit(sco_mapon);
|
||||
sco_mapoff();
|
||||
switch_graphics(IBM_GRAPHICS);
|
||||
# ifdef ASCIIGRAPH
|
||||
load_symset("IBMGraphics", FALSE);
|
||||
load_symset("IBMGraphics", TRUE);
|
||||
switch_graphics(TRUE);
|
||||
# endif
|
||||
# ifdef TEXTCOLOR
|
||||
if (has_colors())
|
||||
iflags.use_color = TRUE;
|
||||
|
||||
@@ -369,13 +369,22 @@ char *argv[];
|
||||
break;
|
||||
case 'I':
|
||||
case 'i':
|
||||
if (!strncmpi(argv[0]+1, "IBM", 3))
|
||||
switch_graphics(IBM_GRAPHICS);
|
||||
if (!strncmpi(argv[0]+1, "IBM", 3)) {
|
||||
#ifdef ASCIIGRAPH
|
||||
load_symset("IBMGraphics", FALSE);
|
||||
load_symset("IBMGraphics", TRUE);
|
||||
switch_graphics(TRUE);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
/* case 'D': */
|
||||
case 'd':
|
||||
if (!strncmpi(argv[0]+1, "DEC", 3))
|
||||
switch_graphics(DEC_GRAPHICS);
|
||||
if (!strncmpi(argv[0]+1, "DEC", 3)) {
|
||||
#ifdef ASCIIGRAPH
|
||||
load_symset("DECGraphics", FALSE);
|
||||
switch_graphics(TRUE);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 'p': /* profession (role) */
|
||||
if (argv[0][2]) {
|
||||
|
||||
@@ -268,13 +268,22 @@ char *argv[];
|
||||
break;
|
||||
case 'I':
|
||||
case 'i':
|
||||
if (!strncmpi(argv[0]+1, "IBM", 3))
|
||||
switch_graphics(IBM_GRAPHICS);
|
||||
if (!strncmpi(argv[0]+1, "IBM", 3)) {
|
||||
#ifdef ASCIIGRAPH
|
||||
load_symset("IBMGraphics", FALSE);
|
||||
load_symset("IBMGraphics", TRUE);
|
||||
switch_graphics(TRUE);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
/* case 'D': */
|
||||
case 'd':
|
||||
if (!strncmpi(argv[0]+1, "DEC", 3))
|
||||
switch_graphics(DEC_GRAPHICS);
|
||||
if (!strncmpi(argv[0]+1, "DEC", 3)) {
|
||||
#ifdef ASCIIGRAPH
|
||||
load_symset("DECGraphics", FALSE);
|
||||
switch_graphics(TRUE);
|
||||
#endif
|
||||
}
|
||||
break;
|
||||
case 'p': /* profession (role) */
|
||||
if (argv[0][2]) {
|
||||
|
||||
@@ -155,7 +155,7 @@ HGDIOBJ mswin_get_font(int win_type, int attr, HDC hdc, BOOL replace)
|
||||
UINT mswin_charset()
|
||||
{
|
||||
CHARSETINFO cis;
|
||||
if( iflags.IBMgraphics )
|
||||
if( SYMHANDLING("IBM") )
|
||||
if( TranslateCharsetInfo((DWORD*)GetOEMCP(), &cis, TCI_SRCCODEPAGE) )
|
||||
return cis.ciCharset;
|
||||
else
|
||||
|
||||
@@ -541,6 +541,7 @@ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
|
||||
copy $(DAT)\*.lev $(GAMEDIR)
|
||||
if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile
|
||||
! ENDIF
|
||||
if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR)
|
||||
if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt
|
||||
if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt
|
||||
@if exist $(SRC)\$(GAME).PDB copy $(SRC)\$(GAME).pdb $(GAMEDIR)\$(GAME).pdb
|
||||
|
||||
@@ -505,6 +505,7 @@ else
|
||||
$(subst /,\,copy $(DAT)/*.lev $(GAMEDIR))
|
||||
$(subst /,\,if exist $(GAMEDIR)/makefile del $(GAMEDIR)/makefile)
|
||||
endif
|
||||
$(subst /,\,if exist $(DAT)/symbols copy $(DAT)/symbols $(GAMEDIR))
|
||||
$(subst /,\,if exist $(DOC)/guidebook.txt copy $(DOC)/guidebook.txt $(GAMEDIR)/Guidebook.txt)
|
||||
$(subst /,\,if exist $(DOC)/nethack.txt copy $(DOC)/nethack.txt $(GAMEDIR)/NetHack.txt)
|
||||
$(subst /,\,copy $(NTSYS)/defaults.nh $(GAMEDIR)/defaults.nh)
|
||||
|
||||
@@ -510,6 +510,7 @@ $(O)install.tag: $(DAT)\data $(DAT)\rumors $(DAT)\dungeon \
|
||||
copy $(DAT)\*.lev $(GAMEDIR)
|
||||
if exist $(GAMEDIR)\makefile del $(GAMEDIR)\makefile
|
||||
! ENDIF
|
||||
if exist $(DAT)\symbols copy $(DAT)\symbols $(GAMEDIR)
|
||||
if exist $(DOC)\guidebook.txt copy $(DOC)\guidebook.txt $(GAMEDIR)\Guidebook.txt
|
||||
if exist $(DOC)\nethack.txt copy $(DOC)\nethack.txt $(GAMEDIR)\NetHack.txt
|
||||
@if exist $(O)$(GAME).PDB copy $(O)$(GAME).pdb $(GAMEDIR)\$(GAME).pdb
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#
|
||||
# Use the IBM character set rather than just plain ascii characters
|
||||
# for tty window-port.
|
||||
OPTIONS=IBMGraphics
|
||||
OPTIONS=symset:IBMGraphics_2,roguesymset:RogueEpyx
|
||||
|
||||
# Keyboard handling
|
||||
# Different keyboard handlers can be loaded.
|
||||
|
||||
@@ -386,7 +386,7 @@ tty_decgraphics_termcap_fixup()
|
||||
* Do not select NA ASCII as the primary font since people may
|
||||
* reasonably be using the UK character set.
|
||||
*/
|
||||
if (iflags.DECgraphics) xputs("\033)0");
|
||||
if (SYMHANDLING("DEC")) xputs("\033)0");
|
||||
#ifdef PC9800
|
||||
init_hilite();
|
||||
#endif
|
||||
@@ -449,19 +449,19 @@ tty_start_screen()
|
||||
xputs(TI);
|
||||
xputs(VS);
|
||||
#ifdef PC9800
|
||||
if (!iflags.IBMgraphics && !iflags.DECgraphics)
|
||||
if (!SYMHANDLING("IBM"))
|
||||
tty_ascgraphics_hilite_fixup();
|
||||
/* set up callback in case option is not set yet but toggled later */
|
||||
ascgraphics_mode_callback = tty_ascgraphics_hilite_fixup;
|
||||
# ifdef ASCIIGRAPH
|
||||
if (iflags.IBMgraphics) init_hilite();
|
||||
if (SYMHANDLING("IBM")) init_hilite();
|
||||
/* set up callback in case option is not set yet but toggled later */
|
||||
ibmgraphics_mode_callback = init_hilite;
|
||||
# endif
|
||||
#endif /* PC9800 */
|
||||
|
||||
#ifdef TERMLIB
|
||||
if (iflags.DECgraphics) tty_decgraphics_termcap_fixup();
|
||||
if (SYMHANDLING("DEC")) tty_decgraphics_termcap_fixup();
|
||||
/* set up callback in case option is not set yet but toggled later */
|
||||
decgraphics_mode_callback = tty_decgraphics_termcap_fixup;
|
||||
#endif
|
||||
|
||||
@@ -2402,7 +2402,7 @@ int in_ch;
|
||||
register char ch = (char)in_ch;
|
||||
|
||||
# if defined(ASCIIGRAPH) && !defined(NO_TERMS)
|
||||
if (iflags.IBMgraphics || iflags.eight_bit_tty) {
|
||||
if (SYMHANDLING("IBM") || iflags.eight_bit_tty) {
|
||||
/* IBM-compatible displays don't need other stuff */
|
||||
(void) putchar(ch);
|
||||
} else if (ch & 0x80) {
|
||||
|
||||
@@ -183,7 +183,7 @@ HGDIOBJ mswin_get_font(int win_type, int attr, HDC hdc, BOOL replace)
|
||||
UINT mswin_charset()
|
||||
{
|
||||
CHARSETINFO cis;
|
||||
if( iflags.IBMgraphics )
|
||||
if( SYMHANDLING("IBM") )
|
||||
if( TranslateCharsetInfo((DWORD*)GetOEMCP(), &cis, TCI_SRCCODEPAGE) )
|
||||
return cis.ciCharset;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user