jjANIMATION class
A sprite animation consisting of a sequence of frames.
Reference-counted handle to one animation within the global animation table, exposing its frame count, playback speed and the index of its first jjANIMFRAME. Scripts can load frames from a file into it or save it out. Obtained via jjAnimations[index].
Public static functions
-
static auto get_jjAnimations(std::
uint32_t index) -> jjANIMATION* - Returns the animation at the specified global index.
Constructors, destructors, conversion operators
-
jjANIMATION(std::
uint32_t index) - Creates a new instance wrapping the animation at the given index.
- ~jjANIMATION()
Public functions
- void AddRef()
- Increments the reference count.
- void Release()
- Decrements the reference count.
- auto operator=(const jjANIMATION& o) -> jjANIMATION&
- auto save(const String& filename, const jjPAL& palette) const -> bool
- Saves the animation to a file using the given palette.
-
auto load(const String& filename,
std::
int32_t hotSpotX, std:: int32_t hotSpotY, std:: int32_t coldSpotYOffset, std:: int32_t firstFrameToOverwrite) -> bool - Loads animation frames from a file, overwriting starting at the given frame.
-
auto get_firstFrame() const -> std::
uint32_t - Returns the global index of the first frame.
-
auto set_firstFrame(std::
uint32_t index) const -> std:: uint32_t - Sets the global index of the first frame.
-
auto getAnimFirstFrame() -> std::
uint32_t - Returns the global index of the first frame of the animation.
Public variables
-
std::
uint16_t frameCount - Number of frames in the animation.
-
std::
int16_t fps - Playback speed in frames per second.