summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilereg.cc
diff options
context:
space:
mode:
authorJohanna Ploog <j-p-e-g@users.sourceforge.net>2010-02-24 19:12:03 +0100
committerJohanna Ploog <j-p-e-g@users.sourceforge.net>2010-02-24 22:00:54 +0100
commitfc194cb677770af387442d67d41897b031389432 (patch)
treec1ea244e5aed04517e54a6a12c03cedb39680c1c /crawl-ref/source/tilereg.cc
parent144e72823680cb7e2cf69668180d76bcb0ed2ab8 (diff)
downloadcrawl-ref-fc194cb677770af387442d67d41897b031389432.tar.gz
crawl-ref-fc194cb677770af387442d67d41897b031389432.zip
New Necromutation tile, based on Porkchop's idea.
Now coloured red for easier differentiation from monster lichs, and uses wielded player weapon.
Diffstat (limited to 'crawl-ref/source/tilereg.cc')
-rw-r--r--crawl-ref/source/tilereg.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/crawl-ref/source/tilereg.cc b/crawl-ref/source/tilereg.cc
index 51eb45a480..8c8144396b 100644
--- a/crawl-ref/source/tilereg.cc
+++ b/crawl-ref/source/tilereg.cc
@@ -1156,6 +1156,22 @@ void DungeonRegion::pack_cursor(cursor_type type, unsigned int tile)
m_buf_main.add(tile, gc.x - m_cx_to_gx, gc.y - m_cy_to_gy);
}
+static void _lichform_add_weapon(SubmergedTileBuffer &buf, int x, int y,
+ bool in_water)
+{
+ const int item = you.equip[EQ_WEAPON];
+ if (item == -1)
+ return;
+
+ const int wep = tilep_equ_weapon(you.inv[item]);
+ if (!wep)
+ return;
+
+// const int offs_x = x - 1;
+// const int offs_y = y;
+ buf.add(wep, x, y, 0, in_water, false, -1, 0);
+}
+
void DungeonRegion::pack_buffers()
{
m_buf_dngn.clear();
@@ -1192,6 +1208,8 @@ void DungeonRegion::pack_buffers()
else if (fg_idx >= TILE_MAIN_MAX)
{
m_buf_doll.add(fg_idx, x, y, 0, in_water, false);
+ if (fg_idx == TILEP_TRAN_LICH)
+ _lichform_add_weapon(m_buf_doll, x, y, in_water);
}
pack_foreground(bg, fg, x, y);