OSDN Git Service

[Refactor] #37353 is_open() を cave.c へ移動。 / Move is_open() to cave.c.
authorDeskull <deskull@users.sourceforge.jp>
Sat, 26 Jan 2019 09:35:24 +0000 (18:35 +0900)
committerDeskull <deskull@users.sourceforge.jp>
Sat, 26 Jan 2019 09:35:24 +0000 (18:35 +0900)
src/cave.c
src/cmd2.c
src/externs.h

index 875edfa..a5a986f 100644 (file)
@@ -5123,3 +5123,14 @@ bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode)
 
        return TRUE;
 }
+
+/*!
+ * @brief 地形は開くものであって、かつ開かれているかを返す /
+ * Attempt to open the given chest at the given location
+ * @param feat 地形ID
+ * @return 開いた地形である場合TRUEを返す /  Return TRUE if the given feature is an open door
+ */
+bool is_open(FEAT_IDX feat)
+{
+       return have_flag(f_info[feat].flags, FF_CLOSE) && (feat != feat_state(feat, FF_CLOSE));
+}
index b65b05c..d97dad9 100644 (file)
@@ -502,18 +502,6 @@ static bool do_cmd_open_chest(POSITION y, POSITION x, OBJECT_IDX o_idx)
 }
 
 /*!
- * @brief 地形は開くものであって、かつ開かれているかを返す /
- * Attempt to open the given chest at the given location
- * @param feat 地形ID
- * @return 開いた地形である場合TRUEを返す /  Return TRUE if the given feature is an open door
- */
-static bool is_open(IDX feat)
-{
-       return have_flag(f_info[feat].flags, FF_CLOSE) && (feat != feat_state(feat, FF_CLOSE));
-}
-
-
-/*!
  * @brief プレイヤーの周辺9マスに該当する地形がいくつあるかを返す /
  * Attempt to open the given chest at the given location
  * @param y 該当する地形の中から1つのY座標を返す参照ポインタ
index 458923f..32e65d8 100644 (file)
@@ -523,6 +523,7 @@ extern void disturb(bool stop_search, bool flush_output);
 extern void glow_deep_lava_and_bldg(void);
 extern bool cave_monster_teleportable_bold(MONSTER_IDX m_idx, POSITION y, POSITION x, BIT_FLAGS mode);
 extern bool cave_player_teleportable_bold(POSITION y, POSITION x, BIT_FLAGS mode);
+extern bool is_open(FEAT_IDX feat);
 
 /* cmd1.c */
 extern HIT_POINT critical_shot(WEIGHT weight, int plus_ammo, int plus_bow, HIT_POINT dam);