summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/tilereg-inv.cc
diff options
context:
space:
mode:
authorFlorian Diebold <flodiebold@gmail.com>2012-07-15 16:49:21 +0200
committerFlorian Diebold <flodiebold@gmail.com>2012-07-15 16:49:21 +0200
commitb4ce8f429cdae5dc5f9621e32daaaa6ddaf6eb1c (patch)
tree0c7ac768a54491bc98eae1603ae72066adae5466 /crawl-ref/source/tilereg-inv.cc
parent03539a5e3169a165c1d47a610c74cda1472ebb3a (diff)
downloadcrawl-ref-b4ce8f429cdae5dc5f9621e32daaaa6ddaf6eb1c.tar.gz
crawl-ref-b4ce8f429cdae5dc5f9621e32daaaa6ddaf6eb1c.zip
Fix rod tiles (#5818).
Subtype and appearance are independent on rods; that makes the normal hack inapplicable, since it displays the appearance tile for an item depending on the subtype icon. This makes it very hard to display both the appearance tile and the subtype icon for a rod on the floor (since we can only pass one tile index to the rendering code -- that's why there's the whole mcache thing for monsters). This is the cowardly fix: Rods on the floor only get the appearance tile, rods in the inventory menu and region use the same hack as weapons, armour and ammo (where the brand icon isn't displayed on the floor either). I have another fix which displays the subtype icons on the floor, but it is extremely ugly. The whole tile picking and rendering code could really use a big refactoring; I don't want to add even more hackiness.
Diffstat (limited to 'crawl-ref/source/tilereg-inv.cc')
-rw-r--r--crawl-ref/source/tilereg-inv.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/crawl-ref/source/tilereg-inv.cc b/crawl-ref/source/tilereg-inv.cc
index df9a6be92e..1d8f7f3bf7 100644
--- a/crawl-ref/source/tilereg-inv.cc
+++ b/crawl-ref/source/tilereg-inv.cc
@@ -617,8 +617,11 @@ static void _fill_item_info(InventoryTile &desc, const item_info &item)
else
desc.quantity = -1;
- if (type == OBJ_WEAPONS || type == OBJ_MISSILES || type == OBJ_ARMOUR)
+ if (type == OBJ_WEAPONS || type == OBJ_MISSILES
+ || type == OBJ_ARMOUR || type == OBJ_RODS)
+ {
desc.special = tileidx_known_brand(item);
+ }
else if (type == OBJ_CORPSES)
desc.special = tileidx_corpse_brand(item);