#include "effect_animation.h" #include "functions.h" AnimationEffect::AnimationEffect(const char* name, uint32_t bg, int x, int y) { this->name = name; this->xOffset = x; this->yOffset = y; this->animation = new Animation(name, window); this->animation->setBgColor(bg); this->animation->setOffsets(this->xOffset, this->yOffset); } AnimationEffect* AnimationEffect::setFgColor(uint32_t c) { animation->setFgColor(c); return this; } AnimationEffect::~AnimationEffect() { delete this->animation; } void AnimationEffect::loop() { this->animation->drawFrame(); this->animation->advance(); } String AnimationEffect::get_name() { String s = "animation/"; s += this->name; return s; }