From 262b8e18ed8cb58afb40a816ac0fdedfe3a7db5f Mon Sep 17 00:00:00 2001 From: haranp Date: Wed, 30 Jul 2008 10:53:06 +0000 Subject: Massive overhaul to move towards coord_def(). This might have introduced some bugs: I now get intermittent crashes on startup (this might have to do with the changes to special_room.) Sorry about that - committing before I need to do any more big conflict resolutions. Fixes coming later. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6732 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/stash.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'crawl-ref/source/stash.h') diff --git a/crawl-ref/source/stash.h b/crawl-ref/source/stash.h index 570a611257..40c0d31d5c 100644 --- a/crawl-ref/source/stash.h +++ b/crawl-ref/source/stash.h @@ -227,7 +227,13 @@ public: // Returns true if the square at (x,y) contains potentially interesting // swag that merits a personal visit (for EXPLORE_GREEDY). bool needs_visit(int x, int y) const; + bool needs_visit(const coord_def& c) const { + return needs_visit(c.x, c.y); + } bool shop_needs_visit(int x, int y) const; + bool shop_needs_visit(const coord_def& c) const { + return shop_needs_visit(c.x, c.y); + } // Add stash at (x,y), or player's current location if no parameters are // supplied @@ -293,6 +299,11 @@ public: return get_current_level().get_shop(x, y); } + ShopInfo &get_shop(const coord_def& p) + { + return get_shop(p.x, p.y); + } + void remove_level(const level_id &which = level_id::current()); enum stash_update_mode @@ -344,6 +355,7 @@ private: extern StashTracker StashTrack; bool is_stash(int x, int y); +inline bool is_stash( const coord_def& p ) { return is_stash(p.x, p.y); } void describe_stash(int x, int y); std::string userdef_annotate_item(const char *s, const item_def *item, -- cgit v1.2.3-54-g00ecf