mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-19 20:49:11 +00:00
(svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int
This commit is contained in:
@@ -35,9 +35,7 @@
|
||||
* some spaces and possible translations of [All] to other languages. */
|
||||
assert_compile((int)DRAW_STRING_BUFFER >= (int)NETWORK_CHAT_LENGTH + NETWORK_NAME_LENGTH + 40);
|
||||
|
||||
enum {
|
||||
NETWORK_CHAT_LINE_SPACING = 3,
|
||||
};
|
||||
static const uint NETWORK_CHAT_LINE_SPACING = 3;
|
||||
|
||||
struct ChatMessage {
|
||||
char message[DRAW_STRING_BUFFER];
|
||||
|
@@ -225,10 +225,8 @@ enum NetworkContentListWindowWidgets {
|
||||
class NetworkContentListWindow : public QueryStringBaseWindow, ContentCallback {
|
||||
typedef GUIList<const ContentInfo*> GUIContentList;
|
||||
|
||||
enum {
|
||||
EDITBOX_MAX_SIZE = 50,
|
||||
EDITBOX_MAX_LENGTH = 300,
|
||||
};
|
||||
static const uint EDITBOX_MAX_SIZE = 50;
|
||||
static const uint EDITBOX_MAX_LENGTH = 300;
|
||||
|
||||
/** Runtime saved values */
|
||||
static Listing last_sorting;
|
||||
|
@@ -132,11 +132,9 @@ void NetworkGameListRemoveItem(NetworkGameList *remove)
|
||||
}
|
||||
}
|
||||
|
||||
enum {
|
||||
MAX_GAME_LIST_REQUERY_COUNT = 10, ///< How often do we requery in number of times per server?
|
||||
REQUERY_EVERY_X_GAMELOOPS = 60, ///< How often do we requery in time?
|
||||
REFRESH_GAMEINFO_X_REQUERIES = 50, ///< Refresh the game info itself after REFRESH_GAMEINFO_X_REQUERIES * REQUERY_EVERY_X_GAMELOOPS game loops
|
||||
};
|
||||
static const uint MAX_GAME_LIST_REQUERY_COUNT = 10; ///< How often do we requery in number of times per server?
|
||||
static const uint REQUERY_EVERY_X_GAMELOOPS = 60; ///< How often do we requery in time?
|
||||
static const uint REFRESH_GAMEINFO_X_REQUERIES = 50; ///< Refresh the game info itself after REFRESH_GAMEINFO_X_REQUERIES * REQUERY_EVERY_X_GAMELOOPS game loops
|
||||
|
||||
/** Requeries the (game) servers we have not gotten a reply from */
|
||||
void NetworkGameListRequery()
|
||||
|
@@ -36,11 +36,9 @@ static ThreadMutex *_network_udp_mutex = ThreadMutex::New();
|
||||
/** Session key to register ourselves to the master server */
|
||||
static uint64 _session_key = 0;
|
||||
|
||||
enum {
|
||||
ADVERTISE_NORMAL_INTERVAL = 30000, // interval between advertising in ticks (15 minutes)
|
||||
ADVERTISE_RETRY_INTERVAL = 300, // readvertise when no response after this many ticks (9 seconds)
|
||||
ADVERTISE_RETRY_TIMES = 3 // give up readvertising after this much failed retries
|
||||
};
|
||||
static const uint ADVERTISE_NORMAL_INTERVAL = 30000; ///< interval between advertising in ticks (15 minutes)
|
||||
static const uint ADVERTISE_RETRY_INTERVAL = 300; ///< readvertise when no response after this many ticks (9 seconds)
|
||||
static const uint ADVERTISE_RETRY_TIMES = 3; ///< give up readvertising after this much failed retries
|
||||
|
||||
NetworkUDPSocketHandler *_udp_client_socket = NULL; ///< udp client socket
|
||||
NetworkUDPSocketHandler *_udp_server_socket = NULL; ///< udp server socket
|
||||
|
Reference in New Issue
Block a user