mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 02:56:43 +01:00
timeline: add new functions: TM_IsEmpty, TM_IsBackgroundEmpty, TM_SkipDelay
This commit is contained in:
parent
26843776a2
commit
8bebe6c5e2
2 changed files with 21 additions and 0 deletions
|
@ -341,6 +341,21 @@ SYMBOL_EXPORT void TM_CleanBackgroundQueue(struct Timeline* timeline) {
|
|||
timeline->background = NULL;
|
||||
}
|
||||
|
||||
SYMBOL_EXPORT void TM_SkipDelay(struct Timeline* timeline) {
|
||||
if (timeline->queue && timeline->queue->timer) {
|
||||
al_stop_timer(timeline->queue->timer);
|
||||
al_set_timer_speed(timeline->queue->timer, 0.01);
|
||||
al_start_timer(timeline->queue->timer);
|
||||
}
|
||||
}
|
||||
|
||||
SYMBOL_EXPORT bool TM_IsEmpty(struct Timeline* timeline) {
|
||||
return !timeline->queue;
|
||||
}
|
||||
SYMBOL_EXPORT bool TM_IsBackgroundEmpty(struct Timeline* timeline) {
|
||||
return !timeline->background;
|
||||
}
|
||||
|
||||
SYMBOL_EXPORT void TM_Destroy(struct Timeline* timeline) {
|
||||
TM_CleanQueue(timeline);
|
||||
TM_CleanBackgroundQueue(timeline);
|
||||
|
|
|
@ -96,5 +96,11 @@ struct TM_Arguments* TM_AddToArgs(struct TM_Arguments* args, int num, ...);
|
|||
void* TM_GetArg(struct TM_Arguments *args, int num);
|
||||
/*! \brief Destroy TM_Arguments queue. */
|
||||
void TM_DestroyArgs(struct TM_Arguments* args);
|
||||
/*! \brief Skip delay if it's currently the first action in the queue */
|
||||
void TM_SkipDelay(struct Timeline*);
|
||||
/*! \brief Checks if the main queue is empty */
|
||||
bool TM_IsEmpty(struct Timeline* timeline);
|
||||
/*! \brief Checks if the background queue is empty */
|
||||
bool TM_IsBackgroundEmpty(struct Timeline* timeline);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue