MCPcopy Create free account
hub / github.com/NetHack/NetHack / spo_endroom

Function spo_endroom

src/sp_lev.c:4118–4134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4116}
4117
4118staticfn void
4119spo_endroom(struct sp_coder *coder UNUSED)
4120{
4121 if (gc.coder->n_subroom > 1) {
4122 gc.coder->n_subroom--;
4123 gc.coder->tmproomlist[gc.coder->n_subroom] = NULL;
4124 gc.coder->failed_room[gc.coder->n_subroom] = TRUE;
4125 } else {
4126 /* no subroom, get out of top-level room */
4127 /* Need to ensure xstart/ystart/xsize/ysize have something sensible,
4128 in case there's some stuff to be created outside the outermost
4129 room, and there's no MAP. */
4130 if (gx.xsize <= 1 && gy.ysize <= 1)
4131 reset_xystart_size();
4132 }
4133 update_croom();
4134}
4135
4136/* callback for is_ok_location.
4137 stairs generated at random location shouldn't overwrite special terrain */

Callers 2

lspo_roomFunction · 0.85
lspo_regionFunction · 0.85

Calls 2

reset_xystart_sizeFunction · 0.85
update_croomFunction · 0.85

Tested by

no test coverage detected