else
{
cave[py][px].feat = floor_type[randint0(100)];
- cave[py][px].info &= ~(CAVE_MASK);
- cave[py][px].info |= CAVE_FLOOR;
}
}
/* Update some things -- similar to GF_KILL_WALL */
/* Forget the wall */
c_ptr->info &= ~(CAVE_MARK);
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= (CAVE_FLOOR);
/* Remove the feature */
cave_set_feat(y, x, feat);
/* Remove the trap */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
note_spot(y, x);
lite_spot(y, x);
#define CAVE_VAULT 0x4000
#define CAVE_TRAP 0x8000
-#define CAVE_MASK (CAVE_FLOOR | CAVE_EXTRA | CAVE_INNER | CAVE_OUTER | CAVE_SOLID)
+#define CAVE_MASK (CAVE_FLOOR | CAVE_EXTRA | CAVE_INNER | CAVE_OUTER | CAVE_SOLID | CAVE_VAULT)
/*
* Bit flags for the "project()" function
}
/*
+ * Wipe all unnecessary flags after cave generation
+ */
+void wipe_generate_cave_flags(void)
+{
+ int x, y;
+
+ for (y = 0; y < MAX_HGT; y++)
+ {
+ for (x = 0; x < MAX_WID; x++)
+ {
+ /* Wipe unused flags */
+ cave[y][x].info &= ~(CAVE_MASK);
+ }
+ }
+
+}
+
+/*
* Generates a random dungeon level -RAK-
*
* Hack -- regenerate any "overflow" levels
}
}
+ wipe_generate_cave_flags();
+
place_pet();
/* The dungeon is ready */
/* Destroy the feature */
cave[y][x].feat = floor_type[randint0(100)];
- cave[y][x].info &= ~(CAVE_MASK);
- cave[y][x].info |= CAVE_FLOOR;
/* Update some things */
p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MONSTERS | PU_MON_LITE);
/* Notice */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
/* Note changes to viewable region */
if (player_has_los_bold(ny, nx)) do_view = TRUE;
/* Break the rune */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
/* Allow movement */
do_move = TRUE;
/* Break the rune */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
note_spot(ny, nx);
lite_spot(ny, nx);
if (r_ptr->flags2 & RF2_KILL_WALL)
{
c_ptr->feat = FEAT_GRASS;
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
}
if (!(r_ptr->flags7 & RF7_CAN_FLY) && !(r_ptr->flags8 & RF8_WILD_WOOD))
{
/* Break the rune */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
/* Notice */
note_spot(y, x);
/* Break the rune */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
note_spot(y, x);
lite_spot(y, x);
}
msg_format("A tree %s", message);
#endif
c_ptr->feat = (one_in_(3) ? FEAT_DEEP_GRASS : FEAT_GRASS);
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
/* Observe */
if (c_ptr->info & (CAVE_MARK)) obvious = TRUE;
else
{
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
}
}
else
{
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
}
}
/* Destroy the wall */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
}
/* Quartz / Magma with treasure */
/* Destroy the wall */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
/* Place some gold */
place_gold(y, x);
/* Destroy the wall */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
}
/* Rubble */
/* Destroy the rubble */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
/* Hack -- place an object */
if (randint0(100) < 10)
/* Destroy the feature */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
}
/* Notice */
else
{
cave[y][x].feat = floor_type[randint0(100)];
- cave[y][x].info &= ~(CAVE_MASK);
- cave[y][x].info |= CAVE_FLOOR;
}
}
/* Update some things -- similar to GF_KILL_WALL */
else
{
cave[y][x].feat = floor_type[randint0(100)];
- cave[y][x].info &= ~(CAVE_MASK);
- cave[y][x].info |= CAVE_FLOOR;
}
}
{
/* Create floor */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
}
}
}
{
/* Create floor */
c_ptr->feat = floor_type[randint0(100)];
- c_ptr->info &= ~(CAVE_MASK);
- c_ptr->info |= CAVE_FLOOR;
}
}
}