Skip to content

Commit

Permalink
Fix -Wmissing-braces warnings in mapblock_mesh.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
Desour authored and grorp committed Sep 9, 2023
1 parent 7897450 commit 010d08f
Showing 1 changed file with 30 additions and 30 deletions.
60 changes: 30 additions & 30 deletions src/client/mapblock_mesh.cpp
Expand Up @@ -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,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, 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, 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 +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,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}, {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}}
};
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;
Expand Down

0 comments on commit 010d08f

Please sign in to comment.