diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-23 14:42:15 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-12-26 04:39:12 +0100 |
commit | 3370445a2e22ee00687ecef2e9dc88f47bb2b4c6 (patch) | |
tree | a99ec32a02fc91d729205fc26d7183b6b4214b28 /src/anim-atlas.cpp | |
parent | c141a9efcfaecadffe771bd0c37bea0e46a3f9aa (diff) |
a
Diffstat (limited to 'src/anim-atlas.cpp')
-rw-r--r-- | src/anim-atlas.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/anim-atlas.cpp b/src/anim-atlas.cpp index 129229c5..c6a7c2f2 100644 --- a/src/anim-atlas.cpp +++ b/src/anim-atlas.cpp @@ -97,17 +97,17 @@ auto anim_atlas::texcoords_for_frame(rotation r, size_t i, bool mirror) const no const auto size = _info.pixel_size; if (!mirror) return {{ - { (x0+x1) / size[0], 1 - (y0+y1) / size[1] }, // bottom right - { (x0+x1) / size[0], 1 - y0 / size[1] }, // top right - { x0 / size[0], 1 - (y0+y1) / size[1] }, // bottom left - { x0 / size[0], 1 - y0 / size[1] }, // top left + { (x0+x1) / size.x(), 1 - (y0+y1) / size.y() }, // bottom right + { (x0+x1) / size.x(), 1 - y0 / size.y() }, // top right + { x0 / size.x(), 1 - (y0+y1) / size.y() }, // bottom left + { x0 / size.x(), 1 - y0 / size.y() }, // top left }}; else return {{ - { x0 / size[0], 1 - (y0+y1) / size[1] }, // bottom right - { x0 / size[0], 1 - y0 / size[1] }, // top right - { (x0+x1) / size[0], 1 - (y0+y1) / size[1] }, // bottom left - { (x0+x1) / size[0], 1 - y0 / size[1] }, // top left + { x0 / size.x(), 1 - (y0+y1) / size.y() }, // bottom right + { x0 / size.x(), 1 - y0 / size.y() }, // top right + { (x0+x1) / size.x(), 1 - (y0+y1) / size.y() }, // bottom left + { (x0+x1) / size.x(), 1 - y0 / size.y() }, // top left }}; } |