OSDN Git Service

[Refactor] #39963 Separated spells-type.h from spells.h
[hengband/hengband.git] / src / player-move.c
index 7ae0208..b71ced4 100644 (file)
 #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 "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 地形やその上のアイテムの隠された要素を全て明かす /
@@ -282,7 +281,7 @@ void py_pickup_aux(player_type *owner_ptr, OBJECT_IDX o_idx)
        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
@@ -306,7 +305,7 @@ void py_pickup_aux(player_type *owner_ptr, OBJECT_IDX o_idx)
                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))
@@ -378,20 +377,8 @@ void carry(player_type *creature_ptr, bool pickup)
        {
                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);
@@ -1010,7 +997,7 @@ void move_player(player_type *creature_ptr, DIRECTION dir, bool do_pickup, bool
                                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;
                        }
@@ -1835,8 +1822,6 @@ void run_step(player_type *creature_ptr, DIRECTION dir)
 }
 
 
-#ifdef TRAVEL
-
 /*!
  * @brief トラベル機能の判定処理 /
  * Test for traveling
@@ -1976,13 +1961,8 @@ void travel_step(player_type *creature_ptr)
        /* Travel Delay */
        Term_xtra(TERM_XTRA_DELAY, delay_factor);
 }
-#endif
 
 
-#ifdef TRAVEL
-/*
- * Hack: travel command
- */
 #define TRAVEL_UNABLE 9999
 
 static int flow_head = 0;
@@ -1990,7 +1970,6 @@ static int flow_tail = 0;
 static POSITION temp2_x[MAX_SHORT];
 static POSITION temp2_y[MAX_SHORT];
 
-
 /*!
  * @brief トラベル処理の記憶配列を初期化する Hack: forget the "flow" information
  * @param creature_ptr プレーヤーへの参照ポインタ
@@ -2208,7 +2187,6 @@ void do_cmd_travel(player_type *creature_ptr)
                if ((sx == ddx[i]) && (sy == ddy[i])) travel.dir = i;
        }
 }
-#endif
 
 
 /*
@@ -2219,11 +2197,6 @@ void do_cmd_travel(player_type *creature_ptr)
  */
 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)
        {
@@ -2257,7 +2230,6 @@ void disturb(player_type *creature_ptr, bool stop_search, bool stop_travel)
                creature_ptr->update |= (PU_FLOW);
        }
 
-#ifdef TRAVEL
        if (stop_travel)
        {
                /* Cancel */
@@ -2269,7 +2241,6 @@ void disturb(player_type *creature_ptr, bool stop_search, bool stop_travel)
                /* Calculate torch radius */
                creature_ptr->update |= (PU_TORCH);
        }
-#endif
 
        if (flush_disturb) flush();
 }