From 9c5e9f8dbce4ac2ede71bcf6ef9de36df95f360a Mon Sep 17 00:00:00 2001 From: Simon Jarrett Date: Fri, 2 Oct 2020 11:31:20 +0100 Subject: [PATCH 1/4] Replace includes of Json.hpp in header files with json_fwd.hpp --- src/openrct2/network/NetworkBase.h | 2 +- src/openrct2/network/NetworkGroup.cpp | 1 + src/openrct2/network/NetworkGroup.h | 2 +- src/openrct2/network/NetworkUser.cpp | 1 + src/openrct2/network/NetworkUser.h | 4 +++- src/openrct2/network/ServerList.h | 4 +++- src/openrct2/network/network.h | 4 +++- src/openrct2/object/BannerObject.cpp | 1 + src/openrct2/object/EntranceObject.cpp | 1 + src/openrct2/object/FootpathItemObject.cpp | 1 + src/openrct2/object/ImageTable.cpp | 1 + src/openrct2/object/ImageTable.h | 4 +++- src/openrct2/object/LargeSceneryObject.cpp | 1 + src/openrct2/object/Object.h | 3 ++- src/openrct2/object/RideObject.cpp | 1 + src/openrct2/object/RideObject.h | 2 +- src/openrct2/object/SceneryGroupObject.cpp | 1 + src/openrct2/object/SmallSceneryObject.cpp | 1 + src/openrct2/object/StationObject.cpp | 1 + src/openrct2/object/StringTable.cpp | 1 + src/openrct2/object/StringTable.h | 4 +++- src/openrct2/object/TerrainEdgeObject.cpp | 1 + src/openrct2/object/TerrainSurfaceObject.cpp | 1 + src/openrct2/object/WallObject.cpp | 1 + src/openrct2/object/WaterObject.cpp | 1 + 25 files changed, 36 insertions(+), 9 deletions(-) diff --git a/src/openrct2/network/NetworkBase.h b/src/openrct2/network/NetworkBase.h index 113e9f0056..2156216580 100644 --- a/src/openrct2/network/NetworkBase.h +++ b/src/openrct2/network/NetworkBase.h @@ -1,7 +1,6 @@ #pragma once #include "../actions/GameAction.h" -#include "../core/Json.hpp" #include "NetworkConnection.h" #include "NetworkGroup.h" #include "NetworkPlayer.h" @@ -10,6 +9,7 @@ #include "NetworkUser.h" #include +#include #ifndef DISABLE_NETWORK diff --git a/src/openrct2/network/NetworkGroup.cpp b/src/openrct2/network/NetworkGroup.cpp index 4f5b4e7419..38e24d6647 100644 --- a/src/openrct2/network/NetworkGroup.cpp +++ b/src/openrct2/network/NetworkGroup.cpp @@ -11,6 +11,7 @@ # include "NetworkGroup.h" +# include "../openrct2/core/Json.hpp" # include "NetworkAction.h" # include "NetworkTypes.h" diff --git a/src/openrct2/network/NetworkGroup.h b/src/openrct2/network/NetworkGroup.h index bc84e7dc02..1384b1e85e 100644 --- a/src/openrct2/network/NetworkGroup.h +++ b/src/openrct2/network/NetworkGroup.h @@ -10,10 +10,10 @@ #pragma once #include "../common.h" -#include "../core/Json.hpp" #include "NetworkPacket.h" #include +#include #include enum class NetworkPermission : uint32_t; diff --git a/src/openrct2/network/NetworkUser.cpp b/src/openrct2/network/NetworkUser.cpp index a8c176d371..b1275b3810 100644 --- a/src/openrct2/network/NetworkUser.cpp +++ b/src/openrct2/network/NetworkUser.cpp @@ -13,6 +13,7 @@ # include "../core/Console.hpp" # include "../core/Guard.hpp" +# include "../core/Json.hpp" # include "../core/Path.hpp" # include "../core/String.hpp" # include "../platform/Platform2.h" diff --git a/src/openrct2/network/NetworkUser.h b/src/openrct2/network/NetworkUser.h index cd4e331267..0368bed2c9 100644 --- a/src/openrct2/network/NetworkUser.h +++ b/src/openrct2/network/NetworkUser.h @@ -10,12 +10,14 @@ #pragma once #include "../common.h" -#include "../core/Json.hpp" #include "../core/Nullable.hpp" #include +#include #include +using json_t = nlohmann::json; + class NetworkUser final { public: diff --git a/src/openrct2/network/ServerList.h b/src/openrct2/network/ServerList.h index d4c1109557..7c7339ae8b 100644 --- a/src/openrct2/network/ServerList.h +++ b/src/openrct2/network/ServerList.h @@ -10,14 +10,16 @@ #pragma once #include "../common.h" -#include "../core/Json.hpp" #include +#include #include #include #include #include +using json_t = nlohmann::json; + struct INetworkEndpoint; struct ServerListEntry diff --git a/src/openrct2/network/network.h b/src/openrct2/network/network.h index fbfa0dc24f..84a4a8937c 100644 --- a/src/openrct2/network/network.h +++ b/src/openrct2/network/network.h @@ -15,14 +15,16 @@ #define MAX_SERVER_DESCRIPTION_LENGTH 256 #include "../common.h" -#include "../core/Json.hpp" #include "../localisation/StringIds.h" #include "NetworkTypes.h" #include +#include #include #include +using json_t = nlohmann::json; + struct GameAction; struct Peep; struct CoordsXYZ; diff --git a/src/openrct2/object/BannerObject.cpp b/src/openrct2/object/BannerObject.cpp index d756b2f568..1f38f470c1 100644 --- a/src/openrct2/object/BannerObject.cpp +++ b/src/openrct2/object/BannerObject.cpp @@ -10,6 +10,7 @@ #include "BannerObject.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../drawing/Drawing.h" #include "../localisation/Language.h" #include "../object/Object.h" diff --git a/src/openrct2/object/EntranceObject.cpp b/src/openrct2/object/EntranceObject.cpp index 974917bbb1..9bbb92f3f0 100644 --- a/src/openrct2/object/EntranceObject.cpp +++ b/src/openrct2/object/EntranceObject.cpp @@ -10,6 +10,7 @@ #include "EntranceObject.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../core/String.hpp" #include "../drawing/Drawing.h" #include "../localisation/Localisation.h" diff --git a/src/openrct2/object/FootpathItemObject.cpp b/src/openrct2/object/FootpathItemObject.cpp index e3352db258..bc486f0634 100644 --- a/src/openrct2/object/FootpathItemObject.cpp +++ b/src/openrct2/object/FootpathItemObject.cpp @@ -10,6 +10,7 @@ #include "FootpathItemObject.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../drawing/Drawing.h" #include "../interface/Cursors.h" #include "../localisation/Localisation.h" diff --git a/src/openrct2/object/ImageTable.cpp b/src/openrct2/object/ImageTable.cpp index b755b97a71..eea338f3f6 100644 --- a/src/openrct2/object/ImageTable.cpp +++ b/src/openrct2/object/ImageTable.cpp @@ -15,6 +15,7 @@ #include "../core/File.h" #include "../core/FileScanner.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../core/Path.hpp" #include "../core/String.hpp" #include "../drawing/ImageImporter.h" diff --git a/src/openrct2/object/ImageTable.h b/src/openrct2/object/ImageTable.h index 7499a305ef..aa1cecda55 100644 --- a/src/openrct2/object/ImageTable.h +++ b/src/openrct2/object/ImageTable.h @@ -10,12 +10,14 @@ #pragma once #include "../common.h" -#include "../core/Json.hpp" #include "../drawing/Drawing.h" #include +#include #include +using json_t = nlohmann::json; + struct IReadObjectContext; namespace OpenRCT2 { diff --git a/src/openrct2/object/LargeSceneryObject.cpp b/src/openrct2/object/LargeSceneryObject.cpp index 3ab667c39d..5aaf856d55 100644 --- a/src/openrct2/object/LargeSceneryObject.cpp +++ b/src/openrct2/object/LargeSceneryObject.cpp @@ -22,6 +22,7 @@ #include #include +#include void LargeSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* stream) { diff --git a/src/openrct2/object/Object.h b/src/openrct2/object/Object.h index 767929f681..57140967ef 100644 --- a/src/openrct2/object/Object.h +++ b/src/openrct2/object/Object.h @@ -10,15 +10,16 @@ #pragma once #include "../common.h" -#include "../core/Json.hpp" #include "ImageTable.h" #include "StringTable.h" #include +#include #include #include #include +using json_t = nlohmann::json; using ObjectEntryIndex = uint16_t; constexpr const ObjectEntryIndex OBJECT_ENTRY_INDEX_NULL = std::numeric_limits::max(); diff --git a/src/openrct2/object/RideObject.cpp b/src/openrct2/object/RideObject.cpp index 9955f0616e..2944d9aff0 100644 --- a/src/openrct2/object/RideObject.cpp +++ b/src/openrct2/object/RideObject.cpp @@ -14,6 +14,7 @@ #include "../OpenRCT2.h" #include "../audio/audio.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../core/Memory.hpp" #include "../core/String.hpp" #include "../drawing/Drawing.h" diff --git a/src/openrct2/object/RideObject.h b/src/openrct2/object/RideObject.h index c2217259bd..5a41a67187 100644 --- a/src/openrct2/object/RideObject.h +++ b/src/openrct2/object/RideObject.h @@ -10,10 +10,10 @@ #pragma once #include "../core/IStream.hpp" -#include "../core/Json.hpp" #include "../ride/Ride.h" #include "Object.h" +#include #include class RideObject final : public Object diff --git a/src/openrct2/object/SceneryGroupObject.cpp b/src/openrct2/object/SceneryGroupObject.cpp index 5936bb0296..341e77c2d6 100644 --- a/src/openrct2/object/SceneryGroupObject.cpp +++ b/src/openrct2/object/SceneryGroupObject.cpp @@ -13,6 +13,7 @@ #include "../Context.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../core/Memory.hpp" #include "../core/String.hpp" #include "../drawing/Drawing.h" diff --git a/src/openrct2/object/SmallSceneryObject.cpp b/src/openrct2/object/SmallSceneryObject.cpp index 9cef4276f1..06f20c08e1 100644 --- a/src/openrct2/object/SmallSceneryObject.cpp +++ b/src/openrct2/object/SmallSceneryObject.cpp @@ -12,6 +12,7 @@ #include "SmallSceneryObject.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../core/Memory.hpp" #include "../core/String.hpp" #include "../drawing/Drawing.h" diff --git a/src/openrct2/object/StationObject.cpp b/src/openrct2/object/StationObject.cpp index 2b8c37c938..e64f040a8e 100644 --- a/src/openrct2/object/StationObject.cpp +++ b/src/openrct2/object/StationObject.cpp @@ -10,6 +10,7 @@ #include "StationObject.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../core/String.hpp" #include "../drawing/Drawing.h" #include "../localisation/Localisation.h" diff --git a/src/openrct2/object/StringTable.cpp b/src/openrct2/object/StringTable.cpp index 1994cd9f1f..0293208678 100644 --- a/src/openrct2/object/StringTable.cpp +++ b/src/openrct2/object/StringTable.cpp @@ -10,6 +10,7 @@ #include "StringTable.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../core/String.hpp" #include "../localisation/Language.h" #include "../localisation/LanguagePack.h" diff --git a/src/openrct2/object/StringTable.h b/src/openrct2/object/StringTable.h index 9f75b3a0ed..bf8b442327 100644 --- a/src/openrct2/object/StringTable.h +++ b/src/openrct2/object/StringTable.h @@ -10,12 +10,14 @@ #pragma once #include "../common.h" -#include "../core/Json.hpp" #include "../localisation/Language.h" +#include #include #include +using json_t = nlohmann::json; + struct IReadObjectContext; namespace OpenRCT2 { diff --git a/src/openrct2/object/TerrainEdgeObject.cpp b/src/openrct2/object/TerrainEdgeObject.cpp index 77ca225822..3e26972f03 100644 --- a/src/openrct2/object/TerrainEdgeObject.cpp +++ b/src/openrct2/object/TerrainEdgeObject.cpp @@ -10,6 +10,7 @@ #include "TerrainEdgeObject.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../core/String.hpp" #include "../drawing/Drawing.h" #include "../localisation/Localisation.h" diff --git a/src/openrct2/object/TerrainSurfaceObject.cpp b/src/openrct2/object/TerrainSurfaceObject.cpp index cfba7585c9..2c67cf9963 100644 --- a/src/openrct2/object/TerrainSurfaceObject.cpp +++ b/src/openrct2/object/TerrainSurfaceObject.cpp @@ -12,6 +12,7 @@ #include "TerrainSurfaceObject.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../core/String.hpp" #include "../drawing/Drawing.h" #include "../localisation/Localisation.h" diff --git a/src/openrct2/object/WallObject.cpp b/src/openrct2/object/WallObject.cpp index 7fbe8453d6..989bdf6dc1 100644 --- a/src/openrct2/object/WallObject.cpp +++ b/src/openrct2/object/WallObject.cpp @@ -10,6 +10,7 @@ #include "WallObject.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../core/String.hpp" #include "../drawing/Drawing.h" #include "../interface/Cursors.h" diff --git a/src/openrct2/object/WaterObject.cpp b/src/openrct2/object/WaterObject.cpp index 69df434eb9..1a475c3101 100644 --- a/src/openrct2/object/WaterObject.cpp +++ b/src/openrct2/object/WaterObject.cpp @@ -13,6 +13,7 @@ #include "../OpenRCT2.h" #include "../core/IStream.hpp" +#include "../core/Json.hpp" #include "../localisation/Language.h" #include "../localisation/StringIds.h" #include "../world/Location.hpp" From 134371f03cd35d3e1a7ea96de920b9cac9446b9d Mon Sep 17 00:00:00 2001 From: Simon Jarrett Date: Sat, 3 Oct 2020 17:11:50 +0100 Subject: [PATCH 2/4] Change includes of nlohmann/json_fwd.hpp to new core/JsonFwd.hpp --- src/openrct2/core/JsonFwd.hpp | 14 ++++++++++++++ src/openrct2/libopenrct2.vcxproj | 1 + src/openrct2/network/NetworkBase.cpp | 2 +- src/openrct2/network/NetworkBase.h | 1 - src/openrct2/network/NetworkGroup.h | 1 - src/openrct2/network/NetworkUser.h | 4 +--- src/openrct2/network/ServerList.h | 4 +--- src/openrct2/network/network.h | 4 +--- src/openrct2/object/ImageTable.h | 4 +--- src/openrct2/object/LargeSceneryObject.cpp | 1 - src/openrct2/object/Object.h | 3 +-- src/openrct2/object/RideObject.h | 1 - src/openrct2/object/StringTable.h | 4 +--- 13 files changed, 22 insertions(+), 22 deletions(-) create mode 100644 src/openrct2/core/JsonFwd.hpp diff --git a/src/openrct2/core/JsonFwd.hpp b/src/openrct2/core/JsonFwd.hpp new file mode 100644 index 0000000000..37410d3098 --- /dev/null +++ b/src/openrct2/core/JsonFwd.hpp @@ -0,0 +1,14 @@ +/***************************************************************************** + * Copyright (c) 2014-2020 OpenRCT2 developers + * + * For a complete list of all authors, please refer to contributors.md + * Interested in contributing? Visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is licensed under the GNU General Public License version 3. + *****************************************************************************/ + +#pragma once + +#include + +using json_t = nlohmann::json; diff --git a/src/openrct2/libopenrct2.vcxproj b/src/openrct2/libopenrct2.vcxproj index 2a36a0f165..762f7cf5c6 100644 --- a/src/openrct2/libopenrct2.vcxproj +++ b/src/openrct2/libopenrct2.vcxproj @@ -169,6 +169,7 @@ + diff --git a/src/openrct2/network/NetworkBase.cpp b/src/openrct2/network/NetworkBase.cpp index 5efee10074..8cbb7e8191 100644 --- a/src/openrct2/network/NetworkBase.cpp +++ b/src/openrct2/network/NetworkBase.cpp @@ -18,6 +18,7 @@ #include "../actions/NetworkModifyGroupAction.hpp" #include "../actions/PeepPickupAction.hpp" #include "../core/Guard.hpp" +#include "../core/Json.hpp" #include "../platform/Platform2.h" #include "../scripting/ScriptEngine.h" #include "../ui/UiContext.h" @@ -52,7 +53,6 @@ static constexpr uint32_t CHUNK_SIZE = 1024 * 63; # include "../config/Config.h" # include "../core/Console.hpp" # include "../core/FileStream.hpp" -# include "../core/Json.hpp" # include "../core/MemoryStream.h" # include "../core/Nullable.hpp" # include "../core/Path.hpp" diff --git a/src/openrct2/network/NetworkBase.h b/src/openrct2/network/NetworkBase.h index 2156216580..f4fe6546e9 100644 --- a/src/openrct2/network/NetworkBase.h +++ b/src/openrct2/network/NetworkBase.h @@ -9,7 +9,6 @@ #include "NetworkUser.h" #include -#include #ifndef DISABLE_NETWORK diff --git a/src/openrct2/network/NetworkGroup.h b/src/openrct2/network/NetworkGroup.h index 1384b1e85e..92533cb0ae 100644 --- a/src/openrct2/network/NetworkGroup.h +++ b/src/openrct2/network/NetworkGroup.h @@ -13,7 +13,6 @@ #include "NetworkPacket.h" #include -#include #include enum class NetworkPermission : uint32_t; diff --git a/src/openrct2/network/NetworkUser.h b/src/openrct2/network/NetworkUser.h index 0368bed2c9..4cb750dd1d 100644 --- a/src/openrct2/network/NetworkUser.h +++ b/src/openrct2/network/NetworkUser.h @@ -10,14 +10,12 @@ #pragma once #include "../common.h" +#include "../core/JsonFwd.hpp" #include "../core/Nullable.hpp" #include -#include #include -using json_t = nlohmann::json; - class NetworkUser final { public: diff --git a/src/openrct2/network/ServerList.h b/src/openrct2/network/ServerList.h index 7c7339ae8b..803d6b4abc 100644 --- a/src/openrct2/network/ServerList.h +++ b/src/openrct2/network/ServerList.h @@ -10,16 +10,14 @@ #pragma once #include "../common.h" +#include "../core/JsonFwd.hpp" #include -#include #include #include #include #include -using json_t = nlohmann::json; - struct INetworkEndpoint; struct ServerListEntry diff --git a/src/openrct2/network/network.h b/src/openrct2/network/network.h index 84a4a8937c..3bbcd5a9f7 100644 --- a/src/openrct2/network/network.h +++ b/src/openrct2/network/network.h @@ -15,16 +15,14 @@ #define MAX_SERVER_DESCRIPTION_LENGTH 256 #include "../common.h" +#include "../core/JsonFwd.hpp" #include "../localisation/StringIds.h" #include "NetworkTypes.h" #include -#include #include #include -using json_t = nlohmann::json; - struct GameAction; struct Peep; struct CoordsXYZ; diff --git a/src/openrct2/object/ImageTable.h b/src/openrct2/object/ImageTable.h index aa1cecda55..acd6aeea0d 100644 --- a/src/openrct2/object/ImageTable.h +++ b/src/openrct2/object/ImageTable.h @@ -10,14 +10,12 @@ #pragma once #include "../common.h" +#include "../core/JsonFwd.hpp" #include "../drawing/Drawing.h" #include -#include #include -using json_t = nlohmann::json; - struct IReadObjectContext; namespace OpenRCT2 { diff --git a/src/openrct2/object/LargeSceneryObject.cpp b/src/openrct2/object/LargeSceneryObject.cpp index 5aaf856d55..3ab667c39d 100644 --- a/src/openrct2/object/LargeSceneryObject.cpp +++ b/src/openrct2/object/LargeSceneryObject.cpp @@ -22,7 +22,6 @@ #include #include -#include void LargeSceneryObject::ReadLegacy(IReadObjectContext* context, OpenRCT2::IStream* stream) { diff --git a/src/openrct2/object/Object.h b/src/openrct2/object/Object.h index 57140967ef..b029ffb38c 100644 --- a/src/openrct2/object/Object.h +++ b/src/openrct2/object/Object.h @@ -10,16 +10,15 @@ #pragma once #include "../common.h" +#include "../core/JsonFwd.hpp" #include "ImageTable.h" #include "StringTable.h" #include -#include #include #include #include -using json_t = nlohmann::json; using ObjectEntryIndex = uint16_t; constexpr const ObjectEntryIndex OBJECT_ENTRY_INDEX_NULL = std::numeric_limits::max(); diff --git a/src/openrct2/object/RideObject.h b/src/openrct2/object/RideObject.h index 5a41a67187..3ad1dd15c1 100644 --- a/src/openrct2/object/RideObject.h +++ b/src/openrct2/object/RideObject.h @@ -13,7 +13,6 @@ #include "../ride/Ride.h" #include "Object.h" -#include #include class RideObject final : public Object diff --git a/src/openrct2/object/StringTable.h b/src/openrct2/object/StringTable.h index bf8b442327..7ef420a26d 100644 --- a/src/openrct2/object/StringTable.h +++ b/src/openrct2/object/StringTable.h @@ -10,14 +10,12 @@ #pragma once #include "../common.h" +#include "../core/JsonFwd.hpp" #include "../localisation/Language.h" -#include #include #include -using json_t = nlohmann::json; - struct IReadObjectContext; namespace OpenRCT2 { From ccb47e4a3622291752692b0b49241432a95c39cf Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Mon, 5 Oct 2020 14:47:44 +0200 Subject: [PATCH 3/4] Update CI to use new 0.3.1 Docker images --- .github/workflows/ci.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d768fc727f..1339939c4e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,7 +25,7 @@ jobs: name: Check code formatting runs-on: ubuntu-latest container: - image: openrct2/openrct2-build:0.3.0-format + image: openrct2/openrct2-build:0.3.1-format steps: - name: Checkout uses: actions/checkout@v1 @@ -81,7 +81,7 @@ jobs: runs-on: ubuntu-latest needs: [check-code-formatting] container: - image: openrct2/openrct2-build:0.3.0-mingw + image: openrct2/openrct2-build:0.3.1-mingw steps: - name: Checkout uses: actions/checkout@v2 @@ -96,7 +96,7 @@ jobs: runs-on: ubuntu-latest needs: [check-code-formatting] container: - image: openrct2/openrct2-build:0.3.0-mingw + image: openrct2/openrct2-build:0.3.1-mingw steps: - name: Checkout uses: actions/checkout@v2 @@ -145,7 +145,7 @@ jobs: runs-on: ubuntu-latest needs: [check-code-formatting] container: - image: openrct2/openrct2-build:0.3.0-bionic + image: openrct2/openrct2-build:0.3.1-bionic steps: - name: Checkout uses: actions/checkout@v1 @@ -180,7 +180,7 @@ jobs: runs-on: ubuntu-latest needs: [check-code-formatting] container: - image: openrct2/openrct2-build:0.3.0-bionic32 + image: openrct2/openrct2-build:0.3.1-bionic32 steps: - name: Checkout uses: actions/checkout@v1 @@ -220,7 +220,7 @@ jobs: runs-on: ubuntu-latest needs: [check-code-formatting] container: - image: openrct2/openrct2-build:0.3.0-bionic + image: openrct2/openrct2-build:0.3.1-bionic steps: - name: Checkout uses: actions/checkout@v1 @@ -278,7 +278,7 @@ jobs: runs-on: ubuntu-latest needs: [check-code-formatting] container: - image: openrct2/openrct2-build:0.3.0-bionic + image: openrct2/openrct2-build:0.3.1-bionic steps: - name: Checkout uses: actions/checkout@v1 @@ -290,7 +290,7 @@ jobs: runs-on: ubuntu-latest needs: [check-code-formatting] container: - image: openrct2/openrct2-build:0.3.0-android + image: openrct2/openrct2-build:0.3.1-android steps: - name: Checkout uses: actions/checkout@v1 From 0ad7e9787ece7edf20ac3d4affd076c963a51949 Mon Sep 17 00:00:00 2001 From: Aaron van Geffen Date: Mon, 5 Oct 2020 15:34:50 +0200 Subject: [PATCH 4/4] Add JsonFwd.hpp to the Xcode project --- OpenRCT2.xcodeproj/project.pbxproj | 10 +++++++++- src/openrct2/interface/Colour.cpp | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/OpenRCT2.xcodeproj/project.pbxproj b/OpenRCT2.xcodeproj/project.pbxproj index 221351d711..421d8ca956 100644 --- a/OpenRCT2.xcodeproj/project.pbxproj +++ b/OpenRCT2.xcodeproj/project.pbxproj @@ -74,6 +74,8 @@ 932A211E22D73CFA00C57EDB /* GameActionCompat.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 932A20CF22D73CEE00C57EDB /* GameActionCompat.cpp */; }; 932A211F22D73CFA00C57EDB /* GameActionRegistration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 932A20D322D73CEF00C57EDB /* GameActionRegistration.cpp */; }; 932A212022D73CFA00C57EDB /* GameAction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 932A211C22D73CFA00C57EDB /* GameAction.cpp */; }; + 93378D01252B4F550077D2D8 /* JsonFwd.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 93378D00252B4F550077D2D8 /* JsonFwd.hpp */; }; + 93378D03252B54140077D2D8 /* json_fwd.hpp in Headers */ = {isa = PBXBuildFile; fileRef = 93378D02252B54140077D2D8 /* json_fwd.hpp */; }; 933C55B524B858490057E64B /* SeaDecrypt.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 933C55B424B858490057E64B /* SeaDecrypt.cpp */; }; 933CBDB520CB1ACD00134678 /* Widget.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 933CBDB120CB1ACC00134678 /* Widget.cpp */; }; 933CBDB620CB1ACD00134678 /* Theme.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 933CBDB220CB1ACD00134678 /* Theme.cpp */; }; @@ -1064,6 +1066,8 @@ 932A211B22D73CFA00C57EDB /* TrackSetBrakeSpeedAction.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = TrackSetBrakeSpeedAction.hpp; sourceTree = ""; }; 932A211C22D73CFA00C57EDB /* GameAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = GameAction.cpp; sourceTree = ""; }; 932A211D22D73CFA00C57EDB /* LargeSceneryRemoveAction.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = LargeSceneryRemoveAction.hpp; sourceTree = ""; }; + 93378D00252B4F550077D2D8 /* JsonFwd.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; path = JsonFwd.hpp; sourceTree = ""; }; + 93378D02252B54140077D2D8 /* json_fwd.hpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = json_fwd.hpp; path = "build/json-3.9.1/include/nlohmann/json_fwd.hpp"; sourceTree = SOURCE_ROOT; }; 933C55B424B858490057E64B /* SeaDecrypt.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SeaDecrypt.cpp; sourceTree = ""; }; 933CBDB120CB1ACC00134678 /* Widget.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Widget.cpp; sourceTree = ""; }; 933CBDB220CB1ACD00134678 /* Theme.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Theme.cpp; sourceTree = ""; }; @@ -2263,6 +2267,7 @@ isa = PBXGroup; children = ( 93FB271E24ED32B7008241C9 /* json.hpp */, + 93378D02252B54140077D2D8 /* json_fwd.hpp */, ); name = nlohmann; path = libxc/include/nlohmann; @@ -2831,6 +2836,7 @@ 2ADE2F25224418B2002598AF /* JobPool.hpp */, F76C83881EC4E7CC00FA49E2 /* Json.cpp */, F76C83891EC4E7CC00FA49E2 /* Json.hpp */, + 93378D00252B4F550077D2D8 /* JsonFwd.hpp */, F76C838B1EC4E7CC00FA49E2 /* Memory.hpp */, F76C838C1EC4E7CC00FA49E2 /* MemoryStream.cpp */, F76C838D1EC4E7CC00FA49E2 /* MemoryStream.h */, @@ -3670,6 +3676,7 @@ 93DFD05524521C1A001FCBAF /* ScMap.hpp in Headers */, 9308DA04209908090079EE96 /* TileElement.h in Headers */, C67B28152002D67A00109C93 /* Widget.h in Headers */, + 93378D01252B4F550077D2D8 /* JsonFwd.hpp in Headers */, C6352B851F477022006CCEE3 /* DataSerialiserTraits.h in Headers */, 93DFD05124521C1A001FCBAF /* ScContext.hpp in Headers */, 939A359F20C12FDE00630B3F /* Paint.Surface.h in Headers */, @@ -3686,6 +3693,7 @@ 93DFD04A24521C1A001FCBAF /* ScConfiguration.hpp in Headers */, 93CBA4CC20A7504500867D56 /* ImageImporter.h in Headers */, 2ADE2F29224418B2002598AF /* Numerics.hpp in Headers */, + 93378D03252B54140077D2D8 /* json_fwd.hpp in Headers */, 93DFD04924521C1A001FCBAF /* ScTile.hpp in Headers */, 936F412B24CE030F00E07BCF /* NetworkBase.h in Headers */, 93DFD04524521C1A001FCBAF /* ScObject.hpp in Headers */, @@ -3889,7 +3897,7 @@ ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "version=\"25\"\nzipname=\"openrct2-libs-v25-x64-macos-dylibs.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\nmkdir \"${SRCROOT}/libxc\"\n\ncurl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\nrm \"${SRCROOT}/libxc/$zipname\"\n\necho $version > \"${SRCROOT}/libversion\"\nfi\n"; + shellScript = "version=\"26\"\nzipname=\"openrct2-libs-v26-x64-macos-dylibs.zip\"\nliburl=\"https://github.com/OpenRCT2/Dependencies/releases/download/v$version/$zipname\"\n\n[[ ! -d \"${SRCROOT}/libxc\" || ! -e \"${SRCROOT}/libversion\" || $(head -n 1 \"${SRCROOT}/libversion\") != $version ]]\noutdated=$?\n\nif [[ $outdated -eq 0 ]]; then\nif [[ -d \"${SRCROOT}/libxc\" ]]; then rm -r \"${SRCROOT}/libxc\"; fi\nmkdir \"${SRCROOT}/libxc\"\n\ncurl -L -o \"${SRCROOT}/libxc/$zipname\" \"$liburl\"\nunzip -uaq -d \"${SRCROOT}/libxc\" \"${SRCROOT}/libxc/$zipname\"\nrm \"${SRCROOT}/libxc/$zipname\"\n\necho $version > \"${SRCROOT}/libversion\"\nfi\n"; }; D42C09D21C254F4E00309751 /* Build g2.dat */ = { isa = PBXShellScriptBuildPhase; diff --git a/src/openrct2/interface/Colour.cpp b/src/openrct2/interface/Colour.cpp index 5c37dea329..bd1dccb19f 100644 --- a/src/openrct2/interface/Colour.cpp +++ b/src/openrct2/interface/Colour.cpp @@ -14,6 +14,7 @@ #include #include +#include rct_colour_map ColourMapA[COLOUR_COUNT] = {};