* 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;
/* Save the room location */
if (dun->cent_n < CENT_MAX)
{
- dun->cent[dun->cent_n].y = *y;
- dun->cent[dun->cent_n].x = *x;
+ dun->cent[dun->cent_n].y = (byte_hack)*y;
+ dun->cent[dun->cent_n].x = (byte_hack)*x;
dun->cent_n++;
}
*/
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;
* @param r_idx 確認したいモンスター種族ID
* @return Vault生成の最低必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_simple(int r_idx)
+static bool vault_aux_simple(MONRACE_IDX r_idx)
{
/* Okay */
return (vault_monster_okay(r_idx));
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_jelly(int r_idx)
+static bool vault_aux_jelly(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_animal(int r_idx)
+static bool vault_aux_animal(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_undead(int r_idx)
+static bool vault_aux_undead(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_chapel_g(int r_idx)
+static bool vault_aux_chapel_g(MONRACE_IDX r_idx)
{
static int chapel_list[] = {
MON_NOV_PRIEST, MON_NOV_PALADIN, MON_NOV_PRIEST_G, MON_NOV_PALADIN_G,
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_kennel(int r_idx)
+static bool vault_aux_kennel(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_mimic(int r_idx)
+static bool vault_aux_mimic(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_clone(int r_idx)
+static bool vault_aux_clone(MONRACE_IDX r_idx)
{
/* Validate the monster */
if (!vault_monster_okay(r_idx)) return (FALSE);
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_symbol_e(int r_idx)
+static bool vault_aux_symbol_e(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_symbol_g(int r_idx)
+static bool vault_aux_symbol_g(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_orc(int r_idx)
+static bool vault_aux_orc(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_troll(int r_idx)
+static bool vault_aux_troll(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_giant(int r_idx)
+static bool vault_aux_giant(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_dragon(int r_idx)
+static bool vault_aux_dragon(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_demon(int r_idx)
+static bool vault_aux_demon(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_cthulhu(int r_idx)
+static bool vault_aux_cthulhu(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
*/
static void vault_prep_symbol(void)
{
- int r_idx;
+ MONRACE_IDX r_idx;
/* Apply the monster restriction */
get_mon_num_prep(vault_aux_simple, NULL);
* @param r_idx 確認したいモンスター種族ID
* @return 生成必要条件を満たしているならTRUEを返す。
*/
-static bool vault_aux_dark_elf(int r_idx)
+static bool vault_aux_dark_elf(MONRACE_IDX r_idx)
{
int i;
static int dark_elf_list[] =
struct vault_aux_type
{
cptr name;
- bool (*hook_func)(int r_idx);
+ bool (*hook_func)(MONRACE_IDX r_idx);
void (*prep_func)(void);
int level;
int chance;
*/
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];
/* Pick some monster types */
for (i = 0; i < NUM_NEST_MON_TYPE; i++)
{
- int r_idx = 0, attempts = 100;
+ MONRACE_IDX r_idx = 0;
+ int attempts = 100;
monster_race *r_ptr = NULL;
while (attempts--)
if (r_ptr->flags3 & RF3_EVIL) align.sub_align |= SUB_ALIGN_EVIL;
if (r_ptr->flags3 & RF3_GOOD) align.sub_align |= SUB_ALIGN_GOOD;
- nest_mon_info[i].r_idx = r_idx;
+ nest_mon_info[i].r_idx = (s16b)r_idx;
nest_mon_info[i].used = FALSE;
}
case 4: place_secret_door(yval, x2 + 1, DOOR_DEFAULT); break;
}
- /* Describe */
- if (cheat_room)
- {
- /* Room type */
- msg_format(_("WIZ: モンスター部屋(nest)(%s%s)を生成します。", "WiZ: Monster nest (%s%s)"), n_ptr->name, pit_subtype_string(cur_nest_type, TRUE));
- }
+ msg_format_wizard(CHEAT_DUNGEON, _("モンスター部屋(nest)(%s%s)を生成します。", "Monster nest (%s%s)"), n_ptr->name, pit_subtype_string(cur_nest_type, TRUE));
/* Place some monsters */
for (y = yval - 2; y <= yval + 2; y++)
{
for (x = xval - 9; x <= xval + 9; x++)
{
- int r_idx;
+ MONRACE_IDX r_idx;
i = randint0(NUM_NEST_MON_TYPE);
r_idx = nest_mon_info[i].r_idx;
}
}
- if (cheat_room && cheat_hear)
+ if (cheat_room)
{
ang_sort_comp = ang_sort_comp_nest_mon_info;
ang_sort_swap = ang_sort_swap_nest_mon_info;
if (nest_mon_info[i].r_idx != nest_mon_info[i + 1].r_idx) break;
if (!nest_mon_info[i + 1].used) break;
}
- msg_format("WIZ: Nest構成モンスターNo.%d:%s", i, r_name + r_info[nest_mon_info[i].r_idx].name);
+ msg_format_wizard(CHEAT_DUNGEON, "Nest構成モンスターNo.%d:%s", i, r_name + r_info[nest_mon_info[i].r_idx].name);
}
}
*/
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;
- int what[16];
+ MONRACE_IDX what[16];
monster_type align;
/* Pick some monster types */
for (i = 0; i < 16; i++)
{
- int r_idx = 0, attempts = 100;
+ MONRACE_IDX r_idx = 0;
+ int attempts = 100;
monster_race *r_ptr = NULL;
while (attempts--)
/* Bubble */
if (p1 > p2)
{
- int tmp = what[i1];
+ MONRACE_IDX tmp = what[i1];
what[i1] = what[i2];
what[i2] = tmp;
}
}
}
- /* Message */
- if (cheat_room)
- {
- /* Room type */
- msg_format(_("WIZ: モンスター部屋(pit)(%s%s)を生成します。", "WIZ: Monster pit (%s%s)"), n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
- }
+ msg_format_wizard(CHEAT_DUNGEON, _("モンスター部屋(pit)(%s%s)を生成します。", "Monster pit (%s%s)"), n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
/* Select the entries */
for (i = 0; i < 8; i++)
{
/* Every other entry */
what[i] = what[i * 2];
-
- if (cheat_hear)
- {
- /* Message */
- msg_format("WIZ: Nest構成モンスターNo.%d:%s", i, r_name + r_info[what[i]].name);
- }
+ msg_format_wizard(CHEAT_DUNGEON, _("Nest構成モンスター選択No.%d:%s", "Nest Monster Select No.%d:%s"), i, r_name + r_info[what[i]].name);
}
/* Top and bottom rows */
* @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 */
/* No lesser vault found */
if (dummy >= SAFE_MAX_ATTEMPTS)
{
- if (cheat_room)
- {
- msg_print(_("警告!小さな地下室を配置できません!", "Warning! Could not place lesser vault!"));
- }
+ msg_print_wizard(CHEAT_DUNGEON, _("小型固定Vaultを配置できませんでした。", "Could not place lesser vault."));
return FALSE;
}
#endif
/* Message */
- if (cheat_room) msg_format(_("小さな地下室(%s)", "Lesser vault (%s)"), v_name + v_ptr->name);
+ msg_format_wizard(CHEAT_DUNGEON, _("小型Vault(%s)を生成しました。", "Lesser vault (%s)."), v_name + v_ptr->name);
/* Hack -- Build the vault */
build_vault(yval, xval, v_ptr->hgt, v_ptr->wid,
{
vault_type *v_ptr;
int dummy;
- int xval, yval;
- int x, y;
+ POSITION xval, yval;
+ POSITION x, y;
int transno;
int xoffset, yoffset;
/* No greater vault found */
if (dummy >= SAFE_MAX_ATTEMPTS)
{
- if (cheat_room)
- {
- msg_print(_("警告!巨大な地下室を配置できません!", "Warning! Could not place greater vault!"));
- }
+ msg_print_wizard(CHEAT_DUNGEON, _("大型固定Vaultを配置できませんでした。", "Could not place greater vault."));
return FALSE;
}
* 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)];
#endif
- /* Message */
- if (cheat_room) msg_format(_("巨大な地下室(%s)", "Greater vault (%s)"), v_name + v_ptr->name);
+ msg_format_wizard(CHEAT_DUNGEON, _("大型固定Vault(%s)を生成しました。", "Greater vault (%s)."), v_name + v_ptr->name);
/* Hack -- Build the vault */
build_vault(yval, xval, v_ptr->hgt, v_ptr->wid,
(val <= fill_data.c1)) val = fill_data.c1 + 1;
/* store the value in height-map format */
- cave[y][x].feat = val;
+ cave[y][x].feat = (s16b)val;
return;
}
}
/* Boundaries are walls */
- cave[fill_data.ymin][fill_data.xmin].feat = maxsize;
- cave[fill_data.ymax][fill_data.xmin].feat = maxsize;
- cave[fill_data.ymin][fill_data.xmax].feat = maxsize;
- cave[fill_data.ymax][fill_data.xmax].feat = maxsize;
+ cave[fill_data.ymin][fill_data.xmin].feat = (s16b)maxsize;
+ cave[fill_data.ymax][fill_data.xmin].feat = (s16b)maxsize;
+ cave[fill_data.ymin][fill_data.xmax].feat = (s16b)maxsize;
+ cave[fill_data.ymax][fill_data.xmax].feat = (s16b)maxsize;
/* Set the middle square to be an open area. */
cave[y0][x0].feat = 0;
/* 25% of the time use the other tile : it looks better this way */
if (randint1(100) < 75)
{
- cave[y][x].feat = feat1;
+ cave[y][x].feat = (s16b)feat1;
cave[y][x].info &= ~(CAVE_MASK);
cave[y][x].info |= info1;
return TRUE;
}
else
{
- cave[y][x].feat = feat2;
+ cave[y][x].feat = (s16b)feat2;
cave[y][x].info &= ~(CAVE_MASK);
cave[y][x].info |= info2;
return TRUE;
/* 25% of the time use the other tile : it looks better this way */
if (randint1(100) < 75)
{
- cave[y][x].feat = feat2;
+ cave[y][x].feat = (s16b)feat2;
cave[y][x].info &= ~(CAVE_MASK);
cave[y][x].info |= info2;
return TRUE;
}
else
{
- cave[y][x].feat = feat1;
+ cave[y][x].feat = (s16b)feat1;
cave[y][x].info &= ~(CAVE_MASK);
cave[y][x].info |= info1;
return TRUE;
}
else if (cave[y][x].feat <= c3)
{
- cave[y][x].feat = feat3;
+ cave[y][x].feat = (s16b)feat3;
cave[y][x].info &= ~(CAVE_MASK);
cave[y][x].info |= info3;
return TRUE;
* Quick and nasty fill routine used to find the connected region
* of floor in the middle of the cave
*/
-static void cave_fill(byte y, byte x)
+static void cave_fill(POSITION y, POSITION x)
{
int i, j, d;
int ty, tx;
fill_data.info1, fill_data.info2, fill_data.info3))
{
/* Enqueue that entry */
- temp_y[flow_tail] = j;
- temp_x[flow_tail] = i;
+ temp_y[flow_tail] = (byte_hack)j;
+ temp_x[flow_tail] = (byte_hack)i;
/* Advance the queue */
if (++flow_tail == TEMP_MAX) flow_tail = 0;
*/
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;
int xhsize = xsize / 2;
int yhsize = ysize / 2;
-
- if (cheat_room) msg_print("Bubble Vault");
+ msg_print_wizard(CHEAT_DUNGEON, _("泡型ランダムVaultを生成しました。", "Room Vault."));
/* Allocate center of bubbles */
center[0].x = (byte)randint1(xsize - 3) + 1;
}
}
- center[i].x = x;
- center[i].y = y;
+ center[i].x = (byte_hack)x;
+ center[i].y = (byte_hack)y;
}
/* Get distances to two closest centers */
/* initialize */
- min1 = distance(x, y, center[0].x, center[0].y);
- min2 = distance(x, y, center[1].x, center[1].y);
+ min1 = (u16b)distance(x, y, center[0].x, center[0].y);
+ min2 = (u16b)distance(x, y, center[1].x, center[1].y);
if (min1 > min2)
{
/* Scan the rest */
for (i = 2; i < BUBBLENUM; i++)
{
- temp = distance(x, y, center[i].x, center[i].y);
+ temp = (u16b)distance(x, y, center[i].x, center[i].y);
if (temp < min1)
{
xhsize = xsize / 2;
yhsize = ysize / 2;
- if (cheat_room) msg_print("Room Vault");
+ msg_print_wizard(CHEAT_DUNGEON, _("部屋型ランダムVaultを生成しました。", "Room Vault."));
/* fill area so don't get problems with arena levels */
for (x1 = 0; x1 < xsize; x1++)
xsize = xhsize * 2;
ysize = yhsize * 2;
- if (cheat_room) msg_print("Cave Vault");
+ msg_print_wizard(CHEAT_DUNGEON, _("洞穴ランダムVaultを生成しました。", "Cave Vault."));
light = done = FALSE;
room = TRUE;
bool light;
cave_type *c_ptr;
-
- if (cheat_room && is_vault) msg_print("Maze Vault");
+ msg_print_wizard(CHEAT_DUNGEON, _("迷路ランダムVaultを生成しました。", "Maze Vault."));
/* Choose lite or dark */
light = ((dun_level <= randint1(25)) && is_vault && !(d_info[dungeon_type].flags1 & DF1_DARKNESS));
int m, n, num_vertices;
int *visited;
- if (cheat_room) msg_print("Mini Checker Board Vault");
+ msg_print_wizard(CHEAT_DUNGEON, _("小型チェッカーランダムVaultを生成しました。", "Mini Checker Board Vault."));
/* Pick a random room size */
dy = ysize / 2 - 1;
y2 = y0 + dy;
x2 = x0 + dx;
- if (cheat_room) msg_print("Castle Vault");
+ msg_print_wizard(CHEAT_DUNGEON, _("城型ランダムVaultを生成しました。", "Castle Vault"));
/* generate the room */
for (y = y1 - 1; y <= y2 + 1; y++)
h3 = randint1(32);
h4 = randint1(32) - 16;
- if (cheat_room) msg_print("Target Vault");
+ msg_print_wizard(CHEAT_DUNGEON, _("対称形ランダムVaultを生成しました。", "Elemental Vault"));
/* work out outer radius */
if (xsize > ysize)
int xsize, ysize, xhsize, yhsize, x, y, i;
int type;
-
- if (cheat_room) msg_print("Elemental Vault");
+ msg_print_wizard(CHEAT_DUNGEON, _("精霊界ランダムVaultを生成しました。", "Elemental Vault"));
/* round to make sizes even */
xhsize = xsiz / 2;
*/
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;
/*
* Helper function for "trapped monster pit"
*/
-static bool vault_aux_trapped_pit(int r_idx)
+static bool vault_aux_trapped_pit(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
{0, 0, -1}
};
- int y, x, y1, x1, y2, x2, xval, yval;
+ POSITION y, x, y1, x1, y2, x2, xval, yval;
int i, j;
- int what[16];
+ MONRACE_IDX what[16];
monster_type align;
/* Pick some monster types */
for (i = 0; i < 16; i++)
{
- int r_idx = 0, attempts = 100;
+ MONRACE_IDX r_idx = 0;
+ int attempts = 100;
monster_race *r_ptr = NULL;
while (attempts--)
/* Bubble */
if (p1 > p2)
{
- int tmp = what[i1];
+ MONRACE_IDX tmp = what[i1];
what[i1] = what[i2];
what[i2] = tmp;
}
}
}
- /* Message */
- if (cheat_room)
- {
- /* Room type */
- msg_format(_("%s%sの罠ピット", "Trapped monster pit (%s%s)"), n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
- }
+ msg_format_wizard(CHEAT_DUNGEON, _("%s%sの罠ピットが生成されました。", "Trapped monster pit (%s%s)"),
+ n_ptr->name, pit_subtype_string(cur_pit_type, FALSE));
/* Select the entries */
for (i = 0; i < 8; i++)
*/
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;
c_ptr->mimic = c_ptr->feat;
c_ptr->feat = trap;
- /* Message */
- if (cheat_room)
- {
- msg_format(_("%sの部屋", "Room of %s"), f_name + f_info[trap].name);
- }
+ msg_format_wizard(CHEAT_DUNGEON, _("%sの部屋が生成されました。", "Room of %s was generated."), f_name + f_info[trap].name);
return TRUE;
}
/*
* Helper function for "glass room"
*/
-static bool vault_aux_lite(int r_idx)
+static bool vault_aux_lite(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
/*
* Helper function for "glass room"
*/
-static bool vault_aux_shards(int r_idx)
+static bool vault_aux_shards(MONRACE_IDX r_idx)
{
monster_race *r_ptr = &r_info[r_idx];
*/
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;
/* Place fixed lite berathers */
for (dir1 = 4; dir1 < 8; dir1++)
{
- int r_idx = get_mon_num(dun_level);
+ MONRACE_IDX r_idx = get_mon_num(dun_level);
y = yval + 2 * ddy_ddd[dir1];
x = xval + 2 * ddx_ddd[dir1];
case 2: /* 1 lite breather + random object */
{
- int r_idx, dir1;
+ MONRACE_IDX r_idx;
+ DIRECTION dir1;
/* Pillars */
c_ptr = &cave[y1 + 1][x1 + 1];
/* Place shard berathers */
for (dir1 = 4; dir1 < 8; dir1++)
{
- int r_idx = get_mon_num(dun_level);
+ MONRACE_IDX r_idx = get_mon_num(dun_level);
y = yval + ddy_ddd[dir1];
x = xval + ddx_ddd[dir1];
break;
}
- /* Message */
- if (cheat_room)
- {
- msg_print(_("ガラスの部屋", "Glass room"));
- }
+ msg_print_wizard(CHEAT_DUNGEON, _("ガラスの部屋が生成されました。", "Glass room was generated."));
return TRUE;
}
*/
static void build_stores(int ltcy, int ltcx, int stores[], int n)
{
- int i, j, y, x;
+ int i, y, x;
+ IDX j;
ugbldg_type *cur_ugbldg;
for (i = 0; i < n; i++)
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;
/* Build stores */
build_stores(y1, x1, stores, n);
- if (cheat_room) msg_print(_("地下街", "Underground Arcade"));
+ msg_print_wizard(CHEAT_DUNGEON, _("地下街を生成しました", "Underground arcade was generated."));
/* Free buildings array */
C_KILL(ugbldg, n, ugbldg_type);
if (!remain) break;
}
- if (rooms_built < 2) return FALSE; /*! @details 部屋生成数が2未満の場合生成失敗を返す */
-
- if (cheat_room)
+ /*! @details 部屋生成数が2未満の場合生成失敗を返す */
+ if (rooms_built < 2)
{
- msg_format(_("部屋数: %d", "Number of Rooms: %d"), rooms_built);
+ msg_format_wizard(CHEAT_DUNGEON, _("部屋数が2未満でした。生成を再試行します。", "Number of rooms was under 2. Retry."), rooms_built);
+ return FALSE;
}
+ msg_format_wizard(CHEAT_DUNGEON, _("このダンジョンの部屋数は %d です。", "Number of Rooms: %d"), rooms_built);
+
return TRUE;
}