diff options
author | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-08 13:10:03 +0100 |
---|---|---|
committer | Loek Le Blansch <loek@pipeframe.xyz> | 2025-01-08 13:10:03 +0100 |
commit | 4d5a1570908d47b8f2d3bfa65634f2fb2dcf7e3c (patch) | |
tree | 3f3e710735105cbbd63ebd4f320c88fbc0ecfa0c /src | |
parent | 1ef80ecfdc1a70a6ebdd43fed82d0f9d305d63dc (diff) |
Revert "implement animator replay"
This reverts commit 1ef80ecfdc1a70a6ebdd43fed82d0f9d305d63dc.
Diffstat (limited to 'src')
-rw-r--r-- | src/crepe/api/Animator.cpp | 17 | ||||
-rw-r--r-- | src/crepe/api/Animator.h | 6 |
2 files changed, 1 insertions, 22 deletions
diff --git a/src/crepe/api/Animator.cpp b/src/crepe/api/Animator.cpp index f9a283e..c558d86 100644 --- a/src/crepe/api/Animator.cpp +++ b/src/crepe/api/Animator.cpp @@ -1,3 +1,4 @@ + #include "util/dbg.h" #include "Animator.h" @@ -5,7 +6,6 @@ #include "Sprite.h" using namespace crepe; -using namespace std; Animator::Animator( game_object_id_t id, Sprite & spritesheet, const ivec2 & single_frame_size, @@ -57,18 +57,3 @@ void Animator::next_anim() { ctx.row = ++ctx.row % this->grid_size.x; this->spritesheet.mask.x = ctx.row * this->spritesheet.mask.w; } - -unique_ptr<Component> Animator::save() const { - return unique_ptr<Component>(new Animator(*this)); -} - -void Animator::restore(const Component & snapshot) { - *this = static_cast<const Animator &>(snapshot); -} - -Animator & Animator::operator=(const Animator & snapshot) { - this->data = snapshot.data; - this->elapsed_time = snapshot.elapsed_time; - this->frame = snapshot.frame; - return *this; -} diff --git a/src/crepe/api/Animator.h b/src/crepe/api/Animator.h index d1f49c4..95539d3 100644 --- a/src/crepe/api/Animator.h +++ b/src/crepe/api/Animator.h @@ -108,12 +108,6 @@ private: //! Uses the spritesheet friend AnimatorSystem; - -protected: - virtual std::unique_ptr<Component> save() const; - Animator(const Animator &) = default; - virtual void restore(const Component & snapshot); - virtual Animator & operator=(const Animator &); }; } // namespace crepe |