OSDN Git Service

[Refactor] #37353 glow_deep_lava_and_bldg() を floor-events.c/h. に移動。
authordeskull <deskull@users.sourceforge.jp>
Wed, 17 Apr 2019 14:29:32 +0000 (23:29 +0900)
committerdeskull <deskull@users.sourceforge.jp>
Wed, 17 Apr 2019 14:29:32 +0000 (23:29 +0900)
src/externs.h
src/floor-events.c
src/floor-events.h
src/floor-generate.c
src/grid.c

index edd9d9e..7968e9e 100644 (file)
@@ -452,7 +452,6 @@ extern void remove_mirror(POSITION y, POSITION x);
 extern void health_track(MONSTER_IDX m_idx);
 extern void monster_race_track(MONRACE_IDX r_idx);
 extern void object_kind_track(KIND_OBJECT_IDX k_idx);
-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);
index 545a82d..9a8b897 100644 (file)
@@ -1,5 +1,6 @@
 #include "angband.h"
 #include "floor.h"
+#include "floor-events.h"
 #include "grid.h"
 #include "monster.h"
 #include "monster-status.h"
@@ -313,4 +314,44 @@ void update_dungeon_feeling(void)
        p_ptr->redraw |= (PR_DEPTH);
 
        if (disturb_minor) disturb(FALSE, FALSE);
-}
\ No newline at end of file
+}
+
+
+/*
+ * Glow deep lava and building entrances in the floor
+ */
+void glow_deep_lava_and_bldg(void)
+{
+       POSITION y, x, yy, xx;
+       DIRECTION i;
+       grid_type *g_ptr;
+
+       /* Not in the darkness dungeon */
+       if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) return;
+
+       for (y = 0; y < current_floor_ptr->height; y++)
+       {
+               for (x = 0; x < current_floor_ptr->width; x++)
+               {
+                       g_ptr = &current_floor_ptr->grid_array[y][x];
+
+                       /* Feature code (applying "mimic" field) */
+
+                       if (have_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_GLOW))
+                       {
+                               for (i = 0; i < 9; i++)
+                               {
+                                       yy = y + ddy_ddd[i];
+                                       xx = x + ddx_ddd[i];
+                                       if (!in_bounds2(yy, xx)) continue;
+                                       current_floor_ptr->grid_array[yy][xx].info |= CAVE_GLOW;
+                               }
+                       }
+               }
+       }
+
+       /* Update the view and lite */
+       p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
+
+       p_ptr->redraw |= (PR_MAP);
+}
index b878424..12146ff 100644 (file)
@@ -3,4 +3,5 @@ void day_break(void);
 void night_falls(void);
 MONSTER_NUMBER count_all_hostile_monsters(void);
 byte get_dungeon_feeling(void);
-void update_dungeon_feeling(void);
\ No newline at end of file
+void update_dungeon_feeling(void);
+extern void glow_deep_lava_and_bldg(void);
index 575155b..9fd09d1 100644 (file)
 #include "floor.h"
 #include "floor-streams.h"
 #include "floor-generate.h"
+#include "floor-events.h"
 #include "trap.h"
 #include "monster.h"
 #include "quest.h"
index 854bcdd..74308d2 100644 (file)
@@ -5366,46 +5366,6 @@ void object_kind_track(KIND_OBJECT_IDX k_idx)
 }
 
 
-
-/*
- * Glow deep lava and building entrances in the floor
- */
-void glow_deep_lava_and_bldg(void)
-{
-       POSITION y, x, yy, xx;
-       DIRECTION i;
-       grid_type *g_ptr;
-
-       /* Not in the darkness dungeon */
-       if (d_info[p_ptr->dungeon_idx].flags1 & DF1_DARKNESS) return;
-
-       for (y = 0; y < current_floor_ptr->height; y++)
-       {
-               for (x = 0; x < current_floor_ptr->width; x++)
-               {
-                       g_ptr = &current_floor_ptr->grid_array[y][x];
-
-                       /* Feature code (applying "mimic" field) */
-
-                       if (have_flag(f_info[get_feat_mimic(g_ptr)].flags, FF_GLOW))
-                       {
-                               for (i = 0; i < 9; i++)
-                               {
-                                       yy = y + ddy_ddd[i];
-                                       xx = x + ddx_ddd[i];
-                                       if (!in_bounds2(yy, xx)) continue;
-                                       current_floor_ptr->grid_array[yy][xx].info |= CAVE_GLOW;
-                               }
-                       }
-               }
-       }
-
-       /* Update the view and lite */
-       p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
-
-       p_ptr->redraw |= (PR_MAP);
-}
-
 /*!
 * @brief 指定されたマスがモンスターのテレポート可能先かどうかを判定する。
 * @param m_idx モンスターID