Separate day_break() and night_falls() from process_world().
<ClCompile Include="..\..\src\cmd-pet.c" />\r
<ClCompile Include="..\..\src\cmd-quaff.c" />\r
<ClCompile Include="..\..\src\cmd-read.c" />\r
+ <ClCompile Include="..\..\src\floor-events.c" />\r
<ClCompile Include="..\..\src\floor-generate.c" />\r
<ClCompile Include="..\..\src\floor-save.c" />\r
<ClCompile Include="..\..\src\history.c" />\r
<ClInclude Include="..\..\src\cmd-usestaff.h" />\r
<ClInclude Include="..\..\src\defines.h" />\r
<ClInclude Include="..\..\src\externs.h" />\r
+ <ClInclude Include="..\..\src\floor-events.h" />\r
<ClInclude Include="..\..\src\gameoption.h" />\r
<ClInclude Include="..\..\src\gamevalue.h" />\r
<ClInclude Include="..\..\src\generate.h" />\r
<ClCompile Include="..\..\src\floor-streams.c">\r
<Filter>Source</Filter>\r
</ClCompile>\r
+ <ClCompile Include="..\..\src\floor-events.c">\r
+ <Filter>Source</Filter>\r
+ </ClCompile>\r
</ItemGroup>\r
<ItemGroup>\r
<ClInclude Include="..\..\src\angband.h">\r
<ClInclude Include="..\..\src\floor-streams.h">\r
<Filter>Header</Filter>\r
</ClInclude>\r
+ <ClInclude Include="..\..\src\floor-events.h">\r
+ <Filter>Header</Filter>\r
+ </ClInclude>\r
</ItemGroup>\r
<ItemGroup>\r
<ResourceCompile Include="..\..\src\angband.rc" />\r
cmd-quaff.c cmd-quaff.h cmd-read.c cmd-read.h cmd-spell.c cmd-spell.h \
cmd-usestaff.c cmd-usestaff.h cmd-zaprod.c cmd-zaprod.h cmd-zapwand.c \
cmd-zapwand.h defines.h dungeon.c effects.c externs.h files.c flavor.c \
- floor-generate.c floor-save.c floor-streams.c floor-streams.h \
+ floor-events.c floor-events.h floor-generate.c floor-save.c \
+ floor-streams.c floor-streams.h \
gameoption.c gameoption.h gamevalue.h \
generate.h grid.c grid.h h-basic.h h-config.h h-define.h hissatsu.c \
history.h history.c \
#include "cmd-zaprod.h"
#include "cmd-zapwand.h"
#include "cmd-pet.h"
+#include "floor-events.h"
static bool load = TRUE; /*!<ロード処理中の分岐フラグ*/
static int wild_regen = 20; /*!<広域マップ移動時の自然回復処理カウンタ(広域マップ1マス毎に20回処理を基本とする)*/
/* Check for dawn */
dawn = (!(turn % (TURNS_PER_TICK * TOWN_DAWN)));
- /* Day breaks */
- if (dawn)
- {
- POSITION y, x;
-
- /* Message */
- msg_print(_("夜が明けた。", "The sun has risen."));
-
- if (!p_ptr->wild_mode)
- {
- /* Hack -- Scan the town */
- for (y = 0; y < cur_hgt; y++)
- {
- for (x = 0; x < cur_wid; x++)
- {
- /* Get the cave grid */
- cave_type *c_ptr = &cave[y][x];
-
- /* Assume lit */
- c_ptr->info |= (CAVE_GLOW);
-
- /* Hack -- Memorize lit grids if allowed */
- if (view_perma_grids) c_ptr->info |= (CAVE_MARK);
+ if (dawn) day_break();
+ else night_falls();
- /* Hack -- Notice spot */
- note_spot(y, x);
- }
- }
- }
- }
-
- /* Night falls */
- else
- {
- POSITION y, x;
-
- /* Message */
- msg_print(_("日が沈んだ。", "The sun has fallen."));
-
- if (!p_ptr->wild_mode)
- {
- /* Hack -- Scan the town */
- for (y = 0; y < cur_hgt; y++)
- {
- for (x = 0; x < cur_wid; x++)
- {
- /* Get the cave grid */
- cave_type *c_ptr = &cave[y][x];
-
- /* Feature code (applying "mimic" field) */
- feature_type *f_ptr = &f_info[get_feat_mimic(c_ptr)];
-
- if (!is_mirror_grid(c_ptr) && !have_flag(f_ptr->flags, FF_QUEST_ENTER) &&
- !have_flag(f_ptr->flags, FF_ENTRANCE))
- {
- /* Assume dark */
- c_ptr->info &= ~(CAVE_GLOW);
-
- if (!have_flag(f_ptr->flags, FF_REMEMBER))
- {
- /* Forget the normal floor grid */
- c_ptr->info &= ~(CAVE_MARK);
-
- /* Hack -- Notice spot */
- note_spot(y, x);
- }
- }
- }
-
- /* Glow deep lava and building entrances */
- glow_deep_lava_and_bldg();
- }
- }
- }
-
- /* Update the monsters */
- p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);
-
- /* Redraw map */
- p_ptr->redraw |= (PR_MAP);
-
- /* Window stuff */
- p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
-
- if (p_ptr->special_defense & NINJA_S_STEALTH)
- {
- if (cave[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);
- }
}
}
--- /dev/null
+#include "angband.h"\r
+\r
+void day_break()\r
+{\r
+ POSITION y, x;\r
+ msg_print(_("夜が明けた。", "The sun has risen."));\r
+\r
+ if (!p_ptr->wild_mode)\r
+ {\r
+ /* Hack -- Scan the town */\r
+ for (y = 0; y < cur_hgt; y++)\r
+ {\r
+ for (x = 0; x < cur_wid; x++)\r
+ {\r
+ /* Get the cave grid */\r
+ cave_type *c_ptr = &cave[y][x];\r
+\r
+ /* Assume lit */\r
+ c_ptr->info |= (CAVE_GLOW);\r
+\r
+ /* Hack -- Memorize lit grids if allowed */\r
+ if (view_perma_grids) c_ptr->info |= (CAVE_MARK);\r
+\r
+ /* Hack -- Notice spot */\r
+ note_spot(y, x);\r
+ }\r
+ }\r
+ }\r
+\r
+ /* Update the monsters */\r
+ p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);\r
+\r
+ /* Redraw map */\r
+ p_ptr->redraw |= (PR_MAP);\r
+\r
+ /* Window stuff */\r
+ p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);\r
+\r
+ if (p_ptr->special_defense & NINJA_S_STEALTH)\r
+ {\r
+ if (cave[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);\r
+ }\r
+\r
+}\r
+\r
+void night_falls(void)\r
+{\r
+ POSITION y, x;\r
+ msg_print(_("日が沈んだ。", "The sun has fallen."));\r
+\r
+ if (!p_ptr->wild_mode)\r
+ {\r
+ /* Hack -- Scan the town */\r
+ for (y = 0; y < cur_hgt; y++)\r
+ {\r
+ for (x = 0; x < cur_wid; x++)\r
+ {\r
+ /* Get the cave grid */\r
+ cave_type *c_ptr = &cave[y][x];\r
+\r
+ /* Feature code (applying "mimic" field) */\r
+ feature_type *f_ptr = &f_info[get_feat_mimic(c_ptr)];\r
+\r
+ if (!is_mirror_grid(c_ptr) && !have_flag(f_ptr->flags, FF_QUEST_ENTER) &&\r
+ !have_flag(f_ptr->flags, FF_ENTRANCE))\r
+ {\r
+ /* Assume dark */\r
+ c_ptr->info &= ~(CAVE_GLOW);\r
+\r
+ if (!have_flag(f_ptr->flags, FF_REMEMBER))\r
+ {\r
+ /* Forget the normal floor grid */\r
+ c_ptr->info &= ~(CAVE_MARK);\r
+\r
+ /* Hack -- Notice spot */\r
+ note_spot(y, x);\r
+ }\r
+ }\r
+ }\r
+\r
+ /* Glow deep lava and building entrances */\r
+ glow_deep_lava_and_bldg();\r
+ }\r
+ }\r
+\r
+ /* Update the monsters */\r
+ p_ptr->update |= (PU_MONSTERS | PU_MON_LITE);\r
+\r
+ /* Redraw map */\r
+ p_ptr->redraw |= (PR_MAP);\r
+\r
+ /* Window stuff */\r
+ p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);\r
+\r
+ if (p_ptr->special_defense & NINJA_S_STEALTH)\r
+ {\r
+ if (cave[p_ptr->y][p_ptr->x].info & CAVE_GLOW) set_superstealth(FALSE);\r
+ }\r
+\r
+}\r
--- /dev/null
+void day_break(void);\r
+void night_falls(void);\r