From 357af5a27d4806c43fa9d4efe0a2d8afc1c7373a Mon Sep 17 00:00:00 2001 From: auria Date: Sun, 22 May 2011 19:29:52 +0000 Subject: [PATCH] More work on 'thou shalt not include irrlicht.h everywhere carelessly' git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@8663 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- src/addons/network_http.hpp | 3 --- src/addons/news_manager.hpp | 2 +- src/animations/animation_base.hpp | 2 +- src/animations/billboard_animation.hpp | 4 ---- src/animations/ipo.hpp | 3 ++- src/animations/three_d_animation.hpp | 2 +- src/challenges/challenge.hpp | 2 +- src/config/player.hpp | 2 +- src/config/user_config.hpp | 2 +- src/graphics/camera.cpp | 3 +++ src/graphics/camera.hpp | 8 +++++++- src/graphics/explosion.cpp | 2 ++ src/graphics/explosion.hpp | 5 ++++- src/graphics/irr_driver.cpp | 2 ++ src/graphics/irr_driver.hpp | 13 +++++++++++-- src/graphics/lod_node.cpp | 2 ++ src/graphics/lod_node.hpp | 8 +++++++- src/graphics/material.hpp | 5 ++++- src/graphics/material_manager.cpp | 4 ++++ src/graphics/material_manager.hpp | 6 +++++- src/graphics/mesh_tools.cpp | 2 ++ src/graphics/mesh_tools.hpp | 5 ++++- src/graphics/moving_texture.hpp | 2 +- src/graphics/particle_emitter.cpp | 7 +++++++ src/graphics/particle_emitter.hpp | 5 ++++- src/graphics/particle_kind.hpp | 2 +- src/graphics/per_camera_node.cpp | 3 +++ src/graphics/per_camera_node.hpp | 9 ++++++++- src/graphics/rain.cpp | 3 +++ src/graphics/rain.hpp | 9 ++++++++- src/graphics/skid_marks.cpp | 3 +++ src/graphics/slip_stream.cpp | 5 +++++ src/graphics/stars.hpp | 6 +++++- src/guiengine/engine.cpp | 2 ++ src/guiengine/event_handler.cpp | 3 +++ src/guiengine/modaldialog.hpp | 5 +---- src/guiengine/skin.hpp | 11 ++++++++++- src/guiengine/widget.cpp | 18 ++++++++++++++++++ src/guiengine/widget.hpp | 12 ++---------- src/guiengine/widgets/button_widget.cpp | 3 +++ src/guiengine/widgets/check_box_widget.cpp | 3 +++ .../widgets/dynamic_ribbon_widget.cpp | 1 + src/guiengine/widgets/icon_button_widget.cpp | 5 +++++ src/guiengine/widgets/label_widget.cpp | 5 +++++ src/guiengine/widgets/list_widget.cpp | 6 ++++-- src/guiengine/widgets/progress_bar_widget.cpp | 5 +++++ src/guiengine/widgets/ribbon_widget.cpp | 4 ++++ src/guiengine/widgets/ribbon_widget.hpp | 2 ++ src/guiengine/widgets/spinner_widget.cpp | 6 ++++++ src/guiengine/widgets/text_box_widget.cpp | 4 ++++ src/items/bowling.cpp | 1 + src/items/flyable.cpp | 2 ++ src/items/item.cpp | 3 +++ src/items/rubber_band.cpp | 2 ++ src/karts/kart.cpp | 3 +++ src/karts/kart.hpp | 1 + src/karts/kart_model.cpp | 2 ++ src/modes/profile_world.cpp | 2 ++ src/physics/irr_debug_drawer.hpp | 3 --- .../dialogs/add_device_dialog.cpp | 3 +++ .../dialogs/enter_player_name_dialog.cpp | 2 ++ .../dialogs/player_info_dialog.cpp | 3 +++ src/states_screens/feature_unlocked.cpp | 5 +++++ src/states_screens/grand_prix_lose.cpp | 9 +++++++-- src/states_screens/grand_prix_lose.hpp | 2 +- src/states_screens/grand_prix_win.cpp | 7 +++++++ src/states_screens/grand_prix_win.hpp | 2 +- src/states_screens/race_gui_base.cpp | 3 +++ src/states_screens/race_result_gui.cpp | 1 + src/tracks/quad_graph.cpp | 3 +++ src/tracks/terrain_info.hpp | 3 ++- src/tracks/track.hpp | 4 ++-- 72 files changed, 247 insertions(+), 55 deletions(-) diff --git a/src/addons/network_http.hpp b/src/addons/network_http.hpp index e3b5e1071..790059b94 100644 --- a/src/addons/network_http.hpp +++ b/src/addons/network_http.hpp @@ -28,9 +28,6 @@ #endif #include -#include "irrlicht.h" -using namespace irr; - #include "utils/synchronised.hpp" class Request; diff --git a/src/addons/news_manager.hpp b/src/addons/news_manager.hpp index ad88b0f84..9298f86f6 100644 --- a/src/addons/news_manager.hpp +++ b/src/addons/news_manager.hpp @@ -22,7 +22,7 @@ #include -#include "irrlicht.h" +#include using namespace irr; #include "utils/synchronised.hpp" diff --git a/src/animations/animation_base.hpp b/src/animations/animation_base.hpp index eefc14ccb..fef8329a4 100644 --- a/src/animations/animation_base.hpp +++ b/src/animations/animation_base.hpp @@ -26,7 +26,7 @@ #include -#include "irrlicht.h" +#include using namespace irr; #include "tracks/track_object.hpp" diff --git a/src/animations/billboard_animation.hpp b/src/animations/billboard_animation.hpp index 3f1f46069..aedd88bc8 100644 --- a/src/animations/billboard_animation.hpp +++ b/src/animations/billboard_animation.hpp @@ -22,12 +22,8 @@ #include -#include "irrlicht.h" -using namespace irr; - #include "animations/animation_base.hpp" -class Track; class XMLNode; /** diff --git a/src/animations/ipo.hpp b/src/animations/ipo.hpp index 5484f5705..8de42aa57 100644 --- a/src/animations/ipo.hpp +++ b/src/animations/ipo.hpp @@ -23,7 +23,8 @@ #include #include -#include "irrlicht.h" +#include +#include using namespace irr; #include "utils/no_copy.hpp" diff --git a/src/animations/three_d_animation.hpp b/src/animations/three_d_animation.hpp index 7439ae33c..c6e930906 100644 --- a/src/animations/three_d_animation.hpp +++ b/src/animations/three_d_animation.hpp @@ -22,7 +22,7 @@ #include -#include "irrlicht.h" +#include using namespace irr; #include "btBulletDynamicsCommon.h" diff --git a/src/challenges/challenge.hpp b/src/challenges/challenge.hpp index f86b42bbd..62881cf10 100644 --- a/src/challenges/challenge.hpp +++ b/src/challenges/challenge.hpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include "utils/no_copy.hpp" #include "utils/translation.hpp" diff --git a/src/config/player.hpp b/src/config/player.hpp index 920783753..2fd26f4d0 100644 --- a/src/config/player.hpp +++ b/src/config/player.hpp @@ -23,7 +23,7 @@ #include #include "config/user_config.hpp" #include "utils/no_copy.hpp" -#include "irrlicht.h" +#include using namespace irr; /** diff --git a/src/config/user_config.hpp b/src/config/user_config.hpp index 60461851d..b38ee75e4 100644 --- a/src/config/user_config.hpp +++ b/src/config/user_config.hpp @@ -45,7 +45,7 @@ const int CURRENT_CONFIG_VERSION = 8; #include #include -#include "irrlicht.h" +#include using irr::core::stringc; using irr::core::stringw; diff --git a/src/graphics/camera.cpp b/src/graphics/camera.cpp index fee9bac60..19c00341d 100644 --- a/src/graphics/camera.cpp +++ b/src/graphics/camera.cpp @@ -37,6 +37,9 @@ #include "utils/aligned_array.hpp" #include "utils/constants.hpp" +#include +#include + AlignedArray Camera::m_end_cameras; Camera::Camera(int camera_index, const Kart* kart) diff --git a/src/graphics/camera.hpp b/src/graphics/camera.hpp index 420dcea03..c324128c4 100644 --- a/src/graphics/camera.hpp +++ b/src/graphics/camera.hpp @@ -24,7 +24,13 @@ #include -#include "irrlicht.h" +#include +#include +#include +namespace irr +{ + namespace scene { class ICameraSceneNode; } +} using namespace irr; #include "io/xml_node.hpp" diff --git a/src/graphics/explosion.cpp b/src/graphics/explosion.cpp index 67ffd3458..85b7a25a7 100644 --- a/src/graphics/explosion.cpp +++ b/src/graphics/explosion.cpp @@ -28,6 +28,8 @@ #include "race/race_manager.hpp" #include "utils/vec3.hpp" +#include + const float burst_time = 0.1f; Explosion::Explosion(const Vec3& coord, const char* explosion_sound, bool player_kart_hit) diff --git a/src/graphics/explosion.hpp b/src/graphics/explosion.hpp index ceacd8959..0f02f7d8e 100644 --- a/src/graphics/explosion.hpp +++ b/src/graphics/explosion.hpp @@ -22,7 +22,10 @@ #include "utils/no_copy.hpp" -#include "irrlicht.h" +namespace irr +{ + namespace scene { class IParticleSystemSceneNode; } +} using namespace irr; class Vec3; diff --git a/src/graphics/irr_driver.cpp b/src/graphics/irr_driver.cpp index 8542a4824..9a844005c 100644 --- a/src/graphics/irr_driver.cpp +++ b/src/graphics/irr_driver.cpp @@ -40,6 +40,8 @@ #include "states_screens/state_manager.hpp" #include "utils/constants.hpp" +#include + using namespace irr::core; using namespace irr::scene; using namespace irr::video; diff --git a/src/graphics/irr_driver.hpp b/src/graphics/irr_driver.hpp index 790d6dd3a..f9419efc2 100644 --- a/src/graphics/irr_driver.hpp +++ b/src/graphics/irr_driver.hpp @@ -27,7 +27,17 @@ #include #include -#include "irrlicht.h" +#include +#include +#include +#include +#include +namespace irr +{ + namespace scene { class ISceneManager; class IMesh; class IAnimatedMeshSceneNode; class IAnimatedMesh; + class IMeshSceneNode; class IParticleSystemSceneNode; class ICameraSceneNode; class ILightSceneNode; } + namespace gui { class IGUIEnvironment; class IGUIFont; } +} using namespace irr; #include "utils/aligned_array.hpp" @@ -39,7 +49,6 @@ using namespace irr; class Camera; class Kart; class PerCameraNode; -namespace irr { namespace scene { class IAnimatedMeshSceneNode; } } struct VideoMode { diff --git a/src/graphics/lod_node.cpp b/src/graphics/lod_node.cpp index 46858d2c9..c7800de71 100644 --- a/src/graphics/lod_node.cpp +++ b/src/graphics/lod_node.cpp @@ -19,6 +19,8 @@ #include "graphics/irr_driver.hpp" #include "graphics/lod_node.hpp" +#include +#include LODNode::LODNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id) : ISceneNode(parent, mgr, id) //: IDummyTransformationSceneNode(parent, mgr, id) diff --git a/src/graphics/lod_node.hpp b/src/graphics/lod_node.hpp index 3d4ac6d5d..0d1d0dfd2 100644 --- a/src/graphics/lod_node.hpp +++ b/src/graphics/lod_node.hpp @@ -19,7 +19,13 @@ #ifndef HEADER_LOD_NODE_HPP #define HEADER_LOD_NODE_HPP -#include "irrlicht.h" +#include +#include +#include +namespace irr +{ + namespace scene { class ISceneManager; } +} using namespace irr; #include diff --git a/src/graphics/material.hpp b/src/graphics/material.hpp index b704b9172..0b1eddb55 100644 --- a/src/graphics/material.hpp +++ b/src/graphics/material.hpp @@ -24,7 +24,10 @@ #include -#include "irrlicht.h" +namespace irr +{ + namespace video { class ITexture; class SMaterial; } +} using namespace irr; class XMLNode; diff --git a/src/graphics/material_manager.cpp b/src/graphics/material_manager.cpp index 5bdc54cc2..1c65aa41c 100644 --- a/src/graphics/material_manager.cpp +++ b/src/graphics/material_manager.cpp @@ -28,6 +28,10 @@ #include "io/xml_node.hpp" #include "utils/string_utils.hpp" +#include +#include +#include + MaterialManager *material_manager=0; MaterialManager::MaterialManager() diff --git a/src/graphics/material_manager.hpp b/src/graphics/material_manager.hpp index e06b92822..262df9bb2 100644 --- a/src/graphics/material_manager.hpp +++ b/src/graphics/material_manager.hpp @@ -22,7 +22,11 @@ #include "utils/no_copy.hpp" -#include "irrlicht.h" +namespace irr +{ + namespace video { class ITexture; } + namespace scene { class IMeshBuffer; } +} using namespace irr; #include diff --git a/src/graphics/mesh_tools.cpp b/src/graphics/mesh_tools.cpp index ea0106ce4..32e26964f 100644 --- a/src/graphics/mesh_tools.cpp +++ b/src/graphics/mesh_tools.cpp @@ -18,6 +18,8 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "graphics/mesh_tools.hpp" +#include +#include void MeshTools::minMax3D(scene::IMesh* mesh, Vec3 *min, Vec3 *max) { diff --git a/src/graphics/mesh_tools.hpp b/src/graphics/mesh_tools.hpp index 222a2a8b0..89e5638f8 100644 --- a/src/graphics/mesh_tools.hpp +++ b/src/graphics/mesh_tools.hpp @@ -20,7 +20,10 @@ #ifndef HEADER_MESH_TOOLS_HPP #define HEADER_MESH_TOOLS_HPP -#include "irrlicht.h" +namespace irr +{ + namespace scene { class IMesh; } +} using namespace irr; #include "utils/vec3.hpp" diff --git a/src/graphics/moving_texture.hpp b/src/graphics/moving_texture.hpp index 97ff00b90..e8219e117 100644 --- a/src/graphics/moving_texture.hpp +++ b/src/graphics/moving_texture.hpp @@ -23,7 +23,7 @@ #include "utils/no_copy.hpp" #include -#include "irrlicht.h" +#include using namespace irr; class XMLNode; diff --git a/src/graphics/particle_emitter.cpp b/src/graphics/particle_emitter.cpp index e39fda133..777e1adfd 100644 --- a/src/graphics/particle_emitter.cpp +++ b/src/graphics/particle_emitter.cpp @@ -27,6 +27,13 @@ #include "tracks/track.hpp" #include "utils/constants.hpp" +#include +#include +#include +#include +#include +#include + class FadeAwayAffector : public scene::IParticleAffector { /** (Squared) distance from camera at which a particle started being faded out */ diff --git a/src/graphics/particle_emitter.hpp b/src/graphics/particle_emitter.hpp index 3170b2f77..45e5adc4c 100644 --- a/src/graphics/particle_emitter.hpp +++ b/src/graphics/particle_emitter.hpp @@ -20,7 +20,10 @@ #ifndef HEADER_SMOKE_HPP #define HEADER_SMOKE_HPP -#include "irrlicht.h" +namespace irr +{ + namespace scene { class IParticleSystemSceneNode; class ISceneNode; class IParticleEmitter; } +} using namespace irr; #include "utils/no_copy.hpp" diff --git a/src/graphics/particle_kind.hpp b/src/graphics/particle_kind.hpp index 07cec23b3..497912d4c 100644 --- a/src/graphics/particle_kind.hpp +++ b/src/graphics/particle_kind.hpp @@ -23,7 +23,7 @@ #include "utils/no_copy.hpp" #include -#include "irrlicht.h" +#include using namespace irr; class Material; diff --git a/src/graphics/per_camera_node.cpp b/src/graphics/per_camera_node.cpp index 8acc4040a..af01a01af 100644 --- a/src/graphics/per_camera_node.cpp +++ b/src/graphics/per_camera_node.cpp @@ -19,6 +19,9 @@ #include "graphics/irr_driver.hpp" #include "graphics/per_camera_node.hpp" +#include +#include +#include PerCameraNode::PerCameraNode(scene::ISceneNode* parent, scene::ISceneManager* mgr, s32 id, scene::ICameraSceneNode* camera, scene::IMesh* mesh) diff --git a/src/graphics/per_camera_node.hpp b/src/graphics/per_camera_node.hpp index aa78fd910..29686fbcd 100644 --- a/src/graphics/per_camera_node.hpp +++ b/src/graphics/per_camera_node.hpp @@ -19,7 +19,14 @@ #ifndef HEADER_PER_CAMERA_HPP #define HEADER_PER_CAMERA_HPP -#include "irrlicht.h" +#include +#include +#include +#include +namespace irr +{ + namespace scene { class ICameraSceneNode; class ISceneNode; class ISceneManager; class IMesh; } +} using namespace irr; diff --git a/src/graphics/rain.cpp b/src/graphics/rain.cpp index 059d8299a..4bc6324c9 100644 --- a/src/graphics/rain.cpp +++ b/src/graphics/rain.cpp @@ -29,6 +29,9 @@ #include "utils/constants.hpp" #include "utils/random_generator.hpp" +#include +#include + const float RAIN_RADIUS[RAIN_RING_COUNT] = { 1.0f, 3.0f, 6.0f, 12.0f, 24.0f }; const float RAIN_Y_TO = 25.0f; const float RAIN_Y_FROM = -10.0f; diff --git a/src/graphics/rain.hpp b/src/graphics/rain.hpp index 9c39a435e..3a4a10cca 100644 --- a/src/graphics/rain.hpp +++ b/src/graphics/rain.hpp @@ -22,7 +22,14 @@ class PerCameraNode; -#include +#include +namespace irr +{ + namespace video { class SMaterial; } + namespace scene { class ICameraSceneNode; class ISceneNode; } +} +using namespace irr; + const int RAIN_RING_COUNT = 5; class SFXBase; diff --git a/src/graphics/skid_marks.cpp b/src/graphics/skid_marks.cpp index 21eddbd4b..f41a7aa48 100644 --- a/src/graphics/skid_marks.cpp +++ b/src/graphics/skid_marks.cpp @@ -23,6 +23,9 @@ #include "karts/kart.hpp" #include "physics/btKart.hpp" +#include +#include + float SkidMarks::m_avoid_z_fighting = 0.0f; const int SkidMarks::m_start_alpha = 128; const int SkidMarks::m_start_grey = 32; diff --git a/src/graphics/slip_stream.cpp b/src/graphics/slip_stream.cpp index 9c4882c4f..c7361d895 100644 --- a/src/graphics/slip_stream.cpp +++ b/src/graphics/slip_stream.cpp @@ -19,6 +19,7 @@ #include "graphics/slip_stream.hpp" +#include "graphics/material.hpp" #include "graphics/material_manager.hpp" #include "graphics/irr_driver.hpp" #include "io/file_manager.hpp" @@ -27,6 +28,10 @@ #include "tracks/quad.hpp" #include "utils/constants.hpp" +#include +#include +#include + /** Creates the slip stream object using a moving texture. * \param kart Pointer to the kart to which the slip stream * belongs to. diff --git a/src/graphics/stars.hpp b/src/graphics/stars.hpp index ce7fe50e5..024b39ef6 100644 --- a/src/graphics/stars.hpp +++ b/src/graphics/stars.hpp @@ -21,7 +21,11 @@ #include -#include "irrlicht.h" +#include +namespace irr +{ + namespace scene { class ISceneNode; } +} using namespace irr; /** diff --git a/src/guiengine/engine.cpp b/src/guiengine/engine.cpp index 50fbc8dd9..9f0d4157a 100644 --- a/src/guiengine/engine.cpp +++ b/src/guiengine/engine.cpp @@ -587,6 +587,8 @@ #include #include +#include + #include "io/file_manager.hpp" #include "input/input_manager.hpp" #include "guiengine/event_handler.hpp" diff --git a/src/guiengine/event_handler.cpp b/src/guiengine/event_handler.cpp index 3cac61a60..29688c5bc 100644 --- a/src/guiengine/event_handler.cpp +++ b/src/guiengine/event_handler.cpp @@ -17,6 +17,9 @@ #include "guiengine/event_handler.hpp" +#include +#include + #include "guiengine/abstract_state_manager.hpp" #include "guiengine/engine.hpp" #include "guiengine/modaldialog.hpp" diff --git a/src/guiengine/modaldialog.hpp b/src/guiengine/modaldialog.hpp index e844c3caf..055e9d8a0 100644 --- a/src/guiengine/modaldialog.hpp +++ b/src/guiengine/modaldialog.hpp @@ -18,10 +18,7 @@ #ifndef HEADER_MODAL_DIALOG_HPP #define HEADER_MODAL_DIALOG_HPP -namespace irr -{ - namespace gui { class IGUIWindow; } -} +#include #include "utils/ptr_vector.hpp" #include "guiengine/abstract_top_level_container.hpp" diff --git a/src/guiengine/skin.hpp b/src/guiengine/skin.hpp index 156ff70ed..2d8551052 100644 --- a/src/guiengine/skin.hpp +++ b/src/guiengine/skin.hpp @@ -19,7 +19,16 @@ #ifndef HEADER_SKIN_HPP #define HEADER_SKIN_HPP -#include "irrlicht.h" +#include +#include +#include +#include +#include +namespace irr +{ + namespace video { class ITexture; } + namespace gui { class IGUIElement; class IGUIFont; class IGUISpriteBank; } +} #include "utils/ptr_vector.hpp" /** diff --git a/src/guiengine/widget.cpp b/src/guiengine/widget.cpp index 93335d4ba..fc5001b57 100644 --- a/src/guiengine/widget.cpp +++ b/src/guiengine/widget.cpp @@ -317,6 +317,13 @@ void Widget::setParent(IGUIElement* parent) // ----------------------------------------------------------------------------- +bool Widget::isVisible() const +{ + return m_element && m_element->isVisible(); +} + +// ----------------------------------------------------------------------------- + void Widget::setVisible(bool visible) { if (m_element != NULL) @@ -332,3 +339,14 @@ void Widget::setVisible(bool visible) } } +// ----------------------------------------------------------------------------- + +void Widget::moveIrrlichtElement() +{ + if (m_element != NULL) + { + m_element->setRelativePosition( irr::core::recti(irr::core::position2di(m_x, m_y), + irr::core::dimension2di(m_w, m_h) ) ); + } +} + diff --git a/src/guiengine/widget.hpp b/src/guiengine/widget.hpp index 46b9eae0e..2e8eb44b9 100644 --- a/src/guiengine/widget.hpp +++ b/src/guiengine/widget.hpp @@ -316,7 +316,7 @@ namespace GUIEngine void setVisible(bool visible); /** Returns if the element is visible. */ - bool isVisible() const {return m_element && m_element->isVisible(); } + bool isVisible() const; /** * Call to resize/move the widget. Not all widgets can resize gracefully. @@ -384,15 +384,7 @@ namespace GUIEngine */ irr::gui::IGUIElement* getIrrlichtElement() { return m_element; } - void moveIrrlichtElement() - { - if (m_element != NULL) - { - m_element->setRelativePosition( irr::core::recti(irr::core::position2di(m_x, m_y), - irr::core::dimension2di(m_w, m_h) ) ); - } - } - + void moveIrrlichtElement(); bool isSameIrrlichtWidgetAs(const Widget* ref) const { return m_element == ref->m_element; } /** diff --git a/src/guiengine/widgets/button_widget.cpp b/src/guiengine/widgets/button_widget.cpp index 577b32777..e75e7869a 100644 --- a/src/guiengine/widgets/button_widget.cpp +++ b/src/guiengine/widgets/button_widget.cpp @@ -17,6 +17,9 @@ #include "guiengine/engine.hpp" #include "guiengine/widgets/button_widget.hpp" +#include +#include +#include using namespace GUIEngine; using namespace irr::core; using namespace irr; diff --git a/src/guiengine/widgets/check_box_widget.cpp b/src/guiengine/widgets/check_box_widget.cpp index cb4cca920..ea53d4a0f 100644 --- a/src/guiengine/widgets/check_box_widget.cpp +++ b/src/guiengine/widgets/check_box_widget.cpp @@ -17,6 +17,9 @@ #include "guiengine/engine.hpp" #include "guiengine/widgets/check_box_widget.hpp" +#include +#include +#include using namespace GUIEngine; using namespace irr::core; using namespace irr; diff --git a/src/guiengine/widgets/dynamic_ribbon_widget.cpp b/src/guiengine/widgets/dynamic_ribbon_widget.cpp index e5016fdb2..b4610dccc 100644 --- a/src/guiengine/widgets/dynamic_ribbon_widget.cpp +++ b/src/guiengine/widgets/dynamic_ribbon_widget.cpp @@ -21,6 +21,7 @@ #include "io/file_manager.hpp" #include "states_screens/state_manager.hpp" +#include #include using namespace GUIEngine; diff --git a/src/guiengine/widgets/icon_button_widget.cpp b/src/guiengine/widgets/icon_button_widget.cpp index dd9aafd7c..629ed6d55 100644 --- a/src/guiengine/widgets/icon_button_widget.cpp +++ b/src/guiengine/widgets/icon_button_widget.cpp @@ -22,6 +22,11 @@ #include "io/file_manager.hpp" #include "utils/translation.hpp" +#include +#include +#include +#include + using namespace GUIEngine; using namespace irr::video; using namespace irr::core; diff --git a/src/guiengine/widgets/label_widget.cpp b/src/guiengine/widgets/label_widget.cpp index 771c757b6..201c0e82e 100644 --- a/src/guiengine/widgets/label_widget.cpp +++ b/src/guiengine/widgets/label_widget.cpp @@ -22,6 +22,11 @@ #include "guiengine/skin.hpp" #include "utils/translation.hpp" +#include +#include +#include +#include + #include using namespace GUIEngine; diff --git a/src/guiengine/widgets/list_widget.cpp b/src/guiengine/widgets/list_widget.cpp index e0edbfc4e..162c7eab2 100644 --- a/src/guiengine/widgets/list_widget.cpp +++ b/src/guiengine/widgets/list_widget.cpp @@ -16,12 +16,14 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "graphics/irr_driver.hpp" +#include "guiengine/CGUISpriteBank.h" #include "guiengine/engine.hpp" #include "guiengine/widgets/list_widget.hpp" - #include "io/file_manager.hpp" -#include "guiengine/CGUISpriteBank.h" +#include +#include +#include #include diff --git a/src/guiengine/widgets/progress_bar_widget.cpp b/src/guiengine/widgets/progress_bar_widget.cpp index 28fb6bb13..fcd9a896d 100644 --- a/src/guiengine/widgets/progress_bar_widget.cpp +++ b/src/guiengine/widgets/progress_bar_widget.cpp @@ -19,6 +19,11 @@ #include "guiengine/widgets/progress_bar_widget.hpp" #include "utils/string_utils.hpp" #include + +#include +#include +#include + using namespace GUIEngine; using namespace irr::core; using namespace irr; diff --git a/src/guiengine/widgets/ribbon_widget.cpp b/src/guiengine/widgets/ribbon_widget.cpp index 2c6994ef7..a31e8a84d 100644 --- a/src/guiengine/widgets/ribbon_widget.cpp +++ b/src/guiengine/widgets/ribbon_widget.cpp @@ -29,6 +29,10 @@ #include "states_screens/state_manager.hpp" #include "utils/string_utils.hpp" +#include +#include +#include + using namespace GUIEngine; using namespace irr::core; using namespace irr::gui; diff --git a/src/guiengine/widgets/ribbon_widget.hpp b/src/guiengine/widgets/ribbon_widget.hpp index 5c033c8f7..696e20330 100644 --- a/src/guiengine/widgets/ribbon_widget.hpp +++ b/src/guiengine/widgets/ribbon_widget.hpp @@ -26,6 +26,8 @@ #include "guiengine/widgets/icon_button_widget.hpp" #include "utils/ptr_vector.hpp" +#include + namespace GUIEngine { /** Types of ribbons */ diff --git a/src/guiengine/widgets/spinner_widget.cpp b/src/guiengine/widgets/spinner_widget.cpp index 3a9b7093a..4a13d7204 100644 --- a/src/guiengine/widgets/spinner_widget.cpp +++ b/src/guiengine/widgets/spinner_widget.cpp @@ -23,6 +23,12 @@ #include "io/file_manager.hpp" #include "utils/string_utils.hpp" #include "utils/translation.hpp" + +#include +#include +#include +#include +#include using namespace GUIEngine; using namespace irr::core; using namespace irr::gui; diff --git a/src/guiengine/widgets/text_box_widget.cpp b/src/guiengine/widgets/text_box_widget.cpp index 9445f524f..7911db0b2 100644 --- a/src/guiengine/widgets/text_box_widget.cpp +++ b/src/guiengine/widgets/text_box_widget.cpp @@ -23,6 +23,10 @@ #include "utils/ptr_vector.hpp" #include "utils/translation.hpp" +#include +#include +#include + using namespace irr; class MyCGUIEditBox : public CGUIEditBox diff --git a/src/items/bowling.cpp b/src/items/bowling.cpp index e6d441a23..e61f38638 100644 --- a/src/items/bowling.cpp +++ b/src/items/bowling.cpp @@ -18,6 +18,7 @@ // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "graphics/camera.hpp" +#include "graphics/material.hpp" #include "io/xml_node.hpp" #include "items/bowling.hpp" #include "karts/kart.hpp" diff --git a/src/items/flyable.cpp b/src/items/flyable.cpp index 9975defa5..0c4704281 100644 --- a/src/items/flyable.cpp +++ b/src/items/flyable.cpp @@ -27,6 +27,8 @@ #endif #include +#include + #include "graphics/irr_driver.hpp" #include "graphics/mesh_tools.hpp" #include "graphics/stars.hpp" diff --git a/src/items/item.cpp b/src/items/item.cpp index f55bd7b8c..93b56a3ff 100644 --- a/src/items/item.cpp +++ b/src/items/item.cpp @@ -19,6 +19,9 @@ #include "items/item.hpp" +#include +#include + #include "graphics/irr_driver.hpp" #include "graphics/lod_node.hpp" #include "karts/kart.hpp" diff --git a/src/items/rubber_band.cpp b/src/items/rubber_band.cpp index 22d1d947a..9bd764b9b 100644 --- a/src/items/rubber_band.cpp +++ b/src/items/rubber_band.cpp @@ -19,6 +19,8 @@ #include "items/rubber_band.hpp" +#include + #include "graphics/irr_driver.hpp" #include "graphics/material_manager.hpp" #include "items/plunger.hpp" diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index 944f41849..f74e5f894 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -24,6 +24,9 @@ #include #include // for min and max +#include +#include + #include "audio/music_manager.hpp" #include "audio/sfx_manager.hpp" #include "audio/sfx_base.hpp" diff --git a/src/karts/kart.hpp b/src/karts/kart.hpp index 1cebf9de9..15daeba57 100644 --- a/src/karts/kart.hpp +++ b/src/karts/kart.hpp @@ -48,6 +48,7 @@ class SFXBase; class SkidMarks; class SlipStream; class ParticleEmitter; +class ParticleKind; class Rain; /** The main kart class. All type of karts are of this object, but with diff --git a/src/karts/kart_model.cpp b/src/karts/kart_model.cpp index 142f49323..69cc877cb 100644 --- a/src/karts/kart_model.cpp +++ b/src/karts/kart_model.cpp @@ -19,6 +19,8 @@ #include "karts/kart_model.hpp" +#include + #include "config/stk_config.hpp" #include "config/user_config.hpp" #include "graphics/irr_driver.hpp" diff --git a/src/modes/profile_world.cpp b/src/modes/profile_world.cpp index c3718387c..1f94598df 100644 --- a/src/modes/profile_world.cpp +++ b/src/modes/profile_world.cpp @@ -23,6 +23,8 @@ #include "graphics/irr_driver.hpp" #include "tracks/track.hpp" +#include + ProfileWorld::ProfileType ProfileWorld::m_profile_mode=PROFILE_NONE; int ProfileWorld::m_num_laps = 0; float ProfileWorld::m_time = 0.0f; diff --git a/src/physics/irr_debug_drawer.hpp b/src/physics/irr_debug_drawer.hpp index dd5a4b020..73e61c80d 100644 --- a/src/physics/irr_debug_drawer.hpp +++ b/src/physics/irr_debug_drawer.hpp @@ -20,9 +20,6 @@ #ifndef HEADER_IRR_DEBUG_DRAWER_HPP #define HEADER_IRR_DEBUG_DRAWER_HPP -#include "irrlicht.h" -using namespace irr; - #include "btBulletDynamicsCommon.h" #include "graphics/irr_driver.hpp" diff --git a/src/states_screens/dialogs/add_device_dialog.cpp b/src/states_screens/dialogs/add_device_dialog.cpp index e1d1ab230..846d6aa8b 100644 --- a/src/states_screens/dialogs/add_device_dialog.cpp +++ b/src/states_screens/dialogs/add_device_dialog.cpp @@ -30,6 +30,9 @@ #include "utils/string_utils.hpp" #include "utils/translation.hpp" +#include +#include + using namespace GUIEngine; using namespace irr::gui; using namespace irr::core; diff --git a/src/states_screens/dialogs/enter_player_name_dialog.cpp b/src/states_screens/dialogs/enter_player_name_dialog.cpp index add166837..0f124f5cb 100644 --- a/src/states_screens/dialogs/enter_player_name_dialog.cpp +++ b/src/states_screens/dialogs/enter_player_name_dialog.cpp @@ -17,6 +17,8 @@ #include "states_screens/dialogs/enter_player_name_dialog.hpp" +#include + #include "audio/sfx_manager.hpp" #include "guiengine/engine.hpp" #include "guiengine/widgets/button_widget.hpp" diff --git a/src/states_screens/dialogs/player_info_dialog.cpp b/src/states_screens/dialogs/player_info_dialog.cpp index 8a5959881..f6b1aed3b 100644 --- a/src/states_screens/dialogs/player_info_dialog.cpp +++ b/src/states_screens/dialogs/player_info_dialog.cpp @@ -17,6 +17,9 @@ #include "states_screens/dialogs/player_info_dialog.hpp" +#include +#include + #include "config/player.hpp" #include "guiengine/engine.hpp" #include "guiengine/widgets/button_widget.hpp" diff --git a/src/states_screens/feature_unlocked.cpp b/src/states_screens/feature_unlocked.cpp index b05b8f57c..ec16d3ab9 100644 --- a/src/states_screens/feature_unlocked.cpp +++ b/src/states_screens/feature_unlocked.cpp @@ -36,6 +36,11 @@ #include "tracks/track_manager.hpp" #include "utils/translation.hpp" +#include +#include +#include +#include + using namespace irr::core; using namespace irr::gui; using namespace irr::video; diff --git a/src/states_screens/grand_prix_lose.cpp b/src/states_screens/grand_prix_lose.cpp index 9a670b9e0..ce269fc71 100644 --- a/src/states_screens/grand_prix_lose.cpp +++ b/src/states_screens/grand_prix_lose.cpp @@ -19,8 +19,6 @@ #include "states_screens/grand_prix_lose.hpp" -#include -#include #include "audio/music_manager.hpp" #include "audio/sfx_manager.hpp" @@ -36,6 +34,13 @@ #include "states_screens/state_manager.hpp" #include "utils/translation.hpp" +#include +#include +#include +#include +#include +//#include + using namespace irr::core; using namespace irr::gui; using namespace irr::video; diff --git a/src/states_screens/grand_prix_lose.hpp b/src/states_screens/grand_prix_lose.hpp index 7e34bb37d..0d8906b05 100644 --- a/src/states_screens/grand_prix_lose.hpp +++ b/src/states_screens/grand_prix_lose.hpp @@ -26,7 +26,7 @@ #include #include -namespace irr { namespace scene { class ISceneNode; class ICameraSceneNode; class ILightSceneNode; } } +namespace irr { namespace scene { class ISceneNode; class ICameraSceneNode; class ILightSceneNode; class IMeshSceneNode; } } class KartProperties; /** diff --git a/src/states_screens/grand_prix_win.cpp b/src/states_screens/grand_prix_win.cpp index 5f832794f..9fda0d268 100644 --- a/src/states_screens/grand_prix_win.cpp +++ b/src/states_screens/grand_prix_win.cpp @@ -36,6 +36,13 @@ #include "states_screens/state_manager.hpp" #include "utils/translation.hpp" +#include +#include +#include +#include +#include +#include + using namespace irr::core; using namespace irr::gui; using namespace irr::video; diff --git a/src/states_screens/grand_prix_win.hpp b/src/states_screens/grand_prix_win.hpp index 03e2adea7..acacfa114 100644 --- a/src/states_screens/grand_prix_win.hpp +++ b/src/states_screens/grand_prix_win.hpp @@ -23,7 +23,7 @@ #include "guiengine/screen.hpp" #include "karts/kart_model.hpp" -namespace irr { namespace scene { class ISceneNode; class ICameraSceneNode; class ILightSceneNode; } } +namespace irr { namespace scene { class ISceneNode; class ICameraSceneNode; class ILightSceneNode; class IMeshSceneNode; } } class KartProperties; /** diff --git a/src/states_screens/race_gui_base.cpp b/src/states_screens/race_gui_base.cpp index 5ff712130..b38b0ca41 100644 --- a/src/states_screens/race_gui_base.cpp +++ b/src/states_screens/race_gui_base.cpp @@ -33,6 +33,7 @@ #include "audio/music_manager.hpp" #include "graphics/irr_driver.hpp" +#include "graphics/material.hpp" #include "graphics/material_manager.hpp" #include "guiengine/scalable_font.hpp" #include "io/file_manager.hpp" @@ -41,6 +42,8 @@ #include "modes/follow_the_leader.hpp" #include "modes/world.hpp" +#include + RaceGUIBase::RaceGUIBase() { m_lightning = 0.0f; diff --git a/src/states_screens/race_result_gui.cpp b/src/states_screens/race_result_gui.cpp index 292f6e20c..b18c5c51a 100644 --- a/src/states_screens/race_result_gui.cpp +++ b/src/states_screens/race_result_gui.cpp @@ -22,6 +22,7 @@ #include "audio/music_manager.hpp" #include "audio/sfx_base.hpp" #include "challenges/unlock_manager.hpp" +#include "graphics/material.hpp" #include "guiengine/engine.hpp" #include "guiengine/scalable_font.hpp" #include "guiengine/widget.hpp" diff --git a/src/tracks/quad_graph.cpp b/src/tracks/quad_graph.cpp index e7b1341aa..4c9b2b5a4 100644 --- a/src/tracks/quad_graph.cpp +++ b/src/tracks/quad_graph.cpp @@ -21,6 +21,9 @@ #include "LinearMath/btTransform.h" +#include +#include + #include "config/user_config.hpp" #include "graphics/irr_driver.hpp" #include "io/file_manager.hpp" diff --git a/src/tracks/terrain_info.hpp b/src/tracks/terrain_info.hpp index a884c1243..aac963496 100644 --- a/src/tracks/terrain_info.hpp +++ b/src/tracks/terrain_info.hpp @@ -20,9 +20,10 @@ #ifndef HEADER_TERRAIN_INFO_HPP #define HEADER_TERRAIN_INFO_HPP -#include "graphics/material.hpp" #include "utils/vec3.hpp" +class Material; + /** This class stores information about the triangle that's under an object, i.e.: * the normal, a pointer to the material, and the height above th * \ingroup tracks diff --git a/src/tracks/track.hpp b/src/tracks/track.hpp index fe0e3a831..2bd2e9388 100644 --- a/src/tracks/track.hpp +++ b/src/tracks/track.hpp @@ -25,8 +25,8 @@ namespace irr { - namespace video { class ITexture; class SColor; } - namespace scene { class IMesh; } + namespace video { class ITexture; class SColor; } + namespace scene { class IMesh; class ILightSceneNode; } } using namespace irr;