static void mkzoo (int type) { struct mkroom *sroom; if ((sroom = pick_room(false)) != 0) { sroom->rtype = type; fill_zoo(sroom); } }
static void mkzoo(struct level *lev, int type, enum rng rng) { struct mkroom *sroom; if ((sroom = pick_room(lev, FALSE, rng)) != 0) { sroom->rtype = type; fill_zoo(lev, sroom, rng); } }
static void mkzoo(struct level *lev, int type) { struct mkroom *sroom; if ((sroom = pick_room(lev, FALSE)) != 0) { sroom->rtype = type; fill_zoo(lev, sroom); } }
static void mktemple (void) { struct mkroom *sroom; coord *shrine_spot; struct rm *lev; if(!(sroom = pick_room(true))) return; /* set up Priest and shrine */ sroom->rtype = TEMPLE; /* * In temples, shrines are blessed altars * located in the center of the room */ shrine_spot = shrine_pos((sroom - rooms) + ROOMOFFSET); lev = &levl[shrine_spot->x][shrine_spot->y]; lev->typ = ALTAR; lev->flags = induced_align(80); priestini(&u.uz, sroom, shrine_spot->x, shrine_spot->y, false); lev->flags |= AM_SHRINE; level.flags.has_temple = 1; }
static void mktemple(struct level *lev) { struct mkroom *sroom; coord *shrine_spot; struct rm *loc; if (!(sroom = pick_room(lev, TRUE, rng_for_level(&lev->z)))) return; /* set up Priest and shrine */ sroom->rtype = TEMPLE; /* * In temples, shrines are blessed altars * located in the center of the room */ shrine_spot = shrine_pos(lev, (sroom - lev->rooms) + ROOMOFFSET); loc = &lev->locations[shrine_spot->x][shrine_spot->y]; loc->typ = ALTAR; loc->altarmask = induced_align(&lev->z, 80, rng_for_level(&lev->z)); priestini(lev, sroom, shrine_spot->x, shrine_spot->y, FALSE); loc->altarmask |= AM_SHRINE; }