pitrix/src/effects.cpp

73 lines
2.7 KiB
C++
Raw Normal View History

#include "effects.h"
#include "animations.h"
#include "my_fastled.h"
#include "EffectEntry.h"
#include "effect_bell.h"
#include "effect_sinematrix3.h"
#include "effect_big_clock.h"
#include "effect_clock.h"
#include "effect_static.h"
#include "effect_animation.h"
#include "effect_single_dynamic.h"
#include "effect_multi_dynamic.h"
#include "effect_matrix.h"
#include "effect_twirl.h"
#include "effect_cycle.h"
2019-05-30 09:12:40 +00:00
#include "effect_confetti.h"
2019-05-31 03:45:07 +00:00
#include "effect_snake.h"
#include "effect_fire.h"
SimpleList<EffectEntry>* effects;
SimpleList<Effect*>* cycle_effects;
ClockEffect effect_clock;
Sinematrix3Effect effect_sinematrix3;
BigClockEffect effect_big_clock;
//ClockEffect effect_clock; <-- generated as global variable in effects.h
BellEffect effect_bell;
StaticEffect effect_off(CRGB(0x000000));
AnimationEffect effect_anim_koopa(&animation_koopa, CRGB(0x000000), 0, 0);
AnimationEffect effect_anim_couple_rain(&animation_couple_rain, CRGB(0x000000), -8, -16);
2019-05-29 23:35:57 +00:00
AnimationEffect effect_anim_heart(&animation_heart, CRGB(0x000000), 0, 0);
SingleDynamicEffect effect_single_dynamic;
MultiDynamicEffect effect_multi_dynamic;
MatrixEffect effect_matrix;
CycleEffect effect_cycle;
TwirlEffect effect_twirl;
2019-05-30 09:12:40 +00:00
ConfettiEffect effect_confetti;
2019-05-31 03:45:07 +00:00
SnakeEffect effect_snake;
FireEffect effect_fire;
Effect* current_effect;
void setup_effects() {
effects = new SimpleList<EffectEntry>();
cycle_effects = new SimpleList<Effect*>();
effects->add((EffectEntry){"sinematrix3", (Effect *)&effect_sinematrix3});
effects->add((EffectEntry){"big_clock", (Effect *)&effect_big_clock});
effects->add((EffectEntry){"clock", (Effect *)&effect_clock});
effects->add((EffectEntry){"bell", (Effect *)&effect_bell});
effects->add((EffectEntry){"off", (Effect *)&effect_off});
effects->add((EffectEntry){"koopa", (Effect *)&effect_anim_koopa});
effects->add((EffectEntry){"couple_rain", (Effect *)&effect_anim_couple_rain});
effects->add((EffectEntry){"single_dynamic", (Effect *)&effect_single_dynamic});
effects->add((EffectEntry){"multi_dynamic", (Effect *)&effect_multi_dynamic});
effects->add((EffectEntry){"matrix", (Effect *)&effect_matrix});
effects->add((EffectEntry){"cycle", (Effect *)&effect_cycle});
effects->add((EffectEntry){"twirl", (Effect *)&effect_twirl});
2019-05-29 23:35:57 +00:00
effects->add((EffectEntry){"heart", (Effect*)&effect_anim_heart});
2019-05-30 09:12:40 +00:00
effects->add((EffectEntry){"confetti", (Effect *)&effect_confetti});
2019-05-31 03:45:07 +00:00
effects->add((EffectEntry){"snake", (Effect *)&effect_snake});
effects->add((EffectEntry){"fire", (Effect *)&effect_fire});
cycle_effects->add(&effect_sinematrix3);
cycle_effects->add(&effect_single_dynamic);
cycle_effects->add(&effect_multi_dynamic);
cycle_effects->add(&effect_matrix);
2019-05-30 09:12:40 +00:00
cycle_effects->add(&effect_confetti);
2019-05-31 03:45:07 +00:00
cycle_effects->add(&effect_snake);
current_effect = &effect_cycle;
}