From 23a44595f9eab8d72e2bc828952058c38bcab284 Mon Sep 17 00:00:00 2001 From: David Lawrence Ramsey Date: Sat, 21 Nov 2009 18:39:47 -0600 Subject: Make _tileidx_corpse() take an item instead of item.plus directly. --- crawl-ref/source/tilepick.cc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'crawl-ref/source/tilepick.cc') diff --git a/crawl-ref/source/tilepick.cc b/crawl-ref/source/tilepick.cc index 8f9fdc232d..b5d5ffd5e3 100644 --- a/crawl-ref/source/tilepick.cc +++ b/crawl-ref/source/tilepick.cc @@ -1545,10 +1545,12 @@ static int _tileidx_food(const item_def &item) } // Returns index of corpse tiles. -// Parameter mon already holds the corpse type (monster species). -static int _tileidx_corpse(int mon) +// Parameter item holds the corpse. +static int _tileidx_corpse(const item_def &item) { - switch (mon) + const int type = item.plus; + + switch (type) { // insects ('a') case MONS_GIANT_COCKROACH: @@ -2184,7 +2186,7 @@ int tileidx_item(const item_def &item) if (item.sub_type == CORPSE_SKELETON) return TILE_FOOD_BONE; else - return _tileidx_corpse(item.plus); + return _tileidx_corpse(item); case OBJ_ORBS: return TILE_ORB + random2(tile_main_count(TILE_ORB)); -- cgit v1.2.3-54-g00ecf