Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
This commit is contained in:
@@ -65,39 +65,39 @@ enum NetworkJoinStatus {
|
||||
NETWORK_JOIN_STATUS_END,
|
||||
};
|
||||
|
||||
extern uint32 _frame_counter_server; // The frame_counter of the server, if in network-mode
|
||||
extern uint32 _frame_counter_max; // To where we may go with our clients
|
||||
extern uint32 _frame_counter;
|
||||
extern uint32_t _frame_counter_server; // The frame_counter of the server, if in network-mode
|
||||
extern uint32_t _frame_counter_max; // To where we may go with our clients
|
||||
extern uint32_t _frame_counter;
|
||||
|
||||
extern uint32 _last_sync_frame; // Used in the server to store the last time a sync packet was sent to clients.
|
||||
extern uint32_t _last_sync_frame; // Used in the server to store the last time a sync packet was sent to clients.
|
||||
|
||||
/* networking settings */
|
||||
extern NetworkAddressList _broadcast_list;
|
||||
|
||||
extern uint32 _sync_seed_1;
|
||||
extern uint32_t _sync_seed_1;
|
||||
#ifdef NETWORK_SEND_DOUBLE_SEED
|
||||
extern uint32 _sync_seed_2;
|
||||
extern uint32_t _sync_seed_2;
|
||||
#endif
|
||||
extern uint32 _sync_frame;
|
||||
extern uint32_t _sync_frame;
|
||||
extern bool _network_first_time;
|
||||
/* Vars needed for the join-GUI */
|
||||
extern NetworkJoinStatus _network_join_status;
|
||||
extern uint8 _network_join_waiting;
|
||||
extern uint32 _network_join_bytes;
|
||||
extern uint32 _network_join_bytes_total;
|
||||
extern uint8_t _network_join_waiting;
|
||||
extern uint32_t _network_join_bytes;
|
||||
extern uint32_t _network_join_bytes_total;
|
||||
extern ConnectionType _network_server_connection_type;
|
||||
extern std::string _network_server_invite_code;
|
||||
|
||||
/* Variable available for clients. */
|
||||
extern std::string _network_server_name;
|
||||
|
||||
extern uint8 _network_reconnect;
|
||||
extern uint8_t _network_reconnect;
|
||||
|
||||
extern CompanyMask _network_company_passworded;
|
||||
|
||||
void NetworkQueryServer(const std::string &connection_string);
|
||||
|
||||
void GetBindAddresses(NetworkAddressList *addresses, uint16 port);
|
||||
void GetBindAddresses(NetworkAddressList *addresses, uint16_t port);
|
||||
struct NetworkGameList *NetworkAddServer(const std::string &connection_string, bool manually = true, bool never_expire = false);
|
||||
void NetworkRebuildHostList();
|
||||
void UpdateNetworkGameWindow();
|
||||
@@ -111,7 +111,7 @@ struct CommandPacket {
|
||||
CommandPacket() : next(nullptr), company(INVALID_COMPANY), frame(0), my_cmd(false) {}
|
||||
CommandPacket *next; ///< the next command packet (if in queue)
|
||||
CompanyID company; ///< company that is executing the command
|
||||
uint32 frame; ///< the frame in which this packet is executed
|
||||
uint32_t frame; ///< the frame in which this packet is executed
|
||||
bool my_cmd; ///< did the command originate from "me"
|
||||
|
||||
Commands cmd; ///< command being executed.
|
||||
@@ -127,15 +127,15 @@ void NetworkSyncCommandQueue(NetworkClientSocket *cs);
|
||||
void NetworkReplaceCommandClientId(CommandPacket &cp, ClientID client_id);
|
||||
|
||||
void ShowNetworkError(StringID error_string);
|
||||
void NetworkTextMessage(NetworkAction action, TextColour colour, bool self_send, const std::string &name, const std::string &str = "", int64 data = 0, const std::string &data_str = "");
|
||||
void NetworkTextMessage(NetworkAction action, TextColour colour, bool self_send, const std::string &name, const std::string &str = "", int64_t data = 0, const std::string &data_str = "");
|
||||
uint NetworkCalculateLag(const NetworkClientSocket *cs);
|
||||
StringID GetNetworkErrorMsg(NetworkErrorCode err);
|
||||
bool NetworkMakeClientNameUnique(std::string &new_name);
|
||||
std::string GenerateCompanyPasswordHash(const std::string &password, const std::string &password_server_id, uint32 password_game_seed);
|
||||
std::string GenerateCompanyPasswordHash(const std::string &password, const std::string &password_server_id, uint32_t password_game_seed);
|
||||
|
||||
std::string_view ParseCompanyFromConnectionString(const std::string &connection_string, CompanyID *company_id);
|
||||
NetworkAddress ParseConnectionString(const std::string &connection_string, uint16 default_port);
|
||||
std::string NormalizeConnectionString(const std::string &connection_string, uint16 default_port);
|
||||
NetworkAddress ParseConnectionString(const std::string &connection_string, uint16_t default_port);
|
||||
std::string NormalizeConnectionString(const std::string &connection_string, uint16_t default_port);
|
||||
|
||||
void ClientNetworkEmergencySave();
|
||||
|
||||
|
Reference in New Issue
Block a user