From 554ff9a63d5d9bc64f668a00b6baa9b91dc41306 Mon Sep 17 00:00:00 2001 From: Bardur Arantsson Date: Tue, 13 Jun 2017 18:24:42 +0200 Subject: Move "messages" to Game struct --- src/melee2.cc | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/melee2.cc') diff --git a/src/melee2.cc b/src/melee2.cc index 3ab3cc1c..10807b44 100644 --- a/src/melee2.cc +++ b/src/melee2.cc @@ -894,6 +894,8 @@ static void monster_msg(cptr fmt, ...) void monster_msg_simple(cptr s) { + auto &messages = game->messages; + /* Display */ if (options->disturb_other) { @@ -901,7 +903,7 @@ void monster_msg_simple(cptr s) } else { - message_add(s, TERM_WHITE); + messages.add(s, TERM_WHITE); p_ptr->window |= PW_MESSAGE; } } @@ -910,6 +912,7 @@ void cmonster_msg(char a, cptr fmt, ...) { va_list vp; + auto &messages = game->messages; char buf[1024]; /* Begin the Varargs Stuff */ @@ -928,7 +931,7 @@ void cmonster_msg(char a, cptr fmt, ...) } else { - message_add(buf, a); + messages.add(buf, a); p_ptr->window |= PW_MESSAGE; } } -- cgit v1.2.3