From 3654e9e5fb16b087ecc12c10cbb0ecd79438726f Mon Sep 17 00:00:00 2001 From: deskull Date: Sat, 18 May 2019 19:20:32 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20can=5Fsave=20=E3=82=92=20c?= =?utf8?q?ore.c/h=20=E3=81=B8=E7=A7=BB=E5=8B=95=EF=BC=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/core.c | 2 ++ src/core.h | 2 ++ src/externs.h | 2 -- src/variable.c | 2 -- src/view-mainwindow.c | 1 + 5 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core.c b/src/core.c index 356ebb806..f3c6d6691 100644 --- a/src/core.c +++ b/src/core.c @@ -96,6 +96,8 @@ const concptr copyright[5] = "are included in all such copies." }; +bool can_save = FALSE; /* Game can be saved */ + concptr ANGBAND_SYS = "xxx"; //!< Hack -- The special Angband "System Suffix" This variable is used to choose an appropriate "pref-xxx" file #ifdef JP diff --git a/src/core.h b/src/core.h index 0cc1e8525..b7ea01145 100644 --- a/src/core.h +++ b/src/core.h @@ -18,6 +18,8 @@ extern concptr ANGBAND_SYS; extern concptr ANGBAND_KEYBOARD; extern concptr ANGBAND_GRAF; +extern bool can_save; + extern void play_game(bool new_game); extern s32b turn_real(s32b hoge); extern void prevent_turn_overflow(void); diff --git a/src/externs.h b/src/externs.h index 6c1aa0170..4be1f9802 100644 --- a/src/externs.h +++ b/src/externs.h @@ -81,8 +81,6 @@ extern term *angband_term[8]; extern concptr keymap_act[KEYMAP_MODES][256]; extern player_type *p_ptr; -extern bool can_save; - extern MONSTER_IDX pet_t_m_idx; extern MONSTER_IDX riding_t_m_idx; extern MONRACE_IDX today_mon; diff --git a/src/variable.c b/src/variable.c index 789b58b95..ffebd233e 100644 --- a/src/variable.c +++ b/src/variable.c @@ -85,8 +85,6 @@ player_type p_body; */ player_type *p_ptr = &p_body; -bool can_save = FALSE; /* Game can be saved */ - MONSTER_IDX pet_t_m_idx; MONSTER_IDX riding_t_m_idx; diff --git a/src/view-mainwindow.c b/src/view-mainwindow.c index 04826d663..f06096e2a 100644 --- a/src/view-mainwindow.c +++ b/src/view-mainwindow.c @@ -15,6 +15,7 @@ #include "autopick.h" #include "term.h" +#include "core.h" #include "files.h" #include "world.h" #include "quest.h" -- 2.11.0