|
Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Go to the documentation of this file.
35 #ifndef __JO_SPRITE_ANIMATOR_H__
36 # define __JO_SPRITE_ANIMATOR_H__
183 int jo_replace_sprite_anim(
const int at,
const unsigned short sprite_id,
const unsigned short frame_count,
const unsigned char frame_rate);
191 int jo_create_sprite_anim(
const unsigned short sprite_id,
const unsigned short frame_count,
const unsigned char frame_rate);
static __jo_force_inline unsigned short jo_get_sprite_anim_frame_count(const int anim_id)
Get animation frame count.
Definition: sprite_animator.h:76
static __jo_force_inline void jo_reset_sprite_anim(const int anim_id)
Stop animation and reset the animation to the first frame.
Definition: sprite_animator.h:135
static __jo_force_inline void jo_start_sprite_anim(const int anim_id)
Start animation and stop it at the last frame.
Definition: sprite_animator.h:127
unsigned short frame0_sprite_id
Definition: sprite_animator.h:50
@ JO_SPRITE_ANIM_STOP
Definition: sprite_animator.h:43
static __jo_force_inline int jo_get_anim_sprite_reverse(const int anim_id)
Get the sprite to display according to the animation in reverse (current frame)
Definition: sprite_animator.h:162
static __jo_force_inline void jo_restart_sprite_anim(const int anim_id)
Restart animation and stop it at the last frame.
Definition: sprite_animator.h:145
static __jo_force_inline unsigned short jo_get_sprite_anim_frame(const int anim_id)
Get current animation frame.
Definition: sprite_animator.h:85
void jo_clear_all_sprite_anim(void)
Clear all sprite animation.
@ JO_SPRITE_ANIM_STOP_AT_LAST_FRAME
Definition: sprite_animator.h:44
static __jo_force_inline void jo_start_sprite_anim_loop(const int anim_id)
Start animation loop.
Definition: sprite_animator.h:102
unsigned short cur_frame
Definition: sprite_animator.h:52
static __jo_force_inline int jo_set_sprite_anim_frame_rate(const int anim_id, const unsigned char framerate)
Set animation framerate.
Definition: sprite_animator.h:171
@ JO_SPRITE_ANIM_START
Definition: sprite_animator.h:41
#define JO_ZERO(X)
Set a variable to zero.
Definition: math.h:213
unsigned short frame_count
Definition: sprite_animator.h:51
int jo_replace_sprite_anim(const int at, const unsigned short sprite_id, const unsigned short frame_count, const unsigned char frame_rate)
Replace an existing animation.
unsigned char frame_rate
Definition: sprite_animator.h:53
static __jo_force_inline bool jo_is_sprite_anim_stopped(const int anim_id)
Determine if the animation is stopped.
Definition: sprite_animator.h:111
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition: types.h:39
@ JO_SPRITE_ANIM_START_REVERSE
Definition: sprite_animator.h:42
static __jo_force_inline void jo_stop_sprite_anim(const int anim_id)
Stop animation.
Definition: sprite_animator.h:119
jo_sprite_anim_action action
Definition: sprite_animator.h:55
jo_sprite_anim __jo_sprite_anim_tab[JO_MAX_SPRITE_ANIM]
Internal animation table.
Internal animation struct.
Definition: sprite_animator.h:49
static __jo_force_inline void jo_set_sprite_anim_frame(const int anim_id, const unsigned char frame)
Set animation frame.
Definition: sprite_animator.h:94
static __jo_force_inline int jo_get_anim_sprite(const int anim_id)
Get the sprite to display according to the animation (current frame)
Definition: sprite_animator.h:154
static __jo_force_inline unsigned char jo_get_sprite_anim_frame_rate(const int anim_id)
Get animation frame rate.
Definition: sprite_animator.h:67
unsigned char frame_skip
Definition: sprite_animator.h:54
jo_sprite_anim_action
Animation action.
Definition: sprite_animator.h:40
int jo_create_sprite_anim(const unsigned short sprite_id, const unsigned short frame_count, const unsigned char frame_rate)
Create an animation.