diff --git a/src/openrct2-ui/input/ShortcutInput.cpp b/src/openrct2-ui/input/ShortcutInput.cpp index 3df2c7466c5f..60fad93b656c 100644 --- a/src/openrct2-ui/input/ShortcutInput.cpp +++ b/src/openrct2-ui/input/ShortcutInput.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include using namespace OpenRCT2; diff --git a/src/openrct2-ui/input/ShortcutManager.h b/src/openrct2-ui/input/ShortcutManager.h index 29e63e9470ee..7612a99e298e 100644 --- a/src/openrct2-ui/input/ShortcutManager.h +++ b/src/openrct2-ui/input/ShortcutManager.h @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/openrct2/actions/GameActionResult.h b/src/openrct2/actions/GameActionResult.h index 15b17bbfd9c9..77dae0978b25 100644 --- a/src/openrct2/actions/GameActionResult.h +++ b/src/openrct2/actions/GameActionResult.h @@ -8,7 +8,6 @@ *****************************************************************************/ #pragma once -#include "../localisation/StringIds.h" #include "../management/Finance.h" #include "../world/Location.hpp" diff --git a/src/openrct2/actions/ResultWithMessage.h b/src/openrct2/actions/ResultWithMessage.h index fd01d8e6c12a..6a66e4980a58 100644 --- a/src/openrct2/actions/ResultWithMessage.h +++ b/src/openrct2/actions/ResultWithMessage.h @@ -10,7 +10,6 @@ #pragma once #include "../common.h" -#include "../localisation/StringIds.h" struct ResultWithMessage { diff --git a/src/openrct2/common.h b/src/openrct2/common.h index e3851d17b56c..c3b127d9f48f 100644 --- a/src/openrct2/common.h +++ b/src/openrct2/common.h @@ -21,6 +21,7 @@ #endif #include "Diagnostic.h" +#include "localisation/StringIdType.h" #include #include @@ -113,8 +114,6 @@ constexpr int32_t operator"" _mph(long double speedMph) return wholeNumber << 16 | ((fraction << 16) / 100000); } -using StringId = uint16_t; - #define abstract = 0 #if defined(__GNUC__) && (defined(__x86_64__) || defined(__i386__)) diff --git a/src/openrct2/localisation/Language.cpp b/src/openrct2/localisation/Language.cpp index 4114c85a649d..4bf4e9ada271 100644 --- a/src/openrct2/localisation/Language.cpp +++ b/src/openrct2/localisation/Language.cpp @@ -18,7 +18,6 @@ #include "LanguagePack.h" #include "Localisation.h" #include "LocalisationService.h" -#include "StringIds.h" #include diff --git a/src/openrct2/localisation/Localisation.cpp b/src/openrct2/localisation/Localisation.cpp index c2b65bbf7a20..8f0fc19af59c 100644 --- a/src/openrct2/localisation/Localisation.cpp +++ b/src/openrct2/localisation/Localisation.cpp @@ -20,6 +20,7 @@ #include "Date.h" #include "FormatCodes.h" #include "Formatting.h" +#include "StringIds.h" #include diff --git a/src/openrct2/localisation/StringIdType.h b/src/openrct2/localisation/StringIdType.h new file mode 100644 index 000000000000..9fba656aa990 --- /dev/null +++ b/src/openrct2/localisation/StringIdType.h @@ -0,0 +1,15 @@ +/***************************************************************************** + * Copyright (c) 2014-2024 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 + +using StringId = uint16_t; + +constexpr StringId STR_NONE = 0xFFFF; +constexpr StringId STR_EMPTY = 0; diff --git a/src/openrct2/localisation/StringIds.h b/src/openrct2/localisation/StringIds.h index 2f9ea0671f0c..82f39e674ecb 100644 --- a/src/openrct2/localisation/StringIds.h +++ b/src/openrct2/localisation/StringIds.h @@ -11,11 +11,8 @@ #include "../common.h" -constexpr StringId STR_NONE = 0xFFFF; - enum : uint16_t { - STR_EMPTY = 0, STR_RIDE_NAME_DEFAULT = 1, STR_RIDE_NAME_1D = 31, STR_RIDE_NAME_1F = 33, diff --git a/src/openrct2/paint/tile_element/Paint.Banner.cpp b/src/openrct2/paint/tile_element/Paint.Banner.cpp index 5d0e2de1beca..55462983bdfc 100644 --- a/src/openrct2/paint/tile_element/Paint.Banner.cpp +++ b/src/openrct2/paint/tile_element/Paint.Banner.cpp @@ -16,6 +16,7 @@ #include "../../localisation/Formatter.h" #include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../localisation/StringIds.h" #include "../../object/BannerObject.h" #include "../../object/ObjectEntryManager.h" #include "../../profiling/Profiling.h" diff --git a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp index f84992f69b6d..05320a6d9801 100644 --- a/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp +++ b/src/openrct2/paint/tile_element/Paint.LargeScenery.cpp @@ -18,6 +18,7 @@ #include "../../localisation/Formatter.h" #include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../localisation/StringIds.h" #include "../../object/LargeSceneryObject.h" #include "../../profiling/Profiling.h" #include "../../ride/Ride.h" diff --git a/src/openrct2/paint/tile_element/Paint.Path.cpp b/src/openrct2/paint/tile_element/Paint.Path.cpp index f29eabe920be..88718c4e756b 100644 --- a/src/openrct2/paint/tile_element/Paint.Path.cpp +++ b/src/openrct2/paint/tile_element/Paint.Path.cpp @@ -19,6 +19,7 @@ #include "../../localisation/Formatter.h" #include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../localisation/StringIds.h" #include "../../object/FootpathObject.h" #include "../../object/FootpathRailingsObject.h" #include "../../object/FootpathSurfaceObject.h" diff --git a/src/openrct2/paint/tile_element/Paint.Wall.cpp b/src/openrct2/paint/tile_element/Paint.Wall.cpp index 25b7445fb307..59037ab768f4 100644 --- a/src/openrct2/paint/tile_element/Paint.Wall.cpp +++ b/src/openrct2/paint/tile_element/Paint.Wall.cpp @@ -18,6 +18,7 @@ #include "../../interface/Viewport.h" #include "../../localisation/Formatting.h" #include "../../localisation/Localisation.h" +#include "../../localisation/StringIds.h" #include "../../object/WallSceneryEntry.h" #include "../../profiling/Profiling.h" #include "../../ride/Track.h" diff --git a/src/openrct2/ride/RideData.h b/src/openrct2/ride/RideData.h index dfb72e9d635e..18bf091ae3e1 100644 --- a/src/openrct2/ride/RideData.h +++ b/src/openrct2/ride/RideData.h @@ -23,6 +23,7 @@ #include "../common.h" #include "../core/BitSet.hpp" #include "../entity/Guest.h" +#include "../localisation/StringIds.h" #include "../sprites.h" #include "../util/Util.h" #include "Ride.h"