mirror of
https://github.com/luanti-org/luanti.git
synced 2025-07-02 16:38:41 +00:00
inventorycube: use all three specified textures; also moved mesh creation / modification functions to mesh.cpp; in lua, inventorycube is now called minetest.inventorycube
This commit is contained in:
parent
275a348b75
commit
392485aa45
12 changed files with 517 additions and 375 deletions
|
@ -172,27 +172,6 @@ int myrand_range(int min, int max)
|
|||
return (myrand()%(max-min+1))+min;
|
||||
}
|
||||
|
||||
#ifndef SERVER
|
||||
// Sets the color of all vertices in the mesh
|
||||
void setMeshVerticesColor(scene::IMesh* mesh, video::SColor& color)
|
||||
{
|
||||
if(mesh == NULL)
|
||||
return;
|
||||
|
||||
u16 mc = mesh->getMeshBufferCount();
|
||||
for(u16 j=0; j<mc; j++)
|
||||
{
|
||||
scene::IMeshBuffer *buf = mesh->getMeshBuffer(j);
|
||||
video::S3DVertex *vertices = (video::S3DVertex*)buf->getVertices();
|
||||
u16 vc = buf->getVertexCount();
|
||||
for(u16 i=0; i<vc; i++)
|
||||
{
|
||||
vertices[i].Color = color;
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
blockpos: position of block in block coordinates
|
||||
camera_pos: position of camera in nodes
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue