From 1ae2ca54f72a48b1f56aac9ac7fab9c5f3dea43e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Janiszewski?= Date: Thu, 1 Dec 2016 15:05:00 +0100 Subject: [PATCH] Sort includes --- src/audio/audio.c | 9 ++++---- src/audio/mixer.cpp | 2 +- src/cmdline/ConvertCommand.cpp | 2 +- src/core/Memory.hpp | 4 ++-- src/drawing/drawing.c | 6 ++--- src/drawing/engines/SoftwareDrawingEngine.cpp | 2 +- src/drawing/sprite.c | 3 --- src/drawing/string.c | 5 ----- src/input.c | 2 +- src/interface/Fonts.cpp | 2 +- src/interface/chat.c | 4 ++-- src/interface/console.c | 22 +++++++++---------- src/interface/title_sequences.c | 6 ++--- src/interface/viewport.c | 10 ++++----- src/intro.c | 2 +- src/localisation/language.cpp | 2 +- src/management/news_item.c | 2 +- src/network/twitch.cpp | 2 +- src/paint/map_element/surface.c | 2 +- src/peep/peep.c | 2 +- src/platform/shared.c | 2 +- src/ride/ride_ratings.c | 2 +- src/windows/clear_scenery.c | 6 ++--- src/windows/debug_paint.c | 10 ++++----- src/windows/dropdown.c | 2 +- src/windows/editor_objective_options.c | 4 ++-- src/windows/editor_scenario_options.c | 8 +++---- src/windows/footpath.c | 12 +++++----- src/windows/game_bottom_toolbar.c | 2 +- src/windows/land.c | 4 ++-- src/windows/land_rights.c | 8 +++---- src/windows/map.c | 6 ++--- src/world/climate.c | 4 ++-- src/world/footpath.c | 6 +---- 34 files changed, 77 insertions(+), 90 deletions(-) diff --git a/src/audio/audio.c b/src/audio/audio.c index b255e6532e..feb247257e 100644 --- a/src/audio/audio.c +++ b/src/audio/audio.c @@ -16,14 +16,13 @@ #include "../config.h" #include "../interface/viewport.h" +#include "../intro.h" #include "../localisation/language.h" -#include "audio.h" -#include "mixer.h" +#include "../localisation/string_ids.h" #include "../openrct2.h" #include "../util/util.h" -#include "../localisation/string_ids.h" -#include "../intro.h" -#include "../rct2.h" +#include "audio.h" +#include "mixer.h" typedef struct rct_audio_params { bool in_range; diff --git a/src/audio/mixer.cpp b/src/audio/mixer.cpp index 859ae66a77..3a54f51cc4 100644 --- a/src/audio/mixer.cpp +++ b/src/audio/mixer.cpp @@ -17,9 +17,9 @@ #include "../core/Guard.hpp" extern "C" { #include "../config.h" - #include "../platform/platform.h" #include "../localisation/localisation.h" #include "../openrct2.h" + #include "../platform/platform.h" #include "../rct2.h" #include "audio.h" } diff --git a/src/cmdline/ConvertCommand.cpp b/src/cmdline/ConvertCommand.cpp index b0a4bfde41..526d3e8a85 100644 --- a/src/cmdline/ConvertCommand.cpp +++ b/src/cmdline/ConvertCommand.cpp @@ -25,9 +25,9 @@ extern "C" { #include "../game.h" + #include "../interface/window.h" #include "../openrct2.h" #include "../rct2.h" - #include "../interface/window.h" } static void WriteConvertFromAndToMessage(uint32 sourceFileType, uint32 destinationFileType); diff --git a/src/core/Memory.hpp b/src/core/Memory.hpp index 62b1e523ae..168851ff44 100644 --- a/src/core/Memory.hpp +++ b/src/core/Memory.hpp @@ -16,10 +16,10 @@ #pragma once +#include +#include #include "../common.h" #include "Guard.hpp" -#include -#include /** * Utility methods for memory management. Typically helpers and wrappers around the C standard library. diff --git a/src/drawing/drawing.c b/src/drawing/drawing.c index 0e09782456..290ac27b99 100644 --- a/src/drawing/drawing.c +++ b/src/drawing/drawing.c @@ -15,13 +15,13 @@ #pragma endregion #include "../common.h" -#include "../localisation/localisation.h" #include "../interface/window.h" -#include "../platform/platform.h" +#include "../localisation/localisation.h" #include "../object.h" +#include "../platform/platform.h" +#include "../rct2.h" #include "../world/water.h" #include "drawing.h" -#include "../rct2.h" // HACK These were originally passed back through registers int gLastDrawStringX; diff --git a/src/drawing/engines/SoftwareDrawingEngine.cpp b/src/drawing/engines/SoftwareDrawingEngine.cpp index 22d0cdd85a..03c131b132 100644 --- a/src/drawing/engines/SoftwareDrawingEngine.cpp +++ b/src/drawing/engines/SoftwareDrawingEngine.cpp @@ -29,9 +29,9 @@ extern "C" #include "../../interface/viewport.h" #include "../../interface/window.h" #include "../../intro.h" + #include "../../rct2.h" #include "../drawing.h" #include "../lightfx.h" - #include "../../rct2.h" } class SoftwareDrawingEngine; diff --git a/src/drawing/sprite.c b/src/drawing/sprite.c index a8a4593192..4106e506bd 100644 --- a/src/drawing/sprite.c +++ b/src/drawing/sprite.c @@ -14,14 +14,11 @@ *****************************************************************************/ #pragma endregion -#include "../addresses.h" #include "../common.h" #include "../openrct2.h" -#include "../platform/platform.h" #include "../sprites.h" #include "../util/util.h" #include "drawing.h" -#include "../rct2.h" void *_g1Buffer = NULL; diff --git a/src/drawing/string.c b/src/drawing/string.c index 2ae44790de..fada3cd3cf 100644 --- a/src/drawing/string.c +++ b/src/drawing/string.c @@ -16,14 +16,9 @@ #include "../interface/colour.h" #include "../interface/viewport.h" -#include "../interface/window.h" #include "../localisation/localisation.h" -#include "../platform/platform.h" #include "../sprites.h" #include "../util/util.h" -#include "../world/map.h" -#include "drawing.h" -#include "../rct2.h" enum { TEXT_DRAW_FLAG_INSET = 1 << 0, diff --git a/src/input.c b/src/input.c index 8409c7fac4..d1912acc4c 100644 --- a/src/input.c +++ b/src/input.c @@ -104,7 +104,7 @@ static void input_window_resize_end(); static void input_viewport_drag_begin(rct_window *w, int x, int y); static void input_viewport_drag_continue(); static void input_viewport_drag_end(); -static void input_scroll_begin(); +static void input_scroll_begin(rct_window *w, int widgetIndex, int x, int y); static void input_scroll_continue(rct_window *w, int widgetIndex, int state, int x, int y); static void input_scroll_end(); static void input_scroll_part_update_hthumb(rct_window *w, int widgetIndex, int x, int scroll_id); diff --git a/src/interface/Fonts.cpp b/src/interface/Fonts.cpp index 407f7ffc6a..2e35928b6a 100644 --- a/src/interface/Fonts.cpp +++ b/src/interface/Fonts.cpp @@ -15,10 +15,10 @@ #pragma endregion #include "../common.h" -#include "Fonts.h" #include "../core/Console.hpp" #include "../core/String.hpp" #include "../localisation/LanguagePack.h" +#include "Fonts.h" extern "C" { #include "../config.h" diff --git a/src/interface/chat.c b/src/interface/chat.c index 79c98f9e7b..638384b1fa 100644 --- a/src/interface/chat.c +++ b/src/interface/chat.c @@ -14,15 +14,15 @@ *****************************************************************************/ #pragma endregion -#include "chat.h" #include "../audio/audio.h" #include "../audio/mixer.h" #include "../interface/themes.h" #include "../localisation/localisation.h" #include "../network/network.h" #include "../platform/platform.h" -#include "../util/util.h" #include "../rct2.h" +#include "../util/util.h" +#include "chat.h" bool gChatOpen = false; char _chatCurrentLine[CHAT_MAX_MESSAGE_LENGTH]; diff --git a/src/interface/console.c b/src/interface/console.c index 54b4891bcf..168c876ad0 100644 --- a/src/interface/console.c +++ b/src/interface/console.c @@ -17,30 +17,30 @@ #include #include -#include "../drawing/drawing.h" -#include "../localisation/localisation.h" -#include "../localisation/user.h" -#include "../platform/platform.h" -#include "../world/park.h" -#include "../util/sawyercoding.h" #include "../config.h" +#include "../drawing/drawing.h" #include "../game.h" #include "../input.h" -#include "../network/twitch.h" +#include "../localisation/localisation.h" +#include "../localisation/user.h" +#include "../management/finance.h" +#include "../management/research.h" #include "../network/network.h" +#include "../network/twitch.h" #include "../object.h" #include "../object/ObjectManager.h" #include "../object/ObjectRepository.h" +#include "../platform/platform.h" #include "../rct2.h" +#include "../util/sawyercoding.h" +#include "../util/util.h" #include "../world/banner.h" #include "../world/climate.h" +#include "../world/park.h" #include "../world/scenery.h" -#include "../management/finance.h" -#include "../management/research.h" -#include "../util/util.h" #include "console.h" -#include "window.h" #include "viewport.h" +#include "window.h" #define CONSOLE_BUFFER_SIZE 8192 #define CONSOLE_BUFFER_2_SIZE 256 diff --git a/src/interface/title_sequences.c b/src/interface/title_sequences.c index a7d5978baa..f94fd0daf7 100644 --- a/src/interface/title_sequences.c +++ b/src/interface/title_sequences.c @@ -15,11 +15,11 @@ #pragma endregion #include "../localisation/string_ids.h" -#include "window.h" -#include "title_sequences.h" +#include "../rct2.h" #include "../title.h" #include "../util/util.h" -#include "../rct2.h" +#include "title_sequences.h" +#include "window.h" uint16 gCurrentTitleSequence; diff --git a/src/interface/viewport.c b/src/interface/viewport.c index 8a715a3b82..5d16eb9af2 100644 --- a/src/interface/viewport.c +++ b/src/interface/viewport.c @@ -16,24 +16,24 @@ #include "../config.h" #include "../drawing/drawing.h" -#include "../paint/supports.h" #include "../game.h" #include "../input.h" #include "../localisation/localisation.h" +#include "../paint/paint.h" +#include "../paint/supports.h" #include "../peep/staff.h" #include "../rct2.h" #include "../ride/ride_data.h" #include "../ride/track_data.h" #include "../sprites.h" -#include "../world/climate.h" -#include "../world/map.h" -#include "../world/sprite.h" #include "../world/banner.h" +#include "../world/climate.h" #include "../world/entrance.h" #include "../world/footpath.h" +#include "../world/map.h" #include "../world/scenery.h" +#include "../world/sprite.h" #include "colour.h" -#include "../paint/paint.h" #include "viewport.h" #include "window.h" diff --git a/src/intro.c b/src/intro.c index 0c0b2007ae..ab044bffa4 100644 --- a/src/intro.c +++ b/src/intro.c @@ -18,8 +18,8 @@ #include "audio/mixer.h" #include "drawing/drawing.h" #include "intro.h" -#include "sprites.h" #include "rct2.h" +#include "sprites.h" #define BACKROUND_COLOUR_DARK 10 #define BACKROUND_COLOUR_LOGO 245 diff --git a/src/localisation/language.cpp b/src/localisation/language.cpp index 935c12c804..87fabc2fc3 100644 --- a/src/localisation/language.cpp +++ b/src/localisation/language.cpp @@ -20,8 +20,8 @@ #include "../core/Path.hpp" #include "../core/String.hpp" #include "../core/StringBuilder.hpp" -#include "../object/ObjectManager.h" #include "../interface/Fonts.h" +#include "../object/ObjectManager.h" #include "LanguagePack.h" extern "C" { diff --git a/src/management/news_item.c b/src/management/news_item.c index c723719ee9..f2eaef7985 100644 --- a/src/management/news_item.c +++ b/src/management/news_item.c @@ -21,8 +21,8 @@ #include "../localisation/localisation.h" #include "../rct2.h" #include "../ride/ride.h" -#include "../world/sprite.h" #include "../util/util.h" +#include "../world/sprite.h" #include "news_item.h" rct_news_item gNewsItems[MAX_NEWS_ITEMS]; diff --git a/src/network/twitch.cpp b/src/network/twitch.cpp index 22b5ccc848..910f153e39 100644 --- a/src/network/twitch.cpp +++ b/src/network/twitch.cpp @@ -43,8 +43,8 @@ extern "C" #include "../management/news_item.h" #include "../peep/peep.h" #include "../rct2.h" - #include "../world/sprite.h" #include "../util/util.h" + #include "../world/sprite.h" #include "http.h" #include "twitch.h" } diff --git a/src/paint/map_element/surface.c b/src/paint/map_element/surface.c index 0b11c1742a..c56005a6de 100644 --- a/src/paint/map_element/surface.c +++ b/src/paint/map_element/surface.c @@ -18,9 +18,9 @@ #include "../../config.h" #include "../../interface/viewport.h" #include "../../peep/staff.h" +#include "../../rct2.h" #include "map_element.h" #include "surface.h" -#include "../../rct2.h" const uint8 byte_97B444[] = { 0, 2, 1, 3, 8, 10, 9, 11, 4, 6, diff --git a/src/peep/peep.c b/src/peep/peep.c index a8c3ef515f..aba1b46efd 100644 --- a/src/peep/peep.c +++ b/src/peep/peep.c @@ -24,8 +24,8 @@ #include "../management/finance.h" #include "../management/marketing.h" #include "../management/news_item.h" -#include "../openrct2.h" #include "../network/network.h" +#include "../openrct2.h" #include "../rct2.h" #include "../ride/ride.h" #include "../ride/ride_data.h" diff --git a/src/platform/shared.c b/src/platform/shared.c index ed1bf5b4db..c434531dbc 100644 --- a/src/platform/shared.c +++ b/src/platform/shared.c @@ -21,8 +21,8 @@ #include "../drawing/lightfx.h" #include "../game.h" #include "../input.h" -#include "../interface/console.h" #include "../interface/Cursors.h" +#include "../interface/console.h" #include "../interface/keyboard_shortcut.h" #include "../interface/window.h" #include "../localisation/currency.h" diff --git a/src/ride/ride_ratings.c b/src/ride/ride_ratings.c index 99750fb01e..01e250e19a 100644 --- a/src/ride/ride_ratings.c +++ b/src/ride/ride_ratings.c @@ -16,8 +16,8 @@ #include "../interface/window.h" #include "../localisation/date.h" -#include "../world/map.h" #include "../rct2.h" +#include "../world/map.h" #include "ride.h" #include "ride_data.h" #include "ride_ratings.h" diff --git a/src/windows/clear_scenery.c b/src/windows/clear_scenery.c index 04fa0899dc..f7453743e9 100644 --- a/src/windows/clear_scenery.c +++ b/src/windows/clear_scenery.c @@ -15,12 +15,12 @@ #pragma endregion #include "../input.h" -#include "../localisation/localisation.h" -#include "../rct2.h" -#include "../sprites.h" #include "../interface/themes.h" #include "../interface/widget.h" #include "../interface/window.h" +#include "../localisation/localisation.h" +#include "../rct2.h" +#include "../sprites.h" #include "../world/map.h" #include "../world/scenery.h" diff --git a/src/windows/debug_paint.c b/src/windows/debug_paint.c index 8caab9b573..007c893371 100644 --- a/src/windows/debug_paint.c +++ b/src/windows/debug_paint.c @@ -15,16 +15,16 @@ #pragma endregion #include "../input.h" +#include "../interface/themes.h" #include "../interface/widget.h" #include "../interface/window.h" #include "../localisation/localisation.h" -#include "../sprites.h" -#include "../rct2.h" -#include "../world/map.h" -#include "../interface/themes.h" #include "../paint/map_element/map_element.h" -#include "../ride/track_paint.h" #include "../paint/paint.h" +#include "../rct2.h" +#include "../ride/track_paint.h" +#include "../sprites.h" +#include "../world/map.h" enum WINDOW_DEBUG_PAINT_WIDGET_IDX { diff --git a/src/windows/dropdown.c b/src/windows/dropdown.c index 3c71fb35cb..ab5ff0ea05 100644 --- a/src/windows/dropdown.c +++ b/src/windows/dropdown.c @@ -18,9 +18,9 @@ #include "../interface/widget.h" #include "../interface/window.h" #include "../localisation/localisation.h" +#include "../rct2.h" #include "../scenario.h" #include "../sprites.h" -#include "../rct2.h" #include "dropdown.h" int gAppropriateImageDropdownItemsPerRow[] = { diff --git a/src/windows/editor_objective_options.c b/src/windows/editor_objective_options.c index 4a753f966d..84151bebb1 100644 --- a/src/windows/editor_objective_options.c +++ b/src/windows/editor_objective_options.c @@ -20,14 +20,14 @@ #include "../interface/window.h" #include "../localisation/date.h" #include "../localisation/localisation.h" -#include "../scenario.h" #include "../rct2.h" +#include "../scenario.h" +#include "../sprites.h" #include "../util/util.h" #include "../world/climate.h" #include "../world/park.h" #include "dropdown.h" #include "error.h" -#include "../sprites.h" #pragma region Widgets diff --git a/src/windows/editor_scenario_options.c b/src/windows/editor_scenario_options.c index 3280610b60..7854f1bb1b 100644 --- a/src/windows/editor_scenario_options.c +++ b/src/windows/editor_scenario_options.c @@ -14,15 +14,15 @@ *****************************************************************************/ #pragma endregion -#include "../localisation/localisation.h" +#include "../interface/themes.h" #include "../interface/widget.h" #include "../interface/window.h" +#include "../localisation/localisation.h" #include "../management/finance.h" -#include "../sprites.h" #include "../rct2.h" -#include "error.h" +#include "../sprites.h" #include "dropdown.h" -#include "../interface/themes.h" +#include "error.h" #pragma region Widgets diff --git a/src/windows/footpath.c b/src/windows/footpath.c index 7c5ac0809f..8c23db9973 100644 --- a/src/windows/footpath.c +++ b/src/windows/footpath.c @@ -15,17 +15,17 @@ #pragma endregion #include "../audio/audio.h" +#include "../cheats.h" #include "../game.h" -#include "../localisation/localisation.h" #include "../input.h" -#include "../sprites.h" -#include "../interface/widget.h" +#include "../interface/themes.h" #include "../interface/viewport.h" +#include "../interface/widget.h" +#include "../localisation/localisation.h" +#include "../rct2.h" +#include "../sprites.h" #include "../world/footpath.h" #include "dropdown.h" -#include "../interface/themes.h" -#include "../cheats.h" -#include "../rct2.h" enum { PATH_CONSTRUCTION_MODE_LAND, diff --git a/src/windows/game_bottom_toolbar.c b/src/windows/game_bottom_toolbar.c index 38aa089a50..aa39e295c6 100644 --- a/src/windows/game_bottom_toolbar.c +++ b/src/windows/game_bottom_toolbar.c @@ -26,8 +26,8 @@ #include "../management/news_item.h" #include "../peep/peep.h" #include "../peep/staff.h" -#include "../sprites.h" #include "../rct2.h" +#include "../sprites.h" #include "../world/climate.h" #include "../world/park.h" #include "../world/sprite.h" diff --git a/src/windows/land.c b/src/windows/land.c index 447b9eb7ef..33068e7157 100644 --- a/src/windows/land.c +++ b/src/windows/land.c @@ -15,14 +15,14 @@ #pragma endregion #include "../input.h" +#include "../interface/themes.h" #include "../interface/widget.h" #include "../interface/window.h" #include "../localisation/localisation.h" -#include "../sprites.h" #include "../rct2.h" +#include "../sprites.h" #include "../world/map.h" #include "dropdown.h" -#include "../interface/themes.h" #define MINIMUM_TOOL_SIZE 1 #define MAXIMUM_TOOL_SIZE 64 diff --git a/src/windows/land_rights.c b/src/windows/land_rights.c index 1fb8d451e7..5adda40342 100644 --- a/src/windows/land_rights.c +++ b/src/windows/land_rights.c @@ -14,16 +14,16 @@ *****************************************************************************/ #pragma endregion +#include "../game.h" #include "../input.h" +#include "../interface/themes.h" +#include "../interface/viewport.h" #include "../interface/widget.h" #include "../interface/window.h" -#include "../interface/viewport.h" #include "../localisation/localisation.h" -#include "../sprites.h" #include "../rct2.h" +#include "../sprites.h" #include "../world/map.h" -#include "../game.h" -#include "../interface/themes.h" #define MINIMUM_TOOL_SIZE 1 #define MAXIMUM_TOOL_SIZE 64 diff --git a/src/windows/map.c b/src/windows/map.c index 7fb7b827c6..42543f6458 100644 --- a/src/windows/map.c +++ b/src/windows/map.c @@ -17,14 +17,14 @@ #include "../audio/audio.h" #include "../cheats.h" #include "../game.h" -#include "../localisation/localisation.h" #include "../input.h" #include "../interface/themes.h" -#include "../interface/widget.h" #include "../interface/viewport.h" +#include "../interface/widget.h" #include "../interface/window.h" -#include "../sprites.h" +#include "../localisation/localisation.h" #include "../rct2.h" +#include "../sprites.h" #include "../world/footpath.h" #include "../world/scenery.h" #include "error.h" diff --git a/src/world/climate.c b/src/world/climate.c index 47266902f7..3c904da65a 100644 --- a/src/world/climate.c +++ b/src/world/climate.c @@ -22,11 +22,11 @@ #include "../game.h" #include "../interface/window.h" #include "../localisation/date.h" +#include "../rct2.h" #include "../scenario.h" +#include "../sprites.h" #include "../util/util.h" #include "climate.h" -#include "../rct2.h" -#include "../sprites.h" enum { THUNDER_STATUS_NULL = 0, diff --git a/src/world/footpath.c b/src/world/footpath.c index a037d823b8..ed168d31b4 100644 --- a/src/world/footpath.c +++ b/src/world/footpath.c @@ -16,17 +16,13 @@ #include "../cheats.h" #include "../game.h" -#include "footpath.h" #include "../localisation/localisation.h" -#include "map.h" -#include "map_animation.h" #include "../network/network.h" -#include "../util/util.h" #include "../object_list.h" #include "../rct2.h" #include "../ride/track.h" #include "../ride/track_data.h" -#include "scenery.h" +#include "../util/util.h" void footpath_interrupt_peeps(int x, int y, int z); void sub_6A7642(int x, int y, rct_map_element *mapElement);