OSDN Git Service

[Fix] #38923 メッセージの未定義変数参照バグ修正。 / Fix reference of undefined value.
[hengband/hengband.git] / src / floor-save.c
index d144640..76a8a7f 100644 (file)
@@ -14,6 +14,8 @@
 #include "floor.h"
 #include "generate.h"
 #include "grid.h"
+#include "monster.h"
+#include "quest.h"
 
 
 static FLOOR_IDX new_floor_id;  /*!<次のフロアのID / floor_id of the destination */
@@ -1184,11 +1186,11 @@ void change_floor(void)
                /* Maintain monsters and artifacts */
                if (loaded)
                {
-                       IDX i;
-                       s32b tmp_last_visit = sf_ptr->last_visit;
-                       s32b absence_ticks;
+                       MONSTER_IDX i;
+                       GAME_TURN tmp_last_visit = sf_ptr->last_visit;
+                       GAME_TURN absence_ticks;
                        int alloc_chance = d_info[dungeon_type].max_m_alloc_chance;
-                       int alloc_times;
+                       GAME_TURN alloc_times;
 
                        while (tmp_last_visit > turn) tmp_last_visit -= TURNS_PER_TICK * TOWN_DAWN;
                        absence_ticks = (turn - tmp_last_visit) / TURNS_PER_TICK;
@@ -1339,8 +1341,7 @@ void change_floor(void)
                }
 
                /* You see stairs blocked */
-               else if ((change_floor_mode & CFM_NO_RETURN) &&
-                        (change_floor_mode & (CFM_DOWN | CFM_UP)))
+               else if ((change_floor_mode & CFM_NO_RETURN) && (change_floor_mode & (CFM_DOWN | CFM_UP)))
                {
                        if (!p_ptr->blind)
                        {
@@ -1407,7 +1408,7 @@ void stair_creation(void)
 
        bool up = TRUE;
        bool down = TRUE;
-       s16b dest_floor_id = 0;
+       FLOOR_IDX dest_floor_id = 0;
 
 
        /* Forbid up staircases on Ironman mode */