From 18d8e3acec44a60a0ee1bbf0b515654fa2102ee9 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Sat, 7 Apr 2012 10:43:06 +0300 Subject: Support custom textures installed as /textures/all/*.png --- src/tile.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src') diff --git a/src/tile.cpp b/src/tile.cpp index 25f8a000b..73c286fb3 100644 --- a/src/tile.cpp +++ b/src/tile.cpp @@ -131,6 +131,18 @@ std::string getTexturePath(const std::string &filename) 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 */ -- cgit v1.2.3