From 38d1169d58df2c37f9d238665ee30ff7eaf0a34f Mon Sep 17 00:00:00 2001 From: nothere Date: Mon, 2 Aug 2004 14:04:33 +0000 Subject: [PATCH] =?utf8?q?easy=5Ffloor=E6=9C=89=E5=8A=B9=E6=99=82=E3=81=AB?= =?utf8?q?,=20=E5=BA=8A=E4=B8=8A=E3=81=AE=E3=82=A2=E3=82=A4=E3=83=86?= =?utf8?q?=E3=83=A0=E3=81=AE=E5=B1=B1=E3=81=AB=E9=87=91=E5=A1=8A=E3=81=8C?= =?utf8?q?=E5=90=AB=E3=81=BE=E3=82=8C=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=A7?= =?utf8?q?=E3=82=82=E3=83=AA=E3=82=B9=E3=83=88=20=E8=A1=A8=E7=A4=BA?= =?utf8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- lib/pref/font-xxx.prf | 3 +++ src/object1.c | 16 ++++++++++++++-- src/xtra2.c | 4 ++++ 3 files changed, 21 insertions(+), 2 deletions(-) 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 -- 2.11.0