OSDN Git Service

キャラクター生成中やオプション設定中に'?'を押すとヘルプファイルの中の
[hengband/hengband.git] / src / files.c
index 341d9c1..d1a8092 100644 (file)
@@ -1040,46 +1040,6 @@ static cptr process_pref_file_expr(char **sp, char *fp)
 
 
 /*
- *  Process line for auto picker/destroyer.
- */
-static errr process_pickpref_file_line(char *buf)
-{
-       autopick_type entry;
-       int i;
-
-       if (max_autopick == MAX_AUTOPICK)
-               return 1;
-       
-       /* Nuke illegal char */
-       for(i = 0; buf[i]; i++)
-       {
-#ifdef JP
-               if (iskanji(buf[i]))
-               {
-                       i++;
-                       continue;
-               }
-#endif
-               if (isspace(buf[i]) && buf[i] != ' ')
-                       break;
-       }
-       buf[i] = 0;
-       
-       if (!autopick_new_entry(&entry, buf)) return 0;
-
-       /* Already has the same entry? */ 
-       for(i = 0; i < max_autopick; i++)
-               if(!strcmp(entry.name, autopick_list[i].name)
-                  && entry.flag[0] == autopick_list[i].flag[0]
-                  && entry.flag[1] == autopick_list[i].flag[1]) return 0;
-
-       autopick_list[max_autopick++] = entry;
-       return 0;
-}
-
-
-
-/*
  * Open the "user pref file" and parse it.
  */
 static errr process_pref_file_aux(cptr name, bool read_pickpref)
@@ -1632,7 +1592,7 @@ static struct
        {29,  5, 21, "Weight"},
        {29,  6, 21, "Social Class"},
        {29,  7, 21, "Align"},
-       {29, 14, 21, "Constraction"},
+       {29, 14, 21, "Construction"},
 };
 #endif
 
@@ -2794,21 +2754,30 @@ static void tim_player_flags(u32b flgs[TR_FLAG_SIZE], bool im_and_res)
 }
 
 
+/* Mode flags for displaying player flags */
+#define DP_CURSE   0x01
+#define DP_IMM     0x02
+#define DP_WP      0x08
+
+
 /*
  * Equippy chars
  */
-static void display_player_equippy(int y, int x)
+static void display_player_equippy(int y, int x, u16b mode)
 {
-       int i;
+       int i, max_i;
 
        byte a;
        char c;
 
        object_type *o_ptr;
 
+        /* Weapon flags need only two column */
+        if (mode & DP_WP) max_i = INVEN_LARM + 1;
+        else max_i = INVEN_TOTAL;
 
        /* Dump equippy chars */
-       for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
+       for (i = INVEN_RARM; i < max_i; i++)
        {
                /* Object */
                o_ptr = &inventory[i];
@@ -2831,7 +2800,7 @@ static void display_player_equippy(int y, int x)
 
 void print_equippy(void)
 {
-       display_player_equippy(ROW_EQUIPPY, COL_EQUIPPY);
+       display_player_equippy(ROW_EQUIPPY, COL_EQUIPPY, 0);
 }
 
 /*
@@ -2930,30 +2899,50 @@ static void player_vuln_flags(u32b flgs[TR_FLAG_SIZE])
                add_flag(flgs, TR_RES_LITE);
 }
 
+
+/*
+ * A struct for storing misc. flags
+ */
+typedef struct {
+        u32b player_flags[TR_FLAG_SIZE];
+        u32b tim_player_flags[TR_FLAG_SIZE];
+        u32b player_imm[TR_FLAG_SIZE];
+        u32b tim_player_imm[TR_FLAG_SIZE];
+        u32b player_vuln[TR_FLAG_SIZE];
+        u32b known_obj_imm[TR_FLAG_SIZE];
+} all_player_flags;
+
+
 /*
  * Helper function, see below
  */
-static void display_player_flag_aux(int row, int col, cptr header,
-                                   int flag1, int flag2,
-                                   u32b im_f[3][TR_FLAG_SIZE], 
-                                   u32b vul_f[TR_FLAG_SIZE])
+static void display_flag_aux(int row, int col, cptr header,
+                                   int flag1, all_player_flags *f, u16b mode)
 {
        int     i;
-       u32b    flgs[TR_FLAG_SIZE], cflgs;
        bool    vuln = FALSE;
+        int max_i;
 
-       if (have_flag(vul_f, flag1) && !(have_flag(im_f[0], flag1) || have_flag(im_f[1], flag1) || have_flag(im_f[2], flag1)))
+       if (have_flag(f->player_vuln, flag1) &&
+            !(have_flag(f->known_obj_imm, flag1) ||
+              have_flag(f->player_imm, flag1) ||
+              have_flag(f->tim_player_imm, flag1)))
                vuln = TRUE;
 
        /* Header */
-       c_put_str(TERM_WHITE, header, row, col);
+       if (!(mode & DP_IMM)) c_put_str(TERM_WHITE, header, row, col);
 
        /* Advance */
        col += strlen(header) + 1;
 
+        /* Weapon flags need only two column */
+        if (mode & DP_WP) max_i = INVEN_LARM + 1;
+        else max_i = INVEN_TOTAL;
+
        /* Check equipment */
-       for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
+       for (i = INVEN_RARM; i < max_i; i++)
        {
+                u32b flgs[TR_FLAG_SIZE];
                object_type *o_ptr;
 
                /* Object */
@@ -2961,41 +2950,45 @@ static void display_player_flag_aux(int row, int col, cptr header,
 
                /* Known flags */
                object_flags_known(o_ptr, flgs);
-               cflgs = o_ptr->curse_flags;
 
                /* Default */
-               c_put_str((byte)(vuln ? TERM_RED : TERM_SLATE), ".", row, col);
+                if (!(mode & DP_IMM))
+                        c_put_str((byte)(vuln ? TERM_RED : TERM_SLATE), ".", row, col);
 
                /* Check flags */
-               if (((flag1 > 0) && have_flag(flgs, flag1)) ||
-                   ((flag1 == -1) && (cflgs & (TRC_CURSED | TRC_HEAVY_CURSE))))
-                       c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE), "+", row, col);
-               if (((flag2 > 0) && have_flag(flgs, flag2)) ||
-                   ((flag2 == -1) && (cflgs & TRC_PERMA_CURSE)))
-                       c_put_str(TERM_WHITE, "*", row, col);
+                if (mode & DP_CURSE)
+                {
+                        if ((mode & DP_CURSE) && (o_ptr->curse_flags & (TRC_CURSED | TRC_HEAVY_CURSE)))
+                                c_put_str(TERM_WHITE, "+", row, col);
+                        if ((mode & DP_CURSE) && (o_ptr->curse_flags & TRC_PERMA_CURSE))
+                                c_put_str(TERM_WHITE, "*", row, col);
+                }
+                else
+                {
+                        if (have_flag(flgs, flag1))
+                                c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE),
+                                          (mode & DP_IMM) ? "*" : "+", row, col);
+                }
 
                /* Advance */
                col++;
        }
 
-       /* Player flags */
-       player_flags(flgs);
+        /* Assume that player flag is already written */
+        if (mode & DP_IMM) return;
 
        /* Default */
        c_put_str((byte)(vuln ? TERM_RED : TERM_SLATE), ".", row, col);
 
-       /* Check flags */
-       if (have_flag(flgs, flag1)) c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE), "+", row, col);
+       /* Player flags */
+       if (have_flag(f->player_flags, flag1)) c_put_str((byte)(vuln ? TERM_L_RED : TERM_WHITE), "+", row, col);
 
        /* Timed player flags */
-       tim_player_flags(flgs, TRUE);
-
-       /* Check flags */
-       if (have_flag(flgs, flag1)) c_put_str((byte)(vuln ? TERM_ORANGE : TERM_YELLOW), "#", row, col);
+       if (have_flag(f->tim_player_flags, flag1)) c_put_str((byte)(vuln ? TERM_ORANGE : TERM_YELLOW), "#", row, col);
 
        /* Immunity */
-       if (have_flag(im_f[2], flag1)) c_put_str(TERM_YELLOW, "*", row, col);
-       if (have_flag(im_f[1], flag1)) c_put_str(TERM_WHITE, "*", row, col);
+       if (have_flag(f->tim_player_imm, flag1)) c_put_str(TERM_YELLOW, "*", row, col);
+       if (have_flag(f->player_imm, flag1)) c_put_str(TERM_WHITE, "*", row, col);
 
        /* Vulnerability */
        if (vuln) c_put_str(TERM_RED, "v", row, col + 1);
@@ -3010,44 +3003,54 @@ static void display_player_flag_info(void)
        int row;
        int col;
 
-       u32b im_f[3][TR_FLAG_SIZE], vul_f[TR_FLAG_SIZE];
+        all_player_flags f;
 
-       known_obj_immunity(im_f[0]);
-       player_immunity(im_f[1]);
-       tim_player_immunity(im_f[2]);
-
-       player_vuln_flags(vul_f);
+        /* Extract flags and store */
+       player_flags(f.player_flags);
+       tim_player_flags(f.tim_player_flags, TRUE);
+       player_immunity(f.player_imm);
+       tim_player_immunity(f.tim_player_imm);
+       known_obj_immunity(f.known_obj_imm);
+       player_vuln_flags(f.player_vuln);
 
        /*** Set 1 ***/
 
        row = 12;
        col = 1;
 
-       display_player_equippy(row-2, col+8);
+       display_player_equippy(row-2, col+8, 0);
        c_put_str(TERM_WHITE, "abcdefghijkl@", row-1, col+8);
 
 #ifdef JP
-display_player_flag_aux(row+0, col, "ÂÑ»À  :", TR_RES_ACID, TR_IM_ACID, im_f, vul_f);
-display_player_flag_aux(row+1, col, "ÂÑÅÅ·â:", TR_RES_ELEC, TR_IM_ELEC, im_f, vul_f);
-display_player_flag_aux(row+2, col, "ÂѲбê:", TR_RES_FIRE, TR_IM_FIRE, im_f, vul_f);
-display_player_flag_aux(row+3, col, "ÂÑÎ䵤:", TR_RES_COLD, TR_IM_COLD, im_f, vul_f);
-display_player_flag_aux(row+4, col, "ÂÑÆÇ  :", TR_RES_POIS, -2, im_f, vul_f);
-display_player_flag_aux(row+5, col, "ÂÑÁ®¸÷:", TR_RES_LITE, -2, im_f, vul_f);
-display_player_flag_aux(row+6, col, "ÂѰŹõ:", TR_RES_DARK, -2, im_f, vul_f);
-display_player_flag_aux(row+7, col, "ÂÑÇËÊÒ:", TR_RES_SHARDS, -2, im_f, vul_f);
-display_player_flag_aux(row+8, col, "ÂÑÌÕÌÜ:", TR_RES_BLIND, -2, im_f, vul_f);
-display_player_flag_aux(row+9, col, "ÂѺ®Íð:", TR_RES_CONF, -2, im_f, vul_f);
-#else
-       display_player_flag_aux(row+0, col, "Acid  :", TR_RES_ACID, TR_IM_ACID, im_f, vul_f);
-       display_player_flag_aux(row+1, col, "Elec  :", TR_RES_ELEC, TR_IM_ELEC, im_f, vul_f);
-       display_player_flag_aux(row+2, col, "Fire  :", TR_RES_FIRE, TR_IM_FIRE, im_f, vul_f);
-       display_player_flag_aux(row+3, col, "Cold  :", TR_RES_COLD, TR_IM_COLD, im_f, vul_f);
-       display_player_flag_aux(row+4, col, "Poison:", TR_RES_POIS, -2, im_f, vul_f);
-       display_player_flag_aux(row+5, col, "Light :", TR_RES_LITE, -2, im_f, vul_f);
-       display_player_flag_aux(row+6, col, "Dark  :", TR_RES_DARK, -2, im_f, vul_f);
-       display_player_flag_aux(row+7, col, "Shard :", TR_RES_SHARDS, -2, im_f, vul_f);
-       display_player_flag_aux(row+8, col, "Blind :", TR_RES_BLIND, -2, im_f, vul_f);
-       display_player_flag_aux(row+9, col, "Conf  :", TR_RES_CONF, -2, im_f, vul_f);
+display_flag_aux(row+0, col, "ÂÑ»À  :", TR_RES_ACID, &f, 0);
+display_flag_aux(row+0, col, "ÂÑ»À  :", TR_IM_ACID, &f, DP_IMM);
+display_flag_aux(row+1, col, "ÂÑÅÅ·â:", TR_RES_ELEC, &f, 0);
+display_flag_aux(row+1, col, "ÂÑÅÅ·â:", TR_IM_ELEC, &f, DP_IMM);
+display_flag_aux(row+2, col, "ÂѲбê:", TR_RES_FIRE, &f, 0);
+display_flag_aux(row+2, col, "ÂѲбê:", TR_IM_FIRE, &f, DP_IMM);
+display_flag_aux(row+3, col, "ÂÑÎ䵤:", TR_RES_COLD, &f, 0);
+display_flag_aux(row+3, col, "ÂÑÎ䵤:", TR_IM_COLD, &f, DP_IMM);
+display_flag_aux(row+4, col, "ÂÑÆÇ  :", TR_RES_POIS, &f, 0);
+display_flag_aux(row+5, col, "ÂÑÁ®¸÷:", TR_RES_LITE, &f, 0);
+display_flag_aux(row+6, col, "ÂѰŹõ:", TR_RES_DARK, &f, 0);
+display_flag_aux(row+7, col, "ÂÑÇËÊÒ:", TR_RES_SHARDS, &f, 0);
+display_flag_aux(row+8, col, "ÂÑÌÕÌÜ:", TR_RES_BLIND, &f, 0);
+display_flag_aux(row+9, col, "ÂѺ®Íð:", TR_RES_CONF, &f, 0);
+#else
+       display_flag_aux(row+0, col, "Acid  :", TR_RES_ACID, &f, 0);
+       display_flag_aux(row+0, col, "Acid  :", TR_IM_ACID, &f, DP_IMM);
+       display_flag_aux(row+1, col, "Elec  :", TR_RES_ELEC, &f, 0);
+       display_flag_aux(row+1, col, "Elec  :", TR_IM_ELEC, &f, DP_IMM);
+       display_flag_aux(row+2, col, "Fire  :", TR_RES_FIRE, &f, 0);
+       display_flag_aux(row+2, col, "Fire  :", TR_IM_FIRE, &f, DP_IMM);
+       display_flag_aux(row+3, col, "Cold  :", TR_RES_COLD, &f, 0);
+       display_flag_aux(row+3, col, "Cold  :", TR_IM_COLD, &f, DP_IMM);
+       display_flag_aux(row+4, col, "Poison:", TR_RES_POIS, &f, 0);
+       display_flag_aux(row+5, col, "Light :", TR_RES_LITE, &f, 0);
+       display_flag_aux(row+6, col, "Dark  :", TR_RES_DARK, &f, 0);
+       display_flag_aux(row+7, col, "Shard :", TR_RES_SHARDS, &f, 0);
+       display_flag_aux(row+8, col, "Blind :", TR_RES_BLIND, &f, 0);
+       display_flag_aux(row+9, col, "Conf  :", TR_RES_CONF, &f, 0);
 #endif
 
 
@@ -3056,32 +3059,32 @@ display_player_flag_aux(row+9, col, "
        row = 12;
        col = 26;
 
-       display_player_equippy(row-2, col+8);
+       display_player_equippy(row-2, col+8, 0);
 
        c_put_str(TERM_WHITE, "abcdefghijkl@", row-1, col+8);
 
 #ifdef JP
-display_player_flag_aux(row+0, col, "Âѹ첻:", TR_RES_SOUND, -2, im_f, vul_f);
-display_player_flag_aux(row+1, col, "ÂÑÃϹö:", TR_RES_NETHER, -2, im_f, vul_f);
-display_player_flag_aux(row+2, col, "ÂÑ°øº®:", TR_RES_NEXUS, -2, im_f, vul_f);
-display_player_flag_aux(row+3, col, "ÂÑ¥«¥ª:", TR_RES_CHAOS, -2, im_f, vul_f);
-display_player_flag_aux(row+4, col, "ÂÑÎô²½:", TR_RES_DISEN, -2, im_f, vul_f);
-display_player_flag_aux(row+5, col, "ÂѶ²ÉÝ:", TR_RES_FEAR, -2, im_f, vul_f);
-display_player_flag_aux(row+6, col, "È¿¼Í  :", TR_REFLECT, -2, im_f, vul_f);
-display_player_flag_aux(row+7, col, "²Ð±ê¥ª:", TR_SH_FIRE, -2, im_f, vul_f);
-display_player_flag_aux(row+8, col, "Åŵ¤¥ª:", TR_SH_ELEC, -2, im_f, vul_f);
-display_player_flag_aux(row+9, col, "Î䵤¥ª:", TR_SH_COLD, -2, im_f, vul_f);
+display_flag_aux(row+0, col, "Âѹ첻:", TR_RES_SOUND, &f, 0);
+display_flag_aux(row+1, col, "ÂÑÃϹö:", TR_RES_NETHER, &f, 0);
+display_flag_aux(row+2, col, "ÂÑ°øº®:", TR_RES_NEXUS, &f, 0);
+display_flag_aux(row+3, col, "ÂÑ¥«¥ª:", TR_RES_CHAOS, &f, 0);
+display_flag_aux(row+4, col, "ÂÑÎô²½:", TR_RES_DISEN, &f, 0);
+display_flag_aux(row+5, col, "ÂѶ²ÉÝ:", TR_RES_FEAR, &f, 0);
+display_flag_aux(row+6, col, "È¿¼Í  :", TR_REFLECT, &f, 0);
+display_flag_aux(row+7, col, "²Ð±ê¥ª:", TR_SH_FIRE, &f, 0);
+display_flag_aux(row+8, col, "Åŵ¤¥ª:", TR_SH_ELEC, &f, 0);
+display_flag_aux(row+9, col, "Î䵤¥ª:", TR_SH_COLD, &f, 0);
 #else
-       display_player_flag_aux(row+0, col, "Sound :", TR_RES_SOUND, -2, im_f, vul_f);
-       display_player_flag_aux(row+1, col, "Nether:", TR_RES_NETHER, -2, im_f, vul_f);
-       display_player_flag_aux(row+2, col, "Nexus :", TR_RES_NEXUS, -2, im_f, vul_f);
-       display_player_flag_aux(row+3, col, "Chaos :", TR_RES_CHAOS, -2, im_f, vul_f);
-       display_player_flag_aux(row+4, col, "Disnch:", TR_RES_DISEN, -2, im_f, vul_f);
-       display_player_flag_aux(row+5, col, "Fear  :", TR_RES_FEAR, -2, im_f, vul_f);
-       display_player_flag_aux(row+6, col, "Reflct:", TR_REFLECT, -2, im_f, vul_f);
-       display_player_flag_aux(row+7, col, "AuFire:", TR_SH_FIRE, -2, im_f, vul_f);
-       display_player_flag_aux(row+8, col, "AuElec:", TR_SH_ELEC, -2, im_f, vul_f);
-       display_player_flag_aux(row+9, col, "AuCold:", TR_SH_COLD, -2, im_f, vul_f);
+       display_flag_aux(row+0, col, "Sound :", TR_RES_SOUND, &f, 0);
+       display_flag_aux(row+1, col, "Nether:", TR_RES_NETHER, &f, 0);
+       display_flag_aux(row+2, col, "Nexus :", TR_RES_NEXUS, &f, 0);
+       display_flag_aux(row+3, col, "Chaos :", TR_RES_CHAOS, &f, 0);
+       display_flag_aux(row+4, col, "Disnch:", TR_RES_DISEN, &f, 0);
+       display_flag_aux(row+5, col, "Fear  :", TR_RES_FEAR, &f, 0);
+       display_flag_aux(row+6, col, "Reflct:", TR_REFLECT, &f, 0);
+       display_flag_aux(row+7, col, "AuFire:", TR_SH_FIRE, &f, 0);
+       display_flag_aux(row+8, col, "AuElec:", TR_SH_ELEC, &f, 0);
+       display_flag_aux(row+9, col, "AuCold:", TR_SH_COLD, &f, 0);
 #endif
 
 
@@ -3090,32 +3093,223 @@ display_player_flag_aux(row+9, col, "
        row = 12;
        col = 51;
 
-       display_player_equippy(row-2, col+12);
+       display_player_equippy(row-2, col+12, 0);
+
+       c_put_str(TERM_WHITE, "abcdefghijkl@", row-1, col+12);
+
+#ifdef JP
+display_flag_aux(row+0, col, "²Ã®      :", TR_SPEED, &f, 0);
+display_flag_aux(row+1, col, "ÂÑËãáã    :", TR_FREE_ACT, &f, 0);
+display_flag_aux(row+2, col, "Æ©ÌÀÂλëǧ:", TR_SEE_INVIS, &f, 0);
+display_flag_aux(row+3, col, "·Ð¸³ÃÍÊÝ»ý:", TR_HOLD_LIFE, &f, 0);
+display_flag_aux(row+4, col, "·Ù¹ð      :", TR_WARNING, &f, 0);
+display_flag_aux(row+5, col, "Ãپò½    :", TR_SLOW_DIGEST, &f, 0);
+display_flag_aux(row+6, col, "µÞ²óÉü    :", TR_REGEN, &f, 0);
+display_flag_aux(row+7, col, "ÉâÍ·      :", TR_FEATHER, &f, 0);
+display_flag_aux(row+8, col, "±Ê±ó¸÷¸»  :", TR_LITE, &f, 0);
+display_flag_aux(row+9, col, "¼ö¤¤      :", 0, &f, DP_CURSE);
+#else
+       display_flag_aux(row+0, col, "Speed     :", TR_SPEED, &f, 0);
+       display_flag_aux(row+1, col, "FreeAction:", TR_FREE_ACT, &f, 0);
+       display_flag_aux(row+2, col, "SeeInvisi.:", TR_SEE_INVIS, &f, 0);
+       display_flag_aux(row+3, col, "Hold Life :", TR_HOLD_LIFE, &f, 0);
+       display_flag_aux(row+4, col, "Warning   :", TR_WARNING, &f, 0);
+       display_flag_aux(row+5, col, "SlowDigest:", TR_SLOW_DIGEST, &f, 0);
+       display_flag_aux(row+6, col, "Regene.   :", TR_REGEN, &f, 0);
+       display_flag_aux(row+7, col, "Levitation:", TR_FEATHER, &f, 0);
+       display_flag_aux(row+8, col, "Perm Lite :", TR_LITE, &f, 0);
+       display_flag_aux(row+9, col, "Cursed    :", 0, &f, DP_CURSE);
+#endif
+
+}
+
+
+/*
+ * Special display, part 2
+ */
+static void display_player_other_flag_info(void)
+{
+       int row;
+       int col;
+
+        all_player_flags f;
+
+        /* Extract flags and store */
+       player_flags(f.player_flags);
+       tim_player_flags(f.tim_player_flags, TRUE);
+       player_immunity(f.player_imm);
+       tim_player_immunity(f.tim_player_imm);
+       known_obj_immunity(f.known_obj_imm);
+       player_vuln_flags(f.player_vuln);
+
+       /*** Set 1 ***/
+
+       row = 3;
+       col = 1;
+
+       display_player_equippy(row-2, col+12, DP_WP);
+
+       c_put_str(TERM_WHITE, "ab@", row-1, col+12);
+
+#ifdef JP
+        display_flag_aux(row+ 0, col, "¼Ù°­ ÇÜÂÇ :", TR_SLAY_EVIL, &f, DP_WP);
+        display_flag_aux(row+ 0, col, "¼Ù°­ ÇÜÂÇ :", TR_KILL_EVIL, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 1, col, "ÉÔ»à ÇÜÂÇ :", TR_SLAY_UNDEAD, &f, DP_WP);
+        display_flag_aux(row+ 1, col, "ÉÔ»à ÇÜÂÇ :", TR_KILL_UNDEAD, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 2, col, "°­Ëâ ÇÜÂÇ :", TR_SLAY_DEMON, &f, DP_WP);
+        display_flag_aux(row+ 2, col, "°­Ëâ ÇÜÂÇ :", TR_KILL_DEMON, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 3, col, "ζ ÇÜÂÇ   :", TR_SLAY_DRAGON, &f, DP_WP);
+        display_flag_aux(row+ 3, col, "ζ ÇÜÂÇ   :", TR_KILL_DRAGON, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 4, col, "¿Í´Ö ÇÜÂÇ :", TR_SLAY_HUMAN, &f, DP_WP);
+        display_flag_aux(row+ 4, col, "¿Í´Ö ÇÜÂÇ :", TR_KILL_HUMAN, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 5, col, "ưʪ ÇÜÂÇ :", TR_SLAY_ANIMAL, &f, DP_WP);
+        display_flag_aux(row+ 5, col, "ưʪ ÇÜÂÇ :", TR_KILL_ANIMAL, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 6, col, "¥ª¡¼¥¯ÇÜÂÇ:", TR_SLAY_ORC, &f, DP_WP);
+        display_flag_aux(row+ 6, col, "¥ª¡¼¥¯ÇÜÂÇ:", TR_KILL_ORC, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 7, col, "¥È¥í¥ëÇÜÂÇ:", TR_SLAY_TROLL, &f, DP_WP);
+        display_flag_aux(row+ 7, col, "¥È¥í¥ëÇÜÂÇ:", TR_KILL_TROLL, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 8, col, "µð¿Í ÇÜÂÇ :", TR_SLAY_GIANT, &f, DP_WP);
+        display_flag_aux(row+ 8, col, "µð¿Í ÇÜÂÇ :", TR_KILL_GIANT, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 9, col, "Íϲò      :", TR_BRAND_ACID, &f, DP_WP);
+        display_flag_aux(row+10, col, "ÅÅ·â      :", TR_BRAND_ELEC, &f, DP_WP);
+        display_flag_aux(row+11, col, "¾Æ´þ      :", TR_BRAND_FIRE, &f, DP_WP);
+        display_flag_aux(row+12, col, "Åà·ë      :", TR_BRAND_COLD, &f, DP_WP);
+        display_flag_aux(row+13, col, "ÆÇ»¦      :", TR_BRAND_POIS, &f, DP_WP);
+        display_flag_aux(row+14, col, "ÀÚ¤ìÌ£    :", TR_VORPAL, &f, DP_WP);
+        display_flag_aux(row+15, col, "ÃÏ¿Ì      :", TR_IMPACT, &f, DP_WP);
+        display_flag_aux(row+16, col, "µÛ·ì      :", TR_VAMPIRIC, &f, DP_WP);
+        display_flag_aux(row+17, col, "¥«¥ª¥¹¸ú²Ì:", TR_CHAOTIC, &f, DP_WP);
+        display_flag_aux(row+18, col, "ÍýÎÏ      :", TR_FORCE_WEAPON, &f, DP_WP);
+#else
+        display_flag_aux(row+ 0, col, "Slay Evil :", TR_SLAY_EVIL, &f, DP_WP);
+        display_flag_aux(row+ 0, col, "Slay Evil :", TR_KILL_EVIL, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 1, col, "Slay Und. :", TR_SLAY_UNDEAD, &f, DP_WP);
+        display_flag_aux(row+ 1, col, "Slay Und. :", TR_KILL_UNDEAD, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 2, col, "Slay Demon:", TR_SLAY_DEMON, &f, DP_WP);
+        display_flag_aux(row+ 2, col, "Slay Demon:", TR_KILL_DEMON, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 3, col, "Slay Drag.:", TR_SLAY_DRAGON, &f, DP_WP);
+        display_flag_aux(row+ 3, col, "Slay Drag.:", TR_KILL_DRAGON, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 4, col, "Slay Human:", TR_SLAY_HUMAN, &f, DP_WP);
+        display_flag_aux(row+ 4, col, "Slay Human:", TR_KILL_HUMAN, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 5, col, "Slay Anim.:", TR_SLAY_ANIMAL, &f, DP_WP);
+        display_flag_aux(row+ 5, col, "Slay Anim.:", TR_KILL_ANIMAL, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 6, col, "Slay Orc  :", TR_SLAY_ORC, &f, DP_WP);
+        display_flag_aux(row+ 6, col, "Slay Orc  :", TR_KILL_ORC, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 7, col, "Slay Troll:", TR_SLAY_TROLL, &f, DP_WP);
+        display_flag_aux(row+ 7, col, "Slay Troll:", TR_KILL_TROLL, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 8, col, "Slay Giant:", TR_SLAY_GIANT, &f, DP_WP);
+        display_flag_aux(row+ 8, col, "Slay Giant:", TR_KILL_GIANT, &f, (DP_WP|DP_IMM));
+        display_flag_aux(row+ 9, col, "Acid Brand:", TR_BRAND_ACID, &f, DP_WP);
+        display_flag_aux(row+10, col, "Elec Brand:", TR_BRAND_ELEC, &f, DP_WP);
+        display_flag_aux(row+11, col, "Fire Brand:", TR_BRAND_FIRE, &f, DP_WP);
+        display_flag_aux(row+12, col, "Cold Brand:", TR_BRAND_COLD, &f, DP_WP);
+        display_flag_aux(row+13, col, "Poison Brd:", TR_BRAND_POIS, &f, DP_WP);
+        display_flag_aux(row+14, col, "Sharpness :", TR_VORPAL, &f, DP_WP);
+        display_flag_aux(row+15, col, "Quake     :", TR_IMPACT, &f, DP_WP);
+        display_flag_aux(row+16, col, "Vampicic  :", TR_VAMPIRIC, &f, DP_WP);
+        display_flag_aux(row+17, col, "Chatic    :", TR_CHAOTIC, &f, DP_WP);
+        display_flag_aux(row+18, col, "Force Wep.:", TR_FORCE_WEAPON, &f, DP_WP);
+#endif
+
+
+       /*** Set 2 ***/
+
+       row = 3;
+       col = col + 12 + 7;
 
+       display_player_equippy(row-2, col+12, 0);
        c_put_str(TERM_WHITE, "abcdefghijkl@", row-1, col+12);
 
 #ifdef JP
-display_player_flag_aux(row+0, col, "²Ã®      :", TR_SPEED, -2, im_f, vul_f);
-display_player_flag_aux(row+1, col, "ÂÑËãáã    :", TR_FREE_ACT, -2, im_f, vul_f);
-display_player_flag_aux(row+2, col, "Æ©ÌÀÂλëǧ:", TR_SEE_INVIS, -2, im_f, vul_f);
-display_player_flag_aux(row+3, col, "·Ð¸³ÃÍÊÝ»ý:", TR_HOLD_LIFE, -2, im_f, vul_f);
-display_player_flag_aux(row+4, col, "¥Æ¥ì¥Ñ¥·¡¼:", TR_TELEPATHY, -2, im_f, vul_f);
-display_player_flag_aux(row+5, col, "Ãپò½    :", TR_SLOW_DIGEST, -2, im_f, vul_f);
-display_player_flag_aux(row+6, col, "µÞ²óÉü    :", TR_REGEN, -2, im_f, vul_f);
-display_player_flag_aux(row+7, col, "ÉâÍ·      :", TR_FEATHER, -2, im_f, vul_f);
-display_player_flag_aux(row+8, col, "±Ê±ó¸÷¸»  :", TR_LITE, -2, im_f, vul_f);
-display_player_flag_aux(row+9, col, "¼ö¤¤      :", -1, -1, im_f, vul_f);
-#else
-       display_player_flag_aux(row+0, col, "Speed     :", TR_SPEED, -2, im_f, vul_f);
-       display_player_flag_aux(row+1, col, "FreeAction:", TR_FREE_ACT, -2, im_f, vul_f);
-       display_player_flag_aux(row+2, col, "SeeInvisi.:", TR_SEE_INVIS, -2, im_f, vul_f);
-       display_player_flag_aux(row+3, col, "Hold Life :", TR_HOLD_LIFE, -2, im_f, vul_f);
-       display_player_flag_aux(row+4, col, "Telepathy :", TR_TELEPATHY, -2, im_f, vul_f);
-       display_player_flag_aux(row+5, col, "SlowDigest:", TR_SLOW_DIGEST, -2, im_f, vul_f);
-       display_player_flag_aux(row+6, col, "Regene.   :", TR_REGEN, -2, im_f, vul_f);
-       display_player_flag_aux(row+7, col, "Levitation:", TR_FEATHER, -2, im_f, vul_f);
-       display_player_flag_aux(row+8, col, "Perm Lite :", TR_LITE, -2, im_f, vul_f);
-       display_player_flag_aux(row+9, col, "Cursed    :", -1, -1, im_f, vul_f);
+        display_flag_aux(row+ 0, col, "¥Æ¥ì¥Ñ¥·¡¼:", TR_TELEPATHY, &f, 0);
+        display_flag_aux(row+ 1, col, "¼Ù°­ESP   :", TR_ESP_EVIL, &f, 0);
+        display_flag_aux(row+ 2, col, "̵À¸ÊªESP :", TR_ESP_NONLIVING, &f, 0);
+        display_flag_aux(row+ 3, col, "Á±ÎÉESP   :", TR_ESP_GOOD, &f, 0);
+        display_flag_aux(row+ 4, col, "ÉÔ»àESP   :", TR_ESP_UNDEAD, &f, 0);
+        display_flag_aux(row+ 5, col, "°­ËâESP   :", TR_ESP_DEMON, &f, 0);
+        display_flag_aux(row+ 6, col, "ζESP     :", TR_ESP_DRAGON, &f, 0);
+        display_flag_aux(row+ 7, col, "¿Í´ÖESP   :", TR_ESP_HUMAN, &f, 0);
+        display_flag_aux(row+ 8, col, "ưʪESP   :", TR_ESP_ANIMAL, &f, 0);
+        display_flag_aux(row+ 9, col, "¥ª¡¼¥¯ESP :", TR_ESP_ORC, &f, 0);
+        display_flag_aux(row+10, col, "¥È¥í¥ëESP :", TR_ESP_TROLL, &f, 0);
+        display_flag_aux(row+11, col, "µð¿ÍESP   :", TR_ESP_GIANT, &f, 0);
+
+        display_flag_aux(row+13, col, "ÏÓÎÏ°Ý»ý  :", TR_SUST_STR, &f, 0);
+        display_flag_aux(row+14, col, "ÃÎÎÏ°Ý»ý  :", TR_SUST_INT, &f, 0);
+        display_flag_aux(row+15, col, "¸­¤µ°Ý»ý  :", TR_SUST_WIS, &f, 0);
+        display_flag_aux(row+16, col, "´ïÍÑ°Ý»ý  :", TR_SUST_DEX, &f, 0);
+        display_flag_aux(row+17, col, "Âѵװݻý  :", TR_SUST_CON, &f, 0);
+        display_flag_aux(row+18, col, "Ì¥ÎÏ°Ý»ý  :", TR_SUST_CHR, &f, 0);
+#else
+        display_flag_aux(row+ 0, col, "Telepathy :", TR_TELEPATHY, &f, 0);
+        display_flag_aux(row+ 1, col, "ESP Evil  :", TR_ESP_EVIL, &f, 0);
+        display_flag_aux(row+ 2, col, "ESP Noliv.:", TR_ESP_NONLIVING, &f, 0);
+        display_flag_aux(row+ 3, col, "ESP Good  :", TR_ESP_GOOD, &f, 0);
+        display_flag_aux(row+ 4, col, "ESP Undead:", TR_ESP_UNDEAD, &f, 0);
+        display_flag_aux(row+ 5, col, "ESP Demon :", TR_ESP_DEMON, &f, 0);
+        display_flag_aux(row+ 6, col, "ESP Dragon:", TR_ESP_DRAGON, &f, 0);
+        display_flag_aux(row+ 7, col, "ESP Human :", TR_ESP_HUMAN, &f, 0);
+        display_flag_aux(row+ 8, col, "ESP Animal:", TR_ESP_ANIMAL, &f, 0);
+        display_flag_aux(row+ 9, col, "ESP Orc   :", TR_ESP_ORC, &f, 0);
+        display_flag_aux(row+10, col, "ESP Troll :", TR_ESP_TROLL, &f, 0);
+        display_flag_aux(row+11, col, "ESP Giant :", TR_ESP_GIANT, &f, 0);
+
+        display_flag_aux(row+13, col, "Sust Str  :", TR_SUST_STR, &f, 0);
+        display_flag_aux(row+14, col, "Sust Int  :", TR_SUST_INT, &f, 0);
+        display_flag_aux(row+15, col, "Sust Wis  :", TR_SUST_WIS, &f, 0);
+        display_flag_aux(row+16, col, "Sust Dex  :", TR_SUST_DEX, &f, 0);
+        display_flag_aux(row+17, col, "Sust Con  :", TR_SUST_CON, &f, 0);
+        display_flag_aux(row+18, col, "Sust Chr  :", TR_SUST_CHR, &f, 0);
+#endif
+
+
+       /*** Set 3 ***/
+
+       row = 3;
+       col = col + 12 + 17;
+
+       display_player_equippy(row-2, col+14, 0);
+
+       c_put_str(TERM_WHITE, "abcdefghijkl@", row-1, col+14);
+
+#ifdef JP
+        display_flag_aux(row+ 0, col, "Äɲù¶·â    :", TR_BLOWS, &f, 0);
+        display_flag_aux(row+ 1, col, "ºÎ·¡        :", TR_TUNNEL, &f, 0);
+        display_flag_aux(row+ 2, col, "ÀÖ³°Àþ»ëÎÏ  :", TR_INFRA, &f, 0);
+        display_flag_aux(row+ 3, col, "ËâË¡Æ»¶ñ»ÙÇÛ:", TR_MAGIC_MASTERY, &f, 0);
+        display_flag_aux(row+ 4, col, "±£Ì©        :", TR_STEALTH, &f, 0);
+        display_flag_aux(row+ 5, col, "õº÷        :", TR_SEARCH, &f, 0);
+
+        display_flag_aux(row+ 7, col, "¾èÇÏ        :", TR_RIDING, &f, 0);
+        display_flag_aux(row+ 8, col, "ÅêÚ³        :", TR_THROW, &f, 0);
+        display_flag_aux(row+ 9, col, "½ËÊ¡        :", TR_BLESSED, &f, 0);
+        display_flag_aux(row+10, col, "È¿¥Æ¥ì¥Ý¡¼¥È:", TR_NO_TELE, &f, 0);
+        display_flag_aux(row+11, col, "È¿ËâË¡      :", TR_NO_MAGIC, &f, 0);
+        display_flag_aux(row+12, col, "¾ÃÈñËâÎϸº¾¯:", TR_DEC_MANA, &f, 0);
+
+        display_flag_aux(row+14, col, "·Ð¸³Ã͸º¾¯  :", TR_DRAIN_EXP, &f, 0);
+        display_flag_aux(row+15, col, "Íð¥Æ¥ì¥Ý¡¼¥È:", TR_TELEPORT, &f, 0);
+        display_flag_aux(row+16, col, "È¿´¶        :", TR_AGGRAVATE, &f, 0);
+        display_flag_aux(row+17, col, "ÂÀ¸Å¤Î±åÇ°  :", TR_TY_CURSE, &f, 0);
+#else
+        display_flag_aux(row+ 0, col, "Add Blows   :", TR_BLOWS, &f, 0);
+        display_flag_aux(row+ 1, col, "Add Tunnel  :", TR_TUNNEL, &f, 0);
+        display_flag_aux(row+ 2, col, "Add Infra   :", TR_INFRA, &f, 0);
+        display_flag_aux(row+ 3, col, "Add Device  :", TR_MAGIC_MASTERY, &f, 0);
+        display_flag_aux(row+ 4, col, "Add Stealth :", TR_STEALTH, &f, 0);
+        display_flag_aux(row+ 5, col, "Add Search  :", TR_SEARCH, &f, 0);
+
+        display_flag_aux(row+ 7, col, "Riding      :", TR_RIDING, &f, 0);
+        display_flag_aux(row+ 8, col, "Throw       :", TR_THROW, &f, 0);
+        display_flag_aux(row+ 9, col, "Blessed     :", TR_BLESSED, &f, 0);
+        display_flag_aux(row+10, col, "No Teleport :", TR_NO_TELE, &f, 0);
+        display_flag_aux(row+11, col, "Anti Magic  :", TR_NO_MAGIC, &f, 0);
+        display_flag_aux(row+12, col, "Econom. Mana:", TR_DEC_MANA, &f, 0);
+
+        display_flag_aux(row+14, col, "Drain Exp   :", TR_DRAIN_EXP, &f, 0);
+        display_flag_aux(row+15, col, "Rnd.Teleport:", TR_TELEPORT, &f, 0);
+        display_flag_aux(row+16, col, "Aggravate   :", TR_AGGRAVATE, &f, 0);
+        display_flag_aux(row+17, col, "TY Curse    :", TR_TY_CURSE, &f, 0);
 #endif
 
 }
@@ -3487,501 +3681,15 @@ c_put_str(TERM_L_GREEN, "ǽ
 
 
 /*
- * Object flag names
- */
-static cptr object_flag_names[96] =
-{
-#ifdef JP
-"+ÏÓÎÏ",
-"+ÃÎǽ",
-"+¸­¤µ",
-"+´ïÍÑ",
-"+Âѵ×",
-"+Ì¥ÎÏ",
-#else
-       "Add Str",
-       "Add Int",
-       "Add Wis",
-       "Add Dex",
-       "Add Con",
-       "Add Chr",
-#endif
-
-#ifdef JP
-       "ËâÆ»¶ñ",
-
-       "ÍýÎÏ",
-#else
-       "M.Item-Mas",
-
-       "Force wep.",
-#endif
-
-#ifdef JP
-"+±£Ì©¹ÔÆ°",
-"+õº÷",
-"+ÀÖ³°Àþ»ë",
-"+·¡ºï",
-"+¥¹¥Ô¡¼¥É",
-"+ÂÇ·â²ó¿ô",
-"¥«¥ª¥¹¸ú²Ì",
-"µÛ·ì",
-"ưʪ ÇÜÂÇ",
-"¼Ù°­ ÇÜÂÇ",
-"ÉÔ»à ÇÜÂÇ",
-"°­Ëâ ÇÜÂÇ",
-"¥ª¡¼¥¯ÇÜÂÇ",
-"¥È¥í¥ëÇÜÂÇ",
-"µð¿Í ÇÜÂÇ",
-"ζ ÇÜÂÇ",
-"ζ ÇÜÇÜÂÇ",
-"±Ô¿Ï",
-"ÃÏ¿ÌȯÀ¸",
-"ÆÇ°À­¹¶·â",
-"»À°À­¹¶·â",
-"ÅÅ°À­¹¶·â",
-"²Ð°À­¹¶·â",
-"Îä°À­¹¶·â",
-#else
-       "Add Stea.",
-       "Add Sear.",
-       "Add Infra",
-       "Add Tun..",
-       "Add Speed",
-       "Add Blows",
-       "Chaotic",
-       "Vampiric",
-       "Slay Anim.",
-       "Slay Evil",
-       "Slay Und.",
-       "Slay Demon",
-       "Slay Orc",
-       "Slay Troll",
-       "Slay Giant",
-       "Slay Drag.",
-       "Kill Drag.",
-       "Sharpness",
-       "Impact",
-       "Poison Brd",
-       "Acid Brand",
-       "Elec Brand",
-       "Fire Brand",
-       "Cold Brand",
-#endif
-
-
-#ifdef JP
-"ÏÓÎÏ ÊÝ»ý",
-"ÃÎǽ ÊÝ»ý",
-"¸­¤µ ÊÝ»ý",
-"´ïÍÑ ÊÝ»ý",
-"ÂѵנÊÝ»ý",
-"Ì¥ÎÏ ÊÝ»ý",
-#else
-       "Sust Str",
-       "Sust Int",
-       "Sust Wis",
-       "Sust Dex",
-       "Sust Con",
-       "Sust Chr",
-#endif
-
-       NULL,
-       NULL,
-#ifdef JP
-"ĶÂÑ»À  ",
-"ĶÂÑÅÅ·â",
-"ĶÂѲбê",
-"ĶÂÑÎ䵤",
-#else
-       "Imm Acid",
-       "Imm Elec",
-       "Imm Fire",
-       "Imm Cold",
-#endif
-
-       NULL,
-#ifdef JP
-"È¿¼Í",
-"ÂÑËãáã",
-"·Ð¸³ÃÍÊÝ»ý",
-#else
-       "Reflect",
-       "Free Act",
-       "Hold Life",
-#endif
-
-#ifdef JP
-"ÂÑ»À  ",
-"ÂÑÅÅ·â",
-"ÂѲбê",
-"ÂÑÎ䵤",
-"ÂÑÆÇ  ",
-"ÂѶ²ÉÝ",
-"ÂÑÁ®¸÷",
-"ÂѰŹõ",
-"ÂÑÌÕÌÜ",
-"ÂѺ®Íð",
-"Âѹ첻",
-"ÂÑÇËÊÒ",
-"ÂÑÃϹö",
-"ÂÑ°øº®",
-"ÂÑ¥«¥ª",
-"ÂÑÎô²½",
-#else
-       "Res Acid",
-       "Res Elec",
-       "Res Fire",
-       "Res Cold",
-       "Res Pois",
-       "Res Fear",
-       "Res Lite",
-       "Res Dark",
-       "Res Blind",
-       "Res Conf",
-       "Res Sound",
-       "Res Shard",
-       "Res Neth",
-       "Res Nexus",
-       "Res Chaos",
-       "Res Disen",
-#endif
-
-
-
-
-#ifdef JP
-       "²Ð±ê¥ª¡¼¥é",
-
-       "Åŵ¤¥ª¡¼¥é",
-#else
-       "Aura Fire",
-
-       "Aura Elec",
-#endif
-
-       NULL,
-#ifdef JP
-       "Î䵤¥ª¡¼¥é",
-#else
-       "Aura Cold",
-#endif
-#ifdef JP
-"Ëɥƥì¥Ý",
-"È¿ËâË¡",
-"¸º¾ÃÈñËâÎÏ",
-"¼Ù°­¤Ê±åÇ°",
-NULL,
-"Hide Type",
-"Show Mods",
-"¾ï»þÅÁÀâʪ",
-"ÉâÍ·",
-"¸÷¸»",
-"Æ©ÌÀ»ëǧ",
-"¥Æ¥ì¥Ñ¥·¡¼",
-"Ãپò½",
-"µÞ²óÉü",
-"¶¯Îϼͷâ",
-"¹â®¼Í·â",
-"̵½ý »À",
-"̵½ý ÅÅ",
-"̵½ý ²Ð",
-"̵½ý Îä",
-"»ÏÆ°",
-"·Ð¸³µÛ¼ý",
-"¥Æ¥ì¥Ý¡¼¥È",
-"È¿´¶",
-"½ËÊ¡",
-NULL,
-NULL,
-NULL,
-#else
-       "NoTeleport",
-       "AntiMagic",
-       "DecMana",
-       "EvilCurse",
-       NULL,
-       "Hide Type",
-       "Show Mods",
-       "Insta Art",
-       "Levitate",
-       "Lite",
-       "See Invis",
-       "Telepathy",
-       "Digestion",
-       "Regen",
-       "Xtra Might",
-       "Xtra Shots",
-       "Ign Acid",
-       "Ign Elec",
-       "Ign Fire",
-       "Ign Cold",
-       "Activate",
-       "Drain Exp",
-       "Teleport",
-       "Aggravate",
-       "Blessed",
-       NULL,
-       NULL,
-       NULL,
-#endif
-
-};
-
-
-/*
- * Summarize resistances
- */
-static void display_player_ben(void)
-{
-       int i, x, y;
-
-       object_type *o_ptr;
-
-       u32b flgs[TR_FLAG_SIZE];
-
-       u16b b[6];
-       u16b color[6];
-
-
-       /* Reset */
-       for (i = 0; i < 6; i++) b[i] = 0;
-
-
-       /* Scan equipment */
-       for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
-       {
-               /* Object */
-               o_ptr = &inventory[i];
-
-               /* Known object flags */
-               object_flags_known(o_ptr, flgs);
-
-
-               if ((prace_is_(RACE_S_FAIRY)) && (have_flag(flgs, TR_AGGRAVATE)))
-               {
-                       remove_flag(flgs, TR_AGGRAVATE);
-                       add_flag(flgs, TR_STEALTH);
-               }
-
-               /* Incorporate */
-               b[0] |= (flgs[0] & 0xFFFF);
-               b[1] |= (flgs[0] >> 16);
-               b[2] |= (flgs[1] & 0xFFFF);
-               b[3] |= (flgs[1] >> 16);
-               b[4] |= (flgs[2] & 0xFFFF);
-               b[5] |= (flgs[2] >> 16);
-       }
-
-
-       /* Player flags */
-       player_flags(flgs);
-
-       /* Incorporate */
-       b[0] |= (flgs[0] & 0xFFFF);
-       b[1] |= (flgs[0] >> 16);
-       b[2] |= (flgs[1] & 0xFFFF);
-       b[3] |= (flgs[1] >> 16);
-       b[4] |= (flgs[2] & 0xFFFF);
-       b[5] |= (flgs[2] >> 16);
-
-       /* Player flags */
-       tim_player_flags(flgs, FALSE);
-
-       /* Incorporate */
-       b[0] |= (flgs[0] & 0xFFFF);
-       b[1] |= (flgs[0] >> 16);
-       b[2] |= (flgs[1] & 0xFFFF);
-       b[3] |= (flgs[1] >> 16);
-       b[4] |= (flgs[2] & 0xFFFF);
-       b[5] |= (flgs[2] >> 16);
-       color[0] = (u16b)(flgs[0] & 0xFFFF);
-       color[1] = (u16b)(flgs[0] >> 16);
-       color[2] = (u16b)(flgs[1] & 0xFFFF);
-       color[3] = (u16b)(flgs[1] >> 16);
-       color[4] = (u16b)(flgs[2] & 0xFFFF);
-       color[5] = (u16b)(flgs[2] >> 16);
-
-       /* Scan cols */
-       for (x = 0; x < 6; x++)
-       {
-               /* Scan rows */
-               for (y = 0; y < 16; y++)
-               {
-                       byte a = TERM_SLATE;
-                       char c = '.';
-
-                       cptr name = object_flag_names[16*x+y];
-
-                       /* No name */
-                       if (!name) continue;
-
-                       /* Dump name */
-                       Term_putstr(x * 13, y + 4, -1, TERM_WHITE, name);
-
-                       /* Dump colon */
-                       Term_putch(x * 13 + 10, y + 4, TERM_WHITE, ':');
-
-                       /* Check flag */
-                       if (b[x] & (1<<y))
-                       {
-                               if (color[x] & (1<<y))
-                               {
-                                       a = TERM_YELLOW;
-                                       c = '#';
-                               }
-                               else
-                               {
-                                       a = TERM_WHITE;
-                                       c = '+';
-                               }
-                       }
-
-                       /* Dump flag */
-                       Term_putch(x * 13 + 11, y + 4, a, c);
-               }
-       }
-}
-
-
-/*
- * Summarize resistances
- */
-static void display_player_ben_one(int mode)
-{
-       int i, n, x, y;
-
-       object_type *o_ptr;
-
-       u32b flgs[TR_FLAG_SIZE];
-
-       u16b b[13][6];
-       u16b color[6];
-
-
-       /* Scan equipment */
-       for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
-       {
-               /* Index */
-               n = (i - INVEN_RARM);
-
-               /* Object */
-               o_ptr = &inventory[i];
-
-               object_flags_known(o_ptr, flgs);
-
-               if ((prace_is_(RACE_S_FAIRY)) && (have_flag(flgs, TR_AGGRAVATE)))
-               {
-                       remove_flag(flgs, TR_AGGRAVATE);
-                       add_flag(flgs, TR_STEALTH);
-               }
-
-               /* Incorporate */
-               b[n][0] = (u16b)(flgs[0] & 0xFFFF);
-               b[n][1] = (u16b)(flgs[0] >> 16);
-               b[n][2] = (u16b)(flgs[1] & 0xFFFF);
-               b[n][3] = (u16b)(flgs[1] >> 16);
-               b[n][4] = (u16b)(flgs[2] & 0xFFFF);
-               b[n][5] = (u16b)(flgs[2] >> 16);
-       }
-
-
-       /* Index */
-       n = 12;
-
-       /* Player flags */
-       player_flags(flgs);
-
-       /* Incorporate */
-       b[n][0] = (u16b)(flgs[0] & 0xFFFF);
-       b[n][1] = (u16b)(flgs[0] >> 16);
-       b[n][2] = (u16b)(flgs[1] & 0xFFFF);
-       b[n][3] = (u16b)(flgs[1] >> 16);
-       b[n][4] = (u16b)(flgs[2] & 0xFFFF);
-       b[n][5] = (u16b)(flgs[2] >> 16);
-
-       /* Player flags */
-       tim_player_flags(flgs, FALSE);
-
-       /* Incorporate */
-       b[n][0] |= (flgs[0] & 0xFFFF);
-       b[n][1] |= (flgs[0] >> 16);
-       b[n][2] |= (flgs[1] & 0xFFFF);
-       b[n][3] |= (flgs[1] >> 16);
-       b[n][4] |= (flgs[2] & 0xFFFF);
-       b[n][5] |= (flgs[3] >> 16);
-       color[0] = (u16b)(flgs[0] & 0xFFFF);
-       color[1] = (u16b)(flgs[0] >> 16);
-       color[2] = (u16b)(flgs[1] & 0xFFFF);
-       color[3] = (u16b)(flgs[1] >> 16);
-       color[4] = (u16b)(flgs[2] & 0xFFFF);
-       color[5] = (u16b)(flgs[2] >> 16);
-
-
-       /* Scan cols */
-       for (x = 0; x < 3; x++)
-       {
-               /* Equippy */
-               display_player_equippy(2, x * 26 + 11);
-
-               /* Label */
-               Term_putstr(x * 26 + 11, 3, -1, TERM_WHITE, "abcdefghijkl@");
-
-               /* Scan rows */
-               for (y = 0; y < 16; y++)
-               {
-                       cptr name = object_flag_names[48*mode+16*x+y];
-
-                       /* No name */
-                       if (!name) continue;
-
-                       /* Dump name */
-                       Term_putstr(x * 26, y + 4, -1, TERM_WHITE, name);
-
-                       /* Dump colon */
-                       Term_putch(x * 26 + 10, y + 4, TERM_WHITE, ':');
-
-                       /* Check flags */
-                       for (n = 0; n < 13; n++)
-                       {
-                               byte a = TERM_SLATE;
-                               char c = '.';
-
-                               /* Check flag */
-                               if (b[n][3*mode+x] & (1<<y))
-                               {
-                                       if ((n == 12) && (color[3*mode+x] & (1<<y)))
-                                       {
-                                               a = TERM_YELLOW;
-                                               c = '#';
-                                       }
-                                       else
-                                       {
-                                               a = TERM_WHITE;
-                                               c = '+';
-                                       }
-                               }
-
-                               /* Dump flag */
-                               Term_putch(x * 26 + 11 + n, y + 4, a, c);
-                       }
-               }
-       }
-}
-
-
-/*
  * Display the character on the screen (various modes)
  *
- * The top two and bottom two lines are left blank.
+ * The top one and bottom two lines are left blank.
  *
  * Mode 0 = standard display with skills
  * Mode 1 = standard display with history
  * Mode 2 = summary of various things
- * Mode 3 = current flags (combined)
- * Mode 4 = current flags (part 1)
- * Mode 5 = current flags (part 2)
- * Mode 6 = mutations
+ * Mode 3 = summary of various things (part 2)
+ * Mode 4 = mutations
  */
 void display_player(int mode)
 {
@@ -3993,9 +3701,9 @@ void display_player(int mode)
 
        /* XXX XXX XXX */
        if ((p_ptr->muta1 || p_ptr->muta2 || p_ptr->muta3) && display_mutations)
-               mode = (mode % 7);
+               mode = (mode % 5);
        else
-               mode = (mode % 6);
+               mode = (mode % 4);
 
        /* Erase screen */
        clear_from(0);
@@ -4230,19 +3938,35 @@ void display_player(int mode)
        /* Special */
        else if (mode == 3)
        {
-               display_player_ben();
+                display_player_other_flag_info();
        }
 
-       else if (mode == 6)
+       else if (mode == 4)
        {
                do_cmd_knowledge_mutations();
        }
+}
 
-       /* Special */
-       else
-       {
-               display_player_ben_one(mode % 2);
-       }
+static bool ang_sort_comp_quest_num(vptr u, vptr v, int a, int b)
+{
+       int *q_num = (int *)u;
+        quest_type *qa = &quest[q_num[a]];
+        quest_type *qb = &quest[q_num[b]];
+
+       if (qa->complev < qb->complev) return TRUE;
+       if (qa->complev > qb->complev) return FALSE;
+       if (qa->level <= qb->level) return TRUE;
+        return FALSE;
+}
+
+static void ang_sort_swap_quest_num(vptr u, vptr v, int a, int b)
+{
+       int *q_num = (int *)u;
+       int tmp;
+
+       tmp = q_num[a];
+       q_num[a] = q_num[b];
+       q_num[b] = tmp;
 }
 
 errr make_character_dump(FILE *fff)
@@ -4255,6 +3979,8 @@ errr make_character_dump(FILE *fff)
        char            o_name[MAX_NLEN];
        char            buf[1024];
        int             total;
+       int             *quest_num;
+       int             dummy;
 
 #ifdef JP
        fprintf(fff, "  [ÊѶòÈÚÅÜ %d.%d.%d ¥­¥ã¥é¥¯¥¿¾ðÊó]\n\n",
@@ -4324,7 +4050,8 @@ errr make_character_dump(FILE *fff)
        }
 
        fprintf(fff, "\n");
-       /* Display history */
+
+       /* Display flags (part 1) */
        display_player(2);
 
        /* Dump part of the screen */
@@ -4353,6 +4080,37 @@ errr make_character_dump(FILE *fff)
                fprintf(fff, "%s\n", buf);
        }
 
+       fprintf(fff, "\n");
+
+       /* Display flags (part 2) */
+       display_player(3);
+
+       /* Dump part of the screen */
+       for (y = 1; y < 22; y++)
+       {
+               /* Dump each row */
+               for (x = 0; x < 79; x++)
+               {
+                       /* Get the attr/char */
+                       (void)(Term_what(x, y, &a, &c));
+
+                       /* Dump it (Ignore equippy tile graphic) */
+                       if (a < 128)
+                               buf[x] = c;
+                       else
+                               buf[x] = ' ';
+               }
+
+               /* End the string */
+               buf[x] = '\0';
+
+               /* Kill trailing spaces */
+               while ((x > 0) && (buf[x-1] == ' ')) buf[--x] = '\0';
+
+               /* End the row */
+               fprintf(fff, "%s\n", buf);
+       }
+
        for (i = 0; (unsigned int) i < (p_ptr->count / 80); i++)
                fprintf(fff, " ");
        fprintf(fff, "\n");
@@ -4393,9 +4151,9 @@ errr make_character_dump(FILE *fff)
        }
 
 #ifdef JP
-       fprintf(fff, "\n  [¥¯¥¨¥¹¥È¾ðÊó]        \n");
+       fprintf(fff, "\n  [¥¯¥¨¥¹¥È¾ðÊó]\n");
 #else
-       fprintf(fff, "\n  [Quest information]        \n");
+       fprintf(fff, "\n  [Quest information]\n");
 #endif
 
 #ifdef JP
@@ -4403,23 +4161,39 @@ errr make_character_dump(FILE *fff)
 #else
        fprintf(fff, "\n< Completed Quest >\n");
 #endif
+
+       /* Allocate Memory */
+       C_MAKE(quest_num, max_quests, int);
+
+       /* Sort by compete level */
+       for (i = 1; i < max_quests; i++)
+       {
+               quest_num[i] = i;
+       }
+       ang_sort_comp = ang_sort_comp_quest_num;
+       ang_sort_swap = ang_sort_swap_quest_num;
+       ang_sort(quest_num, &dummy, max_quests);
+
+       /* Dump Quest Information */
        total = 0;
        for (i = 1; i < max_quests; i++)
        {
+               int num = quest_num[i];
+
                /* No info from "silent" quests */
-               if (quest[i].flags & QUEST_FLAG_SILENT) continue;
+               if (quest[num].flags & QUEST_FLAG_SILENT) continue;
 
-               if (quest[i].status == QUEST_STATUS_FINISHED)
+               if (quest[num].status == QUEST_STATUS_FINISHED)
                {
                        int old_quest;
 
                        total++;
 
-                       if (i < MIN_RANDOM_QUEST)
+                       if (num < MIN_RANDOM_QUEST)
                        {
                                /* Set the quest number temporary */
                                old_quest = p_ptr->inside_quest;
-                               p_ptr->inside_quest = i;
+                               p_ptr->inside_quest = num;
 
                                /* Get the quest */
                                init_flags = INIT_ASSIGN;
@@ -4430,11 +4204,11 @@ errr make_character_dump(FILE *fff)
                                p_ptr->inside_quest = old_quest;
                        }
 
-                       if ((i >= MIN_RANDOM_QUEST) && quest[i].r_idx)
+                       if ((num >= MIN_RANDOM_QUEST) && quest[num].r_idx)
                        {
                                /* Print the quest info */
 
-                                if (quest[i].complev == 0)
+                                if (quest[num].complev == 0)
                                 {
                                         fprintf(fff, 
 #ifdef JP
@@ -4442,8 +4216,8 @@ errr make_character_dump(FILE *fff)
 #else
                                                 "  %s (Dungeon level: %d) - (Cancelled)\n",
 #endif
-                                                r_name+r_info[quest[i].r_idx].name,
-                                                quest[i].level);
+                                                r_name+r_info[quest[num].r_idx].name,
+                                                quest[num].level);
                                 }
                                 else
                                 {
@@ -4453,9 +4227,9 @@ errr make_character_dump(FILE *fff)
 #else
                                                 "  %s (Dungeon level: %d) - level %d\n",
 #endif
-                                                r_name+r_info[quest[i].r_idx].name,
-                                                quest[i].level,
-                                                quest[i].complev);
+                                                r_name+r_info[quest[num].r_idx].name,
+                                                quest[num].level,
+                                                quest[num].complev);
                                 }
                        }
                        else
@@ -4467,7 +4241,7 @@ errr make_character_dump(FILE *fff)
                                fprintf(fff, "  %s (Danger level: %d) - level %d\n",
 #endif
 
-                                       quest[i].name, quest[i].level, quest[i].complev);
+                                       quest[num].name, quest[num].level, quest[num].complev);
                        }
                }
        }
@@ -4485,20 +4259,22 @@ errr make_character_dump(FILE *fff)
        total = 0;
        for (i = 1; i < max_quests; i++)
        {
+               int num = quest_num[i];
+
                /* No info from "silent" quests */
-               if (quest[i].flags & QUEST_FLAG_SILENT) continue;
+               if (quest[num].flags & QUEST_FLAG_SILENT) continue;
 
-               if ((quest[i].status == QUEST_STATUS_FAILED_DONE) || (quest[i].status == QUEST_STATUS_FAILED))
+               if ((quest[num].status == QUEST_STATUS_FAILED_DONE) || (quest[num].status == QUEST_STATUS_FAILED))
                {
                        int old_quest;
 
                        total++;
 
-                       if (i < MIN_RANDOM_QUEST)
+                       if (num < MIN_RANDOM_QUEST)
                        {
                                /* Set the quest number temporary */
                                old_quest = p_ptr->inside_quest;
-                               p_ptr->inside_quest = i;
+                               p_ptr->inside_quest = num;
 
                                /* Get the quest text */
                                init_flags = INIT_ASSIGN;
@@ -4509,7 +4285,7 @@ errr make_character_dump(FILE *fff)
                                p_ptr->inside_quest = old_quest;
                        }
 
-                       if ((i >= MIN_RANDOM_QUEST) && quest[i].r_idx)
+                       if ((num >= MIN_RANDOM_QUEST) && quest[num].r_idx)
                        {
                                /* Print the quest info */
 #ifdef JP
@@ -4518,7 +4294,7 @@ errr make_character_dump(FILE *fff)
                                fprintf(fff, "  %s (Dungeon level: %d) - level %d\n",
 #endif
 
-                                       r_name+r_info[quest[i].r_idx].name, quest[i].level, quest[i].complev);
+                                       r_name+r_info[quest[num].r_idx].name, quest[num].level, quest[num].complev);
                        }
                        else
                        {
@@ -4529,10 +4305,11 @@ errr make_character_dump(FILE *fff)
                                fprintf(fff, "  %s (Danger level: %d) - level %d\n",
 #endif
 
-                                       quest[i].name, quest[i].level, quest[i].complev);
+                                       quest[num].name, quest[num].level, quest[num].complev);
                        }
                }
        }
+
 #ifdef JP
        if (!total) fprintf(fff, "  ¤Ê¤·\n");
 #else
@@ -4540,6 +4317,9 @@ errr make_character_dump(FILE *fff)
 #endif
        fprintf(fff, "\n");
 
+       /* Free Memory */
+       C_KILL(quest_num, max_quests, int);
+
        if (p_ptr->is_dead && !p_ptr->total_winner)
        {
 #ifdef JP
@@ -4555,7 +4335,7 @@ errr make_character_dump(FILE *fff)
        }
 
 #ifdef JP
-       fprintf(fff, "\n  [¤½¤Î¾¤Î¾ðÊó]        \n");
+       fprintf(fff, "\n  [¤½¤Î¾¤Î¾ðÊó]\n");
 #else
        fprintf(fff, "\n  [Miscellaneous information]\n");
 #endif
@@ -5014,6 +4794,12 @@ fprintf(fff, "  [ 
                fprintf(fff, "\n\n");
        }
 
+#ifdef JP
+        fprintf(fff, "  [¥Á¥§¥Ã¥¯¥µ¥à: \"%s\"]\n\n", get_check_sum());
+#else
+        fprintf(fff, "  [Check Sum: \"%s\"]\n\n", get_check_sum());
+#endif
+
        return 0;
 }
 
@@ -5051,14 +4837,14 @@ errr file_character(cptr name, bool full)
 
                /* Build query */
 #ifdef JP
-(void)sprintf(out_val, "¸½Â¸¤¹¤ë¥Õ¥¡¥¤¥ë %s ¤Ë¾å½ñ¤­¤·¤Þ¤¹¤«? ", buf);
+                (void)sprintf(out_val, "¸½Â¸¤¹¤ë¥Õ¥¡¥¤¥ë %s ¤Ë¾å½ñ¤­¤·¤Þ¤¹¤«? ", buf);
 #else
                (void)sprintf(out_val, "Replace existing file %s? ", buf);
 #endif
 
 
                /* Ask */
-               if (get_check(out_val)) fd = -1;
+               if (get_check_strict(out_val, CHECK_NO_HISTORY)) fd = -1;
        }
 
        /* Open the non-existing file */
@@ -5069,12 +4855,12 @@ errr file_character(cptr name, bool full)
        {
                /* Message */
 #ifdef JP
-msg_format("¥­¥ã¥é¥¯¥¿¾ðÊó¤Î¥Õ¥¡¥¤¥ë¤Ø¤Î½ñ¤­½Ð¤·¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡ª");
+                prt("¥­¥ã¥é¥¯¥¿¾ðÊó¤Î¥Õ¥¡¥¤¥ë¤Ø¤Î½ñ¤­½Ð¤·¤Ë¼ºÇÔ¤·¤Þ¤·¤¿¡ª", 0, 0);
 #else
-               msg_format("Character dump failed!");
+               prt("Character dump failed!", 0, 0);
 #endif
 
-               msg_print(NULL);
+                (void)inkey();
 
                /* Error */
                return (-1);
@@ -5102,57 +4888,6 @@ msg_print("
 }
 
 
-typedef struct file_tag
-{
-       char name[32];
-       int line_number;
-} file_tag;
-
-
-typedef struct file_tags
-{
-       file_tag tags[64];
-       int index;
-} file_tags;
-
-
-static void add_tag(file_tags *the_tags, cptr name, int line)
-{
-       if (the_tags->index < 64)
-       {
-               file_tag *tag = &(the_tags->tags[the_tags->index]);
-
-               /* Set the name and end it with '\0' */
-               strncpy(tag->name, name, 31);
-               tag->name[31] = '\0';
-
-               /* Set the line-number */
-               tag->line_number = line;
-
-               /* Increase the number of tags */
-               the_tags->index++;
-       }
-}
-
-
-static int get_line(file_tags *the_tags, cptr name)
-{
-       int i;
-
-       /* Search for the tag */
-       for (i = 0; i < the_tags->index; i++)
-       {
-               if (streq(the_tags->tags[i].name, name))
-               {
-                       return the_tags->tags[i].line_number;
-               }
-       }
-
-       /* Not found */
-       return 0;
-}
-
-
 /*
  * Recursive file perusal.
  *
@@ -5223,9 +4958,6 @@ bool show_file(bool show_version, cptr name, cptr what, int line, int mode)
        /* Sub-menu information */
        char hook[68][32];
 
-       /* Tags for in-file references */
-       file_tags tags;
-
        bool reverse = (line < 0);
 
        int wid, hgt, rows;
@@ -5248,9 +4980,6 @@ bool show_file(bool show_version, cptr name, cptr what, int line, int mode)
                hook[i][0] = '\0';
        }
 
-       /* No tags yet */
-       tags.index = 0;
-
        /* Copy the filename */
        strcpy(filename, name);
 
@@ -5394,7 +5123,7 @@ msg_format("'%s'
                        else if (str[6] == '<')
                        {
                                str[strlen(str) - 1] = '\0';
-                               add_tag(&tags, str + 7, next);
+                                if (tag && streq(str + 7, tag)) line = next;
                        }
 
                        /* Skip this */
@@ -5411,9 +5140,6 @@ msg_format("'%s'
        /* start from bottom when reverse mode */
        if (line == -1) line = ((size-1)/rows)*rows;
 
-       /* Go to the tagged line */
-       if (tag) line = get_line(&tags, tag);
-
        /* Display the file */
        while (TRUE)
        {