diff options
author | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-01-20 20:16:30 +0530 |
---|---|---|
committer | Darshan Shaligram <dshaligram@users.sourceforge.net> | 2010-01-20 20:32:14 +0530 |
commit | 569c3326919a59d91ac92e848b7e4aee28fe8e8b (patch) | |
tree | 8697b9826887a948ee8fe31785e9d2457ce7c92e /crawl-ref/source/matrix.h | |
parent | bbfb1fdf5058353174ab9be45fd43ec6ebfbf477 (diff) | |
download | crawl-ref-569c3326919a59d91ac92e848b7e4aee28fe8e8b.tar.gz crawl-ref-569c3326919a59d91ac92e848b7e4aee28fe8e8b.zip |
shoals_atoll support: FHEIGHT sets heights for map squares, tide_seed property requests that a marker be treated as a source for tide effects.
Added support for setting heightmap heights using FHEIGHT: xyz = <height>.
Any property marker can return a non-empty property value for "tide_seed" to use that marker's position as a seed point for the tide. Tide effects will otherwise propagate in only from the open sea at the four corners of Shoals maps, and can only affect squares connected by water to the four default tide seeds.
Removed code that forces features to floor or shallow water when placing items in vaults.
Diffstat (limited to 'crawl-ref/source/matrix.h')
-rw-r--r-- | crawl-ref/source/matrix.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crawl-ref/source/matrix.h b/crawl-ref/source/matrix.h index 311602cfdc..2165d7c696 100644 --- a/crawl-ref/source/matrix.h +++ b/crawl-ref/source/matrix.h @@ -18,10 +18,18 @@ public: { return data[x + y * mwidth]; } + Z &operator () (coord_def c) + { + return (*this)(c.x, c.y); + } const Z &operator () (int x, int y) const { return data[x + y * mwidth]; } + const Z &operator () (coord_def c) const + { + return (*this)(c.x, c.y); + } int width() const { return mwidth; } int height() const { return mheight; } |