summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/feature.h
blob: feda02a1a3768237022b684555c9fae87367f730 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#ifndef FEATURE_H
#define FEATURE_H

#include "show.h"

struct feature_def
{
    dungeon_char_type   dchar;
    unsigned            symbol;          // symbol used for seen terrain
    unsigned            magic_symbol;    // symbol used for magic-mapped terrain
    unsigned short      colour;          // normal in LoS colour
    unsigned short      map_colour;      // colour when out of LoS on display
    unsigned short      seen_colour;     // map_colour when is_terrain_seen()
    unsigned short      em_colour;       // Emphasised colour when in LoS.
    unsigned short      seen_em_colour;  // Emphasised colour when out of LoS
    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
{
    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_show_table();

#endif