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

Function add_subroom

src/mklev.c:321–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321void
322add_subroom(struct mkroom *proom,
323 coordxy lowx, coordxy lowy,
324 coordxy hix, coordxy hiy,
325 boolean lit, schar rtype, boolean special)
326{
327 struct mkroom *croom;
328
329#ifdef DEBUG
330 if (gn.nsubroom >= MAXNROFROOMS)
331 panic("level has too many subrooms");
332 if (proom->nsubrooms >= MAX_SUBROOMS)
333 panic("room has too many subrooms");
334#endif /*DEBUG*/
335 croom = &gs.subrooms[gn.nsubroom];
336 do_room_or_subroom(croom, lowx, lowy, hix, hiy, lit, rtype, special,
337 (boolean) FALSE);
338 proom->sbrooms[proom->nsubrooms++] = croom;
339 croom++;
340 croom->hx = -1;
341 gn.nsubroom++;
342}
343
344void
345free_luathemes(enum lua_theme_group theme_group)

Callers 1

create_subroomFunction · 0.85

Calls 2

do_room_or_subroomFunction · 0.85
panicFunction · 0.50

Tested by

no test coverage detected