OSDN Git Service

[Refactor] #37353 ウィザードモードフラグ を player_type 構造体から world_type 構造体へ移動.
[hengband/hengband.git] / src / save.c
index cdbdb81..44ad47a 100644 (file)
@@ -15,7 +15,9 @@
 #include "util.h"
 #include "save.h"
 #include "load.h"
+#include "report.h"
 
+#include "core.h"
 #include "artifact.h"
 #include "sort.h"
 #include "dungeon.h"
@@ -482,7 +484,7 @@ static void wr_options(void)
 
        c = 0;
 
-       if (p_ptr->wizard) c |= 0x0002;
+       if (current_world_ptr->wizard) c |= 0x0002;
 
        if (cheat_sight) c |= 0x0040;
        if (cheat_turn) c |= 0x0080;
@@ -520,11 +522,8 @@ static void wr_options(void)
                                /* Set */
                                option_flag[os] |= (1L << ob);
                        }
-
-                       /* Clear */
                        else
                        {
-                               /* Clear */
                                option_flag[os] &= ~(1L << ob);
                        }
                }
@@ -695,7 +694,7 @@ static void wr_extra(void)
        wr_s16b(p_ptr->arena_number);
        wr_s16b(p_ptr->inside_arena);
        wr_s16b(p_ptr->inside_quest);
-       wr_s16b(p_ptr->inside_battle);
+       wr_s16b(p_ptr->phase_out);
        wr_byte(p_ptr->exit_bldg);
        wr_byte(0); /* Unused */
 
@@ -846,7 +845,7 @@ static void wr_extra(void)
 
        wr_s32b(current_world_ptr->dungeon_turn);
 
-       wr_s32b(old_battle);
+       wr_s32b(current_world_ptr->arena_start_turn);
 
        wr_s16b(today_mon);
        wr_s16b(p_ptr->today_mon);