]> git.lizzy.rs Git - minetest.git/blobdiff - src/wieldmesh.h
Fix Mapgen Valleys getSpawnLevelAtPoint() (#7756)
[minetest.git] / src / wieldmesh.h
index 51ba20536fb4b52758c9cc8348babc796e7304ca..0908d3ac28f42edac8d57f26d0195ea9ea066132 100644 (file)
@@ -44,10 +44,10 @@ struct ItemPartColor
         */
        video::SColor color = 0;
 
-       ItemPartColor() {}
+       ItemPartColor() = default;
 
-       ItemPartColor(bool override, video::SColor color)
-           : override_base(override), color(color)
+       ItemPartColor(bool override, video::SColor color) :
+                       override_base(override), color(color)
        {
        }
 };
@@ -65,7 +65,7 @@ struct ItemMesh
         */
        bool needs_shading = true;
 
-       ItemMesh() {}
+       ItemMesh() = default;
 };
 
 /*
@@ -78,8 +78,8 @@ class WieldMeshSceneNode : public scene::ISceneNode
        virtual ~WieldMeshSceneNode();
 
        void setCube(const ContentFeatures &f, v3f wield_scale);
-       void setExtruded(const std::string &imagename, v3f wield_scale,
-                       ITextureSource *tsrc, u8 num_frames);
+       void setExtruded(const std::string &imagename, const std::string &overlay_image,
+                       v3f wield_scale, ITextureSource *tsrc, u8 num_frames);
        void setItem(const ItemStack &item, Client *client);
 
        // Sets the vertex color of the wield mesh.
@@ -125,7 +125,8 @@ class WieldMeshSceneNode : public scene::ISceneNode
 
 void getItemMesh(Client *client, const ItemStack &item, ItemMesh *result);
 
-scene::SMesh *getExtrudedMesh(ITextureSource *tsrc, const std::string &imagename);
+scene::SMesh *getExtrudedMesh(ITextureSource *tsrc, const std::string &imagename,
+               const std::string &overlay_name);
 
 /*!
  * Applies overlays, textures and optionally materials to the given mesh and
@@ -135,5 +136,5 @@ scene::SMesh *getExtrudedMesh(ITextureSource *tsrc, const std::string &imagename
  * \param colors returns the colors of the mesh buffers in the mesh.
  */
 void postProcessNodeMesh(scene::SMesh *mesh, const ContentFeatures &f, bool use_shaders,
-               bool set_material, video::E_MATERIAL_TYPE *mattype,
-               std::vector<ItemPartColor> *colors);
+               bool set_material, const video::E_MATERIAL_TYPE *mattype,
+               std::vector<ItemPartColor> *colors, bool apply_scale = false);