Re-added textures that were not used in main stk, but in some addons
to a separate 'deprecated' directory (#666). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/trunk@11939 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
@@ -171,9 +171,12 @@ void MaterialManager::loadMaterial()
|
||||
{
|
||||
// Use temp material for reading, but then set the shared
|
||||
// material index later, so that these materials are not popped
|
||||
const std::string fname = "materials.xml";
|
||||
std::string full_name = file_manager->getTextureFile(fname);
|
||||
addSharedMaterial(full_name);
|
||||
addSharedMaterial(file_manager->getTextureDir()+"materials.xml");
|
||||
std::string deprecated = file_manager->getTextureDir()
|
||||
+ "deprecated/materials.xml";
|
||||
if(file_manager->fileExists(deprecated))
|
||||
addSharedMaterial(deprecated);
|
||||
|
||||
// Save index of shared textures
|
||||
m_shared_material_index = (int)m_materials.size();
|
||||
} // MaterialManager
|
||||
|
||||
@@ -188,7 +188,8 @@ void FileManager::reInit()
|
||||
m_file_system->grab();
|
||||
TrackManager::addTrackSearchDir(m_root_dir+"/data/tracks");
|
||||
KartPropertiesManager::addKartSearchDir(m_root_dir+"/data/karts");
|
||||
pushTextureSearchPath(m_root_dir+"/data/textures/");
|
||||
pushTextureSearchPath(getTextureDir());
|
||||
pushTextureSearchPath(getTextureDir()+"/deprecated");
|
||||
pushModelSearchPath (m_root_dir+"/data/models/" );
|
||||
pushMusicSearchPath (m_root_dir+"/data/music/" );
|
||||
|
||||
@@ -255,6 +256,7 @@ FileManager::~FileManager()
|
||||
popMusicSearchPath();
|
||||
popModelSearchPath();
|
||||
popTextureSearchPath();
|
||||
popTextureSearchPath();
|
||||
m_file_system->drop();
|
||||
m_file_system = NULL;
|
||||
} // ~FileManager
|
||||
@@ -436,6 +438,14 @@ std::string FileManager::getGUIDir() const
|
||||
return m_root_dir+"/data/gui/";
|
||||
} // getGUIDir
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Returns the base directory for all textures.
|
||||
*/
|
||||
std::string FileManager::getTextureDir() const
|
||||
{
|
||||
return m_root_dir+"/data/textures/";
|
||||
} // getTextureDir
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/** Returns the translation directory.
|
||||
*/
|
||||
|
||||
@@ -77,6 +77,7 @@ public:
|
||||
XMLNode *createXMLTree(const std::string &filename);
|
||||
|
||||
std::string getConfigDir() const;
|
||||
std::string getTextureDir() const;
|
||||
bool checkAndCreateDirectoryP(const std::string &path);
|
||||
const std::string &getAddonsDir() const;
|
||||
std::string getAddonsFile(const std::string &name);
|
||||
|
||||
Reference in New Issue
Block a user