summaryrefslogtreecommitdiff
path: root/src/itemdef.h
diff options
context:
space:
mode:
authorSapier <sapier AT gmx dot net>2015-12-19 04:43:59 +0100
committerSapier <sapier AT gmx dot net>2015-12-29 16:27:06 +0100
commit91bafceee6606fab79db1bde4cba01b84fed65c7 (patch)
treeb09068be483bdac711954a112ddb4226d6504742 /src/itemdef.h
parentf14e7bac54af65e3d3d99f89f23f114b17058e49 (diff)
downloadminetest-91bafceee6606fab79db1bde4cba01b84fed65c7.tar.gz
minetest-91bafceee6606fab79db1bde4cba01b84fed65c7.tar.bz2
minetest-91bafceee6606fab79db1bde4cba01b84fed65c7.zip
Add support for using arbitrary meshes as items
Diffstat (limited to 'src/itemdef.h')
-rw-r--r--src/itemdef.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/itemdef.h b/src/itemdef.h
index fb157705f..74c6d0b3e 100644
--- a/src/itemdef.h
+++ b/src/itemdef.h
@@ -66,6 +66,8 @@ struct ItemDefinition
std::string inventory_image; // Optional for nodes, mandatory for tools/craftitems
std::string wield_image; // If empty, inventory_image or mesh (only nodes) is used
v3f wield_scale;
+ std::string meshname; // name of internal mesh (or meshfile to use TBD)
+ std::string meshtexture; // meshtexture
/*
Item stack and interaction properties
@@ -211,6 +213,13 @@ private:
const ItemDefinition& def, INodeDefManager* nodedef,
ClientCached* cc, IGameDef* gamedef, ITextureSource* tsrc) const;
+ void createMeshItemTexture(const std::string& name,
+ const ItemDefinition& def, INodeDefManager* nodedef,
+ ClientCached* cc, IGameDef* gamedef, ITextureSource* tsrc) const;
+
+ void renderMeshToTexture(const ItemDefinition& def, scene::IMesh* mesh,
+ ClientCached* cc, ITextureSource* tsrc) const;
+
ClientCached* createClientCachedDirect(const std::string &name,
IGameDef *gamedef) const;