4 #include "common_irrlicht.h"
6 // This directly sets the range of light
8 // This brightness is reserved for sunlight
11 inline u8 diminish_light(u8 light)
15 if(light >= LIGHT_MAX)
21 inline u8 diminish_light(u8 light, u8 distance)
25 return light - distance;
28 inline u8 undiminish_light(u8 light)
30 // We don't know if light should undiminish from this particular 0.
31 // Thus, keep it at 0.
34 if(light == LIGHT_MAX)
40 extern u8 light_decode_table[LIGHT_MAX+1];
42 inline u8 decode_light(u8 light)
44 if(light == LIGHT_SUN)
45 return light_decode_table[LIGHT_MAX];
50 return light_decode_table[light];