/*
-Minetest-c55
-Copyright (C) 2010-2011 celeron55, Perttu Ahola <celeron55@gmail.com>
+Minetest
+Copyright (C) 2010-2013 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 Lesser General Public License as published by
- Material = irrlicht's Material class
- Content = (content_t) content of a node
- Tile = TileSpec at some side of a node of some content type
-
- Content ranges:
- 0x000...0x07f: param2 is fully usable
- 0x800...0xfff: param2 lower 4 bits are free
*/
typedef u16 content_t;
#define MAX_CONTENT 0xfff
#define LIQUID_LEVEL_MASK 0x07
#define LIQUID_FLOW_DOWN_MASK 0x08
+//#define LIQUID_LEVEL_MASK 0x3f // better finite water
+//#define LIQUID_FLOW_DOWN_MASK 0x40 // not used when finite water
+
/* maximum amount of liquid in a block */
#define LIQUID_LEVEL_MAX LIQUID_LEVEL_MASK
#define LIQUID_LEVEL_SOURCE (LIQUID_LEVEL_MAX+1)
+#define LIQUID_INFINITY_MASK 0x80 //0b10000000
+
/*
This is the stuff what the whole world consists of.
*/
{
/*
Main content
- 0x00-0x7f: Short content type
- 0x80-0xff: Long content type
*/
u16 param0;
return blend_light(daylight_factor, lightday, lightnight);
}
+ // 0.0 <= daylight_factor <= 1.0
+ // 0 <= return value <= LIGHT_SUN
+ u8 getLightBlendF1(float daylight_factor, INodeDefManager *nodemgr) const
+ {
+ u8 lightday = 0;
+ u8 lightnight = 0;
+ getLightBanks(lightday, lightnight, nodemgr);
+ return blend_light_f1(daylight_factor, lightday, lightnight);
+ }
+
u8 getFaceDir(INodeDefManager *nodemgr) const;
u8 getWallMounted(INodeDefManager *nodemgr) const;
v3s16 getWallMountedDir(INodeDefManager *nodemgr) const;
private:
// Deprecated serialization methods
- void serialize_pre22(u8 *dest, u8 version);
void deSerialize_pre22(u8 *source, u8 version);
};