aboutsummaryrefslogtreecommitdiff
path: root/visualizer.h
diff options
context:
space:
mode:
Diffstat (limited to 'visualizer.h')
-rw-r--r--visualizer.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/visualizer.h b/visualizer.h
index 22798cda6..8a2772c6d 100644
--- a/visualizer.h
+++ b/visualizer.h
@@ -45,8 +45,8 @@ void visualizer_suspend(void);
45// This should be called when the keyboard wakes up from suspend state 45// This should be called when the keyboard wakes up from suspend state
46void visualizer_resume(void); 46void visualizer_resume(void);
47 47
48// If you need support for more than 8 keyframes per animation, you can change this 48// If you need support for more than 16 keyframes per animation, you can change this
49#define MAX_VISUALIZER_KEY_FRAMES 8 49#define MAX_VISUALIZER_KEY_FRAMES 16
50 50
51struct keyframe_animation_t; 51struct keyframe_animation_t;
52 52
@@ -95,12 +95,20 @@ typedef struct keyframe_animation_t {
95 // keyframe update functions 95 // keyframe update functions
96 int current_frame; 96 int current_frame;
97 int time_left_in_frame; 97 int time_left_in_frame;
98 bool first_update_of_frame;
99 bool last_update_of_frame;
98 bool need_update; 100 bool need_update;
99 101
100} keyframe_animation_t; 102} keyframe_animation_t;
101 103
104extern GDisplay* LCD_DISPLAY;
105extern GDisplay* LED_DISPLAY;
106
102void start_keyframe_animation(keyframe_animation_t* animation); 107void start_keyframe_animation(keyframe_animation_t* animation);
103void stop_keyframe_animation(keyframe_animation_t* animation); 108void stop_keyframe_animation(keyframe_animation_t* animation);
109// This runs the next keyframe, but does not update the animation state
110// Useful for crossfades for example
111void run_next_keyframe(keyframe_animation_t* animation, visualizer_state_t* state);
104 112
105// Some predefined keyframe functions that can be used by the user code 113// Some predefined keyframe functions that can be used by the user code
106// Does nothing, useful for adding delays 114// Does nothing, useful for adding delays