summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilemcache.cc
diff options
context:
space:
mode:
authorSteve Melenchuk <smelenchuk@gmail.com>2014-01-26 22:13:01 -0700
committerSteve Melenchuk <smelenchuk@gmail.com>2014-01-26 22:13:01 -0700
commitd764f22516cd9248c3f09c9cb715760e172c66f9 (patch)
tree050d8653bcc2cebc0f81e08a1d1495997daccccd /crawl-ref/source/tilemcache.cc
parent94ac2d26976af97045da001c4a8a207a0e301dba (diff)
downloadcrawl-ref-d764f22516cd9248c3f09c9cb715760e172c66f9.tar.gz
crawl-ref-d764f22516cd9248c3f09c9cb715760e172c66f9.zip
Temporary tiles for the demonspawn enemies.
Nothing for the worldbinder or grand avatar as yet.
Diffstat (limited to 'crawl-ref/source/tilemcache.cc')
-rw-r--r--crawl-ref/source/tilemcache.cc24
1 files changed, 19 insertions, 5 deletions
diff --git a/crawl-ref/source/tilemcache.cc b/crawl-ref/source/tilemcache.cc
index 58302f2b06..ee7bf08a89 100644
--- a/crawl-ref/source/tilemcache.cc
+++ b/crawl-ref/source/tilemcache.cc
@@ -68,6 +68,7 @@ protected:
tileidx_t m_job_tile;
tileidx_t m_equ_tile;
tileidx_t m_shd_tile;
+ bool draco;
};
class mcache_ghost : public mcache_entry
@@ -680,13 +681,16 @@ bool mcache_monster::valid(const monster_info& mon)
mcache_draco::mcache_draco(const monster_info& mon)
{
ASSERT(mcache_draco::valid(mon));
+ draco = mons_is_draconian(mon.type);
- m_mon_tile = tileidx_draco_base(mon);
+ m_mon_tile = draco ? tileidx_draco_base(mon)
+ : tileidx_demonspawn_base(mon);
const item_info* mon_wep = mon.inv[MSLOT_WEAPON].get();
m_equ_tile = (mon_wep != NULL) ? tilep_equ_weapon(*mon_wep) : 0;
mon_wep = mon.inv[MSLOT_SHIELD].get();
m_shd_tile = (mon_wep != NULL) ? tilep_equ_shield(*mon_wep) : 0;
- m_job_tile = tileidx_draco_job(mon);
+ m_job_tile = draco ? tileidx_draco_job(mon)
+ : tileidx_demonspawn_job(mon);
}
int mcache_draco::info(tile_draw_info *dinfo) const
@@ -697,16 +701,26 @@ int mcache_draco::info(tile_draw_info *dinfo) const
if (m_job_tile)
dinfo[i++].set(m_job_tile);
if (m_equ_tile)
- dinfo[i++].set(m_equ_tile, -2, 0);
+ {
+ if (draco)
+ dinfo[i++].set(m_equ_tile, -2, 0);
+ else
+ dinfo[i++].set(m_equ_tile, -1, 0);
+ }
if (m_shd_tile)
- dinfo[i++].set(m_shd_tile, 2, 0);
+ {
+ if (draco)
+ dinfo[i++].set(m_shd_tile, 2, 0);
+ else
+ dinfo[i++].set(m_shd_tile, -4, 2);
+ }
return i;
}
bool mcache_draco::valid(const monster_info& mon)
{
- return mons_is_draconian(mon.type);
+ return mons_is_draconian(mon.type) || mons_is_demonspawn(mon.type);
}
/////////////////////////////////////////////////////////////////////////////