some reformatting (3 of 4)

This commit is contained in:
PatR
2024-09-05 15:55:24 -07:00
parent aa043f0ddf
commit cc1066b1ff
19 changed files with 244 additions and 169 deletions

View File

@@ -64,7 +64,7 @@ mkroom_cmp(const genericptr vx, const genericptr vy)
}
/* Return TRUE if a door placed at (x, y) which otherwise passes okdoor()
* checks would be connecting into an area that was declared as joined = false.
* checks would be connecting into an area that was declared as joined=false.
* Checking for this in finddpos() enables us to have rooms with sub-areas
* (such as shops) that will never randomly generate unwanted doors in order
* to connect them up to other areas.
@@ -461,11 +461,12 @@ alloc_doors(void)
{
if (!svd.doors || gd.doorindex >= svd.doors_alloc) {
int c = svd.doors_alloc + DOORINC;
coord *doortmp = (coord *) alloc(c * sizeof(coord));
coord *doortmp = (coord *) alloc(c * sizeof (coord));
(void) memset((genericptr_t) doortmp, 0, c * sizeof(coord));
(void) memset((genericptr_t) doortmp, 0, c * sizeof (coord));
if (svd.doors) {
(void) memcpy(doortmp, svd.doors, svd.doors_alloc * sizeof(coord));
(void) memcpy(doortmp, svd.doors,
svd.doors_alloc * sizeof (coord));
free(svd.doors);
}
svd.doors = doortmp;
@@ -610,11 +611,13 @@ place_niche(
if (rn2(2)) {
*dy = 1;
if (!finddpos(&dd, aroom->lx, aroom->hy + 1, aroom->hx, aroom->hy + 1))
if (!finddpos(&dd, aroom->lx, aroom->hy + 1,
aroom->hx, aroom->hy + 1))
return FALSE;
} else {
*dy = -1;
if (!finddpos(&dd, aroom->lx, aroom->ly - 1, aroom->hx, aroom->ly - 1))
if (!finddpos(&dd, aroom->lx, aroom->ly - 1,
aroom->hx, aroom->ly - 1))
return FALSE;
}
*xx = dd.x;
@@ -1382,8 +1385,8 @@ level_finalize_topology(void)
mineralize(-1, -1, -1, -1, FALSE);
gi.in_mklev = FALSE;
/* avoid coordinates in future lua-loads for this level being thrown off
* because xstart and ystart aren't saved with the level and will be 0 after
* leaving and returning */
* because xstart and ystart aren't saved with the level and will be 0
* after leaving and returning */
gx.xstart = gy.ystart = 0;
/* has_morgue gets cleared once morgue is entered; graveyard stays
set (graveyard might already be set even when has_morgue is clear
@@ -2412,7 +2415,7 @@ mkinvpos(coordxy x, coordxy y, int dist)
}
if (!does_block(x, y, lev))
unblock_point(x, y); /* make sure vision knows this location is open */
unblock_point(x, y); /* make sure vision knows location is open */
/* display new value of position; could have a monster/object on it */
newsym(x, y);