diff options
author | Bardur Arantsson <bardur@scientician.net> | 2012-06-26 20:32:32 +0200 |
---|---|---|
committer | Bardur Arantsson <bardur@scientician.net> | 2012-06-26 20:35:13 +0200 |
commit | 799070362567a091cee65a0a1c1b616675e13a1d (patch) | |
tree | b23cb27f99552784e9974c3472f0df4b79048d69 | |
parent | 6e7e34189889e6fc371b7231411824ed34577807 (diff) |
Remove "show_weights" option
-rw-r--r-- | lib/help/option.txt | 5 | ||||
-rw-r--r-- | lib/mods/theme/help/option.txt | 5 | ||||
-rw-r--r-- | src/cmd2.c | 9 | ||||
-rw-r--r-- | src/object1.c | 33 | ||||
-rw-r--r-- | src/store.c | 25 | ||||
-rw-r--r-- | src/tables.c | 3 | ||||
-rw-r--r-- | src/variable.c | 1 |
7 files changed, 26 insertions, 55 deletions
diff --git a/lib/help/option.txt b/lib/help/option.txt index 6fd3b413..abee7b51 100644 --- a/lib/help/option.txt +++ b/lib/help/option.txt @@ -150,11 +150,6 @@ off at will during the course of the game. flavoured object descriptions": a separate option for them has been added under "ToME Options". -#####GShow weights in object lists [show_weights] - Display the weight of objects in the inventory and equipment lists, - and in stores, and in any special window which is displaying any of - these lists. - #####GShow graphics in inventory list [show_inven_graph] Display the graphics of objects in the inventory list, and in any special window which is displaying the inventory list. diff --git a/lib/mods/theme/help/option.txt b/lib/mods/theme/help/option.txt index 34a2fe6b..3ae9cacc 100644 --- a/lib/mods/theme/help/option.txt +++ b/lib/mods/theme/help/option.txt @@ -150,11 +150,6 @@ off at will during the course of the game. flavoured object descriptions": a separate option for them has been added under "ToME Options". -#####GShow weights in object lists [show_weights] - Display the weight of objects in the inventory and equipment lists, - and in stores, and in any special window which is displaying any of - these lists. - #####GShow graphics in inventory list [show_inven_graph] Display the graphics of objects in the inventory list, and in any special window which is displaying the inventory list. @@ -4817,8 +4817,8 @@ byte show_monster_inven(int m_idx, int *monst_list) /* Maximum space allowed for descriptions */ lim = 79 - 3; - /* Require space for weight (if needed) */ - if (show_weights) lim -= 9; + /* Require space for weight */ + lim -= 9; /* Scan for objects on the monster */ (void)scan_monst(monst_list, &monst_num, m_idx); @@ -4846,8 +4846,8 @@ byte show_monster_inven(int m_idx, int *monst_list) /* Find the predicted "line length" */ l = strlen(out_desc[k]) + 5; - /* Be sure to account for the weight */ - if (show_weights) l += 9; + /* Account for the weight */ + l += 9; /* Maintain the maximum length */ if (l > len) len = l; @@ -4881,7 +4881,6 @@ byte show_monster_inven(int m_idx, int *monst_list) c_put_str(out_color[j], out_desc[j], j + 1, col + 3); /* Display the weight if needed */ - if (show_weights) { int wgt = o_ptr->weight * o_ptr->number; strnfmt(tmp_val, 80, "%3d.%1d lb", wgt / 10, wgt % 10); diff --git a/src/object1.c b/src/object1.c index 21161dea..fd9ead08 100644 --- a/src/object1.c +++ b/src/object1.c @@ -4528,8 +4528,8 @@ void show_inven_aux(bool_ mirror, bool_ everything) /* Maximum space allowed for descriptions */ lim = 79 - 3; - /* Require space for weight (if needed) */ - if (show_weights) lim -= 9; + /* Space for weight */ + lim -= 9; /* Require space for icon */ if (show_inven_graph) lim -= 2; @@ -4578,7 +4578,7 @@ void show_inven_aux(bool_ mirror, bool_ everything) l = strlen(out_desc[k]) + 5; /* Be sure to account for the weight */ - if (show_weights) l += 9; + l += 9; /* Account for icon if displayed */ if (show_inven_graph) l += 2; @@ -4632,11 +4632,10 @@ void show_inven_aux(bool_ mirror, bool_ everything) c_put_str(out_color[j], out_desc[j], row + j, show_inven_graph ? (col + 5) : (col + 3)); - /* Display the weight if needed */ - if (show_weights) + /* Display the weight */ { int wgt = o_ptr->weight * o_ptr->number; - (void)sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10); + sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10); put_str(tmp_val, row + j, wid - 9); } } @@ -4706,8 +4705,8 @@ void show_equip_aux(bool_ mirror, bool_ everything) /* Require space for labels (if needed) */ if (show_labels) lim -= (14 + 2); - /* Require space for weight (if needed) */ - if (show_weights) lim -= 9; + /* Require space for weight */ + lim -= 9; if (show_equip_graph) lim -= 2; @@ -4807,8 +4806,8 @@ void show_equip_aux(bool_ mirror, bool_ everything) /* Increase length for labels (if needed) */ if (show_labels) l += (14 + 2); - /* Increase length for weight (if needed) */ - if (show_weights) l += 9; + /* Increase length for weight */ + l += 9; if (show_equip_graph) l += 2; @@ -4874,11 +4873,10 @@ void show_equip_aux(bool_ mirror, bool_ everything) c_put_str(out_color[j], out_desc[j], row + j, show_equip_graph ? col + 5 : col + 3); } - /* Display the weight if needed */ - if (show_weights) + /* Display the weight */ { int wgt = o_ptr->weight * o_ptr->number; - (void)sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10); + sprintf(tmp_val, "%3d.%d lb", wgt / 10, wgt % 10); put_str(tmp_val, row + j, wid - 9); } } @@ -5171,8 +5169,8 @@ void show_floor(int y, int x) /* Maximum space allowed for descriptions */ lim = 79 - 3; - /* Require space for weight (if needed) */ - if (show_weights) lim -= 9; + /* Require space for weight */ + lim -= 9; /* Scan for objects in the grid, using item_tester_okay() */ (void) scan_floor(floor_list, &floor_num, y, x, 0x01); @@ -5200,8 +5198,8 @@ void show_floor(int y, int x) /* Find the predicted "line length" */ l = strlen(out_desc[k]) + 5; - /* Be sure to account for the weight */ - if (show_weights) l += 9; + /* Account for the weight */ + l += 9; /* Maintain the maximum length */ if (l > len) len = l; @@ -5235,7 +5233,6 @@ void show_floor(int y, int x) c_put_str(out_color[j], out_desc[j], j + 1, col + 3); /* Display the weight if needed */ - if (show_weights) { int wgt = o_ptr->weight * o_ptr->number; sprintf(tmp_val, "%3d.%1d lb", wgt / 10, wgt % 10); diff --git a/src/store.c b/src/store.c index cca3be85..3114380c 100644 --- a/src/store.c +++ b/src/store.c @@ -1669,8 +1669,8 @@ static void display_entry(int pos) { maxwid = 75; - /* Leave room for weights, if necessary -DRS- */ - if (show_weights) maxwid -= 10; + /* Leave room for weights */ + maxwid -= 10; /* Describe the object */ object_desc(o_name, o_ptr, TRUE, 3); @@ -1678,7 +1678,6 @@ static void display_entry(int pos) c_put_str(tval_to_attr[o_ptr->tval], o_name, i + 6, cur_col); /* Show weights */ - if (show_weights) { /* Only show the weight of an individual item */ int wgt = o_ptr->weight; @@ -1695,8 +1694,8 @@ static void display_entry(int pos) /* Must leave room for the "price" */ maxwid = 65; - /* Leave room for weights, if necessary -DRS- */ - if (show_weights) maxwid -= 7; + /* Leave room for weights */ + maxwid -= 7; /* Describe the object (fully) */ object_desc_store(o_name, o_ptr, TRUE, 3); @@ -1704,7 +1703,6 @@ static void display_entry(int pos) c_put_str(tval_to_attr[o_ptr->tval], o_name, i + 6, cur_col); /* Show weights */ - if (show_weights) { /* Only show the weight of an individual item */ int wgt = o_ptr->weight; @@ -1830,10 +1828,7 @@ void display_store(void) put_str("Item Description", 5, 3); /* If showing weights, show label */ - if (show_weights) - { - put_str("Weight", 5, 70); - } + put_str("Weight", 5, 70); } else if (st_info[st_ptr->st_idx].flags1 & SF1_MUSEUM) @@ -1848,10 +1843,7 @@ void display_store(void) put_str("Item Description", 5, 3); /* If showing weights, show label */ - if (show_weights) - { - put_str("Weight", 5, 70); - } + put_str("Weight", 5, 70); } /* Normal stores */ @@ -1872,10 +1864,7 @@ void display_store(void) put_str("Item Description", 5, 3); /* If showing weights, show label */ - if (show_weights) - { - put_str("Weight", 5, 60); - } + put_str("Weight", 5, 60); /* Label the asking price (in stores) */ put_str("Price", 5, 72); diff --git a/src/tables.c b/src/tables.c index 7d87d5d8..74bd66f2 100644 --- a/src/tables.c +++ b/src/tables.c @@ -1385,9 +1385,6 @@ option_type option_info[] = { &show_labels, TRUE, 1, 11, "show_labels", "Show labels in object listings" }, - { &show_weights, TRUE, 1, 12, - "show_weights", "Show weights in object listings" }, - { &show_inven_graph, TRUE, 1, 13, "show_inven_graph", "Show graphics in inventory list" }, diff --git a/src/variable.c b/src/variable.c index e4adb21d..135edb1c 100644 --- a/src/variable.c +++ b/src/variable.c @@ -211,7 +211,6 @@ bool_ stack_force_notes; /* Merge inscriptions when stacking */ bool_ stack_force_costs; /* Merge discounts when stacking */ bool_ show_labels; /* Show labels in object listings */ -bool_ show_weights; /* Show weights in object listings */ bool_ show_choices; /* Show choices in certain sub-windows */ bool_ show_details; /* Show details in certain sub-windows */ |