From dd4158d514297586e5fa76269dd6f6f6df5c3c2c Mon Sep 17 00:00:00 2001 From: dshaligram Date: Thu, 25 Oct 2007 12:19:25 +0000 Subject: 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 --- crawl-ref/source/maps.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'crawl-ref/source/maps.h') 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 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); -- cgit v1.2.3-54-g00ecf