OSDN Git Service

[Refactor] #37353 職業ID定義を player-class.h へ移動.
[hengband/hengband.git] / src / player-move.c
index 72e14b4..2d96595 100644 (file)
  */
 
 #include "angband.h"
+#include "core.h"
 #include "util.h"
 
+#include "realm-song.h"
+#include "autopick.h"
+#include "dungeon.h"
 #include "floor.h"
 #include "melee.h"
 #include "grid.h"
 #include "player-move.h"
 #include "player-status.h"
 #include "player-effects.h"
+#include "player-class.h"
 #include "spells-floor.h"
 #include "feature.h"
 #include "warning.h"
 #include "spells.h"
 #include "cmd-basic.h"
 #include "view-mainwindow.h"
+#include "world.h"
+#include "objectkind.h"
+#include "autopick.h"
+#include "targeting.h"
 
 
+#ifdef TRAVEL
+ /* for travel */
+travel_type travel;
+#endif
 
 /*!
  * @brief 地形やその上のアイテムの隠された要素を明かす /
@@ -266,7 +279,7 @@ void search(void)
  * だが、違和感が\n
  * あるという指摘をうけたので、「~を拾った、~を持っている」という表示\n
  * にかえてある。そのための配列。\n
- * Add the given dungeon object to the character's inventory.\n
+ * Add the given dungeon object to the character's p_ptr->inventory_list.\n
  * Delete the object afterwards.\n
  */
 void py_pickup_aux(OBJECT_IDX o_idx)
@@ -295,7 +308,7 @@ void py_pickup_aux(OBJECT_IDX o_idx)
        slot = inven_carry(o_ptr);
 
        /* Get the object again */
-       o_ptr = &inventory[slot];
+       o_ptr = &p_ptr->inventory_list[slot];
 
        delete_object_idx(o_idx);
 
@@ -994,8 +1007,8 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
 
        m_ptr = &current_floor_ptr->m_list[g_ptr->m_idx];
 
-       if (inventory[INVEN_RARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
-       if (inventory[INVEN_LARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
+       if (p_ptr->inventory_list[INVEN_RARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
+       if (p_ptr->inventory_list[INVEN_LARM].name1 == ART_STORMBRINGER) stormbringer = TRUE;
 
        /* Player can not walk through "walls"... */
        /* unless in Shadow Form */
@@ -1127,7 +1140,7 @@ void move_player(DIRECTION dir, bool do_pickup, bool break_trap)
        {
                msg_format(_("空を飛ばないと%sの上には行けない。", "You need to fly to go through the %s."), f_name + f_info[get_feat_mimic(g_ptr)].name);
                free_turn(p_ptr);
-               running = 0;
+               p_ptr->running = 0;
                oktomove = FALSE;
        }
 
@@ -1878,7 +1891,7 @@ void run_step(DIRECTION dir)
        }
 
        /* Decrease the run counter */
-       if (--running <= 0) return;
+       if (--p_ptr->running <= 0) return;
 
        /* Take time */
        take_turn(p_ptr, 100);
@@ -2306,10 +2319,10 @@ void disturb(bool stop_search, bool stop_travel)
        }
 
        /* Cancel running */
-       if (running)
+       if (p_ptr->running)
        {
                /* Cancel */
-               running = 0;
+               p_ptr->running = 0;
 
                /* Check for new panel if appropriate */
                if (center_player && !center_running) verify_panel();