summaryrefslogtreecommitdiff
path: root/src/xtra1.cc
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/xtra1.cc
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/xtra1.cc')
-rw-r--r--src/xtra1.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/xtra1.cc b/src/xtra1.cc
index e2ae994b..6005deee 100644
--- a/src/xtra1.cc
+++ b/src/xtra1.cc
@@ -1224,8 +1224,11 @@ void fix_message(void)
/* Dump messages */
for (i = 0; i < h; i++)
{
+ auto message = message_at(i);
+ auto text_with_count = message.text_with_count();
+
/* Dump the message on the appropriate line */
- display_message(0, (h - 1) - i, strlen(message_str((s16b)i)), message_color((s16b)i), message_str((s16b)i));
+ display_message(0, (h - 1) - i, text_with_count.size(), message.color, text_with_count.c_str());
/* Cursor */
Term_locate(&x, &y);