diff options
author | rubidium <rubidium@openttd.org> | 2007-03-07 12:11:48 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2007-03-07 12:11:48 +0000 |
commit | 24c4d5b06d231785db01500360c26815d8fe4d15 (patch) | |
tree | 757477dbdc02025cc29690a4e66e40f872cab02b /src/network/core | |
parent | 36bb92ae241403d61dc7a3e5a1696b615be61395 (diff) | |
download | openttd-24c4d5b06d231785db01500360c26815d8fe4d15.tar.xz |
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
Diffstat (limited to 'src/network/core')
-rw-r--r-- | src/network/core/core.h | 4 | ||||
-rw-r--r-- | src/network/core/game.h | 6 | ||||
-rw-r--r-- | src/network/core/tcp.h | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/src/network/core/core.h b/src/network/core/core.h index c07f5ab81..54ff156f3 100644 --- a/src/network/core/core.h +++ b/src/network/core/core.h @@ -16,7 +16,7 @@ bool NetworkCoreInitialize(); void NetworkCoreShutdown(); /** Status of a network client; reasons why a client has quit */ -typedef enum { +enum NetworkRecvStatus { NETWORK_RECV_STATUS_OKAY, ///< Everything is okay NETWORK_RECV_STATUS_DESYNC, ///< A desync did occur NETWORK_RECV_STATUS_NEWGRF_MISMATCH, ///< We did not have the required NewGRFs @@ -27,7 +27,7 @@ typedef enum { NETWORK_RECV_STATUS_SERVER_FULL, ///< The server is full NETWORK_RECV_STATUS_SERVER_BANNED, ///< The server has banned us NETWORK_RECV_STATUS_CLOSE_QUERY, ///< Done quering the server -} NetworkRecvStatus; +}; /** Forward declaration due to circular dependencies */ struct Packet; diff --git a/src/network/core/game.h b/src/network/core/game.h index 4347fc6b5..049e5020e 100644 --- a/src/network/core/game.h +++ b/src/network/core/game.h @@ -19,7 +19,7 @@ * some fields will be empty on the client (like game_password) by default * and only filled with data a player enters. */ -typedef struct NetworkGameInfo { +struct NetworkGameInfo { byte game_info_version; ///< Version of the game info char server_name[NETWORK_NAME_LENGTH]; ///< Server name char hostname[NETWORK_HOSTNAME_LENGTH]; ///< Hostname of the server (if any) @@ -43,8 +43,8 @@ typedef struct NetworkGameInfo { byte map_set; ///< Graphical set bool dedicated; ///< Is this a dedicated server? char rcon_password[NETWORK_PASSWORD_LENGTH]; ///< RCon password for the server. "" if rcon is disabled - struct GRFConfig *grfconfig; ///< List of NewGRF files used -} NetworkGameInfo; + GRFConfig *grfconfig; ///< List of NewGRF files used +}; #endif /* ENABLE_NETWORK */ diff --git a/src/network/core/tcp.h b/src/network/core/tcp.h index a667ab099..bd6a1d01f 100644 --- a/src/network/core/tcp.h +++ b/src/network/core/tcp.h @@ -58,8 +58,8 @@ enum { }; /** Packet that wraps a command */ -typedef struct CommandPacket { - struct CommandPacket *next; ///< the next command packet (if in queue) +struct CommandPacket { + CommandPacket *next; ///< the next command packet (if in queue) PlayerByte player; ///< player that is executing the command uint32 cmd; ///< command being executed uint32 p1; ///< parameter p1 @@ -68,10 +68,10 @@ typedef struct CommandPacket { char text[80]; ///< possible text sent for name changes etc uint32 frame; ///< the frame in which this packet is executed byte callback; ///< any callback function executed upon successful completion of the command -} CommandPacket; +}; /** Status of a client */ -typedef enum { +enum ClientStatus { STATUS_INACTIVE, ///< The client is not connected nor active STATUS_AUTHORIZING,///< The client is authorizing STATUS_AUTH, ///< The client is authorized @@ -80,7 +80,7 @@ typedef enum { STATUS_DONE_MAP, ///< The client has downloaded the map STATUS_PRE_ACTIVE, ///< The client is catching up the delayed frames STATUS_ACTIVE, ///< The client is an active player in the game -} ClientStatus; +}; /** Base socket handler for all TCP sockets */ class NetworkTCPSocketHandler : public NetworkSocketHandler { |