Remove unused "mazeflag" parameter from mkfount()
This parameter appears to have been in the code for a very long time, but never used, since no version of NetHack I can find had mazes with randomly placed fountains in them. Certainly isn't used now, so this can be reduced to the same call to find_okay_roompos used by similar functions such as mksink.
This commit is contained in:
17
src/mklev.c
17
src/mklev.c
@@ -12,7 +12,7 @@
|
||||
static boolean generate_stairs_room_good(struct mkroom *, int);
|
||||
static struct mkroom *generate_stairs_find_room(void);
|
||||
static void generate_stairs(void);
|
||||
static void mkfount(int, struct mkroom *);
|
||||
static void mkfount(struct mkroom *);
|
||||
static boolean find_okay_roompos(struct mkroom *, coord *);
|
||||
static void mksink(struct mkroom *);
|
||||
static void mkaltar(struct mkroom *);
|
||||
@@ -789,7 +789,7 @@ fill_ordinary_room(struct mkroom *croom)
|
||||
if (Is_rogue_level(&u.uz))
|
||||
goto skip_nonrogue;
|
||||
if (!rn2(10))
|
||||
mkfount(0, croom);
|
||||
mkfount(croom);
|
||||
if (!rn2(60))
|
||||
mksink(croom);
|
||||
if (!rn2(60))
|
||||
@@ -1752,19 +1752,12 @@ generate_stairs(void)
|
||||
}
|
||||
|
||||
static void
|
||||
mkfount(int mazeflag, struct mkroom *croom)
|
||||
mkfount(struct mkroom *croom)
|
||||
{
|
||||
coord m;
|
||||
register int tryct = 0;
|
||||
|
||||
do {
|
||||
if (++tryct > 200)
|
||||
return;
|
||||
if (mazeflag)
|
||||
mazexy(&m);
|
||||
else if (!somexy(croom, &m))
|
||||
return;
|
||||
} while (occupied(m.x, m.y) || bydoor(m.x, m.y));
|
||||
if (!find_okay_roompos(croom, &m))
|
||||
return;
|
||||
|
||||
/* Put a fountain at m.x, m.y */
|
||||
if (!set_levltyp(m.x, m.y, FOUNTAIN))
|
||||
|
||||
Reference in New Issue
Block a user