From 3f5bad938a3fcb601ad41924a4707476b8b87241 Mon Sep 17 00:00:00 2001 From: Perttu Ahola Date: Tue, 21 Dec 2010 18:08:24 +0200 Subject: organizing stuff. --- src/mapnode.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/mapnode.h') 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) { -- cgit v1.2.3