summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/message.cc
diff options
context:
space:
mode:
authorj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-22 21:57:35 +0000
committerj-p-e-g <j-p-e-g@c06c8d41-db1a-0410-9941-cceddc491573>2008-06-22 21:57:35 +0000
commitea78e3b88da2c70285b09f34c9c5d8230280405b (patch)
treeb4de694fd30792e67bf1ebde5e3f770794992949 /crawl-ref/source/message.cc
parentf7cb474e41b75c37273b79d4fe5e7e24da81950d (diff)
downloadcrawl-ref-ea78e3b88da2c70285b09f34c9c5d8230280405b.tar.gz
crawl-ref-ea78e3b88da2c70285b09f34c9c5d8230280405b.zip
Swap '.' and '!' in the targetting interface.
Forbid bats wearing hats/caps or rings. (That makes amulets the only type of equipment Vampires can keep on when transforming.) To make up for it, increase their damage stats again. Also fix it being possible to (un)equip the allowed items in Tiles while in bat form. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@6055 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/message.cc')
-rw-r--r--crawl-ref/source/message.cc22
1 files changed, 12 insertions, 10 deletions
diff --git a/crawl-ref/source/message.cc b/crawl-ref/source/message.cc
index dfc4baad0c..46d1e2b4dd 100644
--- a/crawl-ref/source/message.cc
+++ b/crawl-ref/source/message.cc
@@ -424,7 +424,6 @@ void mpr(const char *inf, msg_channel_type channel, int param)
return;
}
-
char mbuf[400];
size_t i = 0;
const int stepsize = get_number_of_cols() - 1;
@@ -434,24 +433,26 @@ void mpr(const char *inf, msg_channel_type channel, int param)
// If a message is exactly STEPSIZE characters long,
// it should precisely fit in one line. The printing is thus
// from I to I + STEPSIZE - 1. Stop when I reaches MSGLEN.
- while ( i < msglen || i == 0 )
+ while (i < msglen || i == 0)
{
strncpy( mbuf, inf + i, stepsize );
mbuf[stepsize] = 0;
// Did the message break?
- if ( i + stepsize < msglen )
+ if (i + stepsize < msglen)
{
// Aes, find a nicer place to break it.
int lookback, where = 0;
- for ( lookback = 0; lookback < lookback_size; ++lookback )
+ for (lookback = 0; lookback < lookback_size; ++lookback)
{
where = stepsize - 1 - lookback;
- if ( where >= 0 && isspace(mbuf[where]) )
+ if (where >= 0 && isspace(mbuf[where]))
+ {
// aha!
break;
+ }
}
- if ( lookback != lookback_size )
+ if (lookback != lookback_size)
{
// Found a good spot to break.
mbuf[where] = 0;
@@ -463,7 +464,7 @@ void mpr(const char *inf, msg_channel_type channel, int param)
else
i += stepsize;
- base_mpr( mbuf, channel, param );
+ base_mpr(mbuf, channel, param);
}
}
@@ -658,6 +659,7 @@ static int prepare_message(const std::string& imsg, msg_channel_type channel,
if (New_Message_Count == num_lines - 1)
more();
}
+
return colour;
}
@@ -710,9 +712,9 @@ static void mpr_formatted_output(formatted_string fs, int colour)
need_prefix = false;
}
- for ( unsigned i = 0; i < fs.ops.size(); ++i )
+ for (unsigned i = 0; i < fs.ops.size(); ++i)
{
- switch ( fs.ops[i].type )
+ switch (fs.ops[i].type)
{
case FSOP_COLOUR:
colour = fs.ops[i].x;
@@ -726,7 +728,7 @@ static void mpr_formatted_output(formatted_string fs, int colour)
break;
}
}
- message_out( Message_Line, colour, "", Options.delay_message_clear? 2 : 1);
+ message_out(Message_Line, colour, "", Options.delay_message_clear? 2 : 1);
}
// Line wrapping is not available here!