mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-22 22:34:33 +01:00
make DISABLE_NETWORK compatible
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
|
||||
#include <algorithm>
|
||||
#include "NetworkAction.h"
|
||||
|
||||
@@ -218,3 +220,5 @@ const std::vector<NetworkAction> NetworkActions::Actions =
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
|
||||
#include <string>
|
||||
#include <SDL_thread.h>
|
||||
#include "NetworkAddress.h"
|
||||
@@ -121,3 +123,5 @@ void NetworkAddress::ResolveWorker(ResolveRequest * req)
|
||||
}
|
||||
delete req;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
|
||||
#include "NetworkConnection.h"
|
||||
#include "../core/String.hpp"
|
||||
#include <SDL.h>
|
||||
@@ -215,3 +217,5 @@ void NetworkConnection::SetLastDisconnectReason(const rct_string_id string_id, v
|
||||
format_string(buffer, string_id, args);
|
||||
SetLastDisconnectReason(buffer);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
|
||||
#include "NetworkTypes.h"
|
||||
#include "NetworkAction.h"
|
||||
#include "NetworkGroup.h"
|
||||
@@ -136,3 +138,5 @@ bool NetworkGroup::CanPerformCommand(int command) const
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
|
||||
#include "NetworkTypes.h"
|
||||
#include "NetworkPacket.h"
|
||||
|
||||
@@ -112,3 +114,5 @@ const utf8 * NetworkPacket::ReadString()
|
||||
read++;
|
||||
return str;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
|
||||
#include "NetworkPacket.h"
|
||||
#include "NetworkPlayer.h"
|
||||
|
||||
@@ -49,3 +51,5 @@ void NetworkPlayer::AddMoneySpent(money32 cost)
|
||||
commands_ran++;
|
||||
window_invalidate_by_number(WC_PLAYER, id);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <SDL_endian.h>
|
||||
#include <SDL_platform.h>
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
#ifdef __WINDOWS__
|
||||
// winsock2 must be included before windows.h
|
||||
#include <winsock2.h>
|
||||
@@ -55,6 +56,7 @@
|
||||
#endif // __WINDOWS__
|
||||
|
||||
#include "../common.h"
|
||||
#endif
|
||||
|
||||
enum NETWORK_READPACKET
|
||||
{
|
||||
|
||||
@@ -14,6 +14,8 @@
|
||||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
|
||||
#include <unordered_set>
|
||||
|
||||
#include "../core/Json.hpp"
|
||||
@@ -241,3 +243,5 @@ void NetworkUserManager::GetStorePath(utf8 * buffer, size_t bufferSize)
|
||||
platform_get_user_directory(buffer, nullptr);
|
||||
Path::Append(buffer, bufferSize, USER_STORE_FILENAME);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -48,6 +48,8 @@ extern "C" {
|
||||
}
|
||||
#endif // __cplusplus
|
||||
|
||||
#include "NetworkTypes.h"
|
||||
|
||||
#ifndef DISABLE_NETWORK
|
||||
|
||||
// This define specifies which version of network stream current build uses.
|
||||
@@ -56,8 +58,6 @@ extern "C" {
|
||||
#define NETWORK_STREAM_VERSION "9"
|
||||
#define NETWORK_STREAM_ID OPENRCT2_VERSION "-" NETWORK_STREAM_VERSION
|
||||
|
||||
#include "NetworkTypes.h"
|
||||
|
||||
// Fixes issues on OS X
|
||||
#if defined(_RCT2_H_) && !defined(_MSC_VER)
|
||||
// use similar struct packing as MSVC for our structs
|
||||
|
||||
Reference in New Issue
Block a user