summaryrefslogtreecommitdiff
path: root/src/object1.hpp
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2015-04-15 19:12:41 +0200
committerBardur Arantsson <bardur@scientician.net>2015-04-15 19:12:41 +0200
commit8b2be5adc24ffdecc7bb5d8ed08be12a7590bc46 (patch)
tree52f137bd6e83baa12ad60b50c4710d04a7559cb2 /src/object1.hpp
parentedede30a361f34d8c2f1d5de45adeac9392f41b9 (diff)
Rework object list filters to avoid global variables
Diffstat (limited to 'src/object1.hpp')
-rw-r--r--src/object1.hpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/object1.hpp b/src/object1.hpp
index 01fc41d0..ba457619 100644
--- a/src/object1.hpp
+++ b/src/object1.hpp
@@ -1,6 +1,12 @@
#pragma once
#include "angband.h"
+#include "object_filter.hpp"
+
+#include <boost/optional.hpp>
+#include <functional>
+
+typedef std::function<boost::optional<int>(object_filter_t const &filter)> select_by_name_t;
extern byte get_item_letter_color(object_type *o_ptr);
extern void object_pickup(int this_o_idx);
@@ -21,14 +27,12 @@ extern char index_to_label(int i);
extern s16b wield_slot_ideal(object_type const *o_ptr, bool_ ideal);
extern s16b wield_slot(object_type const *o_ptr);
extern cptr describe_use(int i);
-extern bool_ item_tester_okay(object_type *o_ptr);
extern void display_inven(void);
extern void display_equip(void);
-extern void show_inven();
-extern void show_equip();
+extern void show_inven_full();
+extern void show_equip_full();
extern void toggle_inven_equip(void);
-extern bool_ (*get_item_extra_hook)(int *cp);
-extern bool_ get_item(int *cp, cptr pmt, cptr str, int mode);
+extern bool_ get_item(int *cp, cptr pmt, cptr str, int mode, object_filter_t const &filter = object_filter::True(), select_by_name_t const &select_by_name = select_by_name_t());
extern cptr item_activation(object_type *o_ptr,byte num);
extern void py_pickup_floor(int pickup);
extern void object_gain_level(object_type *o_ptr);