summaryrefslogtreecommitdiff
path: root/src/network
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2009-02-09 02:57:15 +0000
committerrubidium <rubidium@openttd.org>2009-02-09 02:57:15 +0000
commitc0a8d09ca72873bbbef14dd317cbd29319e54640 (patch)
tree211b57e3a81eed5791f5b6b9709252af6f7d8503 /src/network
parent90e2465d7d2c770707feeaebfebbe56bd76383f1 (diff)
downloadopenttd-c0a8d09ca72873bbbef14dd317cbd29319e54640.tar.xz
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
Diffstat (limited to 'src/network')
-rw-r--r--src/network/network_chat_gui.cpp6
-rw-r--r--src/network/network_client.cpp6
-rw-r--r--src/network/network_gui.cpp2
-rw-r--r--src/network/network_internal.h2
-rw-r--r--src/network/network_server.cpp14
-rw-r--r--src/network/network_server.h2
6 files changed, 16 insertions, 16 deletions
diff --git a/src/network/network_chat_gui.cpp b/src/network/network_chat_gui.cpp
index 948aa5942..f38b4a04d 100644
--- a/src/network/network_chat_gui.cpp
+++ b/src/network/network_chat_gui.cpp
@@ -60,7 +60,7 @@ static inline uint GetChatMessageCount()
/**
* Add a text message to the 'chat window' to be shown
- * @param color The colour this message is to be shown in
+ * @param colour The colour this message is to be shown in
* @param duration The duration of the chat message in game-days
* @param message message itself in printf() style
*/
@@ -96,7 +96,7 @@ void CDECL NetworkAddChatMessage(TextColour colour, uint8 duration, const char *
/* The default colour for a message is company colour. Replace this with
* white for any additional lines */
- cmsg->colour = (bufp == buf && colour & IS_PALETTE_COLOR) ? colour : (TextColour)(0x1D - 15) | IS_PALETTE_COLOR;
+ cmsg->colour = (bufp == buf && colour & IS_PALETTE_COLOUR) ? colour : (TextColour)(0x1D - 15) | IS_PALETTE_COLOUR;
cmsg->end_date = _date + duration;
bufp += strlen(bufp) + 1; // jump to 'next line' in the formatted string
@@ -232,7 +232,7 @@ void NetworkDrawChatMessage()
_screen.height - _chatmsg_box.y - count * NETWORK_CHAT_LINE_HEIGHT - 2,
_chatmsg_box.x + _chatmsg_box.width - 1,
_screen.height - _chatmsg_box.y - 2,
- PALETTE_TO_TRANSPARENT, FILLRECT_RECOLOR // black, but with some alpha for background
+ PALETTE_TO_TRANSPARENT, FILLRECT_RECOLOUR // black, but with some alpha for background
);
/* Paint the chat messages starting with the lowest at the bottom */
diff --git a/src/network/network_client.cpp b/src/network/network_client.cpp
index 78e026b79..1d2db6b95 100644
--- a/src/network/network_client.cpp
+++ b/src/network/network_client.cpp
@@ -741,7 +741,7 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_CHAT)
}
if (ci != NULL)
- NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci->client_playas), self_send, name, msg, data);
+ NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci->client_playas), self_send, name, msg, data);
return NETWORK_RECV_STATUS_OKAY;
}
@@ -816,10 +816,10 @@ DEF_CLIENT_RECEIVE_COMMAND(PACKET_SERVER_RCON)
{
char rcon_out[NETWORK_RCONCOMMAND_LENGTH];
- ConsoleColour color_code = (ConsoleColour)p->Recv_uint16();
+ ConsoleColour colour_code = (ConsoleColour)p->Recv_uint16();
p->Recv_string(rcon_out, sizeof(rcon_out));
- IConsolePrint(color_code, rcon_out);
+ IConsolePrint(colour_code, rcon_out);
return NETWORK_RECV_STATUS_OKAY;
}
diff --git a/src/network/network_gui.cpp b/src/network/network_gui.cpp
index bcea4a232..dc070fd50 100644
--- a/src/network/network_gui.cpp
+++ b/src/network/network_gui.cpp
@@ -917,7 +917,7 @@ struct NetworkStartServerWindow : public QueryStringBaseWindow {
if (pos == 0) {
DrawString(14, y, STR_4010_GENERATE_RANDOM_NEW_GAME, TC_DARK_GREEN);
} else {
- DoDrawString(item->title, 14, y, _fios_colors[item->type] );
+ DoDrawString(item->title, 14, y, _fios_colours[item->type] );
}
y += NSSWND_ROWSIZE;
diff --git a/src/network/network_internal.h b/src/network/network_internal.h
index b73fe1d0f..32b229976 100644
--- a/src/network/network_internal.h
+++ b/src/network/network_internal.h
@@ -148,7 +148,7 @@ void NetworkFreeLocalCommandQueue();
// from network.c
void NetworkCloseClient(NetworkClientSocket *cs);
-void NetworkTextMessage(NetworkAction action, ConsoleColour color, bool self_send, const char *name, const char *str = "", int64 data = 0);
+void NetworkTextMessage(NetworkAction action, ConsoleColour colour, bool self_send, const char *name, const char *str = "", int64 data = 0);
void NetworkGetClientName(char *clientname, size_t size, const NetworkClientSocket *cs);
uint NetworkCalculateLag(const NetworkClientSocket *cs);
byte NetworkGetCurrentLanguageIndex();
diff --git a/src/network/network_server.cpp b/src/network/network_server.cpp
index 03c873684..b4786ea28 100644
--- a/src/network/network_server.cpp
+++ b/src/network/network_server.cpp
@@ -572,11 +572,11 @@ DEF_SERVER_SEND_COMMAND(PACKET_SERVER_NEWGAME)
cs->Send_Packet(p);
}
-DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientSocket *cs, uint16 color, const char *command)
+DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientSocket *cs, uint16 colour, const char *command)
{
Packet *p = NetworkSend_Init(PACKET_SERVER_RCON);
- p->Send_uint16(color);
+ p->Send_uint16(colour);
p->Send_string(command);
cs->Send_Packet(p);
}
@@ -1044,7 +1044,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
ci = NetworkFindClientInfoFromClientID(from_id);
/* Display the text locally, and that is it */
if (ci != NULL)
- NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci->client_playas), false, ci->client_name, msg, data);
+ NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci->client_playas), false, ci->client_name, msg, data);
} else {
/* Else find the client to send the message to */
FOR_ALL_CLIENT_SOCKETS(cs) {
@@ -1061,7 +1061,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
ci = NetworkFindClientInfoFromClientID(from_id);
ci_to = NetworkFindClientInfoFromClientID((ClientID)dest);
if (ci != NULL && ci_to != NULL)
- NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci->client_playas), true, ci_to->client_name, msg, data);
+ NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci->client_playas), true, ci_to->client_name, msg, data);
} else {
FOR_ALL_CLIENT_SOCKETS(cs) {
if (cs->client_id == from_id) {
@@ -1089,7 +1089,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
ci = NetworkFindClientInfoFromClientID(from_id);
ci_own = NetworkFindClientInfoFromClientID(CLIENT_ID_SERVER);
if (ci != NULL && ci_own != NULL && ci_own->client_playas == dest) {
- NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci->client_playas), false, ci->client_name, msg, data);
+ NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci->client_playas), false, ci->client_name, msg, data);
if (from_id == CLIENT_ID_SERVER) show_local = false;
ci_to = ci_own;
}
@@ -1104,7 +1104,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
StringID str = IsValidCompanyID(ci_to->client_playas) ? STR_COMPANY_NAME : STR_NETWORK_SPECTATORS;
SetDParam(0, ci_to->client_playas);
GetString(name, str, lastof(name));
- NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci_own->client_playas), true, name, msg, data);
+ NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci_own->client_playas), true, name, msg, data);
} else {
FOR_ALL_CLIENT_SOCKETS(cs) {
if (cs->client_id == from_id) {
@@ -1124,7 +1124,7 @@ void NetworkServerSendChat(NetworkAction action, DestType desttype, int dest, co
}
ci = NetworkFindClientInfoFromClientID(from_id);
if (ci != NULL)
- NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColor(ci->client_playas), false, ci->client_name, msg, data);
+ NetworkTextMessage(action, (ConsoleColour)GetDrawStringCompanyColour(ci->client_playas), false, ci->client_name, msg, data);
break;
}
}
diff --git a/src/network/network_server.h b/src/network/network_server.h
index 4950b74d5..aa28949bd 100644
--- a/src/network/network_server.h
+++ b/src/network/network_server.h
@@ -12,7 +12,7 @@ DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR_QUIT)(NetworkClientSocket *cs,
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_ERROR)(NetworkClientSocket *cs, NetworkErrorCode error);
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_SHUTDOWN);
DEF_SERVER_SEND_COMMAND(PACKET_SERVER_NEWGAME);
-DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientSocket *cs, uint16 color, const char *command);
+DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_RCON)(NetworkClientSocket *cs, uint16 colour, const char *command);
DEF_SERVER_SEND_COMMAND_PARAM(PACKET_SERVER_MOVE)(NetworkClientSocket *cs, uint16 client_id, CompanyID company_id);
bool NetworkServer_ReadPackets(NetworkClientSocket *cs);