From 5d1edde639e09e9c53f6e258ec593fc0ab794154 Mon Sep 17 00:00:00 2001 From: deskull Date: Thu, 9 May 2019 19:11:25 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#37353=20game=5Finscriptions?= =?utf8?q?=E3=80=80=E3=82=92=20object-flavor.c/h=20=E3=81=B8=E7=A7=BB?= =?utf8?q?=E5=8B=95=EF=BC=8E?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/externs.h | 3 --- src/object-flavor.c | 32 ++++++++++++++++++++++++++++++++ src/object-flavor.h | 2 ++ src/tables.c | 30 ------------------------------ 4 files changed, 34 insertions(+), 33 deletions(-) diff --git a/src/externs.h b/src/externs.h index 7eb04de45..dbade251a 100644 --- a/src/externs.h +++ b/src/externs.h @@ -55,14 +55,11 @@ extern const concptr stat_names[6]; extern const concptr stat_names_reduced[6]; extern const concptr window_flag_desc[32]; -extern const concptr game_inscriptions[]; - extern const concptr ident_info[]; extern const byte feature_action_flags[FF_FLAG_MAX]; /* variable.c */ - extern bool character_generated; extern bool character_dungeon; extern bool character_loaded; diff --git a/src/object-flavor.c b/src/object-flavor.c index 94885cb0f..c2c86715e 100644 --- a/src/object-flavor.c +++ b/src/object-flavor.c @@ -26,6 +26,38 @@ #include "monsterrace.h" #include "object-ego.h" + /*! + * @brief アイテムの価値記述テーブル / + * Table of game-generated inscriptions (indexed by the defines in defines.h). -- RG + */ +const concptr game_inscriptions[] = +{ + NULL, /* FEEL_NONE */ +#ifdef JP + "壊れている", /* FEEL_BROKEN */ + "恐ろしい", /* FEEL_TERRIBLE */ + "無価値", /* FEEL_WORTHLESS */ + "呪われている", /* FEEL_CURSED */ + "上質以上", /* FEEL_UNCURSED */ + "並", /* FEEL_AVERAGE */ + "上質", /* FEEL_GOOD */ + "高級品", /* FEEL_EXCELLENT */ + "特別製", /* FEEL_SPECIAL */ +#else + "broken", /* FEEL_BROKEN */ + "terrible", /* FEEL_TERRIBLE */ + "worthless", /* FEEL_WORTHLESS */ + "cursed", /* FEEL_CURSED */ + "uncursed", /* FEEL_UNCURSED */ + "average", /* FEEL_AVERAGE */ + "good", /* FEEL_GOOD */ + "excellent", /* FEEL_EXCELLENT */ + "special", /* FEEL_SPECIAL */ +#endif + +}; + + /*! * @brief 最初から簡易な名称が明らかになるベースアイテムの判定。 / Certain items, if aware, are known instantly * @param i ベースアイテムID diff --git a/src/object-flavor.h b/src/object-flavor.h index 52d75706f..797c606ed 100644 --- a/src/object-flavor.h +++ b/src/object-flavor.h @@ -13,6 +13,8 @@ extern char *object_desc_kosuu(char *t, object_type *o_ptr); extern void object_desc(char *buf, object_type *o_ptr, BIT_FLAGS mode); extern void strip_name(char *buf, KIND_OBJECT_IDX k_idx); +extern const concptr game_inscriptions[]; + /* * Bit flags for object_desc() */ diff --git a/src/tables.c b/src/tables.c index a8ddabb8f..4cedfb20f 100644 --- a/src/tables.c +++ b/src/tables.c @@ -1166,36 +1166,6 @@ const concptr window_flag_desc[32] = }; -/*! - * @brief アイテムの価値記述テーブル / - * Table of game-generated inscriptions (indexed by the defines in defines.h). -- RG - */ -const concptr game_inscriptions[] = -{ - NULL, /* FEEL_NONE */ -#ifdef JP - "壊れている", /* FEEL_BROKEN */ - "恐ろしい", /* FEEL_TERRIBLE */ - "無価値", /* FEEL_WORTHLESS */ - "呪われている", /* FEEL_CURSED */ - "上質以上", /* FEEL_UNCURSED */ - "並", /* FEEL_AVERAGE */ - "上質", /* FEEL_GOOD */ - "高級品", /* FEEL_EXCELLENT */ - "特別製", /* FEEL_SPECIAL */ -#else - "broken", /* FEEL_BROKEN */ - "terrible", /* FEEL_TERRIBLE */ - "worthless", /* FEEL_WORTHLESS */ - "cursed", /* FEEL_CURSED */ - "uncursed", /* FEEL_UNCURSED */ - "average", /* FEEL_AVERAGE */ - "good", /* FEEL_GOOD */ - "excellent", /* FEEL_EXCELLENT */ - "special", /* FEEL_SPECIAL */ -#endif - -}; /*! * @brief シンボル解説テーブル / -- 2.11.0