3#include <aegis/ndsTypes.hpp>
5#include <aegis/types.hpp>
44 int count,
const unsigned int** bitmaps,
const int* widths,
const int* heights,
const bool* isRGBA);
54 void set(
int animIndex,
bool loop =
true);
68 animSpeedFP = (int)(speedMultiplier * ae::q20_12_t{128.0});
void pause()
Finishes the current animation at its next boundary.
void renderNode(int nodeId)
void play()
Starts the selected animation.
std::vector< int > rootNodes
static void destroy()
Destroys the singleton instance and unloads model textures.
void render()
Renders the model hierarchy using the current animation frame.
static AnimationController * getInstance()
~AnimationController()
Releases texture objects owned by the controller.
Keyframe getInterpolatedFrame(const AnimTrack &track, int timeFP, int nodeId)
void setAnimationSpeed(ae::q20_12_t speedMultiplier=ae::q20_12_t{1.0})
Sets animation playback speed.
static void create()
Creates the singleton instance if it does not exist.
void update()
Advances the selected animation by one frame tick.
bool isAnimationPlaying() const
static int textureSizeToEnum(int px)
void stop()
Stops playback and resets the selected animation frame.
static AnimationController * instance
bool loadModel(const char *filepath)
Loads an MDL2 or legacy MDL1 model file.
std::vector< int > textureIDs
std::vector< int > trackIndices
bool loadTextures(int count, const unsigned int **bitmaps, const int *widths, const int *heights, const bool *isRGBA)
Uploads model textures to VRAM after loadModel().
std::vector< AnimNode > modelNodes
int getCurrentAnimIndex() const
void set(int animIndex, bool loop=true)
Selects an animation.
void unloadTextures()
Deletes all model texture objects from VRAM.
std::vector< Animation > animations