OSDN Git Service

[Fix] #41334 Linux版で魔法一覧を表示した時に文字化け
authorHabu <habu@users.osdn.me>
Mon, 25 Jan 2021 10:04:07 +0000 (19:04 +0900)
committerHabu <habu@users.osdn.me>
Mon, 25 Jan 2021 10:05:40 +0000 (19:05 +0900)
例によって.hファイルはUTF-8→EUCの変換の対象になっていないのが原因。
defineマクロによる定数ではなくconcptrの変数宣言に置き換え、
変数定義はcmd-spell.cで行うようにする。

src/cmd-action/cmd-spell.c
src/cmd-action/cmd-spell.h

index 7fc0c20..56ecf3c 100644 (file)
 #include "locale/japanese.h"
 #endif
 
+concptr KWD_DAM = _("損傷:", "dam ");
+concptr KWD_RANGE = _("射程:", "rng ");
+concptr KWD_DURATION = _("期間:", "dur ");
+concptr KWD_SPHERE = _("範囲:", "range ");
+concptr KWD_HEAL = _("回復:", "heal ");
+concptr KWD_RANDOM = _("ランダム", "random");
+
 /*!
  * 魔法領域フラグ管理テーブル /
  * Zangband uses this array instead of the spell flags table, as there
index a962b65..0208a16 100644 (file)
@@ -2,12 +2,12 @@
 
 #include "system/angband.h"
 
-#define KWD_DAM _("損傷:", "dam ")
-#define KWD_RANGE    _("射程:", "rng ")
-#define KWD_DURATION _("期間:", "dur ")
-#define KWD_SPHERE   _("範囲:", "range ")
-#define KWD_HEAL     _("回復:", "heal ")
-#define KWD_RANDOM   _("ランダム", "random")
+extern concptr KWD_DAM;
+extern concptr KWD_RANGE;
+extern concptr KWD_DURATION;
+extern concptr KWD_SPHERE;
+extern concptr KWD_HEAL;
+extern concptr KWD_RANDOM;
 
 extern const u32b fake_spell_flags[4];