1- /* V7/8-294 .
1+ /* V7/8-295 .
22============================================================
33================= SABERSENSE PROP FILE =================
44================= by =================
@@ -291,7 +291,7 @@ COLOUR CHANGE FUNCTIONS WITH BLADE ON
291291 sequential QUOTE with blade ON and OFF, and DOWN for random
292292 FORCE effect (ON) and music TRACK (OFF). Define acts on
293293 both ON and OFF states for consistency.
294-
294+
295295#define SABERSENSE_RANDOM_QUOTE
296296 Makes the playing of quote.wav files random
297297 instead of sequential.
@@ -727,8 +727,8 @@ class SabersenseButtons : public PROP_INHERIT_PREFIX PropBase {
727727 SaberBase::DoNewFont (); // Play font ident if 'bladeid' sound file missing.
728728 }
729729 }
730- #endif
731- #endif
730+ #endif // SABERSENSE_ENABLE_ARRAY_FONT_IDENT
731+ #endif // SABERSENSE_BLADE_ID
732732
733733 // Manual Array Selector, switches on-demand to next array, plays 'array' ident sound.
734734#ifdef SABERSENSE_ARRAY_SELECTOR
@@ -785,8 +785,8 @@ class SabersenseButtons : public PROP_INHERIT_PREFIX PropBase {
785785 SaberBase::DoNewFont (); // Play font ident if 'array' sound file missing.
786786 }
787787 }
788- #endif
789- #endif
788+ #endif // SABERSENSE_ENABLE_ARRAY_FONT_IDENT
789+ #endif // SABERSENSE_ARRAY_SELECTOR
790790
791791// RESET FACTORY DEFAULTS (Delete Save Files).
792792// Script to determine if sound effects have finished.
@@ -850,7 +850,7 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
850850 On ();
851851#else
852852 FastOn ();
853- #endif
853+ #endif
854854 }
855855 return true ;
856856#endif
@@ -863,7 +863,7 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
863863 On ();
864864#else
865865 FastOn ();
866- #endif
866+ #endif
867867 last_twist_ = millis ();
868868 }
869869 return true ;
@@ -887,7 +887,7 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
887887 On ();
888888#else
889889 FastOn ();
890- #endif
890+ #endif
891891 }
892892 return true ;
893893#endif
@@ -899,7 +899,7 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
899899 On ();
900900#else
901901 FastOn ();
902- #endif
902+ #endif
903903 }
904904 return true ;
905905#endif
@@ -913,11 +913,11 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
913913
914914 case EVENTID (BUTTON_NONE, EVENT_TWIST_LEFT, MODE_ON | BUTTON_POWER):
915915 SaberBase::DoEffect (EFFECT_USER6, 0 );
916- return true ;
916+ return true ;
917917
918918 case EVENTID (BUTTON_NONE, EVENT_SWING, MODE_OFF | BUTTON_POWER):
919919 SaberBase::DoEffect (EFFECT_USER7, 0 );
920- return true ;
920+ return true ;
921921#endif
922922
923923#if NUM_BUTTONS == 2
@@ -1099,7 +1099,7 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
10991099 SetPreset (target_preset, true );
11001100 break ;
11011101 }
1102- #endif
1102+ #endif // !SABERSENSE_DISABLE_FONT_SKIPPING
11031103
11041104 // BLADE ID OPTIONS AND ARRAY NAVIGATION
11051105 // Blade ID on-demand scanning with BladeID audio idents.
@@ -1115,7 +1115,7 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
11151115 // Check for blade present if using Blade Detect.
11161116#ifdef BLADE_DETECT_PIN
11171117 if (!blade_detected_) return true ; // Do nothing if no blade detected.
1118- #endif
1118+ #endif // BLADE_DETECT_PIN
11191119 {
11201120 // Cycles through blade arrays regardless of BladeID status.
11211121 bool forward = fusor.angle1 () > 0 ;
@@ -1125,9 +1125,9 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
11251125 PlayArraySound ();
11261126#ifndef SABERSENSE_DISABLE_SAVE_ARRAY
11271127 SaveArrayState ();
1128- #endif
1128+ #endif // !SABERSENSE_DISABLE_SAVE_ARRAY
11291129 return true ;
1130- #endif
1130+ #endif // SABERSENSE_ARRAY_SELECTOR
11311131
11321132 // SOUND EFFECT PLAYERS.
11331133 // With Blade ON - UP for Character Quote, plays sequentially.
@@ -1141,14 +1141,14 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
11411141#else
11421142 // Quote player points downwards.
11431143 if (fusor.angle1 () < 0 )
1144- #endif
1144+ #endif // SABERSENSE_FLIP_AUDIO_PLAYERS
11451145 {
11461146#ifndef SABERSENSE_RANDOM_QUOTE
11471147 SFX_quote.SelectNext ();
11481148 SaberBase::DoEffect (EFFECT_QUOTE, 0 );
11491149#else
11501150 SaberBase::DoEffect (EFFECT_QUOTE, -1 ); // Repetition and '-1' required for OS-7.
1151- #endif
1151+ #endif // SABERSENSE_RANDOM_QUOTE
11521152 } else {
11531153 SaberBase::DoForce (); // Force effect for hilt pointed DOWN.
11541154 }
@@ -1164,17 +1164,18 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
11641164#ifndef SABERSENSE_FLIP_AUDIO_PLAYERS
11651165 // Define reverses UP/DOWN options for all QUOTE/FORCE/TRACK audio players.
11661166 // Quote player points upwards.
1167- if (fusor.angle1 () > 0 ) {
1167+ if (fusor.angle1 () > 0 )
11681168#else
11691169 // Quote player points downwards.
1170- if (fusor.angle1 () < 0 ) {
1171- #endif
1170+ if (fusor.angle1 () < 0 )
1171+ #endif // SABERSENSE_FLIP_AUDIO_PLAYERS
1172+ {
11721173#ifndef SABERSENSE_RANDOM_QUOTE
11731174 SFX_quote.SelectNext ();
11741175 SaberBase::DoEffect (EFFECT_QUOTE, 0 );
11751176#else
11761177 SaberBase::DoEffect (EFFECT_QUOTE, -1 ); // Repetition and '-1' required for OS-7.
1177- #endif
1178+ #endif // SABERSENSE_RANDOM_QUOTE
11781179 } else {
11791180 StartOrStopTrack (); // Play track for hilt pointed DOWN.
11801181 }
@@ -1201,8 +1202,8 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
12011202 case EVENTID (BUTTON_AUX, EVENT_CLICK_SHORT, MODE_ON | BUTTON_POWER):
12021203 ToggleColorChangeMode ();
12031204 return true ;
1204- #endif
1205- #endif
1205+ #endif // NUM_BUTTONS == 2
1206+ #endif // !SABERSENSE_NO_COLOR_CHANGE
12061207
12071208 // BLASTER DEFLECTION
12081209 // 1 Button (and 2 button with extra define).
@@ -1260,7 +1261,7 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
12601261 case EVENTID (BUTTON_NONE, EVENT_CLASH, MODE_ON | BUTTON_AUX):
12611262#else
12621263 case EVENTID (BUTTON_AUX, EVENT_FIRST_HELD, MODE_ON):
1263- #endif
1264+ #endif // NUM_BUTTONS
12641265
12651266 if (accel_.x < -0.15 ) {
12661267 SaberBase::SetLockup (SaberBase::LOCKUP_DRAG);
0 commit comments