|
Jo Engine
2024.04.28
Jo Sega Saturn Engine
|
Go to the documentation of this file.
35 #ifndef __JO_STORYBOARD_H__
36 # define __JO_STORYBOARD_H__
38 #ifdef JO_COMPILE_WITH_STORYBOARD_SUPPORT
43 # define JO_STORYBOARD_INFINITE_DURATION (0)
133 storyboard->
repeat = repeat;
141 storyboard->
pause =
true;
149 storyboard->
pause =
false;
157 storyboard->
pause =
false;
165 storyboard->
pause ^=
true;
void jo_storyboard_destroy(jo_storyboard *const storyboard)
Destroy the storyboard.
static __jo_force_inline void jo_storyboard_play(jo_storyboard *const storyboard)
Play storyboard animation.
Definition: storyboard.h:155
static __jo_force_inline void jo_storyboard_suspend(jo_storyboard *const storyboard)
Suspend all storyboard animation.
Definition: storyboard.h:139
short cos_radius
Definition: storyboard.h:66
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.
Definition: storyboard.h:376
static __jo_force_inline void jo_storyboard_resume(jo_storyboard *const storyboard)
Resume all suspended storyboard animation.
Definition: storyboard.h:147
short current_cos
Definition: storyboard.h:53
int dx
Definition: storyboard.h:51
Object animation definition.
Definition: storyboard.h:59
jo_list animations
Definition: storyboard.h:79
bool pause
Definition: storyboard.h:81
static __jo_force_inline bool jo_list_remove_first_value(jo_list *const list, jo_list_data data)
Remove the first item on the list that match DATA.
Definition: list.h:253
short sin_radius
Definition: storyboard.h:67
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.
Definition: storyboard.h:264
Internal object cache.
Definition: storyboard.h:49
unsigned int limit
Definition: storyboard.h:64
void jo_list_remove(jo_list *const list, const jo_node *const node_to_delete)
Remove an item on the list.
bool disabled
Definition: storyboard.h:60
Node data (4 bytes)
Definition: list.h:49
static __jo_force_inline short jo_direction_to_angle(const jo_8_directions direction)
Convert jo_8_directions to angle in degree.
Definition: math.h:1774
#define JO_ZERO(X)
Set a variable to zero.
Definition: math.h:213
bool repeat
Definition: storyboard.h:80
Storyboard definition.
Definition: storyboard.h:77
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.
Definition: storyboard.h:308
jo_list_data data
Definition: list.h:67
jo_node * first
Definition: list.h:76
unsigned int count
Definition: storyboard.h:61
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.
Definition: storyboard.h:346
jo_3d_object_attributes * user
Definition: storyboard.h:50
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.
Definition: storyboard.h:213
#define __jo_force_inline
force inline attribute (and prevent Doxygen prototype parsing bug)
Definition: types.h:39
int dy
Definition: storyboard.h:52
char translation_speed_x
Definition: storyboard.h:69
static __jo_force_inline void jo_storyboard_toggle(jo_storyboard *const storyboard)
Switch between resume and suspend.
Definition: storyboard.h:163
static __jo_force_inline void jo_storyboard_add_object(jo_storyboard *const storyboard, const void *const object)
Add object in storyboard.
Definition: storyboard.h:177
List struct.
Definition: list.h:74
#define JO_MULT_BY_8(X)
Multiply a variable by 8.
Definition: math.h:78
unsigned char frame_skip
Definition: storyboard.h:63
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.
Definition: storyboard.h:296
void * jo_malloc_with_behaviour(unsigned int n, const jo_malloc_behaviour behaviour)
dynamic memory allocator with specific behaviour
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.
Definition: storyboard.h:331
short current_sin
Definition: storyboard.h:54
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.
Definition: storyboard.h:279
static __jo_force_inline jo_node * jo_list_add_ptr(jo_list *const list, void *ptr)
Add a pointer on the list.
Definition: list.h:106
static __jo_force_inline void jo_storyboard_remove_object(jo_storyboard *const storyboard, const void *const object)
Remove object from storyboard.
Definition: storyboard.h:193
unsigned short frame
Definition: storyboard.h:62
Node struct.
Definition: list.h:66
@ JO_MALLOC_TRY_REUSE_SAME_BLOCK_SIZE
A little bit slower than JO_MALLOC_TRY_REUSE_BLOCK but reduce memory usage.
Definition: malloc.h:77
char rotation_speed
Definition: storyboard.h:65
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.
Definition: storyboard.h:361
jo_8_directions
8 directions definition
Definition: types.h:302
jo_list objects
Definition: storyboard.h:78
jo_node * next
Definition: list.h:69
short direction
Definition: storyboard.h:68
static __jo_force_inline void jo_storyboard_reset_object_position(jo_storyboard *const storyboard, const void *const object)
Reset object position.
Definition: storyboard.h:227
jo_animation * jo_storyboard_create_animation(jo_storyboard *const storyboard, const unsigned char frame_skip, const unsigned int duration)
Create an empty animation.
static __jo_force_inline void jo_storyboard_destroy_animation(jo_storyboard *const storyboard, const jo_animation *const animation)
Destroy animation.
Definition: storyboard.h:118
char translation_speed_y
Definition: storyboard.h:70
static __jo_force_inline void jo_storyboard_repeat(jo_storyboard *const storyboard, bool repeat)
Storyboard repeat control.
Definition: storyboard.h:131
void * ptr
Definition: list.h:59
jo_storyboard * jo_storyboard_create(const bool autoplay, const bool repeat)
Create an empty storyboard.
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.
Definition: storyboard.h:244
Object for 3D manipulation (storyboard) using fixed number.
Definition: types.h:124