summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/externs.h
diff options
context:
space:
mode:
Diffstat (limited to 'crawl-ref/source/externs.h')
-rw-r--r--crawl-ref/source/externs.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/crawl-ref/source/externs.h b/crawl-ref/source/externs.h
index 0dbe078a58..67b65d21b9 100644
--- a/crawl-ref/source/externs.h
+++ b/crawl-ref/source/externs.h
@@ -608,7 +608,7 @@ class formatted_string
{
public:
formatted_string() : ops() { }
- formatted_string(const std::string &s);
+ formatted_string(const std::string &s, bool init_style = false);
operator std::string() const;
void display(int start = 0, int end = -1) const;
@@ -619,6 +619,12 @@ public:
void gotoxy(int x, int y);
void textcolor(int color);
+public:
+ static formatted_string parse_string(
+ const std::string &s,
+ bool eol_ends_format = true,
+ bool (*process_tag)(const std::string &tag) = NULL );
+
private:
enum fs_op_type
{
@@ -627,6 +633,9 @@ private:
FSOP_TEXT
};
+ static int get_colour(const std::string &tag);
+
+private:
struct fs_op
{
fs_op_type type;