summaryrefslogtreecommitdiff
path: root/src/resources/animation.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-06 21:12:22 +0100
committerThorbjørn Lindeijer <bjorn@lindeijer.nl>2024-03-07 10:43:54 +0100
commitc74680473e702bacc009897a258387445d6f3eb5 (patch)
tree800cfb1f83f0c69ae8fcd0096949e660152a80b8 /src/resources/animation.h
parentf9a522c72db959b5d63061ed255735d0230fc7de (diff)
downloadmana-c74680473e702bacc009897a258387445d6f3eb5.tar.gz
mana-c74680473e702bacc009897a258387445d6f3eb5.tar.bz2
mana-c74680473e702bacc009897a258387445d6f3eb5.tar.xz
mana-c74680473e702bacc009897a258387445d6f3eb5.zip
Use the native TMX tile animation format
Rewrote the tile animation loading code based on XML tags, replacing the code that loaded tile animations from tile properties. Also made a number of code simplifications and optimizations: * Replaced a number of pointer members with value members. * Pass around Animation and TileAnimation by value, using std::move to avoid allocating copies. * push -> emplace * push_front -> emplace_front * push_back -> emplace_back * Use range-based for loops * Use std::vector instead of std::list for storing affected tiles (less fragmentation) * Avoid string copies and allocations while parsing CSV layer data. * Replaced xmlNodeGetContent with directly accessing 'content'.
Diffstat (limited to 'src/resources/animation.h')
-rw-r--r--src/resources/animation.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/resources/animation.h b/src/resources/animation.h
index 59601dc4..7fc14857 100644
--- a/src/resources/animation.h
+++ b/src/resources/animation.h
@@ -43,7 +43,7 @@ struct Frame
* An animation consists of several frames, each with their own delay and
* offset.
*/
-class Animation
+class Animation final
{
public:
Animation() = default;