Merge branch 'master' into win32-x64-working

This commit is contained in:
nhmall
2015-04-26 08:39:18 -04:00
11 changed files with 210 additions and 55 deletions

View File

@@ -1847,6 +1847,16 @@ d_level *dest;
}
}
char *
get_annotation(lev)
d_level *lev;
{
mapseen *mptr;
if ((mptr = find_mapseen(lev)))
return mptr->custom;
return NULL;
}
/* #annotate command - add a custom name to the current level */
int
donamelevel()
@@ -1856,8 +1866,14 @@ donamelevel()
if (!(mptr = find_mapseen(&u.uz))) return 0;
getlin("What do you want to call this dungeon level?", nbuf);
if (mptr->custom) {
char qbuf[BUFSZ];
Sprintf(qbuf, "Replace annotation \"%s\" with?", mptr->custom);
getlin(qbuf, nbuf);
} else
getlin("What do you want to call this dungeon level?", nbuf);
if (index(nbuf, '\033')) return 0;
(void)mungspaces(nbuf);
/* discard old annotation, if any */
if (mptr->custom) {