summaryrefslogtreecommitdiff
path: root/src/object1.cc
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:13 +0200
committerBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:13 +0200
commitd249c64b5ea5b59b475584fa1a70208b8e4a4c64 (patch)
treee2b8b7531dde98f247c06cd609043405aa3dab8c /src/object1.cc
parent50c916646b647030755673a9a1dc82e192e492d4 (diff)
Remove inventory_no_move option
Diffstat (limited to 'src/object1.cc')
-rw-r--r--src/object1.cc42
1 files changed, 19 insertions, 23 deletions
diff --git a/src/object1.cc b/src/object1.cc
index 9e130be9..a3cb5593 100644
--- a/src/object1.cc
+++ b/src/object1.cc
@@ -4066,15 +4066,15 @@ static bool item_tester_okay(object_type const *o_ptr, object_filter_t const &fi
-static void show_equip_aux(bool_ mirror, bool_ everything, object_filter_t const &filter);
-static void show_inven_aux(bool_ mirror, bool_ everything, object_filter_t const &filter);
+static void show_equip_aux(bool_ mirror, object_filter_t const &filter);
+static void show_inven_aux(bool_ mirror, object_filter_t const &filter);
/*
* Choice window "shadow" of the "show_inven()" function
*/
void display_inven(void)
{
- show_inven_aux(TRUE, inventory_no_move, object_filter::True());
+ show_inven_aux(TRUE, object_filter::True());
}
@@ -4084,7 +4084,7 @@ void display_inven(void)
*/
void display_equip(void)
{
- show_equip_aux(TRUE, inventory_no_move, object_filter::True());
+ show_equip_aux(TRUE, object_filter::True());
}
@@ -4111,7 +4111,7 @@ byte get_item_letter_color(object_type const *o_ptr)
*
* Hack -- do not display "trailing" empty slots
*/
-void show_inven_aux(bool_ mirror, bool_ everything, const object_filter_t &filter)
+void show_inven_aux(bool_ mirror, const object_filter_t &filter)
{
int i, j, k, l, z = 0;
int row, col, len, lim;
@@ -4165,16 +4165,13 @@ void show_inven_aux(bool_ mirror, bool_ everything, const object_filter_t &filte
/* Is this item acceptable? */
if (!item_tester_okay(o_ptr, filter))
{
- if ( !everything )
- continue;
- out_index[k] = -i - 1;
- }
- else
- {
- /* Save the object index */
- out_index[k] = i + 1;
+ /* Skip to next slot */
+ continue;
}
+ /* Save the object index */
+ out_index[k] = i + 1;
+
/* Describe the object */
object_desc(o_name, o_ptr, TRUE, 3);
@@ -4273,7 +4270,7 @@ void show_inven_aux(bool_ mirror, bool_ everything, const object_filter_t &filte
static void show_inven(object_filter_t const &filter)
{
- show_inven_aux(FALSE, FALSE, filter);
+ show_inven_aux(FALSE, filter);
}
void show_inven_full()
@@ -4285,7 +4282,7 @@ void show_inven_full()
static void show_equip(object_filter_t const &filter)
{
- show_equip_aux(FALSE, FALSE, filter);
+ show_equip_aux(FALSE, filter);
}
void show_equip_full()
@@ -4298,7 +4295,7 @@ void show_equip_full()
/*
* Display the equipment.
*/
-void show_equip_aux(bool_ mirror, bool_ everything, object_filter_t const &filter)
+void show_equip_aux(bool_ mirror, object_filter_t const &filter)
{
int i, j, k, l;
int row, col, len, lim, idx;
@@ -4407,17 +4404,16 @@ void show_equip_aux(bool_ mirror, bool_ everything, object_filter_t const &filte
/* Truncate the description */
o_name[lim] = 0;
+
/* Is this item acceptable? */
if (!item_tester_okay(o_ptr, filter))
{
- if (!everything) continue;
- out_index[k] = -1;
- }
- else
- {
- /* Save the index */
- out_index[k] = idx;
+ /* Skip to next slot */
+ continue;
}
+
+ /* Save the index */
+ out_index[k] = idx;
out_rindex[k] = i;
/* Save the color */