1 #pragma once
2 
3 #include "enum.h"
4 #include "dungeon-feature-type.h"
5 #include "tag-version.h"
6 
7 // same order as DCHAR_*
8 enum show_item_type
9 {
10     SHOW_ITEM_NONE,
11     SHOW_ITEM_DETECTED,
12     SHOW_ITEM_ORB,
13     SHOW_ITEM_RUNE,
14     SHOW_ITEM_WEAPON,
15     SHOW_ITEM_ARMOUR,
16     SHOW_ITEM_WAND,
17 #if TAG_MAJOR_VERSION == 34
18     SHOW_ITEM_FOOD,
19 #endif
20     SHOW_ITEM_SCROLL,
21     SHOW_ITEM_RING,
22     SHOW_ITEM_POTION,
23     SHOW_ITEM_MISSILE,
24     SHOW_ITEM_BOOK,
25     SHOW_ITEM_STAFF,
26 #if TAG_MAJOR_VERSION == 34
27     SHOW_ITEM_ROD,
28 #endif
29     SHOW_ITEM_MISCELLANY,
30     SHOW_ITEM_CORPSE,
31     SHOW_ITEM_SKELETON,
32     SHOW_ITEM_GOLD,
33     SHOW_ITEM_AMULET,
34     NUM_SHOW_ITEMS
35 };
36 
37 enum show_class
38 {
39     SH_NOTHING,
40     SH_FEATURE,
41     SH_ITEM,
42     SH_CLOUD,
43     SH_INVIS_EXPOSED,
44     SH_MONSTER,
45     NUM_SHOW_CLASSES
46 };
47 
48 struct show_type
49 {
50     show_class cls;
51     dungeon_feature_type feat;
52     show_item_type item;
53     monster_type mons;
54     colour_t colour;
55 
56     show_type();
57     show_type(dungeon_feature_type f);
58     show_type(const item_def &item);
59     show_type(show_item_type itemtype);
60     show_type(monster_type montype);
61 
62     operator bool() const { return cls != SH_NOTHING; }
63 
64     bool operator < (const show_type &other) const;
65     bool is_cleanable_monster() const;
66 };
67 
68 struct show_info
69 {
70     dungeon_feature_type feat;
71     show_item_type item;
72     monster_type mons;
73 };
74 
75 class monster;
76 
77 enum layer_type
78 {
79     LAYERS_NONE           = 0,
80     LAYER_MONSTERS        = (1 << 0),
81     LAYER_PLAYER          = (1 << 1),
82     LAYER_ITEMS           = (1 << 2),
83     LAYER_CLOUDS          = (1 << 3),
84     LAYER_MONSTER_WEAPONS = (1 << 4),
85     LAYER_MONSTER_HEALTH  = (1 << 5),
86 };
87 DEF_BITFIELD(layers_type, layer_type, 5);
88 constexpr layers_type LAYERS_ALL = LAYER_MONSTERS | LAYER_PLAYER
89                                  | LAYER_ITEMS | LAYER_CLOUDS;
90 
91 void show_init(layers_type layers = LAYERS_ALL);
92 void update_item_at(const coord_def &gp, bool wizard = false);
93 void show_update_at(const coord_def &gp, layers_type layers = LAYERS_ALL);
94 void show_update_emphasis();
95