diff options
author | Perttu Ahola <celeron55@gmail.com> | 2010-12-21 18:08:24 +0200 |
---|---|---|
committer | Perttu Ahola <celeron55@gmail.com> | 2010-12-21 18:08:24 +0200 |
commit | 3f5bad938a3fcb601ad41924a4707476b8b87241 (patch) | |
tree | ddf9d7d49a93c092c31fcbdd6bf1c2ad42e43bc8 /src/mapnode.h | |
parent | 3b0bff2f743a3abf100368f94efafa7c2843a9b7 (diff) | |
download | dragonfireclient-3f5bad938a3fcb601ad41924a4707476b8b87241.tar.xz |
organizing stuff.
Diffstat (limited to 'src/mapnode.h')
-rw-r--r-- | src/mapnode.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mapnode.h b/src/mapnode.h index 0e746af48..f52bd52e7 100644 --- a/src/mapnode.h +++ b/src/mapnode.h @@ -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) { |