summaryrefslogtreecommitdiffstats
path: root/crawl-ref
diff options
context:
space:
mode:
authorJude Brown <bookofjude@users.sourceforge.net>2009-12-10 10:36:28 +1000
committerJude Brown <bookofjude@users.sourceforge.net>2009-12-10 11:00:54 +1000
commitc602df19e39a4092f2307f414c7ea7d6a7fe3af1 (patch)
tree76859a53332734d3f25fdcc2c17947fd6134d7d1 /crawl-ref
parent9f4bc8c473b1da88c6f322c70dccd0f60d3b6706 (diff)
downloadcrawl-ref-c602df19e39a4092f2307f414c7ea7d6a7fe3af1.tar.gz
crawl-ref-c602df19e39a4092f2307f414c7ea7d6a7fe3af1.zip
Minor tweaks to TILE: specifier.
Diffstat (limited to 'crawl-ref')
-rw-r--r--crawl-ref/source/externs.h5
-rw-r--r--crawl-ref/source/mapdef.cc7
-rw-r--r--crawl-ref/source/mapdef.h4
-rw-r--r--crawl-ref/source/mgen_data.h5
-rw-r--r--crawl-ref/source/tags.cc4
-rw-r--r--crawl-ref/source/tilepick.cc3
6 files changed, 19 insertions, 9 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 80386f0658..e1a8083ef3 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -34,9 +34,8 @@ struct tile_flavour
unsigned short wall;
// Used as a random value or for special cases e.g. (bazaars, gates).
unsigned short special;
- // Used by the vault 'TILE' overlay. Called ftile as it was originally
- // to be for features and 'tile' is obtuse.
- unsigned short ftile;
+ // Used (primarily) by the vault 'TILE' overlay.
+ unsigned short feat;
};
// A glorified unsigned int that assists with ref-counting the mcache.
diff --git a/crawl-ref/source/mapdef.cc b/crawl-ref/source/mapdef.cc
index 066848536a..4a9162cadd 100644
--- a/crawl-ref/source/mapdef.cc
+++ b/crawl-ref/source/mapdef.cc
@@ -513,7 +513,12 @@ void map_lines::apply_grid_overlay(const coord_def &c)
if (tile)
{
int offset = random2(tile_dngn_count(tile));
- env.tile_flv(gc).ftile = tile + offset;
+ if (grd(gc) == DNGN_FLOOR && !floor)
+ env.tile_flv(gc).floor = tile + offset;
+ else if (grd(gc) == DNGN_ROCK_WALL && !rock)
+ env.tile_flv(gc).wall = tile + offset;
+ else
+ env.tile_flv(gc).feat = tile + offset;
}
#endif
}
diff --git a/crawl-ref/source/mapdef.h b/crawl-ref/source/mapdef.h
index d24ad4a2da..3420b0d1b2 100644
--- a/crawl-ref/source/mapdef.h
+++ b/crawl-ref/source/mapdef.h
@@ -560,6 +560,8 @@ class mons_spec
monster_spells spells;
unsigned long extra_monster_flags;
+ CrawlHashTable props;
+
mons_spec(int id = RANDOM_MONSTER,
monster_type base = MONS_NO_MONSTER,
int num = 0,
@@ -570,7 +572,7 @@ class mons_spec
generate_awake(awaken), patrolling(false), band(false),
colour(BLACK), hd(0), hp(0), abjuration_duration(0), summon_type(0),
items(), monname(""), non_actor_summoner(""), explicit_spells(false),
- spells(), extra_monster_flags(0L)
+ spells(), extra_monster_flags(0L), props()
{
}
};
diff --git a/crawl-ref/source/mgen_data.h b/crawl-ref/source/mgen_data.h
index 360ebf3f54..6934100ede 100644
--- a/crawl-ref/source/mgen_data.h
+++ b/crawl-ref/source/mgen_data.h
@@ -101,6 +101,9 @@ struct mgen_data
// Fiend ... summoned by the effects of Hell.
std::string non_actor_summoner;
+ // This can eventually be used to store relevant information.
+ CrawlHashTable props;
+
mgen_data(monster_type mt = RANDOM_MONSTER,
beh_type beh = BEH_HOSTILE,
actor* sner = 0,
@@ -126,7 +129,7 @@ struct mgen_data
flags(monflags), god(which_god), number(monnumber), colour(moncolour),
power(monpower), proximity(prox), level_type(ltype), map_mask(0),
hd(mhd), hp(mhp), extra_flags(mflags), mname(monname),
- non_actor_summoner(nas)
+ non_actor_summoner(nas), props()
{
ASSERT(summon_type == 0 || (abj >= 1 && abj <= 6)
|| mt == MONS_BALL_LIGHTNING);
diff --git a/crawl-ref/source/tags.cc b/crawl-ref/source/tags.cc
index ca54391a56..37396402f3 100644
--- a/crawl-ref/source/tags.cc
+++ b/crawl-ref/source/tags.cc
@@ -2165,7 +2165,7 @@ void tag_construct_level_tiles(writer &th)
marshallShort(th, env.tile_flv[count_x][count_y].wall);
marshallShort(th, env.tile_flv[count_x][count_y].floor);
marshallShort(th, env.tile_flv[count_x][count_y].special);
- marshallShort(th, env.tile_flv[count_x][count_y].ftile);
+ marshallShort(th, env.tile_flv[count_x][count_y].feat);
}
mcache.construct(th);
@@ -2523,7 +2523,7 @@ void tag_read_level_tiles(struct reader &th)
env.tile_flv[x][y].wall = unmarshallShort(th);
env.tile_flv[x][y].floor = unmarshallShort(th);
env.tile_flv[x][y].special = unmarshallShort(th);
- env.tile_flv[x][y].ftile = unmarshallShort(th);
+ env.tile_flv[x][y].feat = unmarshallShort(th);
}
if (ver > TILETAG_PRE_MCACHE)
diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc
index f76e162aa2..f7f8c104c2 100644
--- a/crawl-ref/source/tilepick.cc
+++ b/crawl-ref/source/tilepick.cc
@@ -2365,7 +2365,7 @@ static int _tileidx_shop(coord_def where)
int tileidx_feature(dungeon_feature_type feat, int gx, int gy)
{
- int override = env.tile_flv[gx][gy].ftile;
+ int override = env.tile_flv[gx][gy].feat;
if (override)
return override;
@@ -4253,6 +4253,7 @@ void tile_clear_flavour()
env.tile_flv(*ri).floor = 0;
env.tile_flv(*ri).wall = 0;
env.tile_flv(*ri).special = 0;
+ env.tile_flv(*ri).feat = 0;
}
}