OSDN Git Service

[Refactor] #37353 acquirement() を spell-object.c に移動。 / Move acquirement() to spells...
authorDeskull <deskull@users.sourceforge.jp>
Sat, 2 Feb 2019 07:39:00 +0000 (16:39 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sat, 2 Feb 2019 07:39:00 +0000 (16:39 +0900)
src/externs.h
src/object2.c
src/patron.c
src/spells-object.c
src/spells-object.h
src/wizard2.c

index 0d2aebf..fbe4f2a 100644 (file)
@@ -821,7 +821,6 @@ extern void place_object(POSITION y, POSITION x, BIT_FLAGS mode);
 extern bool make_gold(object_type *j_ptr);
 extern void place_gold(POSITION y, POSITION x);
 extern OBJECT_IDX drop_near(object_type *o_ptr, PERCENTAGE chance, POSITION y, POSITION x);
-extern void acquirement(POSITION y1, POSITION x1, int num, bool great, bool special, bool known);
 extern void inven_item_charges(INVENTORY_IDX item);
 extern void inven_item_describe(INVENTORY_IDX item);
 extern void inven_item_increase(INVENTORY_IDX item, ITEM_NUMBER num);
index 1489bab..c499a75 100644 (file)
@@ -5376,46 +5376,6 @@ OBJECT_IDX drop_near(object_type *j_ptr, PERCENTAGE chance, POSITION y, POSITION
        return (o_idx);
 }
 
-
-/*!
- * @brief 獲得ドロップを行う。
- * Scatter some "great" objects near the player
- * @param y1 配置したいフロアのY座標
- * @param x1 配置したいフロアのX座標
- * @param num 獲得の処理回数
- * @param great TRUEならば必ず高級品以上を落とす
- * @param special TRUEならば必ず特別品を落とす
- * @param known TRUEならばオブジェクトが必ず*鑑定*済になる
- * @return なし
- */
-void acquirement(POSITION y1, POSITION x1, int num, bool great, bool special, bool known)
-{
-       object_type *i_ptr;
-       object_type object_type_body;
-       BIT_FLAGS mode = AM_GOOD | (great || special ? AM_GREAT : 0L) | (special ? AM_SPECIAL : 0L) ;
-
-       /* Acquirement */
-       while (num--)
-       {
-               i_ptr = &object_type_body;
-               object_wipe(i_ptr);
-
-               /* Make a good (or great) object (if possible) */
-               if (!make_object(i_ptr, mode)) continue;
-
-               if (known)
-               {
-                       object_aware(i_ptr);
-                       object_known(i_ptr);
-               }
-
-               /* Drop the object */
-               (void)drop_near(i_ptr, -1, y1, x1);
-       }
-}
-
-
-
 /*!
  * @brief 魔道具の使用回数の残量を示すメッセージを表示する /
  * Describe the charges on an item in the inventory.
index 2a9f15a..a804b03 100644 (file)
@@ -5,11 +5,13 @@
 #include "object-curse.h"
 #include "monsterrace-hook.h"
 #include "objectkind-hook.h"
-#include "spells-summon.h"
 #include "mutation.h"
 #include "artifact.h"
 #include "player-status.h"
 
+#include "spells-summon.h"
+#include "spells-object.h"
+
 #ifdef JP
 /*!
  * @brief カオスパトロン名テーブル
index 8c88f30..cf5b1e7 100644 (file)
@@ -427,3 +427,42 @@ void amusement(POSITION y1, POSITION x1, int num, bool known)
                num--;
        }
 }
+
+
+
+/*!
+ * @brief 獲得ドロップを行う。
+ * Scatter some "great" objects near the player
+ * @param y1 配置したいフロアのY座標
+ * @param x1 配置したいフロアのX座標
+ * @param num 獲得の処理回数
+ * @param great TRUEならば必ず高級品以上を落とす
+ * @param special TRUEならば必ず特別品を落とす
+ * @param known TRUEならばオブジェクトが必ず*鑑定*済になる
+ * @return なし
+ */
+void acquirement(POSITION y1, POSITION x1, int num, bool great, bool special, bool known)
+{
+       object_type *i_ptr;
+       object_type object_type_body;
+       BIT_FLAGS mode = AM_GOOD | (great || special ? AM_GREAT : 0L) | (special ? AM_SPECIAL : 0L);
+
+       /* Acquirement */
+       while (num--)
+       {
+               i_ptr = &object_type_body;
+               object_wipe(i_ptr);
+
+               /* Make a good (or great) object (if possible) */
+               if (!make_object(i_ptr, mode)) continue;
+
+               if (known)
+               {
+                       object_aware(i_ptr);
+                       object_known(i_ptr);
+               }
+
+               /* Drop the object */
+               (void)drop_near(i_ptr, -1, y1, x1);
+       }
+}
index 462d80e..f3f9f35 100644 (file)
@@ -3,3 +3,4 @@
 extern bool create_ammo(void);
 extern bool import_magic_device(void);
 extern void amusement(POSITION y1, POSITION x1, int num, bool known);
+extern void acquirement(POSITION y1, POSITION x1, int num, bool great, bool special, bool known);
index b5f989e..a24a40a 100644 (file)
 #include "angband.h"
 #include "floor.h"
 #include "selfinfo.h"
-#include "spells-summon.h"
 #include "patron.h"
 #include "mutation.h"
 #include "quest.h"
 #include "artifact.h"
 #include "player-status.h"
 
+#include "spells-object.h"
+#include "spells-summon.h"
 
 /*!
  * @brief プレイヤーのヒットダイスを振り直す / Roll the hitdie -- aux of do_cmd_rerate()