summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/mpr.h
diff options
context:
space:
mode:
authorzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-15 23:33:50 +0000
committerzelgadis <zelgadis@c06c8d41-db1a-0410-9941-cceddc491573>2007-09-15 23:33:50 +0000
commitfa763ba1bc7285247a5b1438d59633383a80cf6c (patch)
treef4b632fea66f43dc6c1415fdaa4feead0b6ff90d /crawl-ref/source/mpr.h
parent4d88632cb99d368956dec86732f7d275ffb941e8 (diff)
downloadcrawl-ref-fa763ba1bc7285247a5b1438d59633383a80cf6c.tar.gz
crawl-ref-fa763ba1bc7285247a5b1438d59633383a80cf6c.zip
Split off portions of externs.h and enum.h into other files. The
crawl_environment, player and monsters classes have been left in externs.h, which necessitates that all of the enums references by those classes stay in enums.h, since you can't forward declare an enum. However, it's a start. Also, portions of misc.{cc,h} have been split off into traps.{cc,h}, place.{cc,h} and terrain.{cc,h} git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2095 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/mpr.h')
-rw-r--r--crawl-ref/source/mpr.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/crawl-ref/source/mpr.h b/crawl-ref/source/mpr.h
new file mode 100644
index 0000000000..0054dd7b35
--- /dev/null
+++ b/crawl-ref/source/mpr.h
@@ -0,0 +1,91 @@
+/*
+ * File: mpr.h
+ * Summary: Functions used to print simple messages.
+ * Written by: Linley Henzell
+ *
+ * Modified for Crawl Reference by $Author: j-p-e-g $ on $Date: 2007-09-02 05:40:44 -0700 (Sun, 02 Sep 2007) $
+ *
+ * Change History (most recent first):
+ *
+ * <2> 9/11/07 MPC Split off from message.h
+ * <2> 5/08/99 JDJ mpr takes a const char* instead of a char array.
+ * <1> -/--/-- LRH Created
+ */
+
+#ifndef MPR_H
+#define MPR_H
+
+// if you mess with this list, you'll need to make changes in initfile.cc
+// to message_channel_names, and probably also to message.cc to colour
+// everything properly
+enum msg_channel_type
+{
+ MSGCH_PLAIN, // regular text
+ MSGCH_PROMPT, // various prompts
+ MSGCH_GOD, // god/religion (param is god)
+ MSGCH_PRAY, // praying messages (param is god)
+ MSGCH_DURATION, // effect down/warnings
+ MSGCH_DANGER, // serious life threats (ie very large HP attacks)
+ MSGCH_WARN, // much less serious threats
+ MSGCH_FOOD, // hunger notices
+ MSGCH_RECOVERY, // recovery from disease/stat/poison condition
+ MSGCH_SOUND, // messages about things the player hears
+ MSGCH_TALK, // monster talk (param is monster type)
+ MSGCH_INTRINSIC_GAIN, // player level/stat/species-power gains
+ MSGCH_MUTATION, // player gain/lose mutations
+ MSGCH_MONSTER_SPELL, // monsters casting spells
+ MSGCH_MONSTER_ENCHANT,// monsters enchantments up and down
+ MSGCH_MONSTER_DAMAGE, // monster damage reports (param is level)
+ MSGCH_MONSTER_TARGET, // message marking the monster as a target
+ MSGCH_ROTTEN_MEAT, // messages about chunks/corpses becoming rotten
+ MSGCH_EQUIPMENT, // equipment listing messages
+ MSGCH_FLOOR_ITEMS, // like equipment, but lists of floor items
+ MSGCH_MULTITURN_ACTION, // delayed action messages
+ MSGCH_EXAMINE, // messages describing monsters, features, items
+ MSGCH_EXAMINE_FILTER, // "less important" instances of the above
+ MSGCH_DIAGNOSTICS, // various diagnostic messages
+ MSGCH_TUTORIAL, // messages for tutorial
+ NUM_MESSAGE_CHANNELS // always last
+};
+
+enum msg_colour_type
+{
+ MSGCOL_BLACK = 0, // the order of these colours is important
+ MSGCOL_BLUE,
+ MSGCOL_GREEN,
+ MSGCOL_CYAN,
+ MSGCOL_RED,
+ MSGCOL_MAGENTA,
+ MSGCOL_BROWN,
+ MSGCOL_LIGHTGRAY,
+ MSGCOL_DARKGRAY,
+ MSGCOL_LIGHTBLUE,
+ MSGCOL_LIGHTGREEN,
+ MSGCOL_LIGHTCYAN,
+ MSGCOL_LIGHTMAGENTA,
+ MSGCOL_YELLOW,
+ MSGCOL_WHITE,
+ MSGCOL_DEFAULT, // use default colour
+ MSGCOL_ALTERNATE, // use secondary default colour scheme
+ MSGCOL_MUTED, // don't print messages
+ MSGCOL_PLAIN // same as plain channel
+};
+
+// last updated 12may2000 {dlb}
+/* ***********************************************************************
+ * called from: ability - acr - bang - beam - chardump - command - debug -
+ * decks - direct - effects - fight - files - food - it_use2 -
+ * it_use3 - item_use - items - macro - misc - monplace -
+ * monstuff - mstuff2 - mutation - ouch - overmap - player -
+ * religion - shopping - skills - spell - spl-book - spells -
+ * spells1 - spells2 - spells3 - spells4 - stuff - transfor -
+ * view
+ * *********************************************************************** */
+void mpr(const char *inf, msg_channel_type channel = MSGCH_PLAIN, int param=0);
+
+// 4.1-style mpr, currently named mprf for minimal disruption.
+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, ... );
+
+#endif