diff options
author | Robert Vollmert <rvollmert@gmx.net> | 2009-11-18 22:10:48 +0100 |
---|---|---|
committer | Robert Vollmert <rvollmert@gmx.net> | 2009-11-20 12:55:07 +0100 |
commit | 9e638765909b661706f206c6422843b0c75d12a8 (patch) | |
tree | 70ff53fcecfcb0b7a0c4abea2ff035d3d4fe5fd2 /crawl-ref/source/show.h | |
parent | cd397dc4d76ee1ca808b7a19780b7f0a573331f1 (diff) | |
download | crawl-ref-9e638765909b661706f206c6422843b0c75d12a8.tar.gz crawl-ref-9e638765909b661706f206c6422843b0c75d12a8.zip |
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.
Diffstat (limited to 'crawl-ref/source/show.h')
-rw-r--r-- | crawl-ref/source/show.h | 10 |
1 files changed, 4 insertions, 6 deletions
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(); |