diff --git a/src/Makefile.am b/src/Makefile.am index ddc4f1b80..bbaaed610 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -10,8 +10,6 @@ AM_CPPFLAGS = -DSUPERTUXKART_DATADIR="\"$(datadir)/games/$(PACKAGE)/\"" \ supertuxkart_SOURCES = \ main.cpp \ - material.cpp \ - material.hpp \ network/network_manager.cpp \ network/network_manager.hpp \ network/network_kart.cpp \ @@ -55,6 +53,8 @@ supertuxkart_SOURCES = \ audio/sound_manager.hpp \ utils/constants.hpp \ utils/coord.hpp \ + utils/no_copy.hpp \ + utils/ptr_vector.hpp \ utils/random_generator.hpp \ utils/random_generator.cpp \ utils/string_utils.cpp \ @@ -63,14 +63,18 @@ supertuxkart_SOURCES = \ utils/translation.hpp \ utils/vec3.cpp \ utils/vec3.hpp \ - material_manager.cpp \ - material_manager.hpp \ grand_prix_manager.cpp \ grand_prix_manager.hpp \ graphics/camera.cpp \ graphics/camera.hpp \ + graphics/explosion.cpp \ + graphics/explosion.hpp \ graphics/irr_driver.cpp \ graphics/irr_driver.hpp \ + graphics/material.cpp \ + graphics/material.hpp \ + graphics/material_manager.cpp \ + graphics/material_manager.hpp \ graphics/mesh_tools.hpp \ graphics/mesh_tools.cpp \ graphics/nitro.cpp \ @@ -142,8 +146,6 @@ supertuxkart_SOURCES = \ input/input_manager.hpp \ isect.cpp \ isect.hpp \ - explosion.cpp \ - explosion.hpp \ user_config.cpp \ user_config.hpp \ grand_prix_data.cpp \ @@ -161,7 +163,6 @@ supertuxkart_SOURCES = \ user_pointer.hpp \ history.cpp \ history.hpp \ - no_copy.hpp \ player.hpp \ challenges/challenge.hpp \ challenges/challenge.cpp \ diff --git a/src/explosion.cpp b/src/graphics/explosion.cpp similarity index 97% rename from src/explosion.cpp rename to src/graphics/explosion.cpp index 358ad053f..6c232cfdb 100644 --- a/src/explosion.cpp +++ b/src/graphics/explosion.cpp @@ -17,15 +17,15 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#include "explosion.hpp" +#include "graphics/explosion.hpp" -#include "material.hpp" -#include "material_manager.hpp" -#include "graphics/irr_driver.hpp" -#include "items/projectile_manager.hpp" #include "audio/sfx_base.hpp" #include "audio/sfx_manager.hpp" +#include "graphics/irr_driver.hpp" +#include "graphics/material.hpp" +#include "graphics/material_manager.hpp" #include "graphics/scene.hpp" +#include "items/projectile_manager.hpp" #include "utils/vec3.hpp" Explosion::Explosion(const Vec3& coord, const int explosion_sound) diff --git a/src/explosion.hpp b/src/graphics/explosion.hpp similarity index 100% rename from src/explosion.hpp rename to src/graphics/explosion.hpp diff --git a/src/material.cpp b/src/graphics/material.cpp similarity index 99% rename from src/material.cpp rename to src/graphics/material.cpp index c259ee305..afc33d3a8 100644 --- a/src/material.cpp +++ b/src/graphics/material.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 "material.hpp" +#include "graphics/material.hpp" #include diff --git a/src/material.hpp b/src/graphics/material.hpp similarity index 100% rename from src/material.hpp rename to src/graphics/material.hpp diff --git a/src/material_manager.cpp b/src/graphics/material_manager.cpp similarity index 98% rename from src/material_manager.cpp rename to src/graphics/material_manager.cpp index 4ec3d2125..76f8a1941 100644 --- a/src/material_manager.cpp +++ b/src/graphics/material_manager.cpp @@ -17,12 +17,12 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -#include "material_manager.hpp" +#include "graphics/material_manager.hpp" #include #include -#include "material.hpp" +#include "graphics/material.hpp" #include "io/file_manager.hpp" #include "io/xml_node.hpp" #include "utils/string_utils.hpp" diff --git a/src/material_manager.hpp b/src/graphics/material_manager.hpp similarity index 100% rename from src/material_manager.hpp rename to src/graphics/material_manager.hpp diff --git a/src/gui/credits.hpp b/src/gui/credits.hpp index f47c4ad8d..dcfa1dfe1 100644 --- a/src/gui/credits.hpp +++ b/src/gui/credits.hpp @@ -1,7 +1,7 @@ #ifndef HEADER_CREDITS_HPP #define HEADER_CREDITS_HPP -#include "ptr_vector.hpp" +#include "utils/ptr_vector.hpp" namespace GUIEngine { diff --git a/src/gui/race_gui.cpp b/src/gui/race_gui.cpp index 54695e55d..b0ccdd22b 100644 --- a/src/gui/race_gui.cpp +++ b/src/gui/race_gui.cpp @@ -20,14 +20,14 @@ #include "gui/race_gui.hpp" -#include "input/input.hpp" -#include "input/input_manager.hpp" #include "user_config.hpp" #include "race_manager.hpp" -#include "material_manager.hpp" #include "audio/sound_manager.hpp" #include "graphics/irr_driver.hpp" +#include "graphics/material_manager.hpp" #include "gui/font.hpp" +#include "input/input.hpp" +#include "input/input_manager.hpp" #include "tracks/track.hpp" #include "utils/constants.hpp" #include "utils/translation.hpp" diff --git a/src/gui/race_gui.hpp b/src/gui/race_gui.hpp index 565d1d9f8..03ca60442 100644 --- a/src/gui/race_gui.hpp +++ b/src/gui/race_gui.hpp @@ -29,9 +29,9 @@ using namespace irr; #include #include -#include "material.hpp" #include "player.hpp" #include "race_manager.hpp" +#include "graphics/material.hpp" #include "karts/kart.hpp" #include "karts/player_kart.hpp" #include "modes/world.hpp" diff --git a/src/gui/screen.hpp b/src/gui/screen.hpp index f89967740..250af7c93 100644 --- a/src/gui/screen.hpp +++ b/src/gui/screen.hpp @@ -3,9 +3,11 @@ #include #include -#include "ptr_vector.hpp" + +#include "irrlicht.h" + #include "input/input.hpp" -#include +#include "utils/ptr_vector.hpp" using namespace irr; using namespace core; diff --git a/src/gui/skin.hpp b/src/gui/skin.hpp index a5d3f46bf..471b1d070 100644 --- a/src/gui/skin.hpp +++ b/src/gui/skin.hpp @@ -1,8 +1,8 @@ #ifndef HEADER_SKIN_HPP #define HEADER_SKIN_HPP -#include -#include "ptr_vector.hpp" +#include "irrlicht.h" +#include "utils/ptr_vector.hpp" using namespace irr; using namespace core; diff --git a/src/gui/widget.hpp b/src/gui/widget.hpp index f4ad44070..eb0e0c265 100644 --- a/src/gui/widget.hpp +++ b/src/gui/widget.hpp @@ -3,7 +3,8 @@ #include #include -#include "ptr_vector.hpp" + +#include "utils/ptr_vector.hpp" using namespace irr; using namespace gui; diff --git a/src/ide/vc9/supertuxkart.vcproj b/src/ide/vc9/supertuxkart.vcproj index ff587a61e..da9bf0160 100644 --- a/src/ide/vc9/supertuxkart.vcproj +++ b/src/ide/vc9/supertuxkart.vcproj @@ -193,10 +193,6 @@ Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" > - - @@ -229,14 +225,6 @@ RelativePath="..\..\main_loop.cpp" > - - - - @@ -528,10 +516,22 @@ RelativePath="..\..\graphics\camera.cpp" > + + + + + + @@ -699,10 +699,6 @@ RelativePath="../../../src\constants.hpp" > - - @@ -751,10 +747,6 @@ RelativePath="../../../src\material_manager.hpp" > - - @@ -763,10 +755,6 @@ RelativePath="..\..\position.hpp" > - - @@ -970,6 +958,14 @@ RelativePath="..\..\utils\coord.hpp" > + + + + @@ -1174,10 +1170,22 @@ RelativePath="..\..\graphics\camera.hpp" > + + + + + + diff --git a/src/input/device_manager.hpp b/src/input/device_manager.hpp index f95daa34c..602aae763 100644 --- a/src/input/device_manager.hpp +++ b/src/input/device_manager.hpp @@ -1,8 +1,8 @@ #ifndef DEVICE_MANAGER_HPP #define DEVICE_MANAGER_HPP -#include "ptr_vector.hpp" #include "input/input_device.hpp" +#include "utils/ptr_vector.hpp" class DeviceManager { diff --git a/src/io/file_manager.cpp b/src/io/file_manager.cpp index 73fe82c74..578ea1c0d 100644 --- a/src/io/file_manager.cpp +++ b/src/io/file_manager.cpp @@ -41,7 +41,7 @@ #include "btBulletDynamicsCommon.h" #include "graphics/irr_driver.hpp" -#include "material_manager.hpp" +#include "graphics/material_manager.hpp" #include "utils/string_utils.hpp" #ifdef __APPLE__ diff --git a/src/items/item_manager.cpp b/src/items/item_manager.cpp index dffe63a4e..d6469d29a 100644 --- a/src/items/item_manager.cpp +++ b/src/items/item_manager.cpp @@ -22,9 +22,9 @@ #include #include "user_config.hpp" -#include "material_manager.hpp" -#include "material.hpp" #include "graphics/irr_driver.hpp" +#include "graphics/material.hpp" +#include "graphics/material_manager.hpp" #include "io/file_manager.hpp" #include "items/item_manager.hpp" #include "items/bubblegumitem.hpp" diff --git a/src/items/powerup_manager.cpp b/src/items/powerup_manager.cpp index 65232a8de..375ff1991 100644 --- a/src/items/powerup_manager.cpp +++ b/src/items/powerup_manager.cpp @@ -23,9 +23,9 @@ #include #include -#include "material_manager.hpp" -#include "material.hpp" #include "graphics/irr_driver.hpp" +#include "graphics/material.hpp" +#include "graphics/material_manager.hpp" #include "io/file_manager.hpp" #include "items/bowling.hpp" #include "items/cake.hpp" diff --git a/src/items/projectile_manager.cpp b/src/items/projectile_manager.cpp index dfb4b8f2a..e9a0f17ea 100644 --- a/src/items/projectile_manager.cpp +++ b/src/items/projectile_manager.cpp @@ -19,13 +19,13 @@ #include "items/projectile_manager.hpp" -#include "explosion.hpp" +#include "graphics/explosion.hpp" +#include "graphics/scene.hpp" #include "items/bowling.hpp" #include "items/cake.hpp" #include "items/plunger.hpp" #include "items/powerup_manager.hpp" #include "items/powerup.hpp" -#include "graphics/scene.hpp" #include "network/network_manager.hpp" #include "network/race_state.hpp" diff --git a/src/items/rubber_band.cpp b/src/items/rubber_band.cpp index d4003cf9b..95211ffc3 100644 --- a/src/items/rubber_band.cpp +++ b/src/items/rubber_band.cpp @@ -19,9 +19,9 @@ #include "rubber_band.hpp" -#include "material_manager.hpp" #include "race_manager.hpp" #include "graphics/irr_driver.hpp" +#include "graphics/material_manager.hpp" #include "graphics/scene.hpp" #include "items/plunger.hpp" #include "items/projectile_manager.hpp" diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index 6af077767..d364d975b 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -27,10 +27,10 @@ #include "bullet/Demos/OpenGL/GL_ShapeDrawer.h" #include "user_config.hpp" -#include "material_manager.hpp" #include "audio/sound_manager.hpp" #include "audio/sfx_manager.hpp" #include "audio/sfx_base.hpp" +#include "graphics/material_manager.hpp" #include "graphics/nitro.hpp" #include "graphics/shadow.hpp" #include "graphics/skid_marks.hpp" diff --git a/src/karts/kart_model.hpp b/src/karts/kart_model.hpp index 02182fac4..2fb83b66a 100644 --- a/src/karts/kart_model.hpp +++ b/src/karts/kart_model.hpp @@ -25,8 +25,8 @@ #include "irrlicht.h" using namespace irr; -#include "no_copy.hpp" #include "lisp/lisp.hpp" +#include "utils/no_copy.hpp" #include "utils/vec3.hpp" /** This class stores a 3D kart model. It takes especially care of attaching diff --git a/src/karts/kart_properties.cpp b/src/karts/kart_properties.cpp index b704d2d6e..395c00527 100644 --- a/src/karts/kart_properties.cpp +++ b/src/karts/kart_properties.cpp @@ -21,11 +21,11 @@ #include #include -#include "material_manager.hpp" #include "stk_config.hpp" #include "user_config.hpp" -#include "karts/kart_model.hpp" +#include "graphics/material_manager.hpp" #include "io/file_manager.hpp" +#include "karts/kart_model.hpp" #include "lisp/parser.hpp" #include "lisp/lisp.hpp" #include "utils/string_utils.hpp" diff --git a/src/karts/moveable.cpp b/src/karts/moveable.cpp index 1d3dc31e8..1c4cae061 100644 --- a/src/karts/moveable.cpp +++ b/src/karts/moveable.cpp @@ -20,10 +20,10 @@ #include "karts/moveable.hpp" -#include "material_manager.hpp" -#include "material.hpp" #include "user_config.hpp" #include "graphics/irr_driver.hpp" +#include "graphics/material.hpp" +#include "graphics/material_manager.hpp" #include "karts/player_kart.hpp" #include "utils/coord.hpp" diff --git a/src/main.cpp b/src/main.cpp index 073cfc7aa..03cb63a1c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -41,8 +41,6 @@ #include "user_config.hpp" #include "race_manager.hpp" #include "main_loop.hpp" -#include "material_manager.hpp" -#include "input/input_manager.hpp" #include "history.hpp" #include "stk_config.hpp" #include "highscore_manager.hpp" @@ -51,9 +49,11 @@ #include "audio/sfx_manager.hpp" #include "challenges/unlock_manager.hpp" #include "graphics/irr_driver.hpp" +#include "graphics/material_manager.hpp" #include "graphics/scene.hpp" #include "gui/font.hpp" #include "io/file_manager.hpp" +#include "input/input_manager.hpp" #include "items/attachment_manager.hpp" #include "items/item_manager.hpp" #include "items/projectile_manager.hpp" diff --git a/src/main_loop.cpp b/src/main_loop.cpp index f37debcf7..e1b587708 100644 --- a/src/main_loop.cpp +++ b/src/main_loop.cpp @@ -20,16 +20,17 @@ #include "main_loop.hpp" #include + #include "history.hpp" -#include "input/input_manager.hpp" -#include "material_manager.hpp" #include "race_manager.hpp" +#include "user_config.hpp" #include "audio/sound_manager.hpp" #include "graphics/irr_driver.hpp" +#include "graphics/material_manager.hpp" #include "graphics/scene.hpp" #include "gui/engine.hpp" +#include "input/input_manager.hpp" #include "modes/world.hpp" -#include "user_config.hpp" #include "network/network_manager.hpp" #include "gui/state_manager.hpp" diff --git a/src/tracks/terrain_info.hpp b/src/tracks/terrain_info.hpp index afe50f58f..ee9655e76 100644 --- a/src/tracks/terrain_info.hpp +++ b/src/tracks/terrain_info.hpp @@ -20,7 +20,7 @@ #ifndef HEADER_TERRAIN_INFO_HPP #define HEADER_TERRAIN_INFO_HPP -#include "material.hpp" +#include "graphics/material.hpp" #include "utils/vec3.hpp" /** This class stores information about the triangle that's under an object, i.e.: diff --git a/src/tracks/track.cpp b/src/tracks/track.cpp index c74480cd2..1aee36ba3 100644 --- a/src/tracks/track.cpp +++ b/src/tracks/track.cpp @@ -25,11 +25,11 @@ #include "irrlicht.h" #include "stk_config.hpp" -#include "material_manager.hpp" #include "isect.hpp" #include "user_config.hpp" #include "audio/sound_manager.hpp" #include "graphics/irr_driver.hpp" +#include "graphics/material_manager.hpp" #include "graphics/mesh_tools.hpp" #include "graphics/moving_texture.hpp" #include "graphics/scene.hpp" diff --git a/src/tracks/track.hpp b/src/tracks/track.hpp index 882351ee4..4b2c7aca7 100644 --- a/src/tracks/track.hpp +++ b/src/tracks/track.hpp @@ -28,13 +28,15 @@ # include #endif -#include "irrlicht.h" -using namespace irr; #include #include + +#include "irrlicht.h" +using namespace irr; + #include "LinearMath/btTransform.h" -#include "material.hpp" #include "audio/music_information.hpp" +#include "graphics/material.hpp" #include "items/item.hpp" #include "tracks/quad_graph.hpp" #include "utils/vec3.hpp" diff --git a/src/no_copy.hpp b/src/utils/no_copy.hpp similarity index 100% rename from src/no_copy.hpp rename to src/utils/no_copy.hpp diff --git a/src/ptr_vector.hpp b/src/utils/ptr_vector.hpp similarity index 100% rename from src/ptr_vector.hpp rename to src/utils/ptr_vector.hpp