#include "angband.h"
#include "grid.h"
#include "trap.h"
+#include "monsterrace-hook.h"
/*!
*/
static bool detect_feat_flag(POSITION range, int flag, bool known)
{
- int x, y;
+ POSITION x, y;
bool detect = FALSE;
cave_type *c_ptr;
c_ptr->info &= ~(CAVE_UNSAFE);
- /* Redraw */
lite_spot(y, x);
}
}
/* Hack -- Memorize */
c_ptr->info |= (CAVE_MARK);
- /* Redraw */
lite_spot(y, x);
detect = TRUE;
*/
bool detect_objects_gold(POSITION range)
{
- int i, y, x;
+ OBJECT_IDX i;
+ POSITION y, x;
POSITION range2 = range;
bool detect = FALSE;
*/
bool detect_objects_normal(POSITION range)
{
- int i, y, x;
+ OBJECT_IDX i;
+ POSITION y, x;
POSITION range2 = range;
bool detect = FALSE;
*/
bool detect_objects_magic(POSITION range)
{
- int i, y, x, tv;
+ OBJECT_TYPE_VALUE tv;
+ OBJECT_IDX i;
+ POSITION y, x;
bool detect = FALSE;
for (i = 1; i < m_max; i++)
{
monster_type *m_ptr = &m_list[i];
- monster_race *r_ptr = &r_info[m_ptr->r_idx];
/* Skip dead monsters */
if (!m_ptr->r_idx) continue;
if (distance(p_ptr->y, p_ptr->x, y, x) > range) continue;
/* Detect non-living monsters */
- if (!monster_living(r_ptr))
+ if (!monster_living(m_ptr->r_idx))
{
/* Update monster recall window */
if (p_ptr->monster_race_idx == m_ptr->r_idx)
{
MONSTER_IDX i;
POSITION y, x;
- bool flag = FALSE;
+ bool flag = FALSE;
if (d_info[dungeon_type].flags1 & DF1_DARKNESS) range /= 3;
/* Aggravate everyone nearby */
for (i = 1; i < m_max; i++)
{
- monster_type *m_ptr = &m_list[i];
-/* monster_race *r_ptr = &r_info[m_ptr->r_idx]; */
+ monster_type *m_ptr = &m_list[i];
/* Paranoia -- Skip dead monsters */
if (!m_ptr->r_idx) continue;
/* Visual feedback */
move_cursor_relative(p_ptr->y, p_ptr->x);
- /* Redraw */
p_ptr->redraw |= (PR_HP);
p_ptr->window |= (PW_PLAYER);
for (this_o_idx = c_ptr->o_idx; this_o_idx; this_o_idx = next_o_idx)
{
object_type *o_ptr;
-
- /* Acquire object */
o_ptr = &o_list[this_o_idx];
/* Acquire next object */
p_ptr->update |= (PU_VIEW | PU_LITE | PU_FLOW | PU_MON_LITE | PU_MONSTERS);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
/* Update the health bar */
p_ptr->redraw |= (PR_HEALTH | PR_UHEALTH);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
if (m_ptr->ml)
{
char m_name[80];
-
- /* Acquire the monster name */
monster_desc(m_name, m_ptr, 0);
/* Dump a message */
/* Note */
note_spot(y, x);
- /* Redraw */
lite_spot(y, x);
update_local_illumination(y, x);
update_monster(c_ptr->m_idx, FALSE);
}
- /* Redraw */
lite_spot(y, x);
update_local_illumination(y, x);
p_ptr->update |= (PU_FLOW);
- /* Redraw map */
p_ptr->redraw |= (PR_MAP);
return dummy;