mirror of https://github.com/OpenRCT2/OpenRCT2.git
Refactor includes (#6512)
* Refactor Intent.h inclusion * Use forward declaration of ITcpSocket * Remove unused include * Forward declare rct_ride_entry * Remove unused headers * Forward-declare rct_drawpixelinfo * Remove unused headers * Lower header include from header to source file * Reduce included headers * Reduce includes
This commit is contained in:
parent
814b28c814
commit
8fd2266bda
|
@ -34,6 +34,7 @@
|
|||
#include <openrct2/ride/track_paint.h>
|
||||
#include <openrct2/title/TitleScreen.h>
|
||||
#include <openrct2/util/util.h>
|
||||
#include <openrct2/windows/Intent.h>
|
||||
#include "KeyboardShortcuts.h"
|
||||
|
||||
uint8 gKeyboardShortcutChangeId;
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/core/Math.hpp>
|
||||
#include <openrct2/windows/Intent.h>
|
||||
#include <openrct2-ui/windows/Window.h>
|
||||
|
||||
#include <openrct2/localisation/localisation.h>
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/ParkImporter.h>
|
||||
#include <openrct2/network/network.h>
|
||||
#include <openrct2/windows/Intent.h>
|
||||
#include <openrct2-ui/windows/Window.h>
|
||||
|
||||
#include <openrct2/interface/chat.h>
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#pragma endregion
|
||||
|
||||
#include <openrct2/config/Config.h>
|
||||
#include <openrct2/windows/Intent.h>
|
||||
#include <openrct2-ui/windows/Window.h>
|
||||
#include <openrct2/Context.h>
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include <openrct2/title/TitleSequenceManager.h>
|
||||
#include <openrct2/title/TitleSequencePlayer.h>
|
||||
#include <openrct2/Context.h>
|
||||
#include <openrct2/windows/Intent.h>
|
||||
#include <openrct2-ui/windows/Window.h>
|
||||
|
||||
#include <openrct2/game.h>
|
||||
|
|
|
@ -57,7 +57,8 @@
|
|||
#include "interface/console.h"
|
||||
#include "interface/themes.h"
|
||||
#include "intro.h"
|
||||
#include "localisation/localisation.h"
|
||||
#include "localisation/date.h"
|
||||
#include "localisation/language.h"
|
||||
#include "network/http.h"
|
||||
#include "network/network.h"
|
||||
#include "network/twitch.h"
|
||||
|
|
|
@ -17,7 +17,16 @@
|
|||
#pragma once
|
||||
|
||||
#include "common.h"
|
||||
#include "windows/Intent.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
class Intent;
|
||||
#else
|
||||
// Allow C code to use `Intent *`
|
||||
typedef struct Intent Intent;
|
||||
#endif
|
||||
|
||||
typedef struct rct_window rct_window;
|
||||
typedef uint8 rct_windowclass;
|
||||
|
||||
typedef struct CursorState
|
||||
{
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#include "rct1.h"
|
||||
#include "ParkImporter.h"
|
||||
#include "util/util.h"
|
||||
#include "windows/Intent.h"
|
||||
#include "world/Climate.h"
|
||||
|
||||
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include "../config/Config.h"
|
||||
#include "../Context.h"
|
||||
#include "../core/Collections.hpp"
|
||||
#include "../core/File.h"
|
||||
#include "../core/FileStream.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
#ifdef __cplusplus
|
||||
|
||||
#include "../common.h"
|
||||
#include "../cmdline_sprite.h"
|
||||
|
||||
/**
|
||||
* Class for enumerating and retrieving values for a set of command line arguments.
|
||||
|
|
|
@ -14,6 +14,7 @@
|
|||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#include "../cmdline_sprite.h"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "CommandLine.hpp"
|
||||
|
|
|
@ -15,7 +15,6 @@
|
|||
#pragma endregion
|
||||
|
||||
#include "../core/Console.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../network/network.h"
|
||||
#include "../OpenRCT2.h"
|
||||
|
|
|
@ -21,7 +21,6 @@
|
|||
#include <sys/stat.h>
|
||||
#endif
|
||||
|
||||
#include "Console.hpp"
|
||||
#include "File.h"
|
||||
#include "FileStream.hpp"
|
||||
#include "String.hpp"
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include <list>
|
||||
#include "../core/Console.hpp"
|
||||
#include "../core/Guard.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../OpenRCT2.h"
|
||||
|
||||
#include "drawing.h"
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "../Context.h"
|
||||
#include "../ui/UiContext.h"
|
||||
#include "../core/Exception.hpp"
|
||||
#include "../core/Registration.hpp"
|
||||
#include "../interface/Screenshot.h"
|
||||
#include "../paint/Painter.h"
|
||||
#include "IDrawingContext.h"
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "drawing.h"
|
||||
#include "../common.h"
|
||||
|
||||
typedef struct rct_drawpixelinfo rct_drawpixelinfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
|
|
@ -18,11 +18,9 @@
|
|||
#include "../common.h"
|
||||
#include "../config/Config.h"
|
||||
#include "../Context.h"
|
||||
#include "../core/File.h"
|
||||
#include "../core/FileStream.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../core/Path.hpp"
|
||||
#include "../core/Util.hpp"
|
||||
#include "../OpenRCT2.h"
|
||||
#include "../PlatformEnvironment.h"
|
||||
#include "../sprites.h"
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
#include "../interface/viewport.h"
|
||||
#include "../interface/window.h"
|
||||
#include "../intro.h"
|
||||
#include "../platform/platform.h"
|
||||
#include "drawing.h"
|
||||
#include "lightfx.h"
|
||||
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#include "title/TitleScreen.h"
|
||||
#include "util/sawyercoding.h"
|
||||
#include "util/util.h"
|
||||
#include "windows/Intent.h"
|
||||
#include "windows/tooltip.h"
|
||||
#include "world/banner.h"
|
||||
#include "world/Climate.h"
|
||||
|
|
|
@ -16,7 +16,6 @@
|
|||
|
||||
#include <chrono>
|
||||
#include "../audio/audio.h"
|
||||
#include "../config/Config.h"
|
||||
#include "../Context.h"
|
||||
#include "../core/Console.hpp"
|
||||
#include "../Imaging.h"
|
||||
|
|
|
@ -16,7 +16,9 @@
|
|||
|
||||
#pragma once
|
||||
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../common.h"
|
||||
|
||||
typedef struct rct_drawpixelinfo rct_drawpixelinfo;
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "../core/Path.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../core/Util.hpp"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../localisation/language.h"
|
||||
#include "../localisation/string_ids.h"
|
||||
|
||||
struct WindowThemeDesc;
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
#include "../util/sawyercoding.h"
|
||||
#include "../util/util.h"
|
||||
#include "../Version.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/Climate.h"
|
||||
#include "../world/park.h"
|
||||
#include "../world/scenery.h"
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "../ride/ride_data.h"
|
||||
#include "../ride/Track.h"
|
||||
#include "../scenario/scenario.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/banner.h"
|
||||
#include "../world/footpath.h"
|
||||
#include "../world/map.h"
|
||||
|
|
|
@ -15,8 +15,6 @@
|
|||
#pragma endregion
|
||||
|
||||
#include <stack>
|
||||
#include "../core/Console.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../core/Path.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../core/StringBuilder.hpp"
|
||||
|
|
|
@ -17,11 +17,10 @@
|
|||
#include "../config/Config.h"
|
||||
#include "../core/Util.hpp"
|
||||
#include "../interface/window.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../localisation/string_ids.h"
|
||||
#include "../peep/Peep.h"
|
||||
#include "../ride/ride.h"
|
||||
#include "../scenario/scenario.h"
|
||||
#include "../world/sprite.h"
|
||||
#include "Award.h"
|
||||
#include "NewsItem.h"
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@
|
|||
#include "../OpenRCT2.h"
|
||||
#include "../ride/ride.h"
|
||||
#include "../util/util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/sprite.h"
|
||||
#include "NewsItem.h"
|
||||
|
||||
|
|
|
@ -17,7 +17,8 @@
|
|||
#pragma once
|
||||
|
||||
#include "../common.h"
|
||||
#include "../ride/ride.h"
|
||||
|
||||
typedef struct rct_ride_entry rct_ride_entry;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct rct_research_item {
|
||||
|
|
|
@ -27,8 +27,6 @@ void http_dispose() { }
|
|||
|
||||
#include "../core/Console.hpp"
|
||||
#include "../core/Math.hpp"
|
||||
#include "../core/Path.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../Version.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -60,8 +60,6 @@ static sint32 _pickup_peep_old_x = LOCATION_NULL;
|
|||
#include "../interface/window.h"
|
||||
#include "../localisation/date.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../management/Finance.h"
|
||||
#include "../network/http.h"
|
||||
#include "../scenario/scenario.h"
|
||||
#include "../util/util.h"
|
||||
#include "../cheats.h"
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
#include "NetworkTypes.h"
|
||||
#include "NetworkKey.h"
|
||||
#include "NetworkPacket.h"
|
||||
#include "TcpSocket.h"
|
||||
|
||||
interface ITcpSocket;
|
||||
class NetworkPlayer;
|
||||
struct ObjectRepositoryItem;
|
||||
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#define _OBJECT_H_
|
||||
|
||||
#include "common.h"
|
||||
#include "drawing/drawing.h"
|
||||
|
||||
// First 0xF of rct_object_entry->flags
|
||||
typedef enum
|
||||
|
|
|
@ -15,11 +15,10 @@
|
|||
#pragma endregion
|
||||
|
||||
#include "../core/IStream.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "BannerObject.h"
|
||||
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../localisation/language.h"
|
||||
|
||||
void BannerObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
#include "FootpathObject.h"
|
||||
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../localisation/language.h"
|
||||
#include "../world/footpath.h"
|
||||
|
||||
void FootpathObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
*****************************************************************************/
|
||||
#pragma endregion
|
||||
|
||||
#include "../core/Console.hpp"
|
||||
#include "../core/IStream.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../OpenRCT2.h"
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
#include "LargeSceneryObject.h"
|
||||
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../localisation/language.h"
|
||||
|
||||
LargeSceneryObject::~LargeSceneryObject()
|
||||
{
|
||||
|
|
|
@ -16,9 +16,10 @@
|
|||
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../localisation/language.h"
|
||||
#include "../localisation/string_ids.h"
|
||||
#include "Object.h"
|
||||
|
||||
#include "../localisation/localisation.h"
|
||||
|
||||
Object::Object(const rct_object_entry &entry)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
#include "../core/FileStream.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../core/MemoryStream.h"
|
||||
#include "../core/Path.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../rct12/SawyerChunkReader.h"
|
||||
#include "BannerObject.h"
|
||||
|
@ -36,7 +35,6 @@
|
|||
#include "WaterObject.h"
|
||||
|
||||
#include "../object.h"
|
||||
#include "../util/sawyercoding.h"
|
||||
|
||||
class ReadObjectContext : public IReadObjectContext
|
||||
{
|
||||
|
|
|
@ -36,6 +36,8 @@
|
|||
typedef struct Object Object;
|
||||
#endif
|
||||
|
||||
typedef struct rct_drawpixelinfo rct_drawpixelinfo;
|
||||
|
||||
typedef struct ObjectRepositoryItem
|
||||
{
|
||||
size_t Id;
|
||||
|
|
|
@ -17,16 +17,14 @@
|
|||
#include "../core/IStream.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../core/Util.hpp"
|
||||
#include "../OpenRCT2.h"
|
||||
#include "ObjectRepository.h"
|
||||
#include "RideObject.h"
|
||||
#include "../ride/RideGroupManager.h"
|
||||
|
||||
#include "../config/Config.h"
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../rct1.h"
|
||||
#include "../localisation/language.h"
|
||||
#include "../rct2.h"
|
||||
#include "../ride/ride.h"
|
||||
#include "../ride/Track.h"
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
#include "SceneryGroupObject.h"
|
||||
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../localisation/language.h"
|
||||
|
||||
SceneryGroupObject::~SceneryGroupObject()
|
||||
{
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include "SmallSceneryObject.h"
|
||||
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../localisation/language.h"
|
||||
|
||||
SmallSceneryObject::~SmallSceneryObject()
|
||||
{
|
||||
|
|
|
@ -17,12 +17,11 @@
|
|||
#include <algorithm>
|
||||
#include "../core/IStream.hpp"
|
||||
#include "../core/String.hpp"
|
||||
#include "../localisation/language.h"
|
||||
#include "../localisation/LanguagePack.h"
|
||||
#include "Object.h"
|
||||
#include "StringTable.h"
|
||||
|
||||
#include "../localisation/localisation.h"
|
||||
|
||||
static bool StringIsBlank(utf8 * str)
|
||||
{
|
||||
for (utf8 * ch = str; *ch != '\0'; ch++)
|
||||
|
|
|
@ -15,11 +15,10 @@
|
|||
#pragma endregion
|
||||
|
||||
#include "../core/IStream.hpp"
|
||||
#include "../core/Memory.hpp"
|
||||
#include "WallObject.h"
|
||||
|
||||
#include "../drawing/drawing.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../localisation/language.h"
|
||||
|
||||
void WallObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
|
||||
{
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
#pragma endregion
|
||||
|
||||
#include "../core/IStream.hpp"
|
||||
#include "../localisation/language.h"
|
||||
#include "../localisation/string_ids.h"
|
||||
#include "../OpenRCT2.h"
|
||||
#include "WaterObject.h"
|
||||
|
||||
#include "../localisation/localisation.h"
|
||||
|
||||
void WaterObject::ReadLegacy(IReadObjectContext * context, IStream * stream)
|
||||
{
|
||||
stream->Seek(14, STREAM_SEEK_CURRENT);
|
||||
|
|
|
@ -22,7 +22,6 @@
|
|||
#include "../core/Math.hpp"
|
||||
#include "map_element/map_element.h"
|
||||
#include "sprite/sprite.h"
|
||||
#include "supports.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
|
|
|
@ -26,7 +26,8 @@
|
|||
#include "../interface/chat.h"
|
||||
#include "../interface/console.h"
|
||||
#include "../intro.h"
|
||||
#include "../localisation/localisation.h"
|
||||
#include "../localisation/language.h"
|
||||
#include "../localisation/format_codes.h"
|
||||
|
||||
using namespace OpenRCT2;
|
||||
using namespace OpenRCT2::Drawing;
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include "../interface/viewport.h"
|
||||
#include "../util/sawyercoding.h"
|
||||
#include "../util/util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/scenery.h"
|
||||
#include "ride_data.h"
|
||||
#include "Track.h"
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include "../interface/viewport.h"
|
||||
#include "../interface/window.h"
|
||||
#include "../management/NewsItem.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/scenery.h"
|
||||
|
||||
using namespace OpenRCT2;
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "../localisation/localisation.h"
|
||||
#include "../interface/themes.h"
|
||||
#include "../interface/widget.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/scenery.h"
|
||||
|
||||
enum {
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "../rct1.h"
|
||||
#include "../ride/ride_data.h"
|
||||
#include "../util/util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "dropdown.h"
|
||||
#include "../sprites.h"
|
||||
#include "_legacy.h"
|
||||
|
|
|
@ -36,6 +36,7 @@
|
|||
#include "../network/twitch.h"
|
||||
#include "../peep/Staff.h"
|
||||
#include "../util/util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "../world/footpath.h"
|
||||
#include "../world/scenery.h"
|
||||
#include "dropdown.h"
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "../localisation/localisation.h"
|
||||
#include "../rct1.h"
|
||||
#include "../sprites.h"
|
||||
#include "../windows/Intent.h"
|
||||
|
||||
enum {
|
||||
WIDX_BACKGROUND,
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "../ride/track_data.h"
|
||||
#include "../scenario/scenario.h"
|
||||
#include "../util/util.h"
|
||||
#include "../windows/Intent.h"
|
||||
#include "banner.h"
|
||||
#include "Climate.h"
|
||||
#include "footpath.h"
|
||||
|
|
Loading…
Reference in New Issue