(draw_map): Parameter bmap abused EF_MAP and EF_BMAP, and required the

silly EF_NMAP.  Use characters instead: 'b' for bmap (was EF_BMAP),
't' for true bmap (was EF_MAP), 'r' for revert (was EF_MAP+EF_BMAP,
more sillness), and 'n' for nmap (was EF_NMAP).  Callers changed.
(EF_NMAP): Remove.
This commit is contained in:
Markus Armbruster 2005-10-23 08:58:23 +00:00
parent a2ae5ebe5e
commit ba84b71f8d
5 changed files with 18 additions and 17 deletions

View file

@ -88,7 +88,7 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp)
return RET_FAIL;
}
if (bmap == EF_MAP + EF_BMAP) {
if (bmap == 'r') {
if (!confirm("Are you sure you want to revert your bmap? "))
return RET_OK;
}
@ -106,19 +106,23 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp)
if (bmap) {
int c;
switch (bmap) {
case EF_BMAP:
default:
CANT_HAPPEN("bad BMAP");
bmap = 'b';
/* fall through */
case 'b':
while (bmnxtsct(nsp) && !player->aborted) {
if (0 != (c = player->bmap[sctoff(nsp->x, nsp->y)]))
wmap[nsp->dy][nsp->dx] = c;
}
break;
case EF_MAP:
case 't':
while (bmnxtsct(nsp) && !player->aborted) {
if (0 != (c = player->map[sctoff(nsp->x, nsp->y)]))
wmap[nsp->dy][nsp->dx] = c;
}
break;
case (EF_MAP + EF_BMAP):
case 'r':
while (bmnxtsct(nsp) && !player->aborted) {
player->bmap[sctoff(nsp->x, nsp->y)] =
player->map[sctoff(nsp->x, nsp->y)];
@ -127,7 +131,7 @@ draw_map(int bmap, s_char origin, int map_flags, struct nstr_sect *nsp)
}
ef_write(EF_BMAP, player->cnum, player->bmap);
break;
case EF_NMAP:
case 'n':
{
struct sctstr sect;