From d501753ef2940a8152fd67781c898f8a62a9cb3e Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 22 May 2011 18:03:28 +0000 Subject: [PATCH] Clean up irrlicht includes; avoiding including the huge irrlicht.h when we only need one specific class, especially in header files; use forwards when possible git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8660 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/addons/addon.cpp | 2 +- src/addons/request.cpp | 2 +- src/config/device_config.cpp | 1 + src/graphics/material_manager.cpp | 2 +- src/guiengine/engine.cpp | 1 - src/guiengine/engine.hpp | 14 ++++++-------- src/guiengine/event_handler.hpp | 2 +- src/guiengine/modaldialog.hpp | 6 +++++- src/guiengine/scalable_font.cpp | 10 +++++----- src/guiengine/screen.hpp | 7 ++++++- src/guiengine/widget.hpp | 6 +++++- src/guiengine/widgets/bubble_widget.hpp | 4 +++- src/guiengine/widgets/button_widget.hpp | 2 +- src/guiengine/widgets/check_box_widget.hpp | 2 -- src/guiengine/widgets/dynamic_ribbon_widget.hpp | 2 +- src/guiengine/widgets/icon_button_widget.hpp | 7 ++++++- src/guiengine/widgets/label_widget.hpp | 3 ++- src/guiengine/widgets/list_widget.hpp | 2 +- src/guiengine/widgets/progress_bar_widget.hpp | 2 +- src/guiengine/widgets/ribbon_widget.hpp | 2 +- src/guiengine/widgets/spinner_widget.hpp | 6 +++++- src/guiengine/widgets/text_box_widget.hpp | 2 +- src/input/binding.hpp | 3 ++- src/io/file_manager.hpp | 4 +++- src/io/xml_node.hpp | 8 +++++++- src/io/xml_writer.hpp | 2 +- src/items/attachment_manager.hpp | 6 +++++- src/items/bowling.hpp | 5 ++++- src/items/cake.hpp | 5 ++++- src/items/flyable.hpp | 5 ++++- src/items/item.hpp | 5 ++++- src/items/plunger.hpp | 3 --- src/items/powerup_manager.hpp | 5 ++++- src/items/projectile_manager.hpp | 6 +++++- src/karts/moveable.hpp | 5 ++++- src/main.cpp | 2 +- src/race/grand_prix_manager.cpp | 1 - src/race/highscores.hpp | 2 +- src/states_screens/challenges.hpp | 6 +++++- src/states_screens/minimal_race_gui.hpp | 8 +++++++- src/states_screens/options_screen_audio.hpp | 1 - src/states_screens/options_screen_input.hpp | 5 +---- src/states_screens/options_screen_input2.hpp | 2 +- src/states_screens/options_screen_ui.hpp | 1 - src/states_screens/options_screen_video.hpp | 1 - src/tracks/check_lap.hpp | 3 --- src/tracks/check_line.hpp | 3 ++- src/tracks/graph_node.hpp | 4 +++- src/tracks/quad.cpp | 1 + src/tracks/quad.hpp | 5 +---- src/tracks/track.hpp | 6 +++++- src/utils/translation.cpp | 2 -- 52 files changed, 129 insertions(+), 73 deletions(-) diff --git a/src/addons/addon.cpp b/src/addons/addon.cpp index b058cbcb2..28758ea16 100644 --- a/src/addons/addon.cpp +++ b/src/addons/addon.cpp @@ -113,4 +113,4 @@ std::string Addon::getDateAsString() const char s[16]; strftime(s, 128, "%d.%m.%Y", t); return s; -} // getDateAsString \ No newline at end of file +} // getDateAsString diff --git a/src/addons/request.cpp b/src/addons/request.cpp index bb886beb9..91bbd9cae 100644 --- a/src/addons/request.cpp +++ b/src/addons/request.cpp @@ -60,4 +60,4 @@ void Request::notifyAddon() { if(m_icon_addon) m_icon_addon->setIconReady(); -} // notifyAddon \ No newline at end of file +} // notifyAddon diff --git a/src/config/device_config.cpp b/src/config/device_config.cpp index 0fb1cef9c..f81b36158 100644 --- a/src/config/device_config.cpp +++ b/src/config/device_config.cpp @@ -20,6 +20,7 @@ #include #include "config/device_config.hpp" +#include //==== D E V I C E C O N F I G ================================================= diff --git a/src/graphics/material_manager.cpp b/src/graphics/material_manager.cpp index 9771016f9..5bdc54cc2 100644 --- a/src/graphics/material_manager.cpp +++ b/src/graphics/material_manager.cpp @@ -227,7 +227,7 @@ Material *MaterialManager::getMaterial(const std::string& fname, m_materials.push_back(m); if(make_permanent) { - assert(m_shared_material_index==m_materials.size()-1); + assert(m_shared_material_index==(int)m_materials.size()-1); m_shared_material_index = (int)m_materials.size(); } return m ; diff --git a/src/guiengine/engine.cpp b/src/guiengine/engine.cpp index 8b0d657f0..50fbc8dd9 100644 --- a/src/guiengine/engine.cpp +++ b/src/guiengine/engine.cpp @@ -587,7 +587,6 @@ #include #include - #include "io/file_manager.hpp" #include "input/input_manager.hpp" #include "guiengine/event_handler.hpp" diff --git a/src/guiengine/engine.hpp b/src/guiengine/engine.hpp index b11d76aa7..243b88f96 100644 --- a/src/guiengine/engine.hpp +++ b/src/guiengine/engine.hpp @@ -23,19 +23,17 @@ * \defgroup guiengine */ +namespace irr +{ + class IrrlichtDevice; + namespace gui { class IGUIEnvironment; class ScalableFont; } + namespace video { class IVideoDriver; class ITexture; } +} -#include #include #include "utils/constants.hpp" #include "utils/ptr_vector.hpp" -namespace irr -{ - namespace gui - { - class ScalableFont; - } -} /** * \ingroup guiengine diff --git a/src/guiengine/event_handler.hpp b/src/guiengine/event_handler.hpp index 46e4b0010..b5d30dfc6 100644 --- a/src/guiengine/event_handler.hpp +++ b/src/guiengine/event_handler.hpp @@ -18,7 +18,7 @@ #ifndef HEADER_EVENT_HANDLER_HPP #define HEADER_EVENT_HANDLER_HPP -#include "irrlicht.h" +#include #include "input/input.hpp" /** diff --git a/src/guiengine/modaldialog.hpp b/src/guiengine/modaldialog.hpp index e09895610..e844c3caf 100644 --- a/src/guiengine/modaldialog.hpp +++ b/src/guiengine/modaldialog.hpp @@ -18,7 +18,11 @@ #ifndef HEADER_MODAL_DIALOG_HPP #define HEADER_MODAL_DIALOG_HPP -#include "irrlicht.h" +namespace irr +{ + namespace gui { class IGUIWindow; } +} + #include "utils/ptr_vector.hpp" #include "guiengine/abstract_top_level_container.hpp" //#include "guiengine/event_handler.hpp" diff --git a/src/guiengine/scalable_font.cpp b/src/guiengine/scalable_font.cpp index d7c40bf79..cdbcaacc6 100644 --- a/src/guiengine/scalable_font.cpp +++ b/src/guiengine/scalable_font.cpp @@ -5,12 +5,12 @@ #include "guiengine/scalable_font.hpp" #include +#include +#include +#include +#include +#include -#include "IGUIEnvironment.h" -#include "IXMLReader.h" -#include "IReadFile.h" -#include "IVideoDriver.h" -#include "IGUISpriteBank.h" #include "guiengine/engine.hpp" #include "io/file_manager.hpp" #include "utils/translation.hpp" diff --git a/src/guiengine/screen.hpp b/src/guiengine/screen.hpp index e9566cd24..1326a6b89 100644 --- a/src/guiengine/screen.hpp +++ b/src/guiengine/screen.hpp @@ -23,7 +23,12 @@ #include #include -#include "irrlicht.h" +#include +namespace irr +{ + namespace gui { class IGUIElement; } +} +using namespace irr; #include "config/stk_config.hpp" #include "guiengine/abstract_top_level_container.hpp" diff --git a/src/guiengine/widget.hpp b/src/guiengine/widget.hpp index a0452a360..46b9eae0e 100644 --- a/src/guiengine/widget.hpp +++ b/src/guiengine/widget.hpp @@ -19,7 +19,11 @@ #ifndef HEADER_WIDGET_HPP #define HEADER_WIDGET_HPP -#include +#include +namespace irr +{ + namespace gui { class IGUIElement; } +} #include #include "guiengine/event_handler.hpp" diff --git a/src/guiengine/widgets/bubble_widget.hpp b/src/guiengine/widgets/bubble_widget.hpp index d2200ba0b..884943e54 100644 --- a/src/guiengine/widgets/bubble_widget.hpp +++ b/src/guiengine/widgets/bubble_widget.hpp @@ -18,7 +18,9 @@ #ifndef __BUBBLE_WIDGET_HPP__ #define __BUBBLE_WIDGET_HPP__ -#include +#include +#include + #include "guiengine/widget.hpp" namespace GUIEngine diff --git a/src/guiengine/widgets/button_widget.hpp b/src/guiengine/widgets/button_widget.hpp index d215b8eed..5eaaef205 100644 --- a/src/guiengine/widgets/button_widget.hpp +++ b/src/guiengine/widgets/button_widget.hpp @@ -24,7 +24,7 @@ * \defgroup widgets Guiengine/Widgets */ -#include +#include #include "guiengine/widget.hpp" #include "utils/ptr_vector.hpp" diff --git a/src/guiengine/widgets/check_box_widget.hpp b/src/guiengine/widgets/check_box_widget.hpp index ee90bc075..8eedce87c 100644 --- a/src/guiengine/widgets/check_box_widget.hpp +++ b/src/guiengine/widgets/check_box_widget.hpp @@ -20,8 +20,6 @@ #ifndef HEADER_CHECKBOX_HPP #define HEADER_CHECKBOX_HPP -#include - #include "guiengine/widget.hpp" #include "utils/ptr_vector.hpp" diff --git a/src/guiengine/widgets/dynamic_ribbon_widget.hpp b/src/guiengine/widgets/dynamic_ribbon_widget.hpp index b565ddcd2..edc5fe428 100644 --- a/src/guiengine/widgets/dynamic_ribbon_widget.hpp +++ b/src/guiengine/widgets/dynamic_ribbon_widget.hpp @@ -20,7 +20,7 @@ #ifndef HEADER_RIBBONGRID_HPP #define HEADER_RIBBONGRID_HPP -#include +#include #include "guiengine/widget.hpp" #include "guiengine/widgets/ribbon_widget.hpp" diff --git a/src/guiengine/widgets/icon_button_widget.hpp b/src/guiengine/widgets/icon_button_widget.hpp index 8f7225b4b..4b6854520 100644 --- a/src/guiengine/widgets/icon_button_widget.hpp +++ b/src/guiengine/widgets/icon_button_widget.hpp @@ -20,7 +20,12 @@ #ifndef HEADER_IBTN_HPP #define HEADER_IBTN_HPP -#include +#include +namespace irr +{ + namespace gui { class IGUIStaticText; } + namespace video { class ITexture; } +} #include "guiengine/widget.hpp" #include "utils/ptr_vector.hpp" diff --git a/src/guiengine/widgets/label_widget.hpp b/src/guiengine/widgets/label_widget.hpp index c1bff555e..d049979dd 100644 --- a/src/guiengine/widgets/label_widget.hpp +++ b/src/guiengine/widgets/label_widget.hpp @@ -20,7 +20,8 @@ #ifndef HEADER_LABEL_HPP #define HEADER_LABEL_HPP -#include +#include +#include #include "guiengine/widget.hpp" #include "utils/ptr_vector.hpp" diff --git a/src/guiengine/widgets/list_widget.hpp b/src/guiengine/widgets/list_widget.hpp index 969351525..6056919ec 100644 --- a/src/guiengine/widgets/list_widget.hpp +++ b/src/guiengine/widgets/list_widget.hpp @@ -20,7 +20,7 @@ #ifndef HEADER_LISTWIDGET_HPP #define HEADER_LISTWIDGET_HPP -#include +#include #include "guiengine/widget.hpp" #include "guiengine/widgets/button_widget.hpp" diff --git a/src/guiengine/widgets/progress_bar_widget.hpp b/src/guiengine/widgets/progress_bar_widget.hpp index fc1cd7b29..91b1db039 100644 --- a/src/guiengine/widgets/progress_bar_widget.hpp +++ b/src/guiengine/widgets/progress_bar_widget.hpp @@ -24,7 +24,7 @@ * \defgroup widgets Guiengine/Widgets */ -#include +#include #include "guiengine/widget.hpp" #include "utils/ptr_vector.hpp" diff --git a/src/guiengine/widgets/ribbon_widget.hpp b/src/guiengine/widgets/ribbon_widget.hpp index 24bfc8e63..5c033c8f7 100644 --- a/src/guiengine/widgets/ribbon_widget.hpp +++ b/src/guiengine/widgets/ribbon_widget.hpp @@ -20,7 +20,7 @@ #ifndef HEADER_RIBBON_HPP #define HEADER_RIBBON_HPP -#include +#include #include "guiengine/widget.hpp" #include "guiengine/widgets/icon_button_widget.hpp" diff --git a/src/guiengine/widgets/spinner_widget.hpp b/src/guiengine/widgets/spinner_widget.hpp index 1a76c8150..503035a32 100644 --- a/src/guiengine/widgets/spinner_widget.hpp +++ b/src/guiengine/widgets/spinner_widget.hpp @@ -20,7 +20,11 @@ #ifndef HEADER_SPINNER_HPP #define HEADER_SPINNER_HPP -#include +#include +namespace irr +{ + namespace video { class ITexture; } +} #include "guiengine/widget.hpp" #include "utils/ptr_vector.hpp" diff --git a/src/guiengine/widgets/text_box_widget.hpp b/src/guiengine/widgets/text_box_widget.hpp index c255530bd..28fc76d37 100644 --- a/src/guiengine/widgets/text_box_widget.hpp +++ b/src/guiengine/widgets/text_box_widget.hpp @@ -20,7 +20,7 @@ #ifndef HEADER_TEXTBOX_HPP #define HEADER_TEXTBOX_HPP -#include +#include #include "guiengine/widget.hpp" #include "utils/ptr_vector.hpp" diff --git a/src/input/binding.hpp b/src/input/binding.hpp index 688687b55..60dcbbd6c 100644 --- a/src/input/binding.hpp +++ b/src/input/binding.hpp @@ -23,9 +23,10 @@ #include -#include "irrlicht.h" +#include #include "input/input.hpp" #include "utils/no_copy.hpp" +#include /** * \ingroup config diff --git a/src/io/file_manager.hpp b/src/io/file_manager.hpp index 80c5011c2..668d2dcbc 100644 --- a/src/io/file_manager.hpp +++ b/src/io/file_manager.hpp @@ -28,7 +28,9 @@ #include #include -#include "irrlicht.h" +#include +#include +namespace irr { class IrrlichtDevice; } using namespace irr; #include "io/xml_node.hpp" diff --git a/src/io/xml_node.hpp b/src/io/xml_node.hpp index 015618657..7f9e2bc3a 100644 --- a/src/io/xml_node.hpp +++ b/src/io/xml_node.hpp @@ -23,7 +23,13 @@ #include #include #include -#include "irrlicht.h" + +#include +#include +#include +#include +#include +#include using namespace irr; #include "utils/no_copy.hpp" diff --git a/src/io/xml_writer.hpp b/src/io/xml_writer.hpp index cf8ddd64f..15bc6cb4c 100644 --- a/src/io/xml_writer.hpp +++ b/src/io/xml_writer.hpp @@ -21,7 +21,7 @@ #define HEADER_XML_WRITER_HPP #include -#include +#include /** * \brief utility class used to write wide (UTF-16 or UTF-32, depending of size of wchar_t) XML files diff --git a/src/items/attachment_manager.hpp b/src/items/attachment_manager.hpp index 19fac91a4..d1d574629 100644 --- a/src/items/attachment_manager.hpp +++ b/src/items/attachment_manager.hpp @@ -19,7 +19,11 @@ #ifndef HEADER_ATTACHMENT_MANAGER_HPP #define HEADER_ATTACHMENT_MANAGER_HPP -#include "irrlicht.h" +namespace irr +{ + namespace scene { class IAnimatedMesh; } +} + #include "items/attachment.hpp" #include "utils/no_copy.hpp" diff --git a/src/items/bowling.hpp b/src/items/bowling.hpp index 7f4da9859..acfa28e80 100644 --- a/src/items/bowling.hpp +++ b/src/items/bowling.hpp @@ -20,7 +20,10 @@ #ifndef HEADER_BOWLING_HPP #define HEADER_BOWLING_HPP -#include "irrlicht.h" +namespace irr +{ + namespace scene { class IMesh; } +} using namespace irr; #include "items/flyable.hpp" diff --git a/src/items/cake.hpp b/src/items/cake.hpp index a789c4524..4b801dd5e 100644 --- a/src/items/cake.hpp +++ b/src/items/cake.hpp @@ -23,7 +23,10 @@ #ifndef HEADER_CAKE_HPP #define HEADER_CAKE_HPP -#include "irrlicht.h" +namespace irr +{ + namespace scene { class IMesh; } +} #include "items/flyable.hpp" diff --git a/src/items/flyable.hpp b/src/items/flyable.hpp index f07afc350..bb1b98621 100644 --- a/src/items/flyable.hpp +++ b/src/items/flyable.hpp @@ -23,7 +23,10 @@ #ifndef HEADER_FLYABLE_HPP #define HEADER_FLYABLE_HPP -#include "irrlicht.h" +namespace irr +{ + namespace scene { class IMesh; } +} using namespace irr; #include "audio/sfx_manager.hpp" diff --git a/src/items/item.hpp b/src/items/item.hpp index 1fb08109f..dfa8cd168 100644 --- a/src/items/item.hpp +++ b/src/items/item.hpp @@ -24,7 +24,10 @@ * \defgroup items */ -#include "irrlicht.h" +namespace irr +{ + namespace scene { class IMesh; } +} using namespace irr; #include "karts/kart.hpp" diff --git a/src/items/plunger.hpp b/src/items/plunger.hpp index 34543fa8b..398457dc6 100644 --- a/src/items/plunger.hpp +++ b/src/items/plunger.hpp @@ -23,9 +23,6 @@ #ifndef HEADER_MISSILE_HPP #define HEADER_MISSILE_HPP -#include "irrlicht.h" -using namespace irr; - #include "items/flyable.hpp" class Kart; diff --git a/src/items/powerup_manager.hpp b/src/items/powerup_manager.hpp index 59600ffde..352aa9fc5 100644 --- a/src/items/powerup_manager.hpp +++ b/src/items/powerup_manager.hpp @@ -20,7 +20,10 @@ #ifndef HEADER_POWERUPMANAGER_HPP #define HEADER_POWERUPMANAGER_HPP -#include "irrlicht.h" +namespace irr +{ + namespace scene { class IMesh; } +} #include #include diff --git a/src/items/projectile_manager.hpp b/src/items/projectile_manager.hpp index 92fe33e16..76c70194c 100644 --- a/src/items/projectile_manager.hpp +++ b/src/items/projectile_manager.hpp @@ -21,7 +21,11 @@ #define HEADER_PROJECTILEMANAGER_HPP #include -#include "irrlicht.h" + +namespace irr +{ + namespace scene { class IMesh; } +} #include "audio/sfx_manager.hpp" #include "items/powerup_manager.hpp" diff --git a/src/karts/moveable.hpp b/src/karts/moveable.hpp index 382edf426..8644f2d42 100644 --- a/src/karts/moveable.hpp +++ b/src/karts/moveable.hpp @@ -21,7 +21,10 @@ #ifndef HEADER_MOVEABLE_HPP #define HEADER_MOVEABLE_HPP -#include "irrlicht.h" +namespace irr +{ + namespace scene { class IMesh; class IMeshSceneNode; } +} using namespace irr; #include "btBulletDynamicsCommon.h" diff --git a/src/main.cpp b/src/main.cpp index 553f8c93a..c34b40148 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -40,7 +40,7 @@ #include #include -#include "IEventReceiver.h" +#include #include "main_loop.hpp" #include "addons/addons_manager.hpp" diff --git a/src/race/grand_prix_manager.cpp b/src/race/grand_prix_manager.cpp index 3fb1bed4b..b22e1be60 100644 --- a/src/race/grand_prix_manager.cpp +++ b/src/race/grand_prix_manager.cpp @@ -20,7 +20,6 @@ #include "race/grand_prix_manager.hpp" #include - #include "io/file_manager.hpp" #include "utils/string_utils.hpp" diff --git a/src/race/highscores.hpp b/src/race/highscores.hpp index 1d1fc09d5..885e3565c 100644 --- a/src/race/highscores.hpp +++ b/src/race/highscores.hpp @@ -25,7 +25,7 @@ #include "race/race_manager.hpp" -#include "irrlicht.h" +#include class XMLNode; class XMLWriter; diff --git a/src/states_screens/challenges.hpp b/src/states_screens/challenges.hpp index 5ec1cfb63..6720d8bbf 100644 --- a/src/states_screens/challenges.hpp +++ b/src/states_screens/challenges.hpp @@ -19,10 +19,14 @@ #ifndef HEADER_CHALLENGES_HPP #define HEADER_CHALLENGES_HPP -#include "irrlicht.h" #include "guiengine/screen.hpp" #include "utils/ptr_vector.hpp" +namespace irr +{ + namespace video { class IVideoDriver; } +} + /** * \brief Handles the screen where the player is shown active and solved challenges diff --git a/src/states_screens/minimal_race_gui.hpp b/src/states_screens/minimal_race_gui.hpp index 04fd7a8e5..f7c77e7bf 100644 --- a/src/states_screens/minimal_race_gui.hpp +++ b/src/states_screens/minimal_race_gui.hpp @@ -24,7 +24,13 @@ #include #include -#include "irrlicht.h" +#include +#include +#include +namespace irr +{ + namespace video { class ITexture; } +} using namespace irr; #include "config/player.hpp" diff --git a/src/states_screens/options_screen_audio.hpp b/src/states_screens/options_screen_audio.hpp index 8cf8507cc..499182beb 100644 --- a/src/states_screens/options_screen_audio.hpp +++ b/src/states_screens/options_screen_audio.hpp @@ -20,7 +20,6 @@ #define __HEADER_OPTIONS_SCREEN_AUDIO_HPP__ #include -#include "irrlicht.h" #include "guiengine/screen.hpp" diff --git a/src/states_screens/options_screen_input.hpp b/src/states_screens/options_screen_input.hpp index c749965e0..0f7a03806 100644 --- a/src/states_screens/options_screen_input.hpp +++ b/src/states_screens/options_screen_input.hpp @@ -20,14 +20,11 @@ #define __HEADER_OPTIONS_SCREEN_INPUT_HPP__ #include -//#include -#include "irrlicht.h" - #include "guiengine/screen.hpp" namespace GUIEngine { class Widget; } class DeviceConfig; -namespace irr { namespace gui { class STKModifiedSpriteBank; } } +namespace irr { namespace gui { class STKModifiedSpriteBank; } namespace video { class IVideoDriver; } } struct Input; diff --git a/src/states_screens/options_screen_input2.hpp b/src/states_screens/options_screen_input2.hpp index c0109bf31..fe4ff25d4 100644 --- a/src/states_screens/options_screen_input2.hpp +++ b/src/states_screens/options_screen_input2.hpp @@ -20,7 +20,7 @@ #define __HEADER_OPTIONS_SCREEN_INPUT2_HPP__ #include -#include "irrlicht.h" +#include #include "guiengine/screen.hpp" #include "states_screens/dialogs/message_dialog.hpp" diff --git a/src/states_screens/options_screen_ui.hpp b/src/states_screens/options_screen_ui.hpp index bee2a2a89..cd2f1ee3a 100644 --- a/src/states_screens/options_screen_ui.hpp +++ b/src/states_screens/options_screen_ui.hpp @@ -20,7 +20,6 @@ #define __HEADER_OPTIONS_SCREEN_UI_HPP__ #include -#include "irrlicht.h" #include "guiengine/screen.hpp" diff --git a/src/states_screens/options_screen_video.hpp b/src/states_screens/options_screen_video.hpp index 189b0d040..a8005315e 100644 --- a/src/states_screens/options_screen_video.hpp +++ b/src/states_screens/options_screen_video.hpp @@ -20,7 +20,6 @@ #define __HEADER_OPTIONS_SCREEN_VIDEO_HPP__ #include -#include "irrlicht.h" #include "guiengine/screen.hpp" diff --git a/src/tracks/check_lap.hpp b/src/tracks/check_lap.hpp index b32fdcc0d..d0c5459a3 100644 --- a/src/tracks/check_lap.hpp +++ b/src/tracks/check_lap.hpp @@ -20,9 +20,6 @@ #ifndef HEADER_CHECK_LAP_HPP #define HEADER_CHECK_LAP_HPP -#include "irrlicht.h" -using namespace irr; - #include "tracks/check_structure.hpp" class XMLNode; diff --git a/src/tracks/check_line.hpp b/src/tracks/check_line.hpp index 1ac1a6bcb..284435025 100644 --- a/src/tracks/check_line.hpp +++ b/src/tracks/check_line.hpp @@ -20,7 +20,8 @@ #ifndef HEADER_CHECK_LINE_HPP #define HEADER_CHECK_LINE_HPP -#include "irrlicht.h" +#include +#include using namespace irr; #include "tracks/check_structure.hpp" diff --git a/src/tracks/graph_node.hpp b/src/tracks/graph_node.hpp index 10e8926bb..b85444254 100644 --- a/src/tracks/graph_node.hpp +++ b/src/tracks/graph_node.hpp @@ -22,7 +22,9 @@ #include -#include "irrlicht.h" +#include +#include +#include #include "tracks/quad.hpp" #include "tracks/quad_set.hpp" diff --git a/src/tracks/quad.cpp b/src/tracks/quad.cpp index 429702cc0..3631d42fc 100644 --- a/src/tracks/quad.cpp +++ b/src/tracks/quad.cpp @@ -20,6 +20,7 @@ #include "tracks/quad.hpp" #include "irrlicht.h" +#include #include "LinearMath/btTransform.h" diff --git a/src/tracks/quad.hpp b/src/tracks/quad.hpp index fc9d7e810..1ed9de7da 100644 --- a/src/tracks/quad.hpp +++ b/src/tracks/quad.hpp @@ -20,10 +20,7 @@ #ifndef HEADER_QUAD_HPP #define HEADER_QUAD_HPP -#include - -#include "irrlicht.h" - +#include #include "utils/vec3.hpp" class btTransform; diff --git a/src/tracks/track.hpp b/src/tracks/track.hpp index 4e0df9938..b7f6dcda0 100644 --- a/src/tracks/track.hpp +++ b/src/tracks/track.hpp @@ -23,7 +23,11 @@ #include #include -#include "irrlicht.h" +namespace irr +{ + namespace video { class ITexture; class SColor; } + namespace scene { class IMesh; } +} using namespace irr; #include "LinearMath/btTransform.h" diff --git a/src/utils/translation.cpp b/src/utils/translation.cpp index 5070ea728..052146357 100644 --- a/src/utils/translation.cpp +++ b/src/utils/translation.cpp @@ -35,8 +35,6 @@ #include #include -#include "irrlicht.h" - #include "io/file_manager.hpp" #include "utils/constants.hpp"