aboutsummaryrefslogtreecommitdiff
path: root/misc/net.minetest.minetest.appdata.xml
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2017-07-25 18:56:45 +0200
committerparamat <mat.gregory@virginmedia.com>2017-08-09 11:00:24 +0100
commitf3394095a16469ef7cadda63a358d564da16a6e9 (patch)
treedb3873f65c1e82cf13e03c17ec1a791bfaa992da /misc/net.minetest.minetest.appdata.xml
parent837328fbacd5fe95795d4b645a819618dae951f3 (diff)
downloadminetest-f3394095a16469ef7cadda63a358d564da16a6e9.tar.gz
minetest-f3394095a16469ef7cadda63a358d564da16a6e9.tar.bz2
minetest-f3394095a16469ef7cadda63a358d564da16a6e9.zip
Key change menu: Expose more keys
Diffstat (limited to 'misc/net.minetest.minetest.appdata.xml')
0 files changed, 0 insertions, 0 deletions
oundation; either version 2.1 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include "collector.h" #include <stdexcept> #include "log.h" #include "client/mesh.h" void MeshCollector::append(const TileSpec &tile, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices) { for (int layernum = 0; layernum < MAX_TILE_LAYERS; layernum++) { const TileLayer *layer = &tile.layers[layernum]; if (layer->texture_id == 0) continue; append(*layer, vertices, numVertices, indices, numIndices, layernum, tile.world_aligned); } } void MeshCollector::append(const TileLayer &layer, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices, u8 layernum, bool use_scale) { PreMeshBuffer &p = findBuffer(layer, layernum, numVertices); f32 scale = 1.0f; if (use_scale) scale = 1.0f / layer.scale; u32 vertex_count = p.vertices.size(); for (u32 i = 0; i < numVertices; i++) p.vertices.emplace_back(vertices[i].Pos, vertices[i].Normal, vertices[i].Color, scale * vertices[i].TCoords); for (u32 i = 0; i < numIndices; i++) p.indices.push_back(indices[i] + vertex_count); } void MeshCollector::append(const TileSpec &tile, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices, v3f pos, video::SColor c, u8 light_source) { for (int layernum = 0; layernum < MAX_TILE_LAYERS; layernum++) { const TileLayer *layer = &tile.layers[layernum]; if (layer->texture_id == 0) continue; append(*layer, vertices, numVertices, indices, numIndices, pos, c, light_source, layernum, tile.world_aligned); } } void MeshCollector::append(const TileLayer &layer, const video::S3DVertex *vertices, u32 numVertices, const u16 *indices, u32 numIndices, v3f pos, video::SColor c, u8 light_source, u8 layernum, bool use_scale) { PreMeshBuffer &p = findBuffer(layer, layernum, numVertices); f32 scale = 1.0f; if (use_scale) scale = 1.0f / layer.scale;