]> git.lizzy.rs Git - minetest.git/blobdiff - src/tile.h
Lock mutex when accessing m_env in Server::~Server
[minetest.git] / src / tile.h
index f06285960612dacefc469f432dc190e801fe0155..5cebb0eaad0cd2dbb9ab0c3d84e82d46d535a31f 100644 (file)
@@ -1,6 +1,6 @@
 /*
 Minetest-c55
-Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
+Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -25,6 +25,22 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include "utility.h"
 #include <string>
 
+/*
+       tile.{h,cpp}: Texture handling stuff.
+*/
+
+/*
+       Gets the path to a texture by first checking if the texture exists
+       in texture_path and if not, using the data path.
+
+       Checks all supported extensions by replacing the original extension.
+
+       If not found, returns "".
+
+       Utilizes a thread-safe cache.
+*/
+std::string getTexturePath(const std::string &filename);
+
 /*
        Specifies a texture in an atlas.
 
@@ -288,7 +304,7 @@ struct TileSpec
        }
        
        // Sets everything else except the texture in the material
-       void applyMaterialOptions(video::SMaterial &material)
+       void applyMaterialOptions(video::SMaterial &material) const
        {
                if(alpha != 255 && material_type != MATERIAL_ALPHA_VERTEX)
                        dstream<<"WARNING: TileSpec: alpha != 255 "