PokeMe64/include/animations/MoveAnimation.h
Philippe Symons e51726eef9 Initial import of the first (extremely early) functional version.
It doesn't look like much, but it's functional ;-)

It can inject distribution pokémon into gen 1 and gen 2 original
cartridges and inject the GS ball in Pokémon Crystal.

That's it. But that was the minimal feature set I had in mind for the
project. In the Readme.md you can find the ideas I have for expanding
the project.

But the first priority is the UI, because it really looks bad right now.
(as I was mostly focused on building blocks and transfer pak
functionality. Not on making it looks good)
2024-07-19 21:46:11 +02:00

37 lines
835 B
C++
Executable File

#ifndef _MOVEANIMATION_H
#define _MOVEANIMATION_H
#include "animations/IAnimation.h"
#include "core/common.h"
class IWidget;
/**
* This animation manipulates the bounds of a Widget over time
*/
class MoveAnimation : public AbstractAnimation
{
public:
MoveAnimation(IWidget* target);
virtual ~MoveAnimation();
AnimationDistanceTimeFunctionType getDistanceTimeFunctionType() const override;
uint32_t getDurationInMs() const override;
void start(const Rectangle& startBounds, const Rectangle& moveVectorStartEnd, uint32_t durationInMs);
/** *
* reset the animation back to its start position
*/
void reset();
protected:
private:
void apply(float pos) override;
IWidget* target_;
Rectangle startBounds_;
Rectangle diffStartEnd_;
uint32_t durationInMs_;
};
#endif