From 010d08f6a44005d9293ef25ad9d4b55b2eab4570 Mon Sep 17 00:00:00 2001 From: Desour Date: Tue, 29 Aug 2023 14:50:14 +0200 Subject: [PATCH] Fix -Wmissing-braces warnings in mapblock_mesh.cpp --- src/client/mapblock_mesh.cpp | 50 ++++++++++++++++++------------------ 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/src/client/mapblock_mesh.cpp b/src/client/mapblock_mesh.cpp index 4545b6350..09ca5262b 100644 --- a/src/client/mapblock_mesh.cpp +++ b/src/client/mapblock_mesh.cpp @@ -409,36 +409,36 @@ void getNodeTile(MapNode mn, const v3s16 &p, const v3s16 &dir, MeshMakeData *dat u8 tile; TileRotation rotation; } dir_to_tile[24][8] = { - // 0 +X +Y +Z -Z -Y -X -> value=tile,rotation - 0,R0, 2,R0 , 0,R0 , 4,R0 , 0,R0, 5,R0 , 1,R0 , 3,R0 , // rotate around y+ 0 - 3 - 0,R0, 4,R0 , 0,R3 , 3,R0 , 0,R0, 2,R0 , 1,R1 , 5,R0 , - 0,R0, 3,R0 , 0,R2 , 5,R0 , 0,R0, 4,R0 , 1,R2 , 2,R0 , - 0,R0, 5,R0 , 0,R1 , 2,R0 , 0,R0, 3,R0 , 1,R3 , 4,R0 , + // 0 +X +Y +Z -Z -Y -X -> value=tile,rotation + {{0,R0}, {2,R0}, {0,R0}, {4,R0}, {0,R0}, {5,R0}, {1,R0}, {3,R0}}, // rotate around y+ 0 - 3 + {{0,R0}, {4,R0}, {0,R3}, {3,R0}, {0,R0}, {2,R0}, {1,R1}, {5,R0}}, + {{0,R0}, {3,R0}, {0,R2}, {5,R0}, {0,R0}, {4,R0}, {1,R2}, {2,R0}}, + {{0,R0}, {5,R0}, {0,R1}, {2,R0}, {0,R0}, {3,R0}, {1,R3}, {4,R0}}, - 0,R0, 2,R3 , 5,R0 , 0,R2 , 0,R0, 1,R0 , 4,R2 , 3,R1 , // rotate around z+ 4 - 7 - 0,R0, 4,R3 , 2,R0 , 0,R1 , 0,R0, 1,R1 , 3,R2 , 5,R1 , - 0,R0, 3,R3 , 4,R0 , 0,R0 , 0,R0, 1,R2 , 5,R2 , 2,R1 , - 0,R0, 5,R3 , 3,R0 , 0,R3 , 0,R0, 1,R3 , 2,R2 , 4,R1 , + {{0,R0}, {2,R3}, {5,R0}, {0,R2}, {0,R0}, {1,R0}, {4,R2}, {3,R1}}, // rotate around z+ 4 - 7 + {{0,R0}, {4,R3}, {2,R0}, {0,R1}, {0,R0}, {1,R1}, {3,R2}, {5,R1}}, + {{0,R0}, {3,R3}, {4,R0}, {0,R0}, {0,R0}, {1,R2}, {5,R2}, {2,R1}}, + {{0,R0}, {5,R3}, {3,R0}, {0,R3}, {0,R0}, {1,R3}, {2,R2}, {4,R1}}, - 0,R0, 2,R1 , 4,R2 , 1,R2 , 0,R0, 0,R0 , 5,R0 , 3,R3 , // rotate around z- 8 - 11 - 0,R0, 4,R1 , 3,R2 , 1,R3 , 0,R0, 0,R3 , 2,R0 , 5,R3 , - 0,R0, 3,R1 , 5,R2 , 1,R0 , 0,R0, 0,R2 , 4,R0 , 2,R3 , - 0,R0, 5,R1 , 2,R2 , 1,R1 , 0,R0, 0,R1 , 3,R0 , 4,R3 , + {{0,R0}, {2,R1}, {4,R2}, {1,R2}, {0,R0}, {0,R0}, {5,R0}, {3,R3}}, // rotate around z- 8 - 11 + {{0,R0}, {4,R1}, {3,R2}, {1,R3}, {0,R0}, {0,R3}, {2,R0}, {5,R3}}, + {{0,R0}, {3,R1}, {5,R2}, {1,R0}, {0,R0}, {0,R2}, {4,R0}, {2,R3}}, + {{0,R0}, {5,R1}, {2,R2}, {1,R1}, {0,R0}, {0,R1}, {3,R0}, {4,R3}}, - 0,R0, 0,R3 , 3,R3 , 4,R1 , 0,R0, 5,R3 , 2,R3 , 1,R3 , // rotate around x+ 12 - 15 - 0,R0, 0,R2 , 5,R3 , 3,R1 , 0,R0, 2,R3 , 4,R3 , 1,R0 , - 0,R0, 0,R1 , 2,R3 , 5,R1 , 0,R0, 4,R3 , 3,R3 , 1,R1 , - 0,R0, 0,R0 , 4,R3 , 2,R1 , 0,R0, 3,R3 , 5,R3 , 1,R2 , + {{0,R0}, {0,R3}, {3,R3}, {4,R1}, {0,R0}, {5,R3}, {2,R3}, {1,R3}}, // rotate around x+ 12 - 15 + {{0,R0}, {0,R2}, {5,R3}, {3,R1}, {0,R0}, {2,R3}, {4,R3}, {1,R0}}, + {{0,R0}, {0,R1}, {2,R3}, {5,R1}, {0,R0}, {4,R3}, {3,R3}, {1,R1}}, + {{0,R0}, {0,R0}, {4,R3}, {2,R1}, {0,R0}, {3,R3}, {5,R3}, {1,R2}}, - 0,R0, 1,R1 , 2,R1 , 4,R3 , 0,R0, 5,R1 , 3,R1 , 0,R1 , // rotate around x- 16 - 19 - 0,R0, 1,R2 , 4,R1 , 3,R3 , 0,R0, 2,R1 , 5,R1 , 0,R0 , - 0,R0, 1,R3 , 3,R1 , 5,R3 , 0,R0, 4,R1 , 2,R1 , 0,R3 , - 0,R0, 1,R0 , 5,R1 , 2,R3 , 0,R0, 3,R1 , 4,R1 , 0,R2 , + {{0,R0}, {1,R1}, {2,R1}, {4,R3}, {0,R0}, {5,R1}, {3,R1}, {0,R1}}, // rotate around x- 16 - 19 + {{0,R0}, {1,R2}, {4,R1}, {3,R3}, {0,R0}, {2,R1}, {5,R1}, {0,R0}}, + {{0,R0}, {1,R3}, {3,R1}, {5,R3}, {0,R0}, {4,R1}, {2,R1}, {0,R3}}, + {{0,R0}, {1,R0}, {5,R1}, {2,R3}, {0,R0}, {3,R1}, {4,R1}, {0,R2}}, - 0,R0, 3,R2 , 1,R2 , 4,R2 , 0,R0, 5,R2 , 0,R2 , 2,R2 , // rotate around y- 20 - 23 - 0,R0, 5,R2 , 1,R3 , 3,R2 , 0,R0, 2,R2 , 0,R1 , 4,R2 , - 0,R0, 2,R2 , 1,R0 , 5,R2 , 0,R0, 4,R2 , 0,R0 , 3,R2 , - 0,R0, 4,R2 , 1,R1 , 2,R2 , 0,R0, 3,R2 , 0,R3 , 5,R2 + {{0,R0}, {3,R2}, {1,R2}, {4,R2}, {0,R0}, {5,R2}, {0,R2}, {2,R2}}, // rotate around y- 20 - 23 + {{0,R0}, {5,R2}, {1,R3}, {3,R2}, {0,R0}, {2,R2}, {0,R1}, {4,R2}}, + {{0,R0}, {2,R2}, {1,R0}, {5,R2}, {0,R0}, {4,R2}, {0,R0}, {3,R2}}, + {{0,R0}, {4,R2}, {1,R1}, {2,R2}, {0,R0}, {3,R2}, {0,R3}, {5,R2}} }; getNodeTileN(mn, p, dir_to_tile[facedir][dir_i].tile, data, tile); tile.rotation = tile.world_aligned ? TileRotation::None : dir_to_tile[facedir][dir_i].rotation;