Apply the new ground_level method.
[crawl.git] / crawl-ref / source / mpr.h
bloba4557a9093181f53fce15429fcc2515184d85c2e
1 /*
2 * File: mpr.h
3 * Summary: Functions used to print simple messages.
4 * Written by: Linley Henzell
5 */
7 #ifndef MPR_H
8 #define MPR_H
10 // if you mess with this list, you'll need to make changes in initfile.cc
11 // to message_channel_names, and probably also to message.cc to colour
12 // everything properly
13 enum msg_channel_type
15 MSGCH_PLAIN, // regular text
16 MSGCH_FRIEND_ACTION, // friendly monsters taking actions
17 MSGCH_PROMPT, // various prompts
18 MSGCH_GOD, // god/religion (param is god)
19 MSGCH_PRAY, // praying messages (param is god)
20 MSGCH_DURATION, // effect down/warnings
21 MSGCH_DANGER, // serious life threats (ie very large HP attacks)
22 MSGCH_WARN, // much less serious threats
23 MSGCH_FOOD, // hunger notices
24 MSGCH_RECOVERY, // recovery from disease/stat/poison condition
25 MSGCH_SOUND, // messages about things the player hears
26 MSGCH_TALK, // monster talk (param is monster type)
27 MSGCH_TALK_VISUAL, // silent monster "talk" (not restricted by silence)
28 MSGCH_INTRINSIC_GAIN, // player level/stat/species-power gains
29 MSGCH_MUTATION, // player gain/lose mutations
30 MSGCH_MONSTER_SPELL, // monsters casting spells
31 MSGCH_MONSTER_ENCHANT, // monsters'*' enchantments up and down
32 MSGCH_FRIEND_SPELL, // allied monsters casting spells
33 MSGCH_FRIEND_ENCHANT, // allied monsters' enchantments up and down
34 MSGCH_MONSTER_DAMAGE, // monster damage reports (param is level)
35 MSGCH_MONSTER_TARGET, // message marking the monster as a target
36 MSGCH_BANISHMENT, // Abyss-related messages
37 MSGCH_ROTTEN_MEAT, // messages about chunks/corpses becoming rotten
38 MSGCH_EQUIPMENT, // equipment listing messages
39 MSGCH_FLOOR_ITEMS, // like equipment, but lists of floor items
40 MSGCH_MULTITURN_ACTION, // delayed action messages
41 MSGCH_EXAMINE, // messages describing monsters, features, items
42 MSGCH_EXAMINE_FILTER, // "less important" instances of the above
43 MSGCH_DIAGNOSTICS, // various diagnostic messages
44 MSGCH_ERROR, // error messages
45 MSGCH_TUTORIAL, // messages for tutorial
46 MSGCH_ORB, // messages for the orb
48 NUM_MESSAGE_CHANNELS // always last
51 enum msg_colour_type
53 MSGCOL_BLACK = 0,
54 MSGCOL_BLUE,
55 MSGCOL_GREEN,
56 MSGCOL_CYAN,
57 MSGCOL_RED,
58 MSGCOL_MAGENTA,
59 MSGCOL_BROWN,
60 MSGCOL_LIGHTGREY,
61 MSGCOL_DARKGREY,
62 MSGCOL_LIGHTBLUE,
63 MSGCOL_LIGHTGREEN,
64 MSGCOL_LIGHTCYAN,
65 MSGCOL_LIGHTRED,
66 MSGCOL_LIGHTMAGENTA,
67 MSGCOL_YELLOW,
68 MSGCOL_WHITE,
69 MSGCOL_DEFAULT, // use default colour
70 MSGCOL_ALTERNATE, // use secondary default colour scheme
71 MSGCOL_MUTED, // don't print messages
72 MSGCOL_PLAIN, // same as plain channel
73 MSGCOL_NONE, // parsing failure, etc
76 msg_colour_type msg_colour(int colour);
78 void mpr(std::string text, msg_channel_type channel=MSGCH_PLAIN, int param=0,
79 bool nojoin=false);
81 inline void mprnojoin(std::string text, msg_channel_type channel=MSGCH_PLAIN,
82 int param=0)
84 mpr(text, channel, param, true);
87 // 4.1-style mpr, currently named mprf for minimal disruption.
88 void mprf(msg_channel_type channel, int param, const char *format, ...);
89 void mprf(msg_channel_type channel, const char *format, ...);
90 void mprf(const char *format, ...);
92 // Yay for C89 and lack of variadic #defines...
93 #ifdef DEBUG_DIAGNOSTICS
94 void dprf(const char *format, ...);
95 #else
96 static inline void dprf(const char *format, ...) {}
97 #endif
99 #endif