#include "angband.h"
#include "core.h"
#include "util.h"
+#include "main/sound-definitions-table.h"
-#include "realm-song.h"
-#include "autopick.h"
+#include "realm/realm-song.h"
+#include "autopick/autopick.h"
#include "dungeon.h"
#include "floor.h"
#include "melee.h"
#include "player-move.h"
#include "player-status.h"
#include "player-effects.h"
+#include "player-race.h"
#include "player-class.h"
+#include "player-inventory.h"
#include "player-personality.h"
#include "spells-floor.h"
#include "feature.h"
#include "monster-status.h"
#include "object-hook.h"
#include "object-flavor.h"
-#include "spells.h"
+#include "spell/spells-type.h"
#include "cmd-basic.h"
-#include "view-mainwindow.h"
+#include "view/display-main-window.h"
#include "world.h"
-#include "objectkind.h"
-#include "autopick.h"
+#include "object/object-kind.h"
+#include "autopick/autopick.h"
#include "targeting.h"
-#ifdef TRAVEL
- /* for travel */
travel_type travel;
-#endif
/*!
* @brief 地形やその上のアイテムの隠された要素を全て明かす /
floor_type *floor_ptr = creature_ptr->current_floor_ptr;
g_ptr = &floor_ptr->grid_array[y][x];
- if (g_ptr->mimic && is_trap(g_ptr->feat))
+ if (g_ptr->mimic && is_trap(creature_ptr, g_ptr->feat))
{
disclose_grid(creature_ptr, y, x);
msg_print(_("トラップを発見した。", "You have found a trap."));
disturb(creature_ptr, FALSE, TRUE);
}
- if (is_hidden_door(g_ptr))
+ if (is_hidden_door(creature_ptr, g_ptr))
{
msg_print(_("隠しドアを発見した。", "You have found a secret door."));
disclose_grid(creature_ptr, y, x);
o_ptr = &owner_ptr->current_floor_ptr->o_list[o_idx];
#ifdef JP
- object_desc(old_name, o_ptr, OD_NAME_ONLY);
+ object_desc(owner_ptr, old_name, o_ptr, OD_NAME_ONLY);
object_desc_kosuu(kazu_str, o_ptr);
hirottakazu = o_ptr->number;
#endif
/* Get the object again */
o_ptr = &owner_ptr->inventory_list[slot];
- delete_object_idx(owner_ptr->current_floor_ptr, o_idx);
+ delete_object_idx(owner_ptr, o_idx);
if (owner_ptr->pseikaku == SEIKAKU_MUNCHKIN)
{
if (o_ptr->marked & OM_AUTODESTROY) return;
}
- object_desc(o_name, o_ptr, 0);
+ object_desc(owner_ptr, o_name, o_ptr, 0);
#ifdef JP
if ((o_ptr->name1 == ART_CRIMSON) && (owner_ptr->pseikaku == SEIKAKU_COMBAT))
void carry(player_type *creature_ptr, bool pickup)
{
/* Recenter the map around the player */
- verify_panel();
+ verify_panel(creature_ptr);
creature_ptr->update |= (PU_MONSTERS);
creature_ptr->redraw |= (PR_MAP);
{
object_type *o_ptr;
o_ptr = &creature_ptr->current_floor_ptr->o_list[this_o_idx];
-
-#ifdef ALLOW_EASY_SENSE /* TNB */
-
- /* Option: Make item sensing easy */
- if (easy_sense)
- {
- /* Sense the object */
- (void)sense_object(o_ptr);
- }
-
-#endif /* ALLOW_EASY_SENSE -- TNB */
-
GAME_TEXT o_name[MAX_NLEN];
- object_desc(o_name, o_ptr, 0);
+ object_desc(creature_ptr, o_name, o_ptr, 0);
next_o_idx = o_ptr->next_o_idx;
disturb(creature_ptr, FALSE, FALSE);
if (o_ptr->tval == TV_GOLD)
{
int value = (long)o_ptr->pval;
- delete_object_idx(creature_ptr->current_floor_ptr, this_o_idx);
+ delete_object_idx(creature_ptr, this_o_idx);
msg_format(_(" $%ld の価値がある%sを見つけた。", "You collect %ld gold pieces worth of %s."),
(long)value, o_name);
}
}
- lite_spot(oy, ox);
- lite_spot(ny, nx);
+ lite_spot(creature_ptr, oy, ox);
+ lite_spot(creature_ptr, ny, nx);
/* Check for new panel (redraw map) */
- verify_panel();
+ verify_panel(creature_ptr);
if (mpe_mode & MPE_FORGET_FLOW)
{
creature_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
/* Remove "unsafe" flag */
- if ((!creature_ptr->blind && !no_lite(creature_ptr)) || !is_trap(g_ptr->feat)) g_ptr->info &= ~(CAVE_UNSAFE);
+ if ((!creature_ptr->blind && !no_lite(creature_ptr)) || !is_trap(creature_ptr, g_ptr->feat)) g_ptr->info &= ~(CAVE_UNSAFE);
/* For get everything when requested hehe I'm *NASTY* */
if (floor_ptr->dun_level && (d_info[creature_ptr->dungeon_idx].flags1 & DF1_FORGET)) wiz_dark(creature_ptr);
pattern_seq(creature_ptr, creature_ptr->y, creature_ptr->x, y, x) && (p_can_enter || p_can_kill_walls))
{
/* Disturb the monster */
- (void)set_monster_csleep(g_ptr->m_idx, 0);
+ (void)set_monster_csleep(creature_ptr, g_ptr->m_idx, 0);
- monster_desc(m_name, m_ptr, 0);
+ monster_desc(creature_ptr, m_name, m_ptr, 0);
if (m_ptr->ml)
{
/* Auto-Recall if possible and visible */
- if (!creature_ptr->image) monster_race_track(m_ptr->ap_r_idx);
- health_track(g_ptr->m_idx);
+ if (!creature_ptr->image) monster_race_track(creature_ptr, m_ptr->ap_r_idx);
+ health_track(creature_ptr, g_ptr->m_idx);
}
/* displace? */
py_attack(creature_ptr, y, x, 0);
can_move = FALSE;
}
- else if (monster_can_cross_terrain(floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].feat, r_ptr, 0))
+ else if (monster_can_cross_terrain(creature_ptr, floor_ptr->grid_array[creature_ptr->y][creature_ptr->x].feat, r_ptr, 0))
{
do_past = TRUE;
}
else if (MON_MONFEAR(riding_m_ptr))
{
GAME_TEXT steed_name[MAX_NLEN];
- monster_desc(steed_name, riding_m_ptr, 0);
+ monster_desc(creature_ptr, steed_name, riding_m_ptr, 0);
msg_format(_("%sが恐怖していて制御できない。", "%^s is too scared to control."), steed_name);
can_move = FALSE;
disturb(creature_ptr, FALSE, TRUE);
if (can_move && MON_STUNNED(riding_m_ptr) && one_in_(2))
{
GAME_TEXT steed_name[MAX_NLEN];
- monster_desc(steed_name, riding_m_ptr, 0);
+ monster_desc(creature_ptr, steed_name, riding_m_ptr, 0);
msg_format(_("%sが朦朧としていてうまく動けない!", "You cannot control stunned %s!"), steed_name);
can_move = FALSE;
disturb(creature_ptr, FALSE, TRUE);
#endif
g_ptr->info |= (CAVE_MARK);
- lite_spot(y, x);
+ lite_spot(creature_ptr, y, x);
}
}
else
{
/* Closed doors */
- if (easy_open && is_closed_door(feat) && easy_open_door(creature_ptr, y, x)) return;
+ if (easy_open && is_closed_door(creature_ptr, feat) && easy_open_door(creature_ptr, y, x)) return;
#ifdef JP
msg_format("%sが行く手をはばんでいる。", name);
}
-#ifdef TRAVEL
-
/*!
* @brief トラベル機能の判定処理 /
* Test for traveling
if (creature_ptr->blind || no_lite(creature_ptr))
{
msg_print(_("目が見えない!", "You cannot see!"));
- return (0);
+ return 0;
}
/* break run when leaving trap detected region */
if (disturb_trap_detect)
{
/* Break Run */
- return (0);
+ return 0;
}
}
}
monster_type *m_ptr = &floor_ptr->m_list[g_ptr->m_idx];
/* Visible monster */
- if (m_ptr->ml) return (0);
+ if (m_ptr->ml) return 0;
}
}
}
}
- if (!new_dir) return (0);
+ if (!new_dir) return 0;
/* Access newly move grid */
g_ptr = &floor_ptr->grid_array[creature_ptr->y+ddy[new_dir]][creature_ptr->x+ddx[new_dir]];
/* Close door abort traveling */
- if (!easy_open && is_closed_door(g_ptr->feat)) return (0);
+ if (!easy_open && is_closed_door(creature_ptr, g_ptr->feat)) return 0;
/* Visible and unignorable trap abort tarveling */
- if (!g_ptr->mimic && !trap_can_be_ignored(creature_ptr, g_ptr->feat)) return (0);
+ if (!g_ptr->mimic && !trap_can_be_ignored(creature_ptr, g_ptr->feat)) return 0;
/* Move new grid */
return new_dir;
/* Travel Delay */
Term_xtra(TERM_XTRA_DELAY, delay_factor);
}
-#endif
-#ifdef TRAVEL
-/*
- * Hack: travel command
- */
#define TRAVEL_UNABLE 9999
static int flow_head = 0;
static POSITION temp2_x[MAX_SHORT];
static POSITION temp2_y[MAX_SHORT];
-
/*!
* @brief トラベル処理の記憶配列を初期化する Hack: forget the "flow" information
* @param creature_ptr プレーヤーへの参照ポインタ
if ((sx == ddx[i]) && (sy == ddy[i])) travel.dir = i;
}
}
-#endif
/*
*/
void disturb(player_type *creature_ptr, bool stop_search, bool stop_travel)
{
-#ifndef TRAVEL
- /* Unused */
- stop_travel = stop_travel;
-#endif
-
/* Cancel repeated commands */
if (command_rep)
{
creature_ptr->running = 0;
/* Check for new panel if appropriate */
- if (center_player && !center_running) verify_panel();
+ if (center_player && !center_running) verify_panel(creature_ptr);
/* Calculate torch radius */
creature_ptr->update |= (PU_TORCH);
creature_ptr->update |= (PU_FLOW);
}
-#ifdef TRAVEL
if (stop_travel)
{
/* Cancel */
travel.run = 0;
/* Check for new panel if appropriate */
- if (center_player && !center_running) verify_panel();
+ if (center_player && !center_running) verify_panel(creature_ptr);
/* Calculate torch radius */
creature_ptr->update |= (PU_TORCH);
}
-#endif
if (flush_disturb) flush();
}