* Return TRUE and values for the center of the room if all went well.\n
* Otherwise, return FALSE.\n
*/
-static bool find_space(int *y, int *x, int height, int width)
+static bool find_space(POSITION *y, POSITION *x, POSITION height, POSITION width)
{
int candidates, pick;
int by, bx, by1, bx1, by2, bx2;
*/
static bool build_type1(void)
{
- int y, x, y2, x2, yval, xval;
- int y1, x1, xsize, ysize;
+ POSITION y, x, y2, x2, yval, xval;
+ POSITION y1, x1, xsize, ysize;
bool light;
*/
static bool build_type2(void)
{
- int y, x, xval, yval;
- int y1a, x1a, y2a, x2a;
- int y1b, x1b, y2b, x2b;
+ POSITION y, x, xval, yval;
+ POSITION y1a, x1a, y2a, x2a;
+ POSITION y1b, x1b, y2b, x2b;
bool light;
cave_type *c_ptr;
*/
static bool build_type3(void)
{
- int y, x, dy, dx, wy, wx;
- int y1a, x1a, y2a, x2a;
- int y1b, x1b, y2b, x2b;
- int yval, xval;
+ POSITION y, x, dy, dx, wy, wx;
+ POSITION y1a, x1a, y2a, x2a;
+ POSITION y1b, x1b, y2b, x2b;
+ POSITION yval, xval;
bool light;
cave_type *c_ptr;
*/
static bool build_type4(void)
{
- int y, x, y1, x1;
- int y2, x2, tmp, yval, xval;
+ POSITION y, x, y1, x1;
+ POSITION y2, x2, tmp, yval, xval;
bool light;
cave_type *c_ptr;
*/
static bool build_type5(void)
{
- int y, x, y1, x1, y2, x2, xval, yval;
+ POSITION y, x, y1, x1, y2, x2, xval, yval;
int i;
nest_mon_info_type nest_mon_info[NUM_NEST_MON_TYPE];
*/
static bool build_type6(void)
{
- int y, x, y1, x1, y2, x2, xval, yval;
+ POSITION y, x, y1, x1, y2, x2, xval, yval;
int i, j;
MONRACE_IDX what[16];
* @param transno 処理ID
* @return なし
*/
-static void coord_trans(int *x, int *y, int xoffset, int yoffset, int transno)
+static void coord_trans(POSITION *x, POSITION *y, POSITION xoffset, POSITION yoffset, int transno)
{
int i;
int temp;
* @param transno 変換ID
* @return なし
*/
-static void build_vault(int yval, int xval, int ymax, int xmax, cptr data,
- int xoffset, int yoffset, int transno)
+static void build_vault(POSITION yval, POSITION xval, POSITION ymax, POSITION xmax, cptr data,
+ POSITION xoffset, POSITION yoffset, int transno)
{
- int dx, dy, x, y, i, j;
-
+ POSITION dx, dy, x, y, i, j;
cptr t;
-
cave_type *c_ptr;
-
/* Place dungeon features and objects */
for (t = data, dy = 0; dy < ymax; dy++)
{
{
vault_type *v_ptr = NULL;
int dummy;
- int x, y;
- int xval, yval;
- int xoffset, yoffset;
+ POSITION x, y;
+ POSITION xval, yval;
+ POSITION xoffset, yoffset;
int transno;
/* Pick a lesser vault */
{
vault_type *v_ptr;
int dummy;
- int xval, yval;
- int x, y;
+ POSITION xval, yval;
+ POSITION x, y;
int transno;
int xoffset, yoffset;
* prevent generation of vaults with no-entrance.
*/
/* Find and reserve some space in the dungeon. Get center of room. */
- if (!find_space(&yval, &xval, abs(y) + 2, abs(x) + 2)) return FALSE;
+ if (!find_space(&yval, &xval, (POSITION)(abs(y) + 2), (POSITION)(abs(x) + 2))) return FALSE;
#ifdef FORCE_V_IDX
v_ptr = &v_info[76 + randint1(3)];
*/
static bool build_type9(void)
{
- int grd, roug, cutoff, xsize, ysize, y0, x0;
+ int grd, roug, cutoff;
+ POSITION xsize, ysize, y0, x0;
bool done, light, room;
*/
static bool build_type10(void)
{
- int y0, x0, xsize, ysize, vtype;
+ POSITION y0, x0, xsize, ysize, vtype;
/* Get size */
/* big enough to look good, small enough to be fairly common. */
*/
static bool build_type11(void)
{
- int rad, x, y, x0, y0;
+ POSITION rad, x, y, x0, y0;
int light = FALSE;
/* Occasional light */
*/
static bool build_type12(void)
{
- int rad, x, y, x0, y0;
+ POSITION rad, x, y, x0, y0;
int light = FALSE;
bool emptyflag = TRUE;
/* Bubble */
if (p1 > p2)
{
- int tmp = what[i1];
+ MONRACE_IDX tmp = what[i1];
what[i1] = what[i2];
what[i2] = tmp;
}
*/
static bool build_type14(void)
{
- int y, x, y2, x2, yval, xval;
- int y1, x1, xsize, ysize;
+ POSITION y, x, y2, x2, yval, xval;
+ POSITION y1, x1, xsize, ysize;
bool light;
/*
* Hack -- determine if a template is potion
*/
-static bool kind_is_potion(int k_idx)
+static bool kind_is_potion(KIND_OBJECT_IDX k_idx)
{
return k_info[k_idx].tval == TV_POTION;
}
*/
static bool build_type15(void)
{
- int y, x, y2, x2, yval, xval;
- int y1, x1, xsize, ysize;
+ POSITION y, x, y2, x2, yval, xval;
+ POSITION y1, x1, xsize, ysize;
bool light;
cave_type *c_ptr;
STORE_ALCHEMIST, STORE_MAGIC, STORE_BLACK, STORE_BOOK,
};
int n = sizeof stores / sizeof (int);
- int i, y, x, y1, x1, yval, xval;
+ POSITION i, y, x, y1, x1, yval, xval;
int town_hgt = rand_range(MIN_TOWN_HGT, MAX_TOWN_HGT);
int town_wid = rand_range(MIN_TOWN_WID, MAX_TOWN_WID);
bool prevent_bm = FALSE;