summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/maps.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-18 08:23:42 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-01-18 08:23:42 +0000
commit10104fd665356015a69e545a84452d1f85fe2698 (patch)
tree20f2164e1677a4cc386977826e2cfb80c72ba83a /crawl-ref/source/maps.cc
parent2602987755200fb6399fdc8b8183d00ab1abc076 (diff)
downloadcrawl-ref-10104fd665356015a69e545a84452d1f85fe2698.tar.gz
crawl-ref-10104fd665356015a69e545a84452d1f85fe2698.zip
New entry vaults and regular vaults (Lemuel). The regular vaults are probably
intended to be portal vaults for Hell portals; we need to add support for portal vaults. Added support for monster slot randomisation for maps. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@865 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/maps.cc')
-rw-r--r--crawl-ref/source/maps.cc39
1 files changed, 5 insertions, 34 deletions
diff --git a/crawl-ref/source/maps.cc b/crawl-ref/source/maps.cc
index 80a637561b..5bc7097ce1 100644
--- a/crawl-ref/source/maps.cc
+++ b/crawl-ref/source/maps.cc
@@ -29,12 +29,10 @@
#include "levcomp.h"
static int write_vault(const map_def &mdef, map_type mt,
- FixedVector<int,7> &marray,
vault_placement &);
static int apply_vault_definition(
map_def &def,
map_type map,
- FixedVector<int,7> &marray,
vault_placement &);
static void resolve_map(map_def &def);
@@ -56,7 +54,6 @@ static std::vector<map_def> vdefs;
// anywhere, while other vault names are for specific level ranges, etc.
int vault_main(
map_type vgrid,
- FixedVector<int, 7>& mons_array,
vault_placement &place,
int which_vault,
int many_many )
@@ -77,20 +74,18 @@ int vault_main(
}
// NB - a return value of zero is not handled well by dungeon.cc (but there it is) 10mar2000 {dlb}
- return write_vault( vdefs[which_vault], vgrid, mons_array, place );
+ return write_vault( vdefs[which_vault], vgrid, place );
} // end vault_main()
static int write_vault(const map_def &mdef, map_type map,
- FixedVector<int, 7> &marray,
vault_placement &place)
{
- place.map = &mdef;
-
// Copy the map so we can monkey with it.
- map_def def = mdef;
- resolve_map(def);
+ place.map = mdef;
+ resolve_map(place.map);
- return (place.orient = apply_vault_definition(def, map, marray, place));
+ return (place.orient =
+ apply_vault_definition(place.map, map, place));
}
// Mirror the map if appropriate, resolve substitutable symbols (?),
@@ -109,28 +104,6 @@ static void resolve_map(map_def &map)
map.rotate( coinflip() );
}
-static void apply_monsters(
- const map_def &def,
- FixedVector<int,7> &marray)
-{
- const std::vector<int> &mids = def.mons.get_ids();
- size_t ndx = 0;
- for (int i = 0, size = mids.size(); i < size; ++i)
- {
- int mid = mids[i];
- if (mid < 0)
- {
- mid = -100 - mid;
- if (mid == DEMON_RANDOM)
- mid = random2(DEMON_RANDOM);
- mid = summon_any_demon( mid );
- }
-
- if (ndx < marray.size())
- marray[ndx++] = mid;
- }
-}
-
static void apply_vault_grid(map_def &def, map_type map,
vault_placement &place)
{
@@ -192,10 +165,8 @@ static void apply_vault_grid(map_def &def, map_type map,
static int apply_vault_definition(
map_def &def,
map_type map,
- FixedVector<int,7> &marray,
vault_placement &place)
{
- apply_monsters(def, marray);
apply_vault_grid(def, map, place);
int orient = def.orient;