diff --git a/src/config/device_config.cpp b/src/config/device_config.cpp index f81b36158..a39df860f 100644 --- a/src/config/device_config.cpp +++ b/src/config/device_config.cpp @@ -20,7 +20,7 @@ #include #include "config/device_config.hpp" -#include +#include //==== D E V I C E C O N F I G ================================================= diff --git a/src/graphics/shadow.hpp b/src/graphics/shadow.hpp index a0f4edfa3..5e553f458 100644 --- a/src/graphics/shadow.hpp +++ b/src/graphics/shadow.hpp @@ -24,7 +24,11 @@ #include -#include "irrlicht.h" +namespace irr +{ + namespace scene { class ISceneNode; class IMesh; } + namespace video { class ITexture; } +} using namespace irr; /** diff --git a/src/graphics/skid_marks.hpp b/src/graphics/skid_marks.hpp index 9a7195b1a..d59b4bb21 100644 --- a/src/graphics/skid_marks.hpp +++ b/src/graphics/skid_marks.hpp @@ -22,7 +22,13 @@ #include -#include "irrlicht.h" +#include +#include +namespace irr +{ + namespace video { class SMaterial; } + namespace scene { class IMeshSceneNode; } +} using namespace irr; #include "utils/no_copy.hpp" diff --git a/src/graphics/slip_stream.hpp b/src/graphics/slip_stream.hpp index 40360bc89..2d9ca1c26 100644 --- a/src/graphics/slip_stream.hpp +++ b/src/graphics/slip_stream.hpp @@ -20,7 +20,12 @@ #ifndef HEADER_SLIP_STREAM_HPP #define HEADER_SLIP_STREAM_HPP -#include "irrlicht.h" +#include +namespace irr +{ + namespace video { class SMaterial; class SColor; } + namespace scene { class IMeshSceneNode; class IMesh; class IMesh; } +} using namespace irr; #include "graphics/moving_texture.hpp" diff --git a/src/input/binding.cpp b/src/input/binding.cpp index 195420308..fe74c2520 100644 --- a/src/input/binding.cpp +++ b/src/input/binding.cpp @@ -17,7 +17,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#include +#include #include "input/binding.hpp" #include "utils/string_utils.hpp" #include "utils/translation.hpp" diff --git a/src/input/input_manager.hpp b/src/input/input_manager.hpp index da6710330..73f7d85a6 100644 --- a/src/input/input_manager.hpp +++ b/src/input/input_manager.hpp @@ -22,7 +22,6 @@ #include #include -#include #include #include "guiengine/event_handler.hpp" diff --git a/src/karts/controller/controller.hpp b/src/karts/controller/controller.hpp index 0f2052100..537ac0e08 100644 --- a/src/karts/controller/controller.hpp +++ b/src/karts/controller/controller.hpp @@ -20,7 +20,7 @@ #ifndef HEADER_CONTROLLER_HPP #define HEADER_CONTROLLER_HPP -#include "irrlicht.h" +#include using namespace irr; #include "input/input.hpp" diff --git a/src/karts/kart_model.hpp b/src/karts/kart_model.hpp index 847cd8f18..2c75cddaa 100644 --- a/src/karts/kart_model.hpp +++ b/src/karts/kart_model.hpp @@ -22,7 +22,11 @@ #include -#include "irrlicht.h" +#include +namespace irr +{ + namespace scene { class IAnimatedMesh; class IMesh; class ISceneNode; } +} using namespace irr; #include "utils/no_copy.hpp" diff --git a/src/karts/kart_properties.hpp b/src/karts/kart_properties.hpp index 2d3ecc5e6..2cfc64ff3 100644 --- a/src/karts/kart_properties.hpp +++ b/src/karts/kart_properties.hpp @@ -23,7 +23,12 @@ #include #include -#include "irrlicht.h" +#include +#include +namespace irr +{ + namespace video { class ITexture; } +} using namespace irr; #include "audio/sfx_manager.hpp" diff --git a/src/tinygettext/dictionary_manager.cpp b/src/tinygettext/dictionary_manager.cpp index dacffe835..02d4d57d2 100644 --- a/src/tinygettext/dictionary_manager.cpp +++ b/src/tinygettext/dictionary_manager.cpp @@ -48,10 +48,17 @@ DictionaryManager::DictionaryManager(const std::string& charset_) : empty_dict(), filesystem(new StkFileSystem) { +#ifdef DEBUG + m_magic_number = 0xD1C70471; +#endif } DictionaryManager::~DictionaryManager() { +#ifdef DEBUG + assert(m_magic_number == 0xD1C70471); + m_magic_number = 0xDEADBEEF; +#endif for(Dictionaries::iterator i = dictionaries.begin(); i != dictionaries.end(); ++i) { delete i->second; diff --git a/src/tinygettext/dictionary_manager.hpp b/src/tinygettext/dictionary_manager.hpp index 059dcafc0..c507c1578 100644 --- a/src/tinygettext/dictionary_manager.hpp +++ b/src/tinygettext/dictionary_manager.hpp @@ -55,6 +55,10 @@ private: void clear_cache(); +#ifdef DEBUG + unsigned int m_magic_number; +#endif + public: DictionaryManager(const std::string& charset_ = "UTF-8"); ~DictionaryManager();