diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-10 16:15:54 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-10 16:15:54 +0100 |
commit | 2feb6154cf5ff2d8707727f67a62a9b1db3af30c (patch) | |
tree | e1a06157be22906210f40de7380a04d376ccd3a7 | |
parent | 9c4ff2774dcdb974a3b0caf3b45795e8feac6f78 (diff) |
w
-rw-r--r-- | src/chunk-walls.cpp | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/src/chunk-walls.cpp b/src/chunk-walls.cpp index 2ad7a8a7..20539372 100644 --- a/src/chunk-walls.cpp +++ b/src/chunk-walls.cpp @@ -29,26 +29,17 @@ wall_atlas* chunk::wall_atlas_at(size_t i) const noexcept namespace { -constexpr Vector2 half_tile = TILE_SIZE2*.5f; -constexpr float X = half_tile.x(), Y = half_tile.y(), Z = TILE_SIZE.z(); - -using namespace floormat::Quads; using Wall::Group_; using Wall::Direction_; -#ifdef __clang__ -#pragma clang diagnostic ignored "-Wundefined-internal" -#endif - -constexpr quad get_quad(Direction_ D, Group_ G, float depth); - // ----------------------- -constexpr quad get_quad(Direction_ D, Group_ G, float depth) +constexpr Quads::quad get_quad(Direction_ D, Group_ G, float depth) { CORRADE_ASSUME(D < Direction_::COUNT); CORRADE_ASSUME(G < Group_::COUNT); - + constexpr Vector2 half_tile = TILE_SIZE2*.5f; + constexpr float X = half_tile.x(), Y = half_tile.y(), Z = TILE_SIZE.z(); const bool is_west = D == Wall::Direction_::W; switch (G) @@ -150,7 +141,7 @@ Array<Quads::indexes> make_indexes_() { auto array = Array<Quads::indexes>{NoInit, chunk::max_wall_quad_count }; for (auto i = 0uz; i < chunk::max_wall_quad_count; i++) - array[i] = quad_indexes(i); + array[i] = Quads::quad_indexes(i); return array; } |