From: Eric Branlund Date: Mon, 18 Jan 2021 23:53:49 +0000 (-0800) Subject: Implement workaround to resolve https://osdn.net/projects/hengband/ticket/41161 and... X-Git-Url: http://git.osdn.net/view?p=hengband%2Fhengband.git;a=commitdiff_plain;h=03dcf7ef83ed69387ac260f79190bc1c4b77ad9c Implement workaround to resolve https://osdn.net/projects/hengband/ticket/41161 and part of https://osdn.net/projects/hengbandforosx/ticket/41228 . Move macro definitions from autopick-editor-table.h to autopick-menu-data-table.c so the preprocessing with nkf on Linux and Mac can change the encoding for Japanese. Remove autopick-editor-table.h. Change the macros in autopick-keys-table.h to be pointers to constant strings. Initialize those strings in autopick-menu-data-table.c so the initializing strings can be shared with the initializers for menu_data and so the preprocessing with nkf can change the encoding for Japanese. --- diff --git a/Hengband/Hengband/Hengband.vcxproj b/Hengband/Hengband/Hengband.vcxproj index c51d87c5d..502d5ab2c 100644 --- a/Hengband/Hengband/Hengband.vcxproj +++ b/Hengband/Hengband/Hengband.vcxproj @@ -1243,7 +1243,6 @@ - diff --git a/Hengband/Hengband/Hengband.vcxproj.filters b/Hengband/Hengband/Hengband.vcxproj.filters index c5298cd15..656fc0e07 100644 --- a/Hengband/Hengband/Hengband.vcxproj.filters +++ b/Hengband/Hengband/Hengband.vcxproj.filters @@ -2323,9 +2323,6 @@ autopick - - autopick - autopick diff --git a/src/Makefile.am b/src/Makefile.am index ee792d05e..06b3657e1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,7 +33,7 @@ hengband_SOURCES = \ \ autopick/autopick.c autopick/autopick.h \ autopick/autopick-commands-table.h autopick/autopick-dirty-flags.h \ - autopick/autopick-editor-table.h autopick/autopick-flags-table.h \ + autopick/autopick-flags-table.h \ autopick/autopick-key-flag-process.h autopick/autopick-keys-table.h \ autopick/autopick-menu-data-table.c autopick/autopick-menu-data-table.h \ autopick/autopick-methods-table.h \ diff --git a/src/autopick/autopick-editor-table.h b/src/autopick/autopick-editor-table.h deleted file mode 100644 index e73addc5a..000000000 --- a/src/autopick/autopick-editor-table.h +++ /dev/null @@ -1,76 +0,0 @@ -#pragma once - -/*! - * todo GAME_TEXT[] かconcptrを使いたかった - * しかしコンパイルエラーで通らなかったので暫定的にdefineにした - * 上手いことコンパイルできる方法があれば求む - * @brief コマンド説明 - */ -#define MN_QUIT _("セーブ無しで終了", "Quit without save") -#define MN_SAVEQUIT _("セーブして終了", "Save & Quit") -#define MN_REVERT _("全ての変更を破棄", "Revert all changes") -#define MN_HELP _("ヘルプ", "Help") - -#define MN_MOVE _("カーソル移動", "Move cursor") -#define MN_LEFT _("左 (←矢印キー)", "Left (Left Arrow key)") -#define MN_DOWN _("下 (↓矢印キー)", "Down (Down Arrow key)") -#define MN_UP _("上 (↑矢印キー)", "Up (Up Arrow key)") -#define MN_RIGHT _("右 (→矢印キー)", "Right (Right Arrow key)") -#define MN_BOL _("行の先頭", "Beggining of line") -#define MN_EOL _("行の終端", "End of line") -#define MN_PGUP _("上のページ (PageUpキー)", "Page up (PageUp key)") -#define MN_PGDOWN _("下のページ (PageDownキー)", "Page down(PageDown key)") -#define MN_TOP _("1行目へ移動 (Homeキー)", "Top (Home key)") -#define MN_BOTTOM _("最下行へ移動(Endキー)", "Bottom (End key)") - -#define MN_EDIT _("編集", "Edit") -#define MN_CUT _("カット", "Cut") -#define MN_COPY _("コピー", "Copy") -#define MN_PASTE _("ペースト", "Paste") -#define MN_BLOCK _("選択範囲の指定", "Select block") -#define MN_KILL_LINE _("行の残りを削除", "Kill rest of line") -#define MN_DELETE_CHAR _("1文字削除", "Delete character") -#define MN_BACKSPACE _("バックスペース", "Backspace") -#define MN_RETURN _("改行", "Return") - -#define MN_SEARCH _("検索", "Search") -#define MN_SEARCH_STR _("文字列で検索", "Search by string") -#define MN_SEARCH_FORW _("前方へ再検索", "Search foward") -#define MN_SEARCH_BACK _("後方へ再検索", "Search backward") -#define MN_SEARCH_OBJ _("アイテムを選択して検索", "Search by inventory object") -#define MN_SEARCH_DESTROYED _("自動破壊されたアイテムで検索", "Search by destroyed object") - -#define MN_INSERT _("色々挿入", "Insert...") -#define MN_INSERT_OBJECT _("選択したアイテムの名前を挿入", "Insert name of choosen object") -#define MN_INSERT_DESTROYED _("自動破壊されたアイテムの名前を挿入", "Insert name of destroyed object") -#define MN_INSERT_BLOCK _("条件分岐ブロックの例を挿入", "Insert conditional block") -#define MN_INSERT_MACRO _("マクロ定義を挿入", "Insert a macro definition") -#define MN_INSERT_KEYMAP _("キーマップ定義を挿入", "Insert a keymap definition") - -#define MN_COMMAND_LETTER _("拾い/破壊/放置の選択", "Command letter") -#define MN_CL_AUTOPICK _("「 」 (自動拾い)", "' ' (Auto pick)") -#define MN_CL_DESTROY _("「!」 (自動破壊)", "'!' (Auto destroy)") -#define MN_CL_LEAVE _("「~」 (放置)", "'~' (Leave it on the floor)") -#define MN_CL_QUERY _("「;」 (確認して拾う)", "';' (Query to pick up)") -#define MN_CL_NO_DISP _("「(」 (マップコマンドで表示しない)", "'(' (No display on the large map)") - -#define MN_ADJECTIVE_GEN _("形容詞(一般)の選択", "Adjective (general)") -#define MN_RARE _("レアな (装備)", "rare (equipment)") -#define MN_COMMON _("ありふれた (装備)", "common (equipment)") - -#define MN_ADJECTIVE_SPECIAL _("形容詞(特殊)の選択", "Adjective (special)") -#define MN_BOOSTED _("ダイス目の違う (武器)", "dice boosted (weapons)") -#define MN_MORE_DICE _("ダイス目 # 以上の (武器)", "more than # dice (weapons)") -#define MN_MORE_BONUS _("修正値 # 以上の (指輪等)", "more bonus than # (rings etc.)") -#define MN_WANTED _("賞金首の (死体)", "wanted (corpse)") -#define MN_UNIQUE _("ユニーク・モンスターの (死体)", "unique (corpse)") -#define MN_HUMAN _("人間の (死体)", "human (corpse)") -#define MN_UNREADABLE _("読めない (魔法書)", "unreadable (spellbooks)") -#define MN_REALM1 _("第一領域の (魔法書)", "realm1 (spellbooks)") -#define MN_REALM2 _("第二領域の (魔法書)", "realm2 (spellbooks)") -#define MN_FIRST _("1冊目の (魔法書)", "first (spellbooks)") -#define MN_SECOND _("2冊目の (魔法書)", "second (spellbooks)") -#define MN_THIRD _("3冊目の (魔法書)", "third (spellbooks)") -#define MN_FOURTH _("4冊目の (魔法書)", "fourth (spellbooks)") - -#define MN_NOUN _("名詞の選択", "Keywords (noun)") diff --git a/src/autopick/autopick-keys-table.h b/src/autopick/autopick-keys-table.h index 8e634775b..c37ce207a 100644 --- a/src/autopick/autopick-keys-table.h +++ b/src/autopick/autopick-keys-table.h @@ -1,57 +1,57 @@ #pragma once -/*! - * todo GAME_TEXT[] かconcptrを使いたかった - * しかしコンパイルエラーで通らなかったので暫定的にdefineにした - * 上手いことコンパイルできる方法があれば求む - * @brief アイテム種別及び各種形容詞 +#include "system/h-basic.h" + +/* + * Note these are defined in autopick-menu-data-table.c. See the comments + * there for why the code is structured that way. */ -#define KEY_ALL _("すべての", "all") -#define KEY_UNAWARE _("未判明の", "unaware") -#define KEY_UNIDENTIFIED _("未鑑定の", "unidentified") -#define KEY_IDENTIFIED _("鑑定済みの", "identified") -#define KEY_STAR_IDENTIFIED _("*鑑定*済みの", "*identified*") -#define KEY_COLLECTING _("収集中の", "collecting") -#define KEY_ARTIFACT _("アーティファクト", "artifact") -#define KEY_EGO _("エゴ", "ego") -#define KEY_GOOD _("上質の", "good") -#define KEY_NAMELESS _("無銘の", "nameless") -#define KEY_AVERAGE _("並の", "average") -#define KEY_WORTHLESS _("無価値の", "worthless") -#define KEY_RARE _("レアな", "rare") -#define KEY_COMMON _("ありふれた", "common") -#define KEY_BOOSTED _("ダイス目の違う", "dice boosted") -#define KEY_MORE_THAN _("ダイス目", "more than") -#define KEY_DICE _("以上の", "dice") -#define KEY_MORE_BONUS _("修正値", "more bonus than") -#define KEY_MORE_BONUS2 _("以上の", "") -#define KEY_WANTED _("賞金首の", "wanted") -#define KEY_UNIQUE _("ユニーク・モンスターの", "unique monster's") -#define KEY_HUMAN _("人間の", "human") -#define KEY_UNREADABLE _("読めない", "unreadable") -#define KEY_REALM1 _("第一領域の", "first realm's") -#define KEY_REALM2 _("第二領域の", "second realm's") -#define KEY_FIRST _("1冊目の", "first") -#define KEY_SECOND _("2冊目の", "second") -#define KEY_THIRD _("3冊目の", "third") -#define KEY_FOURTH _("4冊目の", "fourth") -#define KEY_ITEMS _("アイテム", "items") -#define KEY_WEAPONS _("武器", "weapons") -#define KEY_FAVORITE_WEAPONS _("得意武器", "favorite weapons") -#define KEY_ARMORS _("防具", "armors") -#define KEY_MISSILES _("矢", "missiles") -#define KEY_DEVICES _("魔法アイテム", "magical devices") -#define KEY_LIGHTS _("光源", "lights") -#define KEY_JUNKS _("がらくた", "junks") -#define KEY_CORPSES _("死体や骨", "corpses or skeletons") -#define KEY_SPELLBOOKS _("魔法書", "spellbooks") -#define KEY_HAFTED _("鈍器", "hafted weapons") -#define KEY_SHIELDS _("盾", "shields") -#define KEY_BOWS _("弓", "bows") -#define KEY_RINGS _("指輪", "rings") -#define KEY_AMULETS _("アミュレット", "amulets") -#define KEY_SUITS _("鎧", "suits") -#define KEY_CLOAKS _("クローク", "cloaks") -#define KEY_HELMS _("兜", "helms") -#define KEY_GLOVES _("籠手", "gloves") -#define KEY_BOOTS _("靴", "boots") +extern concptr KEY_ALL; +extern concptr KEY_UNAWARE; +extern concptr KEY_UNIDENTIFIED; +extern concptr KEY_IDENTIFIED; +extern concptr KEY_STAR_IDENTIFIED; +extern concptr KEY_COLLECTING; +extern concptr KEY_ARTIFACT; +extern concptr KEY_EGO; +extern concptr KEY_GOOD; +extern concptr KEY_NAMELESS; +extern concptr KEY_AVERAGE; +extern concptr KEY_WORTHLESS; +extern concptr KEY_RARE; +extern concptr KEY_COMMON; +extern concptr KEY_BOOSTED; +extern concptr KEY_MORE_THAN; +extern concptr KEY_DICE; +extern concptr KEY_MORE_BONUS; +extern concptr KEY_MORE_BONUS2; +extern concptr KEY_WANTED; +extern concptr KEY_UNIQUE; +extern concptr KEY_HUMAN; +extern concptr KEY_UNREADABLE; +extern concptr KEY_REALM1; +extern concptr KEY_REALM2; +extern concptr KEY_FIRST; +extern concptr KEY_SECOND; +extern concptr KEY_THIRD; +extern concptr KEY_FOURTH; +extern concptr KEY_ITEMS; +extern concptr KEY_WEAPONS; +extern concptr KEY_FAVORITE_WEAPONS; +extern concptr KEY_ARMORS; +extern concptr KEY_MISSILES; +extern concptr KEY_DEVICES; +extern concptr KEY_LIGHTS; +extern concptr KEY_JUNKS; +extern concptr KEY_CORPSES; +extern concptr KEY_SPELLBOOKS; +extern concptr KEY_HAFTED; +extern concptr KEY_SHIELDS; +extern concptr KEY_BOWS; +extern concptr KEY_RINGS; +extern concptr KEY_AMULETS; +extern concptr KEY_SUITS; +extern concptr KEY_CLOAKS; +extern concptr KEY_HELMS; +extern concptr KEY_GLOVES; +extern concptr KEY_BOOTS; diff --git a/src/autopick/autopick-menu-data-table.c b/src/autopick/autopick-menu-data-table.c index 452fc161e..ec2a436c7 100644 --- a/src/autopick/autopick-menu-data-table.c +++ b/src/autopick/autopick-menu-data-table.c @@ -6,10 +6,198 @@ #include "autopick/autopick-menu-data-table.h" #include "autopick/autopick-commands-table.h" -#include "autopick/autopick-editor-table.h" #include "autopick/autopick-keys-table.h" #include "util/int-char-converter.h" +/* + * These MN_* preprocessor macros were formerly defined in + * autopick-editor-table.h. Fold them in here to satisfy two requirements: + * 1) The platforms using configure/automake only preprocess .c files (.h + * files are not touched) with nkf to modify the encoding of Japanese + * characters. + * 2) The file scope initializer for menu_data requires constant expressions + * that can be evaluated at compile time. + */ +#define MN_QUIT _("セーブ無しで終了", "Quit without save") +#define MN_SAVEQUIT _("セーブして終了", "Save & Quit") +#define MN_REVERT _("全ての変更を破棄", "Revert all changes") +#define MN_HELP _("ヘルプ", "Help") + +#define MN_MOVE _("カーソル移動", "Move cursor") +#define MN_LEFT _("左 (←矢印キー)", "Left (Left Arrow key)") +#define MN_DOWN _("下 (↓矢印キー)", "Down (Down Arrow key)") +#define MN_UP _("上 (↑矢印キー)", "Up (Up Arrow key)") +#define MN_RIGHT _("右 (→矢印キー)", "Right (Right Arrow key)") +#define MN_BOL _("行の先頭", "Beggining of line") +#define MN_EOL _("行の終端", "End of line") +#define MN_PGUP _("上のページ (PageUpキー)", "Page up (PageUp key)") +#define MN_PGDOWN _("下のページ (PageDownキー)", "Page down(PageDown key)") +#define MN_TOP _("1行目へ移動 (Homeキー)", "Top (Home key)") +#define MN_BOTTOM _("最下行へ移動(Endキー)", "Bottom (End key)") + +#define MN_EDIT _("編集", "Edit") +#define MN_CUT _("カット", "Cut") +#define MN_COPY _("コピー", "Copy") +#define MN_PASTE _("ペースト", "Paste") +#define MN_BLOCK _("選択範囲の指定", "Select block") +#define MN_KILL_LINE _("行の残りを削除", "Kill rest of line") +#define MN_DELETE_CHAR _("1文字削除", "Delete character") +#define MN_BACKSPACE _("バックスペース", "Backspace") +#define MN_RETURN _("改行", "Return") + +#define MN_SEARCH _("検索", "Search") +#define MN_SEARCH_STR _("文字列で検索", "Search by string") +#define MN_SEARCH_FORW _("前方へ再検索", "Search foward") +#define MN_SEARCH_BACK _("後方へ再検索", "Search backward") +#define MN_SEARCH_OBJ _("アイテムを選択して検索", "Search by inventory object") +#define MN_SEARCH_DESTROYED _("自動破壊されたアイテムで検索", "Search by destroyed object") + +#define MN_INSERT _("色々挿入", "Insert...") +#define MN_INSERT_OBJECT _("選択したアイテムの名前を挿入", "Insert name of choosen object") +#define MN_INSERT_DESTROYED _("自動破壊されたアイテムの名前を挿入", "Insert name of destroyed object") +#define MN_INSERT_BLOCK _("条件分岐ブロックの例を挿入", "Insert conditional block") +#define MN_INSERT_MACRO _("マクロ定義を挿入", "Insert a macro definition") +#define MN_INSERT_KEYMAP _("キーマップ定義を挿入", "Insert a keymap definition") + +#define MN_COMMAND_LETTER _("拾い/破壊/放置の選択", "Command letter") +#define MN_CL_AUTOPICK _("「 」 (自動拾い)", "' ' (Auto pick)") +#define MN_CL_DESTROY _("「!」 (自動破壊)", "'!' (Auto destroy)") +#define MN_CL_LEAVE _("「~」 (放置)", "'~' (Leave it on the floor)") +#define MN_CL_QUERY _("「;」 (確認して拾う)", "';' (Query to pick up)") +#define MN_CL_NO_DISP _("「(」 (マップコマンドで表示しない)", "'(' (No display on the large map)") + +#define MN_ADJECTIVE_GEN _("形容詞(一般)の選択", "Adjective (general)") +#define MN_RARE _("レアな (装備)", "rare (equipment)") +#define MN_COMMON _("ありふれた (装備)", "common (equipment)") + +#define MN_ADJECTIVE_SPECIAL _("形容詞(特殊)の選択", "Adjective (special)") +#define MN_BOOSTED _("ダイス目の違う (武器)", "dice boosted (weapons)") +#define MN_MORE_DICE _("ダイス目 # 以上の (武器)", "more than # dice (weapons)") +#define MN_MORE_BONUS _("修正値 # 以上の (指輪等)", "more bonus than # (rings etc.)") +#define MN_WANTED _("賞金首の (死体)", "wanted (corpse)") +#define MN_UNIQUE _("ユニーク・モンスターの (死体)", "unique (corpse)") +#define MN_HUMAN _("人間の (死体)", "human (corpse)") +#define MN_UNREADABLE _("読めない (魔法書)", "unreadable (spellbooks)") +#define MN_REALM1 _("第一領域の (魔法書)", "realm1 (spellbooks)") +#define MN_REALM2 _("第二領域の (魔法書)", "realm2 (spellbooks)") +#define MN_FIRST _("1冊目の (魔法書)", "first (spellbooks)") +#define MN_SECOND _("2冊目の (魔法書)", "second (spellbooks)") +#define MN_THIRD _("3冊目の (魔法書)", "third (spellbooks)") +#define MN_FOURTH _("4冊目の (魔法書)", "fourth (spellbooks)") + +#define MN_NOUN _("名詞の選択", "Keywords (noun)") + +/* + * Initialize the KEY_* constants declared in autopick-keys-table.h. Do + * so using MKEY_* preprocessor macros to satisfy two requirements: + * 1) The platforms using configure/automake only preprocess .c files (.h + * files are not touched) with nkf to modify the encoding of Japanese + * characters. + * 2) Want to use some of the same strings as initializers for menu_data. + * To avoid explicitly repeating the strings while satisfying the requirement + * that the initializers be constant expressions that can be evaluated at + * compile time, define the MKEY_* preprocessor macros and use them for + * initializing the KEY_* constants and menu_data. + */ +#define MKEY_ALL _("すべての", "all") +concptr KEY_ALL = MKEY_ALL; +#define MKEY_UNAWARE _("未判明の", "unaware") +concptr KEY_UNAWARE = MKEY_UNAWARE; +#define MKEY_UNIDENTIFIED _("未鑑定の", "unidentified") +concptr KEY_UNIDENTIFIED = MKEY_UNIDENTIFIED; +#define MKEY_IDENTIFIED _("鑑定済みの", "identified") +concptr KEY_IDENTIFIED = MKEY_IDENTIFIED; +#define MKEY_STAR_IDENTIFIED _("*鑑定*済みの", "*identified*") +concptr KEY_STAR_IDENTIFIED = MKEY_STAR_IDENTIFIED; +#define MKEY_COLLECTING _("収集中の", "collecting") +concptr KEY_COLLECTING = MKEY_COLLECTING; +#define MKEY_ARTIFACT _("アーティファクト", "artifact") +concptr KEY_ARTIFACT = MKEY_ARTIFACT; +#define MKEY_EGO _("エゴ", "ego") +concptr KEY_EGO = MKEY_EGO; +#define MKEY_GOOD _("上質の", "good") +concptr KEY_GOOD = MKEY_GOOD; +#define MKEY_NAMELESS _("無銘の", "nameless") +concptr KEY_NAMELESS = MKEY_NAMELESS; +#define MKEY_AVERAGE _("並の", "average") +concptr KEY_AVERAGE = MKEY_AVERAGE; +#define MKEY_WORTHLESS _("無価値の", "worthless") +concptr KEY_WORTHLESS = MKEY_WORTHLESS; +#define MKEY_RARE _("レアな", "rare") +concptr KEY_RARE = MKEY_RARE; +#define MKEY_COMMON _("ありふれた", "common") +concptr KEY_COMMON = MKEY_COMMON; +#define MKEY_BOOSTED _("ダイス目の違う", "dice boosted") +concptr KEY_BOOSTED = MKEY_BOOSTED; +#define MKEY_MORE_THAN _("ダイス目", "more than") +concptr KEY_MORE_THAN = MKEY_MORE_THAN; +#define MKEY_DICE _("以上の", "dice") +concptr KEY_DICE = MKEY_DICE; +#define MKEY_MORE_BONUS _("修正値", "more bonus than") +concptr KEY_MORE_BONUS = MKEY_MORE_BONUS; +#define MKEY_MORE_BONUS2 _("以上の", "") +concptr KEY_MORE_BONUS2 = MKEY_MORE_BONUS2; +#define MKEY_WANTED _("賞金首の", "wanted") +concptr KEY_WANTED = MKEY_WANTED; +#define MKEY_UNIQUE _("ユニーク・モンスターの", "unique monster's") +concptr KEY_UNIQUE = MKEY_UNIQUE; +#define MKEY_HUMAN _("人間の", "human") +concptr KEY_HUMAN = MKEY_HUMAN; +#define MKEY_UNREADABLE _("読めない", "unreadable") +concptr KEY_UNREADABLE = MKEY_UNREADABLE; +#define MKEY_REALM1 _("第一領域の", "first realm's") +concptr KEY_REALM1 = MKEY_REALM1; +#define MKEY_REALM2 _("第二領域の", "second realm's") +concptr KEY_REALM2 = MKEY_REALM2; +#define MKEY_FIRST _("1冊目の", "first") +concptr KEY_FIRST = MKEY_FIRST; +#define MKEY_SECOND _("2冊目の", "second") +concptr KEY_SECOND = MKEY_SECOND; +#define MKEY_THIRD _("3冊目の", "third") +concptr KEY_THIRD = MKEY_THIRD; +#define MKEY_FOURTH _("4冊目の", "fourth") +concptr KEY_FOURTH = MKEY_FOURTH; +#define MKEY_ITEMS _("アイテム", "items") +concptr KEY_ITEMS = MKEY_ITEMS; +#define MKEY_WEAPONS _("武器", "weapons") +concptr KEY_WEAPONS = MKEY_WEAPONS; +#define MKEY_FAVORITE_WEAPONS _("得意武器", "favorite weapons") +concptr KEY_FAVORITE_WEAPONS = MKEY_FAVORITE_WEAPONS; +#define MKEY_ARMORS _("防具", "armors") +concptr KEY_ARMORS = MKEY_ARMORS; +#define MKEY_MISSILES _("矢", "missiles") +concptr KEY_MISSILES = MKEY_MISSILES; +#define MKEY_DEVICES _("魔法アイテム", "magical devices") +concptr KEY_DEVICES = MKEY_DEVICES; +#define MKEY_LIGHTS _("光源", "lights") +concptr KEY_LIGHTS = MKEY_LIGHTS; +#define MKEY_JUNKS _("がらくた", "junks") +concptr KEY_JUNKS = MKEY_JUNKS; +#define MKEY_CORPSES _("死体や骨", "corpses or skeletons") +concptr KEY_CORPSES = MKEY_CORPSES; +#define MKEY_SPELLBOOKS _("魔法書", "spellbooks") +concptr KEY_SPELLBOOKS = MKEY_SPELLBOOKS; +#define MKEY_HAFTED _("鈍器", "hafted weapons") +concptr KEY_HAFTED = MKEY_HAFTED; +#define MKEY_SHIELDS _("盾", "shields") +concptr KEY_SHIELDS = MKEY_SHIELDS; +#define MKEY_BOWS _("弓", "bows") +concptr KEY_BOWS = MKEY_BOWS; +#define MKEY_RINGS _("指輪", "rings") +concptr KEY_RINGS = MKEY_RINGS; +#define MKEY_AMULETS _("アミュレット", "amulets") +concptr KEY_AMULETS = MKEY_AMULETS; +#define MKEY_SUITS _("鎧", "suits") +concptr KEY_SUITS = MKEY_SUITS; +#define MKEY_CLOAKS _("クローク", "cloaks") +concptr KEY_CLOAKS = MKEY_CLOAKS; +#define MKEY_HELMS _("兜", "helms") +concptr KEY_HELMS = MKEY_HELMS; +#define MKEY_GLOVES _("籠手", "gloves") +concptr KEY_GLOVES = MKEY_GLOVES; +#define MKEY_BOOTS _("靴", "boots") +concptr KEY_BOOTS = MKEY_BOOTS; + command_menu_type menu_data[MENU_DATA_NUM] = { {MN_HELP, 0, -1, EC_HELP}, @@ -55,17 +243,17 @@ command_menu_type menu_data[MENU_DATA_NUM] = {MN_INSERT_KEYMAP, 1, -1, EC_INSERT_KEYMAP}, {MN_ADJECTIVE_GEN, 0, -1, -1}, - {KEY_UNAWARE, 1, -1, EC_IK_UNAWARE}, - {KEY_UNIDENTIFIED, 1, -1, EC_IK_UNIDENTIFIED}, - {KEY_IDENTIFIED, 1, -1, EC_IK_IDENTIFIED}, - {KEY_STAR_IDENTIFIED, 1, -1, EC_IK_STAR_IDENTIFIED}, - {KEY_COLLECTING, 1, -1, EC_OK_COLLECTING}, - {KEY_ARTIFACT, 1, -1, EC_OK_ARTIFACT}, - {KEY_EGO, 1, -1, EC_OK_EGO}, - {KEY_GOOD, 1, -1, EC_OK_GOOD}, - {KEY_NAMELESS, 1, -1, EC_OK_NAMELESS}, - {KEY_AVERAGE, 1, -1, EC_OK_AVERAGE}, - {KEY_WORTHLESS, 1, -1, EC_OK_WORTHLESS}, + {MKEY_UNAWARE, 1, -1, EC_IK_UNAWARE}, + {MKEY_UNIDENTIFIED, 1, -1, EC_IK_UNIDENTIFIED}, + {MKEY_IDENTIFIED, 1, -1, EC_IK_IDENTIFIED}, + {MKEY_STAR_IDENTIFIED, 1, -1, EC_IK_STAR_IDENTIFIED}, + {MKEY_COLLECTING, 1, -1, EC_OK_COLLECTING}, + {MKEY_ARTIFACT, 1, -1, EC_OK_ARTIFACT}, + {MKEY_EGO, 1, -1, EC_OK_EGO}, + {MKEY_GOOD, 1, -1, EC_OK_GOOD}, + {MKEY_NAMELESS, 1, -1, EC_OK_NAMELESS}, + {MKEY_AVERAGE, 1, -1, EC_OK_AVERAGE}, + {MKEY_WORTHLESS, 1, -1, EC_OK_WORTHLESS}, {MN_RARE, 1, -1, EC_OK_RARE}, {MN_COMMON, 1, -1, EC_OK_COMMON}, @@ -85,24 +273,24 @@ command_menu_type menu_data[MENU_DATA_NUM] = {MN_FOURTH, 1, -1, EC_OK_FOURTH}, {MN_NOUN, 0, -1, -1}, - {KEY_WEAPONS, 1, -1, EC_KK_WEAPONS}, - {KEY_FAVORITE_WEAPONS, 1, -1, EC_KK_FAVORITE_WEAPONS}, - {KEY_ARMORS, 1, -1, EC_KK_ARMORS}, - {KEY_MISSILES, 1, -1, EC_KK_MISSILES}, - {KEY_DEVICES, 1, -1, EC_KK_DEVICES}, - {KEY_LIGHTS, 1, -1, EC_KK_LIGHTS}, - {KEY_JUNKS, 1, -1, EC_KK_JUNKS}, - {KEY_CORPSES, 1, -1, EC_KK_CORPSES}, - {KEY_SPELLBOOKS, 1, -1, EC_KK_SPELLBOOKS}, - {KEY_SHIELDS, 1, -1, EC_KK_SHIELDS}, - {KEY_BOWS, 1, -1, EC_KK_BOWS}, - {KEY_RINGS, 1, -1, EC_KK_RINGS}, - {KEY_AMULETS, 1, -1, EC_KK_AMULETS}, - {KEY_SUITS, 1, -1, EC_KK_SUITS}, - {KEY_CLOAKS, 1, -1, EC_KK_CLOAKS}, - {KEY_HELMS, 1, -1, EC_KK_HELMS}, - {KEY_GLOVES, 1, -1, EC_KK_GLOVES}, - {KEY_BOOTS, 1, -1, EC_KK_BOOTS}, + {MKEY_WEAPONS, 1, -1, EC_KK_WEAPONS}, + {MKEY_FAVORITE_WEAPONS, 1, -1, EC_KK_FAVORITE_WEAPONS}, + {MKEY_ARMORS, 1, -1, EC_KK_ARMORS}, + {MKEY_MISSILES, 1, -1, EC_KK_MISSILES}, + {MKEY_DEVICES, 1, -1, EC_KK_DEVICES}, + {MKEY_LIGHTS, 1, -1, EC_KK_LIGHTS}, + {MKEY_JUNKS, 1, -1, EC_KK_JUNKS}, + {MKEY_CORPSES, 1, -1, EC_KK_CORPSES}, + {MKEY_SPELLBOOKS, 1, -1, EC_KK_SPELLBOOKS}, + {MKEY_SHIELDS, 1, -1, EC_KK_SHIELDS}, + {MKEY_BOWS, 1, -1, EC_KK_BOWS}, + {MKEY_RINGS, 1, -1, EC_KK_RINGS}, + {MKEY_AMULETS, 1, -1, EC_KK_AMULETS}, + {MKEY_SUITS, 1, -1, EC_KK_SUITS}, + {MKEY_CLOAKS, 1, -1, EC_KK_CLOAKS}, + {MKEY_HELMS, 1, -1, EC_KK_HELMS}, + {MKEY_GLOVES, 1, -1, EC_KK_GLOVES}, + {MKEY_BOOTS, 1, -1, EC_KK_BOOTS}, {MN_COMMAND_LETTER, 0, -1, -1}, {MN_CL_AUTOPICK, 1, -1, EC_CL_AUTOPICK},