Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Jo Engine Storyboard Animation function prototypes. More...
Go to the source code of this file.
Data Structures | |
struct | jo_storyboard_object_cache |
Internal object cache. More... | |
struct | jo_animation |
Object animation definition. More... | |
struct | jo_storyboard |
Storyboard definition. More... | |
Macros | |
#define | JO_STORYBOARD_INFINITE_DURATION |
Specify that the animation is infinite. More... | |
Functions | |
jo_storyboard * | jo_storyboard_create (const bool autoplay, const bool repeat) |
Create an empty storyboard. More... | |
void | jo_storyboard_destroy (jo_storyboard *const storyboard) |
Destroy the storyboard. More... | |
jo_animation * | jo_storyboard_create_animation (jo_storyboard *const storyboard, const unsigned char frame_skip, const unsigned int duration) |
Create an empty animation. More... | |
static __jo_force_inline void | jo_storyboard_destroy_animation (jo_storyboard *const storyboard, const jo_animation *const animation) |
Destroy animation. More... | |
static __jo_force_inline void | jo_storyboard_repeat (jo_storyboard *const storyboard, bool repeat) |
Storyboard repeat control. More... | |
static __jo_force_inline void | jo_storyboard_suspend (jo_storyboard *const storyboard) |
Suspend all storyboard animation. More... | |
static __jo_force_inline void | jo_storyboard_resume (jo_storyboard *const storyboard) |
Resume all suspended storyboard animation. More... | |
static __jo_force_inline void | jo_storyboard_play (jo_storyboard *const storyboard) |
Play storyboard animation. More... | |
static __jo_force_inline void | jo_storyboard_toggle (jo_storyboard *const storyboard) |
Switch between resume and suspend. More... | |
static __jo_force_inline void | jo_storyboard_add_object (jo_storyboard *const storyboard, const void *const object) |
Add object in storyboard. More... | |
static __jo_force_inline void | jo_storyboard_remove_object (jo_storyboard *const storyboard, const void *const object) |
Remove object from storyboard. More... | |
static __jo_force_inline jo_storyboard_object_cache * | jo_storyboard_get_object_cache (jo_storyboard *const storyboard, const void *const object) |
Get object storyboard cache. More... | |
static __jo_force_inline void | jo_storyboard_reset_object_position (jo_storyboard *const storyboard, const void *const object) |
Reset object position. More... | |
static __jo_force_inline jo_storyboard * | jo_storyboard_create_for_object (const bool autoplay, const bool repeat, const void *const object) |
Create a new storyboard for the object. More... | |
static __jo_force_inline jo_animation * | jo_storyboard_create_rotation_animation (jo_storyboard *const storyboard, const char speed, const unsigned int duration) |
Create a rotation animation. More... | |
static __jo_force_inline jo_animation * | jo_storyboard_create_translation_animation (jo_storyboard *const storyboard, const short angle, const char speed, const unsigned int duration) |
Create a translation animation. More... | |
static __jo_force_inline jo_animation * | jo_storyboard_create_translation_animation_using_direction (jo_storyboard *const storyboard, const jo_8_directions direction, const char speed, const unsigned int duration) |
Create a translation animation using jo_8_directions enum. More... | |
static __jo_force_inline jo_animation * | jo_storyboard_create_circle_animation (jo_storyboard *const storyboard, const short radius, const char speed, const unsigned int duration) |
Create a circle rotation animation. More... | |
static __jo_force_inline jo_storyboard * | jo_storyboard_rotate_object (const void *const object, const char speed, const unsigned int duration) |
Create a rotation animation storyboard for a specific object. More... | |
static __jo_force_inline jo_storyboard * | jo_storyboard_move_object (const void *const object, const short angle, const char speed, const unsigned int duration) |
Create a translation animation storyboard for a specific object. More... | |
static __jo_force_inline jo_storyboard * | jo_storyboard_move_object_in_direction (const void *const object, const jo_8_directions direction, const char speed, const unsigned int duration) |
Create a translation animation storyboard for a specific object using jo_8_directions enum. More... | |
static __jo_force_inline jo_storyboard * | jo_storyboard_move_object_in_circle (const void *const object, const short radius, const char speed, const unsigned int duration) |
Create a circle rotation storyboard for a specific object. More... | |
Jo Engine Storyboard Animation function prototypes.
struct jo_storyboard_object_cache |
Internal object cache.
Data Fields | ||
---|---|---|
short | current_cos | |
short | current_sin | |
int | dx | |
int | dy | |
jo_3d_object_attributes * | user |
struct jo_animation |
struct jo_storyboard |
#define JO_STORYBOARD_INFINITE_DURATION |
Specify that the animation is infinite.
|
static |
Add object in storyboard.
storyboard | Storyboard |
object | Pointer to an object (jo_pos2D, jo_pos3D, jo_2d_object_attributes or jo_3d_object_attributes) |
jo_storyboard* jo_storyboard_create | ( | const bool | autoplay, |
const bool | repeat | ||
) |
Create an empty storyboard.
autoplay | Play the storyboard immediately |
repeat | Play the storyboard in loop (each animation must have a limited duration) |
jo_animation* jo_storyboard_create_animation | ( | jo_storyboard *const | storyboard, |
const unsigned char | frame_skip, | ||
const unsigned int | duration | ||
) |
Create an empty animation.
storyboard | Storyboard |
frame_skip | Number of frame to skip (slowdown animation but preserve CPU) |
duration | Duration of animation (you can pass JO_STORYBOARD_INFINITE_DURATION for infinite) |
|
static |
Create a circle rotation animation.
storyboard | Storyboard |
radius | Circle radius |
speed | Translation speed |
duration | Duration of animation (you can pass JO_STORYBOARD_INFINITE_DURATION for infinite) |
|
static |
Create a new storyboard for the object.
autoplay | Play the storyboard immediately |
repeat | Play the storyboard in loop (each animation must have a limited duration) |
object | Pointer to an object (jo_pos2D, jo_pos3D, jo_2d_object_attributes or jo_3d_object_attributes) |
|
static |
Create a rotation animation.
storyboard | Storyboard |
speed | Rotation speed |
duration | Duration of animation (you can pass JO_STORYBOARD_INFINITE_DURATION for infinite) |
|
static |
Create a translation animation.
storyboard | Storyboard |
angle | Vector direction |
speed | Translation speed |
duration | Duration of animation (you can pass JO_STORYBOARD_INFINITE_DURATION for infinite) |
|
static |
Create a translation animation using jo_8_directions enum.
storyboard | Storyboard |
direction | Vector direction |
speed | Translation speed |
duration | Duration of animation (you can pass JO_STORYBOARD_INFINITE_DURATION for infinite) |
void jo_storyboard_destroy | ( | jo_storyboard *const | storyboard | ) |
|
static |
Destroy animation.
storyboard | Storyboard which contains the animation |
animation | Animation to destroy |
|
static |
Get object storyboard cache.
storyboard | Storyboard |
object | Pointer to an object (should be the same passed in jo_storyboard_add_object()) |
|
static |
Create a translation animation storyboard for a specific object.
object | Pointer to an object (jo_pos2D, jo_pos3D, jo_2d_object_attributes or jo_3d_object_attributes) |
angle | Vector direction |
speed | Rotation speed |
duration | Duration of animation (you can pass JO_STORYBOARD_INFINITE_DURATION for infinite) |
|
static |
Create a circle rotation storyboard for a specific object.
object | Pointer to an object (jo_pos2D, jo_pos3D, jo_2d_object_attributes or jo_3d_object_attributes) |
radius | Circle radius |
speed | Translation speed |
duration | Duration of animation (you can pass JO_STORYBOARD_INFINITE_DURATION for infinite) |
|
static |
Create a translation animation storyboard for a specific object using jo_8_directions enum.
object | Pointer to an object (jo_pos2D, jo_pos3D, jo_2d_object_attributes or jo_3d_object_attributes) |
direction | Vector direction |
speed | Rotation speed |
duration | Duration of animation (you can pass JO_STORYBOARD_INFINITE_DURATION for infinite) |
|
static |
Play storyboard animation.
storyboard | Storyboard |
|
static |
Remove object from storyboard.
storyboard | Storyboard |
object | Pointer to an object (should be the same passed in jo_storyboard_add_object()) |
|
static |
Storyboard repeat control.
storyboard | Storyboard |
repeat | Repeat |
|
static |
Reset object position.
storyboard | Storyboard |
object | Pointer to an object (should be the same passed in jo_storyboard_add_object()) |
|
static |
Resume all suspended storyboard animation.
storyboard | Storyboard |
|
static |
Create a rotation animation storyboard for a specific object.
object | Pointer to an object (jo_pos2D, jo_pos3D, jo_2d_object_attributes or jo_3d_object_attributes) |
speed | Rotation speed |
duration | Duration of animation (you can pass JO_STORYBOARD_INFINITE_DURATION for infinite) |
|
static |
Suspend all storyboard animation.
storyboard | Storyboard |
|
static |
Switch between resume and suspend.
storyboard | Storyboard |