summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/message.h
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-04 22:00:02 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-08-04 22:00:02 +0000
commit67bcc60d62f03fcbec645cd103ee7b53c12de119 (patch)
treef5f882fde6bd78a926cb64af019c09d0225750b9 /crawl-ref/source/message.h
parentaf65a4e054eb0cb18f736776f7fa3bcc29e4eb9c (diff)
downloadcrawl-ref-67bcc60d62f03fcbec645cd103ee7b53c12de119.tar.gz
crawl-ref-67bcc60d62f03fcbec645cd103ee7b53c12de119.zip
Type-safety on mpr() and friends channel argument.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1970 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/message.h')
-rw-r--r--crawl-ref/source/message.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/crawl-ref/source/message.h b/crawl-ref/source/message.h
index d2cafbeeab..c44a7fa3fe 100644
--- a/crawl-ref/source/message.h
+++ b/crawl-ref/source/message.h
@@ -21,7 +21,7 @@
#include "externs.h"
struct message_item {
- int channel; // message channel
+ msg_channel_type channel; // message channel
int param; // param for channel (god, enchantment)
std::string text; // text of message
};
@@ -55,19 +55,20 @@ void more(void);
* spells1 - spells2 - spells3 - spells4 - stuff - transfor -
* view
* *********************************************************************** */
-void mpr(const char *inf, int channel = MSGCH_PLAIN, int param = 0);
+void mpr(const char *inf, msg_channel_type channel = MSGCH_PLAIN, int param=0);
class formatted_string;
-void formatted_mpr(const formatted_string& fs, int channel = MSGCH_PLAIN,
- int param = 0);
+void formatted_mpr(const formatted_string& fs,
+ msg_channel_type channel = MSGCH_PLAIN, int param = 0);
void formatted_message_history(const std::string &st,
- int channel = MSGCH_PLAIN, int param = 0);
+ msg_channel_type channel = MSGCH_PLAIN,
+ int param = 0);
// 4.1-style mpr, currently named mprf for minimal disruption.
-void mprf( int channel, int param, const char *format, ... );
-void mprf( int channel, const char *format, ... );
+void mprf( msg_channel_type channel, int param, const char *format, ... );
+void mprf( msg_channel_type channel, const char *format, ... );
void mprf( const char *format, ... );
class no_messages
@@ -91,7 +92,7 @@ void set_colour(char set_message_colour);
* *********************************************************************** */
std::string get_last_messages(int mcount);
-int channel_to_colour( int channel, int param = 0 );
+int channel_to_colour( msg_channel_type channel, int param = 0 );
namespace msg
{