github PR #1052 - levltyp[] re-synchronization

Pull request from entrez:  the legend for wizard mode #terrain wasn't
updated to include terrain type "lava wall", so the entries for it
and everything that followed were inaccurate.

I've expanded the comment about level type codes in rm.h.

Closes #1052
This commit is contained in:
PatR
2023-07-04 23:17:30 -07:00
parent 3064228ca7
commit c360822c89
2 changed files with 26 additions and 4 deletions

View File

@@ -1214,6 +1214,11 @@ make potion of water become discovered if dipping a carried container into an
a monster which was temporarily asleep wouldn't be affected by taming (either
food or magic), but one that was indefinitely asleep would be; when
tamable via food, it even caught and ate the food without waking up
in wizard mode, #terrain has offers to view all map locations as single-
letter codes corresponding to the levl[][].typ numbers and to view
a legend showing letter-to-type correspondence; adding new type
"lava wall" didn't update that legend and misdescribed all the types
which have higher values
Fixes to 3.7.0-x General Problems Exposed Via git Repository

View File

@@ -31,10 +31,27 @@
* +- -+- -+ |
*/
/* Level location types. [Some debugging code in src/display.c
defines array type_names[] which contains an entry for each of
these, so needs to be kept in sync if any new types are added
or existing ones renumbered.] */
/*
* Level location types, values for 'level.locations[x][y].typ'.
*
* These are different from display symbols and while there is
* similarity between the cmap subset of those, there isn't any
* one-to-one correspondence between the two encodings. For instance,
* the DOOR type has multiple symbols (closed|open|gone); so does the
* STAIRS type (down|up). Conversely, DRAWBRIDGE_UP represents the
* location of the projected span if the drawbridge were down but
* there is no symbol for that; it is displayed as water, ice, lava, or
* floor depending on what is at that spot when the bridge is 'closed'.
*
* [Some debugging code in src/display.c defines array type_names[]
* which contains an entry for each of these, so needs to be kept in
* sync if any new types are added or existing ones renumbered. The
* #terrain command also has a menu choice to display each map spot by
* a letter derived from these numeric values and another choice to
* display a legend showing the letter-to-type correspondence. If any
* types are added, removed, or reordered, that needs to be updated to
* keep in synch.]
*/
enum levl_typ_types {
STONE = 0,
VWALL = 1,