From 685cbd1c14750e27bede6ba6e19015a10084ece0 Mon Sep 17 00:00:00 2001 From: auria Date: Mon, 17 Jan 2011 01:04:23 +0000 Subject: [PATCH] Move particles into a new subdirectory git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@7460 178a84e3-b1eb-0310-8ba1-8eac791a3b58 --- data/{ => gfx}/nitro.xml | 0 data/{ => gfx}/rain.xml | 0 data/{ => gfx}/smoke.xml | 0 data/{ => gfx}/smoke_brown.xml | 0 data/{ => gfx}/smoke_red.xml | 0 data/{ => gfx}/smoke_yellow.xml | 0 data/{ => gfx}/snow.xml | 0 data/{ => gfx}/splash.xml | 0 src/graphics/particle_kind_manager.cpp | 2 +- src/io/file_manager.cpp | 6 +++++- src/io/file_manager.hpp | 3 ++- src/karts/kart.cpp | 2 +- 12 files changed, 9 insertions(+), 4 deletions(-) rename data/{ => gfx}/nitro.xml (100%) rename data/{ => gfx}/rain.xml (100%) rename data/{ => gfx}/smoke.xml (100%) rename data/{ => gfx}/smoke_brown.xml (100%) rename data/{ => gfx}/smoke_red.xml (100%) rename data/{ => gfx}/smoke_yellow.xml (100%) rename data/{ => gfx}/snow.xml (100%) rename data/{ => gfx}/splash.xml (100%) diff --git a/data/nitro.xml b/data/gfx/nitro.xml similarity index 100% rename from data/nitro.xml rename to data/gfx/nitro.xml diff --git a/data/rain.xml b/data/gfx/rain.xml similarity index 100% rename from data/rain.xml rename to data/gfx/rain.xml diff --git a/data/smoke.xml b/data/gfx/smoke.xml similarity index 100% rename from data/smoke.xml rename to data/gfx/smoke.xml diff --git a/data/smoke_brown.xml b/data/gfx/smoke_brown.xml similarity index 100% rename from data/smoke_brown.xml rename to data/gfx/smoke_brown.xml diff --git a/data/smoke_red.xml b/data/gfx/smoke_red.xml similarity index 100% rename from data/smoke_red.xml rename to data/gfx/smoke_red.xml diff --git a/data/smoke_yellow.xml b/data/gfx/smoke_yellow.xml similarity index 100% rename from data/smoke_yellow.xml rename to data/gfx/smoke_yellow.xml diff --git a/data/snow.xml b/data/gfx/snow.xml similarity index 100% rename from data/snow.xml rename to data/gfx/snow.xml diff --git a/data/splash.xml b/data/gfx/splash.xml similarity index 100% rename from data/splash.xml rename to data/gfx/splash.xml diff --git a/src/graphics/particle_kind_manager.cpp b/src/graphics/particle_kind_manager.cpp index d6859a2b8..0838accc5 100644 --- a/src/graphics/particle_kind_manager.cpp +++ b/src/graphics/particle_kind_manager.cpp @@ -53,7 +53,7 @@ ParticleKind* ParticleKindManager::getParticles(const char* name) { try { - ParticleKind* newkind = new ParticleKind(file_manager->getDataFile(name)); + ParticleKind* newkind = new ParticleKind(file_manager->getGfxFile(name)); m_kinds[name] = newkind; return newkind; } diff --git a/src/io/file_manager.cpp b/src/io/file_manager.cpp index e4cf7fca1..8f44e0ab3 100644 --- a/src/io/file_manager.cpp +++ b/src/io/file_manager.cpp @@ -356,7 +356,11 @@ std::string FileManager::getDataFile(const std::string& fname) const { return m_root_dir+"/data/"+fname; } // getDataFile - +//----------------------------------------------------------------------------- +std::string FileManager::getGfxFile(const std::string& fname) const +{ + return m_root_dir+"/data/gfx/"+fname; +} //----------------------------------------------------------------------------- /** If the directory specified in path does not exist, it is created. * \params path Directory to test. diff --git a/src/io/file_manager.hpp b/src/io/file_manager.hpp index 7dcdcb2cf..181a46cd9 100644 --- a/src/io/file_manager.hpp +++ b/src/io/file_manager.hpp @@ -98,9 +98,10 @@ public: std::string getDataFile (const std::string& fname) const; std::string getHighscoreFile (const std::string& fname) const; std::string getChallengeFile (const std::string& fname) const; - std::string getTutorialFile (const std::string& fname) const; + std::string getTutorialFile (const std::string& fname) const; std::string getLogFile (const std::string& fname) const; std::string getItemFile (const std::string& fname) const; + std::string getGfxFile (const std::string& fname) const; std::string getMusicFile (const std::string& fname) const; std::string getSFXFile (const std::string& fname) const; std::string getFontFile (const std::string& fname) const; diff --git a/src/karts/kart.cpp b/src/karts/kart.cpp index 645c29a34..1ca5f1042 100644 --- a/src/karts/kart.cpp +++ b/src/karts/kart.cpp @@ -1477,7 +1477,7 @@ void Kart::loadData() try { m_nitro = new ParticleEmitter( - new ParticleKind(file_manager->getDataFile("nitro.xml")), + new ParticleKind(file_manager->getGfxFile("nitro.xml")), position, getNode()); } catch (std::runtime_error& e)