}
/* Fill with monsters and treasure, low difficulty */
- fill_treasure(x0 - xhsize + 1, x0 - xhsize + xsize - 2, y0 - yhsize + 1, y0 - yhsize + ysize - 2, randint1(5));
+ fill_treasure(current_floor_ptr, x0 - xhsize + 1, x0 - xhsize + xsize - 2, y0 - yhsize + 1, y0 - yhsize + ysize - 2, randint1(5));
}
/* Create a random vault that looks like a collection of overlapping rooms */
}
/* Fill with monsters and treasure, high difficulty */
- fill_treasure(x0 - xhsize + 1, x0 - xhsize + xsize - 2, y0 - yhsize + 1, y0 - yhsize + ysize - 2, randint1(5) + 5);
+ fill_treasure(current_floor_ptr, x0 - xhsize + 1, x0 - xhsize + xsize - 2, y0 - yhsize + 1, y0 - yhsize + ysize - 2, randint1(5) + 5);
}
}
/* Fill with monsters and treasure, low difficulty */
- fill_treasure(x0 - xhsize + 1, x0 - xhsize + xsize - 1, y0 - yhsize + 1, y0 - yhsize + ysize - 1, randint1(5));
+ fill_treasure(current_floor_ptr, x0 - xhsize + 1, x0 - xhsize + xsize - 1, y0 - yhsize + 1, y0 - yhsize + ysize - 1, randint1(5));
}
add_door(x0, y0 - y);
/* Fill with stuff - medium difficulty */
- fill_treasure(x0 - rad, x0 + rad, y0 - rad, y0 + rad, randint1(3) + 3);
+ fill_treasure(current_floor_ptr, x0 - rad, x0 + rad, y0 - rad, y0 + rad, randint1(3) + 3);
}
}
/* Fill with monsters and treasure, low difficulty */
- fill_treasure(x0 - xhsize + 1, x0 - xhsize + xsize - 1,
+ fill_treasure(current_floor_ptr, x0 - xhsize + 1, x0 - xhsize + xsize - 1,
y0 - yhsize + 1, y0 - yhsize + ysize - 1, randint1(5));
}
#endif /* ALLOW_CAVERNS_AND_LAKES */
}
/* Fill with monsters and treasure, highest difficulty */
- fill_treasure(x1, x2, y1, y2, 10);
+ fill_treasure(current_floor_ptr, x1, x2, y1, y2, 10);
C_KILL(visited, num_vertices, int);
}
build_recursive_room(x1, y1, x2, y2, randint1(5));
/* Fill with monsters and treasure, low difficulty */
- fill_treasure(x1, x2, y1, y2, randint1(3));
+ fill_treasure(current_floor_ptr, x1, x2, y1, y2, randint1(3));
}
/*
* Routine that fills the empty areas of a room with treasure and monsters.
*/
-void fill_treasure(POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty)
+void fill_treasure(floor_type *floor_ptr, POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty)
{
POSITION x, y, cx, cy, size;
s32b value;
if (value < 0)
{
/* Meanest monster + treasure */
- current_floor_ptr->monster_level = current_floor_ptr->base_level + 40;
+ floor_ptr->monster_level = floor_ptr->base_level + 40;
place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
- current_floor_ptr->monster_level = current_floor_ptr->base_level;
- current_floor_ptr->object_level = current_floor_ptr->base_level + 20;
+ floor_ptr->monster_level = floor_ptr->base_level;
+ floor_ptr->object_level = floor_ptr->base_level + 20;
place_object(y, x, AM_GOOD);
- current_floor_ptr->object_level = current_floor_ptr->base_level;
+ floor_ptr->object_level = floor_ptr->base_level;
}
else if (value < 5)
{
/* Mean monster +treasure */
- current_floor_ptr->monster_level = current_floor_ptr->base_level + 20;
+ floor_ptr->monster_level = floor_ptr->base_level + 20;
place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
- current_floor_ptr->monster_level = current_floor_ptr->base_level;
- current_floor_ptr->object_level = current_floor_ptr->base_level + 10;
+ floor_ptr->monster_level = floor_ptr->base_level;
+ floor_ptr->object_level = floor_ptr->base_level + 10;
place_object(y, x, AM_GOOD);
- current_floor_ptr->object_level = current_floor_ptr->base_level;
+ floor_ptr->object_level = floor_ptr->base_level;
}
else if (value < 10)
{
- current_floor_ptr->monster_level = current_floor_ptr->base_level + 9;
+ floor_ptr->monster_level = floor_ptr->base_level + 9;
place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
- current_floor_ptr->monster_level = current_floor_ptr->base_level;
+ floor_ptr->monster_level = floor_ptr->base_level;
}
else if (value < 17)
{
else if (value < 30)
{
/* Monster and trap */
- current_floor_ptr->monster_level = current_floor_ptr->base_level + 5;
+ floor_ptr->monster_level = floor_ptr->base_level + 5;
place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
- current_floor_ptr->monster_level = current_floor_ptr->base_level;
+ floor_ptr->monster_level = floor_ptr->base_level;
place_trap(y, x);
}
else if (value < 40)
/* Monster or object */
if (randint0(100) < 50)
{
- current_floor_ptr->monster_level = current_floor_ptr->base_level + 3;
+ floor_ptr->monster_level = floor_ptr->base_level + 3;
place_monster(y, x, (PM_ALLOW_SLEEP | PM_ALLOW_GROUP));
- current_floor_ptr->monster_level = current_floor_ptr->base_level;
+ floor_ptr->monster_level = floor_ptr->base_level;
}
if (randint0(100) < 50)
{
- current_floor_ptr->object_level = current_floor_ptr->base_level + 7;
+ floor_ptr->object_level = floor_ptr->base_level + 7;
place_object(y, x, 0L);
- current_floor_ptr->object_level = current_floor_ptr->base_level;
+ floor_ptr->object_level = floor_ptr->base_level;
}
}
else if (value < 50)
r_visit(y1, x1, y2, x2, randint0(num_vertices), 0, visited);
/* Fill with monsters and treasure, low difficulty */
- if (is_vault) fill_treasure(x1, x2, y1, y2, randint1(5));
+ if (is_vault) fill_treasure(current_floor_ptr, x1, x2, y1, y2, randint1(5));
C_KILL(visited, num_vertices, int);
}
* are included in all such copies. Other copyrights may also apply.<br
*/
+#pragma once
+#include "floor.h"
+
#define ALLOW_CAVERNS_AND_LAKES
#define DUN_ROOMS_MAX 40 /*!< 部屋生成処理の最大試行数 / Number of rooms to attempt (was 50) */
extern void generate_fill_perm_bold(POSITION y1, POSITION x1, POSITION y2, POSITION 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(POSITION x1, POSITION x2, POSITION y1, POSITION y2, int difficulty);
+extern void fill_treasure(floor_type *floor_ptr, 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);