OSDN Git Service

[Refactor] #40571 Declared show_gold_on_floor in targeting.h
authorHourier <hourier@users.sourceforge.jp>
Fri, 24 Jul 2020 06:51:55 +0000 (15:51 +0900)
committerHourier <hourier@users.sourceforge.jp>
Sun, 26 Jul 2020 08:04:21 +0000 (17:04 +0900)
src/object/item-tester-hooker.c
src/target/targeting.c
src/target/targeting.h

index dc5f355..2b04500 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "object/item-tester-hooker.h"
 #include "object/object-info.h"
+#include "target/targeting.h"
 
 /*
  * Used during calls to "get_item()" and "show_inven()" and "show_equip()", and the choice window routines.
@@ -24,7 +25,6 @@ bool item_tester_okay(player_type *player_ptr, object_type *o_ptr, tval_type tva
         return FALSE;
 
     if (o_ptr->tval == TV_GOLD) {
-        extern bool show_gold_on_floor;
         if (!show_gold_on_floor)
             return FALSE;
     }
index 57b9608..acee4e4 100644 (file)
@@ -79,6 +79,8 @@
 #include "locale/english.h"
 #endif
 
+bool show_gold_on_floor = FALSE;
+
 /*!
  * @brief コンソール上におけるマップ表示の左上位置を返す /
  * Calculates current boundaries Called below and from "do_cmd_locate()".
@@ -448,8 +450,6 @@ static void evaluate_monster_exp(player_type *creature_ptr, char *buf, monster_t
     sprintf(buf, "%03ld", (long int)num);
 }
 
-bool show_gold_on_floor = FALSE;
-
 /*
  * Examine a grid, return a keypress.
  *
index cff1e2e..769b1ae 100644 (file)
@@ -5,6 +5,7 @@
 extern MONSTER_IDX target_who;
 extern POSITION target_col;
 extern POSITION target_row;
+extern bool show_gold_on_floor;
 
 void panel_bounds_center(void);
 void verify_panel(player_type *creature_ptr);