From: nothere Date: Mon, 2 Aug 2004 14:04:33 +0000 (+0000) Subject: easy_floor有効時に, 床上のアイテムの山に金塊が含まれる場合でもリスト X-Git-Tag: v2.1.2~391 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=38d1169d58df2c37f9d238665ee30ff7eaf0a34f;hp=97896ec502a24c508378a96dd7af4f9cda7d2fc0;p=hengband%2Fhengband.git easy_floor有効時に, 床上のアイテムの山に金塊が含まれる場合でもリスト 表示するように修正. --- diff --git a/lib/pref/font-xxx.prf b/lib/pref/font-xxx.prf index d2d021e55..9d350637f 100644 --- a/lib/pref/font-xxx.prf +++ b/lib/pref/font-xxx.prf @@ -456,3 +456,6 @@ E:50:0x0D # WHISTLE E:4:0x03 + +# GOLD +E:127:0x0B diff --git a/src/object1.c b/src/object1.c index 43440e132..fe9564f2c 100644 --- a/src/object1.c +++ b/src/object1.c @@ -4305,7 +4305,13 @@ bool item_tester_okay(object_type *o_ptr) if (!o_ptr->k_idx) return (FALSE); /* Hack -- ignore "gold" */ - if (o_ptr->tval == TV_GOLD) return (FALSE); + if (o_ptr->tval == TV_GOLD) + { + /* See xtra2.c */ + extern bool show_gold_on_floor; + + if (!show_gold_on_floor) return (FALSE); + } /* Check the tval */ if (item_tester_tval) @@ -6322,6 +6328,8 @@ int show_floor(int target_item, int y, int x, int *min_width) int wid, hgt; char floor_label[52 + 1]; + bool dont_need_to_show_weights = TRUE; + /* Get size */ Term_get_size(&wid, &hgt); @@ -6355,6 +6363,8 @@ int show_floor(int target_item, int y, int x, int *min_width) /* Be sure to account for the weight */ if (show_weights) l += 9; + if (o_ptr->tval != TV_GOLD) dont_need_to_show_weights = FALSE; + /* Maintain the maximum length */ if (l > len) len = l; @@ -6362,6 +6372,8 @@ int show_floor(int target_item, int y, int x, int *min_width) k++; } + if (show_weights && dont_need_to_show_weights) len -= 9; + /* Save width */ *min_width = len; @@ -6408,7 +6420,7 @@ int show_floor(int target_item, int y, int x, int *min_width) c_put_str(out_color[j], out_desc[j], j + 1, col + 3); /* Display the weight if needed */ - if (show_weights) + if (show_weights && (o_ptr->tval != TV_GOLD)) { int wgt = o_ptr->weight * o_ptr->number; #ifdef JP diff --git a/src/xtra2.c b/src/xtra2.c index c6130196f..b3bbce70c 100644 --- a/src/xtra2.c +++ b/src/xtra2.c @@ -3081,6 +3081,8 @@ static void evaluate_monster_exp(char *buf, monster_type *m_ptr) } +bool show_gold_on_floor = FALSE; + /* * Examine a grid, return a keypress. * @@ -3432,7 +3434,9 @@ static int target_set_aux(int y, int x, int mode, cptr info) screen_save(); /* Display */ + show_gold_on_floor = TRUE; (void)show_floor(0, y, x, &min_width); + show_gold_on_floor = FALSE; /* Prompt */ #ifdef JP