From fc97c8c5db9c8dca662c8246f3fcb2166a78136e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Wed, 21 Mar 2018 10:42:51 +0100 Subject: [PATCH] Reduce inclusion of header --- src/openrct2-ui/WindowManager.h | 1 - src/openrct2/Context.cpp | 1 + src/openrct2/Game.cpp | 1 + src/openrct2/Game.h | 5 ----- src/openrct2/HandleParkLoad.h | 26 ++++++++++++++++++++++++++ src/openrct2/network/network.h | 3 ++- src/openrct2/rct2/S6Exporter.h | 1 - 7 files changed, 30 insertions(+), 8 deletions(-) create mode 100644 src/openrct2/HandleParkLoad.h diff --git a/src/openrct2-ui/WindowManager.h b/src/openrct2-ui/WindowManager.h index d7a612d76c..9828776397 100644 --- a/src/openrct2-ui/WindowManager.h +++ b/src/openrct2-ui/WindowManager.h @@ -14,7 +14,6 @@ *****************************************************************************/ #pragma endregion -#include #include namespace OpenRCT2 { namespace Ui diff --git a/src/openrct2/Context.cpp b/src/openrct2/Context.cpp index 53165da744..45373c0de9 100644 --- a/src/openrct2/Context.cpp +++ b/src/openrct2/Context.cpp @@ -35,6 +35,7 @@ #include "core/Path.hpp" #include "core/String.hpp" #include "FileClassifier.h" +#include "HandleParkLoad.h" #include "network/network.h" #include "object/ObjectManager.h" #include "object/ObjectRepository.h" diff --git a/src/openrct2/Game.cpp b/src/openrct2/Game.cpp index 23878edcb1..b0f57a41d9 100644 --- a/src/openrct2/Game.cpp +++ b/src/openrct2/Game.cpp @@ -25,6 +25,7 @@ #include "Editor.h" #include "FileClassifier.h" #include "Game.h" +#include "HandleParkLoad.h" #include "Input.h" #include "interface/Screenshot.h" #include "interface/Viewport.h" diff --git a/src/openrct2/Game.h b/src/openrct2/Game.h index 0a43002077..27276b51f4 100644 --- a/src/openrct2/Game.h +++ b/src/openrct2/Game.h @@ -16,9 +16,6 @@ #pragma once -// TODO: only used by handle_park_load_failure, extract to separate header -#include - #include "common.h" struct ParkLoadResult; @@ -184,8 +181,6 @@ bool game_is_not_paused(); void save_game(); void * create_save_game_as_intent(); void save_game_as(); -void handle_park_load_failure_with_title_opt(const ParkLoadResult * result, const std::string & path, bool loadTitleFirst); -void handle_park_load_failure(const ParkLoadResult * result, const std::string & path); void game_autosave(); void game_convert_strings_to_utf8(); void game_convert_news_items_to_utf8(); diff --git a/src/openrct2/HandleParkLoad.h b/src/openrct2/HandleParkLoad.h new file mode 100644 index 0000000000..fb19dde1f8 --- /dev/null +++ b/src/openrct2/HandleParkLoad.h @@ -0,0 +1,26 @@ +#pragma region Copyright (c) 2014-2018 OpenRCT2 Developers +/***************************************************************************** + * OpenRCT2, an open source clone of Roller Coaster Tycoon 2. + * + * OpenRCT2 is the work of many authors, a full list can be found in contributors.md + * For more information, visit https://github.com/OpenRCT2/OpenRCT2 + * + * OpenRCT2 is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * A full copy of the GNU General Public License can be found in licence.txt + *****************************************************************************/ +#pragma endregion + +#pragma once + +#include + +#include "common.h" + +struct ParkLoadResult; + +void handle_park_load_failure_with_title_opt(const ParkLoadResult * result, const std::string & path, bool loadTitleFirst); +void handle_park_load_failure(const ParkLoadResult * result, const std::string & path); diff --git a/src/openrct2/network/network.h b/src/openrct2/network/network.h index 3be7cb1a88..4520f6745d 100644 --- a/src/openrct2/network/network.h +++ b/src/openrct2/network/network.h @@ -16,6 +16,8 @@ #pragma once +#include + enum { NETWORK_MODE_NONE, NETWORK_MODE_CLIENT, @@ -53,7 +55,6 @@ struct LocationXYZ16; #include #include #include -#include #include #include #include diff --git a/src/openrct2/rct2/S6Exporter.h b/src/openrct2/rct2/S6Exporter.h index 4635dc2600..67bb972c42 100644 --- a/src/openrct2/rct2/S6Exporter.h +++ b/src/openrct2/rct2/S6Exporter.h @@ -16,7 +16,6 @@ #pragma once -#include #include #include "../common.h" #include "../object/ObjectList.h"