00001 #ifndef FEATURE_H 00002 #define FEATURE_H 00003 00004 #include "show.h" 00005 00006 struct feature_def 00007 { 00008 dungeon_char_type dchar; 00009 unsigned symbol; // symbol used for seen terrain 00010 unsigned magic_symbol; // symbol used for magic-mapped terrain 00011 unsigned short colour; // normal in LoS colour 00012 unsigned short map_colour; // colour when out of LoS on display 00013 unsigned short seen_colour; // map_colour when env.map_knowledge().seen() 00014 unsigned short em_colour; // Emphasised colour when in LoS. 00015 unsigned short seen_em_colour; // Emphasised colour when out of LoS 00016 unsigned flags; 00017 map_feature minimap; // mini-map categorization 00018 00019 feature_def() : 00020 dchar(NUM_DCHAR_TYPES), 00021 symbol(0), 00022 magic_symbol(0), 00023 colour(BLACK), 00024 map_colour(DARKGREY), 00025 seen_colour(BLACK), 00026 em_colour(BLACK), 00027 seen_em_colour(BLACK), 00028 flags(FFT_NONE), 00029 minimap(MF_UNSEEN) 00030 {} 00031 00032 bool is_notable() const { return (flags & FFT_NOTABLE); } 00033 }; 00034 00035 struct feature_override 00036 { 00037 show_type object; 00038 feature_def override; 00039 }; 00040 00041 const feature_def &get_feature_def(show_type object); 00042 const feature_def &get_feature_def(dungeon_feature_type feat); 00043 00044 static inline bool is_notable_terrain(dungeon_feature_type ftype) 00045 { 00046 return (get_feature_def(ftype).is_notable()); 00047 } 00048 00049 void init_show_table(); 00050 00051 dungeon_feature_type magic_map_base_feat(dungeon_feature_type feat); 00052 00053 #endif