Fix --color command line parameter ignorance (#7173)
[oweals/minetest.git] / src / light.h
index 203bd851e4f641f4e434d58dcc8601a3e126cf51..44082a1632cea1e7091027bb9d9e6257ad596c87 100644 (file)
@@ -63,21 +63,7 @@ inline u8 decode_light(u8 light)
 
 // 0.0 <= light <= 1.0
 // 0.0 <= return value <= 1.0
-inline float decode_light_f(float light_f)
-{
-       s32 i = (u32)(light_f * LIGHT_MAX + 0.5);
-
-       if (i <= 0)
-               return (float)light_decode_table[0] / 255.0;
-       if (i >= LIGHT_SUN)
-               return (float)light_decode_table[LIGHT_SUN] / 255.0;
-
-       float v1 = (float)light_decode_table[i - 1] / 255.0;
-       float v2 = (float)light_decode_table[i] / 255.0;
-       float f0 = (float)i - 0.5;
-       float f = light_f * LIGHT_MAX - f0;
-       return f * v2 + (1.0 - f) * v1;
-}
+float decode_light_f(float light_f);
 
 void set_light_table(float gamma);