summaryrefslogtreecommitdiffstats
path: root/src/Defines.h
diff options
context:
space:
mode:
authorTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-04 23:39:57 +0100
committerTiger Wang <ziwei.tiger@hotmail.co.uk>2014-02-04 23:39:57 +0100
commit9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be (patch)
tree9615b05c74b4745914882d76a61fad5ab1af32fd /src/Defines.h
parentPickup constructor no longer exported (diff)
downloadcuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar.gz
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar.bz2
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar.lz
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar.xz
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.tar.zst
cuberite-9eeeb91fa6e3df67aa1dc8aae54da8e6631d25be.zip
Diffstat (limited to 'src/Defines.h')
-rw-r--r--src/Defines.h91
1 files changed, 47 insertions, 44 deletions
diff --git a/src/Defines.h b/src/Defines.h
index 17885394e..f766d4d04 100644
--- a/src/Defines.h
+++ b/src/Defines.h
@@ -465,51 +465,54 @@ inline AString AppendChatEpithet(const AString & a_ChatMessage, ChatPrefixCodes
{
switch (a_ChatPrefix)
{
- case mtCustom: return a_ChatMessage;
- case mtFailure:
- {
- AString Message(Printf("%s[INFO] %s", cChatColor::Rose.c_str(), cChatColor::White.c_str()));
- Message.append(a_ChatMessage);
- return Message;
- }
- case mtInformation:
- {
- AString Message(Printf("%s[INFO] %s", cChatColor::Yellow.c_str(), cChatColor::White.c_str()));
- Message.append(a_ChatMessage);
- return Message;
- }
- case mtSuccess:
- {
- AString Message(Printf("%s[INFO] %s", cChatColor::Green.c_str(), cChatColor::White.c_str()));
- Message.append(a_ChatMessage);
- return Message;
- }
- case mtWarning:
- {
- AString Message(Printf("%s[WARN] %s", cChatColor::Rose.c_str(), cChatColor::White.c_str()));
- Message.append(a_ChatMessage);
- return Message;
- }
- case mtFatal:
- {
- AString Message(Printf("%s[FATAL] %s", cChatColor::Red.c_str(), cChatColor::White.c_str()));
- Message.append(a_ChatMessage);
- return Message;
- }
- case mtDeath:
- {
- AString Message(Printf("%s[DEATH] %s", cChatColor::Gray.c_str(), cChatColor::White.c_str()));
- Message.append(a_ChatMessage);
- return Message;
- }
- case mtPrivateMessage:
- {
- AString Message(Printf("%s[MSG] %s%s", cChatColor::LightBlue.c_str(), cChatColor::White.c_str(), cChatColor::Italic.c_str()));
- Message.append(a_ChatMessage);
- return Message;
- }
+ case mtCustom: return a_ChatMessage;
+ case mtFailure:
+ {
+ AString Message(Printf("%s[INFO] %s", cChatColor::Rose.c_str(), cChatColor::White.c_str()));
+ Message.append(a_ChatMessage);
+ return Message;
+ }
+ case mtInformation:
+ {
+ AString Message(Printf("%s[INFO] %s", cChatColor::Yellow.c_str(), cChatColor::White.c_str()));
+ Message.append(a_ChatMessage);
+ return Message;
+ }
+ case mtSuccess:
+ {
+ AString Message(Printf("%s[INFO] %s", cChatColor::Green.c_str(), cChatColor::White.c_str()));
+ Message.append(a_ChatMessage);
+ return Message;
+ }
+ case mtWarning:
+ {
+ AString Message(Printf("%s[WARN] %s", cChatColor::Rose.c_str(), cChatColor::White.c_str()));
+ Message.append(a_ChatMessage);
+ return Message;
+ }
+ case mtFatal:
+ {
+ AString Message(Printf("%s[FATAL] %s", cChatColor::Red.c_str(), cChatColor::White.c_str()));
+ Message.append(a_ChatMessage);
+ return Message;
+ }
+ case mtDeath:
+ {
+ AString Message(Printf("%s[DEATH] %s", cChatColor::Gray.c_str(), cChatColor::White.c_str()));
+ Message.append(a_ChatMessage);
+ return Message;
+ }
+ case mtPrivateMessage:
+ {
+ AString Message(Printf("%s[MSG] %s%s", cChatColor::LightBlue.c_str(), cChatColor::White.c_str(), cChatColor::Italic.c_str()));
+ Message.append(a_ChatMessage);
+ return Message;
+ }
+ default: ASSERT(!"Unhandled chat prefix type!"); return "";
}
-}// tolua_begin
+}
+
+// tolua_begin
/// Normalizes an angle in degrees to the [-180, +180) range:
inline double NormalizeAngleDegrees(const double a_Degrees)