summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tags.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-21 12:17:29 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-07-21 12:17:29 +0000
commit9843737e73a47ef6f1da0554b7ca73018d52d345 (patch)
tree9381ef8b914bc801386f62ce2713c59c17b6a9e8 /crawl-ref/source/tags.cc
parentb27a757b68bf8a1dcbcb9b3a5cfea5c1278c9bb4 (diff)
downloadcrawl-ref-9843737e73a47ef6f1da0554b7ca73018d52d345.tar.gz
crawl-ref-9843737e73a47ef6f1da0554b7ca73018d52d345.zip
Updated level-design.txt.
Moved map markers to mapmark.cc. Added support for timer markers that remove a feature after a certain timeout. Need to hook up messaging to Lua. Added bazaars (need more bazaar layouts). git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1899 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/tags.cc')
-rw-r--r--crawl-ref/source/tags.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index 8b38c9f764..5748975294 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -77,6 +77,7 @@
#include "files.h"
#include "itemname.h"
#include "itemprop.h"
+#include "mapmark.h"
#include "monstuff.h"
#include "mon-util.h"
#include "mtransit.h"
@@ -1360,8 +1361,8 @@ static void tag_construct_level(struct tagHeader &th)
}
// how many shops?
- marshallByte(th, 5);
- for (int i = 0; i < 5; i++)
+ marshallByte(th, MAX_SHOPS);
+ for (int i = 0; i < MAX_SHOPS; i++)
{
marshallByte(th, env.shop[i].keeper_name[0]);
marshallByte(th, env.shop[i].keeper_name[1]);
@@ -1588,6 +1589,7 @@ static void tag_read_level( struct tagHeader &th, char minorVersion )
// how many shops?
const int num_shops = unmarshallByte(th);
+ ASSERT(num_shops <= MAX_SHOPS);
for (int i = 0; i < num_shops; i++)
{
env.shop[i].keeper_name[0] = unmarshallByte(th);
@@ -1600,12 +1602,12 @@ static void tag_read_level( struct tagHeader &th, char minorVersion )
env.shop[i].level = unmarshallByte(th);
}
- env.clear_markers();
+ env_clear_markers();
const int nmarkers = unmarshallShort(th);
for (int i = 0; i < nmarkers; ++i)
{
if (map_marker *mark = map_marker::read_marker(th))
- env.add_marker(mark);
+ env_add_marker(mark);
}
}