/* Store routine for the fractal cave generator */
/* this routine probably should be an inline function or a macro. */
-static void store_height(int x, int y, int val)
+static void store_height(POSITION x, POSITION y, int val)
{
/* if on boundary set val > cutoff so walls are not as square */
if (((x == fill_data.xmin) || (y == fill_data.ymin) ||
}
-static bool hack_isnt_wall(int y, int x, int c1, int c2, int c3, int feat1, int feat2, int feat3, int info1, int info2, int info3)
+static bool hack_isnt_wall(POSITION y, POSITION x, int c1, int c2, int c3, int feat1, int feat2, int feat3, int info1, int info2, int info3)
{
/*
* function used to convert from height-map back to the
}
}
-bool generate_lake(int y0, int x0, int xsize, int ysize, int c1, int c2, int c3, int type)
+bool generate_lake(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int c1, int c2, int c3, int type)
{
- int x, y, i, xhsize, yhsize;
- int feat1, feat2, feat3;
+ POSITION x, y, xhsize, yhsize;
+ int i;
+ FEAT_IDX feat1, feat2, feat3;
/* offsets to middle from corner */
xhsize = xsize / 2;
/*
* Routine that fills the empty areas of a room with treasure and monsters.
*/
-void fill_treasure(int x1, int x2, int y1, int y2, int difficulty)
+void fill_treasure(POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty)
{
- int x, y, cx, cy, size;
+ POSITION x, y, cx, cy, size;
s32b value;
/* center of room:*/
* The area inside the walls is not touched:
* only granite is removed- normal walls stay
*/
-void build_room(int x1, int x2, int y1, int y2)
+void build_room(POSITION x1, POSITION x2, POSITION y1, POSITION y2)
{
- int x, y, i, xsize, ysize, temp;
+ POSITION x, y, xsize, ysize;
+ int i, temp;
/* Check if rectangle has no width */
if ((x1 == x2) || (y1 == y2)) return;
* The power variable is a measure of how well defended a region is.
* This alters the possible choices.
*/
-void build_recursive_room(int x1, int y1, int x2, int y2, int power)
+void build_recursive_room(POSITION x1, POSITION y1, POSITION x2, POSITION y2, int power)
{
- int xsize, ysize;
- int x, y;
+ POSITION xsize, ysize;
+ POSITION x, y;
int choice;
/* Temp variables */
* Note: no range checking is done so must be inside dungeon
* This routine also stomps on doors
*/
-void add_outer_wall(int x, int y, int light, int x1, int y1, int x2, int y2)
+void add_outer_wall(POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2)
{
cave_type *c_ptr;
feature_type *f_ptr;
extern void build_maze_vault(POSITION x0, POSITION y0, POSITION xsize, POSITION ysize, bool is_vault);
extern bool find_space(POSITION *y, POSITION *x, POSITION height, POSITION width);
extern void build_small_room(POSITION x0, POSITION y0);
-extern void add_outer_wall(int x, int y, int light, int x1, int y1, int x2, int y2);
+extern void add_outer_wall(POSITION x, POSITION y, int light, POSITION x1, POSITION y1, POSITION x2, POSITION y2);
extern int dist2(int x1, int y1, int x2, int y2, int h1, int h2, int h3, int h4);
extern void generate_room_floor(int y1, int x1, int y2, int x2, int light);
extern void generate_fill_perm_bold(int y1, int x1, int y2, int x2);
extern void generate_hmap(POSITION y0, POSITION x0, POSITION xsiz, POSITION ysiz, int grd, int roug, int cutoff);
extern bool generate_fracave(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int cutoff, bool light, bool room);
-extern void fill_treasure(int x1, int x2, int y1, int y2, int difficulty);
-extern bool generate_lake(int y0, int x0, int xsize, int ysize, int c1, int c2, int c3, int type);
-extern void build_recursive_room(int x1, int y1, int x2, int y2, int power);
-extern void build_room(int x1, int x2, int y1, int y2);
+extern void fill_treasure(POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty);
+extern bool generate_lake(POSITION y0, POSITION x0, POSITION xsize, POSITION ysize, int c1, int c2, int c3, int type);
+extern void build_recursive_room(POSITION x1, POSITION y1, POSITION x2, POSITION y2, int power);
+extern void build_room(POSITION x1, POSITION x2, POSITION y1, POSITION y2);
extern void r_visit(int y1, int x1, int y2, int x2, int node, int dir, int *visited);