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:
parent
fe1fe1b1e4
commit
383153419b
10 changed files with 125 additions and 17 deletions
17
src/tile.cpp
17
src/tile.cpp
|
@ -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.
|
||||
*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue