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

Function mktemple

src/mkroom.c:597–620  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

595}
596
597staticfn void
598mktemple(void)
599{
600 struct mkroom *sroom;
601 coord *shrine_spot;
602 struct rm *lev;
603
604 if (!(sroom = pick_room(TRUE)))
605 return;
606
607 /* set up Priest and shrine */
608 sroom->rtype = TEMPLE;
609 /*
610 * In temples, shrines are blessed altars
611 * located in the center of the room
612 */
613 shrine_spot = shrine_pos((int) ((sroom - svr.rooms) + ROOMOFFSET));
614 lev = &levl[shrine_spot->x][shrine_spot->y];
615 lev->typ = ALTAR;
616 lev->altarmask = induced_align(80);
617 priestini(&u.uz, sroom, shrine_spot->x, shrine_spot->y, FALSE);
618 lev->altarmask |= AM_SHRINE;
619 svl.level.flags.has_temple = 1;
620}
621
622boolean
623nexttodoor(int sx, int sy)

Callers 2

do_mkroomFunction · 0.85
mkshopFunction · 0.85

Calls 4

pick_roomFunction · 0.85
shrine_posFunction · 0.85
induced_alignFunction · 0.85
priestiniFunction · 0.85

Tested by

no test coverage detected