summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.h
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-25 12:19:25 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-25 12:19:25 +0000
commitdd4158d514297586e5fa76269dd6f6f6df5c3c2c (patch)
tree8b4eebe389bcb9427d832e46e00c09aa6573e90f /crawl-ref/source/maps.h
parentfe973ee1c8d4069d19fe9b393d98b3db65556e24 (diff)
downloadcrawl-ref-dd4158d514297586e5fa76269dd6f6f6df5c3c2c.tar.gz
crawl-ref-dd4158d514297586e5fa76269dd6f6f6df5c3c2c.zip
dgn_place_map takes a coord_def to specify the centre of the map for minivaults and floating vaults. This placement can be activated using an asterisk (mapname*) when entering the name of the map in the &L command.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2559 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/maps.h')
-rw-r--r--crawl-ref/source/maps.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/crawl-ref/source/maps.h b/crawl-ref/source/maps.h
index 174349da58..e5ce87220d 100644
--- a/crawl-ref/source/maps.h
+++ b/crawl-ref/source/maps.h
@@ -21,14 +21,15 @@
class map_def;
struct vault_placement
{
- int x, y;
- int width, height;
+ coord_def pos;
+ coord_def size;
+
int orient;
map_def map;
std::vector<coord_def> exits;
vault_placement()
- : x(-1), y(-1), width(0), height(0), orient(0), map(),
+ : pos(-1, -1), size(0, 0), orient(0), map(),
exits()
{
}
@@ -40,6 +41,10 @@ int vault_main(map_type vgrid,
bool check_place = false,
bool clobber = false);
+// Given a rectangular region, slides it to fit into the map. size must be
+// smaller than (GXM,GYM).
+void fit_region_into_map_bounds(coord_def &pos, const coord_def &size);
+
const map_def *map_by_index(int index);
int map_count();
int find_map_by_name(const std::string &name);