mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-21 06:43:04 +01:00
Remove dependency on StringIds.h from Localisation.h (#22011)
* Remove dependency on StringIds.h from Localisation.h * Include Language.h in UTF8.cpp for function declarations * Rename tests/Localisation.cpp to tests/LocalisationTest.cpp
This commit is contained in:
@@ -18,7 +18,8 @@
|
||||
#include <openrct2/core/Memory.hpp>
|
||||
#include <openrct2/core/String.hpp>
|
||||
#include <openrct2/interface/InteractiveConsole.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/localisation/Language.h>
|
||||
#include <openrct2/localisation/StringIds.h>
|
||||
|
||||
#ifdef __MACOSX__
|
||||
// macOS uses COMMAND rather than CTRL for many keyboard shortcuts
|
||||
|
||||
@@ -18,7 +18,8 @@
|
||||
# include <openrct2/core/Path.hpp>
|
||||
# include <openrct2/core/String.hpp>
|
||||
# include <openrct2/core/StringBuilder.h>
|
||||
# include <openrct2/localisation/Localisation.h>
|
||||
# include <openrct2/localisation/Language.h>
|
||||
# include <openrct2/localisation/StringIds.h>
|
||||
# include <openrct2/platform/Platform.h>
|
||||
# include <openrct2/ui/UiContext.h>
|
||||
# include <sstream>
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include <openrct2/Date.h>
|
||||
#include <openrct2/localisation/Date.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/localisation/StringIds.h>
|
||||
|
||||
namespace Graph
|
||||
{
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include "Objective.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <openrct2/localisation/Date.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/ride/Ride.h>
|
||||
#include <openrct2/ride/RideData.h>
|
||||
#include <openrct2/scenario/Scenario.h>
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include <openrct2/Version.h>
|
||||
#include <openrct2/drawing/Drawing.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/localisation/LocalisationService.h>
|
||||
#include <openrct2/sprites.h>
|
||||
#include <openrct2/ui/UiContext.h>
|
||||
|
||||
|
||||
@@ -16,8 +16,8 @@
|
||||
#include <openrct2/entity/EntityRegistry.h>
|
||||
#include <openrct2/entity/Peep.h>
|
||||
#include <openrct2/entity/Staff.h>
|
||||
#include <openrct2/localisation/Date.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/management/NewsItem.h>
|
||||
#include <openrct2/peep/PeepAnimationData.h>
|
||||
#include <openrct2/sprites.h>
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
#include <openrct2/Game.h>
|
||||
#include <openrct2/GameState.h>
|
||||
#include <openrct2/actions/ParkSetResearchFundingAction.h>
|
||||
#include <openrct2/localisation/Date.h>
|
||||
#include <openrct2/localisation/Formatter.h>
|
||||
#include <openrct2/localisation/Localisation.h>
|
||||
#include <openrct2/management/Finance.h>
|
||||
#include <openrct2/management/NewsItem.h>
|
||||
#include <openrct2/management/Research.h>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#include "Config.h"
|
||||
|
||||
#include "../Context.h"
|
||||
#include "../Date.h"
|
||||
#include "../OpenRCT2.h"
|
||||
#include "../PlatformEnvironment.h"
|
||||
#include "../core/Console.hpp"
|
||||
|
||||
@@ -12,6 +12,8 @@
|
||||
#include "../config/Config.h"
|
||||
#include "../util/Util.h"
|
||||
#include "Currency.h"
|
||||
#include "Date.h"
|
||||
#include "FormatCodes.h"
|
||||
#include "Formatter.h"
|
||||
#include "Localisation.h"
|
||||
#include "StringIds.h"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "LanguagePack.h"
|
||||
#include "Localisation.h"
|
||||
#include "LocalisationService.h"
|
||||
#include "StringIds.h"
|
||||
|
||||
#include <stack>
|
||||
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
|
||||
#include "../common.h"
|
||||
#include "../drawing/Font.h"
|
||||
#include "../interface/FontFamilies.h"
|
||||
|
||||
#include <string>
|
||||
#include <string_view>
|
||||
@@ -68,8 +69,6 @@ enum class RCT2LanguageId
|
||||
End = 255
|
||||
};
|
||||
|
||||
#include "../interface/FontFamilies.h"
|
||||
|
||||
struct LanguageDescriptor
|
||||
{
|
||||
const char* locale;
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include "Language.h"
|
||||
#include "Localisation.h"
|
||||
#include "LocalisationService.h"
|
||||
#include "StringIds.h"
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
@@ -23,12 +23,13 @@
|
||||
#include "../config/Config.h"
|
||||
#include "../core/Guard.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../management/Marketing.h"
|
||||
#include "../ride/Ride.h"
|
||||
#include "../util/Util.h"
|
||||
#include "Currency.h"
|
||||
#include "Date.h"
|
||||
#include "FormatCodes.h"
|
||||
#include "Formatting.h"
|
||||
#include "Language.h"
|
||||
#include "Localisation.h"
|
||||
|
||||
#include <cmath>
|
||||
|
||||
@@ -10,10 +10,6 @@
|
||||
#pragma once
|
||||
|
||||
#include "../management/Marketing.h"
|
||||
#include "Date.h"
|
||||
#include "FormatCodes.h"
|
||||
#include "Language.h"
|
||||
#include "StringIds.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "Language.h"
|
||||
#include "Localisation.h"
|
||||
|
||||
#include <cstring>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
#include "../../core/Memory.hpp"
|
||||
#include "../../core/Path.hpp"
|
||||
#include "../../core/String.hpp"
|
||||
#include "../../localisation/Localisation.h"
|
||||
#include "../../localisation/StringIds.h"
|
||||
#include "../../platform/Platform.h"
|
||||
#include "TitleSequence.h"
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "../core/Guard.hpp"
|
||||
#include "../core/Path.hpp"
|
||||
#include "../interface/Window.h"
|
||||
#include "../localisation/Language.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "../platform/Platform.h"
|
||||
#include "../scenes/title/TitleScene.h"
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../interface/Window.h"
|
||||
#include "../localisation/FormatCodes.h"
|
||||
#include "../localisation/Formatter.h"
|
||||
#include "../localisation/Localisation.h"
|
||||
#include "../management/Finance.h"
|
||||
|
||||
@@ -19,7 +19,7 @@ set(test_files
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/IniReaderTest.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/IniWriterTest.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/LanguagePackTest.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Localisation.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/LocalisationTest.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/MultiLaunch.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Pathfinding.cpp"
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/Platform.cpp"
|
||||
|
||||
@@ -7,9 +7,8 @@
|
||||
* OpenRCT2 is licensed under the GNU General Public License version 3.
|
||||
*****************************************************************************/
|
||||
|
||||
#include "openrct2/localisation/Localisation.h"
|
||||
|
||||
#include "helpers/StringHelpers.hpp"
|
||||
#include "openrct2/localisation/Language.h"
|
||||
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
@@ -89,7 +89,7 @@
|
||||
<ClCompile Include="ImageImporterTests.cpp" />
|
||||
<ClCompile Include="IniReaderTest.cpp" />
|
||||
<ClCompile Include="IniWriterTest.cpp" />
|
||||
<ClCompile Include="Localisation.cpp" />
|
||||
<ClCompile Include="LocalisationTest.cpp" />
|
||||
<ClCompile Include="MultiLaunch.cpp" />
|
||||
<ClCompile Include="ReplayTests.cpp" />
|
||||
<ClCompile Include="PlayTests.cpp" />
|
||||
|
||||
Reference in New Issue
Block a user