From 9843737e73a47ef6f1da0554b7ca73018d52d345 Mon Sep 17 00:00:00 2001 From: dshaligram Date: Sat, 21 Jul 2007 12:17:29 +0000 Subject: 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 --- crawl-ref/source/tags.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/tags.cc') 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); } } -- cgit v1.2.3-54-g00ecf