]> git.lizzy.rs Git - dragonfireclient.git/blobdiff - src/mapblock_mesh.h
Slightly improved version of mystrtok_r
[dragonfireclient.git] / src / mapblock_mesh.h
index 82268efd2948ad8e836dca639e34e06b343a6e74..c23b6cc5aab8c679ed9476502870ad11df8371d3 100644 (file)
@@ -160,9 +160,10 @@ struct MeshCollector
 //   alpha in the A channel of the returned SColor
 //   day light (0-255) in the R channel of the returned SColor
 //   night light (0-255) in the G channel of the returned SColor
-inline video::SColor MapBlock_LightColor(u8 alpha, u16 light)
+//   light source (0-255) in the B channel of the returned SColor
+inline video::SColor MapBlock_LightColor(u8 alpha, u16 light, u8 light_source=0)
 {
-       return video::SColor(alpha, (light & 0xff), (light >> 8), 0);
+       return video::SColor(alpha, (light & 0xff), (light >> 8), light_source);
 }
 
 // Compute light at node