OSDN Git Service

[Refactor] #37353 place_mirror() to spells-floor.c.
authordeskull <deskull@users.sourceforge.jp>
Wed, 6 Mar 2019 04:48:59 +0000 (13:48 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 6 Mar 2019 04:48:59 +0000 (13:48 +0900)
src/externs.h
src/spells-floor.c
src/spells-floor.h
src/spells3.c

index c0595e9..0827a3d 100644 (file)
@@ -959,7 +959,6 @@ extern void brand_weapon(int brand_type);
 extern void call_the_(void);
 extern void fetch(DIRECTION dir, WEIGHT wgt, bool require_los);
 extern void alter_reality(void);
-extern bool place_mirror(void);
 extern void identify_pack(void);
 extern int remove_curse(void);
 extern int remove_all_curse(void);
index 835ca3c..6c6aa57 100644 (file)
@@ -213,3 +213,29 @@ bool explosive_rune(void)
        return TRUE;
 }
 
+
+/*!
+ * @brief 鏡設置処理
+ * @return 実際に設置が行われた場合TRUEを返す
+ */
+bool place_mirror(void)
+{
+       if (!cave_clean_bold(p_ptr->y, p_ptr->x))
+       {
+               msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
+               return FALSE;
+       }
+
+       /* Create a mirror */
+       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_OBJECT;
+       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].mimic = feat_mirror;
+
+       /* Turn on the light */
+       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_GLOW;
+
+       note_spot(p_ptr->y, p_ptr->x);
+       lite_spot(p_ptr->y, p_ptr->x);
+       update_local_illumination(p_ptr->y, p_ptr->x);
+
+       return TRUE;
+}
index 1a69807..4f468dc 100644 (file)
@@ -4,3 +4,4 @@ extern void wiz_lite(bool ninja);
 extern void wiz_dark(void);
 extern bool warding_glyph(void);
 extern bool explosive_rune(void);
+extern bool place_mirror(void);
index f239a60..6474b37 100644 (file)
@@ -1581,33 +1581,6 @@ void alter_reality(void)
 }
 
 /*!
- * @brief 鏡設置処理
- * @return 実際に設置が行われた場合TRUEを返す
- */
-bool place_mirror(void)
-{
-       if (!cave_clean_bold(p_ptr->y, p_ptr->x))
-       {
-               msg_print(_("床上のアイテムが呪文を跳ね返した。", "The object resists the spell."));
-               return FALSE;
-       }
-
-       /* Create a mirror */
-       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_OBJECT;
-       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].mimic = feat_mirror;
-
-       /* Turn on the light */
-       current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info |= CAVE_GLOW;
-
-       note_spot(p_ptr->y, p_ptr->x);
-       lite_spot(p_ptr->y, p_ptr->x);
-       update_local_illumination(p_ptr->y, p_ptr->x);
-
-       return TRUE;
-}
-
-
-/*!
  * @brief 全所持アイテム鑑定処理 /
  * Identify everything being carried.
  * Done by a potion of "self knowledge".