|
From: <dsh...@us...> - 2007-04-01 16:17:36
|
Revision: 1170
http://svn.sourceforge.net/crawl-ref/?rev=1170&view=rev
Author: dshaligram
Date: 2007-04-01 09:17:33 -0700 (Sun, 01 Apr 2007)
Log Message:
-----------
Suppress equipment, diagnostic and tutorial channels in character dump message
history.
Modified Paths:
--------------
trunk/crawl-ref/source/message.cc
Modified: trunk/crawl-ref/source/message.cc
===================================================================
--- trunk/crawl-ref/source/message.cc 2007-04-01 15:10:36 UTC (rev 1169)
+++ trunk/crawl-ref/source/message.cc 2007-04-01 16:17:33 UTC (rev 1170)
@@ -572,6 +572,13 @@
Message_Line >= get_message_window_height() - 1 );
} // end more()
+static bool is_channel_dumpworthy(int channel)
+{
+ return (channel != MSGCH_EQUIPMENT
+ && channel != MSGCH_DIAGNOSTICS
+ && channel != MSGCH_TUTORIAL);
+}
+
std::string get_last_messages(int mcount)
{
if (mcount <= 0) return std::string();
@@ -586,9 +593,11 @@
int count = 0;
for (int i = initial; i != Next_Message; )
{
- if (Store_Message[i].text.length())
+ const message_item &msg = Store_Message[i];
+
+ if (msg.text.length() && is_channel_dumpworthy(msg.channel))
{
- text += Store_Message[i].text;
+ text += msg.text;
text += EOL;
count++;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|