From 89c7b1143ff1c9fcbc075c8a8231dbd5dfa13708 Mon Sep 17 00:00:00 2001 From: Hourier Date: Sat, 22 Feb 2020 18:48:00 +0900 Subject: [PATCH] =?utf8?q?[Refactor]=20#40020=20player-status.c=20?= =?utf8?q?=E3=81=8B=E3=82=89horrir-descriptions.c/h=20=E3=82=92=E5=88=86?= =?utf8?q?=E9=9B=A2=20/=20Separated=20horrir-descriptions.c/h=20from=20pla?= =?utf8?q?yer-status.c?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Hengband_vcs2017/Hengband/Hengband.vcxproj | 2 + Hengband_vcs2017/Hengband/Hengband.vcxproj.filters | 6 + src/Makefile.am | 1 + src/horror-descriptions.c | 143 ++++++++++++++++++++ src/horror-descriptions.h | 10 ++ src/player-status.c | 148 +-------------------- 6 files changed, 164 insertions(+), 146 deletions(-) create mode 100644 src/horror-descriptions.c create mode 100644 src/horror-descriptions.h diff --git a/Hengband_vcs2017/Hengband/Hengband.vcxproj b/Hengband_vcs2017/Hengband/Hengband.vcxproj index ead3ab0af..6e1d23d48 100644 --- a/Hengband_vcs2017/Hengband/Hengband.vcxproj +++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj @@ -187,6 +187,7 @@ + @@ -313,6 +314,7 @@ + diff --git a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters index 9bf0f21d0..e8bcd5376 100644 --- a/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters +++ b/Hengband_vcs2017/Hengband/Hengband.vcxproj.filters @@ -403,6 +403,9 @@ monster + + player + @@ -788,6 +791,9 @@ monster + + player + diff --git a/src/Makefile.am b/src/Makefile.am index 94eb2682f..365aa77be 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -52,6 +52,7 @@ hengband_SOURCES = \ \ creature.h creature.c \ player-move.c player-move.h player-damage.c player-damage.h \ + horror-descriptions.c horror-descriptions.h \ player-status.c player-status.h player-effects.c player-effects.h \ player-skill.c player-skill.h player-class.c player-class.h \ player-race.c player-race.h player-personality.c player-personality.h \ diff --git a/src/horror-descriptions.c b/src/horror-descriptions.c new file mode 100644 index 000000000..a3de967d5 --- /dev/null +++ b/src/horror-descriptions.c @@ -0,0 +1,143 @@ +#include "h-type.h" +#include "horror-descriptions.h" + +/*! + * @var horror_desc + * @brief ELDRITCH HORRORŒø‰ÊŽž‚̃‚ƒ“ƒXƒ^[‚ÌŒ`—eƒƒbƒZ[ƒWi’ʏ펞j + */ +concptr horror_desc[MAX_SAN_HORROR] = +{ +#ifdef JP + "Šõ‚܂킵‚¢", + "’ê’m‚ê‚Ê", + "‚¼‚Á‚Æ‚·‚é", + "”j–Å“I‚È", + "–`“À“I‚È", + + "‚¢‚â‚È", + "‹°‚낵‚¢", + "•sŒ‰‚È", + "—eŽÍ‚Ì‚È‚¢", + "‚¨‚¼‚Ü‚µ‚¢", + + "’n–‚Ì", + "g‚Ì–Ñ‚à‚悾‚Â", + "’n–‚Ì", + "Šõ‚܂킵‚¢", + "ˆ«–²‚̂悤‚È", + + "Œ™ˆ«‚ðŠ´‚¶‚é", + "”±“–‚½‚è‚È", + "‹°‚¢", + "•sò‚È", + "Œ¾‚¤‚à‚¨‚¼‚Ü‚µ‚¢", +#else + "abominable", + "abysmal", + "appalling", + "baleful", + "blasphemous", + + "disgusting", + "dreadful", + "filthy", + "grisly", + "hideous", + + "hellish", + "horrible", + "infernal", + "loathsome", + "nightmarish", + + "repulsive", + "sacrilegious", + "terrible", + "unclean", + "unspeakable", +#endif +}; + +/*! + * @var funny_desc + * @brief ELDRITCH HORRORŒø‰ÊŽž‚̃‚ƒ“ƒXƒ^[‚ÌŒ`—eƒƒbƒZ[ƒW(Œ¶Šoó‘ÔŽž) + */ +concptr funny_desc[MAX_SAN_FUNNY] = +{ +#ifdef JP + "ŠÔ”²‚¯‚È", + "ŠŠŒm‚È", + "‚΂©‚炵‚¢", + "–³–¡Š£‘‡‚È", + "”nŽ­‚°‚½", + + "Î‚¦‚é", + "‚΂©‚΂©‚µ‚¢", + "‚Ô‚Á‚Æ‚ñ‚¾", + "‚¢‚©‚µ‚½", + "ƒ|ƒXƒgƒ‚ƒ_ƒ“‚È", + + "ƒtƒ@ƒ“ƒ^ƒXƒeƒBƒbƒN‚È", + "ƒ_ƒ_ƒCƒYƒ€“I‚È", + "ƒLƒ…ƒrƒYƒ€“I‚È", + "‰F’ˆ“I‚È", + "‘ì‰z‚µ‚½", + + "—‰ð•s”\‚È", + "‚à‚Ì‚·‚²‚¢", + "‹Á‚­‚ׂ«", + "M‚¶‚ç‚ê‚È‚¢", + "ƒJƒIƒeƒBƒbƒN‚È", + + "–쐫“I‚È", + "”ñíŽ¯‚È", +#else + "silly", + "hilarious", + "absurd", + "insipid", + "ridiculous", + + "laughable", + "ludicrous", + "far-out", + "groovy", + "postmodern", + + "fantastic", + "dadaistic", + "cubistic", + "cosmic", + "awesome", + + "incomprehensible", + "fabulous", + "amazing", + "incredible", + "chaotic", + + "wild", + "preposterous", +#endif +}; + +/*! + * @var funny_comments + * @brief ELDRITCH HORRORŒø‰ÊŽž‚ÌŒ¶ŠoŽžŠÔ‰„’·‚ðŽ¦‚·ö—•\Œ» + */ +concptr funny_comments[MAX_SAN_COMMENT] = +{ +#ifdef JP + "Å‚‚¾‚ºI", + "‚¤‚Ђå[I", + "‚¢‚©‚·‚ºI", + "‚·‚ñ‚΂炵‚¢I", + "‚Ô‚Á‚Ƃс[I" + #else + "Wow, cosmic, man!", + "Rad!", + "Groovy!", + "Cool!", + "Far out!" + #endif +}; diff --git a/src/horror-descriptions.h b/src/horror-descriptions.h new file mode 100644 index 000000000..ef9be768e --- /dev/null +++ b/src/horror-descriptions.h @@ -0,0 +1,10 @@ +#pragma once + +/* ELDRITCH_HORROR‚É‚æ‚ésanity blastˆ—‚ÉŠÖ‚·‚郁ƒbƒZ[ƒW‚̍ő吔 / Number of entries in the sanity-blast descriptions */ +#define MAX_SAN_HORROR 20 /*!< ‹°‚낵‚¢‘Ώۂ̌`—e”(³íŽž) */ +#define MAX_SAN_FUNNY 22 /*!< ‹°‚낵‚¢‘Ώۂ̌`—e”(Œ¶ŠoŽž) */ +#define MAX_SAN_COMMENT 5 /*!< ‹°‚낵‚¢‘ÎÛ‚ðŒ©‚½‚Æ‚«‚̐⋩ƒƒbƒZ[ƒW”(Œ¶ŠoŽž) */ + +concptr horror_desc[MAX_SAN_HORROR]; +concptr funny_desc[MAX_SAN_FUNNY]; +concptr funny_comments[MAX_SAN_COMMENT]; diff --git a/src/player-status.c b/src/player-status.c index 44c5ac640..ce0e8d222 100644 --- a/src/player-status.c +++ b/src/player-status.c @@ -42,6 +42,8 @@ #include "files.h" #include "cmd-magiceat.h" +#include "horror-descriptions.h" + /*! * @brief 能力値テーブル / Abbreviations of healthy stats */ @@ -66,152 +68,6 @@ const concptr stat_names_reduced[6] = #endif }; -/* ELDRITCH_HORRORによるsanity blast処理に関するメッセージの最大数 / Number of entries in the sanity-blast descriptions */ -#define MAX_SAN_HORROR 20 /*!< 恐ろしい対象の形容数(正常時) */ -#define MAX_SAN_FUNNY 22 /*!< 恐ろしい対象の形容数(幻覚時) */ -#define MAX_SAN_COMMENT 5 /*!< 恐ろしい対象を見たときの絶叫メッセージ数(幻覚時) */ - -/*! - * @var horror_desc - * @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(通常時) - */ -static concptr horror_desc[MAX_SAN_HORROR] = -{ -#ifdef JP - "忌まわしい", - "底知れぬ", - "ぞっとする", - "破滅的な", - "冒涜的な", - - "いやな", - "恐ろしい", - "不潔な", - "容赦のない", - "おぞましい", - - "地獄の", - "身の毛もよだつ", - "地獄の", - "忌まわしい", - "悪夢のような", - - "嫌悪を感じる", - "罰当たりな", - "恐い", - "不浄な", - "言うもおぞましい", -#else - "abominable", - "abysmal", - "appalling", - "baleful", - "blasphemous", - - "disgusting", - "dreadful", - "filthy", - "grisly", - "hideous", - - "hellish", - "horrible", - "infernal", - "loathsome", - "nightmarish", - - "repulsive", - "sacrilegious", - "terrible", - "unclean", - "unspeakable", -#endif -}; - -/*! - * @var funny_desc - * @brief ELDRITCH HORROR効果時のモンスターの形容メッセージ(幻覚状態時) - */ -static concptr funny_desc[MAX_SAN_FUNNY] = -{ -#ifdef JP - "間抜けな", - "滑稽な", - "ばからしい", - "無味乾燥な", - "馬鹿げた", - - "笑える", - "ばかばかしい", - "ぶっとんだ", - "いかした", - "ポストモダンな", - - "ファンタスティックな", - "ダダイズム的な", - "キュビズム的な", - "宇宙的な", - "卓越した", - - "理解不能な", - "ものすごい", - "驚くべき", - "信じられない", - "カオティックな", - - "野性的な", - "非常識な", -#else - "silly", - "hilarious", - "absurd", - "insipid", - "ridiculous", - - "laughable", - "ludicrous", - "far-out", - "groovy", - "postmodern", - - "fantastic", - "dadaistic", - "cubistic", - "cosmic", - "awesome", - - "incomprehensible", - "fabulous", - "amazing", - "incredible", - "chaotic", - - "wild", - "preposterous", -#endif -}; - -/*! - * @var funny_comments - * @brief ELDRITCH HORROR効果時の幻覚時間延長を示す錯乱表現 - */ -static concptr funny_comments[MAX_SAN_COMMENT] = -{ -#ifdef JP - "最高だぜ!", - "うひょー!", - "いかすぜ!", - "すんばらしい!", - "ぶっとびー!" - #else - "Wow, cosmic, man!", - "Rad!", - "Groovy!", - "Cool!", - "Far out!" - #endif -}; - /*! * @brief 基本必要経験値テーブル / * Base experience levels, may be adjusted up for race and/or class -- 2.11.0