diff options
author | Raphael Langella <raphael.langella@gmail.com> | 2011-08-11 21:27:40 +0200 |
---|---|---|
committer | Raphael Langella <raphael.langella@gmail.com> | 2011-08-11 21:27:40 +0200 |
commit | d647f48844401cb98cc8068c69e0d54116b7203a (patch) | |
tree | 549ca1bdb8e2fab61df00b4f0f727057a3d175eb /crawl-ref/source/mapmark.h | |
parent | 4b4b5900429bddd34569ff5adb0a0b71c769be64 (diff) | |
download | crawl-ref-d647f48844401cb98cc8068c69e0d54116b7203a.tar.gz crawl-ref-d647f48844401cb98cc8068c69e0d54116b7203a.zip |
Randomize the destination of hatches and shafts (#3200).
Hatch destination is randomly chosen on level generation and is saved in a
map marker, so it's always the same. We don't bother using a marker for
shafts since they are single use.
Items falling through shafts have no reason to end up on the same
coordinates since they can even end up on a different level, so their
destination is randomised too.
Diffstat (limited to 'crawl-ref/source/mapmark.h')
-rw-r--r-- | crawl-ref/source/mapmark.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/crawl-ref/source/mapmark.h b/crawl-ref/source/mapmark.h index 3f699817a7..384c54bcdf 100644 --- a/crawl-ref/source/mapmark.h +++ b/crawl-ref/source/mapmark.h @@ -225,4 +225,20 @@ public: std::map<std::string, std::string> properties; }; +class map_position_marker : public map_marker +{ +public: + map_position_marker(const coord_def &pos = coord_def(0, 0), + const coord_def _dest = INVALID_COORD); + map_position_marker(const map_position_marker &other); + void write(writer &) const; + void read(reader &); + std::string debug_describe() const; + map_marker *clone() const; + static map_marker *read(reader &, map_marker_type); + +public: + coord_def dest; +}; + #endif |