pitrix/src/effects.cpp

62 lines
2.3 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"
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;
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});
cycle_effects->add(&effect_sinematrix3);
cycle_effects->add(&effect_single_dynamic);
cycle_effects->add(&effect_multi_dynamic);
cycle_effects->add(&effect_matrix);
current_effect = &effect_cycle;
}