X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fmapblock_mesh.h;h=c75984021e32f62331e5f1afd114839ba635fa39;hb=56093b6614a47b181bbce6d4e35d213a4e04120c;hp=82268efd2948ad8e836dca639e34e06b343a6e74;hpb=9f031a67594162a53b07acbfbc65faf8c4938e99;p=dragonfireclient.git diff --git a/src/mapblock_mesh.h b/src/mapblock_mesh.h index 82268efd2..c75984021 100644 --- a/src/mapblock_mesh.h +++ b/src/mapblock_mesh.h @@ -1,6 +1,6 @@ /* -Minetest-c55 -Copyright (C) 2010-2011 celeron55, Perttu Ahola +Minetest +Copyright (C) 2010-2013 celeron55, Perttu Ahola This program is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by @@ -143,13 +143,13 @@ class MapBlockMesh struct PreMeshBuffer { TileSpec tile; - core::array indices; - core::array vertices; + std::vector indices; + std::vector vertices; }; struct MeshCollector { - core::array prebuffers; + std::vector prebuffers; void append(const TileSpec &material, const video::S3DVertex *vertices, u32 numVertices, @@ -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