#ifndef _DIGDUNGEON_H_6f1e6aca_ #define _DIGDUNGEON_H_6f1e6aca_ /* * APIs exported by digdungeon.c. These are, of course, things related * to digging the dungeon. */ #include "structs.h" /* * Dig out a cell, given the level it's on and its coordinates. The * cell must not be one of the border cells. This also handles * converting any ROCKs adjacent to the newly-dug cell to WALLs. */ extern void digcell(LEVEL *, int, int); /* * Clear a level. This sets all LOCs on the level to have the type * passed as a second argument, which must be LOC_ROCK or LOC_CAVE; if * LOC_CAVE, the cavetype is set to LOC_JUSTCAVE. All cells also have * their flags and inventory cleared and are set to have no monster. * The link-to link (for gates and stairs) is also cleared and the * on-level backpointers set to point to the level. */ extern void clearlevel(LEVEL *, LOCTYPE); /* * Given a rectangle described as a size-and-position (size sx,sy and * position px,py) on a level l, solidrock(l,sx,sy,px,py) returns true * iff all cells in the rectangle are of type LOC_ROCK. */ extern int solidrock(LEVEL *, int, int, int, int); /* * Clears out certain things for the whole dungeon. For every level, * this initializes the level's monster count to 0 and its cave-cell * count to the actual LOC_CAVE cell count. It also sets the subtype * of any walls and secret doors to "wall of unknown orientation" and * clears all non-permanent flag bits on each LOC. */ extern void cleardungeon(void); /* * Top-level routine for digging the dungeon. This sets up all levels * and digs the dungeon. It does not populate the dungeon with * anything (neither monsters nor objects), just the permanent * features like stairs, doors, and gates. */ extern void digdungeon(void); #endif