mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
organizing stuff.
This commit is contained in:
parent
3b0bff2f74
commit
3f5bad938a
23 changed files with 805 additions and 374 deletions
|
@ -399,6 +399,7 @@ struct MapNode
|
|||
}
|
||||
|
||||
// 0 <= daylight_factor <= 1000
|
||||
// 0 <= return value <= LIGHT_SUN
|
||||
u8 getLightBlend(u32 daylight_factor)
|
||||
{
|
||||
u8 l = ((daylight_factor * getLight(LIGHTBANK_DAY)
|
||||
|
@ -411,6 +412,17 @@ struct MapNode
|
|||
l = max;
|
||||
return l;
|
||||
}
|
||||
/*// 0 <= daylight_factor <= 1000
|
||||
// 0 <= return value <= 255
|
||||
u8 getLightBlend(u32 daylight_factor)
|
||||
{
|
||||
u8 daylight = decode_light(getLight(LIGHTBANK_DAY));
|
||||
u8 nightlight = decode_light(getLight(LIGHTBANK_NIGHT));
|
||||
u8 mix = ((daylight_factor * daylight
|
||||
+ (1000-daylight_factor) * nightlight)
|
||||
)/1000;
|
||||
return mix;
|
||||
}*/
|
||||
|
||||
void setLight(enum LightBank bank, u8 a_light)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue