/* * Places door at y, x position if at least 2 walls found */ static void try_door(int y, int x) { /* Paranoia */ if (!in_bounds(y, x)) return; /* Ignore walls */ if (cave[y][x].feat >= FEAT_MAGMA) return; /* Ignore room grids */ if (cave[y][x].info & (CAVE_ROOM)) return; /* Occasional door (if allowed) */ if ((randint0(100) < dun_tun_jct) && possible_doorway(y, x)) { /* Place a door */ place_random_door(y, x); } }
/* * Places door at y, x position if at least 2 walls found */ static void try_door(int y, int x) { /* Paranoia */ if (!in_bounds(y, x)) return; /* Ignore walls */ if (cave_have_flag_bold(y, x, FF_WALL)) return; /* Ignore room grids */ if (cave[y][x].info & (CAVE_ROOM)) return; /* Occasional door (if allowed) */ if ((randint0(100) < dun_tun_jct) && possible_doorway(y, x) && !(d_info[dungeon_type].flags1 & DF1_NO_DOORS)) { /* Place a door */ place_random_door(y, x, FALSE); } }