#overview overhaul, part I (trunk only)
Reformat the DUNGEON_OVERVIEW code in dungeon.c. It's clear from the
way lines were wrapping that the original author used an editor that let
him set tab expansion to columns of four, and when they're treated as the
conventional eight then some longish lines won't fit. Switch to using a
mix of tabs and four spaces instead of all tab characters.
I've separated out my more interesting changes (which will come later).
However, there are a bunch of minor ones included:
1) the lastseentyp array is reused for each level visited, but it wasn't
being reinitialized when creating a new level, so remembered fountains,
altars, and so forth could be erroneously propogated across levels
(the original contributed patch may not have suffered from this because
it handled last-seen data differently than the code which is in place);
2) add 3.5.0 health food store to the list of recognized shop types;
3) make an #annotate value of a single space delete any old annotation
without adding a new one, the way monster and object naming works;
4) the code to discard overview data for a branch of the dungeon which
can no longer be reached (quest expulsion) wasn't capable of doing so
for the very first level (a hypothetical problem since level 1 isn't in
the quest...) and didn't free memory used for user-supplied annotations;
5) reorganize dooverview() where Michael's compiler reported that a
variable might be used before being initialized (it wasn't, but it also
wasn't even needed to achieve the intended result);
6) redo the #overview formatting macros so that they'll work with pre-ANSI
compilers that don't support concatenation of adjacent string literals;
7) function-like macro ADDNTOBUF() was used without terminating semi-colon,
which confused emacs when indenting, so this rewrites it such that it
expects ordinary termination and will work correctly if ever used in the
form 'if (some_condition) ADDNTOBUF(args); else ...';
8) comment out water/ice/lava with #if 0 ... #endif rather than /* ... */.
This commit is contained in:
+91
-92
@@ -1876,28 +1876,24 @@ donamelevel()
|
|||||||
mapseen *mptr;
|
mapseen *mptr;
|
||||||
char qbuf[QBUFSZ]; /* Buffer for query text */
|
char qbuf[QBUFSZ]; /* Buffer for query text */
|
||||||
char nbuf[BUFSZ]; /* Buffer for response */
|
char nbuf[BUFSZ]; /* Buffer for response */
|
||||||
int len;
|
|
||||||
|
|
||||||
if (!(mptr = find_mapseen(&u.uz))) return 0;
|
if (!(mptr = find_mapseen(&u.uz))) return 0;
|
||||||
|
|
||||||
Sprintf(qbuf,"What do you want to call this dungeon level? ");
|
Sprintf(qbuf,"What do you want to call this dungeon level? ");
|
||||||
getlin(qbuf, nbuf);
|
getlin(qbuf, nbuf);
|
||||||
|
|
||||||
if (index(nbuf, '\033')) return 0;
|
if (index(nbuf, '\033')) return 0;
|
||||||
|
|
||||||
len = strlen(nbuf) + 1;
|
/* discard old annotation, if any */
|
||||||
if (mptr->custom) {
|
if (mptr->custom) {
|
||||||
free((genericptr_t)mptr->custom);
|
free((genericptr_t)mptr->custom);
|
||||||
mptr->custom = (char *)0;
|
mptr->custom = (char *)0;
|
||||||
mptr->custom_lth = 0;
|
mptr->custom_lth = 0;
|
||||||
}
|
}
|
||||||
|
/* add new annotation, unless it's empty or a single space */
|
||||||
if (*nbuf) {
|
if (*nbuf && strcmp(nbuf, " ")) {
|
||||||
mptr->custom = (char *) alloc(sizeof(char) * len);
|
mptr->custom = dupstr(nbuf);
|
||||||
mptr->custom_lth = len;
|
mptr->custom_lth = strlen(mptr->custom);
|
||||||
strcpy(mptr->custom, nbuf);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1930,14 +1926,13 @@ int ledger_num;
|
|||||||
mptr->feat.forgot = 1;
|
mptr->feat.forgot = 1;
|
||||||
mptr->br = (branch *)0;
|
mptr->br = (branch *)0;
|
||||||
|
|
||||||
/* custom names are erased, not forgotten until revisted */
|
/* custom names are erased, not just forgotten until revisted */
|
||||||
if (mptr->custom) {
|
if (mptr->custom) {
|
||||||
mptr->custom_lth = 0;
|
mptr->custom_lth = 0;
|
||||||
free((genericptr_t)mptr->custom);
|
free((genericptr_t)mptr->custom);
|
||||||
mptr->custom = (char *)0;
|
mptr->custom = (char *)0;
|
||||||
}
|
}
|
||||||
|
(void) memset((genericptr_t) mptr->rooms, 0, sizeof mptr->rooms);
|
||||||
memset((genericptr_t) mptr->rooms, 0, sizeof(mptr->rooms));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2003,18 +1998,17 @@ void
|
|||||||
remdun_mapseen(dnum)
|
remdun_mapseen(dnum)
|
||||||
int dnum;
|
int dnum;
|
||||||
{
|
{
|
||||||
mapseen *mptr, *prev;
|
mapseen *mptr, **mptraddr;
|
||||||
|
|
||||||
prev = mapseenchn;
|
mptraddr = &mapseenchn;
|
||||||
if (!prev) return;
|
while ((mptr = *mptraddr) != 0) {
|
||||||
mptr = prev->next;
|
|
||||||
|
|
||||||
for (; mptr; prev = mptr, mptr = mptr->next) {
|
|
||||||
if (mptr->lev.dnum == dnum) {
|
if (mptr->lev.dnum == dnum) {
|
||||||
prev->next = mptr->next;
|
*mptraddr = mptr->next;
|
||||||
|
if (mptr->custom)
|
||||||
|
free((genericptr_t) mptr->custom);
|
||||||
free((genericptr_t) mptr);
|
free((genericptr_t) mptr);
|
||||||
mptr = prev;
|
} else
|
||||||
}
|
mptraddr = &mptr->next;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2025,12 +2019,17 @@ d_level *lev;
|
|||||||
/* Create a level and insert in "sorted" order. This is an insertion
|
/* Create a level and insert in "sorted" order. This is an insertion
|
||||||
* sort first by dungeon (in order of discovery) and then by level number.
|
* sort first by dungeon (in order of discovery) and then by level number.
|
||||||
*/
|
*/
|
||||||
mapseen *mptr;
|
mapseen *mptr, *init, *old;
|
||||||
mapseen *init;
|
|
||||||
mapseen *old;
|
init = (mapseen *) alloc(sizeof *init);
|
||||||
|
(void) memset((genericptr_t)init, 0, sizeof *init);
|
||||||
|
/* memset is fine for feature bits and rooms array;
|
||||||
|
explicitly initialize pointers to null */
|
||||||
|
init->next = 0, init->br = 0, init->custom = 0;
|
||||||
|
/* lastseentyp[][] is reused for each level, so get rid of
|
||||||
|
previous level's data */
|
||||||
|
(void) memset((genericptr_t)lastseentyp, 0, sizeof lastseentyp);
|
||||||
|
|
||||||
init = (mapseen *) alloc(sizeof(mapseen));
|
|
||||||
(void) memset((genericptr_t)init, 0, sizeof(mapseen));
|
|
||||||
init->lev.dnum = lev->dnum;
|
init->lev.dnum = lev->dnum;
|
||||||
init->lev.dlevel = lev->dlevel;
|
init->lev.dlevel = lev->dlevel;
|
||||||
|
|
||||||
@@ -2075,11 +2074,8 @@ interest_mapseen(mptr)
|
|||||||
mapseen *mptr;
|
mapseen *mptr;
|
||||||
{
|
{
|
||||||
return on_level(&u.uz, &mptr->lev) ||
|
return on_level(&u.uz, &mptr->lev) ||
|
||||||
(!mptr->feat.forgot && (
|
(!mptr->feat.forgot &&
|
||||||
INTEREST(mptr->feat) ||
|
(INTEREST(mptr->feat) || (mptr->custom) || (mptr->br)));
|
||||||
(mptr->custom) ||
|
|
||||||
(mptr->br)
|
|
||||||
));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* recalculate mapseen for the current level */
|
/* recalculate mapseen for the current level */
|
||||||
@@ -2096,7 +2092,7 @@ recalc_mapseen()
|
|||||||
*/
|
*/
|
||||||
if (!(mptr = find_mapseen(&u.uz))) return;
|
if (!(mptr = find_mapseen(&u.uz))) return;
|
||||||
|
|
||||||
/* reset all features */
|
/* reset all features; mptr->feat.* = 0, mptr->feat.forgot = 0; */
|
||||||
memset((genericptr_t) &mptr->feat, 0, sizeof(mapseen_feat));
|
memset((genericptr_t) &mptr->feat, 0, sizeof(mapseen_feat));
|
||||||
|
|
||||||
/* track rooms the hero is in */
|
/* track rooms the hero is in */
|
||||||
@@ -2129,21 +2125,21 @@ recalc_mapseen()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update lastseentyp with typ if and only if it is in sight or the hero can
|
/* Update lastseentyp with typ if and only if it is in sight or the
|
||||||
* feel it on their current location (i.e. not levitating). This *should*
|
* hero can feel it on their current location (i.e. not levitating).
|
||||||
* give the "last known typ" for each dungeon location. (At the very least,
|
* This *should* give the "last known typ" for each dungeon location.
|
||||||
* it's a better assumption than determining what the player knows from
|
* (At the very least, it's a better assumption than determining what
|
||||||
* the glyph and the typ (which is isn't quite enough information in some
|
* the player knows from the glyph and the typ (which is isn't quite
|
||||||
* cases).
|
* enough information in some cases)).
|
||||||
*
|
*
|
||||||
* It was reluctantly added to struct rm to track. Alternatively
|
* It was reluctantly added to struct rm to track. Alternatively
|
||||||
* we could track "features" and then update them all here, and keep
|
* we could track "features" and then update them all here, and keep
|
||||||
* track of when new features are created or destroyed, but this
|
* track of when new features are created or destroyed, but this
|
||||||
* seemed the most elegant, despite adding more data to struct rm.
|
* seemed the most elegant, despite adding more data to struct rm.
|
||||||
*
|
*
|
||||||
* Although no current windowing systems (can) do this, this would add the
|
* Although no current windowing systems (can) do this, this would add
|
||||||
* ability to have non-dungeon glyphs float above the last known dungeon
|
* the ability to have non-dungeon glyphs float above the last known
|
||||||
* glyph (i.e. items on fountains).
|
* dungeon glyph (i.e. items on fountains).
|
||||||
*/
|
*/
|
||||||
if (!Levitation)
|
if (!Levitation)
|
||||||
lastseentyp[u.ux][u.uy] = levl[u.ux][u.uy].typ;
|
lastseentyp[u.ux][u.uy] = levl[u.ux][u.uy].typ;
|
||||||
@@ -2160,7 +2156,7 @@ recalc_mapseen()
|
|||||||
}
|
}
|
||||||
|
|
||||||
switch (lastseentyp[x][y]) {
|
switch (lastseentyp[x][y]) {
|
||||||
/*
|
#if 0
|
||||||
case ICE:
|
case ICE:
|
||||||
mptr->feat.ice = 1;
|
mptr->feat.ice = 1;
|
||||||
break;
|
break;
|
||||||
@@ -2172,7 +2168,7 @@ recalc_mapseen()
|
|||||||
case LAVAPOOL:
|
case LAVAPOOL:
|
||||||
mptr->feat.lava = 1;
|
mptr->feat.lava = 1;
|
||||||
break;
|
break;
|
||||||
*/
|
#endif
|
||||||
case TREE:
|
case TREE:
|
||||||
mptr->feat.ntree = min(mptr->feat.ntree + 1, 3);
|
mptr->feat.ntree = min(mptr->feat.ntree + 1, 3);
|
||||||
break;
|
break;
|
||||||
@@ -2190,7 +2186,6 @@ recalc_mapseen()
|
|||||||
mptr->feat.msalign = Amask2msa(levl[x][y].altarmask);
|
mptr->feat.msalign = Amask2msa(levl[x][y].altarmask);
|
||||||
else if (mptr->feat.msalign != Amask2msa(levl[x][y].altarmask))
|
else if (mptr->feat.msalign != Amask2msa(levl[x][y].altarmask))
|
||||||
mptr->feat.msalign = MSA_NONE;
|
mptr->feat.msalign = MSA_NONE;
|
||||||
|
|
||||||
mptr->feat.naltar = min(mptr->feat.naltar + 1, 3);
|
mptr->feat.naltar = min(mptr->feat.naltar + 1, 3);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -2203,32 +2198,19 @@ dooverview()
|
|||||||
{
|
{
|
||||||
winid win;
|
winid win;
|
||||||
mapseen *mptr;
|
mapseen *mptr;
|
||||||
boolean first;
|
int lastdun = -1;
|
||||||
boolean printdun;
|
|
||||||
int lastdun;
|
|
||||||
|
|
||||||
first = TRUE;
|
|
||||||
|
|
||||||
/* lazy intialization */
|
/* lazy intialization */
|
||||||
(void) recalc_mapseen();
|
(void) recalc_mapseen();
|
||||||
|
|
||||||
win = create_nhwindow(NHW_MENU);
|
win = create_nhwindow(NHW_MENU);
|
||||||
|
|
||||||
for (mptr = mapseenchn; mptr; mptr = mptr->next) {
|
for (mptr = mapseenchn; mptr; mptr = mptr->next) {
|
||||||
|
|
||||||
/* only print out info for a level or a dungeon if interest */
|
/* only print out info for a level or a dungeon if interest */
|
||||||
if (interest_mapseen(mptr)) {
|
if (interest_mapseen(mptr)) {
|
||||||
printdun = (first || lastdun != mptr->lev.dnum);
|
print_mapseen(win, mptr, (boolean)(mptr->lev.dnum != lastdun));
|
||||||
/* if (!first) putstr(win, 0, ""); */
|
|
||||||
print_mapseen(win, mptr, printdun);
|
|
||||||
|
|
||||||
if (printdun) {
|
|
||||||
first = FALSE;
|
|
||||||
lastdun = mptr->lev.dnum;
|
lastdun = mptr->lev.dnum;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
display_nhwindow(win, TRUE);
|
display_nhwindow(win, TRUE);
|
||||||
destroy_nhwindow(win);
|
destroy_nhwindow(win);
|
||||||
|
|
||||||
@@ -2260,8 +2242,8 @@ branch *br;
|
|||||||
/* Special case: quest portal says closed if kicked from quest */
|
/* Special case: quest portal says closed if kicked from quest */
|
||||||
boolean closed_portal =
|
boolean closed_portal =
|
||||||
(br->end2.dnum == quest_dnum && u.uevent.qexpelled);
|
(br->end2.dnum == quest_dnum && u.uevent.qexpelled);
|
||||||
switch(br->type)
|
|
||||||
{
|
switch (br->type) {
|
||||||
case BR_PORTAL: return closed_portal ? "Sealed portal" : "Portal";
|
case BR_PORTAL: return closed_portal ? "Sealed portal" : "Portal";
|
||||||
case BR_NO_END1: return "Connection";
|
case BR_NO_END1: return "Connection";
|
||||||
case BR_NO_END2: return (br->end1_up) ? "One way stairs up" :
|
case BR_NO_END2: return (br->end1_up) ? "One way stairs up" :
|
||||||
@@ -2296,6 +2278,8 @@ int rtype;
|
|||||||
return "wand shop";
|
return "wand shop";
|
||||||
case BOOKSHOP:
|
case BOOKSHOP:
|
||||||
return "bookstore";
|
return "bookstore";
|
||||||
|
case FODDERSHOP:
|
||||||
|
return "health food store";
|
||||||
case CANDLESHOP:
|
case CANDLESHOP:
|
||||||
return "lighting shop";
|
return "lighting shop";
|
||||||
default:
|
default:
|
||||||
@@ -2307,14 +2291,26 @@ int rtype;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* some utility macros for print_mapseen */
|
/* some utility macros for print_mapseen */
|
||||||
#define TAB " "
|
#define TAB " " /* three spaces */
|
||||||
#define BULLET ""
|
#if 0
|
||||||
|
#define BULLET "" /* empty; otherwise output becomes cluttered */
|
||||||
#define PREFIX TAB TAB BULLET
|
#define PREFIX TAB TAB BULLET
|
||||||
|
#else /*!0*/
|
||||||
|
/* K&R: don't require support for concatenation of adjacent string literals */
|
||||||
|
#define PREFIX " " /* two TABs + empty BULLET: six spaces */
|
||||||
|
#endif
|
||||||
#define COMMA (i++ > 0 ? ", " : PREFIX)
|
#define COMMA (i++ > 0 ? ", " : PREFIX)
|
||||||
#define ADDNTOBUF(nam, var) { if (var) \
|
/* "iterate" once; safe to use as ``if (cond) ADDTOBUF(); else whatever;'' */
|
||||||
Sprintf(eos(buf), "%s%s " nam "%s", COMMA, seen_string((var), (nam)), \
|
#define ADDNTOBUF(nam,var) do { \
|
||||||
((var) != 1 ? "s" : "")); }
|
if (var) \
|
||||||
#define ADDTOBUF(nam, var) { if (var) Sprintf(eos(buf), "%s " nam, COMMA); }
|
Sprintf(eos(buf), "%s%s %s%s", \
|
||||||
|
COMMA, seen_string((var), (nam)), \
|
||||||
|
(nam), plur(var)); \
|
||||||
|
} while (0)
|
||||||
|
#define ADDTOBUF(nam,var) do { \
|
||||||
|
if (var) \
|
||||||
|
Sprintf(eos(buf), "%s%s", COMMA, (nam)); \
|
||||||
|
} while (0)
|
||||||
|
|
||||||
STATIC_OVL void
|
STATIC_OVL void
|
||||||
print_mapseen(win, mptr, printdun)
|
print_mapseen(win, mptr, printdun)
|
||||||
@@ -2343,32 +2339,34 @@ boolean printdun;
|
|||||||
Sprintf(buf, "%s:", dungeons[mptr->lev.dnum].dname);
|
Sprintf(buf, "%s:", dungeons[mptr->lev.dnum].dname);
|
||||||
else
|
else
|
||||||
Sprintf(buf, "%s: levels %d to %d",
|
Sprintf(buf, "%s: levels %d to %d",
|
||||||
dungeons[mptr->lev.dnum].dname,
|
dungeons[mptr->lev.dnum].dname, depthstart,
|
||||||
depthstart, depthstart +
|
depthstart + dungeons[mptr->lev.dnum].dunlev_ureached - 1);
|
||||||
dungeons[mptr->lev.dnum].dunlev_ureached - 1);
|
|
||||||
putstr(win, ATR_INVERSE, buf);
|
putstr(win, ATR_INVERSE, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* calculate level number */
|
/* calculate level number */
|
||||||
i = depthstart + mptr->lev.dlevel - 1;
|
i = depthstart + mptr->lev.dlevel - 1;
|
||||||
if (Is_astralevel(&mptr->lev))
|
if (Is_astralevel(&mptr->lev))
|
||||||
Sprintf(buf, TAB "Astral Plane:");
|
Sprintf(buf, "%sAstral Plane:", TAB);
|
||||||
else if (In_endgame(&mptr->lev))
|
else if (In_endgame(&mptr->lev))
|
||||||
/* Negative numbers are mildly confusing, since they are never
|
/* Negative numbers are mildly confusing, since they are never
|
||||||
* shown to the player, except in wizard mode. We could show
|
* shown to the player, except in wizard mode. We could show
|
||||||
* "Level -1" for the earth plane, for example. Instead,
|
* "Level -1" for the earth plane, for example. Instead,
|
||||||
* show "Plane 1" for the earth plane to differentiate from
|
* show "Plane 1" for the earth plane to differentiate from
|
||||||
* level 1. There's not much to show, but maybe the player
|
* level 1. There's not much to show, but maybe the player
|
||||||
* wants to #annotate them for some bizarre reason.
|
* wants to #annotate them for some reason such as keeping
|
||||||
|
* track of encounters with the Wizard.
|
||||||
|
* [TODO: change this to be "Plane of <element-name>:"]
|
||||||
*/
|
*/
|
||||||
Sprintf(buf, TAB "Plane %i:", -i);
|
Sprintf(buf, "%sPlane %i:", TAB, -i);
|
||||||
else
|
else
|
||||||
Sprintf(buf, TAB "Level %d:", i);
|
Sprintf(buf, "%sLevel %d:", TAB, i);
|
||||||
|
|
||||||
#ifdef WIZARD
|
#ifdef WIZARD
|
||||||
/* wizmode prints out proto dungeon names for clarity */
|
/* wizmode prints out proto dungeon names for clarity */
|
||||||
if (wizard) {
|
if (wizard) {
|
||||||
s_level *slev;
|
s_level *slev;
|
||||||
|
|
||||||
if ((slev = Is_special(&mptr->lev)) != 0)
|
if ((slev = Is_special(&mptr->lev)) != 0)
|
||||||
Sprintf(eos(buf), " [%s]", slev->proto);
|
Sprintf(eos(buf), " [%s]", slev->proto);
|
||||||
}
|
}
|
||||||
@@ -2378,8 +2376,8 @@ boolean printdun;
|
|||||||
Sprintf(eos(buf), " (%s)", mptr->custom);
|
Sprintf(eos(buf), " (%s)", mptr->custom);
|
||||||
|
|
||||||
/* print out glyph or something more interesting? */
|
/* print out glyph or something more interesting? */
|
||||||
Sprintf(eos(buf), "%s", on_level(&u.uz, &mptr->lev) ?
|
Sprintf(eos(buf), "%s",
|
||||||
" <- You are here" : "");
|
on_level(&u.uz, &mptr->lev) ? " <- You are here" : "");
|
||||||
putstr(win, ATR_BOLD, buf);
|
putstr(win, ATR_BOLD, buf);
|
||||||
|
|
||||||
if (mptr->feat.forgot) return;
|
if (mptr->feat.forgot) return;
|
||||||
@@ -2393,49 +2391,50 @@ boolean printdun;
|
|||||||
* how important they are.
|
* how important they are.
|
||||||
*/
|
*/
|
||||||
if (mptr->feat.nshop > 1)
|
if (mptr->feat.nshop > 1)
|
||||||
ADDNTOBUF("shop", mptr->feat.nshop)
|
ADDNTOBUF("shop", mptr->feat.nshop);
|
||||||
else if (mptr->feat.nshop == 1)
|
else if (mptr->feat.nshop == 1)
|
||||||
Sprintf(eos(buf), "%s%s", COMMA,
|
Sprintf(eos(buf), "%s%s", COMMA,
|
||||||
an(shop_string(mptr->feat.shoptype)));
|
an(shop_string(mptr->feat.shoptype)));
|
||||||
|
|
||||||
/* Temples + non-temple altars get munged into just "altars" */
|
/* Temples + non-temple altars get munged into just "altars" */
|
||||||
if (!mptr->feat.ntemple || mptr->feat.ntemple != mptr->feat.naltar)
|
if (!mptr->feat.ntemple || mptr->feat.ntemple != mptr->feat.naltar)
|
||||||
ADDNTOBUF("altar", mptr->feat.naltar)
|
ADDNTOBUF("altar", mptr->feat.naltar);
|
||||||
else
|
else
|
||||||
ADDNTOBUF("temple", mptr->feat.ntemple)
|
ADDNTOBUF("temple", mptr->feat.ntemple);
|
||||||
|
|
||||||
/* only print out altar's god if they are all to your god */
|
/* only print out altar's god if they are all to your god */
|
||||||
if (Amask2align(Msa2amask(mptr->feat.msalign)) == u.ualign.type)
|
if (Amask2align(Msa2amask(mptr->feat.msalign)) == u.ualign.type)
|
||||||
Sprintf(eos(buf), " to %s", align_gname(u.ualign.type));
|
Sprintf(eos(buf), " to %s", align_gname(u.ualign.type));
|
||||||
|
|
||||||
ADDNTOBUF("fountain", mptr->feat.nfount)
|
ADDNTOBUF("throne", mptr->feat.nthrone);
|
||||||
ADDNTOBUF("sink", mptr->feat.nsink)
|
ADDNTOBUF("fountain", mptr->feat.nfount);
|
||||||
ADDNTOBUF("throne", mptr->feat.nthrone)
|
ADDNTOBUF("sink", mptr->feat.nsink);
|
||||||
ADDNTOBUF("tree", mptr->feat.ntree);
|
ADDNTOBUF("tree", mptr->feat.ntree);
|
||||||
/*
|
#if 0
|
||||||
ADDTOBUF("water", mptr->feat.water)
|
ADDTOBUF("water", mptr->feat.water);
|
||||||
ADDTOBUF("lava", mptr->feat.lava)
|
ADDTOBUF("lava", mptr->feat.lava);
|
||||||
ADDTOBUF("ice", mptr->feat.ice)
|
ADDTOBUF("ice", mptr->feat.ice);
|
||||||
*/
|
#endif
|
||||||
|
|
||||||
/* capitalize afterwards */
|
/* capitalize afterwards */
|
||||||
i = strlen(PREFIX);
|
i = strlen(PREFIX);
|
||||||
buf[i] = highc(buf[i]);
|
buf[i] = highc(buf[i]);
|
||||||
|
/* capitalizing it makes it a sentence; terminate with '.' */
|
||||||
|
Strcat(buf, ".");
|
||||||
putstr(win, 0, buf);
|
putstr(win, 0, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* print out branches */
|
/* print out branches */
|
||||||
if (mptr->br) {
|
if (mptr->br) {
|
||||||
Sprintf(buf, PREFIX "%s to %s", br_string2(mptr->br),
|
Sprintf(buf, "%s%s to %s", PREFIX, br_string2(mptr->br),
|
||||||
dungeons[mptr->br->end2.dnum].dname);
|
dungeons[mptr->br->end2.dnum].dname);
|
||||||
|
|
||||||
/* since mapseen objects are printed out in increasing order
|
/* Since mapseen objects are printed out in increasing order
|
||||||
* of dlevel, clarify which level this branch is going to
|
* of dlevel, clarify which level this branch is going to
|
||||||
* if the branch goes upwards. Unless it's the end game
|
* if the branch goes upwards. Unless it's the end game.
|
||||||
*/
|
*/
|
||||||
if (mptr->br->end1_up && !In_endgame(&(mptr->br->end2)))
|
if (mptr->br->end1_up && !In_endgame(&(mptr->br->end2)))
|
||||||
Sprintf(eos(buf), ", level %d", depth(&(mptr->br->end2)));
|
Sprintf(eos(buf), ", level %d", depth(&(mptr->br->end2)));
|
||||||
|
Strcat(buf, ".");
|
||||||
putstr(win, 0, buf);
|
putstr(win, 0, buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user