diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-29 19:19:43 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-10-29 19:19:43 +0200 |
commit | c869ce688e7bde9fc12bd95e4de992ebf5f1362e (patch) | |
tree | 33b282c8cd52a364bdab50c4f1bd009ef1d19eb0 /draw | |
parent | d9cf49f11a5767fab52994e5c38d58ba16b13af6 (diff) |
more vector bonanza
Diffstat (limited to 'draw')
-rw-r--r-- | draw/wall.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/draw/wall.cpp b/draw/wall.cpp index ae2e848c..4602453d 100644 --- a/draw/wall.cpp +++ b/draw/wall.cpp @@ -78,11 +78,11 @@ std::array<std::array<UnsignedShort, 6>, wall_mesh::COUNT> wall_mesh::make_index std::array<std::array<Vector3, 4>, wall_mesh::COUNT> wall_mesh::make_position_array() { std::array<std::array<Vector3, 4>, COUNT> array; - for (std::size_t j = 0; j < TILE_MAX_DIM; j++) - for (std::size_t i = 0; i < TILE_MAX_DIM; i++) + for (std::uint8_t j = 0; j < TILE_MAX_DIM; j++) + for (std::uint8_t i = 0; i < TILE_MAX_DIM; i++) { - const auto idx = (j*TILE_MAX_DIM + i) * 2; - const auto center = Vector3((float)i, (float)j, 0) * TILE_SIZE; + const std::size_t idx = (j*TILE_MAX_DIM + i) * 2u; + const auto center = Vector3(i, j, 0) * TILE_SIZE; array[idx + 0] = tile_atlas::wall_quad_N(center, TILE_SIZE); array[idx + 1] = tile_atlas::wall_quad_W(center, TILE_SIZE); } |