1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-26 08:14:38 +01:00

Rename some bits to allow unity builds of libopenrct2 (#9944)

* Rename some bits to allow unity builds of libopenrct2

Some names are clashing when doing a unity build, renaming them solves
the problem.
This commit is contained in:
Michał Janiszewski
2019-08-29 23:03:56 +02:00
committed by GitHub
parent 1db18d4778
commit 8637eb6c57
9 changed files with 26 additions and 26 deletions

View File

@@ -151,7 +151,7 @@ private:
void DownloadObject(const rct_object_entry& entry, const std::string name, const std::string url)
{
using namespace OpenRCT2::Network;
using namespace OpenRCT2::Networking;
try
{
std::printf("Downloading %s\n", url.c_str());
@@ -190,7 +190,7 @@ private:
void NextDownload()
{
using namespace OpenRCT2::Network;
using namespace OpenRCT2::Networking;
if (!_downloadingObjects || _currentDownloadIndex >= _entries.size())
{

View File

@@ -100,7 +100,7 @@ namespace OpenRCT2
#endif
StdInOutConsole _stdInOutConsole;
#ifndef DISABLE_HTTP
Network::Http::Http _http;
Networking::Http::Http _http;
#endif
// Game states
@@ -721,7 +721,7 @@ namespace OpenRCT2
#ifndef DISABLE_HTTP
// Download park and open it using its temporary filename
void* data;
size_t dataSize = Network::Http::DownloadPark(gOpenRCT2StartupActionPath, &data);
size_t dataSize = Networking::Http::DownloadPark(gOpenRCT2StartupActionPath, &data);
if (dataSize == 0)
{
title_load();

View File

@@ -10,21 +10,21 @@
#include "../interface/Screenshot.h"
#include "CommandLine.hpp"
static ScreenshotOptions options;
static ScreenshotOptions _options;
// clang-format off
static constexpr const CommandLineOptionDefinition ScreenshotOptionsDef[]
{
{ CMDLINE_TYPE_INTEGER, &options.weather, NAC, "weather", "weather to be used (0 = default, 1 = sunny, ..., 6 = thunder)." },
{ CMDLINE_TYPE_SWITCH, &options.hide_guests, NAC, "no-peeps", "hide peeps" },
{ CMDLINE_TYPE_SWITCH, &options.hide_sprites, NAC, "no-sprites", "hide all sprites (e.g. balloons, vehicles, guests)" },
{ CMDLINE_TYPE_SWITCH, &options.clear_grass, NAC, "clear-grass", "set all grass to be clear of weeds" },
{ CMDLINE_TYPE_SWITCH, &options.mowed_grass, NAC, "mowed-grass", "set all grass to be mowed" },
{ CMDLINE_TYPE_SWITCH, &options.water_plants, NAC, "water-plants", "water plants for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &options.fix_vandalism, NAC, "fix-vandalism", "fix vandalism for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &options.remove_litter, NAC, "remove-litter", "remove litter for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &options.tidy_up_park, NAC, "tidy-up-park", "clear grass, water plants, fix vandalism and remove litter" },
{ CMDLINE_TYPE_SWITCH, &options.transparent, NAC, "transparent", "make the background transparent" },
{ CMDLINE_TYPE_INTEGER, &_options.weather, NAC, "weather", "weather to be used (0 = default, 1 = sunny, ..., 6 = thunder)." },
{ CMDLINE_TYPE_SWITCH, &_options.hide_guests, NAC, "no-peeps", "hide peeps" },
{ CMDLINE_TYPE_SWITCH, &_options.hide_sprites, NAC, "no-sprites", "hide all sprites (e.g. balloons, vehicles, guests)" },
{ CMDLINE_TYPE_SWITCH, &_options.clear_grass, NAC, "clear-grass", "set all grass to be clear of weeds" },
{ CMDLINE_TYPE_SWITCH, &_options.mowed_grass, NAC, "mowed-grass", "set all grass to be mowed" },
{ CMDLINE_TYPE_SWITCH, &_options.water_plants, NAC, "water-plants", "water plants for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &_options.fix_vandalism, NAC, "fix-vandalism", "fix vandalism for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &_options.remove_litter, NAC, "remove-litter", "remove litter for the screenshot" },
{ CMDLINE_TYPE_SWITCH, &_options.tidy_up_park, NAC, "tidy-up-park", "clear grass, water plants, fix vandalism and remove litter" },
{ CMDLINE_TYPE_SWITCH, &_options.transparent, NAC, "transparent", "make the background transparent" },
OptionTableEnd
};
@@ -43,7 +43,7 @@ static exitcode_t HandleScreenshot(CommandLineArgEnumerator* argEnumerator)
{
const char** argv = (const char**)argEnumerator->GetArguments() + argEnumerator->GetIndex();
int32_t argc = argEnumerator->GetCount() - argEnumerator->GetIndex();
int32_t result = cmdline_for_screenshot(argv, argc, &options);
int32_t result = cmdline_for_screenshot(argv, argc, &_options);
if (result < 0)
{
return EXITCODE_FAIL;

View File

@@ -27,7 +27,7 @@
# define OPENRCT2_USER_AGENT "OpenRCT2/" OPENRCT2_VERSION
namespace OpenRCT2::Network::Http
namespace OpenRCT2::Networking::Http
{
Http::Http()
{
@@ -221,6 +221,6 @@ namespace OpenRCT2::Network::Http
return dataSize;
}
} // namespace OpenRCT2::Network::Http
} // namespace OpenRCT2::Networking::Http
#endif

View File

@@ -17,7 +17,7 @@
# include <map>
# include <string>
namespace OpenRCT2::Network::Http
namespace OpenRCT2::Networking::Http
{
enum class Status
{
@@ -68,6 +68,6 @@ namespace OpenRCT2::Network::Http
*/
size_t DownloadPark(const char* url, void** outData);
} // namespace OpenRCT2::Network::Http
} // namespace OpenRCT2::Networking::Http
#endif // DISABLE_HTTP

View File

@@ -164,7 +164,7 @@ private:
void SendRegistration(bool forceIPv4)
{
using namespace OpenRCT2::Network;
using namespace OpenRCT2::Networking;
_lastAdvertiseTime = platform_get_ticks();
@@ -199,7 +199,7 @@ private:
void SendHeartbeat()
{
using namespace OpenRCT2::Network;
using namespace OpenRCT2::Networking;
Http::Request request;
request.url = GetMasterServerUrl();

View File

@@ -330,7 +330,7 @@ std::future<std::vector<ServerListEntry>> ServerList::FetchOnlineServerListAsync
# ifdef DISABLE_HTTP
return {};
# else
using namespace OpenRCT2::Network;
using namespace OpenRCT2::Networking;
auto p = std::make_shared<std::promise<std::vector<ServerListEntry>>>();
auto f = p->get_future();

View File

@@ -44,7 +44,7 @@ void twitch_update()
# include <vector>
using namespace OpenRCT2;
using namespace OpenRCT2::Network;
using namespace OpenRCT2::Networking;
bool gTwitchEnable = false;

View File

@@ -1295,9 +1295,9 @@ static void paint_miniature_railway_track_right_quarter_turn_3_tiles(
miniature_railway_right_quarter_turn_3_tile_track_floor, nullptr, defaultRightQuarterTurn3TilesBoundLengths,
miniature_railway_right_quarter_turn_3_tile_bound_offsets);
static constexpr const int8_t right_quarter_turn_3_tiles_sprite_map[] = { 0, -1, 1, 2 };
static constexpr const int8_t _right_quarter_turn_3_tiles_sprite_map[] = { 0, -1, 1, 2 };
int32_t index = right_quarter_turn_3_tiles_sprite_map[trackSequence];
int32_t index = _right_quarter_turn_3_tiles_sprite_map[trackSequence];
uint32_t imageId = miniature_railway_track_pieces_flat_quarter_turn_3_tiles[direction][index]
| session->TrackColours[SCHEME_TRACK];