-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtiledata.h
63 lines (53 loc) · 919 Bytes
/
tiledata.h
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#ifndef _TILEDATA_H_
#define _TILEDATA_H_
#include "color.h"
#include <string>
enum Tile_id
{
T_null = 0,
T_empty,
T_sky,
T_grass,
T_shop,
T_dirt,
T_boulder,
T_ladder,
T_support,
T_ladder_and_support,
T_entrance,
T_coal,
T_iron,
T_copper,
T_max
};
struct Tile_datum
{
nc_color fg, bg;
bool blocks;
bool support;
int dig;
int climb_cost;
int value;
std::string symbols;
std::string name;
bool valuable() { return value > 0; }
Tile_datum()
{
fg = c_black;
bg = c_black;
blocks = false;
support = false;
dig = 0;
climb_cost = 0;
value = 0;
symbols = "";
}
Tile_datum(nc_color FG, nc_color BG, bool B, bool S, int D, int CC, int V,
std::string Sym, std::string Name) :
fg (FG), bg (BG),
blocks (B), support (S),
dig (D), climb_cost (CC), value (V),
symbols (Sym), name (Name)
{}
};
#endif