OSDN Git Service

[Refactor] #1437 Habu氏の指摘に従い、japanese.h/english.h のインクルードを言語に関係なく行うようにした
authorHourier <66951241+Hourier@users.noreply.github.com>
Sat, 16 Oct 2021 01:22:33 +0000 (10:22 +0900)
committerHourier <66951241+Hourier@users.noreply.github.com>
Sat, 16 Oct 2021 03:22:52 +0000 (12:22 +0900)
34 files changed:
src/action/movement-execution.cpp
src/birth/history-editor.cpp
src/cmd-action/cmd-spell.cpp
src/cmd-item/cmd-equipment.cpp
src/cmd-item/cmd-item.cpp
src/core/scores.cpp
src/flavor/named-item-describer.cpp
src/flavor/object-flavor.cpp
src/flavor/tval-description-switcher.cpp
src/floor/object-scanner.cpp
src/io/record-play-movie.cpp
src/knowledge/knowledge-quests.cpp
src/load/load-util.cpp
src/locale/english.cpp
src/locale/english.h
src/main-win/main-win-cfg-reader.cpp
src/main-win/main-win-cfg-reader.h
src/mind/mind-info.cpp
src/monster/monster-describer.cpp
src/player/eldritch-horror.cpp
src/racial/mutation-racial-selector.cpp
src/status/shape-changer.cpp
src/store/store.cpp
src/target/target-describer.cpp
src/util/angband-files.cpp
src/view/display-inventory.cpp
src/view/display-lore-attacks.cpp
src/view/display-lore-status.cpp
src/view/display-lore.cpp
src/view/display-scores.cpp
src/view/display-store.cpp
src/window/display-sub-windows.cpp
src/window/main-window-equipments.cpp
src/wizard/artifact-analyzer.cpp

index 52bad65..afd61de 100644 (file)
 #include "core/disturbance.h"
 #include "core/player-update-types.h"
 #include "core/stuff-handler.h"
-#include "floor/pattern-walk.h"
 #include "floor/geometry.h"
+#include "floor/pattern-walk.h"
 #include "game-option/input-options.h"
 #include "grid/feature.h"
 #include "grid/grid.h"
 #include "inventory/inventory-slot-types.h"
+#include "locale/english.h"
 #include "main/sound-definitions-table.h"
 #include "main/sound-of-music.h"
 #include "monster-race/monster-race.h"
 #include "system/grid-type-definition.h"
 #include "system/monster-race-definition.h"
 #include "system/monster-type-definition.h"
-#include "system/player-type-definition.h"
 #include "system/object-type-definition.h"
+#include "system/player-type-definition.h"
 #include "timed-effect/player-stun.h"
 #include "timed-effect/timed-effects.h"
 #include "util/bit-flags-calculator.h"
 #include "view/display-messages.h"
-#ifdef JP
-#else
-#include "locale/english.h"
-#endif
 
 /*!
  * Determine if a "boundary" grid is "floor mimic"
@@ -155,8 +152,7 @@ void exe_movement(player_type *player_ptr, DIRECTION dir, bool do_pickup, bool b
         stormbringer = true;
 
     feature_type *f_ptr = &f_info[g_ptr->feat];
-    bool p_can_kill_walls = has_kill_wall(player_ptr) && f_ptr->flags.has(FF::HURT_DISI) && (!p_can_enter || f_ptr->flags.has_not(FF::LOS))
-        && f_ptr->flags.has_not(FF::PERMANENT);
+    bool p_can_kill_walls = has_kill_wall(player_ptr) && f_ptr->flags.has(FF::HURT_DISI) && (!p_can_enter || f_ptr->flags.has_not(FF::LOS)) && f_ptr->flags.has_not(FF::PERMANENT);
     GAME_TEXT m_name[MAX_NLEN];
     bool can_move = true;
     bool do_past = false;
@@ -164,10 +160,7 @@ void exe_movement(player_type *player_ptr, DIRECTION dir, bool do_pickup, bool b
         monster_race *r_ptr = &r_info[m_ptr->r_idx];
         auto effects = player_ptr->effects();
         auto is_stunned = effects->stun()->is_stunned();
-        if (!is_hostile(m_ptr)
-            && !(player_ptr->confused || player_ptr->hallucinated || !m_ptr->ml || is_stunned
-                || (player_ptr->muta.has(MUTA::BERS_RAGE) && is_shero(player_ptr)))
-            && pattern_seq(player_ptr, player_ptr->y, player_ptr->x, y, x) && (p_can_enter || p_can_kill_walls)) {
+        if (!is_hostile(m_ptr) && !(player_ptr->confused || player_ptr->hallucinated || !m_ptr->ml || is_stunned || (player_ptr->muta.has(MUTA::BERS_RAGE) && is_shero(player_ptr))) && pattern_seq(player_ptr, player_ptr->y, player_ptr->x, y, x) && (p_can_enter || p_can_kill_walls)) {
             (void)set_monster_csleep(player_ptr, g_ptr->m_idx, 0);
             monster_desc(player_ptr, m_name, m_ptr, 0);
             if (m_ptr->ml) {
index ac76432..9ae027c 100644 (file)
@@ -1,14 +1,12 @@
 #include "birth/history-editor.h"
 #include "io/input-key-acceptor.h"
 #include "io/read-pref-file.h"
+#include "locale/japanese.h"
 #include "system/player-type-definition.h"
 #include "term/screen-processor.h"
 #include "term/term-color-types.h"
 #include "util/int-char-converter.h"
 #include "view/display-player.h" // 暫定。後で消す.
-#ifdef  JP
-#include "locale/japanese.h"
-#endif
 
 /*!
  * @brief 生い立ちメッセージを編集する。/Character background edit-mode
index 459749e..fdf709c 100644 (file)
@@ -26,6 +26,7 @@
 #include "io/input-key-acceptor.h"
 #include "io/input-key-requester.h"
 #include "io/write-diary.h"
+#include "locale/japanese.h"
 #include "main/sound-definitions-table.h"
 #include "main/sound-of-music.h"
 #include "object-hook/hook-magic.h"
@@ -66,9 +67,6 @@
 #include "util/buffer-shaper.h"
 #include "util/int-char-converter.h"
 #include "view/display-messages.h"
-#ifdef JP
-#include "locale/japanese.h"
-#endif
 
 static const int extra_magic_gain_exp = 4;
 
@@ -357,8 +355,7 @@ static int get_spell(player_type *player_ptr, SPELL_IDX *sn, concptr prompt, OBJ
     /* No "okay" spells */
     if (!okay)
         return false;
-    if (((use_realm) != player_ptr->realm1) && ((use_realm) != player_ptr->realm2) && (player_ptr->pclass != PlayerClassType::SORCERER)
-        && (player_ptr->pclass != PlayerClassType::RED_MAGE))
+    if (((use_realm) != player_ptr->realm1) && ((use_realm) != player_ptr->realm2) && (player_ptr->pclass != PlayerClassType::SORCERER) && (player_ptr->pclass != PlayerClassType::RED_MAGE))
         return false;
     if (((player_ptr->pclass == PlayerClassType::SORCERER) || (player_ptr->pclass == PlayerClassType::RED_MAGE)) && !is_magic(use_realm))
         return false;
@@ -1071,9 +1068,9 @@ bool do_cmd_cast(player_type *player_ptr)
         /* Ask for a spell */
 #ifdef JP
     if (!get_spell(player_ptr, &spell,
-            ((mp_ptr->spell_book == ItemKindType::LIFE_BOOK)           ? "詠唱する"
-                    : (mp_ptr->spell_book == ItemKindType::MUSIC_BOOK) ? "歌う"
-                                                            : "唱える"),
+            ((mp_ptr->spell_book == ItemKindType::LIFE_BOOK)       ? "詠唱する"
+                : (mp_ptr->spell_book == ItemKindType::MUSIC_BOOK) ? "歌う"
+                                                                   : "唱える"),
             sval, true, realm)) {
         if (spell == -2)
             msg_format("その本には知っている%sがない。", prayer);
@@ -1112,9 +1109,9 @@ bool do_cmd_cast(player_type *player_ptr)
             /* Warning */
 #ifdef JP
         msg_format("その%sを%sのに十分なマジックポイントがない。", prayer,
-            ((mp_ptr->spell_book == ItemKindType::LIFE_BOOK)          ? "詠唱する"
-                    : (mp_ptr->spell_book == ItemKindType::LIFE_BOOK) ? "歌う"
-                                                           : "唱える"));
+            ((mp_ptr->spell_book == ItemKindType::LIFE_BOOK)      ? "詠唱する"
+                : (mp_ptr->spell_book == ItemKindType::LIFE_BOOK) ? "歌う"
+                                                                  : "唱える"));
 #else
         msg_format("You do not have enough mana to %s this %s.", ((mp_ptr->spell_book == ItemKindType::LIFE_BOOK) ? "recite" : "cast"), prayer);
 #endif
@@ -1203,8 +1200,7 @@ bool do_cmd_cast(player_type *player_ptr)
             chg_virtue(player_ptr, V_CHANCE, 1);
 
         /* A spell was cast */
-        if (!(increment ? (player_ptr->spell_worked2 & (1UL << spell)) : (player_ptr->spell_worked1 & (1UL << spell))) && (player_ptr->pclass != PlayerClassType::SORCERER)
-            && (player_ptr->pclass != PlayerClassType::RED_MAGE)) {
+        if (!(increment ? (player_ptr->spell_worked2 & (1UL << spell)) : (player_ptr->spell_worked1 & (1UL << spell))) && (player_ptr->pclass != PlayerClassType::SORCERER) && (player_ptr->pclass != PlayerClassType::RED_MAGE)) {
             int e = s_ptr->sexp;
 
             /* The spell worked */
index 8cc7ca9..528fe54 100644 (file)
@@ -18,6 +18,7 @@
 #include "inventory/inventory-slot-types.h"
 #include "io/input-key-acceptor.h"
 #include "io/input-key-requester.h"
+#include "locale/japanese.h"
 #include "main/sound-definitions-table.h"
 #include "main/sound-of-music.h"
 #include "object-enchant/item-feeling.h"
 #include "view/display-inventory.h"
 #include "view/display-messages.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 /*!
  * @brief 装備一覧を表示するコマンドのメインルーチン / Display equipment
  */
index 3b7d785..bad95ec 100644 (file)
@@ -33,6 +33,7 @@
 #include "inventory/inventory-slot-types.h"
 #include "io/input-key-acceptor.h"
 #include "io/input-key-requester.h"
+#include "locale/japanese.h"
 #include "mind/snipe-types.h"
 #include "object-activation/activation-switcher.h"
 #include "object-hook/hook-magic.h"
 #include "view/display-inventory.h"
 #include "view/display-messages.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 /*!
  * @brief 持ち物一覧を表示するコマンドのメインルーチン / Display inventory_list
  */
index 4c37c99..7176cce 100644 (file)
@@ -22,6 +22,7 @@
 #include "io/report.h"
 #include "io/signal-handlers.h"
 #include "io/uid-checker.h"
+#include "locale/japanese.h"
 #include "player-info/class-info.h"
 #include "player/player-personality.h"
 #include "player/player-status.h"
 #include "view/display-scores.h"
 #include "world/world.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 /*!
  * @brief 所定ポインタへスコア情報を書き込む / Write one score to the highscore file
  * @param score スコア情報参照ポインタ
index 1a15375..e71654f 100644 (file)
@@ -3,6 +3,7 @@
 #include "flavor/object-flavor-types.h"
 #include "flavor/tval-description-switcher.h"
 #include "game-option/text-display-options.h"
+#include "locale/english.h"
 #include "mind/mind-weaponsmith.h"
 #include "object-enchant/object-ego.h"
 #include "object-enchant/special-object-flags.h"
@@ -16,7 +17,6 @@
 #include "util/string-processor.h"
 #ifdef JP
 #else
-#include "locale/english.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags1.h"
 #include "system/monster-race-definition.h"
@@ -257,8 +257,7 @@ static void describe_artifact_prefix_en(flavor_type *flavor_ptr)
     if (describe_prefix_en(flavor_ptr))
         return;
 
-    if ((flavor_ptr->known && flavor_ptr->o_ptr->is_artifact())
-        || ((flavor_ptr->o_ptr->tval == ItemKindType::CORPSE) && (r_info[flavor_ptr->o_ptr->pval].flags1 & RF1_UNIQUE))) {
+    if ((flavor_ptr->known && flavor_ptr->o_ptr->is_artifact()) || ((flavor_ptr->o_ptr->tval == ItemKindType::CORPSE) && (r_info[flavor_ptr->o_ptr->pval].flags1 & RF1_UNIQUE))) {
         flavor_ptr->t = object_desc_str(flavor_ptr->t, "The ");
         return;
     }
index c4666c1..9e6c0e0 100644 (file)
@@ -18,6 +18,8 @@
 #include "grid/trap.h"
 #include "inventory/inventory-slot-types.h"
 #include "io/files-util.h"
+#include "locale/english.h"
+#include "locale/japanese.h"
 #include "mind/mind-sniper.h"
 #include "mind/mind-weaponsmith.h"
 #include "monster-race/monster-race.h"
 #include "util/quarks.h"
 #include "util/string-processor.h"
 #include "world/world.h"
-#ifdef JP
-#include "locale/japanese.h"
-#else
-#include "locale/english.h"
-#endif
-
 #include <utility>
 
 /*!
index 07b4698..fe6fd98 100644 (file)
@@ -6,6 +6,7 @@
 
 #include "flavor/tval-description-switcher.h"
 #include "flavor/flavor-util.h"
+#include "locale/english.h"
 #include "monster-race/monster-race.h"
 #include "object-enchant/trg-types.h"
 #include "object/object-kind.h"
@@ -13,7 +14,6 @@
 #include "system/object-type-definition.h"
 #ifdef JP
 #else
-#include "locale/english.h"
 #include "monster-race/race-flags1.h"
 #include "player-info/class-info.h"
 #endif
index a1a89ff..5a30775 100644 (file)
@@ -4,6 +4,7 @@
 #include "game-option/text-display-options.h"
 #include "inventory/inventory-util.h"
 #include "io/input-key-requester.h"
+#include "locale/japanese.h"
 #include "object/item-tester-hooker.h"
 #include "object/object-mark-types.h"
 #include "system/floor-type-definition.h"
 #include "term/gameterm.h"
 #include "term/screen-processor.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 /*!
  * @brief 床に落ちているオブジェクトの数を返す / scan floor items
  * @param items オブジェクトのIDリストを返すための配列参照ポインタ
index a4a2608..fdcef1e 100644 (file)
 #include "io/files-util.h"
 #include "io/inet.h"
 #include "io/signal-handlers.h"
+#include "locale/japanese.h"
 #include "system/player-type-definition.h"
 #include "term/gameterm.h"
 #include "util/angband-files.h"
 #include "view/display-messages.h"
 #include <algorithm>
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 #ifdef WINDOWS
 #include <windows.h>
 #define WAIT 100
@@ -82,7 +79,7 @@ static errr init_buffer(void)
     fresh_queue.next = fresh_queue.tail = 0;
     ring.wptr = ring.rptr = ring.inlen = 0;
     fresh_queue.time[0] = 0;
-    ring.buf = static_cast<char*>(malloc(RINGBUF_SIZE));
+    ring.buf = static_cast<char *>(malloc(RINGBUF_SIZE));
     if (ring.buf == nullptr)
         return -1;
 
index 85b7a77..695f324 100644 (file)
@@ -24,7 +24,6 @@
 #include "term/screen-processor.h"
 #include "util/angband-files.h"
 #include "util/sort.h"
-
 #include <numeric>
 
 /*!
index 107366a..4249c11 100644 (file)
@@ -1,8 +1,6 @@
 #include "load/load-util.h"
-#include "term/screen-processor.h"
-#ifdef JP
 #include "locale/japanese.h"
-#endif
+#include "term/screen-processor.h"
 
 FILE *loading_savefile;
 uint32_t loading_savefile_version;
index 5576317..966d3c6 100644 (file)
@@ -1,4 +1,5 @@
 #include "locale/english.h"
+#include "system/angband.h"
 #include "util/string-processor.h"
 
 /*!
index e432a8c..bf92909 100644 (file)
@@ -1,6 +1,6 @@
 #pragma once
 
-#include "system/angband.h"
-
+#ifndef JP
 void plural_aux(char * Name);
 bool is_a_vowel(int ch);
+#endif
index 385e311..1ae05c4 100644 (file)
@@ -3,16 +3,14 @@
  * @brief Windows版固有実装(.cfgファイル処理)
  */
 
-#include "locale/japanese.h"
 #include "main-win/main-win-cfg-reader.h"
+#include "locale/japanese.h"
 #include "main-win/main-win-define.h"
 #include "main-win/main-win-file-utils.h"
 #include "main-win/main-win-tokenizer.h"
+#include "main/sound-definitions-table.h"
 #include "term/z-term.h"
 #include "util/angband-files.h"
-
-#include "main/sound-definitions-table.h"
-
 #include <windows.h>
 
 // 1つの項目に設定可能な最大ファイル数
@@ -103,7 +101,7 @@ CfgData *CfgReader::read_sections(std::initializer_list<cfg_section> sections)
     char *tokens[SAMPLE_MAX];
 
     for (auto &section : sections) {
-    
+
         bool has_data = false;
         int index = 0;
         concptr read_key;
index 33b1462..5b18274 100644 (file)
@@ -1,7 +1,6 @@
 #pragma once
 
-#include "system/h-type.h"
-
+#include "system/angband.h"
 #include <cstddef>
 #include <vector>
 #include <unordered_map>
index 2f86ee7..72c4833 100644 (file)
@@ -1,14 +1,11 @@
 #include "mind/mind-info.h"
 #include "cmd-action/cmd-spell.h"
+#include "locale/japanese.h"
 #include "mind/mind-force-trainer.h"
 #include "mind/mind-types.h"
 #include "player-info/equipment-info.h"
 #include "system/player-type-definition.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 static void switch_mind_mindcrafter(player_type *player_ptr, const PLAYER_LEVEL plev, const int power, char *p)
 {
     switch (power) {
index cd38b5a..bb3e95b 100644 (file)
@@ -1,5 +1,6 @@
 #include "monster/monster-describer.h"
 #include "io/files-util.h"
+#include "locale/english.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags1.h"
 #include "monster/monster-description-types.h"
 #include "util/quarks.h"
 #include "util/string-processor.h"
 #include "view/display-messages.h"
-#ifdef JP
-#else
-#include "locale/english.h"
-#endif
 
 /*!
  * @brief モンスターの呼称を作成する / Build a string describing a monster in some way.
@@ -257,7 +254,6 @@ void message_pain(player_type *player_ptr, MONSTER_IDX m_idx, HIT_POINT dam)
 
     GAME_TEXT m_name[MAX_NLEN];
 
-
     monster_desc(player_ptr, m_name, m_ptr, 0);
 
     if (dam == 0) {
index 5a3b4ac..43002f0 100644 (file)
@@ -7,6 +7,7 @@
 #include "player/eldritch-horror.h"
 #include "core/player-update-types.h"
 #include "core/stuff-handler.h"
+#include "locale/english.h"
 #include "monster-race/monster-race-hook.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags1.h"
 #include "system/player-type-definition.h"
 #include "view/display-messages.h"
 #include "world/world.h"
-#ifdef JP
-#else
-#include "locale/english.h"
-#endif
 
 /*!
  * @brief エルドリッチホラーの形容詞種別を決める
@@ -198,8 +195,7 @@ void sanity_blast(player_type *player_ptr, monster_type *m_ptr, bool necro)
     }
 
     /* 過去の効果無効率再現のため5回saving_throw 実行 */
-    if (saving_throw(player_ptr->skill_sav - power) && saving_throw(player_ptr->skill_sav - power) && saving_throw(player_ptr->skill_sav - power)
-        && saving_throw(player_ptr->skill_sav - power) && saving_throw(player_ptr->skill_sav - power)) {
+    if (saving_throw(player_ptr->skill_sav - power) && saving_throw(player_ptr->skill_sav - power) && saving_throw(player_ptr->skill_sav - power) && saving_throw(player_ptr->skill_sav - power) && saving_throw(player_ptr->skill_sav - power)) {
         return;
     }
 
index 9c175be..f8f8ce9 100644 (file)
@@ -1,14 +1,11 @@
 #include "racial/mutation-racial-selector.h"
 #include "cmd-action/cmd-spell.h"
+#include "locale/japanese.h"
 #include "mutation/mutation-flag-types.h"
 #include "racial/racial-util.h"
 #include "system/player-type-definition.h"
 #include "util/enum-converter.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 void select_mutation_racial(player_type *player_ptr, rc_type *rc_ptr)
 {
     rpi_type rpi;
index 2e37fe4..cbcc964 100644 (file)
@@ -10,6 +10,7 @@
 #include "game-option/disturbance-options.h"
 #include "grid/grid.h"
 #include "hpmp/hp-mp-processor.h"
+#include "locale/english.h"
 #include "mutation/mutation-investor-remover.h"
 #include "player-info/class-info.h"
 #include "player/player-damage.h"
 #include "timed-effect/timed-effects.h"
 #include "util/enum-converter.h"
 #include "view/display-messages.h"
-#ifdef JP
-#else
-#include "locale/english.h"
-#endif
 
 void do_poly_wounds(player_type *player_ptr)
 {
index 9ab4dd3..b4d3e38 100644 (file)
@@ -16,6 +16,7 @@
 #include "game-option/birth-options.h"
 #include "game-option/game-play-options.h"
 #include "io/command-repeater.h"
+#include "locale/japanese.h"
 #include "main/sound-of-music.h"
 #include "object-enchant/special-object-flags.h"
 #include "object/object-stack.h"
@@ -31,9 +32,6 @@
 #include "util/int-char-converter.h"
 #include "util/quarks.h"
 #include "view/display-messages.h"
-#ifdef JP
-#include "locale/japanese.h"
-#endif
 
 int store_top = 0;
 int store_bottom = 0;
@@ -386,4 +384,3 @@ void store_init(int town_num, StoreSaleType store_num)
     for (int k = 0; k < st_ptr->stock_size; k++)
         (&st_ptr->stock[k])->wipe();
 }
-
index 0380e5f..d02f669 100644 (file)
@@ -16,6 +16,7 @@
 #include "info-reader/fixed-map-parser.h"
 #include "io/cursor.h"
 #include "io/input-key-acceptor.h"
+#include "locale/english.h"
 #include "lore/lore-util.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags1.h"
 #include "view/display-monster-status.h"
 #include "window/display-sub-windows.h"
 
-#ifdef JP
-#else
-#include "locale/english.h"
-#endif
-
 static const int16_t CONTINUOUS_DESCRIPTION = 256;
 
 bool show_gold_on_floor = false;
@@ -544,19 +540,15 @@ char examine_grid(player_type *player_ptr, const POSITION y, const POSITION x, t
      * 安全を確保できたら構造体から外すことも検討する
      */
     eg_ptr->name = decide_target_floor(player_ptr, eg_ptr);
-    if (*eg_ptr->s2
-        && (eg_ptr->f_ptr->flags.has_none_of({FF::MOVE, FF::CAN_FLY})
-            || eg_ptr->f_ptr->flags.has_none_of({FF::LOS, FF::TREE}) || eg_ptr->f_ptr->flags.has(FF::TOWN))) {
+    if (*eg_ptr->s2 && (eg_ptr->f_ptr->flags.has_none_of({ FF::MOVE, FF::CAN_FLY }) || eg_ptr->f_ptr->flags.has_none_of({ FF::LOS, FF::TREE }) || eg_ptr->f_ptr->flags.has(FF::TOWN))) {
         eg_ptr->s2 = _("の中", "in ");
     }
 
-    if (eg_ptr->f_ptr->flags.has(FF::STORE) || eg_ptr->f_ptr->flags.has(FF::QUEST_ENTER)
-        || (eg_ptr->f_ptr->flags.has(FF::BLDG) && !player_ptr->current_floor_ptr->inside_arena) || eg_ptr->f_ptr->flags.has(FF::ENTRANCE))
+    if (eg_ptr->f_ptr->flags.has(FF::STORE) || eg_ptr->f_ptr->flags.has(FF::QUEST_ENTER) || (eg_ptr->f_ptr->flags.has(FF::BLDG) && !player_ptr->current_floor_ptr->inside_arena) || eg_ptr->f_ptr->flags.has(FF::ENTRANCE))
         eg_ptr->s2 = _("の入口", "");
 #ifdef JP
 #else
-    else if (eg_ptr->f_ptr->flags.has(FF::FLOOR) || eg_ptr->f_ptr->flags.has(FF::TOWN) || eg_ptr->f_ptr->flags.has(FF::SHALLOW)
-        || eg_ptr->f_ptr->flags.has(FF::DEEP))
+    else if (eg_ptr->f_ptr->flags.has(FF::FLOOR) || eg_ptr->f_ptr->flags.has(FF::TOWN) || eg_ptr->f_ptr->flags.has(FF::SHALLOW) || eg_ptr->f_ptr->flags.has(FF::DEEP))
         eg_ptr->s3 = "";
     else
         eg_ptr->s3 = (is_a_vowel(eg_ptr->name[0])) ? "an " : "a ";
index c8926a4..10abeae 100644 (file)
@@ -1,8 +1,6 @@
 #include "util/angband-files.h"
-#include "util/string-processor.h"
-#ifdef JP
 #include "locale/japanese.h"
-#endif
+#include "util/string-processor.h"
 
 #ifdef SET_UID
 
index 2f79e6f..004cdd6 100644 (file)
@@ -5,6 +5,7 @@
 #include "inventory/inventory-slot-types.h"
 #include "inventory/inventory-util.h"
 #include "io/input-key-requester.h"
+#include "locale/japanese.h"
 #include "object/item-tester-hooker.h"
 #include "object/item-use-flags.h"
 #include "object/object-info.h"
 #include "term/screen-processor.h"
 #include "term/term-color-types.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 /*!
  * @brief 所持アイテムの表示を行う /
  * Display the inventory.
index 1f39d6b..0d45d71 100644 (file)
@@ -1,4 +1,5 @@
 #include "view/display-lore-attacks.h"
+#include "locale/japanese.h"
 #include "lore/combat-types-setter.h"
 #include "lore/lore-calculator.h"
 #include "lore/lore-util.h"
@@ -6,9 +7,6 @@
 #include "monster-race/race-flags1.h"
 #include "system/monster-race-definition.h"
 #include "term/term-color-types.h"
-#ifdef JP
-#include "locale/japanese.h"
-#endif
 
 #ifdef JP
 /*!
@@ -124,8 +122,7 @@ void display_monster_blows(lore_type *lore_ptr)
 
     int attack_numbers = 0;
     for (int m = 0; m < max_attack_numbers; m++) {
-        if (!lore_ptr->r_ptr->blow[m].method || (lore_ptr->r_ptr->blow[m].method == RBM_SHOOT)
-            || (((lore_ptr->r_ptr->r_blows[m] == 0) && !lore_ptr->know_everything)))
+        if (!lore_ptr->r_ptr->blow[m].method || (lore_ptr->r_ptr->blow[m].method == RBM_SHOOT) || (((lore_ptr->r_ptr->r_blows[m] == 0) && !lore_ptr->know_everything)))
             continue;
 
         set_monster_blow_method(lore_ptr, m);
index 5b52f48..6bcffec 100644 (file)
@@ -1,4 +1,5 @@
 #include "view/display-lore-status.h"
+#include "locale/japanese.h"
 #include "lore/lore-calculator.h"
 #include "lore/lore-util.h"
 #include "monster-race/monster-race.h"
@@ -9,9 +10,6 @@
 #include "monster-race/race-flags7.h"
 #include "system/monster-race-definition.h"
 #include "term/term-color-types.h"
-#ifdef JP
-#include "locale/japanese.h"
-#endif
 
 void display_monster_hp_ac(lore_type *lore_ptr)
 {
@@ -332,7 +330,7 @@ void display_monster_resistances(lore_type *lore_ptr)
     hooked_roff(_("の耐性を持っている。", ".  "));
 }
 
-void display_monster_evolution(lore_typelore_ptr)
+void display_monster_evolution(lore_type *lore_ptr)
 {
     if (!lore_ptr->r_ptr->r_can_evolve && !lore_ptr->know_everything)
         return;
index 2517067..10f15ad 100644 (file)
@@ -7,6 +7,8 @@
 #include "view/display-lore.h"
 #include "game-option/cheat-options.h"
 #include "game-option/text-display-options.h"
+#include "locale/english.h"
+#include "locale/japanese.h"
 #include "lore/lore-calculator.h"
 #include "lore/lore-util.h"
 #include "lore/monster-lore.h"
 #include "util/bit-flags-calculator.h"
 #include "view/display-messages.h"
 #include "world/world.h"
-#ifdef JP
-#include "locale/japanese.h"
-#else
-#include "locale/english.h"
-#endif
 
 /*!
  * 英語の複数系記述用マクロ / Pluralizer.  Args(count, singular, plural)
@@ -347,8 +344,7 @@ void display_monster_never_move(lore_type *lore_ptr)
 
 void display_monster_kind(lore_type *lore_ptr)
 {
-    if (((lore_ptr->flags3 & (RF3_DRAGON | RF3_DEMON | RF3_GIANT | RF3_TROLL | RF3_ORC | RF3_ANGEL)) == 0)
-        && ((lore_ptr->flags2 & (RF2_QUANTUM | RF2_HUMAN)) == 0)) {
+    if (((lore_ptr->flags3 & (RF3_DRAGON | RF3_DEMON | RF3_GIANT | RF3_TROLL | RF3_ORC | RF3_ANGEL)) == 0) && ((lore_ptr->flags2 & (RF2_QUANTUM | RF2_HUMAN)) == 0)) {
         hooked_roff(_("モンスター", " creature"));
         return;
     }
index 5d07bc8..d1075ca 100644 (file)
@@ -2,6 +2,7 @@
 #include "core/score-util.h"
 #include "io/files-util.h"
 #include "io/input-key-acceptor.h"
+#include "locale/japanese.h"
 #include "player-info/class-info.h"
 #include "player/player-personality.h"
 #include "player/race-info-table.h"
 #include "util/angband-files.h"
 #include "util/int-char-converter.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 /*!
  * @brief 指定された順位範囲でスコアを並べて表示する / Display the scores in a given range.
  * @param from 順位先頭
index 88f02ad..3a7f51f 100644 (file)
@@ -4,6 +4,7 @@
 #include "game-option/special-options.h"
 #include "game-option/text-display-options.h"
 #include "grid/feature.h"
+#include "locale/japanese.h"
 #include "object-enchant/special-object-flags.h"
 #include "object/object-info.h"
 #include "object/object-kind.h"
 #include "util/enum-converter.h"
 #include "util/int-char-converter.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 /*!
  * @brief プレイヤーの所持金を表示する /
  * Displays players gold                                       -RAK-
index 20a2b0f..8f846f9 100644 (file)
@@ -9,6 +9,7 @@
 #include "inventory/inventory-describer.h"
 #include "inventory/inventory-slot-types.h"
 #include "inventory/inventory-util.h"
+#include "locale/japanese.h"
 #include "main/sound-of-music.h"
 #include "monster-race/monster-race.h"
 #include "monster-race/race-flags1.h"
 #include <sstream>
 #include <string>
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 /*! サブウィンドウ表示用の ItemTester オブジェクト */
 static std::unique_ptr<ItemTester> fix_item_tester = std::make_unique<AllMatchItemTester>();
 
index 105edec..d9ff8f3 100644 (file)
@@ -6,6 +6,7 @@
 #include "inventory/inventory-slot-types.h"
 #include "inventory/inventory-util.h"
 #include "io/input-key-requester.h"
+#include "locale/japanese.h"
 #include "object/item-tester-hooker.h"
 #include "object/item-use-flags.h"
 #include "object/object-info.h"
 #include "term/screen-processor.h"
 #include "term/term-color-types.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 /*!
  * @brief メインウィンドウの右上に装備アイテムの表示させる
  * Display the equipment.
index d6df6c7..3bce344 100644 (file)
@@ -1,6 +1,7 @@
 #include "wizard/artifact-analyzer.h"
 #include "flavor/flavor-describer.h"
 #include "flavor/object-flavor-types.h"
+#include "locale/japanese.h"
 #include "object-enchant/object-ego.h"
 #include "object-enchant/trc-types.h"
 #include "object-enchant/trg-types.h"
 #include "util/quarks.h"
 #include "wizard/spoiler-util.h"
 
-#ifdef JP
-#include "locale/japanese.h"
-#endif
-
 /*!
  * @brief アーティファクトの特性一覧を出力する /
  * Write a line to the spoiler file and then "underline" it with hypens