diff options
| author | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-25 19:37:06 +0100 |
|---|---|---|
| committer | Stanislaw Halik <sthalik@misaki.pl> | 2022-11-25 19:37:06 +0100 |
| commit | e46dd0f45d1cab35c7441d72f5dcac83720cc539 (patch) | |
| tree | 1611ed041680e6dcccb115cbc7c99e098b809d33 /draw | |
| parent | 1831d5d1eab5c9a607270a8a9b72a2ac1e6ce62a (diff) | |
add scenery horizontal mirroring
Diffstat (limited to 'draw')
| -rw-r--r-- | draw/anim.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/draw/anim.cpp b/draw/anim.cpp index 558dd197..82f0d746 100644 --- a/draw/anim.cpp +++ b/draw/anim.cpp @@ -26,7 +26,8 @@ void anim_mesh::draw(tile_shader& shader, anim_atlas& atlas, rotation r, std::si { const auto center = Vector3(xy.x, xy.y, 0.f) * TILE_SIZE; const auto pos = atlas.frame_quad(center, r, frame); - const auto texcoords = atlas.texcoords_for_frame(r, frame); + const auto& g = atlas.group(r); + const auto texcoords = atlas.texcoords_for_frame(r, frame, !g.mirror_from.isEmpty()); const float depth = tile_shader::depth_value(xy, .25f); quad_data array; for (std::size_t i = 0; i < 4; i++) |
