Skip to content

Commit

Permalink
Move STR_NONE, STR_EMPTY to StringIdType.h
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronVanGeffen committed May 14, 2024
1 parent 57a6b0a commit a44e229
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/openrct2-ui/input/ShortcutInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#include <openrct2/core/String.hpp>
#include <openrct2/localisation/Formatting.h>
#include <openrct2/localisation/Localisation.h>
#include <openrct2/localisation/StringIds.h>
#include <unordered_map>

using namespace OpenRCT2;
Expand Down
1 change: 0 additions & 1 deletion src/openrct2-ui/input/ShortcutManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include <functional>
#include <memory>
#include <openrct2/core/FileSystem.hpp>
#include <openrct2/localisation/StringIds.h>
#include <optional>
#include <string>
#include <string_view>
Expand Down
1 change: 0 additions & 1 deletion src/openrct2/actions/GameActionResult.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
*****************************************************************************/
#pragma once

#include "../localisation/StringIds.h"
#include "../management/Finance.h"
#include "../world/Location.hpp"

Expand Down
1 change: 0 additions & 1 deletion src/openrct2/actions/ResultWithMessage.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
#pragma once

#include "../common.h"
#include "../localisation/StringIds.h"

struct ResultWithMessage
{
Expand Down
3 changes: 1 addition & 2 deletions src/openrct2/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#endif

#include "Diagnostic.h"
#include "localisation/StringIdType.h"

#include <cassert>
#include <cstddef>
Expand Down Expand Up @@ -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__))
Expand Down
1 change: 0 additions & 1 deletion src/openrct2/localisation/Language.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "LanguagePack.h"
#include "Localisation.h"
#include "LocalisationService.h"
#include "StringIds.h"

#include <stack>

Expand Down
1 change: 1 addition & 0 deletions src/openrct2/localisation/Localisation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
#include "Date.h"
#include "FormatCodes.h"
#include "Formatting.h"
#include "StringIds.h"

#include <cstring>

Expand Down
17 changes: 17 additions & 0 deletions src/openrct2/localisation/StringIdType.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*****************************************************************************
* 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

#include <cstdint>

using StringId = uint16_t;

constexpr StringId STR_NONE = 0xFFFF;
constexpr StringId STR_EMPTY = 0;
3 changes: 0 additions & 3 deletions src/openrct2/localisation/StringIds.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions src/openrct2/paint/tile_element/Paint.Banner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/openrct2/paint/tile_element/Paint.LargeScenery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/openrct2/paint/tile_element/Paint.Path.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/openrct2/paint/tile_element/Paint.Wall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions src/openrct2/ride/RideData.h
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a44e229

Please sign in to comment.