forked from Whales/edigotia
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathglyph.h
33 lines (24 loc) · 744 Bytes
/
glyph.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
#ifndef _GLYPH_H_
#define _GLYPH_H_
#include "color.h"
#include <istream>
#define HILITE_COLOR c_blue
#define NO_BRIGHT_BG true
struct glyph
{
long symbol;
nc_color fg;
nc_color bg;
glyph() { symbol = 'x'; fg = c_red; bg = c_white; }
glyph(long S, nc_color F, nc_color B) : symbol (S), fg (F), bg (B) { }
glyph invert();
glyph hilite(nc_color back = HILITE_COLOR);
std::string text_formatted();
bool operator==(const glyph &rhs);
void make_line_drawing(bool north, bool east, bool south, bool west);
std::string save_data();
void load_data(std::istream &datastream);
void load_data_text(std::istream &datastream, // For human-readable data
std::string owner_name = "Unknown");
};
#endif