1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add texture pack selection to main menu

This commit is contained in:
Novatux 2013-08-02 15:18:48 +02:00 committed by PilzAdam
parent fe1fe1b1e4
commit 383153419b
10 changed files with 125 additions and 17 deletions

View file

@ -131,18 +131,6 @@ std::string getTexturePath(const std::string &filename)
// Check all filename extensions. Returns "" if not found.
fullpath = getImagePath(testpath);
}
/*
Check from $user/textures/all
*/
if(fullpath == "")
{
std::string texture_path = porting::path_user + DIR_DELIM
+ "textures" + DIR_DELIM + "all";
std::string testpath = texture_path + DIR_DELIM + filename;
// Check all filename extensions. Returns "" if not found.
fullpath = getImagePath(testpath);
}
/*
Check from default data directory
@ -163,6 +151,11 @@ std::string getTexturePath(const std::string &filename)
return fullpath;
}
void clearTextureNameCache()
{
g_texturename_to_path_cache.clear();
}
/*
Stores internal information about a texture.
*/