summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/stash.h
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-30 10:53:06 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2008-07-30 10:53:06 +0000
commit262b8e18ed8cb58afb40a816ac0fdedfe3a7db5f (patch)
tree681a9cbb6c22669c6e8b7ab749228a3cd691a903 /crawl-ref/source/stash.h
parent51d8f1fc9cc8ed4280b9c53b135ccb0521e84889 (diff)
downloadcrawl-ref-262b8e18ed8cb58afb40a816ac0fdedfe3a7db5f.tar.gz
crawl-ref-262b8e18ed8cb58afb40a816ac0fdedfe3a7db5f.zip
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
Diffstat (limited to 'crawl-ref/source/stash.h')
-rw-r--r--crawl-ref/source/stash.h12
1 files changed, 12 insertions, 0 deletions
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,