@@ -438,7 +438,7 @@ class Blaster : public PROP_INHERIT_PREFIX PropBase {
438438 FindBladeAgain ();
439439 SaberBase::DoBladeDetect (false );
440440 return true ;
441- #endif
441+ #endif
442442 }
443443 return false ;
444444 }
@@ -519,6 +519,7 @@ class Blaster : public PROP_INHERIT_PREFIX PropBase {
519519#ifdef PROP_BOTTOM
520520
521521#define ONCE_PER_BLASTER_EFFECT (X ) \
522+ X (auto ) \
522523 X(stun) \
523524 X(blast) \
524525 X(reload) \
@@ -533,7 +534,7 @@ class Blaster : public PROP_INHERIT_PREFIX PropBase {
533534struct BlasterDisplayConfigFile : public ConfigFile {
534535 BlasterDisplayConfigFile () { link (&font_config); }
535536 void iterateVariables (VariableOP *op) override {
536- CONFIG_VARIABLE2 (ProffieOSStunImageDuration, 1000 .0f );
537+ CONFIG_VARIABLE2 (ProffieOSStunImageDuration, 1000 .0f );
537538 CONFIG_VARIABLE2 (ProffieOSFireImageDuration, 1000 .0f );
538539 CONFIG_VARIABLE2 (ProffieOSReloadImageDuration, 1000 .0f );
539540 CONFIG_VARIABLE2 (ProffieOSEmptyImageDuration, 1000 .0f );
@@ -561,7 +562,6 @@ struct BlasterDisplayConfigFile : public ConfigFile {
561562 float ProffieOSDestructImageDuration;
562563};
563564
564-
565565template <typename PREFIX = ByteArray<>>
566566struct BlasterDisplayEffects {
567567 BlasterDisplayEffects () : dummy_(0 ) ONCE_PER_BLASTER_EFFECT(INIT_IMG) {}
@@ -579,6 +579,17 @@ class BlasterDisplayController : public StandardDisplayController<Width, col_t,
579579 blaster_font_config (*getPtr<BlasterDisplayConfigFile>()) {
580580 }
581581
582+ void ShowDefault (bool ignore_lockup = false ) override {
583+ if (SaberBase::IsOn () &&
584+ SaberBase::Lockup () == SaberBase::LOCKUP_AUTOFIRE &&
585+ img_.IMG_auto &&
586+ !ignore_lockup) {
587+ this ->SetFile (&img_.IMG_auto , 3600000.0 );
588+ return ;
589+ }
590+ StandardDisplayController<Width, col_t , PREFIX>::ShowDefault (ignore_lockup);
591+ }
592+
582593 void SB_Effect2 (EffectType effect, EffectLocation location) override {
583594 switch (effect) {
584595 case EFFECT_STUN:
@@ -619,22 +630,34 @@ class BlasterDisplayController : public StandardDisplayController<Width, col_t,
619630#endif // INCLUDE_SSD1306
620631
621632template <int W, int H, typename PREFIX = ConcatByteArrays<typename NumberToByteArray<W>::type, ByteArray<' x' >, typename NumberToByteArray<H>::type>>
622- class BlasterColorDisplayController : public StandarColorDisplayController <W, H, PREFIX> {
633+ class BlasterColorDisplayController : public StandardColorDisplayController <W, H, PREFIX> {
623634public:
624635 template <int w, int h>
625- explicit BlasterColorDisplayController (SizedLayeredScreenControl<w, h>* screen) : StandarColorDisplayController <W, H, PREFIX>(screen) ONCE_PER_BLASTER_EFFECT(INIT_SCR) {
636+ explicit BlasterColorDisplayController (SizedLayeredScreenControl<w, h>* screen) : StandardColorDisplayController <W, H, PREFIX>(screen) ONCE_PER_BLASTER_EFFECT(INIT_SCR) {
626637 }
638+
639+ void ShowDefault (bool ignore_lockup = false ) override {
640+ if (SaberBase::IsOn () &&
641+ SaberBase::Lockup () == SaberBase::LOCKUP_AUTOFIRE &&
642+ SCR_auto &&
643+ !ignore_lockup) {
644+ this ->scr_ .Play (&SCR_auto);
645+ return ;
646+ }
647+ StandardColorDisplayController<W, H, PREFIX>::ShowDefault (ignore_lockup);
648+ }
649+
627650 void SB_Effect2 (EffectType effect, EffectLocation location) override {
628651 switch (effect) {
629- case EFFECT_STUN: this ->scr_ .Play (&SCR_stun); break ;
652+ case EFFECT_STUN: this ->scr_ .Play (&SCR_stun); break ;
630653 case EFFECT_FIRE: this ->scr_ .Play (&SCR_blast); break ;
631654 case EFFECT_RELOAD: this ->scr_ .Play (&SCR_reload); break ;
632655 case EFFECT_EMPTY: this ->scr_ .Play (&SCR_empty); break ;
633656 case EFFECT_JAM: this ->scr_ .Play (&SCR_jam); break ;
634657 case EFFECT_CLIP_IN: this ->scr_ .Play (&SCR_clipin); break ;
635658 case EFFECT_CLIP_OUT: this ->scr_ .Play (&SCR_clipout); break ;
636659 default :
637- StandarColorDisplayController <W, H, PREFIX>::SB_Effect2 (effect, location);
660+ StandardColorDisplayController <W, H, PREFIX>::SB_Effect2 (effect, location);
638661 }
639662 }
640663
0 commit comments