summaryrefslogtreecommitdiff
path: root/src/message.hpp
diff options
context:
space:
mode:
authorBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:15 +0200
committerBardur Arantsson <bardur@scientician.net>2016-09-17 09:58:15 +0200
commit0a48c0f1af4b35338d2360f6efa4c467ec60b60d (patch)
tree406a6b1bda002889f8a99be215fcc9847dc0cb7e /src/message.hpp
parent656d238d855e3d7640f10c6b0c1dc84380f50e94 (diff)
Refactor messages.cc to use boost::circular_buffer
We might as well delegate the massive implementation complexity and get rid of a ton of legacy code.
Diffstat (limited to 'src/message.hpp')
-rw-r--r--src/message.hpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/message.hpp b/src/message.hpp
new file mode 100644
index 00000000..7b47a9db
--- /dev/null
+++ b/src/message.hpp
@@ -0,0 +1,31 @@
+#pragma once
+
+#include "h-basic.h"
+
+#include <string>
+
+/**
+ * Message
+ */
+struct message {
+ /**
+ * Message color.
+ */
+ byte color = 0;
+
+ /**
+ * Repetation count for this message.
+ */
+ u32b count = 0;
+
+ /**
+ * Message text.
+ */
+ std::string text;
+
+ /**
+ * Get message text with count
+ */
+ std::string text_with_count() const;
+
+};