diff options
author | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-21 18:39:47 -0600 |
---|---|---|
committer | David Lawrence Ramsey <dolorous@users.sourceforge.net> | 2009-11-21 18:39:47 -0600 |
commit | 23a44595f9eab8d72e2bc828952058c38bcab284 (patch) | |
tree | 99a682a661d3bf266e5f4e640764ec61b930de67 /crawl-ref/source/tilepick.cc | |
parent | 90104081ec1d5f429cdf73998bca2e0b67df78d3 (diff) | |
download | crawl-ref-23a44595f9eab8d72e2bc828952058c38bcab284.tar.gz crawl-ref-23a44595f9eab8d72e2bc828952058c38bcab284.zip |
Make _tileidx_corpse() take an item instead of item.plus directly.
Diffstat (limited to 'crawl-ref/source/tilepick.cc')
-rw-r--r-- | crawl-ref/source/tilepick.cc | 10 |
1 files changed, 6 insertions, 4 deletions
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)); |