From 9e638765909b661706f206c6422843b0c75d12a8 Mon Sep 17 00:00:00 2001 From: Robert Vollmert Date: Wed, 18 Nov 2009 22:10:48 +0100 Subject: Remove union in show_type. show_type can now separately store feature type, item type and monster class. env.show and env.map_knowledge are guaranteed to have filled object.feat, so player terrain knowledge is available now. This is a bit of a hack. --- crawl-ref/source/show.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/show.h') diff --git a/crawl-ref/source/show.h b/crawl-ref/source/show.h index be71529485..3f2e4cb88a 100644 --- a/crawl-ref/source/show.h +++ b/crawl-ref/source/show.h @@ -5,6 +5,7 @@ enum show_item_type { + SHOW_ITEM_NONE, SHOW_ITEM_ORB, SHOW_ITEM_WEAPON, SHOW_ITEM_ARMOUR, @@ -38,12 +39,9 @@ enum show_class struct show_type { show_class cls; - union - { - dungeon_feature_type feat; - show_item_type item; - monster_type mons; - }; + dungeon_feature_type feat; + show_item_type item; + monster_type mons; unsigned short colour; show_type(); -- cgit v1.2.3-54-g00ecf