aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/api/Animator.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2025-01-08 13:15:06 +0100
committerJAROWMR <jarorutjes07@gmail.com>2025-01-08 13:15:06 +0100
commitc001bfe4e82cecc880700b6f2a434371d818a473 (patch)
treee54bdf1c37176a32b5933410051c35f6ef47fc2a /src/crepe/api/Animator.cpp
parentf1788548fdc8491442e199c88058c223f506d42c (diff)
parent8ea70b897805ff84113758d45a4c5c1a171a77bd (diff)
Merge branch 'loek/replay' of github.com:lonkaars/crepe into jaro/game
Diffstat (limited to 'src/crepe/api/Animator.cpp')
-rw-r--r--src/crepe/api/Animator.cpp17
1 files changed, 1 insertions, 16 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;
-}