From 67bcc60d62f03fcbec645cd103ee7b53c12de119 Mon Sep 17 00:00:00 2001 From: haranp Date: Sat, 4 Aug 2007 22:00:02 +0000 Subject: 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 --- crawl-ref/source/message.h | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'crawl-ref/source/message.h') 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 { -- cgit v1.2.3-54-g00ecf