From: PatR Date: Wed, 26 Oct 2022 08:22:00 +0000 (-0700) Subject: another bit of reformatting X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=535cb2e5e99398c09d33c3f94dc83da1d7a51df3;p=nethack another bit of reformatting --- diff --git a/src/mkmaze.c b/src/mkmaze.c index e283ea24d..69d104f06 100644 --- a/src/mkmaze.c +++ b/src/mkmaze.c @@ -275,7 +275,7 @@ okay(coordxy x, coordxy y, coordxy dir) /* find random starting point for maze generation */ static void -maze0xy(coord * cc) +maze0xy(coord *cc) { cc->x = 3 + 2 * rn2((g.x_maze_max >> 1) - 1); cc->y = 3 + 2 * rn2((g.y_maze_max >> 1) - 1); @@ -285,15 +285,18 @@ maze0xy(coord * cc) /* * Bad if: * pos is occupied OR - * pos is inside restricted region (lx,ly,hx,hy) OR + * pos is inside restricted region (nlx,nly,nhx,nhy) OR * NOT (pos is corridor and a maze level OR pos is a room OR pos is air) */ boolean -bad_location(coordxy x, coordxy y, coordxy lx, coordxy ly, coordxy hx, coordxy hy) +bad_location( + coordxy x, coordxy y, + coordxy nlx, coordxy nly, coordxy nhx, coordxy nhy) { return (boolean) (occupied(x, y) - || within_bounded_area(x, y, lx, ly, hx, hy) - || !((levl[x][y].typ == CORR && g.level.flags.is_maze_lev) + || within_bounded_area(x, y, nlx, nly, nhx, nhy) + || !((levl[x][y].typ == CORR + && g.level.flags.is_maze_lev) || levl[x][y].typ == ROOM || levl[x][y].typ == AIR)); } @@ -303,7 +306,7 @@ bad_location(coordxy x, coordxy y, coordxy lx, coordxy ly, coordxy hx, coordxy h void place_lregion( coordxy lx, coordxy ly, coordxy hx, coordxy hy, - coordxy nlx, coordxy nly, coordxy nhx,coordxy nhy, + coordxy nlx, coordxy nly, coordxy nhx, coordxy nhy, xint16 rtype, d_level *lev) {