Skip to content

Commit a92b628

Browse files
EFFECT_USER1 Simplified for Kestis Colour Change (#883)
1 parent 5f2288f commit a92b628

File tree

1 file changed

+29
-44
lines changed

1 file changed

+29
-44
lines changed

props/saber_sabersense_buttons.h

Lines changed: 29 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* V7/8-295.
1+
/* V7/8-300.
22
============================================================
33
================= SABERSENSE PROP FILE =================
44
================= by =================
@@ -136,7 +136,7 @@ FUNCTIONS WITH BLADE ON
136136
Lightning block Double click and hold while ON.
137137
Melt Hold and push blade tip against wall (stab). Rotate for heat colours.
138138
Blaster blocks Short click/double click/triple click while ON.
139-
Enter multi-blast mode Hold while swinging for one second and release.
139+
Enter multi-blast mode Hold while swinging for one second and release. ***
140140
To trigger blaster block, swing saber while in multi-blast mode.
141141
To exit, hold while swinging for one second and release.
142142
@@ -151,6 +151,8 @@ COLOUR CHANGE FUNCTIONS WITH BLADE ON
151151
152152
* = Gesture ignitions also available via defines.
153153
** = Audio player orientations can be reversed using SABERSENSE_FLIP_AUDIO_PLAYERS define.
154+
*** = Can be used for Kestis style Colour Change feature via define. In which case Multi-blast
155+
is accessed by four clicks of POWER with blade on.
154156
155157
============================================================
156158
===================== 2 BUTTON CONTROLS ====================
@@ -194,7 +196,7 @@ FUNCTIONS WITH BLADE ON
194196
Lightning block Double-click POWER and hold.
195197
Melt Hold POWER and stab blade tip against wall. Rotate for heat colours.
196198
Blaster blocks Short click AUX. (Add Short click POWER using define).
197-
Enter multi-blast mode Hold POWER while swinging for one second and release.
199+
Enter multi-blast mode Hold POWER while swinging for one second and release. ***
198200
Saber will play two quick blasts confirming mode.
199201
Swing blade to trigger blaster block.
200202
To exit multi-blast mode, fast single click AUX.
@@ -212,6 +214,8 @@ COLOUR CHANGE FUNCTIONS WITH BLADE ON
212214
213215
* = Gesture ignitions also available via defines.
214216
** = Audio player orientations can be reversed using SABERSENSE_FLIP_AUDIO_PLAYERS define.
217+
*** = Can be used for Kestis style Colour Change feature via define. In which case Multi-blast
218+
is accessed by four clicks of POWER with blade on.
215219
216220
===========================================================
217221
=================== SABERSENSE DEFINES ====================
@@ -344,12 +348,18 @@ COLOUR CHANGE FUNCTIONS WITH BLADE ON
344348
Applicable to two-button mode only, reverts to lockup
345349
being triggered by clash while holding aux.
346350
347-
#define SABERSENSE_F263_CUSTOM_USER_EFFECT
348-
Based on Fett263 'Special Abilities', this define
349-
enables interaction with EFFECT_USERx in standard
350-
(non-Fett) blade styles for custom effects like
351-
swing colour changing.
352-
351+
#define SABERSENSE_EFFECT_USER1_ALT_FONT
352+
This define utilises ProffieOS's EFFECT_USER1
353+
feature in blade styles to allow effects like
354+
the swing colour change seen in the Cal Kestis
355+
Fallen Order video game.
356+
It also allows the Alt Font feature to change
357+
certain sounds when combined with a suitable
358+
blade style and font folder layout.
359+
Further details and specific blade styles can
360+
be found on the Sabersense website here:
361+
https://sabersense.square.site/downloads
362+
353363
GESTURE CONTROLS
354364
There are four gesture types: Twist, Stab, Swing and Thrust.
355365
#define SABERSENSE_TWIST_ON
@@ -904,41 +914,6 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
904914
return true;
905915
#endif
906916

907-
// Based on Fett263 'Special Abilities'.
908-
#ifdef SABERSENSE_F263_CUSTOM_USER_EFFECT
909-
#if NUM_BUTTONS >= 1
910-
case EVENTID(BUTTON_NONE, EVENT_TWIST_RIGHT, MODE_ON | BUTTON_POWER):
911-
SaberBase::DoEffect(EFFECT_USER5, 0);
912-
return true;
913-
914-
case EVENTID(BUTTON_NONE, EVENT_TWIST_LEFT, MODE_ON | BUTTON_POWER):
915-
SaberBase::DoEffect(EFFECT_USER6, 0);
916-
return true;
917-
918-
case EVENTID(BUTTON_NONE, EVENT_SWING, MODE_OFF | BUTTON_POWER):
919-
SaberBase::DoEffect(EFFECT_USER7, 0);
920-
return true;
921-
#endif
922-
923-
#if NUM_BUTTONS == 2
924-
case EVENTID(BUTTON_NONE, EVENT_TWIST_RIGHT, MODE_ON | BUTTON_AUX):
925-
SaberBase::DoEffect(EFFECT_USER3, 0);
926-
return true;
927-
928-
case EVENTID(BUTTON_NONE, EVENT_TWIST_LEFT, MODE_ON | BUTTON_AUX):
929-
SaberBase::DoEffect(EFFECT_USER4, 0);
930-
return true;
931-
932-
case EVENTID(BUTTON_NONE, EVENT_SWING, MODE_ON | BUTTON_AUX):
933-
SaberBase::DoEffect(EFFECT_USER1, 0);
934-
return true;
935-
936-
case EVENTID(BUTTON_NONE, EVENT_SWING, MODE_OFF | BUTTON_AUX):
937-
SaberBase::DoEffect(EFFECT_USER2, 0);
938-
return true;
939-
#endif
940-
#endif // SABERSENSE_F263_CUSTOM_USER_EFFECT
941-
942917
// MAIN ACTIVATION
943918
// Saber ON AND Volume Adjust, 1 and 2 Button.
944919
case EVENTID(BUTTON_POWER, EVENT_FIRST_SAVED_CLICK_SHORT, MODE_OFF):
@@ -1229,7 +1204,11 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
12291204
#endif
12301205

12311206
// Multi-Blaster Deflection mode
1207+
#ifdef SABERSENSE_EFFECT_USER1_ALT_FONT
1208+
case EVENTID(BUTTON_POWER, EVENT_FOURTH_SAVED_CLICK_SHORT, MODE_ON):
1209+
#else
12321210
case EVENTID(BUTTON_NONE, EVENT_SWING, MODE_ON | BUTTON_POWER):
1211+
#endif
12331212
swing_blast_ = !swing_blast_;
12341213
if (swing_blast_) {
12351214
if (SFX_blstbgn) {
@@ -1252,6 +1231,12 @@ bool Event2(enum BUTTON button, EVENT event, uint32_t modifiers) override {
12521231
}
12531232
return true;
12541233

1234+
#ifdef SABERSENSE_EFFECT_USER1_ALT_FONT
1235+
case EVENTID(BUTTON_NONE, EVENT_SWING, MODE_ON | BUTTON_POWER):
1236+
SaberBase::DoEffect(EFFECT_USER1, 0);
1237+
return true;
1238+
#endif
1239+
12551240
// LOCKUP
12561241
#if NUM_BUTTONS == 1
12571242
// 1 button lockup

0 commit comments

Comments
 (0)