summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/feature.h
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-11-04 10:04:17 +0100
committerRobert Vollmert <rvollmert@gmx.net>2009-11-04 16:50:18 +0100
commit6f10cd2574eeb8a1417eff84718edd309287ac0d (patch)
tree69a45fe0e35cb559a3285b08697c96c230fc0c0f /crawl-ref/source/feature.h
parent9ad85435681ad82c7ef07d2083e40e525e2b0f55 (diff)
downloadcrawl-ref-6f10cd2574eeb8a1417eff84718edd309287ac0d.tar.gz
crawl-ref-6f10cd2574eeb8a1417eff84718edd309287ac0d.zip
Get rid of multiple-meaning "int object" in env.show.
env.show is now a class show_def that stores tagged unions of type show_type. For the moment, there's also env.show_los for use in LOS determination, but that should become an array of boolean at some point. This breaks save compatibility. Tiles and console version build and appear to work fine, but this kind of change is likely to have some side-effects.
Diffstat (limited to 'crawl-ref/source/feature.h')
-rw-r--r--crawl-ref/source/feature.h22
1 files changed, 19 insertions, 3 deletions
diff --git a/crawl-ref/source/feature.h b/crawl-ref/source/feature.h
index f9a7115693..feda02a1a3 100644
--- a/crawl-ref/source/feature.h
+++ b/crawl-ref/source/feature.h
@@ -1,6 +1,8 @@
#ifndef FEATURE_H
#define FEATURE_H
+#include "show.h"
+
struct feature_def
{
dungeon_char_type dchar;
@@ -14,17 +16,31 @@ struct feature_def
unsigned flags;
map_feature minimap; // mini-map categorization
+ feature_def() :
+ dchar(NUM_DCHAR_TYPES),
+ symbol(0),
+ magic_symbol(0),
+ colour(BLACK),
+ map_colour(DARKGREY),
+ seen_colour(BLACK),
+ em_colour(BLACK),
+ seen_em_colour(BLACK),
+ flags(FFT_NONE),
+ minimap(MF_UNSEEN)
+ {}
+
bool is_notable() const { return (flags & FFT_NOTABLE); }
};
struct feature_override
{
- dungeon_feature_type feat;
- feature_def override;
+ show_type object;
+ feature_def override;
};
+const feature_def &get_feature_def(show_type object);
const feature_def &get_feature_def(dungeon_feature_type feat);
-void init_feature_table();
+void init_show_table();
#endif