/* Blind players see nothing */
if (p_ptr->blind) return FALSE;
- /* Access the cave grid */
c_ptr = &cave[y][x];
/* Note that "torch-lite" yields "illumination" */
feature_type *f_ptr = &f_info[feat];
TERM_COLOR a;
- byte c;
+ SYMBOL_CODE c;
/* Boring grids (floors, etc) */
if (!have_flag(f_ptr->flags, FF_REMEMBER))
if (player_bold(y, x))
{
monster_race *r_ptr = &r_info[0];
-
- /* Get the "player" attr */
*ap = r_ptr->x_attr;
-
- /* Get the "player" char */
*cp = r_ptr->x_char;
-
feat_priority = 31;
}
}
/*
* Place an attr/char pair at the given map coordinate, if legal.
*/
-void print_rel(char c, byte a, TERM_LEN y, TERM_LEN x)
+void print_rel(SYMBOL_CODE c, TERM_COLOR a, TERM_LEN y, TERM_LEN x)
{
/* Only do "legal" locations */
if (panel_contains(y, x))
if (!use_graphics)
{
if (world_monster) a = TERM_DARK;
- else if (IS_INVULN() || world_player) a = TERM_WHITE;
+ else if (IS_INVULN() || p_ptr->timewalk) a = TERM_WHITE;
else if (p_ptr->wraith_form) a = TERM_L_DARK;
}
if (view_torch_grids &&
((c_ptr->info & (CAVE_LITE | CAVE_MNLT)) || p_ptr->see_nocto))
{
- /* Memorize */
c_ptr->info |= (CAVE_MARK);
}
/* Option -- memorize all perma-lit floors */
else if (view_perma_grids && ((c_ptr->info & (CAVE_GLOW | CAVE_MNDK)) == CAVE_GLOW))
{
- /* Memorize */
c_ptr->info |= (CAVE_MARK);
}
}
/* Memorize normal grids */
else if (have_flag(f_ptr->flags, FF_LOS))
{
- /* Memorize */
c_ptr->info |= (CAVE_MARK);
}
/* Memorize torch-lit walls */
else if (c_ptr->info & (CAVE_LITE | CAVE_MNLT))
{
- /* Memorize */
c_ptr->info |= (CAVE_MARK);
}
/* Memorize walls seen by noctovision of Ninja */
else if (p_ptr->see_nocto)
{
- /* Memorize */
c_ptr->info |= (CAVE_MARK);
}
/* Memorize certain non-torch-lit wall grids */
else if (check_local_illumination(y, x))
{
- /* Memorize */
c_ptr->info |= (CAVE_MARK);
}
}
{
TERM_LEN x, y;
TERM_COLOR a;
- char c;
+ SYMBOL_CODE c;
TERM_COLOR ta = 0;
- char tc = '\0';
+ SYMBOL_CODE tc = '\0';
for (x = p_ptr->x - Term->wid / 2 + 1; x <= p_ptr->x + Term->wid / 2; x++)
{
if (!use_graphics)
{
if (world_monster) a = TERM_DARK;
- else if (IS_INVULN() || world_player) a = TERM_WHITE;
+ else if (IS_INVULN() || p_ptr->timewalk) a = TERM_WHITE;
else if (p_ptr->wraith_form) a = TERM_L_DARK;
}
if (panel_contains(y, x) && in_bounds2(y, x))
{
TERM_COLOR a;
- char c;
+ SYMBOL_CODE c;
TERM_COLOR ta;
- char tc;
+ SYMBOL_CODE tc;
/* Examine the grid */
map_info(y, x, &a, &c, &ta, &tc);
if (!use_graphics)
{
if (world_monster) a = TERM_DARK;
- else if (IS_INVULN() || world_player) a = TERM_WHITE;
+ else if (IS_INVULN() || p_ptr->timewalk) a = TERM_WHITE;
else if (p_ptr->wraith_form) a = TERM_L_DARK;
}
if (!use_graphics)
{
if (world_monster) a = TERM_DARK;
- else if (IS_INVULN() || world_player) a = TERM_WHITE;
+ else if (IS_INVULN() || p_ptr->timewalk) a = TERM_WHITE;
else if (p_ptr->wraith_form) a = TERM_L_DARK;
}
if (!use_graphics)
{
if (world_monster) a = TERM_DARK;
- else if (IS_INVULN() || world_player) a = TERM_WHITE;
+ else if (IS_INVULN() || p_ptr->timewalk) a = TERM_WHITE;
else if (p_ptr->wraith_form) a = TERM_L_DARK;
}
int i, j, x, y;
TERM_COLOR ta;
- char tc;
+ SYMBOL_CODE tc;
byte tp;
TERM_COLOR **bigma;
- char **bigmc;
+ SYMBOL_CODE **bigmc;
byte **bigmp;
TERM_COLOR **ma;
- char **mc;
+ SYMBOL_CODE **mc;
byte **mp;
/* Save lighting effects */
bool old_view_special_lite = view_special_lite;
bool old_view_granite_lite = view_granite_lite;
- int hgt, wid, yrat, xrat;
+ TERM_LEN hgt, wid, yrat, xrat;
int **match_autopick_yx;
object_type ***object_autopick_yx;
if (!use_graphics)
{
if (world_monster) ta = TERM_DARK;
- else if (IS_INVULN() || world_player) ta = TERM_WHITE;
+ else if (IS_INVULN() || p_ptr->timewalk) ta = TERM_WHITE;
else if (p_ptr->wraith_form) ta = TERM_L_DARK;
}
{
/* Free one row each array */
C_KILL(ma[y], (wid + 2), TERM_COLOR);
- C_KILL(mc[y], (wid + 2), char);
+ C_KILL(mc[y], (wid + 2), SYMBOL_CODE);
C_KILL(mp[y], (wid + 2), byte);
C_KILL(match_autopick_yx[y], (wid + 2), int);
C_KILL(object_autopick_yx[y], (wid + 2), object_type *);
{
/* Free one row each array */
C_KILL(bigma[y], (cur_wid + 2), TERM_COLOR);
- C_KILL(bigmc[y], (cur_wid + 2), char);
+ C_KILL(bigmc[y], (cur_wid + 2), SYMBOL_CODE);
C_KILL(bigmp[y], (cur_wid + 2), byte);
}
screen_save();
- /* Note */
prt(_("お待ち下さい...", "Please wait..."), 0, 0);
Term_fresh();
switch (f_ptr->subtype)
{
case CONVERT_TYPE_FLOOR:
- return floor_type[randint0(100)];
+ return feat_ground_type[randint0(100)];
case CONVERT_TYPE_WALL:
return fill_type[randint0(100)];
case CONVERT_TYPE_INNER:
return TRUE;
}
+
+/*!
+ * @brief 地形は開くものであって、かつ開かれているかを返す /
+ * Attempt to open the given chest at the given location
+ * @param feat 地形ID
+ * @return 開いた地形である場合TRUEを返す / Return TRUE if the given feature is an open door
+ */
+bool is_open(FEAT_IDX feat)
+{
+ return have_flag(f_info[feat].flags, FF_CLOSE) && (feat != feat_state(feat, FF_CLOSE));
+}