diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-08 02:33:38 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-08 02:33:38 +0100 |
commit | 69324ea83c8c4e73e5e201e0ca53114484a49791 (patch) | |
tree | 85f77a6408cb06a405f48beedd229319f376755a /draw/anim.cpp | |
parent | 8df4de4557ea49ff39462505a0662aacca447bf3 (diff) |
a
Diffstat (limited to 'draw/anim.cpp')
-rw-r--r-- | draw/anim.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/draw/anim.cpp b/draw/anim.cpp index 0e913d08..1a02ad93 100644 --- a/draw/anim.cpp +++ b/draw/anim.cpp @@ -23,12 +23,12 @@ std::array<UnsignedShort, 6> anim_mesh::make_index_array() }}; } -void anim_mesh::draw(tile_shader& shader, const anim_atlas& atlas, const anim_frame& frame, local_coords xy) +void anim_mesh::draw(tile_shader& shader, const anim_atlas& atlas, rotation r, std::size_t frame, local_coords xy) { const auto center = Vector3(xy.x, xy.y, 0.f) * TILE_SIZE; - const auto pos = atlas.frame_quad(center, frame); + const auto pos = atlas.frame_quad(center, r, frame); _positions_buffer.setSubData(0, pos); - const auto texcoords = atlas.texcoords_for_frame(frame); + const auto texcoords = atlas.texcoords_for_frame(r, frame); _vertex_buffer.setSubData(0, texcoords); shader.draw(_mesh); } |