1
0
Fork 0
mirror of https://github.com/luanti-org/luanti.git synced 2025-06-27 16:36:03 +00:00

Add hardware node coloring. Includes:

- Increase ContentFeatures serialization version
- Color property and palettes for nodes
- paramtype2 = "color", "colored facedir" or "colored wallmounted"
This commit is contained in:
Dániel Juhász 2017-01-12 15:46:30 +01:00 committed by Ekdohibs
parent 43822de5c6
commit d04d8aba70
27 changed files with 1207 additions and 554 deletions

View file

@ -20,9 +20,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef MAPNODE_HEADER
#define MAPNODE_HEADER
#include "irrlichttypes.h"
#include "irr_v3d.h"
#include "irr_aabb3d.h"
#include "irrlichttypes_bloated.h"
#include "light.h"
#include <string>
#include <vector>
@ -187,6 +185,14 @@ struct MapNode
param2 = p;
}
/*!
* Returns the color of the node.
*
* \param f content features of this node
* \param color output, contains the node's color.
*/
void getColor(const ContentFeatures &f, video::SColor *color) const;
void setLight(enum LightBank bank, u8 a_light, const ContentFeatures &f);
void setLight(enum LightBank bank, u8 a_light, INodeDefManager *nodemgr);