diff options
author | Steve Melenchuk <smelenchuk@gmail.com> | 2014-01-28 12:52:55 -0700 |
---|---|---|
committer | Steve Melenchuk <smelenchuk@gmail.com> | 2014-01-28 12:52:55 -0700 |
commit | dab6825aa234e9b898c620ce05327b67264fedaf (patch) | |
tree | 6238bc89ec8b90e98f063969f5ef3a668a173567 /crawl-ref/source/tilemcache.cc | |
parent | 7ad9fedfe6f1e7b45d9f49b8369ed327c58aec27 (diff) | |
parent | 1437299f7f3f6ffcd2f4fcd5b787d84df729bb69 (diff) | |
download | crawl-ref-dab6825aa234e9b898c620ce05327b67264fedaf.tar.gz crawl-ref-dab6825aa234e9b898c620ce05327b67264fedaf.zip |
Merge branch 'demonspawn-enemies'
With the forest dispersal work done, and with everything working up to
the original designer's standards, this is ready for trunk.
Conflicts:
crawl-ref/source/beam.cc
crawl-ref/source/dat/des/branches/pan.des
crawl-ref/source/enum.h
crawl-ref/source/hiscores.cc
crawl-ref/source/melee_attack.cc
crawl-ref/source/mgen_enum.h
crawl-ref/source/mon-cast.cc
crawl-ref/source/mon-data.h
crawl-ref/source/mon-ench.cc
crawl-ref/source/mon-info.cc
crawl-ref/source/mon-info.h
crawl-ref/source/mon-place.cc
crawl-ref/source/mon-spll.h
crawl-ref/source/mon-stuff.cc
crawl-ref/source/mon-util.cc
crawl-ref/source/mutation.cc
crawl-ref/source/output.cc
crawl-ref/source/player.cc
crawl-ref/source/spl-data.h
crawl-ref/source/status.cc
crawl-ref/source/wiz-you.cc
Diffstat (limited to 'crawl-ref/source/tilemcache.cc')
-rw-r--r-- | crawl-ref/source/tilemcache.cc | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/crawl-ref/source/tilemcache.cc b/crawl-ref/source/tilemcache.cc index 57a4187e0c..f719af4af7 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 @@ -691,13 +692,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 @@ -708,16 +712,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); } ///////////////////////////////////////////////////////////////////////////// |